EEGR 431: Linear Control Systems
Matlab Assignment 2
(Due Monday, November 5, 2014)
Review the computer-aided learning examples in the text: (p.57) C1.7-1.9, (p.125) C2.1, C2.3, C2.5
A: For problems D2.8 (a) and (c) from the text, in each case
1. Plot the step response, using matlab.
2. Calculate the damping ratio.
3. On your plots, indicate and determine the values of Mp, Tp, Tr and Ts (as specified by problem
D2.8).
4. Using the above variables, discuss any tradeoffs by comparing the speed of response and
overshoots, etc.
B : Effect of varying gain in a closed-loop system (Proportional control)
Consider the feedback system shown, consisting of a plant G(s) in cascade with a gain K (proportional
controller).
+
K
G(s)
R(s) -
Y(s)
Controller
Plant
Let the Plant be
G(s) = 1/ (s(s+2))
1) Is this plant stable? Calculate and plot the step response of this plant (i.e. Open-loop step response,
with K=0 in closed-loop characteristic polynomial).
2) Find the transfer function of this closed-loop system.
3) Use matlab to plot the closed loop step responses for the following gains:
K= -1, ¼ , 1, 4 , 16.
4) Find the damping ratio, , for each K-value and use this to explain the type of response in
each case.
5) For the K-value, which gives an underdamped response, determine the values of Mp, Tp, Tr and Ts.
R(S) = 52 + 16
Then
=S
SY($) = $T(s)R(S) =
10(s + 1) 6s
(s + 2)(s + 3) (s2 + 16)
To employ the step command in vector form, the "conv” (meaning convolve)
command may be used to multiply polynomial vectors
snum=60*conv([1 0 0], [1 1])
den1=conv([1 2], [1 3])
den=conv(deni, [1 0 16])
sy=tf(snum, den)
step(sy)
Using the “zpk” form may sometimes be easier:
sy=zpk ( [0 0 -1], [-2 -3 j*4 -j*4], 60)
step(sy)
C2.1 Use the step command to get the step response of the following:
5
(a) T(s) =
(s + 4)2
5(s + 6)
(b) T(s) =
(s +1+34)(s +1 -04)
Ans. (a) ta=zpk ( [], [-4 -4], 5)
step(ta)
(b) num=[5 30]
den=[1 2 17]
tb=tf(num, den)
step(tb)
C2.2 Use the step command to get the time response of the following:
32
(a) Y(S) =
(s + 2)2 (s2 + 16)
(b) Y(s) = T(s)R(s), where
48
ESC
1
a
2
Q
HIGHER-ORDER SYSTEM RESPONSE
D2.8 Using the curves given in the text, find approximately the percent overshoot,
peak time, rise time, and settling time of the following systems when driven by a
step input.
=
(a)
100
T(s) =
S2 + 4s + 100
Ans. 54%, 0.32, 0.12, 1.1
(b)
49
T(S)=
S2 + 4s + 49
Ans. 40%, 0.47, 0.18, 1.5
(c)
60
T(S)
2s2 + 8s + 30
Ans. 18%, 0.95, 0.44, 1.29
(d)
75
T(S)
S2 + 3s + 20
Ans. 32%, 0.75, 0.34, 1.7
It is important to realize the amount of information that can be obtained from the
T(S) function. In Drill Problem D2.8, the percent overshoot, peak time, rise time,
and settling time are found from the Laplace-transformed form of T(s). In most
control system designs, it is not necessary to convert the Laplace-transformed T(s)
unction into the tim
Ti
be analyzed and designed by stay-
CONTINUOUS-TIME SYSTEM RESPONSE
Ans. (a) sya=zpk ( [0], [-2 -2 -j*4 j*4] , 32)
126
step(sya)
(b) snum=[48 0]*3
deni-conv([1 3), [1 1 16])
den=conv(deni, [1 3])
stb=tf (snum, den)
step(stb)
independer
d²y
dt²
As can be
decays to
must all
zero, and
way
and a m
transforms. These symbolic capabilities of MATLAB provide another
In Chapter 1, we used symbolic techniques to get Laplace and inverse Laplace
using the "ezplot" command to get the time response. If we want to solve
T(S
and the
Y(s) = T(s)R(S)
10(s + 1)
Y(s) = 52 +58 +6
r(t) = 6 cos 4t
Y
we can use symbolic commands
syms st
The ch
T=10*(s+1)/(s^2+5*s+6)
R=laplace (6*cos (4*t))
Y=R*T
ysilaplace (Y)
ezplot (y, [O 10])
s1
with r
We need to specify the time range (here from 0 to 10 s). That range may require
some trial-and-error work.
S
2.3.
C2.3 Find the time response of C2.2(a) and C2.2(b) using symbolic methods and
the "ezplot" command.
Ans. (a) syms st
Ya=32/(s+2) 2/((s^2+16)
ya=ilaplace(Ya)
ezplot(ya, [0 15])
(b) syms s t
T=48/(s+3)/(s^2+s+16)
r=3*exp(-3*t)
R=laplace (r)
If th
unit
is
Yb=T*R
yb=ilaplace (Yb)
ezplot (yb, [O 2])
2.3 Response of Second-Order Systems
wh
w
W
2.3.1 Time Respon
0.4
7
8
0.2
9
6
5
4
3
0
0
1
2
with
constant
transfer
Figure 2.8 Normalized step response of a second-order system
function numerator.
(b)
(b) numb=[10 8]
denb=[1 4 4]
tb=tf (numb, denb)
step(tb)
(
(c) numc=[-3 17]
denc=[1 2 17]
tc=tf(numc, denc)
step(tc)
C2.5 Use MATLAB Commands to obtain Figure 2.8. For convenience, le
Wn = 1, so the time axis becomes t = @nt.
Ans. num=1
deno=[1 0 1]
den1=[1 .2 1]
den3=[1 .6 1]
den5=[1 1 1]
den7=(1 1.4 1]
den9=(1 1.8 1]
den 10=f1.2 1]
to=tf(num, deno)
t1=tf(num, deni)
t3=tf(num, den3)
t5=tf(num, den5)
Purchase answer to see full
attachment