Deign By Emulation (Indirect Method he baic trategy here i, that Given a continuou tranfer function, it i required to find the bet dicrete equivalent uch that the ignal produced by paing an input ignal through i the ame a that produced by paing the ame ignal through. Having obtained by variou method, there are a number of way of converting it to. he hope i that whatever the input ignal to the microproceor the ignal paing to the plant G( from the ZOH DAC will approximate U(. Only the mot popular and baic method will be outlined here. Whatever method i choen, it effectivene i normally judged by comparing it frequency repone with that of, the continuou ytem it i emulating. If input ignal are low frequency compared with the elected ampling frequency then mot of the method will give atifactory reult a long a adjutment are made to enure that the DC or ero frequency gain of i the ame a that of. However for input ignal which are at high frequency i.e. approaching the Nyquit rate (f/ the fidelity of compared with will deteriorate in both gain and phae. In analying frequency repone it make no ene to go beyond the Nyquit rate for becaue above thi frequency the repone i a mirror image of the repone at lower frequencie. Emulation by ZOH Equivalent hi method imple aume that the ignal entering the microproceor i contant over the ampling time (the function of the ZOH DAC on the output ignal. - e - Z{ } Example : A continuou controller ha the -domain tranfer function hown below. r ( _ 0( 4 ( 0 Gp( c ( ENG640 Control Sytem Deign : Haan Parchiadeh, Dr. Barry Hayne Page
Convert to digital control algorithm baed on a ampling time of 0. econd by ZOH method. olution G( - e - x 0( 4 ( 0 ( - e - x 0( 4 ( 0 Uing partial fraction G( ( - e - x G( 8 [ ] 0 Z{ - e - x 8 ( [ ] } ( - - 8 0 Z{ [ ] } 0 G( 8 ( [ ] e -0 0-4.9-0.37 0-4.9 - - 0.37 - Uing 0. econd U(k 0 E(k 4.9 E(k- 0.37 U(k- Pole and Zero Mapping Since every pole and ero of in the -plane ha it equivalent poition in the - plane through the mapping: e or then it eem reaonable to form from by mapping the poition of the pole and eroe in term '' to poition in the -plane uing equation above. A imple example will demontrate the Method. If ( a K ( b hen the poition of the finite pole and eroe of are: ero a and pole b ENG640 Control Sytem Deign : Haan Parchiadeh, Dr. Barry Hayne Page e
Uing the mapping, thee map to poition in the -plane given by: ero a e and pole b e hu i given by: K ' ( e ( e a b he value of K' i elected to enure the gain of and are the ame at ome pecific frequency, uually ero frequency (DC gain. he DC gain in the -plane i determined when 0 and in the -plane when. hu for equal DC gain: Ka b K ' ( e ( e a b hu the value of K' i given by: K ' a( e K b( e b a And thu the equivalent tranfer function i given by: K a( e b( e b a ( e ( e a b hi i a popular method and ha a valid rational, and for tranfer function with a many eroe a pole in it i a reaonable approach. However in many controller tranfer function thi i not the cae. For example the tranfer function: ( a K ( b It ha two pole 0 and b and two eroe a and. he difficulty i mapping the at. Some deigner place it at 0 and ome at - which becaue of the nature of the -plane (due to the peculiar nature of the mapping equation are both reaonable deciion. hi i not very atifactory and even without thi problem the method doe not alway work a well a might be expected. ENG640 Control Sytem Deign : Haan Parchiadeh, Dr. Barry Hayne Page 3
Example : A PI controller ha the -domain tranfer function: D ( K ( I I Obtain an expreion for the controller in dicrete form uing the pole/ero mapping method. Expre your anwer in recurive form uitable for implementation on a microproceor. olution D ( K ( I I K ( / I pole @ 0, ero @ -/ I 0 pole @ e, ero @ e -/i multiply both ide by -/i D ( K ( e ( U ( E ( U ( ( K E ( -/i ( e - ay U (( - K E (( - e -/i U ( U ( - K E ( K E ( - -/i e therefore U ( k U ( k- K E (k K E ( k- U ( k K E (k -/i e K -/i E ( k- e U ( k- make dc gain compatible @ 0 @ K( /i/ K ( e /i /(- herefore compatible with any value of K o et K K. ENG640 Control Sytem Deign : Haan Parchiadeh, Dr. Barry Hayne Page 4
he Bilinear or utin' ranformation Intead of auming the input ignal i held contant between ample (the ZOH method, thi method aume that the proce i more accurate if a traight line between ucceive ample of the input i conidered and i a better approximation to what i happening between ample a hown below: X(t X((k- ec X(k (k- (k time utin uggeted that for the ampled ytem the proce of ignal integration can be approximated by: y k y k - (x k x k - In which y repreent the integral of x. aking the -tranform of the above and Re-arranging into tranfer function form give: y( x( - - - - Integration in continuou ytem i repreented by the Laplace tranfer function /, hence the mapping from the -domain to the -domain i approximated by: - or more commonly: -.( Equation ( i utin' mapping and the idea i that everywhere appear in, equation ( i ubtituted for it. ENG640 Control Sytem Deign : Haan Parchiadeh, Dr. Barry Hayne Page 5
ENG640 Control Sytem Deign : Haan Parchiadeh, Dr. Barry Hayne Page 6 Example 3: A controller tranfer function, given below, ha been deigned in the continuou domain in order to produce approximately 9.5 0 lead and unity gain at a frequency of H. a. he controller i to be implemented on a microntroller and therefore mut be converted to a dicrete form. Uing a ampling frequency of 5 H. Convert to it dicrete counterpart uing: (i he ZOH equivalent method, (ii utin' method without pre-warping. b. Ue calculation to evaluate the mot uitable of the above dicrete tranfer function. Hint: ue the dicrete tranfer function frequency repone (gain and phae at H for comparion. (a(i 0. 0. ( D ( ( ( ( 0.4 0.57 0.4.4 0.4 ( 0.4 0.4 0 0 ( 5 0. 0. 0. 0. 0. 0. ( 0. 0 0. 0. 0. 5 Ζ Ζ Ζ Ζ e e D ZOH
(ii Uing utin without pre-warp the ubtitution for '' i: 0. ( ( ( ( 0 ( ( ubtituting the above into the expreion for give utin 0 0. 0 0. 3 (b he evaluation mut be baed on the requirement of the tranfer function to produce a 9.5 degree phae lag at a frequency of H. Now the relationhip between '' and '' i: e ( ( ( ( : if jω then e jω hu at a frequency of H and a ampling time of e j( π* 0. co( π 0. jin( π 0. 0. ec : 0.3 j0.95 Subtituting the above value of '' into both expreion of above to enable comparion, produce: ZOH 0.3 0.3 j0.95 0.57 j0.95 0.4 0.6 j0.95 0.7 j0.95 ENG640 Control Sytem Deign : Haan Parchiadeh, Dr. Barry Hayne Page 7
hu: he gain and phaeof 5.4 Alo ZOH 0 ZOH tan ZOH 0.95 tan 0.6 ( 0.95 0.6 ( 0.95 0.7 at H are given by: 0.95 (80 74.7 79.85 0.7.45 utin 3(0.3 j0.95 (0.3 j0.95 0.07 j.85 0.6 j.9 he gain and phaeof 9.48 USIN 0 USIN tan utin.85 tan 0.07 ( 0.07.85 ( 0.6.9 at H are given by :.9 (80 88.6 7.9 0.6 utin with pre-warp Unfortunately the utin without pre-warping lead to ditortion of the frequency repone. he ditortion can be een by ubtituting the real relationhip (e between '' and '' into the mapping: ( ( e ( ( e thu to obtain frequency repone we ubtitute jω into the above: jω jω e e e jω jω jω e e e jω jω j ω tan ENG640 Control Sytem Deign : Haan Parchiadeh, Dr. Barry Hayne Page 8
thu the frequency repone of the dicrete ytem can be found by ubtituting the above for '' in rather than jω. When ω i mall then tan(ω/ ω/ and there i hardly any ditortion but a ω π/ then tan(ω/ which only happen in the continuou filter when ω. hu there i ignificant ditortion well below the Nyquit frequency (ω π/. For practical purpoe the ditortion i ignificant above ω 0.6π/. It i alo worth noting that the periodic nature of the tan function i a reflection of the periodic nature of the dicrete frequency repone about the ampling frequency that in turn i related to the aliaing problem dicued in an earlier lecture. o combat thi ditortion or at leat control it, the utin mapping function, equation ( i altered uch that when it i ued to map from to the gain of and are the ame at ome critical frequency ω c of the deigner chooing. hi i often called pre-warping, becaue it i a though i prewarped or ditorted at ω c, o that the gain i preerved at ω c after mapping to. If the frequency repone of the two filter and are to be equivalent at ω c then we require a contant K to multiply by the dicrete frequency to give the ω c K j tan original frequency at ω c : jω c So that at jω c, and are the ame, thu K i given by: ω c K ω c tan Which mean that the mapping equation.( mut be modified to: ω c ω c tan ( (.( hi proce alo leave the ero frequency (DC gain unaltered. he utin or bilinear mapping technique i the mot commonly ued becaue it i imple to ue and in mot cae give adequate reult. ENG640 Control Sytem Deign : Haan Parchiadeh, Dr. Barry Hayne Page 9
Example4 : he following low-pa filter i to be implemented on a microproceor, where the ampling time i et to 0. ec and the critical frequency i et at the filter bandwidth i.e ω c 0 rad/ec. Derive a uitable tranfer function in the -domain given that: olution 0 0 Uing equation the mapping become: 0 ( tan(0 5 ( hu the required -tranform for microproceor implementation a a recurive algorithm i: 0 ( 8.30 0 ( It i particularly ueful when the critical frequency i obviou uch a in a notch or band-pa filter. Problem: A controller tranfer function i given by: 3( ( Aume i et to 0. econd and the critical frequency i et at the filter bandwidth i.e ω c 0 rad/ec. Obtain an expreion and expre your anwer in recurive form uitable for implementation on a microproceor for the controller in dicrete form uing: (ahe ZOH method, (bhe pole/ero mapping method. (cutin' method without pre-warping. (d he bilinear method with pre-warping. Compare the frequency repone of the reulting tranfer function formed by uing the bilinear tranform (with and without pre-warping, the ZOH equivalent and impule equivalent method. Comment on your reult. ENG640 Control Sytem Deign : Haan Parchiadeh, Dr. Barry Hayne Page 0