Table A.1 Franklin. This table is provided on the midterm and final exam
10
11
12
13
14
15
16
17
18
19
eA
, f , l
Js
Jl
Figure 1.1: Electromechanical equivalent circuit of Permanent Magnet Direct Current (PMDC) motor.
The inertia of the shaft is Js and load Jl . The effective inertia of the system J = Js + Jl .
We consider the PMDC motor system shown in Figure 1.1. To obtain its differential equation
model we apply Newtons Law at the output shaft:
(1.1)
J = f l ,
where J is the effective inertia of the motor system which is due to all rotating components (i.e.,
the shaft, rotor, and encoder), is the output shaft velocity, the electrical torque generated by
the PMDC motor, f is frictional torque, and l load torque. The latter is sometimes treated as
an unknown disturbance.
The electrical torque generated by the PMDC motor is linearly related to the armature
current i:
(1.2)
= Kt i,
6= 0,
(1.3)
where Kf is the Coulomb friction torque, b the viscous friction coefficient, and
1, x < 0
sgn(x) =
0, x = 0
1, x > 0
Combining (1.1)  (1.3) for > 0 yields
J
d
= Kt i b Kf l
dt
(1.4)
The dynamics for armature current i can be found by application of KVL and is given by
L
di
+ Ri = v Km ,
dt
(1.5)
v is the input voltage, Km the motors backemf constant, L armature inductance and R armature
resistance. We denote the backemf voltage as eA = Km . It can be shown that Km = Kt if stated
in MKS units. Hence, to simplify notation we replace Km with Kt from here on. Differential
equations (1.4) and (1.5) give the time domain dynamic model of the PMDC motor when > 0.
In order to reduce current ripple we add an additional external inductor L1 to the armature
circuit. The external inductor introduces a parasitic resistance R1 which adds to the armature
resistance of the motor. The model parameters L and R discussed above will include the circuit
parameters of the external inductor. The values used are L1 = 3.3 mH and R1 = 1.27 . These
values are taken from the data sheet (Model No. 1130332KRC). The datasheet for the motor
provides a resistance value of 3.99 and an inductance of 0.556 mH. Hence, nominal values are
R = 5.26 and L = 3.856 mH.
Depending on the sign of and the motor operates in four different modes that are denoted
as quadrants Q I, Q II, Q III, and Q IV. The forward motoring mode or Q I occurs when and
are positive. Consider a motor driving an inertial load which accelerates from rest in a positive
direction. During this period of acceleration eA and i are greater or equal to zero or in other
words power is transferred from the voltage source to the mechanical load.
Now consider the problem of decelerating the motor from a positive velocity to rest. This
process of braking requires a negative electrical torque which means a negative i which can be
obtained by adjusting v < eA . Initially , and therefore eA , remain positive until rest. Hence,
the motor is operating in forward braking mode or Q IV. Since < 0, power is absorbed into
the voltage source from the mechanical system. As expected eA i < 0 since the voltage source
absorbs power.
The two aforementioned modes of operation can be also explained if the motor is turning in
Q II
eA 0, i 0
QI
eA , i 0
Q III
eA , i 0
Q IV
eA 0, i 0
negative direction. This corresponds to reverse motoring (Q III) and reverse braking (Q II).
Evidently, in generating modes Q II and Q IV the motor transfers power from the mechanical
system to the voltage source. In contrast, in Q I and Q III the motor is in motoring mode since
power is fed to the mechanical system from the voltage source.
We take the Laplace transform of (1.4) and (1.5) with b = 0 and l = 0. Eliminating I gives
(s) =
LJs2
sL + R
Kt
Kf
V (s)
.
2
2
2
+ sRJ + Kt
LJs + sRJ + Kt s
(1.6)
Since for most motors e = L/R 1, we obtain an approximate first order model
(s) =
1
Kt
JR
s
Kt2
+1
V (s)
R
Kt2
JR
s
Kt2
Kf
+1 s
(1.7)
In our case we have e 0.7 ms. Defining the gain KV = 1/Kt and mechanical time constant
m = JR/Kt2 , we can transform (1.7) into a time constant form
R
KV
Kf
Kt2
(s) =
V (s)
m s + 1
m s + 1 s
(1.8)
ei
Ci
Pi
eA
Figure 1.3: Inner current control loop with ProportionalIntegral (PI) controller.
(1.9)
For the problem of current control we denote V as the control input, I as the controlled output,
and EA as a disturbance input. Although we measure velocity and therefore could compute
EA , this would complicate the current control. The objective of current control is to regulate a
prescribed reference current I while rejecting disturbance input EA . Solving for I in (1.9) gives
I(s) =
1
1
V (s)
EA (s)
sL + R
sL + R
(1.10)
I(s)
K
=
,
V (s)
e s + 1
(1.11)
where e = L/R is the electrical subsystem time constant and K = 1/R the gain of the electrical
subsystem.
Figure 1.3 depicts the current control with controller transfer function Ci . We denote the
current reference as i .
Modelling
a Permanent
3.1 Lab
3: Closedloop
SpeedMagnet
ControlDC
for(PMDC)
a PMDCMotor
Motor
Hi (s) 1
Kt
1/(Js)
e = L/R 0) yields
s
Kf
sJ(s) = Kt I(s)
Tl (s)
> 0.
(1.12)
Tasks
Kt
1
(s) =
I(s)
Tl (s)
(1.13)
sJ of the velocity
sJ
Derive the closed loop transfer function
control loop by assuming Hi (s) = 1
and neglecting the disturbance torque. Bring it into standard form
The control design for the outer loop is based on the transfer function
n s
+ n2
H (s) =(s)
K
2nts. + n2
P (s) = s2 + =
I(s)
Js
(1.14)
Identifycontrol
, and
n in terms
of kp , kproblem
J. two simpler inner and outer loop designs.
i , Kt , and
A cascade
separates
the control
into
It is feasible to separate the inner and outer loop designs in a cascade control
since the bandwidth
Design the PI controller such that = 1/ 2 and n = 2 25 rad s1 .
of the inner loop is designed sufficiently high to make the dynamics of the inner loop negligible
from the
point ofthe
view
of the control
outer loop.
Thatshown
is, we in
canFigure
model3.2
thewith
innerHcurrent
a simple
Simulate
velocity
system
1 in as
Simulink
i (s) = loop
unity using
gain (i.e.,
H
(s)
1).
In
our
case
the
natural
frequency
of
the
velocity
loop
willthe
be
the transfer
function model (3.7). For the controller, use
the PID block and set
i
n
chosenderivative
50 times smaller
one of the
the PI
current
loop. Perform the simulation with a step
gain to than
zero the
to realize
controller.
1
Theouter
loop
controller
is
denoted
C
(s).
Figure
= 200 rad s . Plot the velocity response. 1.4 depicts the closedloop velocity control
system. is the Laplace transform of the reference speed .
Implement the complete cascade control system in experiment. Combine the PI velocity
controller used in the previous item with the PI current control designed in the Section 3.1.2.
Perform the experiment with a step = 200 rad s1 . Superimpose the velocity response
5
33
l KRt
e
C,V
P,V
H,V (s) =
n s
+ n2
s2 + 2n s + n2
In order to compare with the Current Mode design take the gains of the PI controller
Implement and simulate the velocity control system shown in Figure 3.3 in Simuli
using the transfer function model (3.9). For the controller, use the PID block and set t
derivative gain to zero to realize the PI controller. Perform the simulation with a st
= 200 rad s1 .
n2
1
=
2
2
2
s + 2n s + n
(s/n ) + 2s/n + 1
(1)
H(s)
1
n2
s + 2n
1
=
=
s
s s2 + 2n s + n2
s s2 + 2n s + n2

