Transfer Function Approach in LTI Systems
Transfer Function Approach in LTI Systems
Chapter 4
Transfer Function
Approach to Modeling
Dynamic Systems
A. Bazoune
4.1 INTRODUCTION
Transfer functions (TF)are frequently used to characterize the input-output
relationships or systems that can be described by Linear Time-Invariant (LTI)
differential equations.
(n) ( n −1 ) (m) ( m −1 )
a0 y + a1 y + + an −1 y + an y = b0 x + b1 x + + bm −1 x + bm x (n ≥ m) (4-1)
where y is the output and x is the input. The TF of this system is the ratio
of the Laplace-transformed output to the Laplace-transformed input when all
initial conditions are zero, or
L [ output ]
Transfer Function (TF) = G ( s ) =
L [ input ] zero initial conditions
(4-2)
Y (s)
m m −1
b0 s + b1 s + + bm −1 s + bm
= =
X (s)
n n −1
a0 s + a1 s + + an −1 s + an
1/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
Transfer Function
Figure 4-1. Block diagram representation of a transfer function
3. The TF includes the units necessary to relate the input to the output;
however it does not provide any information concerning the physical
structure of the system. (The TF of many physically different systems
can be identified).
Example 4-1
2/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
b x k x b k
f (t)
m m
+x x
f (t)
Figure 4-2 Mass -Spring –Damper System and the FBD.
∑
F = m x
Summation of all forces
acting on the system
f ( t ) − b x − k x = m x
or
iii) For zero Initial Conditions (I.C’s), taking Laplace Transform (LT) of
both sides of the above equation yields
(m s 2
+ b s + k ) X ( s ) = F( s )
X (s) Output 1
= =
F( s ) Input (m s 2
+bs +k )
F (s ) 1 X ( s)
In p u t ms 2 + bs + k Output
Transfer Function
3/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
Y (s)
Transfer Function (TF) = G ( s ) =
X(s)
where X (s) is the LT of the input x (t ) and Y (s) is the LT of the output
y (t ) and where we assume all I.C’s involved are zero. It follows that
Y ( s ) = G ( s ) X(s ) (4-3)
L δ ( t ) = 1
the LT of the output of the system is
The inverse LT of the output of the system is given by Equation 4-4 yields
the impulse response of the system, i.e;
L -1 G ( s ) = g ( t )
is called the impulse response function or the weighting function, of the
()
system. The impulse-response function g t is thus the response of a linear
system to a unit impulse input when the I.C’s are zero. The LT of g (t ) gives
the TF.
4/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
• Notice that a signal can pass only in the direction of the arrows. Thus,
a block diagram of a dynamic system explicitly shows a unilateral
property.
R (s ) C (s )
G (s )
C ( s ) = R ( s )G ( s )
Note that
[ Dimension of the output signal ] = [ Dimension of the input signal ] × [ Dimension of the TF ]
Notice that in BD the main source of energy is not explicitly shown and that
the BD of a given system is not unique. A number of different BD’s can be
drawn for a system, depending on the point of view of the analysis (See
Example 4-2).
a −b
a
b
Figure 4-4 Summing point.
5/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
Branch Point.
Point. A branch point is a point from which the
signal from a block goes concurrently to other blocks or summing points.
E (s )
R (s ) G (s ) C (s )
E (s )
R (s ) G (s ) C (s )
B (s )
H (s )
6/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
7/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
8/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
MATLAB Implementation
Series Connection
[num,den]=series(num1,den1,num2,den2)
Parallel Connection
G1 ( s)
R (s) C (s)
G2 (s)
[num,den]=parallel(num1,den1,num2,den2)
Feedback Connection
R (s1)
GG C
H (s )
[num,den] = feedback(num1,den1,num2,den2,sign)
9/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
4.3 Partial-
Partial-Fraction Expansion with Matlab
MATLAB representation of Transfer Functions
(TF).
(TF) The transfer function of a system is represented by two arrays of
numbers. For example, consider a system defined by
Y (s) 25
= 2
U ( s ) s + 4s + 25
>> num=25;
>> den=[1 4 25];
>> sys=tf(num,den)
Transfer function:
25
--------------
s^2 + 4 s + 25
Partial-
Partial-Fraction Expansion with MATLAB. MATLAB. MATLAB
allows us to obtain the partial-fraction expansion of the ratio of two
polynomials,
b (1) s + b ( 2 ) s + + b (h)
h h −1
B(s) num
= =
A(s) den a (1) s n + a ( 2 ) s n−1 + + a ( n )
Where a (1) ≠ 0 , some of a ( i ) and b ( j ) may be zero, and num and den are
row vectors that specify the numerator and denominator of B ( s ) A ( s ) . That
is,
The command
>> [r,pk]=residue(num,den);
finds the residues, poles and direct terms of a partial fraction expansion of
the ratio of the two polynomials B ( s ) and A ( s ) . The partial fraction
expansion of B ( s ) A ( s ) is given by
10/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
2
B(s)
4 3
num s + 8s + 16s + 9s + 6
= = 2
A(s)
3
den s + 6s + 11s + 6
r=-6.0000
-4.0000
3.0000
p=-3.0000
-2.0000
-1.0000
k= 1 2
2
B(s)
4 3
num s + 8s + 16s + 9s + 6 6 4 3
= = 2
=s+2− − +
A(s)
3
den s + 6s + 11s + 6 s+3 s+2 s+1
The command
[num,den]=residue(r,p,k)
where r,p and k are outputs , converts the partial-fraction expansion back to
the polynomial ratio B ( s ) A ( s ) as shown below
num =
1 8 16 9 6
11/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
den =
1 6 11 6
u
y y
k
k ( y − u)
m m
b ( y − u )
b
∑
F = m y ⇒ − b ( y − u ) − k ( y − u ) = m y
Summation of all forces
acting on the system
or
m y + b y + k y = bu + ku
The latter equation represents the mathematical model of the system under
consideration.
2. For zero I. C’s, taking LT of both sides of the above equation gives
( ms 2
+ b s + k ) Y ( s ) = ( bs + k ) U ( s )
12/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
Y (s) ( bs + k )
Transfer Function (TF) = =
U ( s ) ( ms 2 + b s + k )
1
U (s) =
s
The output Y (s) becomes
1 2s + 10 2s + 10
Y (s) = =
s s 2 + 2 s + 10 s3 + 2 s 2 + 10s
r=
-0.5000 - 0.1667i
-0.5000 + 0.1667i
1.0000
p=
-1.0000 + 3.0000i
-1.0000 - 3.0000i
0
k=
[]
13/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
1 s 1 s +1 −1
Y (s) = − = −
s ( s + 1)2 + 32 s ( s + 1)2 + 32
1 s +1 1 3
= − +
s ( s + 1)2 + 32 3 ( s + 1)2 + 32
1
y(t ) = L -1 Y ( s ) = 1 − e − t cos 3t + e − t sin 3t .
3
Example 4-4 (Textbook Page 117-119)
Consider the mechanical system shown in Figure 4-8. The system is initially
at rest. The displacements x and y are measured from their respective
equilibrium positions. Assuming that p(t ) is a step input and the
displacement x ( t ) is the output.
14/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
b2 y
b2 m2
k1 p (t ) y
k2 y k2 ( y − x)
k1 x
m m
x
x
p (t )
Figure 4-8 Mechanical system and its FBD.
∑
F = m x ⇒ p ( t ) − k1 x + k2 ( y − x ) = m x
Summation of all forces
acting on the mass m
or
x + ( k1 + k2 ) x − k2 y = p(t )
m (1)
∑
F = m2 y ⇒ − b2 y − k2 ( y − x ) = 0
Summation of all forces
acting on the mass m2
or
− k2 x + ( b2 y + k2 y ) = 0 (2)
5. For zero I. C’s taking LT of both sides of Eqs. (1) and (2), gives
− k 2 X ( s ) + [ b2 s + k 2 ] Y ( s ) = 0 (4)
15/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
X (s) 0.4 s + 4
=
P ( s ) 0.04s + 0.4s 2 + 4 s + 24
3
10 s + 100
=
s + 10s 2 + 100 s + 600
3
10
U (s) =
s
The output X (s) becomes
X (s) 10 s + 100 10
= 3 ×
P ( s ) s + 10s 2 + 100 s + 600 s
1
See Appendix at the end of this chapter
16/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
r=
-0.6845 + 0.2233i
-0.6845 - 0.2233i
-0.2977
1.6667
p=
-1.2898 + 8.8991i
-1.2898 - 8.8991i
-7.4204
0
k=
[]
17/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
Figure 4-1 shows a block with a TF. Such a block represents a system or an
element of a system. To simplify our presentation, we shall call the block
with a TF a system. MATLAB uses sys to represent such a system. The
statement
>> sys=tf(num,den)
Y (s) 2s + 25
= 2
X ( s ) s + 4s + 25
Transfer function:
2 s + 25
--------------
s^2 + 4 s + 25
18/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
Step Response. The step function plots the unit step response,
assuming the I.C’s are zero. The basic syntax is step(sys), where sys is the
LTI object defined previously.
>> [y,t]=step(sys,…) Returns the output y, and the time array t used
for the simulation. No plot is drawn. The array y
is p × q × m where p is length(t), q is the number
of outputs, and m is the number of inputs.
>> step(sys1, sys2,…,t) Plots the step response of multiple LTI systems
on a single plot. The time vector t is optional.
You can specify line color, line style and marker
for each system.
The steady state response and the time to reach that steady state are
automatically determined. The steady state response is indicated by
horizontal dotted line.
For more details in this topic: type doc step or help step at MATLAB prompt
>>
19/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
Y (s) ( bs + k )
Transfer Function (TF) = =
U ( s ) ( ms 2 + b s + k )
For m = 10 kg , b = 20 N-s/m and k = 100 N/m . Find the response y ( t )
for a unit step input u(t ) = 1(t ) .
MATLAB PROGRAM:
Step Response
1.5
1
Amplitude
0.5
0
0 1 2 3 4 5 6
Time (sec)
X (s) b2 s + k 2
=
P ( s ) mb2 s3 + mk2 s 2 + ( k1 + k2 ) b2 s + k1 k2
and
Y (s) k2
=
P ( s ) mb2 s + mk2 s + ( k1 + k2 ) b2 s + k1 k2
3 2
20/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
MATLAB PROGRAM:
Step Response
3
x(t)
2.5
y(t)
2
Amplitude
1.5
0.5
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
Time (sec)
21/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
The steady state response and the time to reach that steady state are
automatically determined. The steady state response is indicated by
horizontal dotted line.
For more details in this topic: type doc impulse or help impulse at MATLAB
prompt >>
22/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
in Figure 4-12 (b), to indicate that it has a very short duration and a very
large height.
x x
t t
0 0
∆t
Example 4-7
Consider the previous Example 4-6 but with an impulse input of magnitude
10 N.
MATLAB PROGRAM:
23/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
Impulse Response
12
x(t)
10
y(t)
8
Amplitude 4
-2
-4
-6
-8
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
Time (sec)
For more details in this topic: type doc lsim or help lsim at MATLAB prompt
>>
Example 4-8
24/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
MATLAB PROGRAM:
4
Amplitude
r(t)
1
y(t)
0
0 0.5 1 1.5 2 2.5 3
Time (sec)
Figure 4-14
Response for a
ramp input r (t ) = 2t
Example 4-9
t
1 Figure 4-15 Arbitrary input
MATLAB PROGRAM:
25/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
>> sys=tf(num,den)
>> t=[0:0.001:5];
>> for k=1:length(t)
>> if t(k) <= 1
r(k) =t(k);
else
r(k)=1;
end
end
>> y=lsim(sys,r,t);
>> plot(t,y,t,r,'r:');grid;
>> xlabel('Time (sec)');
>> gtext('r(t)');gtext('y(t)')
1.4
y(t)
1.2
r(t)
1
0.8
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time (sec)
26/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
APPENDIX
Method of Substitution:
The above system can be solved by substituting of one of the unknowns from
one equation into the other. For instance, from Eq. (4)
k2
Y (s) = X (s)
[ b2 s + k 2 ]
(5)
Substitute Eq. (5) into Eq. (3) we get
k22
ms + ( k1 + k2 ) X ( s ) −
2
X ( s ) = P(s )
[ b2 s + k 2 ]
or
X (s) b2 s + k 2
=
P ( s ) mb2 s3 + mk2 s 2 + ( k1 + k2 ) b2 s + k1 k2
or
P ( s ) ( b2 s + k2 )
X (s) =
mb2 s3 + mk2 s 2 + ( k1 + k2 ) b2 s + k1 k2
(6)
Substitute X (s) from (6) into (5), we get
k2 k2 P ( s ) ( b2 s + k 2 )
Y (s) = X (s) =
[b2 s + k2 ] [b2 s + k2 ]
mb2 s3 + mk2 s 2 + ( k1 + k2 ) b2 s + k1k2
X(s)
Finally
27/28
ME 413 Systems Dynamics & Control Chapter Four: Transfer Function Approach
Y (s) k2
=
P ( s ) mb2 s3 + mk2 s 2 + ( k1 + k2 ) b2 s + k1 k2
Cramer’s Rule:
Eqs. (3) and (4) represent a system of two equations with two unknowns
( ) ( )
X s and Y s . The above system can be written in the form
Y (s ) − a21 k2
= =
P(s ) a11a22 − a12 a12 ms + ( k1 + k2 ) ( b2 s + k2 ) − k 2
2
28/28