English

not defined

no text concepts found

LOOP SHAPING Steps Involved in Loop Shaping 140530L Ravinath, W. D. A. P. This is submitted as a partial fulfillment for the module EN3143: Electronic Control Systems Department of Electronics and Telecommunication Engineering University of Moratuwa 22nd of May, 2017 1 Steps involved in Loop Shaping of a Simple Plant Amila Pasan, Undergraduate, Electronics and Telecommunication Department, University of Moratuwa, Katubedda, Sri Lanka [email protected] Abstract—In this report we have shown the steps required to follow in order to adjust a plant with respect to bandwidth, phase margin and steady state error (SSE). Furthermore we have done a simulation in order to check the tracking capability of the adjusted system and compared that with the original plant. I. I NTRODUCTION Loop shaping is one of the vital things of control systems. This may be needed as an optimum solution to repair a plant without replacing the plant which no longer gives its original specifications. This comprehensive report deals with adjustment of bandwidth, correction of phase margin and steady state error (SSE). II. M ETHOD The given system: 3(s + 3) 2 s + 3s + 20 The adjustments we have to make to the plant are as follows: Band Width = 15[rad/s] Phase Margin = 400 Steady State Error = 0.02 G(s) = A. Step 1: Draw Gain and Phase Plots 16.0022 = 22.99780 , the additional margin required. This is clearly depicted in Fig. 1. As Cle should compensate for this, ∠Cle (jω)|ω=15[rad/s] = 22.99780 . After numerically solving for this we can find that, s + 9.742 Cle (s) = s + 23.1 D. Step 4: Adjusting lead compensator gain to unity (Using a gain Kle ) Here we adjust lead compensator gain at ω = 15[rad/s] using the gain Kle s.t., Kle |Cle |ω=15[rad/s] = 1 which is 1.5398. E. Step 5: Steady state error ( ess ) adjustment (Using a lag compensator) First we have to figure out ess of G2 . Using Final Value Theorem, ess = lim e(t) = lim sE(s) t→∞ First we need to draw the gain and phase plots of original plant in order to identify it. They are shown in Fig.1. E(s) = R(s) − Y (s) = R(s) − E(s)G2 (s) 1 E(s) = R(s) 1 + G2 (s) B. Step 2: Bandwidth adjustment (Using a forward gain K) First thing we have to adjust is the bandwidth to BW. For that we introduce K s.t. K|G(jω)|ω=15[rad/s] = 1 s→0 Here e is the error of the system (actually this is when r(t) is unit step), i.e., So ess becomes, ess = lim s→0 We get K = 70.999010 . The bode diagrams of gain and phase are shown in Fig. 1. C. Step 3: Phase margin adjustment (Using a lead compensator) We want our system to have phase magnitude 400 more than 1800 within our adjusted bandwidth of 15 [rad/s]. To do that we introduce a lead compensator Cle to the plant, s + zle Cle = s + ple We get the unadjusted phase margin, ∠G(jω)|ω=15 + 1800 = −163.99780 + 1800 = 16.00220 which is 400 − 1 1 + G2 (s) ess of G2 happens to be 0.1616 which is way over than required, 0.02. So we need to adjust ess of the system using a lag compensator. F. Designing a lag compensator By introducing a lag compensator, s + zla Cla = s + pla to the system, ess becomes, ess = lim s→0 1 1 + Cla (s)G2 (s) 2 By plugging in ess = 0.02 we get the ratio, zla = 9.4462 pla Bode Diagram of Lead Compensator 0 −1 −2 Magnitude (dB) We want our lagging compensator to incur less interference to the system as possible with respect to other parameters, so we make both zla and pla to be small as possible, i.e. closer to the origin. By choosing pla to be 0.1 we end up zla being 0.9446. So our lad compensator Cla is s.t. −3 −4 −5 −6 −7 −8 25 s + 0.9446 Cla (s) = s + 0.1 Phase (deg) 20 G. Step 6: Simulation 15 10 5 Reference signals of 5 rad/s and 20 rad/s signals are input to the signal in order check the tracking performance of the system. The block diagram of simulink model is shown in Fig. 5. 0 −1 0 10 1 10 2 10 Frequency (rad/s) 3 10 10 Fig. 2. Bode Diagram of Lead Compensator . III. R ESULTS How loop shaping works is summarized in Fig. 1. The simulation result is shown in Fig. 4. Bode Diagram of Lag Compensator 20 18 IV. C OMMENTS 16 Magnitude (dB) 14 As Fig. 4 shows the system is quite capable of tracking the reference compared to the plant without any adjustments (Fig. 6) of which the result of the simulation is shown in Fig. 7 12 10 8 6 4 2 0 Bode Diagram 0 Phase (deg) Magnitude (dB) 50 0 −30 −50 −60 −3 10 −2 −1 10 0 10 1 10 2 10 10 Frequency (rad/s) −100 0 Fig. 3. Bode Diagram of Lag Compensator Phase (deg) −45 . −90 Original System Bandwidth Adjusted Phase Margin Adjusted SSE Corrected −135 −180 −3 10 −2 10 −1 10 0 10 Frequency (rad/s) 1 10 2 10 3 10 2.5 yout r Fig. 1. Bode plots of original, bandwidth adjusted, phase margin adjusted and SSE corrected systems. Note that the phase bode plots of both original and bandwidth adjusted systems overlap each other since those differ only by a factor . Tracking Response (y_{out}) and Reference Input (r) 2 1.5 1 0.5 0 −0.5 −1 −1.5 −2 0 0.5 1 1.5 Time (s) 2 2.5 Fig. 4. This is how the adjusted system tracks the reference r. 3 3 r sin(5t) Reference Input yout Tracking Response sin(20t+pi/2) tf([1 0.9446],[1 0.1]) Lag Compensator ess = 0.02 1.5398 tf([1 9.742],[1 23.1]) Gain Lead Compensator ||=1 @ 15 [rad/s] PM Adjustment 40 [deg] 70.999 BW Adjustment 15 [rad/s] tf([3 9],[1 7 32 80]) Plant Fig. 5. Simulation diagram adjusted system to check its tracking capability. Here, we have used 5 rad/s and 20 rad/s sinusoidals as reference signals. . r sin(5t) Reference Input sin(20t+pi/2) yout Tracking Response tf([3 9],[1 7 32 80]) Plant Fig. 6. Simulation diagram of original plant . 2 yout r Tracking Response (y_{out}) and Reference Input (r) 1.5 1 0.5 0 −0.5 −1 −1.5 −2 0 0.5 1 1.5 Time (s) 2 2.5 Fig. 7. This is how the original plant G tracks the reference r. 3 Appendix: MATLAB Code clear,close all;clc % requirements BW = 15; PM = 40; SSE = 0.02; % bandwidth % required phase margin % required steady state error numG = 3*[1 3]; denG = conv([1 4],[1 3 20]); G = tf(numG, denG); leg_G = ’Original System’; bode(G); grid on;hold on [gainG, phaseG] = bode(G,BW); K = 1/gainG; G1 = K*G; leg_G1 = ’Bandwidth Adjusted’; bode(G1); PM_G = 180+phaseG; PR = PM−PM_G; % bandwidth adjusted system % required additional margin % getting the numerical solution to z_le syms z_le eqn = PR/180*pi == atan(BW/z_le)−atan(z_le/BW); sol_z_le = solve(eqn,z_le); p=eval(sol_z_le); clear z_le z_le = p(1); p_le = BW^2/z_le; C_le = tf([1 z_le],[1 p_le]); % lead compensator K_le = 1/bode(C_le,BW); G2 = K_le*C_le*G1; leg_G2 = ’Phase Margin Adjusted’; bode(G2);hold on; % phase margin adjusted system E = 1/(tf([0 1],[0 1])+G2); SSE_G2 = evalfr(E,0); % steady state error of G2 if (SSE_G2<SSE) C_la = 1; else ratio = (1/SSE−1)/evalfr(G2,0); p_la = 0.1; z_la = p_la*ratio; C_la = tf([1 z_la],[1 p_la]); end G3 = C_la*G2; % SSE adjusted ssytem bode(G3); leg_G3 = ’SSE Corrected’; leg = legend(leg_G, leg_G1,leg_G2,leg_G3,’Location’,’SouthWest’); set(leg,’FontSize’,12) print −depsc html\controlsystem_04.eps hold off 1 figure bode(C_le);grid on title(’Bode Diagram of Lead Compensator’) print −depsc html\controlsystem_05.eps figure bode(C_la);grid on title(’Bode Diagram of Lag Compensator’) print −depsc html\controlsystem_06.eps %% % loop shaped system simulation clear, close all;clc tStart = 0; tFinal = 3; Simulation_loopFilt print −s −dsvg html\diagram sim(’Simulation_loopFilt’,[tStart tFinal]); figure plot(yout) hold on plot(r,’−−’) grid on xlabel(’Time (s)’) ylabel(’Tracking Response (y_{out}) and Reference Input (r)’) legend(’y_{out}’,’r’) print −depsc html\tracker %% % original system simulation clear, close all;clc tStart = 0; tFinal = 3; Simulation_loopFilt_plant print −s −dsvg html\diagram_plant sim(’Simulation_loopFilt_plant’,[tStart tFinal]); figure plot(yout) hold on plot(r,’−−’) grid on xlabel(’Time (s)’) ylabel(’Tracking Response (y_{out}) and Reference Input (r)’) legend(’y_{out}’,’r’) print −depsc html\tracker_plant 2