{z
}
F1 (s)
p1 = n jn 1 2 . We expand F1 (s) as
F1 (s) =
c1
c1
+
s p1 s p1
where
c1 = ((s p1 )F1 (s))s=p1
Hence, c1  =
11
2
1 2
p
1 2 and its conjugate
1
=
2
1 p
1 2
p
1 2 = sin1 . Hence, applying the formula
(2)
(s + )
d
+B
2
2
(s + ) + d
(s + )2 + d2
1 H(s)
1
t
L {
} = 1 L {F1 (s)} = 1 e
cos(d t) +
sin(d t)
s
d
(3)
The expressions for the step response (2) and (3) are equivalent.
= et (cos(d t) +
sin(d t)) et (d sin(d t) + cos(d t))
dt
d
2
n
+ d sin(d t) = p
= et
et sin(d t)
2
d
1
h(t) =
Note that h(t) = L1 {H(s)} is in fact the impulse response of H(s). To obtain the time at which
the maximum of the step response y occurs we solve h(t) = 0:
2
t
+ d sin(d t)
h(t) = 0 = e
d
which is satisfied by d t = k, k = 0, 1, 2, . . . . We know that k = 1 corresponds to the global
maximum of the step response. Hence,
Tp =
= p
d
n 1 2
P.O.: percent overshoot To obtain the P.O. of the step response we can substitute Tp into (3):
2
Mp = y(Tp ) = 1 eTp cos(d Tp ) + sin(d Tp ) = 1 + eTp = 1 + e/ 1
 {z } d  {z }
