Ransfer Unction Epresentation: Objectives
Ransfer Unction Epresentation: Objectives
OBJECTIVES:
Learning about Transfer Function Representation in Laplace domain.
Representing Transfer Functions using MATLAB.
Simulating the response of a system to standard inputs with transfer
function.
SUGGESTED READING:
Chapter 4: “Transfer Function approach to Modeling Physical Systems”, from book
“System Dynamics”, by Ogata.
http://www.electrical4u.com/transfer-function/
https://en.wikibooks.org/wiki/Control_Systems/Transfer_Functions
ftp://ftp.dca.fee.unicamp.br/pub/docs/vonzuben/ea619_2s12/transfer_function_block_dia
gram.pdf
Please read through all the suggested reading before you come to lab.
SOFTWARE REQUIRED
MATLAB
---------------------------------------------------------------------------------------------------------------------
Introduction
A control system consists of an output as well as an input signal. The output is
related to the input through a function call transfer function. This function is
represented by a block and the complete diagram of control system using these
blocks which represent transfer function and arrows which represent various
signals, is collectively known as block diagram of a control system. For any
control system there exists a reference input termed as excitation or cause which
operates through a transfer operation termed as transfer function and produces an
effect resulting in controlled output or response. Thus the cause and effect
relationship between the output and input is related to each other through a transfer
function.
Y ( s)
G ( s )= ⇒ X ( s ) . G ( s ) =Y ( s)
X (s)
That is, transfer function of the system multiplied by input function gives the
output function of the system.
Thus, 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.
To create a TF object representing the transfer function, we can use the ‘tf’
command from MATLAB.
To look at more variants of the syntax, you can visit the MATLAB help
Example 1:
Create the MATLAB representation of the following transfer function:
s
G ( s )= 2
s + 2 s+10
Solution:
1. specify the numerator and denominator polynomials and use tf to construct
the TF object:
num = [ 1 0 ]; % Numerator: s
den = [ 1 2 10 ]; % Denominator: s^2 + 2 s + 10
G = tf(num,den)
Result:
G=
s
--------------
s^2 + 2 s + 10
Continuous-time transfer function.
TASK 1:
Create the MATLAB representation of the following function and add/write the
result in the space below:
2 s3 + s2 +8
G s= 2
( )
s + 4 s+5
Solution:
Code:
Output:
Impulse Response:
The resulting response of the system when the applied input is unit impulse
signal/input is known as the impulse response (assuming initial conditions to be
zero).
The Impulse Function, denoted with δ(t) is a special function defined piece-wise as
follows:
1. Since the transfer function is a ratio of the output to the input of the system
in laplace domain, X ( s ) .G ( s )=Y (s);
2. And the laplace of the unit impulse signal is 1;
3. The response of the system to a unit impulse is actually equal to the system
itself (X(s) = 1)
Y ( s )=G ( s )
To look at more variants of the syntax, you can visit the MATLAB help
Example 2:
Find the impulse response of the following transfer function:
1
G ( s )= 2
s + 2 s+10
Solution:
1. specify the numerator and denominator polynomials and use tf to construct
the TF object:
2. Use the impulse command to generate the impulse response.
num = [ 1 0 ]; % Numerator: s
den = [ 1 2 10 ]; % Denominator: s^2 + 2 s + 10
G = tf(num,den);
impulse(G); %plot the impulse response
Result:
Question 2.2: Describe what will happen to the impulse response of system if the
denominator is changed to (s+10) instead of (s+4)?
Step Response:
The step response of the system is it’s response to a unit step input (assuming zero
initial conditions).
From a practical standpoint, knowing how the system responds to a sudden input is
important because large and possibly fast deviations from the long term steady
state may have extreme effects on the component itself and on other portions of the
overall system dependent on this component. In addition, the overall system cannot
act until the component's output settles down to some vicinity of its final state,
delaying the overall system response
step(sys, t) or step(num,den,t)
y = step(sys,t) or y = step(num,den,t)
and
[y,t] = step(sys,t) or [y,t] = step(num,den,t)
MATLAB produces the unit-step response of the system, but displays no plot on
the screen. It is necessary to use a plot command to see response curves.
To look at more variants of the syntax, you can visit the MATLAB help
Example 3:
Find the step response of the following transfer function:
1
G ( s )= 2
s + 2 s+10
Solution:
1. specify the numerator and denominator polynomials and use tf to construct
the TF object:
2. Use the step command to generate the impulse response
num = [ 1 0 ]; % Numerator: s
den = [ 1 2 10 ]; % Denominator: s^2 + 2 s + 10
G = tf(num,den);
step(G); %plot the step response
0.12
0.1
Amplitude
0.08
0.06
0.04
0.02
0
0 1 2 3 4 5 6
Time (seconds)
Consider a water tank and the following parameters used for modeling the system:
h : the current height of the fluid in the tank (m)
d : diameter of the tank (m)
Qin : The input flow rate of fluid in the tank (m3/sec)
Qout : The output flow rate of the fluid (m3/sec)
R : The restriction to the flow of fluid at output (or a valve) (N.sec/m5)
ρ : Density of the fluid (kg/m3)
g : Acceleration due to gravity (9.8 m/s2)
A : Base Area of the tank (m2)
The tank above is filled at a flow rate of Q in (m3/sec) which is the input to the
system. The output is the discharge flowrate, Qout (m3/sec). If Qin = Qout, the level,
h, remains constant. If Qin > Qout, the level, h, rises. If Qin < Qout, the level, h, falls.
TASK 4.1:
Compute the Laplace transform of equation 1 and write it in the transfer
function form (assuming zero initial conditions, i.e the tank is empty).
Also write the order of the system.
TASK 4.2:
Create the MATLAB representation of the above computed transfer function with
the parameters given and write your code below showing the output.
d = 1m.
R = 9500 (N.sec/m5)
ρ = 1000 (kg/m3) (i.e. water)
g = 9.8 (m/s2)
TASK 4.3:
Use MATLAB to compute the impulse response and attach it below. Imagine the
impulse response in this case as suddenly dumping a bucket of fluid (not strictly a
bucket) into the tank and observing the change in the fluid height with time.
TASK 4.4:
Use MATLAB to compute the step response and attach it below. Imagine the step
response in this case as steadily letting the fluid in the tank (Qin = constant) and
seeing how the height of the fluid settles.
Question 4.1: What would happen to the time it takes to reach the
required height if the diameter of the tank is doubled?