Professional Documents
Culture Documents
Kunio Takaya
Electrical and Computer Engineering University of Saskatchewan October 28, 2009
Linear dierential equations State-Space representation 3. Time response Second-Order Systems Poles and zeros Time domain solution of state equations 4. Reduction of multiple subsystems Block diagrams and Signal-Flow graphs Masons rule Similarity transformations 5. Stability Routh-Hurwitz criterion Stability in State-Space
3
6. Steady-State errors Steady-State error for unity gain feedback Steady-State error for disturbance 7. Root Locus techniques Sketching the root locus Transient response design via gain adjustment 8. Design via root locus Cascade compensation Improving transient response and steady-state error 9. Frequency response techniques Bode plots Nyquist diagrams Systems with time delay
4
10. Design via frequency response Lag compasation Lead compensation Classes: MWF 8:30-9:30 a.m. 1B79 Engineering My oce: 3B31 Email: kunio.takaya@usask.ca
K1 K2 K The open loop transfer function is Go (s) = = . s(s + 10) s(s + 10) Its closed loop transfer function is, Gc (s) = K Go = 2 1 + Go s + 10s + K
6
T (s) =
The closed loop poles have to satisfy the following conditions. jKG(s)H(s)j KG(s)H(s) = = 1 (2k + 1)180 (1) (2)
10
11
j 22 .
1 + 2 3 4 = 180 K= L3 L4 = 0.33 L1 L2
12
13
We follow the following appoaches to study the root locus based design. 1. cascade compensators to improve the steady state error PI Controller and (Phase) Lag Compasator 2. cascade compensators to improve the transient response PD Controller and (Phase) Lead Compensator 3. cascade compensators to improve the steady state error and transient response PID Controller and (Phase) Lag-Lead Compensator, Notch Filter We will look at both of analytical approach, and try-and-error approach (MATLAB).
14
15
16
17
18
19
20
21
% % % % % % % % % = %
Display label. Clear variables from workspace. clear graph on screen. Define numerator of G(s). Define denominator of G(s). Display label. Create and display G(s). Draw root locus (H(s)=1). Add title. ); Input damping ratio from the keyboard.
% Overlay desired damping ratio line % on root locus. title([Root Locus with ,num2str(z), damping ratio]) % Define title for root locus % showing percent overshoot used. [K,p]=rlocfind(G) % Generate gain, K, and closed-loop % poles, p, for point selected 22
% interactively on the root locus. pause; T(s) T=feedback(K*G,1) figure(2); step(T) % Display label. % Find closed-loop transfer function % with selected K and display.
% Generate closed-loop step response % for point selected on root locus. title([Step Response for K=,num2str(K)]) % Give step response a title which % includes the value of K. Kp=K*1/(1*2*10) ess=1/(1+Kp) [numc,denc]=tfdata(T,v) finalvalu=numc(4)/denc(4) pause; numg1=poly([-0.1]); deng1=poly([0 -1 -2 -10]); G1(s) G1=tf(numg1,deng1) figure(3); rlocus(G1) title(Original Root Locus) % Define numerator of G(s). % Define denominator of G(s). % Display label. % Create and display G(s). % Draw root locus (H(s)=1). % Add title.
23
wn=0; sgrid(z,wn)
% Overlay desired damping ratio line % on root locus. title([Root Locus with ,num2str(z), damping ratio]) [K1,p1]=rlocfind(G1) % Generate gain, K, and closed-loop % poles, p, for point selected % interactively on the root locus. pause T1(s) % Display label. T1=feedback(K1*G1,1) % Find closed-loop transfer function % with selected K1 and display. figure(4); time=[0:0.2:40]; step(T,r,T1,b,time) % Generate closed-loop step response % for point selected on root locus. title([Step Response for K=,num2str(K), and K1=, num2str(K1)])
24
We try to improve error coecient K from the original systems Ko to a compensated systems Kn . For this particular systemof type I, we improve Kv , velocity error coecient. Kv = lim sG(s)
s0
and
1 e() = Kv
25
26
Kvn
K(s + zc )(s + z1 )(s + z2 ) K(z1 z2 )(zc ) = lim sG (s) = lim s = s0 s0 s(s + pc )(s + p1 )(s + p2 ) (p1 p2 )(pc ) zc Choose such that Kvn = Kvo > Kvo pc
Thus, relative positions of the compensator pole and zero are zc > pc or zc < pc .
27
28
Compensate the system to improve the steady state error by a factor of 10 if the system is operating with a damping ratio of 0.174. The uncompensated system that gives = 0.174 is shown in the next root locus plot.
29
30
Adjust zc and pc for required steady state error The root locus gain K to cross the = 0.174 line is K = 164.6. The position error coecient Kplant of the plant is Kplant = lim 1 1 = s0 (s + 1)(s + 2)(s + 10) 20 1 = 164.6 = 8.23 20
1 = 0.108 1 + Kp Now, we want to reduce the steady state error by a factor of 10. e() = Since 0.108 = 0.0108 10 1 = 0.0108, e() = 1 + Kp
31
KpN 91.95 zc = = = 11.13 pc KpO 8.23 Where, pc = 0.01 has arbitrarily chosen. zc = 11.13pc = 0.111
32
33
35
36
37
The Proportional and Derivative (PD) controller generally quickens the transient response. Zeros will pull the root locus toward the zero. Poles will push the root locus away from the pole. Look at time constant T = 1 which determines the decay part n of 2nd order response, en t . (a) T = 1, (b) T = 1/3 = 0.33, (c) T = 1/2.5 = 0.4, (d) T = 1/1.869 = 0.535 for = 0.4 of G(s) = K . (s + 1)(s + 2)(s + 5)
38
39
40
41
Design a PD controller to yields 16% overshoot, with a threefold reduction in settling time. 2 % OS = e(/ 1 ) 100 16% overshoot yields = 0.504. Draw the root locus of uncompensated system.
42
The second order poles are at 1.205 j2.064. Time constant is T = 1/1.205. The settling time is Ts = 4 4 = = 3.320 n 1.205
43
From cos = = 0.504, we obtain = 59.735 . d = tan = 6.193 This s = jd = 3.613 j6.193 must be on the root locus satisfying the angle condition, s (s + 4) (s + 6) + (s + ) 120.2593 86.4242 68.9216 + (s + ) (s + ) 6.193 = tan(180 95.6 ) 3.631 = = = = 180 180 95.6051
= 3.006
45
46
47
The third pole is at s = 2.775 which is too close to the real part of second order poles, and (closed loop) pole and zero are close but do not cancel each other, so the second order approximation is not valid. The residue of the third order pole by the partial fraction
48
49
1. Evaluate the uncompensated system to determine how much improvement is required in transient response. 2. Design the PD controller that meets the transient response specications 3. Simulate to be sure if the PD controller meets the specications.
50
4. Design the PI controller to yield the required steady-state error. 5. Determine gains KP , KI , and KD 6. Simulate to be sure if all requirements have been met.
Design a PID controller so that the system can operate with a peak time that is two-thirds that of the uncompensated system at 20% overshoot and with zero steady-state error for a step input. Step 1, Find uncompensated peak time Tp for 20% overshoot
51
Using MATLAB, plot the root locus and nd the characteristics of the uncompensated system.
(ch9p2) Example 9.5 PID % Display label. Uncompensated System % Display label. numg=poly([-8]); % Generate numerator of G(s). deng=poly([-3 -6 -10]); % Generate denominator of G(s). G=tf(numg,deng) pos=20 z=-log(pos/100)/sqrt(pi^2+[log(pos/100)]^2); % Calculate damping ratio. K0=[0:1:300]; rlocus(G, K0) % Plot uncompensated root locus. sgrid(z,0) % Overlay desired percent overshoot line. title([Uncompensated Root Locus with , num2str(pos),... % overshoot Line]) % Title uncompensated root locus. [K,p]=rlocfind(G) % Generate gain, K, and closed-loop % poles, p, for point selected % interactively on the root locus. hold on; Closed-loop poles = % Display label. p % Display closed-loop poles. f=input(Give pole number that is operating point ); % Choose uncompensated system % dominant pole. 52
Summary of estimated specifications for selected point on uncompensated root locus % Display label. operatingpoint=p(f) % Display uncompensated dominant pole. gain=K % Display uncompensated gain. estimated_settling_time=4/abs(real(p(f))) % Display uncompensated estimated_peak_time=pi/abs(imag(p(f))) % Display uncompensated estimated_percent_overshoot=pos % Display uncompensated estimated_damping_ratio=z % Display uncompensated estimated_natural_frequency=sqrt(real(p(f))^2+imag(p(f))^2) % Display uncompensated
settling time. peak time. percent overshoot. damping ratio. natural frequency.
53
54
The damping ratio is calculated by = ln(%OS/100) 2 + [ln(%OS/100)]2 = 0.456 for %OS = 20%
The uncompensated poles found from the root locus are at s = jd = 5.415 j10.57 at gain K = 121.5. The peak time is, = = 0.297 Tp = 2 d n 1 Step 2, Design PD controller to reduce Tp to two-thirds
(ch9p2) Example 9.5 PID reduce peak time to 2/3 Tp=(2/3)* estimated_peak_time new omega_d wd=pi/Tp angle to operating point theta=angle(p(f)); theta_deg=theta*180/pi % ... continued
55
sigma=wd/tan(theta) compensated pole location x=sigma+j*wd plot(sigma,wd,*b,sigma,-wd,*b); pause add PD controller, additional zero angle8=angle(x+8); angle8d=angle8*180/pi angle3=angle(x+3); angle3d=angle3*180/pi angle6=angle(x+6); angle6d=angle6*180/pi angle10=angle(x+10); angle10d=angle10*180/pi anglePD=-angle8d+angle3d+angle6d+angle10d-180 anglePD=-angle8+angle3+angle6+angle10-pi; % wd/(zc+sigma)=tan anglePD PD zero location zc=wd/tan(anglePD)-sigma pause numkv=conv([1 zc],numg); % add (s+zc). denkv=deng; % denominator is the same. pdG=tf(numkv,denkv); % Create pdG(s). pdG=minreal(pdG); % Cancel common poles and zeros.
56
rlocus(pdG)
The line of = 0.456 and d = 15.87 yield the compensated poles are at s = 8.13 j15.87. The angle of the new pole must satisfy, (s + 8) + (s + zc ) (s + 3) (s + 6) (s + 10) = 180 (s + zc ) = 18.37 is found from the MATLAB program.
57
zc = 55.92
GP D (s) = s + 55.92
58
Plot the root locus for the compensated system with PD controller. Using rlocfind(G) nd the compensated closed loop poles and gain. s = 8.13 j15.87 and K = 5.34.
59
Step 4, Design PI controller to make the steady state error to be zero. The PI controller, GP I = s + z0 s + 0.5 = . s s
reduces the steady state error of Type 0 systems to zero. The value of z0 is arbitrary as long as z0 is close to the pole at s = 0. Choose z0 = 0.5.
60
GP ID
KD (s2 +
KI KP s+ ) KD KD s
Thus, our design is KP = 259.5, KI = 128.6, and KD = 4.6. Step responses are shown below.
62
63
The design procedure is as follows: 1. Evaluate the uncompensated system to determine how much improvement is required in transient response. 2. Design the Phase Lead compensator that meets the transient response specications 3. Simulate to be sure if the Lead controller meets the specications. 4. Evaluate the steady-state error performance of the uncompensated system to determine how much more
64
improvement is required. 5. Design the Phase Lag compensator to yield the required steady-state error. 6. Simulate to be sure if all requirements have been met.
Design a Lag-Lead compensator such that the system will operate with 20% overshoot, and a twofold reduction in settling time. Further, the compensated system will exhibit a tenfold improvement in steady-state error for a ramp input.
65
Step 1. 20% overshoot yields = 0.456. = ln(%OS/100) 2 + [ln(%OS/100)]2 = 0.456 for %OS = 20%
Using the root locus for the uncompensated system, the intersection of the locus and the 20% overshoot line gives the operating point, s = 1.794 3.501 and Gain K = 192.1
The time constant of the dominant poles is, T = 1 1 = = 0.5574, n 1.794 = Ts = 4T = 2.2297
66
Step 2 We want a twofold reduction in settling time. Ts (new) = 1.115 = n = 2 1.794 = 3.588
d = n tan 117.13 = 3.588 tan 117.13 = 7.003 In order to have the intersection at -3.588, we have to move the root locus to left. We can place the zero of the Lead compensator
67
s + zc1 = 0 to the system pole at s = 6. The transfer function of the Lead compensated system is GLead (s) = = s + zc1 1 s + pc 1 s(s + 6)(s + 10) s+6 1 1 K =K s + pc1 s(s + 6)(s + 10) s(s + pc1 )(s + 10) K s (s + pc1 ) (s + 10) = 180 s = (s + 10) = = 117.13 , (3.588 j7.003) (10) 7.003 tan1 = 47.5225 6.4120
68
pc = 29.1
1 1 Glead (s) = K =K s(s + pc1 )(s + 10) s(s + 29.1)(s + 10) Step 3, 4
69
Thus, K = 1977 is found from the root locus. Step 5 Glead (s) = 1977 1 s(s + 29.1)(s + 10)
70
This system is of Type 1, so consider the velocity error coecient Kv . 1977 Kv = lim sGlead (s) = = 6.7938 s0 291 = e() = 0.1472
The steady state error of the uncompensated system is 0.312, which must be reduced by a tenfold, i.e. 0.0312. 0.1472 = 0.0312 In terms of gain ratio, zc 1 KvN zc = 0.04713 = = = 4.713 = KvO pc 0.2120 pc = 0.01 Gc,Lag s + 0.04713 = s + 0.01 = = 0.2120 additional error reduction
71
72
73
The value of K that gives = 0.456 is found from the root locus as K = 1971.
74
75
76
77