You are on page 1of 9

University of Engineering and Technology, Lahore Fall 2016

TRANSFER FUNCTIONS AND 2ND ORDER SYSTEMS


Name : Date :
Regd-No :

OBJECTIVES:
 Building up on the Transfer Function representation in Laplace Domain.
 Transfer Function representation and transient analysis of 2nd Order Systems.
 Transfer Function representation and transient analysis of higher order systems.
 Obtaining system response to an arbitrary input

SUGGESTED READING:
 Chapter 4: “Transfer Function approach to Modeling Physical Systems”, from book
“System Dynamics”, by Ogata.
 http://www.electrical4u.com/transfer-function/
 https://www.facstaff.bucknell.edu/mastascu/eControlHTML/SysDyn/SysDyn2.html

Please read through all the suggested reading before you come to lab.

SOFTWARE REQUIRED
 MATLAB
---------------------------------------------------------------------------------------------------------------------
Review:
the transfer function of a control system is defined as the ratio of the Laplace
transform of the output variable to Laplace transform of the input variable
assuming all initial conditions to be zero

The Control System Toolbox™ provides functions for creating basic


representations of linear time-invariant (LTI) models. Some of the ways we can
represent our system model in MATLAB are:
 Transfer function (TF) models
 Zero-pole-gain (ZPK) models
 State-space (SS) models

MCT-304: Modeling and Simulation 1


Department of Mechatronics and Control Engineering, U.E.T Lahore
University of Engineering and Technology, Lahore Fall 2016
 To create a TF object representing the transfer function, we can use the ‘tf’
command from MATLAB.
 sys = tf(num,den)
 Where num and den represent the numerator and the denominator
polynomial respectively.
 If the transfer function of a system is known, the impulse response can be
calculated by using the ‘impulse’ command.
 impulse(sys)
 If the transfer function of a system is known, the impulse response can be
calculated by using the ‘step’ command.
 step(sys)

2nd Order Systems


Second order systems are characterized by a second degree polynomial in the
denominator of their transfer function. Thus, second order systems have multiple
poles and the response of the system may vary according to the position of those
poles.

Why Study Second Order Systems?


Second order systems are important for a number of reasons. They are the simplest
systems that exhibit oscillations and overshoot.
 Many important systems exhibit second order system behavior.
 Second order behavior is part of the behavior of higher order systems and
understanding second order systems helps you to understand higher order
systems.

Example 1 (Problem A-4-6):


Figure1 shows a schematic diagram of an automobile suspension system. As the
car moves along the road, the vertical displacements at the tires excite the
automobile suspension system, whose motion consists of a translational motion of
the center of mass and a rotational motion about the center of mass. Mathematical
modeling of the complete system is quite complicated.

MCT-304: Modeling and Simulation 2


Department of Mechatronics and Control Engineering, U.E.T Lahore
University of Engineering and Technology, Lahore Fall 2016

Fig.1: (a) Automobile suspension system; (b) simplified suspension system

highly simplified version of the suspension system is shown in Figure1 (b).


Assuming that the motion u at point P is the input to the system and the vertical
motion y of the body is the output, obtain the transfer function Y(s)/U(s). (Consider
the motion of the body only in the vertical direction.) The displacement y is
measured from the equilibrium position in the absence of the input u.

Solution:
The equation of motion for the system in fig.1(b) is:
m ÿ+ b ( ẏ−u̇ ) + k ( y −u )=0
or
m ÿ+ b ẏ+ ky=b u̇+ ku

Taking the Laplace transform of this last equation, assuming zero initial
conditions, we obtain
( m s 2+ bs+ k ) Y ( s ) =( bs+ k ) U (s)

Hence the transfer function Y ( s)/U (s) is


Y (s ) bs+k
= 2
U ( s) m s + bs+ k

MCT-304: Modeling and Simulation 3


Department of Mechatronics and Control Engineering, U.E.T Lahore
University of Engineering and Technology, Lahore Fall 2016
TASK 1:
Assuming that m = 400 kg, k = 1000 N/cm, b=450Ns/cm, find the step response of
the system to an input disturbance of 10cm.
Solution:
Code and plot:

Question 1.1:
What will happen to the response of the system if the damping (b) is increased 10
times? What about 100 times increase?

MCT-304: Modeling and Simulation 4


Department of Mechatronics and Control Engineering, U.E.T Lahore
University of Engineering and Technology, Lahore Fall 2016

