Control II
-
Upload
bico-altahir -
Category
Documents
-
view
141 -
download
0
Transcript of Control II
![Page 2: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/2.jpg)
• The main objective of control II is to cover the topics of three main items namely error analysis, PID controller, and compensators with all their types.
2
![Page 3: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/3.jpg)
3
Error Analysis
• Steady state Error is a measure of system accuracy when a specific type of input is applied to a control system.
• Steady state errors are unavoidable in design, just keep the error to minimum.
(tolerable value)
![Page 4: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/4.jpg)
• Steady-state error is the difference between the input and the output for a prescribed test input as t .
4
![Page 5: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/5.jpg)
5
• Errors contributing factors:
• S.S errors caused by nonlinear elements:
• -Nonlinear Dead Zone.
• -Nonlinear Friction
• If an amplifier is used in a control system has input –output characteristics as shown in following figure output
input0 D-D
Mag. Less than DZ point
![Page 6: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/6.jpg)
6
• When the input magnitude is less than the dead zone, the output of the amplifier would be zero and the control will not be able to correct the error.
• So the steady state error is related to the size of the dead zone.
• In control physical objects, friction is unavoidable.
• Coulumb friction is a common cause of steady state errors in control systems.
![Page 7: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/7.jpg)
7
• Consider that the torque generated by a step motor is related to the rotor position of the motor.
• When there is no friction, the step motor is supposed to have a zero steady state error.
• However the rotor of the motor sees a coulumb friction torque Tf.
• Then the motor torque must first overcome this frictional torque before producing any motion.
![Page 8: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/8.jpg)
8
• Thus as the motor torque falls below Tf, it may stop at any position inside the shaded band as shown.
Tf
-Tf
Torque
0
0 is equilibrium point
Threshold to move
![Page 9: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/9.jpg)
Configuration SSE
• The SSE that must be analyzed are errors that arise from the configuration of the system itself.
• For example changing K (forward gain) will affect the SSE.
• Type of input also affect the SSE value.
9
![Page 10: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/10.jpg)
10
• S.S Error of Linear Systems:• Depends on input and the type of the
system.• In control system if: r(t) is the reference input C(t) controlled output. e(t) error signal then: e(t) = r(t) – c(t)• Provided that r(t) and C(t) are
dimensionally the same i.e voltage controlling a voltage, position controlling a position, and so on.
![Page 11: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/11.jpg)
Open-Loop S.S.E
• r(t) is input, y(t) is the output, G is gain then for open-loop
ess = lim [(r(t) – y(t)] t
in Laplace e(s) = r(s) – y(s)
but y(s) = G(s)r(s) then
e(s) = r(s) – G(s)r(s) = [1 – G(s)]r(s)
11
![Page 12: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/12.jpg)
Example
• If G(s) =
7s2 + 18s + 15
s3 + 5s2 + 11s + 15
Find open loop ess(t) for a Ramp input
12
![Page 13: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/13.jpg)
Solution
• We have e(s) = [1 – G(s)]r(s) and ess(t) = lim s e(s)
s0
se(s) = s[s3 + 5s2 + 11s +15 –(7s2 + 18s + 15)]1/s2
s3 + 5s2 + 11s + 15
= s2 – 2s -7
s3+5s2 + 11s +15 13
![Page 14: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/14.jpg)
• And ess(t) = lim s e(s)
s0
= -7/15
check using Matlab
14
![Page 15: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/15.jpg)
15
Feedback Error
• The last equation is valid for open loop systems only.
• The feedback loop element H(s) is usually incorporated in the feedback loop.
• Here we have a feedback error E(t).
Or
E(t) = r(t) – b(t)
![Page 16: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/16.jpg)
16
G(s)
H(s)b(t)
B(s)
e(t)
E(s)-+
r(t)
R(s)
C(t)
C(s)
E(t) = r(t) – b(t)
E(s) = R(s) – B(s) = R(s) – H(s)C(s)
![Page 17: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/17.jpg)
17
• For example if 10v reference signal is used to regulate 100v supply, H is constant and equal to 0.1
• When the output voltage is exactly 100v (hopefully) , the error signal is
• E(t) = 10 – (0.1)(100) = 0
• The S.S error of a feedback control system is defined as the error when time approaches infinity.
S.S Error =ess = lim E(t) t
![Page 18: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/18.jpg)
18
• With reference to Laplace transformed, error function is: (see feedback diagram)
E(s) = R(s) 1+G(s)H(s)• By use of the final value theorem, the
steady state error of a system is:
ess = lim E(t) = lim sE(s) t s0
• Thus
ess = lim sR(s) s0 1+G(s)H(s) (*)
![Page 19: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/19.jpg)
19
• S.S error due to a Step input: (static position eror)
• In step input, the laplace transform of input is R/S then last equation becomes:
ess = lim R s0 1+G(s)H(s)
= R (1)
1+ lim G(s)H(s)
s0
![Page 20: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/20.jpg)
20
• For convenience we define
• Kp = lim G(s)H(s) type 0
s0
where Kp is the step error constant.
• Then
ess(t) = R
1+ Kp
• We see that for ess to be zero for step input Kp must be infinity.
![Page 21: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/21.jpg)
21
• S.S error due to Ramp input: (static velocity error)
• Input r(t) = Rt.us(t) and Laplace of r(t) is
• R(s) = R/s2 sub. In equation (*)
ess = lim R s0 s+sG(s)H(s)
= R (2)
lim sG(s)H(s) s0 type 1
![Page 22: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/22.jpg)
22
• If we define Kr as Ramp error constant
= lim sG(s)H(s) s0
• Then the Ramp equation is:
ess = R
Kr which is the S.S error when the input is a Ramp function.
• For ess to be zero when input is a Ramp,
Kr must be infinity
![Page 23: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/23.jpg)
23
S.S Error
r(t)
t
Output c(t)
Ramp S.S Error
![Page 24: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/24.jpg)
24
• S.S Error due to Parabolic input: (acceleration error)
• P(t) = Rt2 us(t)• t • And Laplace transform of P(t) is:• P(s) = R• s3 then ess in eq. (*) is:
• ess = R (3)• S2 + lim S2G(s)H(s)• s0
• =0 when s goes to 0 (but limit does not because S2 may be cancelled by G(s) or H(s) )
![Page 25: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/25.jpg)
25
• And defining the parabolic error constant as Ka where Ka = lim S2G(s)H(s)
• s0
• Then
• ess = R
• Ka
• Taking power of S we can write
Type 0 system s=0
Type 1 system s=1
Type 2 system s=2 and so forth.
![Page 26: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/26.jpg)
26
Type of system
s
step
Kp
Ramp
Kr
prb
Ka
Step
e=R/(1+kp)
Ramp
e=R/kr
Parab
e=R/ka
0 k 0 0 ess=R/(1+kp) ess= ess=
1 k 0 ess= 0 ess=R/k ess=
2 k ess= 0 ess=0 ess=R/K
3 ess= 0 ess= 0 ess= 0
S.S errors due to step, Ramp, and parabolic inputs
![Page 27: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/27.jpg)
• Example
A unity feedback system with forward TF G = 120(s+2)/[(s+3)(s+4)] find the SSE if input was:
• i/ 5u(t), ii/ 5t u(t) iii/ 5t2 u(t)
27
![Page 28: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/28.jpg)
• Solution:
i/ input 5 u(t) has 5/s input step function thus we use eq (1)
= 5/[(1 + lim G(s).H(s)] s0
= 5/ [ 1 + 20] = 5/21
28
![Page 29: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/29.jpg)
• ii/ input 5t u(t) = 5/s2 so type 1 so we use eq (2) for a ramp input
R• lim sG(s)H(s) H(s)=1
• s0
• = 5/0 =
29
![Page 30: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/30.jpg)
30
• iii/ input 5t2 u(t) = 10/s3 so type 2 we use eq (3) for a parabolic input
R
• lim s2G(s)H(s)• s0
• = 10/0 =
![Page 31: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/31.jpg)
• Use Matlab to ensure the previous answers for each input.
• Example :
Find the SSE for a unity feedback system for the last three inputs if G(s) =
100[(s+2)(s+6)]/[s(s+3)(s+4)]
31
![Page 32: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/32.jpg)
• Solution:
i/ for input 5/s type 0 SSE = 5/ = 0
ii/ for input 5/s2 type 1 SSE = R/[lim sG(s)] s will cancel s for G(s) so (5.12)/(100.12)
=
5/100 = 1/2032
![Page 33: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/33.jpg)
• iii/ For input 5t2 u(t) = 10/s3 we obtain
SSE = 10/0 =
33
![Page 34: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/34.jpg)
Using Kp, Kr, and Ka
• It is useful to find the above three static error constant values first then apply according to input.
• Example: For the following figure find the three error constants then find the error of the system for step, ramp, and parabolic inputs.
34
![Page 35: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/35.jpg)
35
500(s+2)(s+5)
(s+8)(s+10)(s+12)
e(t)
E(s)-+
r(t)
R(s)
C(t)
C(s)
![Page 36: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/36.jpg)
• Solution
kp = lim G(s) = 500 x2x5
s0 8x10x12 = 5.208
Kr = lim sG(s) = 0 s0
Ka = = lim s2G(s) = 0 s0
36
![Page 37: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/37.jpg)
• For step input SSE = 1/[1+kp] = 0.161
• For a ramp input SSE = 1/Kr 1/0 =
• For a parabolic input SSE = 1/Ka =1/0 =
37
![Page 38: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/38.jpg)
• What information you find if we say the Kp for a system = 1000?
• 1. system is stable
• 2. System is type 0
• 3. input test signal is step.
• 4. Kr= Ka= 0 and ess =
• 5. SEE = 1/(1+Kp) = 1/1001
38
![Page 39: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/39.jpg)
Gain design due required error
• A unity feedback system with G(s) =
K(s+5)/[s(s+6)(s+7)(s+8)]
Find value of K so that SEE is 10% in type 1 system
39
![Page 40: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/40.jpg)
• Solution:
SEE = 1/Kr = 0.1 so Kr = 10
but Kr = lim sG(s)
s0 = (Kx5)/(6x7x8)
which yields K= 672
(use Matlab to solve this problem)
40
![Page 41: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/41.jpg)
• Example:
A unity feedback system with forward TF
G(s) = K(s+12)/[(s+14)(s+18)]
Find the value of K to yield 10% SSE
41
![Page 42: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/42.jpg)
• Answer:
this is type 0 so 1/(1+Kp) = 0.1
and Kp= 9
But Kp = lim G(s) = (Kx12)/(14x18)
s0 from which
K= 189
42
![Page 43: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/43.jpg)
43
PID Controller
• How to use Proportional (P), the integral (I), and the derivative (D) controls, to obtain a desired response.
• Consider the following unity feedback system:
![Page 44: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/44.jpg)
44
Plant: A system to be controlledController: Provides the excitation for the plant; Designed to control the overall system behavior.
![Page 45: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/45.jpg)
45
A block diagram of a PID controller
![Page 46: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/46.jpg)
46
• The transfer function of the PID controller looks like the following:
Kp = Proportional gain KI = Integral gain Kd = Derivative gain
![Page 47: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/47.jpg)
47
• The variable (e) represents the tracking error, the difference between the desired input value (R) and the actual output (Y).
• This error signal (e) will be sent to the PID controller.
• The controller computes both the derivative and the integral of this error signal.
![Page 48: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/48.jpg)
48
• The signal (u) just past the controller is now equal to:
• The proportional gain (Kp) times the magnitude of the error plus the integral gain (Ki) times the integral of the error plus the derivative gain (Kd) times the derivative of the error.
![Page 49: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/49.jpg)
49
-This signal (u) will be sent to the plant, and the new output (Y) will be obtained.
-The new output (Y) will be sent back to the sensor again to find the new error signal (e).
![Page 50: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/50.jpg)
50
• The controller takes this new error signal and computes its derivative and its integral again.
This process goes on and on
![Page 51: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/51.jpg)
51
The characteristics of P, I, and D controllers
• A proportional controller (Kp) will have the effect of reducing the rise time and will reduce ,but never eliminate, the steady state error.
• An integral control (Ki) will have the effect of eliminating the steady-state error, but it may make the transient response worse.
![Page 52: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/52.jpg)
52
• A derivative control (Kd) will have the effect of increasing the stability of the system, reducing the overshoot, and improving the transient response.
• Effects of each of controllers Kp, Kd, and Ki on a closed-loop system are summarized in the following table .
![Page 53: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/53.jpg)
53
CL RESPONSE
RISE TIME
OVERSHOOT
SETTLING TIME
S-S ERROR
Kp Decrease Increase Small Change Decrease
Ki Decrease Increase Increase Eliminate
KdSmall
ChangeDecrease Decrease Small Change
![Page 54: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/54.jpg)
54
Example simple mass, spring, and damper problem
![Page 55: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/55.jpg)
55
• The modeling equation of this system is
![Page 56: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/56.jpg)
56
• Let
M = 1kg
b = 10 N.s/m
k = 20 N/m
Find Zeta
![Page 57: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/57.jpg)
57
• The goal is to show how each of Kp, Ki and Kd contributes to obtain
• Fast rise time
• Minimum overshoot
• No steady-state error
![Page 58: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/58.jpg)
58
Open-loop step response
• num=1;
• den=[1 10 20];
• step(num,den)
![Page 59: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/59.jpg)
59
From the previous response
• The DC gain of the plant transfer function is 1/20, so 0.05 is the final value of the output to an unit step input.
This corresponds to the steady-state error of 0.95, quite large indeed.
Furthermore, the rise tr time is about one second, and the settling time ts is about 1.5 seconds.
![Page 60: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/60.jpg)
60
• Let's design a controller that will reduce the rise time, reduce the settling time, and eliminates the steady-state error.
Proportional control
• From the table shown before, we see that the proportional controller (Kp) reduces the rise time, increases the overshoot, and reduces the steady-state error.
![Page 61: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/61.jpg)
61
• The closed-loop transfer function of the above system with a proportional controller is:
![Page 62: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/62.jpg)
62
• Let the proportional gain (Kp) equals 300
• Kp=300;
• num=[Kp];
• den=[1 10 20+Kp];
• t=0:0.01:2;
• step(num,den,t)
![Page 63: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/63.jpg)
63
The above plot shows that the proportional controller reduced both the rise time and the steady-state error, increased the overshoot, and decreased the settling time by small amount.
![Page 64: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/64.jpg)
64
Proportional-Derivative control
• Previous table shown above, we see that the derivative controller (Kd) reduces both the overshoot and the settling time.
• The closed-loop transfer function of the given system with a PD controller is:
![Page 65: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/65.jpg)
65
• Kp=300;
• Kd=10;
• num=[10 300];
• den=[1 20 320];
• t=0:0.01:2;
• step(num,den,t)
![Page 66: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/66.jpg)
66
The derivative controller reduced both the overshoot and the settling time, and had small effect on the rise time and the steady-state error.
![Page 67: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/67.jpg)
67
Proportional-Integral control• From the table, we see that an integral
controller (Ki) decreases the rise time, increases both the overshoot and the settling time, and eliminates the steady-state error.
• For the given system, the closed-loop transfer function with a PI control is:
![Page 68: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/68.jpg)
68
• Kp=30;
• Ki=70;
• num=[30 70];
• den=[1 10 50 70];
• t=0:0.01:2;
• step(num,den,t)
![Page 69: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/69.jpg)
69
The response shows that the integral controller eliminated the steady-state error.
![Page 70: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/70.jpg)
70
Proportional-Integral-Derivative control
• Now, let's take a PID controller.
• The closed-loop transfer function of the given system with a PID controller is:
![Page 71: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/71.jpg)
71
• Kp=350;
• Ki=300;
• Kd=50;
• num=[Kd Kp Ki];
• den=[1 10+Kd 20+Kp Ki];
• t=0:0.01:2;
• step(num,den,t)
![Page 72: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/72.jpg)
72
Now, we have obtained the system with no overshoot, fast rise time, and no steady-state error.
![Page 73: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/73.jpg)
73
Step Response
Time (sec)
Am
plitu
de
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.80
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
![Page 74: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/74.jpg)
Tips for designing a PID controller
• Obtain an open-loop response and determine what needs to be improved
• Add a proportional control to improve the rise time • Add a derivative control to improve the overshoot • Add an integral control to eliminate the steady-
state error • Adjust each of Kp, Ki, and Kd until you obtain a
desired overall response.
74
![Page 75: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/75.jpg)
75
Compensators
• Compensators are used to alter the response of a control system in order to accommodate the set design criteria.
• By introducing additional poles and/or zeros to a system, the response of the system will change significantly.
![Page 76: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/76.jpg)
76
• The compensator is an additional device or a component to improve the system performance. (may be beside the original controller).
![Page 77: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/77.jpg)
77
• Lead compensation alters the transient response of systems.
• This includes overshoot, rise time (TR), settling time (TS), and peak time (TP).
• Lag compensation alters steady-state error of systems. (but may get the transient worse- it is the pay)
![Page 78: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/78.jpg)
78
Type of Compensators
Cascade Compensators
R(s) C(s)
G(s)Gc(s)
![Page 79: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/79.jpg)
79
where
makes this a lead compensator and abs(Z) = 1/T1 closer to origin makes this a lag compensator. abs(P) = 1/T2 closer to origin
![Page 80: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/80.jpg)
80
• Feedback Compensators
R(s) C(s)
G(s)
Gc(s)
![Page 81: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/81.jpg)
81
• Consider the first order compensator
k(s + z)
Gc(s) =
(s + p)
Gc(s) is added to achieve a min SSE and the relative required stability.
![Page 82: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/82.jpg)
82
Phase-Lead • Phase-Lead is provided by
Gc = 1 + Ts >1
1 + Ts
= p/z >1 (required ratio of zero to pole of the compensator when < 1 gives a Lag compensator).
Phase-Lead zero = -1/ (T)
Phase-Lead pole = -1/T
![Page 83: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/83.jpg)
• Thus representing phase-lead using poles and zeros
• Gc = S + 1/ (T)
• S + (1/T)
• So when you find and T the compensator is ready.
83
![Page 84: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/84.jpg)
84
Phase-Lead
• In the previous equation if z < p , the compensator is a Lead compensator.
• • -1/T -1/ (T)
zp
The zeros are closer to the origin than poles
![Page 85: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/85.jpg)
85
![Page 86: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/86.jpg)
86
• 1/ The magnitude of Gc is 20 log • 2/ The max phase Lead m occurs half way
between poles and zeros frequencies therefore m = z.p = 1/(T ) and T = 1/ (m )
m meets the Half of the magnitude
• 3/ For compensated max phase sin() = - 1 +1
![Page 87: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/87.jpg)
• Maximum phase shift φmax of phase-lead compensator
• = sin-1 - 1• + 1
and occurs at m = 1/(T )
The value of gain at that frequency is
(0.5)20 log = 10 log
87
![Page 88: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/88.jpg)
Steps in design of phase-lead compensator
• STEP 1.
• Choose gain K to satisfy steady-state requirements.
• STEP 2.
• Draw Bode-diagram of KG(s) and find PM
• = (current phase margin)
88
![Page 89: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/89.jpg)
• STEP 3.
• Find the difference of phase margin
• = Required PM – Current PM
• Step 4
• give a margin of 5 degree and apply sin formula to find
• sin( ) = ( - 1)/( +1)
• from which find
89
![Page 90: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/90.jpg)
• STEP 5.
• Find The new crossover frequency ωc = ωm at (0.5)20 log
• Apply T = 1/[msqrt()] to find T
• Step 6
• Construct Gc(s)
• Check the new cascaded Gc(s).G(s) (and C.L ) Bode to ensure the required PM
90
![Page 91: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/91.jpg)
91
Phase-Lead Example
• A unity feedback system with open loop TF
• k• (10s+1)(s+1)
• Is required to have• 1/steady state error does not exceed 1% for a
unit step (static position error kp)• 2/Open-Loop phase margin of at least 45o
![Page 92: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/92.jpg)
92
Solution
• i/ Determine the required value of k for Ess
• ess = 0.01 = lim SE(s) =
= lim [ 1/(1+[(k/(1+10s)(1+s))] for unit step
ess= 1/(1 + kp)
0.01 = 1/(1+ kp) from which
kp = 1/0.01
= 100 then k = 100
![Page 93: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/93.jpg)
ii/ Check the current phase margin of kG(s)
( with k=100) from which the current
PM = 20
93
![Page 94: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/94.jpg)
94
KG(s) Bode before Compensation
-60
-40
-20
0
20
40M
ag
nitude (
dB
)
10-3
10-2
10-1
100
101
102
-180
-135
-90
-45
0
Phas
e (
deg
)
Bode DiagramGm = Inf dB (at Inf rad/sec) , Pm = 19.8 deg (at 3.08 rad/sec)
Frequency (rad/sec)
![Page 95: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/95.jpg)
95
• So a difference of (45-20) = 25 should be compensated
• Since we have a margin of 5 degree we choose 30o and substitute
sin(30) = ( - 1)/( +1) from which
= 3 so the compensator TF
Gc(s) = 1+3Ts
1+ Ts
![Page 96: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/96.jpg)
96
• Now the value of T must be found.• We have mag of Gc at max phase shift
= (0.5) 20 log • = 20 log 3 = 9.54 dB and we know m meets the Half of the magnitude of the
max phase-lead shift • = (0.5)(9.54) = -4.77 dB (-ve)
• Now from Bode m = 4 rad/sec and hence T = 1/[msqrt()] =1/[(4)sqrt(3)]
• T = 0.14
![Page 97: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/97.jpg)
97
• So Gc will be
• Gc = 1 + 0.42S
• 1 + 0.14S
• To check the effect of Gc see the Bode & response of the O.L with and without the compensator. (new ph margin of 45.1)
![Page 98: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/98.jpg)
98
Compensated open-Loop bode diagram
-100
-50
0
50M
agnitu
de (
dB
)
10-3
10-2
10-1
100
101
102
103
-180
-135
-90
-45
0
Ph
ase (
deg
)
Bode DiagramGm = Inf dB (at Inf rad/sec) , Pm = 45.1 deg (at 4.09 rad/sec)
Frequency (rad/sec)
![Page 99: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/99.jpg)
Step response for open loop after compensation (with k=100)
Step Response
Time (sec)
Am
plit
ude
0 10 20 30 40 50 600
10
20
30
40
50
60
70
80
90
100
![Page 100: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/100.jpg)
100
-60
-40
-20
0
20
Magnitu
de (
dB
)
10-1
100
101
102
-180
-135
-90
-45
0
Phase (
deg)
Bode DiagramGm = Inf dB (at Inf rad/sec) , Pm = 81 deg (at 5.45 rad/sec)
Frequency (rad/sec)
Bode of compensated Closed Loop
![Page 101: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/101.jpg)
101
Step Response
Time (sec)
Am
plit
ude
0 0.5 1 1.5 2 2.50
0.2
0.4
0.6
0.8
1
1.2
1.4
Response of closed loop after compensation
![Page 102: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/102.jpg)
Another Phase-Lead example
• Consider the system with open-Loop T.F of
• G(s) = 4/[s(s+2)]
• Is desired to have at least 50 phase margin with 0.1 ess for a ramp input.
•
• PracticePractice
102
![Page 103: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/103.jpg)
Solution
• Wit h a Ramp input it is a velocity error KvWit h a Ramp input it is a velocity error Kv
• We know ess = 1/Kv We know ess = 1/Kv
• 0.1 = 1/Kv so kv = 10 0.1 = 1/Kv so kv = 10
• With k=10 G(s) = 40/[s(s+2)]With k=10 G(s) = 40/[s(s+2)]
• 1/ From Bode of the open- loop the phase 1/ From Bode of the open- loop the phase margin is 18 degree, so 50-18 =32 should margin is 18 degree, so 50-18 =32 should be compensated.be compensated.
• Take 5 degree as safety gives 37 degreeTake 5 degree as safety gives 37 degree103
![Page 104: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/104.jpg)
• Sin(37) = ( - 1)/( +1) from which
• = 4.1
• Thus Gc = 1 + (4.1)TS
• 1 + T S
• Now T must be found
• -20 log = -12.3
•
104
![Page 105: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/105.jpg)
• Half of -12.3 = -6.13 correspond to m
• From Bode m = 8.7 rad/sec
• hence T = 1/[msqrt()] = 0.056 sec
• Thus Gc = 1+ (0.056)(4.1)S
• 1 + (0.056 ) S
105
![Page 106: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/106.jpg)
106
-50
0
50
Magnitu
de (
dB
)
10-1
100
101
102
-180
-135
-90
Ph
ase (
deg)
Bode DiagramGm = Inf dB (at Inf rad/sec) , Pm = 18 deg (at 6.17 rad/sec)
Frequency (rad/sec)
Bode of k.G(s) uncompensated
![Page 107: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/107.jpg)
• Or Gc = 1 + 0.23S
• 1+ 0.056S
• Will be in series with G(s)
• (Gc).(G(s)) = 9.2 s + 40
• -------------------------------------
• 0.056 s^3 + 1.112 s^2 + 2 s
• Now check (Gc).K.(G) phase margin
107
![Page 108: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/108.jpg)
108
-100
-50
0
50
Magnitu
de (
dB
)
10-1
100
101
102
103
-180
-135
-90
Phase (
deg)
Bode DiagramGm = Inf dB (at Inf rad/sec) , Pm = 50.1 deg (at 8.93 rad/sec)
Frequency (rad/sec)
Bode for Gc(s).(G(s))Note: the 50 PM is obtained
![Page 109: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/109.jpg)
109
-100
-50
0
50
Magn
itude (
dB
)
10-1
100
101
102
103
-180
-135
-90
Phase (
deg
)
CompensatedUncompensated
Bode Diagram
Frequency (rad/sec)
Compensated & Uncompensated Bode
![Page 110: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/110.jpg)
Phase-Lead Verification
• Suppose that a phase Lead is
Gc(s) = 1 + 5s
1 + s
from which T = 1 and = 5
Calculate
from Bode verify max and m
110
![Page 111: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/111.jpg)
max = sin-1 - 1 5 - 1
+ 1 = 5+1 = 41.8
From Bode is the same
Also it is at = 0.45 which correspond to half magnitude = 7.0 as shown.
= 10 Log 5 = 7
Holds with = 1/[T.sqr()] = 1/[1.sqr(5)]
= 0.45
111
![Page 112: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/112.jpg)
• Also we check PZ s-plane to ensure that zero is closer to origin than the pole.
• Repeat for the other Phase-Lead compensators
112
![Page 113: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/113.jpg)
113
Pole-Zero Map
Real Axis
Imagin
ary
Axis
-1 -0.9 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Zero is closer to origin than pole in Phase-Lead
![Page 114: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/114.jpg)
114
10-2
10-1
100
101
102
0
30
60
System: wFrequency (rad/sec): 0.452Phase (deg): 41.8
Phase (
deg)
Bode DiagramGm = Inf , Pm = -180 deg (at 0 rad/sec)
Frequency (rad/sec)
0
5
10
15
System: wFrequency (rad/sec): 0.452Magnitude (dB): 7.05
Magnitu
de (
dB
)
![Page 115: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/115.jpg)
Phase-Lag Compensator Design
• Called PI type compensator.
• Transfer function of a phase-lag compensator:
• Gc(s) = s + z
• s + p
• where |p| < | z |
• The multiplier = | p | | z |.
115
![Page 116: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/116.jpg)
• Representing phase-Lag using poles and zeros
• Gc = S + 1/ (T)
• S + (1/T)
• But for < 1 (fraction)
• Written as TS + 1
• TS + 1 116
![Page 117: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/117.jpg)
117
• Here the pole is dominant (closer to origin)
• -1/ (T) -1/T
S-plane
Pz
![Page 118: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/118.jpg)
Effect of Phase-Lag compensator
• Take = 1/10 , z= -10 , p= -1 then the transfer function will be (T=1)
• Gc = s + 10
• 10s + 10
• Bode diagram of this compensator will be as shown
118
![Page 119: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/119.jpg)
119
Bode Diagram of the Example Phase-Lag Compensator
Max decrease
attenuation
![Page 120: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/120.jpg)
• The logarithmic mean frequency is
ωm = sqrt(pz) = sqrt(10) =3.16 (rad/s)
• The overall attenuation is
• α = p/z = 1/10 = 0.1 (< 1 )
• 20log(α ) = −20 (dB) ,
• and the maximum decrease in phase (at the mean frequency) is
• 120
![Page 121: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/121.jpg)
121
The main use of a phase-lag compensator is to decrease the steady-state error.
The cost is often to increase the system’s rise and settling times (slower system).
![Page 122: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/122.jpg)
Phase-Lag design steps• 1- Find loop gain K required to satisfy
the steady-state error requirement.
• 2- Evaluate the phase margin (PM) of the uncompensated system with the loop gain K to determine if proportional control is sufficient.
122
![Page 123: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/123.jpg)
• 3- Using the Bode diagram of the uncompensated system, find the frequency where the phase margin requirement is satisfied.
• 4- Place the zero of the compensator at least one decade below this frequency.
123
![Page 124: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/124.jpg)
• 5- Using the Bode diagram, determine the attenuation required to make the chosen frequency the new zero-dB crossover frequency.
• 6- Calculate α by setting the required attenuation (negative dB) equal to 20log(α ) .
124
![Page 125: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/125.jpg)
125
7- Calculate the pole location p =α z , and define the compensator to be
8- Check the phase margin of the compensated system to see if the desired value has beenattained.
1 + Ts 1 + Ts
![Page 126: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/126.jpg)
126
Phase-Lag Compensator
• A phase-Lag compensator element has a TF of Gc =
1 + Ts
1 + Ts
But for < 1
The Lag compensator adds a real pole (-1/(T) and a real zero (-1/ T) in the s-plane (-1/ T) is to the left of -1/T
![Page 127: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/127.jpg)
• Note that we can use either a lead compensator or a lag compensator to satisfy the specs.
• The difference is that the lag compensator increases the phase margin by reducing the gain crossover frequency,
127
![Page 128: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/128.jpg)
• whereas the lead compensator increases the phase margin by adding more phase to the system.
128
![Page 129: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/129.jpg)
• Therefore, the response of the system with the lead compensator will generally be faster than that of the same system with a lag compensator.
• The choice of controller will depend on the application requirements and constraints.
129
![Page 130: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/130.jpg)
Lag example
• Consider P(s) = 1/[s(s+1)] .
• Design a lag compensator so that the O. L phase margin is at least 45 (above -180), and 0.1 ess for a unit ramp
• (also you can check the C.L PM)
•
130
![Page 131: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/131.jpg)
Solution
• 1. find k = 1/kv = 1/0.1 = 10 then
k.G(s) = 10/[s(s + 1)
• 2. plot margin of k.G(s)
• 3. find the frequency at which the new phase is satisfied.
• 4. find the dB drop needed to get this frequency the cross over frequency
131
![Page 132: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/132.jpg)
132
-100
-50
0
50
100M
agnitude (
dB
)
10-2
10-1
100
101
102
-180
-135
-90
Phase (
deg)
Bode DiagramGm = Inf dB (at Inf rad/sec) , Pm = 18 deg (at 3.08 rad/sec)
Frequency (rad/sec)
Uncompensated k.G(s)
Mg cross over Should be here
-20 dB drop needed
![Page 133: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/133.jpg)
• From previous Bode the 45 above -180 correspond to c = 1 rad/s
• Locate the zero =-1/(T) at one decade below or z= 0.1
• From Bode the attenuation dB needed to compensate the 45 degree is -20 dB
• So 20 log = -20 dB hence
• = 0.1 133
![Page 134: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/134.jpg)
• Now from zero =0.1wc =0.1 = 1/(T)
• 0.1 = 1/(0.1T)
• So T = 100
• Or p= .z = (0.1)(0.1) = 0.01
• Thus Gc = 10 . 10S + 1
• 100S + 1
134
![Page 135: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/135.jpg)
• Now check the new Bode with the compensator.
• Note the 45 PM is obtained for the new O.L Bode.
135
![Page 136: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/136.jpg)
136
Compensated [Gc(s).G(s)]
-100
-50
0
50
100
150
Magnitu
de (
dB
)
10-4
10-3
10-2
10-1
100
101
102
-180
-135
-90
Phase (
deg)
Bode DiagramGm = Inf dB (at Inf rad/sec) , Pm = 45.2 deg (at 0.791 rad/sec)
Frequency (rad/sec)
![Page 137: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/137.jpg)
137
Lag Compensator design Example 2
• A unity feedback system with open loop TF of k
• (1+10s)(1+s)(1+0.5s)
• Is required to have a phase margin of at least 45o and step sse does not exceed 1% of the C-loop
• Determine the value of k and design a suitable phase-Lag compensator for the loop.
![Page 138: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/138.jpg)
138
Lag compensator design Solution2
• As in the Lead solution
• 0.01 = 1/( 1+ kp) and k = 100
• From K.G(s) Bode diagram the phase margin is -25.7 ( -ve means below -180)
• and the required is +45.
• (+45 above -180 for the compensated line)
• With 5 degree tolerance take 50 so
• -180+50 = -130o
![Page 139: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/139.jpg)
139
Uncompensated K.G(s) PM = -25.7
-100
-50
0
50M
agnitu
de (
dB
)
Bode DiagramGm = -9.21 dB (at 1.52 rad/sec) , Pm = -25.7 deg (at 2.42 rad/sec)
Frequency (rad/sec)
10-3
10-2
10-1
100
101
102
-270
-180
-90
0
System: gFrequency (rad/sec): 0.619Phase (deg): -130
Phase (
deg)
-22 dB
![Page 140: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/140.jpg)
• So the new required wc is 0.62 rad/s
• Now take z = 0.1 wc (one decade below)
• = 0.1(6.2) = 0.062 =z
• the mag of dB that should be decreased so as to let the new zero cross over is 22 dB .
• So 20 log = -22 thus = 0.08
140
![Page 141: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/141.jpg)
• We know z= 0.062 1/ T = 1/(0.08T)
• from which T = 202 sec
• So Gc = 1 + TS = 1 + 16 S
• 1 + TS 1+ 202S
• with k=100 in cascade with G(s)
141
![Page 142: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/142.jpg)
142
-150
-100
-50
0
50M
agnitu
de (
dB
)
10-4
10-3
10-2
10-1
100
101
102
-270
-180
-90
0
Phase (
deg)
Bode DiagramGm = 12.1 dB (at 1.46 rad/sec) , Pm = 43.9 deg (at 0.633 rad/sec)
Frequency (rad/sec)
Compensated Gc(s).K.G(s) for example 2
![Page 143: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/143.jpg)
143
-150
-100
-50
0
50M
agnitu
de (
dB
)
10-2
10-1
100
101
102
-270
-180
-90
0
Phase (
deg)
Bode DiagramGm = 9.64 dB (at 1.46 rad/sec) , Pm = 47.5 deg (at 0.948 rad/sec)
Frequency (rad/sec)
Compensated CL Bode
![Page 144: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/144.jpg)
144
Step Response
Time (sec)
Am
plit
ude
0 5 10 15 20 25 30 35 400
0.2
0.4
0.6
0.8
1
1.2
1.4
System: ggclSettling Time (sec): 17.8System: ggcl
Rise Time (sec): 1.93
System: ggclFinal Value: 0.99
Compensated C.L step Response for example 2
![Page 145: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/145.jpg)
145
Step Response
Time (sec)
Am
plit
ude
0 5 10 15 20 250
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
0.5
Uncompensated C.L step Response for example 2
![Page 146: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/146.jpg)
Phase Lag-Lead
• A combination of Lag with Lead .
• Lead overcome the pay of lag .
• Lag overcome the pay of Lead.
• Practice for G(s) = k/[(s+1)(s+2)(s+10)]
• With 0.01 position error (for step)
146
![Page 147: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/147.jpg)
147
Electronic circuit that is Lead network if R1C1>R2C2 Lag network if R1C1<R2C2
![Page 148: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/148.jpg)
Problem 1
• For the electrical network derive its transfer function and state if it is lead or Lag network.
• Hints:
• use T = R1C and = R2/(R1+R2)
148
![Page 149: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/149.jpg)
149
Problem 1 circuit
![Page 150: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/150.jpg)
150
![Page 151: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/151.jpg)
151
Divide num and den by to get the last T.F
![Page 152: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/152.jpg)
Problem 2 • 1/ For a unity feedback system if forward
loop TF is G(s) = 4/[s(s+0.5)]• Study this system find:• - Static velocity error constant (= )• - Damping ratio =• - Current PM = • Then construct a phase Lag-Lead
compensator and check again.• Discuss the effect of Lag-Lead on the
relative stability. 152
![Page 153: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/153.jpg)
• Plot step response of the compensated and uncompensated system in one graph.
• Plot unit ramp response for compensated and uncompensated in one graph
• Watch SSE and discuss.
• use lead only then lag only and compare.
153
![Page 154: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/154.jpg)
• Look at Table 9.1 in Norman Nise for using operational amp to have P I D
compensators.
154
![Page 155: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/155.jpg)
Gain adjustmentusing Frequency Response
• One of the most important issues in control system design is to add an amplifier without affecting the response so much.
• We know that adding a gain K will increase overshoot of the C.L system
155
![Page 156: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/156.jpg)
• The problem is to know the suitable gain K that improve the system without increasing the overshoot. (gain adjustment)
• To do gain adjustment via frequency response, the following relationships must be known
156
![Page 157: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/157.jpg)
Zeta & overshoot relation
• = - Lin(ov %)
• ()2 + Lin2(ov%)
• Find for 9.5%
• Prove that for 20% OV = 0.456
157
![Page 158: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/158.jpg)
Phase-margin & zeta
• PM = tan-1 2 • -2 2 + 1+ 4 4
•
158
![Page 159: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/159.jpg)
Phase-Margin & • If phase-margin = 60o then is found
where 60 is the difference between -180 and 60 or -180+60 = -120 .
• Then from Bode is found.
159
![Page 160: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/160.jpg)
K adjustment design example
• For the following position control system use frequency response to find the value of the preamplifier K to yield 9.5% overshoot for the C.L step response.
160
![Page 161: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/161.jpg)
161
K 100/(s+100 1/(s+36) 1/s C(s)R(s)
Desired position(set point)
Pre-amp
Power amp.Motor &Load
shaft velocity Shaft
position
Position control system
![Page 162: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/162.jpg)
Solution
• 1. Choose initial gain value (k = 3.6 )
• 2. Draw Bode for the C.L system with gain = 3.6
• C.L = 360
• S3 + 136S2 + 3600S + 360
162
![Page 163: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/163.jpg)
• 3. use overshoot eq. to find
• = 0.6
• 4. use PM eq. to find PM
• PM = 59.2
• 5. find on the Bode that yield (-180+59.2 = -120.8) = 14.8 rad/s
163
![Page 164: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/164.jpg)
164
-200
-150
-100
-50
0
Magnitu
de (
dB
)
Bode DiagramGm = 62.7 dB (at 60 rad/sec) , Pm = -180 deg (at 0 rad/sec)
Frequency (rad/sec)
10-3
10-2
10-1
100
101
102
103
104
-270
-180
-90
0
System: gFrequency (rad/sec): 14.7
Phase (deg): -120
Phase (
deg)
C.L with k = 3.6
![Page 165: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/165.jpg)
• 6. At 14.8 Magnitude is -44 dB
• Then
• 20 Log Km = 44 dB
• From which Km= 162.2
• 7. finally K = (initial K)*Km = 3.6x162.2
• = 583.9
165
![Page 166: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/166.jpg)
166
Step Response
Time (sec)
Am
plit
ude
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.40
0.2
0.4
0.6
0.8
1
1.2
1.4
System: gclTime (sec): 0.181Amplitude: 1.09
Step response after adding 583.9 gain Note overshoot% = 0.09 = 9%
![Page 167: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/167.jpg)
Gain Adjustment using Root Locus
• The root-locus can be used to determine the value of the loop gain , which results in a satisfactory closed-loop behavior.
• Remember very high gain leads to instability.
167
![Page 168: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/168.jpg)
168
In general, the open-loop transfer function is given by
![Page 169: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/169.jpg)
• The characteristic equation of the closed-loop transfer function is
• 1 + K.G(s).H(s) = 0
• Therefore
• 1 = -K.G(s).H(s) then
169
![Page 170: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/170.jpg)
170
it follows that for a point in the s-plane to be in the root- locus when 0 < K < it must satisfy the following two conditions
![Page 171: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/171.jpg)
171
![Page 172: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/172.jpg)
• And
angles of zeros of G(s).H(s) - angles of poles of G(s).H(s) = r(180)
• Where r = +1,3,…….
•
172
![Page 173: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/173.jpg)
173
![Page 174: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/174.jpg)
Root-Locus for Gain adjustment
• 1. Max (marginal) gain determination
• Adding gain K to remove the SSE should be done carefully.
• R.L is useful in finding the suitable gain that makes the Transient Response of the C.L acceptable.
174
![Page 175: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/175.jpg)
• Assume G(s) = 1/[(s+1)(s+2)]
• G(s) = 1/[(s2 + 3s + 2)]
• Check the C.L step Response.
• Check the C. L R.L
175
![Page 176: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/176.jpg)
176
Step Response
Time (sec)
Am
plit
ude
0 0.5 1 1.5 2 2.5 3 3.5 40
0.05
0.1
0.15
0.2
0.25
0.3
0.35
C.L Response of G(s) with K =1 Has got about 0.7 SSE (very high)
Increasing K will reduce the C.L SSE but will get the Transient worse.
![Page 177: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/177.jpg)
177
-1.6 -1.4 -1.2 -1 -0.8 -0.6 -0.4 -0.2 0-4
-3
-2
-1
0
1
2
3
4Root Locus
Real Axis
Imagin
ary
Axis
Means whatever was the value of K the system will never be Unstable, but what about the transient? Will get worse when we increase the gain k to reduce the SSE.
![Page 178: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/178.jpg)
• Now assume we injected k= 200 to solve the problem of SSE.
• Using static position error for this system will give k=100 to have 1% (0.01) SSE.
• 0.01= 1/(1 + Kp) from which Kp=100
178
![Page 179: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/179.jpg)
• To have 0.5% SSE Kp= 200
• The SSE will be reduced but there may be bad transient response.
• So the solution of removing the SSE by adding an amplifier gain K is not a perfect solution.
179
![Page 180: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/180.jpg)
180
Step Response
Time (sec)
Am
plit
ude
0 0.5 1 1.5 2 2.5 3 3.5 40
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
System: glFinal Value: 0.99
With gain K = 200 SSE may be solved but the transient is worse
![Page 181: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/181.jpg)
Adding a Pole at origin
• A pole at origin means 1/s must be inserted in cascade with G(s).
• But what is the max gain that can be used with this integral?
• Look at the C.L response with added integrator (with k=1 before adding any gain)
181
![Page 182: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/182.jpg)
182
Step Response
Time (sec)
Am
plit
ude
0 2 4 6 8 10 12 14 16 180
0.2
0.4
0.6
0.8
1
1.2
1.4
System: ggclFinal Value: 1
C.L response after adding a pole at the origin with k=1 but look at the Root-Locus (also Ts is too late)
![Page 183: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/183.jpg)
183
Root Locus
Real Axis
Imagin
ary
Axis
-7 -6 -5 -4 -3 -2 -1 0 1 2-5
-4
-3
-2
-1
0
1
2
3
4
5
System: ggclGain: 5.03
Pole: 0.0027 + 1.42iDamping: -0.00191
Overshoot (%): 101Frequency (rad/sec): 1.42
It is clear that the max gain =5 after that any increase of k will get the C.L system unstable.
![Page 184: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/184.jpg)
184
Step Response
Time (sec)
Am
plit
ude
0 20 40 60 80 100 1200
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
System: ggclFinal Value: 1
C.L response with an integrator and k=5To show that k=5 is marginal.
![Page 185: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/185.jpg)
2. RL for conditioned K findingzeta condition
• The procedure for finding K is:
• 1/ Construct an accurate root-locus plot.
• 2/ For a given ζ draw a line from origin at angle = cos-1 ζ measured from negative real axis (from left to right- clockwisw) .
• 3/ The desired closed-loop pole S1 is at the intersection of this line and the root-locus.
185
![Page 186: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/186.jpg)
• 4/ Estimate the vector lengths from S1 to poles and zeros and apply the magnitude criterion as given to find K.
186
![Page 187: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/187.jpg)
Root Locus Example2
• The open-loop transfer function of a control system is given by
•
• KGH(s) = k
• s(s+1)(s+4)
• Obtain K such that the damping ratio of the closed-loop poles will be equal to 0.6
187
![Page 188: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/188.jpg)
Solution • 1/ The Root-Locus for the O.L TF is
shown (with k=1).
• For ζ = 0.6 so = cos-1 0.6 = 53.13
• 2/ The line drawn at this angle intersects the root-locus at S1 = -0.42+j0.56
• 3/Now make a line from this point to every pole and zero (vectors lengths)
188
![Page 189: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/189.jpg)
189
-12 -10 -8 -6 -4 -2 0 2-4
-3
-2
-1
0
1
2
3
4
0.6
0.6
1
System: sysGain: 2.05
Pole: -0.418 + 0.56iDamping: 0.598
Overshoot (%): 9.62Frequency (rad/sec): 0.699
Root Locus
Real Axis
Imagin
ary
Axis
![Page 190: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/190.jpg)
• 4/ then K = (3.66)(0.8)(0.7) = 2.05 (when you click on the intersection point k will be given)
• So the compensated closed loop will be
• C(s) = 2.05
R(s) s3+5s2 + 4s + 2.05
190
![Page 191: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/191.jpg)
• To obtain the C.L step response and time-domain specifications, we use the following commands.
• numc=2.05;
• denc=[1 5 4 2.05];
• T=tf(numc, denc) • ltiview('step', T) % chance for changing figure
191
![Page 192: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/192.jpg)
192
Step Response
Time (sec)
Am
plit
ude
0 5 10 150
0.2
0.4
0.6
0.8
1
1.2
1.4System: g
Peak amplitude: 1.09Overshoot (%): 9.28
At time (sec): 5.89
Step Response of the C. L
![Page 193: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/193.jpg)
193
ExampleRoot Locus
P*I*D compensator
• i/ Check the response and Root Locus of CL system.
• Ii/ Use a suitable P*I*D compensator then check again
1
(s+1)(s+2)(s+10) -
![Page 194: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/194.jpg)
Uncompensated C.L
• For C.L
• G=tf([1],[1 13 32 21 ])
• Rlocus(g)
• Step(g)
194
![Page 195: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/195.jpg)
195
-30 -25 -20 -15 -10 -5 0 5 10-20
-15
-10
-5
0
5
10
15
20Root Locus
Real Axis
Imagin
ary
Axis
Uncompensated C.LMax Gain =380
![Page 196: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/196.jpg)
196
Step Response
Time (sec)
Am
plit
ude
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50
0.005
0.01
0.015
0.02
0.025
0.03
0.035
0.04
0.045
0.05
Uncompensated CL Response
![Page 197: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/197.jpg)
197
Solution
• The CL response for a unit step will give
• Ts = 4.37 , Tr=2.44 and
• ss = 0.047 (very poor)
• A block of P*I*D compensator must be added in cascade to improve the system.
•
![Page 198: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/198.jpg)
Integral only as compensator
• Now adding an integral only as compensator in cascade with the plant will solve the problem of the steady-state but may get the transient worse.
• Multiply the open-loop with 1/s
• G=tf([1],[1 13 32 20 0])
• Gcl=feedback(g,1)
198
![Page 199: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/199.jpg)
• Gcl =
• 1
• -------------------------------------------
• s^4 + 13 s^3 + 32 s^2 + 20 s + 1
• Then check step response
199
![Page 200: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/200.jpg)
200
Step Response
Time (sec)
Am
plit
ude
0 20 40 60 80 100 1200
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
CL Response of integral only solved the SSE but the transient is worse
![Page 201: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/201.jpg)
201
1
(s+1)(s+2)(s+10)
K(s+a)
s
PID Compensated System
A block of P*I*D compensator must be added in cascade to improve the system.
![Page 202: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/202.jpg)
202
• Take k=1 , a=0.1 and check the CL response and Root Locus
• Why Root Locus?
• To see that the new compensated RL will pass the same points and still improve the system (Ts, Tr,…)
![Page 203: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/203.jpg)
• Gc = (S+0.1)/S
• Gc=tf([1 0.1],[1 0])
• Gc is cascaded with g
• ggc= series(g,gc)
• And the C.L is
• ggcl= feedback(ggc,1)
• = s + 0.1
• ----------------------------------------------
• s^4 + 13 s^3 + 32 s^2 + 21 s + 0.1
203
![Page 204: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/204.jpg)
204
0 200 400 600 800 1000 12000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1Step Response
Time (sec)
Am
plit
ude
C.L step response with k=1 , a= 0.1Notice the worse Ts, Tr.
![Page 205: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/205.jpg)
205
-30 -25 -20 -15 -10 -5 0 5 10-20
-15
-10
-5
0
5
10
15
20Root Locus
Real Axis
Ima
gin
ary
Axis
Root locus for ggcl when gc has k=1 , a=0.1Notice the same path for system g. Thus PID compensator doesn't change the system root locus path (which is required)
![Page 206: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/206.jpg)
• Now we have to improve the step response Ts, Tr, …….
• We know that adding the zero improve the response by shifting the root locus to the left, so we choose z=1 instead of 0.1 and check the step response and root locus again.
206
![Page 207: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/207.jpg)
• Gc= (s+1)/s
• And ggc=
• s + 1
• ------------------------------------
• s^4 + 13 s^3 + 32 s^2 + 20 s
• The C.L is ggcl =
• s + 1
• --------------------------------------------
• s^4 + 13 s^3 + 32 s^2 + 21 s + 1
207
![Page 208: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/208.jpg)
208
Step Response
Time (sec)
Am
plit
ude
0 20 40 60 80 100 1200
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Step response for ggcl with k=1 and a=1 instead of 0.1Note the improvement of Ts and Tr compared with a=0.1 (zero value)
![Page 209: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/209.jpg)
209
-30 -25 -20 -15 -10 -5 0 5 10-20
-15
-10
-5
0
5
10
15
20Root Locus
Real Axis
Imagin
ary
Axis
Root locus for ggcl with k=1 and a=1 instead of 0.1
![Page 210: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/210.jpg)
• The PID compensator eliminate the SSE and has a little improvement on the transient response.
• Try PD with removing the origin pole (1/s) which result in PD only ( k(s+a))
• Take a=1
210
![Page 211: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/211.jpg)
• One of the main benefits of the root locus is that it gives you the cross-point gain
• Take k = 130
• Then ggcl =
• 130 s + 130
• ---------------------------------
• s^3 + 13 s^2 + 162 s + 150
211
![Page 212: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/212.jpg)
212
Step Response
Time (sec)
Am
plit
ude
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10
0.2
0.4
0.6
0.8
1
1.2
1.4
System: ggclFinal Value: 0.867
Step response for k=130, then a=130Note the strong improvement on Ts, and Tr, but still there is a SSE
![Page 213: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/213.jpg)
213
-7 -6 -5 -4 -3 -2 -1 0-25
-20
-15
-10
-5
0
5
10
15
20
25
System: ggclGain: 0Pole: -6 + 10.7iDamping: 0.49Overshoot (%): 17.1Frequency (rad/sec): 12.2
System: ggclGain: 3.32Pole: -6 - 23.4iDamping: 0.249Overshoot (%): 44.6Frequency (rad/sec): 24.1
Root Locus
Real Axis
Imagin
ary
Axis
C.L Root locus for k=a=130Note that adding any gain will keep the system stable but overshoot will be increased since damping will decrease.
![Page 214: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/214.jpg)
• For PD compensator (k(s+a)) you can take k larger than 130 and check the response until you reach your criteria.
• (try k=250, 500, 750,1000)
214
![Page 215: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/215.jpg)
Benefits of Root Locus in design
• 1. Shows the cross-point gain value.
• 2. shows if there is unlimited gain increase when path goes vertically.
• 3. finds the gain k required for a given damping ratio.
• 4.Shows the effect of adding poles or zeros on the system behaviour. (prove)
• 5. shows the contour when changing more than one parameter (k + another variable)
215
![Page 216: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/216.jpg)
Nichols Plot• Nichols Plot gives another way to depict
frequency response information
• —by plotting the magnitude versus phase curve in the semi logarithmic scale (for w from zero to infinity).
• Nichols chart can be generated using the nichols(G) function for the MATLAB transfer function G.
216
![Page 217: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/217.jpg)
M circles and Nichols Chart
• Consider G(jw) forward T.F
M is the magnitude of the C.L with unity feedback [H(jw) = 1]
so M= G(jw)/[1+G(jw)]
and G(jw) is complex = X+jy
217
![Page 218: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/218.jpg)
• M circle is developed as:
Let G( jω)=X+jY, where X is the and Y the imaginary
Then M =
218
![Page 219: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/219.jpg)
Example
• Consider a unity feedback system with open-loop transfer function
• To produce a Nichols chart for the given system, with the closed-loop dB M-contours superimposed, we use:
219
![Page 220: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/220.jpg)
• G=tf([10],[1 5 0])
• Nichols(G);
• Ngrid;
220
![Page 221: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/221.jpg)
Using Defined Parameters
• s = tf('s');
• G = 45/(s*(s+5));
• w = 0.5:50;
• nichols(G,w);
• ngrid;
• The following plot appears
221
![Page 222: Control II](https://reader035.fdocuments.net/reader035/viewer/2022081412/545556a2b1af9f1c048b49f2/html5/thumbnails/222.jpg)
222
-360 -315 -270 -225 -180 -135 -90 -45 0-40
-30
-20
-10
0
10
20
30
40
6 dB
3 dB
1 dB
0.5 dB
0.25 dB
0 dB
-1 dB
-3 dB
-6 dB
-12 dB
-20 dB
-40 dB
Nichols Chart
Open-Loop Phase (deg)
Ope
n-Lo
op G
ain
(dB
)