You are on page 1of 14

Homework 12 Solution - AME30315, Spring 2013

Problem 1:[20 pts] The Aerotech AGS 1500 is a linear motor driven XY positioning system (see attached
product sheet). A friend of mine, through careful experimentation, identified the following plant model for
the X axis:


s2 + 8.24s + 1.061 104 s2 + 25.6s + 1.024 105
.
P (s) = 1738.42
s (s + 0.57) (s2 + 10.7s + 1.145 104 ) (s2 + 142.5s + 1.406 105 )
(a)Use the Matlab GUIs rltool or sisotool and hand-calculations to design a controller such that the overshoot
is < 20% and rise time is less than 0.1 sec for a step reference signal, ess for a unit ramp reference is less
than 0.01, the gain margin is greater than 6dB, and the closed-loop bandwidth is greater than 30 rad/sec.
Some specifications may already be met by the uncompensated system.
General Procedure to do so:
Use the open-loop bode plot to determine the uncompensated phase margin
Design a controller K(s) that has a low-frequency gain and phase margin such that you can achieve
the design specifications.
Estimate the system closed-loop system bandwidth from the complementary sensitivity function.
Iterate on design if necessary
Display any plots and useful insight used in your controller design. For time-domain plots, plot your reference signal on the same plot as the output.
(b) A smoothed step input signal is attached to the homework problem; 500mm move in 1 second, hold at
500mm for 1 second. With the smoothed step as a reference signal, evaluate the controller performance.
Does your ess calculation compare well with the ramped portion of the smoothed step simulation? Does the
error increase during the parabolic region of the smoothed step? Plot your reference signal on the same plot
as the output.
(c)Change your reference signal to a sine wave. Test two different sine wave references. One with a frequency
20 rad/s lower than your closed loop bandwidth, one with a frequency 20 rad/s higher than your closed loop
bandwidth. Discuss your observed relationship between the frequency of a reference signal, closed-loop bandwidth, and the tracking error. Plot your reference signal on the same plot as the output.
Solution: Plotting the system on siso tool reveals that the system is unstable. The system has a gain margin
of -5.58 dB and a phase margin of -0.866 degrees. We will be stabilizing the system with a lead controller.
For now we will look at the ess for a ramp.
From closed loop response
K(s)P (s)
Y (s)
=
R(s)
1 + K(s)P (s)
Steady state response error is
E(s)
R(s)

ess

Want ess < 0.01 for ramp input R(s) =


ess = lim s
s0

1
1 + K(s)P (s)
1
lim s
R(s)
s0 1 + K(s)P (s)

1
s2

1
1
1
1
= lim
s0 s 1 + K(s)P (s)
1 + K(s)P (s) s2

LetP (s) = 1s P (s)


ess

lim s

s0

1
K(s) 1s P (s))

1
s2

1+
1
1
= lim

s0 s 1 + K(s) 1 P
s (s))
=

lim

s + K(s)P (s)
1
= lim
(0)
s0 0 + K(s)P
=

s0

1
K(s)(2058.28)
1
1
lim
s0
2058.28
K(s)

lim

s0

=
Recap:
ess =
s

+1

z
If K(s) = K 1+

s
z

1
1
lim
< 0.01
2058.28 s0 K(s)

,
ess =

1
1
1
1
lim 0+1 =
< 0.01
s0
2058.28
2058.28 K
K 1+0

Our final design must have a K>0.0049.[3 pts]


Next we design such that the rise time is about 0.05 seconds and overshoot is less than 20.
s

+1

z
See Fig.1 Start with the uncompensated system K=1. Assume a K(s) of the form K(s) = K 1+
s .
z
A K=1, the phase margin is m = 0.866 0. To achieve < 20%, > 0.45 from our vs. maps. Also we
m
know that = 100
, so we want m 45o .

We want to design a lead controller with max to boost our phase margin. Allowing 10o extra, we want
max = 55o . From fig.10.30, should be 10. max should be chosen at the frequency where | K(s)P (s) |dB =
0 dB. max
= 34 rad/sec.
max = z , z=10.75, z = 107.5.
This gives a controller design of
s
+1
K(s) = 10.75
s
107.5 + 1
Fig.2 demonstrates the 1st design iteration. As you can see, we did not quite reach the desired m = 450 .
We can make larger to achieve this. By moving the pole to higher frequencies, we achieve the desired m
(see Fig.3 )
s
+1
K(s) = 10.75
s
+
1
177
Fig.4 demonstrates that we now achieve the desired specifications.[5 pts]
Test with smoothed step input. Our design appears to do quite well since the designed steady state error is
almost 0.01. The error does increase during the parabolic region.[1 pt]. Smoothed step performance Fig.5.
Zoomed in region demonstrates that the performance is worse in parabolic region, Fig.6. [5 pts]
CL bandwidth is approximately 85 rad/sec. Test a sine wave at 65 rad/sec Fig.7 and at 115 rad/sec Fig.8.
[5 pts]
If the frequency is less than the bandwidth, there is an increase in amplitude, however not that much. The

phase differs only by a little bit.If the frequency is greater than the bandwidth, the amplitude of the response3
is decreased and the phase differs quite a bit. [1 pt]
Overall the tracking error s smaller for frequencies inside the bandwidth compared to frequencies outside the
bandwidth.

