Title: Modelling and Frequency Design
1Modelling and Frequency Design
- CY2A6 (old course code CY2A2 for past
exams/notes) - Introduction to modelling.
- Crash course on Matlab code.
- Modelling basic systems
- Modelling frequency response of generalised
systems. - Modelling stability margins
- Separating Magnitude and Phase responses
- Approximations by hand
- Compensation techniques
- - Proportional, Phase lead, Phase lag/lead.
- 9 PI, PD PID controllers.
- 10 Modelling a complete system in Matlab,
including controller design to compensate for
undesired time response. -
2 Frequency Response Design
The use of Bode Nyquist diagrams have shown the
frequency response of various systems. Having
the Open Loop data for a system allows us to
design a suitable compensator for a given
specification. What do we specify?
- Relative Stability
- Rule of thumb.
- GM 8dB ?m 45 Usually quoted.
- Steady-state error
- Speed of response
- Settling time
- .. many more criteria
3 Steady State Error
Standard System Specification For the
above system, the steady state error can be
written as ess lim sE(s).
sgt0 The possible inputs are Step R(t)
A Ramp R(t) At Parabola R(t) At2
4 Steady State Errors
- Steady state error for these inputs gives
- where
- Adding more integrations 1/s (poles_at_origin) may
improve the steady state error. - However, adding poles at the origin makes it
- more difficult to stabilise the system
- tends to add long time constants to the
- transient response.
- To reduce steady-state errors in the CL, the OL
gain must be as large as possible. This will
decrease the errors, but also
5 Transient Response
-
-
- e(t) c(t)
- 1.
- 2.
- 3.
- Small time constant (T) gives fast response.
- Fast response often gives overshoots.
- Time response to a step input
6Transient Response
- s - domain
-
- Increased Bandwidth
- To speed up the system,
- move the poles to the left.
- This leads to an increased bandwidth.
- Thus decreasing time to peak output
7Sensitivity
The measure of the change in system
characteristics to small changes in
parameters We want this to be as small as
possible. Looking at the sensitivity s - of the
Close Loop transfer function to changes in the
plant (Gp) For the sensitivity to be
small We want a large Open Loop gain.
8 Disturbance Rejection
The disturbance is in the plant and so cannot be
dealt with by the compensator. Having a large
Open Loop gain (particularly over the frequencies
of the disturbance) will reduce the effects of
these disturbances.
9Frequency Response Design Summary
A high Open Loop gain over a range of
frequencies gives Fast transient response.
Good sensitivity. Good tracking. Good
disturbance rejection. - Increased stability
problems.
10Gain Compensation
Proportional Controller Given the general
transfer function Varying K will not
alter the basic shape of the plot, just the size.
However, specifying a gain margin gives us no
control over the frequency at which it occurs and
its associated phase margin.
Im 3rd Order
R
Nyquist Diagram
0
k50 k500
-2
-4
Imaginary Axis
-6
-8
-10
-2
0
2
4
6
8
10
12
14
16
Real Axis
11Phase Compensation
Consider a first order compensator DC
unity gain. ZERO break frequency POLE break
frequency - Phase lag compensator -
Phase lead compensator
12Phase Lag Compensation
Consider a first order compensator DC
unity gain (gain k 1). - Phase lag
compensator Maximum phase lag (90) at The
overall effect is to reduce the high frequency
gain and introduce a phase lag. The high
frequency gain is reduced by a factor of A phase
lag compensator can be thought of as a form of
low pass filter
Magnitude ?p ?m
?o (gain k 10) ? -?m
13Placement
Consider a third order system
Looking at the frequency regions A,B C A
Small gain, high frequency, not much use putting
phase lag here. B Vincinity of (-1) point,
adding pole zero will destabilise system. C
Phase lag here will not affect stability, reduced
gain will increase GM, best place for compensator.
14Phase Lag Design Procedure
To design a controller of the form with a
specified phase margin of ?m. 1. Adjust the DC
gain of Gp(s)H(s) to satisfy low frequency
specifications (Kc). This will satisfy system
requirements such as steady state error,
disturbance rejection etc... 2. Find the
frequency (i) at which the angle Gp(j?)H(j?)
(-180 ?m 5). We force the phase margin to
occur at this frequency by reducing the OL gain
to unity.
15Phase Lag Design Procedure
3. The magnitude of the zero is given by ?o
0.1 ?i (EQ1) ie. makes ?o lt
?i , keeping it all in area C (hence the 5
factor). 4. The ratio of the compensator pole
zero is given by
(EQ2) 5. From equations 12 the compensator
transfer function can be written in the form
16Phase Lag Design Procedure
QUESTION Given the following transfer function
meets DC specifications and Design a phase lag
compensator to give a phase margin of
50. Plot the Bode Nyquist diagrams,
either by hand or using Matlab Using Matlab,
plot the time response of both systems to a unit
step input.
17Example Code
Needs Matlab control Toolbox, but you can
convert using rm functions ptf(3,1 3 2 0)
initial Plant system 3/s(s1)(s2)
subplot(1,3,1) bode(p) plot bode diagram on
left subplot(1,3,2) Nyquist(p)block bode
diagram on right, includes -ve w close the
loop on each system and plot time response
fpminreal(feedback(p,1)) yp,tstep(fp,
35)determine the step response of the system
for 35 seconds stept 1 0tgraph to show
step response subplot(1,3,3) plot(t,yp,t,
stept, 'c') pausetime response of system
clfclear the current figure kp series(3,p)
a gain of three implemented subplot(1,3,1)
bode(kp) plot bode diagram on left
subplot(1,3,2) Nyquist(kp)block bode diagram
on right close the loop on each system and
plot time response fkp
minreal(feedback(kp,1)) ykp,tstep(fkp,
35)determine the step response of the system
stept 1 0t subplot(1,3,3)
plot(t,ykp,t, stept, 'c') pause clfclear
the current figure ctf(0.61 2,1
5) lead-lag controller (s1)/(s2) ckp
series(c,kp) a controler implemented
subplot(1,3,1) bode(ckp) plot bode diagram
on left subplot(1,3,2) Nyquist(ckp)block
bode diagram on right fckp
minreal(feedback(ckp,1)) yckp,tstep(fckp,
35)determine the step response of the system
stept 1 0t subplot(1,3,3)
plot(t,yckp,t, stept, 'c')