Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 46 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
46
Dung lượng
2,89 MB
Nội dung
crrwrr% 14: Sampling, z Transforms, and Stability 4’79 i.e., the output of the hold is maintained at a constant value over the sampling p&o& The hold converts the discrete signal, which is a series of pulses, into a continuous signal that is a stairstep function. The equivalent block diagram of this system is shown at the bottom of Fig. 14.2. The transfer function of the hold is H(,). The transfer function of the computer controller is D&,. Figure 14.3 shows a digital control computer. The process output variables yt, y2,. * *t yIy are sensed and converted to continuous analog signals by transmitters TI,T'L, , TN. These data signals enter the digital computer through a multiplexed analog-to-digital (A/D) converter. The feedback control calculations are done in the J < ! ;; I I I/ I, I, I, *N : Ts . t Digital computer t D/A 1 FIGURE 14.3 Computer control. 480 PART WI:: Sampled-Data Systems computer using some algorithm, and the calculated controller output signals are sent I to holds associated with each control valve through a multiplexed digital-to-analog (D/A) converter. A block diagram of one loop is shown in the bottom of Fig. 14.3. The sampling rate of these digital control computers can vary from several times a second to only several times an hour.‘The dynamics of the process dictate the sam- pling time required. The faster the process, the smaller the sampling period Ts must be for good control. One of the important questions that we explore in this chapter and the following one is what the sampling rate should be for a given process. For a given number of loops, the smaller the value of T, specified, the faster the com- puter and the input/output equipment must be. This increases the cost of the digital hardware. 14.2 IMPULSE SAMPLER A real sampler (Fig. 14.1) is closed for a finite period of time. This time of closure is usually small compared with the sampling period T,. Therefore, the real sampler can be closely approximated by an impulse sampler: An impulse sampler is a device that converts a continuous input signal to a sequence of impulses or delta functions. Remember, these are impulses, not pulses. The height of each of these impulses is infinite. The width of each is zero. The area or “strength” of the impulse is equal to the magnitude of the input function at the sampling instant. , (14.2) ; t If the units of fit, are, for example, kilograms, the units of &, are kilograms/minute. The impulse sampler is, of course, a mathematical fiction; it is not physically realizable. But the behavior of a real sampler-and-hold circuit is practically identi- cal to that of the idealized impulse sampler-and-hold circuit. The impulse sampler is used in the analysis of sampled-data systems and in the design of sampled-data controllers because it greatly simplifies the calculations. Let us now define an infinite sequence of unit impulses 6tt) or Dirac delta func- tions whose strengths are all equal to unity. One unit impulse occurs at every sam- pling time. We call this series of unit impulses, shown in Fig. 14.4, the function I(+ 41, = $f) + &T,) + S(t-27-,) + &3T,) + . . . I(f) = i: $-nT,) (14.3) II =o Thus, the sequence of impulses 4;) that comes out of an impulse sampler can be expressed as : sent lalog 4.3. imes sam- must spter . For :om- gital Isure lpler vice ions. es is al to 4.2) lute. tally :nti- .pler data lnc- am- 40 - 4.3) 1 be 4.4) I CIIAIWX IJ: Sampling, 7, Transfortns, and Stability 48 I . .I 9 ft, q q ./;/U) * lmpulsc sampler / _ \ / / / l-u ft, ' / fHW \/ Impulses of “strength” fcnrq,) \ \ \ ir \ / ’ - ’ t - - is Ct-nG) lllk f n TT FIGURE 14.4 Impulse sampler. Laplace-transforming Eq. (14.4) gives (14.5) 482 PART FIVE: Sampled-Data Systems Equation (14.4) expresses the sequence of impulses that exits from an impulse sam- pler in the time domain. Equation (14.5) gives the sequence in the Laplace domain. Substituting io for s gives the impulse sequence in the frequency domain. F&,, = 2 j&,T,vle-in”T’ (14.6) n=O The sequence of impulses &, can be represented in an alternative manner. The It,) function is a periodic function (see Fig. 14.4) with period T.y and a frequency o, in radians per minute. 27T 0, = - TS Since ItI) is periodic, it can be represented as a complex Fourier series: where he -inw,t dt (14.9) (14.7) (14.8) Over the interval from -T,/2 to +T,/2 the function Zct, is just 6ct). Therefore, Eq. (14.9) becomes Remember, multiplying a function f&J by the Dirac delta function and integrating give f&. Therefore, Zcr) becomes I(t) = f ym einWsf s n=-cc The sequence of impulses &, can be expressed as a doubly infinite series: 4;) = j&) = f “fgrn fit)einw,f (14.11) s n= m Remember that the Laplace transformation of a function multiplied by an expo- nential ear is simply the Laplace transform of the function with (s - a) substituted for s. So Laplace-transforming Eq. (14.11) gives (14.12) am- lain. 4.6) The IO, 4.7) 4.8) 4.9) ore, .lO) ting .ll) :po- rted .12) CIIAI~IK IJ: Sampling, z Transforms, and Stahiliti 483 Substituting io for s gives F;iw) = f ‘y ~~i(“+n,.,), (14.13) s n=-m Equation (14.4) is completely equivalent to’ Eq. (14.11) in the time domain. Equation (14.5) is equivalent to Eq. (14.12) in the Laplace domain. Equation (14.6) is equivalent to Eq. (14.13) in the frequency domain. We use these alternative forms of representation in several ways later. 14.3 BASIC SAMPLING THEOREM A very important theorem of sampled-data systems is: To obtain dynamic information about a plant from a signal that contains com- ponents out to a frequency omax, the sampling frequency o, must be set at a rate greater than twice urnax. 0s > 2wnax (14.14) EXAMPLE 14.1. Suppose we have a signal that has components out to 100 rad/min. We must set the sampling frequency at a rate greater than 200 rad/min. w, > 200 rad/min T, = F = & = 0.0314 min us This basic sampling theorem has profound implications. It says that any high- frequency components in the signal (for example, 60-cycle-per-second electrical noise) can necessitate very fast sampling, even if the basic process is quite slow. It is therefore always recommended that signals be analog filtered before they are sampled. This eliminates the unimportant high-frequency components. Trying to fil- ter the data after it has been sampled using a digital filter does not work. To prove the sampling theorem, let us consider a continuous fit, that is a sine wave with a frequency 00 and an amplitude Ao. . f& = AO sin(wd (14.15) iqt f(t) = Ao e _ e-iuot 2i (14.16) Suppose we sample this Al1 with an impulse sampler. The sequence of impulses 4;) coming out of the impulse sampler will be, according to Eq. (14.1 l), - .’ n = -I) = .> ,,=-% \ Ao n=+= =2iT,-Je “! i(w,)+nw,)r _ , i(w,-nw,)1 ,, z x I 484 mrm r:rvr;: Sarnplcd-Data Systems Now we write out a few of the terms, grouping some of the positive and negative n terms. of) = 2 i (+ot ,:‘ ,d + ~~(w+w.d’ ;i’ -i(w(,+w,v)t &q, + 2hJv)t _ e -i(wo t 2w.v )t + J 2i eibO-w,v)t - e-i(wO-w,v)f &(o(j-2~,~)t _ e-i(o,j-2w,v)f + 2i + + . . . 2i Ao j& = c ( sin(out) + sin[(wo + o,)t] + sin[(oo + 2o,>t] + sin[(oo - os)t] + sin[(oo - 20,)t] + * * *) (14.17) Thus, the sampled function 4;) contains a primary component at frequency wo plus an infinite number of complementary components at frequencies 00 + os, oo+ 2%, * . * ,mo - o,, 00 - 20,, . . . . The amplitude of each component is the amplitude of the original sine wave fttJ attenuated by l/T,. The sampling process produces a signal with components at frequencies that are multiples of the sampling frequency plus the original frequency of the continuous signal before sampling. Figure 14.52 illustrates this in terms of the frequency spectrum of the signal. This is referred to by electrical engineers as “aliasing.” Now suppose we have a continuous function fit) that contains components over a range of frequencies. Figure 14% shows its frequency spectrum f&j. If this signal is sent through an impulse sampler, the output f(T) has a frequency spectrum &, as shown in Fig. 14%. If the sampling rate or sampling frequency os is high, there is no overlap between the primary and complementary components. Therefore, &, can be filtered to remove all the high-frequency complementary components, leaving just the primary component. This can then be related to the original continuous function. Therefore, if the sampling frequency is greater than twice the highest frequency in the original signal, the original signal can be determined from the sampled signal. If, however, the sampling frequency is less than twice the highest frequency in the original signal, the primary and complementary components overlap. Then the sampled signal cannot be filtered to recover the original signal, and the sampled signal predicts incorrectly the steady-state gain and the dynamic components of the original signal. Figure 143 shows that J:, is a periodic function of frequency o. Its period is ws. This equation can also be written Going into the Laplace domain by substituting s for io gives (14.18) (14.19) ( 14.20) Thus Ft., is a periodic function of s with period io,. We use this periodicity property to develop pulse transfer functions in Section 14.5. n 7) .lS + ie a ZY ia t0 x al 1s 10 )e st n. in :Y :n :d le Id CIIAPTEK 14: S:qding, I Transforms, and Stability 485 IfI 1111 mo High sampling rate If*1 h Low Overlap (b) Function with several frequencies FIGURE 14.5 Frequency spectrum of continuous and sampled signals. 14.4 z TRANSFORMATION 14.4.1 Definition Sequences of impulses, such as the output of an impulse sampler, can be z trans- formed. For a specified sampling period T,, the z transformation of an impulse- sampled signal & is defined by the equation ‘[-fi;,] = ho, + hz-’ + &r,,Z-* + fi~~,z-~ + * * * + j&)z-‘* + . . - (14.2 1) The notation ‘%[I means the z. transformation operation. The j&T,rj values are the magnitudes of the continuous function ftl, (before impulse sampling) at the sampling periods. We use the notation that the z transform of 4;; is F(,). The z variable can be considered an “ordering” variable whose exponent represents the position of the impulse in the infinite sequence j&. Comparing Eqs. (14.5) and (14.22), we can see that the s and z variables are related by pZ’e”” (14.23) We make frequent use of this very important relationship between these two complex variables. Keep in mind the concept that we always take z tran’sforms of impulse-sampled signals, not continuous functions. We also use the notation (14.24) This means exactly the same thing as Eq. (14.22). We can go directly from the time domain 4;) to the z domain. Or we can go from the time domain hT, to the Laplace domain FTsl and on to the z domain Fez). 14.4.2 Derivation of z Transforms of Common Functions Just as we did in learning Russian (Laplace transforms), we need to develop a small German vocabulary of z transforms. t P t1 t: A. Step function I c lS- se- !l) the % !2) nts are 23) lex led 24) me ace la11 (:IIAPW~ IJ: Sampling, z Transforms, and Stability 487 Passing the step function through an impulse sampler gives J;;, = K~~(~jlt,), where ltI) is the sequence of unit impulses defined in Eq. (14.3). Using the definition of z transformation [Eq. (14.22)J gives ~[.I$)1 = 2 J&7$-n = f(O) + hT,)P + A2w -2 + * n =o = K + Kz-’ + Kz-2 + Kz-’ + - * * = K( 1 + z-’ + z-2 + y3 + . . -) K 1 = 1 -z-’ provided Iz-‘I < 1. This requirement is analogous to the requirement in Laplace transformation that s be large enough that the integral converges. Since z-’ = ePTsS, s must be large enough to keep the exponential less than 1. The z transform of the impulse-sampled step function is B. Ramp function J-(t) = Kt 3 &;, = K+, 3&f)] = 2 finTs)Z-n = fro, + jj7& + fi2zS -2 + . . . n=O = 0 + KT,z-' + ~KT,z-~ + ~KT,z-~ + a.+ = KTsz-‘(l + 22-l + 3z-2 + . . .) = KTd-’ (1 - z-1)2 for Iz-’ 1 < 1. The z transform of the impulse-sampled ramp function is %Kt~(,, 1 = K&z (z - 1>2 (14.25) Notice the similarity between the Laplace domain and the z domain. The Laplace transformation of a constant (K) is K/s and of a ramp (Kt) is Kls2. The z transfor- mation of a constant is Kzl(z - 1) and of a ramp is KT,d(z - 1)2. Thus, the s in the denominator of a Laplace transformation and the (z - 1) in the denominator of a : transformation behave somewhat similarly. You should now be able to guess the z transformation oft*. We know there will be an s3 term in the denominator of the Laplace transformation of this function. So we can extrapolate our results to predict that there will be a (z - 1)3 in the denominator of the z transformation. We find later in this chapter that a (2 1) in the denominator of a transfer function in the z domain means that there is an integrator in the system, just as the presence of an s in the denominator in the Laolace domain tells us there is an integrator. 488 PART PIVI:: Satnplcd-Data Syskms C. Exponential f(,) = KC” =K 1 1 - prT,, z- I for I,-@tz-‘I < 1 The z transform of the impulse-sampled exponential function is (14.27) Remember that the Laplace transformation of the exponential was Kl(s + a). So the (s + a) term in the denominator of a Laplace transformation is similar to the (z - ewaTs) term in a z transformation. Both indicate an exponential function. In the s plane we have a pole at s = -a. In the z plane we find later in this chapter that we have a pole at z = e?Tv . So we can immediately conclude that poles on the negative real axis in the s plane “map” (to use the complex-variable term) onto the positive real axis between 0 and + 1. ID. Exponential multiplied by time In the Laplace domain we found that repeated roots l/(s + ~2)~ occur when we have the exponential multiplied by time. We can guess that similar repeated roots should occur in the z domain. Let us consider a very genera1 function: This function can be expressed in the alternative form K a+P> At, = (-l>p- p! dap The z transformation of this function after impulse sampling is F(,) = g- I)$ d”(;;p OflT,) Z-n II =o = (-#,K dp P! dal’ [&Pe-uTxr] = (-l)PK” z i 1 p! JaP z - e-aT.5 EXAMPLE 14.2. Take the case where p = 1. (14.29) ( 14.30) (14.3 I) So we get a repeated root in the : plane, just as we did in the s plane. _ [...]... numerical values of K, = T(, = 1, K, = 4.5, and T, = 0.2, Y(,, becomes 0.81 592 Y(z) = (z - l)(z - 0.0030 19) (14.48) Expanding in partial fractions gives Y(z) = 0.81 592 z - l 14.42) The pole at 0.0030 19 can be expressed as 0 0030 19 = sed in 0.81 59~ - - 0.0030 19 z (14. 49) The value of the term nT, is 5.803 y5.803 = p’T.s 0.8 1 592 0.81 59~ y(z) = z - 1 - z - e-5.8o3 (14.50) Inverting each of the terms above... in Exatnple EXAMPLE 14.4 is 0.8 1 59~ yw = z2 - 1.0030 192 + 0.0030 19 Long division gives 0.81 592 -l + 0.8184~-~ + 0.8184z+ + Z2 - 1.0030 19~ + 0.0030 19) 0.8159z 0.81 59~ - 0.8184 + O.O025z-’ 0.8184 - O.O025z-’ 0.8184 - 0.82 092 -l + 0.0025~-~ 0.8 184z-’ - 0.0025~-~ _ Therefore fro, = 0 f(~,y) = fio.2) = 0.8 1% fi2Ts) = fiO.4) = 0.8184 fi3T,) = fiO.6) = 0.8184 These are, of course, exactly the same results... = y(~.~,~) = 0.81 59 - 0.8159e-“uT.Y = 0.81 59( 1 - e-5.803n) Table 14.1 gives the calculated results of y(jzr,) as a function of time (14.51) n B Long division give An interesting z transform inversion technique is simple long division of the numerator by the denominator of F(, The ease with which z transforms can be inverted with this technique is one of the reasons z transforms are often used By definition,... half of the s plane Thus, the region of stability in continuous systems is the left half of the s plane The stability of a sampled-data system is determined by the location of the roots of a characteristic equation that is a polynomial in the complex variable z This characteristic equation is the denominator of the system transfer.function set equal to zero The roots of this polynomial (the poles of. .. proportional controller and a first-order process is K, K,,( I - 1~): 5:) = (i: - l)[z - b + K, K,,(I - 6)1 (14.47) n u I1 it n C~AIW:I~ 14 Sampling, I Transforms, and Stability 'I-AIil.I% 493 14.1 Results for Example 14.4 YW,) 1 n Kc = 4.5 Kc = 12 0 0.2 0.4 0.6 0.8 0 I 2 3 4 0 0.81 59 0.8184 0.8184 0.8184 0 2.176 -0.8 098 3.254 -2.310 KC = feedback controller gain K, = process steady-state gain 7,) = process. .. transfer functions process Time-, Laplace-, and z-domain representations are shown Gtz) is called a pulse transferfunction It is defined below A sequence of impulses z.$, comes out of the impulse sampler on the input of the process Each of these impulses produces a response from the .process Consider the kth impulse L(TkT, ( ) Its area or strength is u(kr,Y) Its effect on the continuous output of the plant... always needed in a sampled-data process control system The zeroorder hold converts the sequence of impulses of an impulse-sampled function ,f;l;, to cwwrw IJ: Sanlpling, 7: Transforms, and Stability Ipled, Unit 4.58) f fW 4. 59) 499 impulse TV / \ \\ \ I? FIGURE 14.8 Zero-order hold 4.60) I side a continuous stairstep function fHtI) The hold must convert an impulse f* of area w or strength f&,) at time... value of b is E-~.$‘G~ = e- W” = 0.8 187 Equation (14 .97 ) gives It 0.81 592 ‘(-) = z2 - 1.00302~ + 0.0030 19 2) e, This is the function we used in Example 14.4 (14 .97 ) (14 .98 ) n In the preceding example we derived the expression for Yczj analytically for a step change in Yt.$ An alternative approach is to use MATLAB to calculate the step response of the closedloop servo transfer function Equation (14 .96 )... using Eq (14 .99 ) for three different values of controller gain Results are plotted in Fig 14.11 Both the output Y and the manipulated variable A4 are plotted The stairs command produces the stairstep functions of the manipulated variables coming from the zero-order hold The values of Y are plotted only at the sampling points These are what the computer sees The continuous output of the process y([)... PLANE i The stability of any system is determined by the location of the roots of its characteristic equation (or the poles of its transfer function) The characteristic equation of a continuous system is a polynomial in the complex variable S If all the roots of this polynomial are in the left half of the s plane, the system is stable For a continuous closedloop system, all the roots of 1 + G M~s~Gc~s~ . gives Y(z) = 0.81 592 0.81 59~ z-l - z - 0.0030 19 The pole at 0.0030 19 can be expressed as 0 0030 19 = y5.803 = p’T.s The value of the term nT, is 5.803. 0.8 1 592 0.81 59~ y(z) = z - . in Exatnple 14.4 is 0.8 1 59~ Long division gives yw = z2 - 1.0030 192 + 0.0030 19 0.81 592 -l + 0.8184~-~ + 0.8184z+ + Z2 - 1.0030 19~ + 0.0030 19) 0.8159z 0.81 59~ - 0.8184 + O.O025z-’ 0.8184. e-5.8o3 (14.48) (14. 49) (14.50) Inverting each of the terms above by inspection gives y(,$,) = y(~.~,~) = 0.81 59 - 0.8159e-“uT.Y = 0.81 59( 1 - e-5.803n) (14.51) Table 14.1 gives the calculated results of