1
y(Tp ) fv
2
= 100 (y(Tp ) 1) = 100 e/ 1
fv
where fv = limt y(t) is the final or steady state value of y. Note that P.O. is only a function of
and we can invert the relation between P.O. and :
= q
ln(P.O./100)
2 + ln2 (P.O./100)
Figure 2 shows a graph of P.O. versus . P.O. decreases monotonically from 100% to 0 as increases.
P.O.
(%)
Figure 2: Underdamped 2nd order system step response. Graph of P.O. versus .
Ts : 1% settling time We can compute and estimate of the 1% settling time Ts which is the time
required to reach and remain within 1% of fv , the final value of the response.
To estimate Ts we use the lower envelope of the step response and equate it to 0.99:
1 eTs = 0.99
which yields
Ts =
ln 0.01
4.6
=
n
n
We remark that the exact dependence of Ts on is not continuous and can be obtained numerically
if desired.
Tr1 : 1090 rise time The 1090 rise time Tr1 is the smallest time for the response y(t) to go from
10 % to 90 % of its final value fv = limt y(t).
We take Franklins approximate relation for Tr1 given by
Tr1 =
1.8
n
This expression is relatively accurate near = 1/2 and ignores dependence. Other possibilities
exist for expressions for Tr1 as a function of and n .
Tr : 0100 rise time The 0100 rise time Tr is the smallest time for the response y(t) to go from
0 % to 100 % of its final value fv = limt y(t).
Since
Tr
cos(d Tr ) +
y(Tr ) = 1 = 1 e
sin(d Tr )
d
which implies
d
k tan1 (d /),
Tr =
tan1 (
d
1 2
)
kZ
cos1
p
n 1 2
a>0
(4)
which can be used to give us an interpretation for n as time scaling of the step response of the
normalized system
1
H(s)
= 2
s + 2s + 1
We observe
We define y(t) = L1 {H(s)/s}
as the step response of H.
H(s)
1
n
=
H(s/n )
s
n
s
(5)
Hence, using the time scaling property (4) and (5) we get
H(s)
1 1 n s
1
L
=
L
H
= y(n t)
s
n
s
n
This is an important observation since it states that step responses of H can be computed from
and then time scaled by n . It is convenient as it allows us to focus on the effect of
those of H
on the step response, since varying n simply changes the time scale of the response.
The following MATLAB program plots an underdamped step response of for = 1/2. The plot is
given in normalized time scale = n t and shown in Figure 3.
2.5
2
Envelope:1 + exp(n t)/
1 2
y(t)
1.5
0.5
Envelope:1 exp(n t)/
p
1 2
0.5
10
t
12
14
16
18
20
Rise times Tr , Tr1 decrease monotonically in (n = const.). For constant rise times Tr , Tr1
decrease for increasing n .
P.O. increases when decreases and P.O. = 0 for 1
Tp increases when increases and Tp does not exist for 1 (n = const.)
Ts decreases when increases for 0 < 1 and Ts increases for increasing 1 (n = const.)
For the underdamped case, the above observations are consistent with the formula
cos1
p
(0 100% rise time)
n 1 2
1.8
(10 90% rise time)
Tr1 =
n
Tp = p
n 1 2
p
P.O. = 100 exp(/ 1 2 )
4.6
Ts =
n
Tr =
1.8
=.1
1.6
=.2
1.4
underdamped < 1
=.4
=.6
1.2
=.8
y(t)
0.8
0.6
=1 (critically damped)
0.4
=1.5 (overdamped)
0.2
10
nt
12
14
16
18
20
(7)
G(s)
} = 1 + K exp(n t) cos(d t + ) + D exp(ct),
s
K>0
c2
b
1
= 2
ac + b
( 2) + 1
a2 ca b
n (4 2 2 2 1)
=
c2 ca + b
2 ( 2) + 1
1.4
=100,
1.2
=10
y(t)
0.8
0.6
=5
0.4
=2
0.2
=1
0
10
nt
12
14
16
18
20
Figure 5: 3rd order system step response as a function of . Real pole at s = n . = 1/2.
p
1 2 , = n . Solving for coefficients A, B we obtain
A = 1,
and so
1 2
p
B=
1 2
2.5
=1/2
2
=2
y(t)
1.5
0.5
=4
=,100,100
0.5
=1
10
nt
12
14
16
18
20
Example Example of computing time domain specs for an underdamped 2nd order systems
H(s) =
s2
1
+ 15s + 100
s=tf(s);
% define tf
H=1/(s^2+15*s+100);
[n,d]=tfdata(H,v);
wn=sqrt(d(end))
zet=d(2)/wn/2
% peak time
Tp=pi/wn/sqrt(1zet^2)
% final value
fv=n(end)/d(end)
% percent overshoot
PO=100*exp(zet*pi/sqrt(1zet^2))
% peak value
M=fv*(1+PO/100)
% settling time 1% (approx)
Ts=4.6/zet/wn
% 1090 rise time (approx)
Tr1=1.8/wn
% 0100 rise time
Tr=(1/wn/sqrt(1zet^2))*(piatan(sqrt(1zet^2)/zet))
% compute various performance specs numerically and use a 1% settling time spec.
S=stepinfo(H,SettlingTimeThreshold,0.01)
wn =
10
zet =
0.7500
Tp =
0.4750
fv =
0.0100
PO =
2.8375
M =
0.0103
Ts =
0.6133
Tr1 =
0.1800
Tr =
0.3657
S =
RiseTime:
SettlingTime:
SettlingMin:
SettlingMax:
Overshoot:
Undershoot:
Peak:
PeakTime:
0.2288
0.6596
0.0090
0.0103
2.8369
0
0.0103
0.4728
Step Response
0.012
System: sys
Peak amplitude: 0.0103
Overshoot (%): 2.84
At time (sec): 0.476
System: sys
Settling Time (sec): 0.66
0.01
System: sys
Final Value: 0.01
System: sys
Rise Time (sec): 0.229
Amplitude
0.008
0.006
0.004
0.002
0.1
0.2
0.3
0.4
0.5
Time (sec)
0.6
0.7
0.8
0.9
K
s (Ts + 1)
+
R (s )
Y (s )
Step Response
1.4
Tp = 3 sec.
P.O.=4.32%
1.2
Amplitude
0.8
0.6
0.4
0.2
Time (sec)
10
p
1 2 ) and Tp = 3 s we obtain
n = q
= 1.48 r/s
2
3 1 (1/ 2)
Hence we have
1
= 0.478 s/r
2n
K = T n2 = 1.05 r/s
T =
1
LCs2 + RCs + 1
with LC = 104 sec./r2 and RC = 0.8 102 sec/r Suppose that C may increase or decrease from its
nominal value by a factor of 4, i.e. Cmax = 4C and Cmin = C/4.
(a) Find the maximum and minimum percent overshoots in the step response.
(b) What is the settling time (using the usual 1% criterion).
Soln:
(a)
LC = 104 (s/r)2 , RC = 0.8 102 s/r,
0.8 102
R
=
= 80 r/s
L
104
We remark the value of R/L is fixed. We rearrange the transfer function into a standard 2ndorder
form
G(s) =
s2 +
1
LC
R
1
s + LC
L
So
n2 =
R
1
and 2n =
LC
L
0.2
10.22
= 52.7%
0.8
10.82
= 1.52%
R
R
= 80 r/s, so n =
= 40 r/s
L
L
Ts =
4
= 0.1 s
n
n2
.
s2 + 2n s + n2
Suppose the poles of G(s) are limited to the triangular region in the complex plane with vertices 0 and
5 j10 (including the boundaries). This region is shown in Figure 3. For the step response of G(s), find
the minimum and maximum P.O., the minimum and maximum 1% Ts (settling time), and the minimum
and maximum Tp (peak time).
5+j10
Im{s}
Re{s}
5j10
Figure 3: Pole region
Soln:
Percent overshoot P.O. From Figure 4, = tan1 2 = 63.4 degrees. For poles in the triangular region,
the lower bound on the damping ratio is:
cos = 0.45
For 1, the system is over(critically)damped, so the minimum percent overshoot is P.O. = 0%;
In the case of 0.45 < 1, the system is underdamped, the maximum percent overshoot is:
when = 0.45, P.O. = 100e
1 2
= 20.5%
Hence we have
0 P.O. 20.5%
Settling Time Ts Because n 5 r/s, we have a lower bound on settling time (1%):
Ts =
4.6
0.92 s,
n
Im{s}
5+j10
Re{s}
5j10
Figure 4: Annotated pole region
Hence, Ts is bounded as
0.92 s Ts
p
Peak Time Tp From Figure 4 it is clear that d = n 1 2 10 r/s for the poles to lie in the triangular
region. Hence the peak time, Tp satisfies
Tp =
p
=
0.314 s
2
d
n 1
is
consequence
45deg
eg1
1 of 1
file:///C:/Users/alanl/Documents/courses/360/2014/rl/html/eg1.html
s=tf('s');
L=1/s/((s+4)^2+16);
rltool(L);
3/18/2014 10:20 PM
eg2
1 of 1
file:///C:/Users/alanl/Documents/courses/360/2014/rl/html/eg2.html
s=tf('s');
L=s*(s/5+1)/(2*s^3+10*s^2+20);
rltool(L);
3/18/2014 10:22 PM
for k=1:length(zeta),
sys=tf([1 2*zeta(k) 1],1);
[mag(k,:),pha(k,:)]=bode(sys,omeg);
end
figure(2)
subplot(211)
semilogx(omeg,20*log10(mag))
legend('\zeta=.05','\zeta=.1','\zeta=.20','\zeta=.3','\zeta=.5','\zeta=.8')
ylabel('M(\omega) = 20 log G(j\omega) (dB)')
xlabel('\omega/\omega_n')
title('2nd order complex zeros')
subplot(212)
semilogx(omeg,pha)
ylabel('\phi(\omega) (deg.)')
xlabel('\omega/\omega_n')
10
s(s + 1)(s + 5)
Find Pm , Gm , cp , cg .
Note that the nominal closedloop system with K = 1 is stable. Although we could read the Gm
off the Bode plot of G, we find the max gain Kmax such that the closedloop remains stable using
a Routh table
s3
s2
s1
s0
1
5
6
10K
K10
 6 +5 0
