Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 40

Dynamic Systems

EGN 4432

Block Diagrams

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 1 /40
Block Diagram Example

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 2 /40
Block Diagram
• Definition
– A pictorial representation of the inter-relationships of signals in a system
– A transfer function for a given system in frequency domain is defined as a ratio
between its output and input
• System Block
Y (s)
U(s) H(s) Y(s)  H ( s)
U (s)

• Gain Block
Y ( s)
U(s) a Y(s) a
U (s)

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 3 /40
Block Operations
• Summing Junction

U1(s)  H(s) Y(s) Y ( s )  H ( s ) U1 ( s )  U 2 ( s ) 

U2(s)

• Branching

U(s) H(s) Y1(s) Y1 ( s )  Y2 ( s )  H ( s )U ( s )


Y2(s)

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 4 /40
Cascaded Blocks
• Definition
– A pictorial representation of cascaded system blocks

• Multiple Blocks

U(s) Y(s)
H1(s) H2(s)

• Resultant Block

U(s) Y(s) Y (s)


H(s)  H ( s )  H1 ( s ) H 2 ( s )
U (s )

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 5 /40
Parallel Blocks
• Definition
– A pictorial representation of parallel system blocks

• Multiple Blocks

H1(s)
U(s) Y(s)

H2(s)

• Resultant Block

U(s) Y(s) Y ( s)
H(s)  H ( s )  H1 ( s )  H 2 ( s )
U ( s)

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 6 /40
Cascaded and Parallel Blocks
• System Examples
H3(s) Y (s)
 H ( s )  H1 ( s )  H 2 ( s )  H 3 ( s ) 
U (s)
U(s)
H1(s) H2(s)  Y(s)

H(s)

U(s)
H1(s) H2(s)  Y(s)

Y ( s)
 H ( s )   H1 ( s ) H 2 ( s )  H1 ( s ) H 2 ( s ) H ( s ) 
U ( s)
 H1 ( s )  H 2  s   H 2 ( s ) H ( s ) 

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 7 /40
Example: ODE to Block Diagram
• 1st Order ODE System
x (t )  ax (t )  bu (t )

• Transfer Function Representation (zero initial conditions)


sX ( s )  aX ( s )  bU ( s )
X ( s) b
H ( s)  
U ( s) s  a

• Block Diagrams

U(s) b X(s)
sa

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 8 /40
Create a Transfer Function Using Matlab
• 1st Order ODE System
x (t )   x (t )  u (t )
• Transfer Function Representation
sX ( s )   X ( s )  U ( s )
X (s) 1
H ( s)  
U (s) s  1

• Matlab Commands
» num=[0 1];
» den=[1 1];
» sys = tf(num, den);
» step(sys);

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 9 /40
Open-Loop Control Block Diagram
• Open Loop Controller, C(s), Cascaded with an Open-Loop System

R(s) U(s) Y(s)


C(s) H(s)

• Derivation of an Open Loop Transfer Function


Y ( s )  H ( s )U ( s )
U (s )  C ( s) R( s )
Y (s)
  C (s) H (s)
R(s)

• Notes
– Ideally, we want C(s)H(s) to be 1
– No measurement is required

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 10 /40
Closed Loop Control Block Diagram
• Closed loop Block Diagram (with a controller block)
+ E(s) U(s)
R(s)  C(s) H(s) Y(s)

• Derivation of a Closed Loop Transfer Function


E ( s)  R( s)  Y ( s)
U ( s)  C ( s) E ( s)
Y ( s )  H ( s )U ( s )
 Y ( s)  H ( s)C ( s )[ R ( s )  Y ( s)]
 Y ( s)[1  C ( s ) H ( s)]  C ( s ) H ( s ) R( s)
Y (s) C (s) H ( s)
 
R( s) 1  C ( s) H ( s)
• Notes
– Assume perfect measurements

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 11 /40
Closed Loop Control Block Diagram
• Inclusion of Measurement Effect, M(s)
+  E(s) U(s)
R(s) C(s) H(s) Y(s)

