Control Systems EE 4314 Lecture 13 March 19, 2015 Spring 2015 Indika Wijayasinghe Steady-State Error • In the unity feedback system, error equation πΈ =π −π =π − πΊπ· 1 π = π = ππ 1 + πΊπ· 1 + πΊπ· where π: sensitivity • Let input π π‘ = π‘π π! , which is π π = 1 π π+1 – For π = 0, step input or position input – For π = 1, ramp input or velocity input – For π = 2, acceleration input • Using Final Value Theorem lim π(π‘) = ππ π = lim π πΈ(π ) π‘→∞ π →0 1 π (π ) π →0 1+πΊπ· 1 1 = lim π π →0 1+πΊπ· π π+1 = lim π Steady-State Errors Steady-state errors as a function of system type Type Input Step (position) Ramp (velocity) Type 0 1 1 + πΎπ ο₯ ο₯ Type 1 0 1 πΎπ£ ο₯ Type 2 0 0 1 πΎπ • Position error constant πΎπ = lim πΊ π·(π ) • Velocity error constant πΎπ£ = lim π πΊ π·(π ) π →0 π →0 • Acceleration error constant πΎπ = lim π 2 πΊ π·(π ) π →0 Parabola (acceleration) State-State Error • Example: Consider an electric motor control problem including a unity feedback system. System parameters are 1 πΊ π = , π· π = ππ π (ππ + 1) Determine the system type and relevant steady-state error constant for input π and disturbance π. π π + − Controller π + π·(π ) + Plant G(π ) π State-State Error PID Control • PID Controller π’(t)=ππ e+ππΌ e dt + ππ· e ππΌ π· π = ππ + + ππ· π π Where ππ : proportional gain, ππΌ : integral gain, and ππ· : derivative gain π π·(π ) π + πΈ − ππΌ ππ + + ππ· π π π + + Plant G(π ) π Proportional (P) Control • Proportional Controller π· π = ππ Let second order plant πΊ π = • Transfer function π = π·πΊ 1+π·πΊ π·(π ) π΄ π 2 +π1 π +π2 = π΄ππ π 2 +π1 π +π2 π΄ππ 1+ 2 π +π1 π +π2 ππ = π΄ππ π 2 +π1 π +π2 +π΄ππ • Characteristic equation: π 2 + π1 π + π2 + π΄ππ = 0 (2nd order system: π 2 + 2οΊππ π + ππ 2 ) • Designer can determines the natural frequency (ππ ), but not damping of the system. Large ππ reduces steady-state error. Proportional plus Integral (PI) Control ππΌ π π΄ ππ +1 • Proportional Controller π· π = ππ + • Example 1: first order plant πΊ π = π·πΊ – T.F. π = 1+π·πΊ = π π΄(ππ + πΌ ) π ππ +1 π π΄(ππ + π πΌ ) 1+ ππ +1 = ππ 2 + π·(π ) ππ + π΄ππ π +ππΌ ππΌ π π΄ππ +1 π +π΄ππΌ – Characteristic equation: ππ 2 + π΄ππ + 1 π + π΄ππΌ = 0 – Controller parameters can set two coefficients. It can fully determine the natural frequency and damping of system. • Example 2: – T.F. π = 2nd π·πΊ 1+π·πΊ order plant πΊ π = = π π΄(ππ + πΌ ) π π 2 +π1 π +π2 π π΄(ππ + πΌ ) π 1+ 2 π +π1 π +π2 = π΄ π 2 +π1 π +π2 π π΄(ππ + πΌ ) π π π 2 +π1 π +π2 +π΄(ππ + πΌ ) π – Characteristic equation: π 3 + π1 π 2 + (π2 +π΄ππ )π + π΄ππΌ = 0 – Controller parameters can set two coefficients, not three. Proportional plus Derivative (PD) Control • Proportional Controller π· π = ππ + ππ· π Let second order plant πΊ π = • Transfer function π = π΄(ππ +ππ· π ) π·πΊ 1+π·πΊ π·(π ) π΄ π 2 +π1 π +π2 = π΄(ππ +ππ· π ) π 2 +π1 π +π2 π΄(ππ +ππ· π ) 1+ 2 π +π1 π +π2 ππ + ππ· π = π 2 +(π1 +ππ· )π +π2 +π΄ππ • Characteristic equation: π 2 + π1 + ππ· π + π2 + π΄ππ = 0 • Controller parameters can set two coefficients. It can fully determine the natural frequency and damping of system. Summary of PID Controller • Proportional control (ππ ): it tends to stabilize the system. Higher proportional gain reduces an steady-state error and increases the natural frequency of system (fast response) • Integral control (ππΌ ): it tends to eliminate or reduce steady-state error. The control system may become unstable. Integral term increases the order of the system dynamics. (e.g.: 2nd order system becomes 3rd order system) • Derivative control (ππ· ): although it does not affect the steady-state error directly, it adds damping to the system, which results in an improvement in the steady-state accuracy. It tends to increase the stability of the system. Reduces an overshoot. Derivative control is never used alone because it operates on the rate of error, not an error. Ziegler-Nichols Tuning of PID Controller • Controller tuning: the process of selecting the controller parameters (πΎπ , ππ , ππ· ) to meet given performance specifications. • Ziegler and Nichols suggested rules for tuning PID controller gains (πΎπ , ππ , ππ· ) based on step responses (First method) and or based on the value of πΎπ that results in marginal stability (Second method) when mathematical models of plants are not known. Ziegler-Nichols Tuning Rules: First Method • First method: obtain the response of the plant to a unit-step input. • S-shaped curve may be characterized by two constants: delay time L and rise time T. • Choose PID controller gains (πΎπ , ππ , ππ· ) from time delay L and rising time T. Ziegler-Nichols Tuning Rules: Second Method • Second method: Using the proportional control (πΎπ ) only, increases πΎπ from 0 to a critical value πΎππ until system becomes marginally stable. (sustained oscillation). The critical gain πΎππ and its corresponding period πππ are experimentally obtained. Sustained oscillation when πΎπ is πΎππ Ziegler-Nichols Tuning Rules: Second Method • Example: Tune PID controller gains (πΎπ , ππ , ππ· ) using the second method 1 πΊ π = π (π + 1)(π + 5) Ziegler-Nichols Tuning Rules: Second Method • Using only proportional gain πΎπ , increases gain to obtain sustained oscillation – πΎπ = 30 (πΎππ ) – Its corresponding period πππ : 2.8 Step Response Step Response 2 2 1.8 1.8 1.6 1.4 1.4 1.2 1.2 Amplitude Amplitude 1.6 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0 0.2 0 2 4 6 8 10 Time (seconds) 12 14 16 18 20 0 0 2 4 6 8 10 Time (seconds) πΎπ = 20 12 14 πΎπ = 30 (πΎππ ) 16 18 20 Ziegler-Nichols Tuning Rules: Second Method – From πΎππ and πππ , control gains: πΎπ : 18, ππΌ : 1.4, ππ· : 0.35 – Response by use of Ziegler-Nichols Tuning Rules • Overshoot 62% • Rising time: 0.8 sec • Setting time: 15 sec Step Response 1.8 1.6 1.4 Amplitude 1.2 1 0.8 0.6 0.4 0.2 0 0 5 10 Time (seconds) 15 Ziegler-Nichols Tuning Rules: Second Method • Increase ππΌ (integral) and ππ· (derivative) to 3 and 0.77 from 1.4 and 0.35 – 20% overshoot – Fast rising time (0.8sec) – Less oscillation Step Response 1.4 1.2 Amplitude 1 0.8 0.6 0.4 0.2 0 0 1 2 3 4 5 Time (seconds) 6 7 8 9 Ziegler-Nichols Tuning Rules: Second Method • Increase πΎπ (proportional) to 39 from 18 • πΎπ : 39, ππΌ : 3, ππ· : 0.77 – 25% overshoot – Fast rising time (0.4sec) – Fast setting time Step Response 1.4 1.2 Amplitude 1 0.8 0.6 0.4 0.2 0 0 1 2 3 4 Time (seconds) 5 6 7 8