Automatic Control With MatLab
Automatic Control With MatLab
ENGINEERING
Automatic Control III
HOMEWORK
STUDENT:
Portugal Vargas, Stephanie Patricia
TEACHER:
Eng. Lucy Angela Delgado Barra
2012
I.
ACTIVITIES
G ( s)
2(1 15s )
(1 20s )(1 s )(1 0.1s )2
Can you get a closed-loop settling time less than 50 sec and M>20o?
As we can see in the following image this system has a stable loop and
even if we do have the phase margin requested, the time response is
really slow as shown in the step response figure.
15
10
-40
-60
-5
-80
-10
If we place a PI
controller, we have:
-20
-20
-15
-10
-5
G.M.: 61.6 dB
Freq: 10.9 rad/sec
Stable loop
-100
-120
0
-50
-45
-100
-90
-150
0
-135
-180
-180
-360
-4
10
-2
10
10
Frequency (rad/sec)
10
-4
10
-2
10
10
Frequency (rad/sec)
10
15
100
10
50
5
0
-5
-10
-50
-20
-15
-10
-5
100
G.M.: 11 dB
Freq: 8.1 rad/sec
Stable loop
0
-100
-90
0
-135
-100
-200
0
-180
-225
-180
-360
-2
10
-270
10
10
Frequency (rad/sec)
10
-2
10
10
10
Frequency (rad/sec)
10
Step Response
1.6
1.4
1.2
Amplitude
1
0.8
0.6
0.4
0.2
0
0.5
1.5
2.5
3.5
4.5
Time (sec)
After having added the PI controller we can now have a faster response
and analyzing the bode diagrams we can be sure that our controller is
fulfilling the requests we were given.
K ( s 10)
( s 1)( s 2)( s 12)
G ( s)
Can you get a closed-loop settling time less than 1.5 sec and overshoot
less than 10%?
System response without the PD controller
Root Locus Editor for Open Loop 1 (OL1)
-10
10
-20
-30
-40
-5
-50
-10
-60
-15
-15
-10
-5
G.M.: Inf
-70 Freq: Inf
Stable loop
-80
0
-50
-45
-100
0
-90
-135
-90
-180
-2
10
-1
10
-180
10
10
Frequency (rad/sec)
10
P.M.: Inf
Freq: NaN
-2
10
-1
10
3.5
10
10
Frequency (rad/sec)
10
Step Response
0.35
0.3
Amplitude
0.25
0.2
0.15
0.1
0.05
0.5
1.5
2.5
Time (sec)
Step Response
0.8
0.7
0.6
Amplitude
0.5
0.4
0.3
0.2
0.1
0
0.2
0.4
0.6
0.8
1.2
1.4
Time (sec)
20
10
2
1
-10
-1
-2
-20
-3
-7
0
-6
-5
-4
-3
-2
G.M.: Inf
Freq: NaN
Stable loop
-30
-1
-40
0
-10
-45
-20
-30
0
-90
-135
-45
-90
-1
10
10
10
Frequency (rad/sec)
-180
10
10
-1
10
10
10
Frequency (rad/sec)
10
G ( s)
30
s 11s 30
2
6
At first glance, given the step response, it seems impossible to move the
gain value of the system to warrantee getting the values were looking
for, we can move the pair of complex roots to their limit and still we
couldnt reach the values requested as it will be proven here:
Root Locus Editor for Open Loop 1 (OL1)
10
10
0
-10
-20
0
-30
-40
-5
-9
0
-8
-7
-6
-5
G.M.: Inf
-60 Freq: Inf
Stable loop
-70
0
-4
Step Response
0.8
-50
-10
0.7
0.6
-45
-100
0
-90
Amplitude
0.5
-50
0.3
0.2
-135
-90
-180
-1
10
10
-180
10
10
Frequency (rad/sec)
10
0.4
10
10
0.1
1
10
10
Frequency (rad/sec)
10
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Time (sec)
0.7
0.6
Amplitude
0.5
0.4
0.3
0.2
0.1
0.2
0.4
0.6
Time (sec)
0.8
1.2
Gain value of 1
7
Step Response
1.4
1.2
Amplitude
0.8
0.6
0.4
0.2
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Gain value of 10
Time (sec)
Step Response
1.8
1.6
1.4
Amplitude
1.2
1
0.8
0.6
0.4
0.2
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Gain value of 50
Time (sec)
Step Response
1.8
1.6
1.4
Amplitude
1.2
1
0.8
0.6
0.4
0.2
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Time (sec)
Step Response
2
1.8
1.6
1.4
Amplitude
1.2
1
0.8
0.6
0.4
0.2
0
0.1
0.2
0.3
0.4
0.5
Time (sec)
0.6
0.7
0.8
0.9
As we move the zero along the real axis we can observe that at first
the complex roots that the system has, become simple roots. As we
keep moving the zero further from the origin, the roots become
complex again and the step response shows more stability and the
time of response becomes faster, however the error is still
considerably big.
20
5
15
10
Magnitude (dB)
Imag Axis
-5
-10
-5
-4
-3
Real Axis
-2
-1
-15
0
-10
-20
-45
-30
Phase (deg)
Magnitude (dB)
0
-5
-15
-40
0
Phase (deg)
-135
-45
-90
-90
10
10
10
Frequency (rad/sec)
10
10
-180
10
10
10
Frequency (rad/sec)
10
10
Amplitude
1
System: Closed Loop r to y
I/O: r to y
Time (sec): 0.0572
Amplitude: 0.907
0.8
0.6
0.4
0.2
Pole-Zero Map
0.01
0.02
0.03
0.04
0.05
0.06
0.07
Time (sec)
Imaginary Axis
0.5
-0.5
-1
-90
-80
-70
-60
-50
-40
-30
-20
-10
Real Axis
Next move the zero between 7 and 9. What happens to the root
locus? Are we likely to get a faster response of the closedloop system
with this design than the previous one? Specify a controller with a
zero in this range that produces a settling time of 0.1 seconds or less.
(Dont forget that k<10) Save the step response and control effort
figure and the controller that produced it.
In the root locus, the pole that is further from the origin keeps moving
away from it, we dont seem to be able to provide a faster response to
the system.
Were choosing a zero value of -8.79 as shown below and weve
obtained a settling time of 0.1.
10
20
10
15
10
Magnitude (dB)
Imag Axis
-5
0
-10
-12
-10
-9
Real Axis
-8
-5 G.M.: Inf
Freq: NaN
Stable loop
-7
-10
0
-10
-45
-20
Phase (deg)
Magnitude (dB)
-11
Phase (deg)
-30
0
-135
-45
-90
-90
10
10
10
Frequency (rad/sec)
-180
10
10
10
10
Frequency (rad/sec)
10
Amplitude
1
System: Closed Loop r to y
I/O: r to y
Time (sec): 0.1
Amplitude: 0.887
0.8
0.6
0.4
0.2
Pole-Zero Map
0.05
0.1
0.15
0.2
0.25
0.3
Time (sec)
Imaginary Axis
0.5
-0.5
-1
-35
-30
-25
-20
-15
-10
-5
Real Axis
11
where you place this real zero along the real axis, but that the real
pole must remain at zero.
Place the zero between 0 and 5. Find a controller that produces a
settling time of less than 0.8 seconds, a percent overshoot of less
than 2%, and a position error of zero. Save the step response and
control effort figure and the controller that produced it. Are all your
poles inside the design region?
The poles are not inside the design region, I used a gain of 7 which
gave me the closest response requested in this section.
10
20
-5
-4
-3
Real Axis
-2
-1
20
-80
-90
0
-20
-40
-120
-60
Phase (deg)
Magnitude (dB)
-20
-40
-5
-80
0
Phase (deg)
40
Magnitude (dB)
Imag Axis
15
-150
-45
-90
-135
-180
-1
10
10
10
Frequency (rad/sec)
10
10
-180
-1
10
10
10
Frequency (rad/sec)
10
10
12
Now set the real zero to the left of 6. This type of configuration is not
likely to get a faster response than with just a P controller. Why?
We need to place or find a configuration where the zero is really close
to the pole in order to get ourselves the fastest response possible,
although this may mean we need to change the gain value and by
doing this were very likely to change the parameters weve been
given.
13
Keeping the real part of the zeros at 7, reduce the imaginary part of
the zeros as much as possible while keeping the same basic shape of
the root locus. At some point, as you reduce the imaginary part, the
root locus will take a very different shape. Find a value of K on this
root locus so that the step response has a percent overshoot of less
than 2%, settling time less than 1 second, and a position error of less
than 0.01. (Remember to keep K<10) Save the step response and
control effort figure and the controller that produced it.
14
15
is less than 1 second. (Remember to keep K< 10) Save the step
response and control effort figure and the controller that produced it.
System: Closed Loop r to y
I/O: r to y
Time (sec): 0.493
Amplitude: 1.06
Amplitude
1.4
1.2
1
0.8
0.6
0.4
Pole-Zero Map
0.2
0
0.2
0.4
0.6
0.8
1.2
Time (sec)
Imaginary Axis
-5
-8
-7
-6
-5
-4
-3
-2
-1
Real Axis
40
25
20
30
15
20
Magnitude (dB)
Imag Axis
10
0
-5
-10
-15
10
0
-10
-20
-10
-6
Real Axis
-4
-2
10
-30
-90
0
-10
-120
-20
Phase (deg)
Magnitude (dB)
-8
Phase (deg)
-30
0
-150
-45
-90
-1
10
10
10
Frequency (rad/sec)
10
-180
10
10
10
Frequency (rad/sec)
10
16
II.
CONCLUSIONS