M(s)
• Modification of a Closed Loop Transfer Function
E ( s )  R ( s )  M ( s )Y ( s )
U ( s)  C ( s) E ( s)
Y ( s )  H ( s )U ( s )
 Y ( s )  H ( s )C ( s)[ R( s )  M ( s )Y ( s )]
 Y ( s )[1  M ( s ) H ( s )C ( s )]  H ( s )C ( s ) R ( s )
Y (s) H ( s )C ( s )
 
R ( s ) 1  M ( s ) H ( s )C ( s )
• Notes
– This represents a complete structure of a single input, single output system
– Imperfect measurements
EGN 4432 Dynamic Systems
Ocean & Mechanical Engineering, Florida Atlantic University 12 /40
Exercise 1
• Determine the transfer function X2 Y
,
U U

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 13 /40
Exercise 1
• Determine the transfer function X2 Y
,
U U

1 b b
 a   a
Y s s s  as  b
 
U 1 b b s 2  as  b
1 a   s  a 
s s s

1  as    as  b 
Y   X2  X2    X 2  
s b
   bs 
 bs  bs
 X2  Y    2
 as  b  s  as  b

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 14 /40
Exercise 2
• Determine the transfer function C
R

 C   H 1  H 2G  R
C
 H 1  H 2G
R

 H1 
C  H2  GR
 G 
C
 H 2G  H 1
R
EGN 4432 Dynamic Systems
Ocean & Mechanical Engineering, Florida Atlantic University 15 /40
Exercise 3
• Determine the transfer function C
R

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 16 /40
Exercise 3

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 17 /40
Exercise 3

C  G  H1  G  H1
  1  
R  1  GH 2  G  1  GH 2

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 18 /40
Exercise 4
• Determine the transfer function X2 Y
,
R R

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 19 /40
Exercise 4

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 20 /40
Exercise 4

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 21 /40
Exercise 4

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 22 /40
Exercise 4

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 23 /40
Exercise 4

𝑌 𝐺 1 𝐺2 𝐺3
=
𝑅 1+𝐺 2 ( 𝐻 2 − 𝐺3 𝐻 3 )+ 𝐻 1 𝐺 1 𝐺 2

x2
X2 1
Y  G 2G3 X 2  
Y G 2G3

X2 X2Y  1  G1G 2G3


  
R Y R  G 2G 3  1  G 2  H 2  G 3H 3  H 1G1G 2
G1

1  G 2  H 2  G3H 3  H 1G1G 2
EGN 4432 Dynamic Systems
Ocean & Mechanical Engineering, Florida Atlantic University 24 /40
Exercise 5
• Determine the transfer function C
R

C  H 2 GR  H 1 R  C 
 C 1  H 1H 2   R GH 2  H 1H 2 
C H 1H 2  GH 2
 
R 1  H 1H 2
EGN 4432 Dynamic Systems
Ocean & Mechanical Engineering, Florida Atlantic University 25 /40
Exercise 5 (Alternative Method)
• Determine the transfer function C
R

C  H 1H 2  G  H 2  H1  G 
  1  
R  1  H 1H 2  H1  1  H 1H 2

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 26 /40
Exercise 6
• Determine the transfer function Y Y
,
R G

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 27 /40
Exercise 6
• Determine the transfer function Y Y
,
R G
Y G1

R 1  G1H 1

Y 1 Y 1
  
G 1  G1H 1 G 1  G1H 1

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 28 /40
Exercise 7
• Determine the transfer function X X
,
F G

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 29 /40
Exercise 8
• Determine the transfer functions C C
,
R D

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 30 /40
Exercise 9
• Determine the transfer functions C C
,
R D

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 31 /40
Exercise 10
• Determine the transfer functions X Y
,
R R

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 32 /40
Exercise 11
• Given the following ODE, create the corresponding transfer function
variable in Matlab