TASK 2:
Plot the unit-step response curves of the two systems defined by the transfer
functions
X ( s) 25
= 2
U ( s ) s +5 s +25
and
Y (s ) 5 s+ 25
=
U ( s) s2 +5 s+25

In one diagram.
Solution:
Code and plot:

System Response to Arbitrary Inputs:

MCT-304: Modeling and Simulation 5


Department of Mechatronics and Control Engineering, U.E.T Lahore
University of Engineering and Technology, Lahore Fall 2016
The command ‘lsim’ produces the response of linear, time-invariant systems to
arbitrary inputs. If the initial conditions of the system are zero, then
lsim(sys, u,t) or lsim(num,den,u,t)

produces the response of the system to the input u. Here, u is the input and t
represents the times at which responses to u are to be computed. (The response
time span and the time increment are stated in t; an example of how t is specified is
t = 0: 0.01: 10).
Note also that, by using ‘lsim’ commands, we are able to obtain the response of the
system to ramp inputs, acceleration inputs, and any other time functions that we
can generate with MATLAB.

Example 2 (Problem A-4-16):


Consider the mechanical system shown in Figure 2(a). The cart has the mass of m
kg. Assume that the wheels have negligible masses and there is no friction
involved in the system. The force u(t) applied to the cart is increased linearly from
0 to 5 N for the period 0 ≤ t ≤ 10, as shown in Figure 2(b). At t = 10+, the force u(t)
is disengaged, or

u ( t )=0 for t< 10

Assuming that m = 100 kg, obtain the displacement x(t) of the cart for 0 ≤t ≤30
with MATLAB. The cart is at rest for t < 0, and the displacement x is measured
from the rest position.

Fig.2: (a) Mechanical system; (b) Force u(t) applied to cart

Solution:
The equation of motion for the system is
m ẍ =u

MCT-304: Modeling and Simulation 6


Department of Mechatronics and Control Engineering, U.E.T Lahore
University of Engineering and Technology, Lahore Fall 2016
Hence, the transfer function of the system is
X ( s) 1 1
= 2 =
U (s ) m s 100 s 2
The input u(t) is a ramp function for 0 ≤ t ≤ 10 and is zero for t<10, as shown in
Figure 2(b). (At t = 10, u = 5 N.) Thus, in MATLAB, we define
u1 = 0.5 * [0:0.02:10] %for 0 ≤ t ≤ 10
u1 = 0 * [10.02:0.02:30] %for 10 ≤ t ≤ 30
where u is either u1 or u2, depending on which interval u is in. Then the input
force u(t) for 0 ≤ t ≤ 30 can be given by the MATLAB array

u = [u1 u2];

Code:

t = 0:0.02:30;
ul = 0.5*[0:0.02:10];
u2 = 0*[10.02:0.02:30];
u = [ul u2];
nurn = [1]; den = [100 0 0];
sys = tf(nurn,den);
x = lsim(sys,u,t);
subplot(211 ),plot(t,x)
grid
ylabel('Output X(t)')
subplot (212), plot(t,u)
v = [0 30 -1 6]; axis (v)
grid
xlabel('t (sec)')
ylabel('lnput Force u(t) newton')

Figure 3 shows the output and input versus time plot of the system. This input is
also known as ‘ramp input’.

MCT-304: Modeling and Simulation 7


Department of Mechatronics and Control Engineering, U.E.T Lahore
University of Engineering and Technology, Lahore Fall 2016

Output X(t) 4

0
0 5 10 15 20 25 30
lnput Force u(t) newton

0 5 10 15 20 25 30
t (sec)

Fig.3: Response curve x(t) versus t and input curve u(t) versus t
TASK 3:
Consider the system shown in Figure below. The system is at rest for t < 0. Assume that the
displacement x is the output of the system and is measured from the equilibrium position. At t =
0, the cart is given initial conditions x ( 0 )=0 and ẋ ( 0 )=0.5 m/s. Assume that m = 20 kg, b1 = 50
N-s/m, b2 = 70 N-s/m, k1 = 300 N/m, and k2 = 400 N/m.

1. Obtain the transfer function and output motion x(t).


2. Plot the step response curve.
3. Plot the response to a unit magnitude square wave input for 0 ≤ t ≤10 seconds

MCT-304: Modeling and Simulation 8


Department of Mechatronics and Control Engineering, U.E.T Lahore
University of Engineering and Technology, Lahore Fall 2016

Solution:

MCT-304: Modeling and Simulation 9


Department of Mechatronics and Control Engineering, U.E.T Lahore

You might also like