10
0
If K = 3 then a row of zeros occurs on the s1 row. Hence, from (1) the gain margin is
Gm = 20 log 3 = 9.54 dB
The auxillary polynomial is P (s) = 6s2 + 30. Hence, the phase crossover frequency is cp =
To obtain the gain crossover frequency we solve
5 r/s.
G(jcg ) = 1
The square of this equation is
2
2
100 = cg
(cg
+ 1)(cg + 25)
6
4
2
100 = cg
+ 26cg
+ 25cg
Solving numerically we obtain only one real solution cg = 1.23 r/s. The phase of G at this frequency
is
arg(G(jcg )) = 90 arctan cg arctan(cg /5) = 155
Hence, Pm = 180 155 = 25 .
Alternatively, we can use the Bode plots of G to determine Gm and Pm . MATLAB has a few ways
to obtain stability margins. One way is to plot the bode plots using
num=10;
den=conv(conv([1 0],[1 1]),[1 5]);
bode(tf(num,den)) % or ltiview(bode,tf(num,den))
and then right click in the figure and select CharacteristicsAll Stability Margins. The
results are show in Figure 2. The command margin can also be used.
2
100
Magnitude (dB)
50
System: untitled1
Gain Margin (dB): 9.54
At frequency (rad/s): 2.24
Closed loop stable? Yes
Gm
wcp
50
100
90
System: untitled1
Phase Margin (deg): 25.4
Delay Margin (sec): 0.361
At frequency (rad/s): 1.23
Closed loop stable? Yes
Phase (deg)
135
Pm
180
wcg
225
270
10 2
10 1
10 0
10 1
10 2
Frequency (rad/s)
n2
,
s(s + 2n )
0 1, n > 0
+
R(s)
(3)
G(s)
Figure 3: Closedloop
Using G(s) we can relate the phase margin to the damping ratio of the closedloop tf T (s). First
we compute the gain crossover frequency cg of G(s), this frequency satisfies
G(jcg ) = 1
3
We have
2
2
n
1 = G(jcg )2 =
jcg (jcg + 2n )
=
n4
2 ( 2 + 4 2 2 )
cg
cg
n
2
This provides a quadratic in = cg
:
( + 4 2 n2 ) n4 = 0
Solving for gives
2
= n2 (2 2
= cg
p
4 4 + 1)
0.9
cg/n
0.8
0.7
0.6
0.5
0.4
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
cg
2n
2n
2
= arctan qp
cg
4 4 + 1 2 2
4
0.9
90
80
Pm (degrees)
70
60
50
40
30
20
10
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
sz
1 + s
= K
,
1 + s
sp
> 1, , K > 0
(4)
Note that C has a pole at p = 1/ and a zero at z = 1/( ). The parameter = p/z is called
the lead ratio. Since > 1 we have z < p. It is useful to think of the lead controller as a lowpass
filtered PD controller kp + kd s. That is,
CPDF (s) = kp +
kd s
(kp + kd )s + kp
=
,
s + 1
s + 1
kp , kd , > 0
1 + s
,
1 + s
< 1, , K > 0
5
(5)
Evidently =
1 , = make (4) and (5) equivalent.
The phase of (4) is
() = arg C(j) = arctan( ) arctan( )
(6)
Hence
tan(()) = tan(arctan( ) arctan( ))
Using the identity tan(a b) =
tan(()) =
tan(a)tan(b)
1+tan(a) tan(b)
we get
( 1)
() = arctan
> 0 for > 1
2
1 + ( )
1 + ( )2
(7)
Since () > 0 the lead controller adds phase to a plant we put in series with it.
Setting the derivative of to zero gives the maximum phase lead of C. We use the expression (6):
0 (m ) = 0 =
2
1 + ( m )
1 + ( m )2
which is satisfied if
0 = (1 + ( m )2 ) + (1 + ( m )2 ) = 1 + ( m )2 (1 )
which implies the max phase occurs at frequency
1
m =
(8)
Note that log m = 12 (log z + log p). So on a log scale m is the midpoint between z = 1/( )
and p = 1/ . The frequency m is the geometric mean of the frequencies 1/ and 1/( ).
We can obtain the maximum phase of C from (7) and (8)
1
1
= arcsin
m = (m ) = arg(C(jm )) = arctan
+1
2
which is an increasing function of . The inverse function is useful for lead controller design
=
1 + sin m
1 sin m
(9)
The graph of (9) is in Figure 6. Normally we limit m 60 with more than one lead compensator
used if more phase is required.
The bode plots of C/K are in Figures 7 and 8 for = 1.5, 3, 8, 15. Here we use a normalized
frequency scale .
If we design
the lead controller such that the maximum phase contribution of C occurs at cg =
m = 1/( ) then an important value of the gain of C(j)/K is where
s
1+
C(jm )/K =
=
1 + 1/
or in dB
20 log C(jm )/K = 10 log
Also, note as we have C(j)/K , and the DC gain C(0)/K = 1
6
35
30
25
20
15
10
10
20
30
40
50
60
70
Figure 6: Equation (9) which relates maximum phased contribution m to lead ratio .
Example Consider a negative unity feedback shown system in Figure 9 with
P (s) =
103
s(s + 25)
ess =
The velocity constant is
Kv = lim P (s)C(s) =
s0
103 K
= 100
25
25 100
= 2.5
1000
7
1+ s
1+ s
in C has no
25
=1.5
=3
=8
=15
20
M() (dB)
15
10
0
2
10
10
10
(rad)
10
10
60
() (deg)
50
40
30
20
10
0
2
10
10
10
(rad)
10
10
R(s)
Y(s)
C(s)
P(s)
1 + sin m
= 4.2
1 sin m
Now lets compute the cg of the compensated system CP , call this frequency cgnew . The design
chooses cgnew = m and so
20 log KP (jcgnew ) = 10 log
or
KP (jcgnew ) = 1/
which yields one positive solution m = cgnew = 69.3 rad/s. Hence, the time constant is
=
1
= 7.04 ms
m
1 + 2.96 102 s
1 + 7.04 103 s
(10)
1
K
=
C(jm )
1
1
= arcsin
+1
1+
This equation can be solved numerically in MATLAB using fsolve for a given uncompensated
plant K P . The function called during numerical solve is
function F = mfun(w)
global Pu Pmd Pa_2
% compute abs(kP(j*w))^2 which equals 1/alpha if w=wcg
aPusq=abs(freqresp(Pu,w))^2;
% Solve F=0
F=180+angle(freqresp(Pu,w))*180/pi+asind((1aPusq)/(1+aPusq))Pmd;
and the calling script
10
clear all
s=tf(s);
global Pu Pmd Pa_2
% uncompensated plant K*P(s)
P=1e3/s/(s+25);
K=2.5 % gain to ensure 1% steadystate ramp tracking
% Trial an error method
Pu=K*P;
[Gm,Pm,wcp,wcg]=margin(Pu)
% desired Pm=60 deg. Add an additional 6 deg
Pmd=60;
% Maximum Phase of lead controller
Pa=PmdPm+6;
% determine lead ratio alpha
alpha=(1+sind(Pa))/(1sind(Pa));
% Place wcg near freq where max phase of lead controller occurs
% by solving KP(jwcgnew)=1/sqrt(alpha)
wcgnew=max(real(sqrt(roots([1 25^2 alpha*K^2*1e3^2]))))
tau=1/wcgnew/sqrt(alpha);
C=K*(1+tau*alpha*s)/(1+tau*s);
[Gm1,Pm1,wcp1,wcg1]=margin(C*P)
% exact design
% Maximum phase of lead controller
Pa_2=PmdPm;
wcg_2=fsolve(@mfun,wcg);
alpha_2 = 1/abs(freqresp(Pu,wcg_2))^2
tau_2 = 1/wcg_2/sqrt(alpha_2)
C_2=K*(1+tau_2*alpha_2*s)/(1+tau_2*s);
[Gm2,Pm2,wcp2,wcg2]=margin(C_2*P)
wcg_2 =
7.1818e+001
alpha_2 =
4.7722e+000
11
tau_2 =
6.3740e003
The above script also computes the trial and error design. We remark that the above design did not
consider the bandwidth of the closedloop. We often want to maximize cg in order to maximize
this bandwidth. It is also possible to generalise the above numerical approach to include this
performance requirement. An example is available on eclass.
12
C(s)
PC
C
PC
69.3 rad/s
C(s)
C(s)
sz
1 + s
=K
,
1 + s
sp
> 1, , K > 0
(11)
Note that C has a pole at p = 1/( ) and a zero at z = 1/ . The parameter = z/p is
called the lag ratio. Since > 1 we have p < z. It is useful to think of the lag controller as an
approximate PI controller when . That is
C(s) = K
s + 1/
s + 1/
kp s + ki
K
=
s + 1/( )
s
s
(1 )
< 0 for > 1
1 + ( )2
In fact the negative phase of C does not provide any useful benefit and normally 1/ is taken to
be sufficiently small so as not to affect closedloop performance. Figure 10 shows the Bode plot of
C/K for = 1 and = 10.
Example Consider a negative unity feedback shown system in Figure 9 with
P (s) =
103
s(s + 25)
10
cgnew
16
= 0.859s
Bode Diagram
20
Magnitude (dB)
15
10
Phase (deg)
0
0
30
60
3
10
10
10
10
Frequency (rad/s)
10
10
17
Bode Diagram
100
Magnitude (dB)
50
50
System: untitled1
Phase Margin (deg): 60
Delay Margin (sec): 0.0894
At frequency (rad/s): 11.7
Closed loop stable? Yes
Phase (deg)
100
90
135
180
10 2
10 1
10 0
10 1
10 2
10 3
Frequency (rad/s)
Figure 11: Bode plots of openloop system CP for the lag controller design.
18
Mult mai mult decât documente.
Descoperiți tot ce are Scribd de oferit, inclusiv cărți și cărți audio de la editori majori.
Anulați oricând.