x  5 x  8 x  u  u

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 33 /40
Exercise 11
• Given the following ODE, create the corresponding transfer function
variable in Matlab
x  5 x  8 x  u  u
 s 2 X  5sX  8 X  U  sU
 X  s 2  5s  8   U  s  1
X s 1
H   2
U s  5s  8

• Create an array that stores all the coefficients of the numerator polynomial
• Create an array that stores all the coefficients of the denominator polynomial
>> H = tf([1 1], [1 5 8]);
>> whos

Remark
• Transfer functions, once created, can be manipulated like variables in Matlab
EGN 4432 Dynamic Systems
Ocean & Mechanical Engineering, Florida Atlantic University 34 /40
Exercise 12
• Given the following transfer function, plot using Matlab its time domain
response over a period of 10 second to 1) a unit step input, 2) unit impulse,
3) unit ramp, 4) unit cosine signal of 1rad/second

50
H (s)  2
9s  6s  1

>> H = tf(50, [9 6 1]);


>> step(H, 10); %% (1)
>> impulse(H,10); %% (2)
>> s = tf(1, [1 0]); %% (3) integrator
>> step(H*s); %% (3)
>> c = tf(1, [1 0 1]); %% (4) cosine signal
>> impulse(H*c); %% (4)

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 35 /40
Resultant Transfer Function Using Matlab
• Serial Configuration Feedback Configuration
1 U(s) 1 + E(s) 1
R(s)  Y(s)
R(s) Y(s) − s3
s3 s4
1
>> num1=[0 1];
s4
>> den1=[1 3];
>> num2=[0 1];
>> num1=[0 1];
>> den2=[1 4];
>> den1=[1 3];
[num den] =
>> num2=[0 1];
series(num1,den1,num2,den2);
>> den2=[1 4];
>> printsys(num,den)
[num den] =
num/den =
feedback(num1,den1,num2,den2);
1
>> printsys(num,den)
--------------
num/den =
s^2 + 7 s + 12
s + 4
--------------
s^2 + 7 s + 13

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 36 /40
Exercise 13
• Develop the closed-loop transfer function with the following transfer
functions using Matlab, and plot the closed loop response given a unit step
desired output

5s  3 50
C ( s)  , H ( s)  2
s 9s  6s  1
[num, den] = feedback(50*[5 3], [9 6 1 0], [1],[1]);
step(num, den);

OR

C = tf([5 3], [1 0]);


H = tf(50, [9 6 1]);
Hc = C*H/(1 + C*H);
step(Hc);
EGN 4432 Dynamic Systems
Ocean & Mechanical Engineering, Florida Atlantic University 37 /40
Exercise 14
• Plot the closed-loop system response of the following system subject to a
unit step desired output. The open loop system is characterized by the
following ODE, and the controller is characterized by the following
transfer function.
5s  3
x  5 x  8 x  2, C ( s ) 
s
[num, den] = feedback(2*[5 3], [1 5 8 0], [1],[1]);
step(num, den);
OR

C = tf([5 3], [1 0]);


H = tf(2, [1 5 8]);
Hc = C*H/(1 + C*H);
step(Hc);

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 38 /40
Exercise 15
• Plot the closed-loop system response of the previous system (in 1B) subject
to a unit cosine desired output, sin(2t).

C = tf([5 3], [1 0]);


H = tf(2, [1 5 8]);
Hc = C*H/(1 + C*H);
t = linspace(0, 10, 100);
us = sin(2*pi*t);
lsim(Hc, us, t);

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 39 /40
Summary
• What we have learned
– We can obtain a transfer function from a block diagram
– We can obtain a block diagram from an ODE and vice versa
– When we have more than one input in a block diagram, determine a transfer
function for each of the inputs and the output is determined based on linear
superposition
– We can simulate a block diagram, open or closed loop system responses using
Matlab/Simulink

EGN 4432 Dynamic Systems


Ocean & Mechanical Engineering, Florida Atlantic University 40 /40

You might also like