Control Systems EE 4314 Lecture 29 May 5, 2015 Spring 2015 Indika Wijayasinghe Numerical Integration π β’ What is the equivalent of the different operator ( or π ) in ππ‘ terms of π§? Consider π(π ) πΈ(π ) =π· π = 1 π π π’ (π + 1)π = (π+1)π π π‘ ππ‘ + 0 π π‘ ππ‘ π = π’ π + area under e t over the last T Numerical Integration Numerical Integration Numerical Integration β’ Example: Using three (forward difference, backward difference, Tustin method) approximation methods to find the discrete equivalent for 10π + 1 π· π = π +1 Numerical Integration β’ Example: Using three (forward difference, backward difference, Tustin method) approximation methods to find the discrete equivalent for 10π + 1 πΆ π = π +1 Numerical Integration β’ Frequency responses for sampling periods T=0.5 and 1 Approximation is better for higher sampling rate (T=0.5). The sampling rate should be at least 10 times higher than the highest frequency of interest. Tustinβs method is the best approximation. State Space Formulation β’ Find the state space model described by difference equation π¦ π + 2 = π’ π + 1.7π¦ π + 1 β 0.72π¦(π) Discrete State Space Equation β’ Find the state space model described by difference equation π¦ π + 2 = π’ π + 1.7π¦ π + 1 β 0.72π¦(π) Solutions of Discrete State Space Equation β’ Discrete state space equation x k + 1 = Ax k + Bu k y k = Cx k + Du k Recursive solution Solutions of Discrete State Space Equation β’ Continue Digital Controller Design β’ There are two techniques for finding the difference equations for the digital controller 1. Discrete equivalent: Design D(s) first, and then obtain equivalent D(z) using Tustinβs method, Matched Pole-Zero (MPZ) method. Discrete design: directly obtain the difference equation without designing D(s) first. Obtain G(z) and design D(z). 2. Digital controller r(t) r(kT) T + e(kT) Difference equations u(kT) D/A and hold u(t) plant G(s) clock y(kT) A/D T sensor 1 y(t) Design Using Discrete Equivalent β’ Design by discrete equivalent 1. 2. 3. Design a continuous compensation D(s) using continuous controller design methods such as PID, lead/lag compensator. Digitize the continuous compensation: D(s) ο D(z) Use discrete analysis, simulation or experimentation to verify the design Digitization Technique: Tustinβs Method β’ Consider π(π ) πΈ(π ) =π· π = 1 π ππβπ π’ ππ = πΈ(π ) π(π ) ππ π π‘ ππ‘ + 0 1 π π π‘ ππ‘ ππβπ = π’ ππ β π + area under e t over the last T π 2 π’ π = π’ π β 1 + [π π β 1 + π π ] ο trapezoidal integration Taking z-transform π π§ πΈ π§ = π·(π§) = π = 2 1βπ§ β1 π 1+π§ β1 π 1+π§ β1 2 1βπ§ β1 Trapezoidal integration Digitization Technique: Tustinβs Method β’ MATLAB command 1 π· π = π >> numD=[1]; denD=[1 0]; Ds=tf(numD,denD) π 1 + π§ β1 π·(π§) = 2 1 β π§ β1 Dz=c2d(Ds,1,'tustin') Dz = Ds = 1 s Continuous-time transfer function. 0.5 z + 0.5 ----------z-1 Sample time: 1 seconds Discrete-time transfer function. Relationship between s and z β’ Consider Im π π‘ = π βππ‘ , π‘ > 0 Laplace transform πΉ π = 1 , π +π and it has a pole at π = βπ πΉ π§ = π = βπ S-plane Z-transform π§ , π§βπ βππ Re and it has a pole at π§ = π βππ A pole at π = βπ in the s-plane corresponds to a pole at π§ = π βππ Im 1 Re π§ = π βππ Z-plane Digitization Technique: Matched Pole-Zero (MPZ) Method β’ MPZ technique applies the relation π§ = π π π . This digitization method is an approximation 1. 2. 3. Map poles and zeros according to the relation π§ = π π π . If the numerator is of lower order than the denominator, add powers of (z+1) to the numerator until numerator and denominator are of equal. Set the DC or low-frequency gain of D(z) equal to that of D(s). The MPZ approximation of π· π = π +π πΎπ π +π is π· π§ = π§βπ βππ πΎπ π§βπ βππ Digitization Technique: Pole-Zero (MPZ) Method β’ Adjusting DC gain of D(z) π· π = π +π πΎπ π +π π· π§ = π§βπ βππ πΎπ π§βπ βππ Using the Final Value Theorem π 1 β π βππ πΎπ = πΎπ π 1 β π βππ π 1 β π βππ πΎπ = πΎπ π 1 β π βππ The difference equation is π’ π = ο’π’ π β 1 + πΎπ [π π β ο‘π π β 1 ] Final Value Theorem β’ Final value theorem for continuous system lim π₯ π‘ = π₯π π = lim π π(π ) π‘ββ π β0 β’ Final value theorem for discrete system lim π₯ π = π₯π π = lim (1 β π§ β1) π(π§) πββ π§β1 Digitization Technique: Matched Pole-Zero (MPZ) Method β’ For D(s) with a higher-order denominator, adds (z+1) to the numerator π· π = πΎπ π +π π (π +π) (π§ + 1)(π§ β π βππ ) π· π§ = πΎπ (π§ β 1)(π§ β π βππ ) Digitization Technique: Matched Pole-Zero (MPZ) Method β’ Example: Design a digital controller to have a closed-loop natural frequency ο·π β 0.3πππ/π and a damping ratio οΊ=0.7. πΈ π + π 1 π 2 π· π = 0.81 π +0.2 π +2 π·(π ) β First step is to find the proper D(s) π Digitization Technique: Matched Pole-Zero (MPZ) Method β’ Example: Design a digital controller to have a closed-loop natural frequency ο·π β 0.3rad/s and a damping ratio οΊ=0.7. Second step is to obtain D(z) Select sampling time T so that sample rate should be about 20 times ο·π . Thus ο·π = 2π 20ο·π = 6rad/sec. Since sampling time π = = 1sec. ο·π π +0.2 π +2 0.389β0.319π§ β1 1β0.135π§ β1 MPZ digitization of π· π = 0.81 π§β0.82 is π· π§ = 0.389 π§β0.135 = The difference equation is π’ π = 0.135π’ π β 1 + 0.389π π β 0.319π(π β 1) >> T=1; numD=[1 0.2]; denD=[1 2]; Ds=0.81*tf(numD,denD); Dz=c2d(Ds,T,'matched') Dz = 0.3864 z - 0.3163 ----------------z - 0.1353 Digitization Technique: Matched Pole-Zero (MPZ) Method β’ Example: Design a digital controller to have a closed-loop natural frequency ο·π β 0.3rad/s and a damping ratio οΊ=0.7. Discrete Design β’ Discrete design is an exact design method and avoids the approximations inherent with discrete equivalent. The design procedures are β Finding the discrete model of the plant G(s)ο G(z) β Design the compensator directly in its discrete form D(z) π(π§) A practical approach is to start the design using discrete equivalents, then tune up the result using discrete design. Discrete Design β’ For a plant described by G(s) and precede by a ZOH, the discrete transfer function is πΊ(π ) β1 πΊ π§ = 1βπ§ π π The closed-loop transfer function π(π§) π· π§ πΊ(π§) = π (π§) 1 + π· π§ πΊ(π§) 1 β π βπ π πππ» π = π Mixed control system Pure discrete system Discrete Root Locus π β’ Consider πΊ π = and π· π§ = πΎ, discuss the implications π +π of the loci. Z-transform table Continuous system remains stable for all values of K, but the discrete system becomes oscillatory with decreasing damping ratio as z goes from 0 to -1 and eventually becomes unstable. Relationship b/w z-plane and s-plane π§ = π π π ο·n increase οΊ increase Relationship b/w z-plane and s-plane Discrete Controllers β’ Proportional β’ Derivative β’ Integral β’ Lead Compensation Discrete Design β’ Example: Design a digital controller to have a closed-loop natural frequency ο·π β 0.3rad/s and a damping ratio οΊ=0.7. Use a discrete design method. πΈ π + π·(π ) β β’ From πΊ π§ = 1 β π§ β1 π π 1 π 2 πΊ(π ) π π2 π§ + 1 πΊ π§ = 2 (π§ β 1)2 When T=1, πΊ π§ = 1 π§+1 2 (π§β1)2 π ο Z-transform table 1 π 2 π§(π§ + 1) β π 3 2 (π§ β 1)3 Discrete Design β’ Example: Design a digital controller to have a closed-loop natural frequency ο·π β 0.3πππ/π and a damping ratio οΊ=0.7. Use a discrete design method. Becomes unstable as K increases Z-plane locus with proportional controller D z = K Z-plane locus with PD controller D z =πΎ (π§β0.85) π§ Digital Control πΊ(π ) π·(π ) πΈ π + β π + 0.2 0.81 π +2 π 1 π 2 πΊ(π§) π πΈ π (π§) + π·(π§) π(π§) β π(π§) π2 π§ + 1 2 (π§ β 1)2 Continuous control Discrete equivalent Discrete design sysGs=tf(1,[1 0 0]); sysDs=tf(0.81*[1 0.2],[1 2]); sysGDs=sysGs*sysDs; sysCLs=feedback(sysGDs,1); step(sysCLs); sysGs=tf(1,[1 0 0]); sysDs=tf(0.81*[1 0.2],[1 2]); sysGs=tf(1,[1 0 0]); T=1; sysDz=c2d(sysDs,T,'matched') sysGz=c2d(sysGs,T,'zoh'); sysDGz=sysGz*sysDz; sysCLz=feedback(sysDGz,1) step(sysCLz) T=1; sysGz=c2d(sysGs,T,'zoh'); sysDz=tf(0.374*[1 -.85],[1 0],T) sysDGz=sysGz*sysDz; sysCLz=feedback(sysDGz,1) step(sysCLz) Step Responses of the Continuous and Digital Systems Step Response 1.5 Amplitude 1 Continuous Discrete equivalent 0.5 Discrete design 0 0 5 10 15 20 Time (seconds) 25 30 35
© Copyright 2026 Paperzz