MATLAB Part 9 MATH MODELING P1 QUESTION
MATLAB Part 9 MATH MODELING P1 QUESTION
____
MATHEMATICAL MODELING OF SYSTEMS part 1
POLES-ZEROS and Transient Response
_____________________________________________________________________________________
I. OBJECTIVES
1. To be able to use Transient Function and identify zeros and poles of the systems
2. To apply Transient Response using Laplace transform in a network of applications.
3. To use MATLAB to predict the outcome with respect to time.
Using MATLAB documentation, some important terms illustrated in this exercise are:
Creation:
SYS = TF(NUM,DEN) creates a continuous-time transfer function SYS with numerator(s) NUM
and denominator(s) DEN. The output SYS is a TF object.
1
IV. PROCEDURE
1. Multiplying Polynomials. Multiplication of polynomials is accomplished by conv function.
Multiply n ( s )= ( 3 s 2+ 2 s+1 ) (s +4 )
%BASICFUNCTION_P9P1a
p = [3 2 1]; %first part
q = [1 4]; %second part
n = conv(p,q)
Solution: n = [3 14 9 4], that is n=3 s 3+ 14 s 2 +9 s +4
The function polyval is used to evaluate the value of a polynomial at a given value of the
variable. Let’s evaluate the previous example at s = 4.
Q1: Multiply the function using MATLAB (That is write the script and solution).
a. ( 8 s3 −12 s2−2 s+3 ) by ( s3 +1 ¿, evaluate the function when s = - 4.
b. ( 3 s4 −48 s2 ) by ( s−1 ) , evaluate the function when s = 2.
c. ( s3 +3 s2 +3 s +1 ) by ¿), evaluate the function when s = - 1.
Note: Write the MATLAB script and solution on the back of this paper.
2. Transfer Function. The transfer function is an input-output of an LTI system. It relates the
Laplace transform of the output variable to the Laplace transform of the input variable with zero
initial conditions. Consider the LTI system described by the transfer function G(s), where
m m−1
am s + am−1 s + …+a1 s +a o
G ( s )= n n−1
,
s +bn−1 s + …+a 1 s+b o
where m ≤ n, and all common factors have been canceled. The roots of the numerator
polynomial of G(s) are called the zeros of the system; the roots of the denominator polynomial
To solve for the roots of a function, say that of numerator and denominator of G(s), use the
function roots.
3. Locating the poles and zeros using pzmap. Consider the transfer functions
2
6 s +1 ( s +1 ) (s+2)
G ( s )= and H ( s )=
3 2
s +3 s + 3 s+ 1 ( s +2 i )( s−2i ) ( s +3 )
Compute for the poles and zeros of the functions.
ϭ
ϻ
2
using pzmap, zeros are denoted by “o” and poles are denoted by “x”. If the pzmap function is
invoked without the left-hand arguments, the plot is automatically generated.
Solution:
To determine the transfer function of the system, we multiply the numerator of G(s) with
denominator of H(s). That is,
num num [ G ( s ) ]∗den [H ( s ) ]
=
den den [ G ( s ) ]∗num[H ( s ) ]
and we can use pzmap function to plot the pole-zero graph and pzmap with arguments to solve
for pole-zero values.
%BASICFUNCTION_P9P1b
[p,z] = pzmap(num,den) %to compute for the poles & zeros of the system
p =
-2.0000
-1.0002 + 0.0002i
-1.0002 - 0.0002i
-0.9998 + 0.0002i
-0.9998 - 0.0002i
z =
-3.0000
-0.0000 + 2.0000i
-0.0000 - 2.0000i
-0.0000 + 0.4082i ϭ
-0.0000 - 0.4082i
ϻ
3
Q3a. Locate these poles and zeros on the Figure below. Mark it with “X”
and “0”
Pole-Zero Map
2.5
1.5
0.5
Imaginary Axis
-0.5
-1
-1.5
-2
-2.5
-3 -2.5 -2 -1.5 -1 -0.5 0
Real Axis
Q3c.Determine the poles and zeros of the system and write its final
transfer function. Write your MATLAB script on the back of this
paper.
2
s +2 s +1
Q3d. Determine the poles and zeros of the system by manual solution, whose transfer function is given
by
30(s−6)
H ( s )=
s (s2 + 4 s +13)
Also, plot the poles-zeros of the system manually.
Q3e. Use the transfer equation of question Q3d, use MATLAB script solve for the poles-zeros of the
system. Plot the transfer function. Compare your manual plot and MATLAB plot
Q3f. Consider a RLC series circuit. The differential equations of the system is given as
di 1
L + Ri + ∫ idt =V
dt C ϭ
and the current is a function of charges flowing through the RLC circuit,
ϻ
4
dq
i=
dt
Solve the transfer function of the system using DE and Laplace transformation. You may recall that R,L
and C components in the time-domain can be converted into frequency domain:
R R, L sL and C 1/sC.
Q3g. Use MATLAB script to plot the frequency response (Recall your Signal and System lecture or
Electronics 3: Frequency Response of Passive Filter) of the function given in question Q3f. Let R = 560 Ω,
L = 1 mH, and C = 100 pF.
Q4. Determine the poles-zeros of the system given below by using MATLAB and plot it.
3 2
s −6 s +7 s+15
G ( s )= 5 4 3 2
s +s −5 s −9 s +11 s−12
Q5. Determine the pole locations for the unity feedback system shown below using MATLAB. Plot the
system’s poles. What is the transfer function of the system?
150
G ( s )=
( s +5 ) ( s +7 ) ( s +9 )(s +11)
Q6. Consider the following RC circuit. Find the transfer function of the network Vo(s)/Vi(s).
ϭ
ϻ