Figure 1: Controller plot

Figure 2: Controller plot

Figure 3: Controller plot

Figure 4: step response

Figure 5: smoothed step signal

Figure 6: Zoomed in region of smoothed step signal

Figure 7: Sine wave of 65 rad/sec

Figure 8: Sine wave of 115 rad/sec

Bonus Problem 2: 10pts added to HW12 homework grade. For the system shown in Fig. 9, suppose9
that:
P (s) =

5
.
s (s + 1) (s/5 + 1)

Design a lead compensator K(s) so that the m > 40 using Bode plot sketches. You must show all your
calculations to receive full credit. Once designed by hand, verify and refine your design using Matlab.

R(s) +

K(s)

P(s)

Y(s)

Figure 9: Feedback Loop for Bonus Problem 2.

Solution: Plot uncompensated system using the standard bode plotting procedure(Fig. 10)
| G(i) |dB = 0 at approximated 2 rad/sec. Here, our hand drawn bode plot tells us that we are unstable,
m 10o .
Therefore, we need to increase m by 50o to achieve a m of 40o . Choose max = 50o + 10o = 60o . From
Fig.10.30, this means = 20.

Choose max to be frequency where | G(i) |dB = 0 dB. max = z for a lead controller [2ts].
max
z = 0.5rad/sec

p = z = 10rad/sec
Here we replot the change in phase and magnitude on the same plot as Fig.10. Notice that we did not
achieve the m we desired. Plots in Matlab confirm this(see Fig.11). The hand drawn plot gives us a basis
for further improvement. By moving the zero to -0.8 and the pole to -36 we get the phase margin we desire
(see Fig. 12).

10

Figure 10: Bode plot [3pts uncompensated, 3pts compensated]

11

20

Root Locus Editor for Open Loop 1 (OL1)

100

OpenLoop Bode Editor for Open Loop 1 (OL1)

15
50

10
5

0
5

50

10
15
20
30
100

20

10

Bode Editor for Closed Loop 1 (CL1)

100 G.M.: 4.8 dB


Freq: 7.58 rad/s
10
Stable loop
150
45

90

100
135
200
0

180

180

225

360
1
10

10

10
Frequency (rad/s)

10

270

10

10

P.M.: 16.7 deg


Freq: 5.68 rad/s
2

Figure 11: Controller plot

10
10
Frequency (rad/s)

10

12

100

Root Locus Editor for Open Loop 1 (OL1)

40

OpenLoop Bode Editor for Open Loop 1 (OL1)

20
50

0
20

40
60

50

80
100
100
100

50

Bode Editor for Closed Loop 1 (CL1)

G.M.: 17.3 dB
50100 Freq: 13.6 rad/s
Stable loop
120
90

0
135

100
200
0

180

225

180
360
1
10

10

10
Frequency (rad/s)

10

270

10

10

P.M.: 44.1 deg


Freq: 4.32 rad/s
1

10

Figure 12: Controller plot [2pts]

10
Frequency (rad/s)

10

10

13
Bonus Problem 3: 10pts added to HW12 homework grade, 1 kernel of knowledge added to
your brain.
This problem is similar to Problem 10.11 of Goodwine (with some extra and without the typo). The standard
lead or lag compensator has the general form:
K(s) =

s
z
s
p

+1
.
+1

Find the frequency, max , at which K(s) has a maximum phase lead or lag, max . Then calculate max .
Your solution should verify the equation just prior to Eqn. (10.3) and the phase lead calculation in Eqn.
(10.4).
Solution:
K(i) is a function of frequency. We wish to find the frequency at which K(i) is maximized and the
value of that maximum point. To find the frequency of maximum phase (max ), we differentiate K(i)
with respect to and set equal to 0.

K(s) =

s
z
s
p
i
z
i
p

+1
+1

+1
+1

K(i) = tan1 tan1


z
p
du
1

u= ,
=
z
d
z
dy
1
y = a tan u,
= 2
du
u +1
dy
1
1
=
d
z ( z )2 + 1
1
1
1
d
1
K(i) =

d
z ( z )2 + 1 p ( p )2 + 1
K(i) =

=
Set

d
d K(i)

p(( p )2 + 1) z(( z )2 + 1)
zp(( z )2 + 1)(( p )2 + 1)

=0
2
2
+p
z =0
p
z
1 1
2 ( ) = z p
p z
zp
zp
2
= 1 1 = zp = pz

p
z
pz

max = zp[3pts]

[2pts]

We next substitute max intoK(i) to solve for the maximum phase angle, max :
r
r
p
z
max = tan1
tan1
z
p
pp pp
z
z
= tan1
p q
1 + pz pz
r
r
p
z
1 1
(

)
= tan
2
z
p
1pz
= tan1
2 zp

1
zp + (p2 2pz + z 2 )
4

r
=
=
=

1 2 1
1
p + pz + z 2
4
2
4
1p 2
p + 2pz + z 2
2
1
(p + z)
2

Therefore,
max = = sin1
[5pts]

1
2 (p
1
2 (p

z)
pz
= sin1
p+z
+ z)

14

You might also like