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 f
Trang 1crrwrr% 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 continuoussignal that is a stairstep function The equivalent block diagram of this system isshown at the bottom of Fig 14.2 The transfer function of the hold is H(,) The transferfunction 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
t Digital computer
t D/A 1
FIGURE 14.3
Computer control.
Trang 2480 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 samsam-pling 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
,
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 =oThus, the sequence of impulses 4;) that comes out of an impulse sampler can be
expressed as
Trang 3n TT FIGURE 14.4Impulse sampler.
Laplace-transforming Eq (14.4) gives
(14.5)
Trang 4482 PART FIVE : Sampled-Data Systems
Equation (14.4) expresses the sequence of impulses that exits from an impulse 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
n=OThe 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
So Laplace-transforming Eq (14.11) gives
(14.12)
Trang 5CIIAI~IK IJ: Sampling, z Transforms, and Stahiliti 483
Substituting io for s gives
F;iw) = f ‘y ~~i(“+n,.,), (14.13)
s n=-mEquation (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 ponents out to a frequency omax, the sampling frequency o, must be set at a rate greater than twice urnax.
high-It is therefore always recommended that signals be analog filtered before they are
sampled This eliminates the unimportant high-frequency components Trying to ter the data after it has been sampled using a digital filter does not work
fil-To prove the sampling theorem, let us consider a continuous fit, that is a sine
wave with a frequency 00 and an amplitude Ao.
Trang 6+ 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 asignal with components at frequencies that are multiples of the sampling frequencyplus the original frequency of the continuous signal before sampling Figure 14.52illustrates 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 &, asshown in Fig 14% If the sampling rate or sampling frequency os is high, there is nooverlap between the primary and complementary components Therefore, &, can befiltered to remove all the high-frequency complementary components, leaving justthe primary component This can then be related to the original continuous function.Therefore, if the sampling frequency is greater than twice the highest frequency inthe 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 Thenthe sampled signal cannot be filtered to recover the original signal, and the sampledsignal predicts incorrectly the steady-state gain and the dynamic components of theoriginal 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
Trang 7If*1 h
Trang 8z 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
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
Trang 9(:IIAPW~ IJ: Sampling, z Transforms, and Stability 487
Passing the step function through an impulse sampler gives J;;, = K~~(~jlt,), whereltI) is the sequence of unit impulses defined in Eq (14.3) Using the definition of ztransformation [Eq (14.22)J gives
~[.I$)1 = 2 J&7$-n = f(O) + hT,)P + A2w-2 + *
s must be large enough to keep the exponential less than 1
The z transform of the impulse-sampled step function is
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 wecan 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
Trang 10488 PART PIVI:: Satnplcd-Data Syskms
(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 wehave a pole at z = e?Tv So we can immediately conclude that poles on the negativereal axis in the s plane “map” (to use the complex-variable term) onto the positivereal axis between 0 and + 1
ID Exponential multiplied by time
In the Laplace domain we found that repeated roots l/(s + ~2)~ occur when wehave the exponential multiplied by time We can guess that similar repeated rootsshould occur in the z domain Let us consider a very genera1 function:
This function can be expressed in the alternative form
Trang 11: w e
we
oots
1 1
z- ’ (2i) sin(o Ts)
1
z sin(o r,)YE-
2i 1 + zw2 - 22-l cos(oT.y) = z2 + 1 - 2zcos(oT,)
F Unit impulse function
By definition, the z transformation of an impulse-sampled function is
(14.32)
4) = ho, + &)z-’ + fi27,)z-2 +
If f& is a unit impulse, putting it through an impulse sampler should give an &T, that
is still just a unit impulse a([) But Eq (14.4) says that
But if& must be equal to just au), the term ho) in the equation above must be equal
to 1 and all the other terms f(T,), &T,), must be equal to zero Therefore, the ztransformation of the unit impulse is unity
where k is an integer Consider an arbitrary function f&o) The original function
j&) before the time delay is assumed to be zero for time less than zero Running thedelayed function through an impulse sampler and z transforming give
~[J;:-D)] = >: &T,-kT.,)Z-n
II =o
Now we let x = y1- k.
.u=-k
Trang 12since ftxr) = 0 for .X < 0 The term in the brackets is just the I mnsform of (I,
since x is j dummy variable of summation
%[e-af A;)] = -g e-anT.y fi,&)z-n = 2 finTs)(ZeuT’)-”
Now substitute zl = zeaT’ into the equation above
3e-“‘f;l‘,l = 2 fin7dzr = F(z,)
n = O Q
E XAMPLE 14.3 Suppose we want to take the z transformation of the function ft, =
Kte-“‘Z(,, Using Eqs (14.26) and (14.37) gives
cE(Kte-“‘z(,)] = %,[CKff(,)] = ,zyf)2Substituting ~1 = zeaT,- gives
KT,zeaTs KTsD?-aT’
~‘[Kfe-“‘z(~)l = (ze”Ts - 1)2 = (z _ ,-UT,)2 (14.38)
This is exactly what we found in Example 14.2
C Final-value theorem
lim h,, = iirr( t x
n
(14.39)
Trang 13The steady-state value of fit, or the limit of At, as time goes to infinity is K Running
j&J through an impulse sampler and z transforming give
Multiplying both sides by (z - 1)/z and letting z + 1 give
The definition of the z transform of f(;, is
F(z) = fro, + j&z-’ + j&52 +
Letting z go to infinity (for Iz-‘j < 1) in this equation gives fro,, which is the limit
also unique; i.e., there is only one fCnT,) that corresponds to a given FtI,.
However, keep in mind that more than one continuous function At, gives thesame impulse-sampled function & The sampled function f(‘;, contains informa-tion about the original continuous function ftt, only at the sampling times Thisnonuniqueness between fCT, (and Fc,)) and fct, is illustrated in Fig 14.6 Both contin-
uous functions f,(,) and j$r) pass through the same points at the sampling times butare different in between the sampling instants They would have exactly the same ztransformation
ml ^ 1 , .I e- : 1 ,.-e 7 t ,-,, n‘>f,\,-mc
Trang 14492 PAW WI:.: Sampled-Data Systems
The classical mathematical method for inverting a z transform is to use the
lin-earity theorem [Eq (14.36)] We expand the function FCzj into a sum of simple terms
and invert each individually This is completely analogous to Laplace
transforma-tion inversion Let F(,, be a ratio of polynomials in z, Mth-order in the
numera-tor and Nth-order in the denominanumera-tor We facnumera-tor the denominanumera-tor into its N roots:
(z - Pl>(z - p2k - p3> k - pN>
(14.42)
where Zcz) = Mth-order numerator polynomial Each root pi can be expressed in
terms of the sampling period:
z - e-a~T.s z - e-azT.s z - e-ajT, + ‘ + z - ~-NNT.> (14.45)
The coefficients A, B, C, , W are found and F(,, is inverted term by term to give
3-1 [F,,,] = hnT,) = Ae-“16 + &-“NT., + + we-wT.~ ( 14.46)
EXAMPLE 14.4 We show in Example 14.8 that the closedloop response to a unit step
change in setpoint with a sampled-data proportional controller and a first-order process
is
5:) = (i: - l)[z - b + K, K, K,,( I - 1~): K,,(I - 6)1 (14.47)
n u
I1
it
n
Trang 15KC = feedback controller gain
K, = process steady-state gain7,) = process time constantFor the numerical values of K, = T(, = 1, K, = 4.5, and T, = 0.2, Y(,, becomes
Y(z) = (z - l)(z - 0.003019)0.81592Expanding in partial fractions gives
Y(z) = 0.81592z - l -z - 0.0030190.8159~
The pole at 0.003019 can be expressed as
0 003019 = y5.803 = p’T.sThe value of the term nT, is 5.803
y(,$,) = y(~.~,~) = 0.8159 - 0.8159e-“uT.Y = 0.8159(1 - e-5.803n) (14.51)Table 14.1 gives the calculated results of y(jzr,) as a function of time n
B Long division
An interesting z transform inversion technique is simple long division of the merator by the denominator of F(, The ease with which z transforms can be invertedwith this technique is one of the reasons z transforms are often used
nu-By definition,
F(z) = fro, + hr,,z-’ + h27;)z-2 + jj3T,,z-3 +
If we can get F(:) in terms of an infinite series of powers of z-t, the coefficients
in front of all the terms give the values of fCllr,,, The infinite series is obtained bymerely dividing the numerator of F,,, by the denominator of Fczj
Trang 16494 p,4Kr I:IVE: Sampled-Dalia Systems
where Ztzj and f’(;) are polynomials in z The method is easily understood by looking
fro, = 0f(~,y) = fio.2) = 0.8 1%
Ycz) = 2.17562-l - 0.8098~-~ + 3.254~-~ - 2.310~-~ + (14.53)The system is unstable for this value of gain (KC = 12), as we show later in this chapter.Notice that this example demonstrates that a first-order process controlled by a sampled-data proportional controller can be made closedloop unstable if the gain is high enough
With the use of an analog controller, the first-drder process can never be closedloop
unstable Thus, there is a very important difference between continuous and discreteclosedloop systems Analog continuous controllers have an inherent advantage over dis-crete sampled-data controllers because they know what the output is doing at all points
in time The discrete controller knows only what the output is at the sampling times wInversion of z transforms by long division is very easily accomplished numeri-cally by a digital computer The FORTRAN subroutine LONGD given in Table 14.2performs this long division The output variable Y is calculated for NT sampling
Trang 17(IWI i,,~( IJ: Sampling, I Transform, and Stability 495
c does long-division using subroutine longd dimension a( IO), h( IOj,y( 100)
c Case for kc=12 aO=O.
a(Ij=2.1756 a(2)=0.
b(lj=0.3722 b(2)= - 1.357 n=2
m=I nt=6 yo=o.
call longd(aO,a,b,yO.y,n,m,nt)
do 10 k=l,nt write(6,l)k,y(k)
if{m.gt.n) nmax=m
do 10 k=l,nmax d(kj=a(kj if(k.gt.mj d(k)=O.
10 continue d(nmax+ Ij=O.
iflaO.eq.O )go to 30 yO=aO
do 20 k=l,nmav
20 d(k)=d(k)-yO*b(k) y(I)=d(l)
Trang 18496 PART WE: Sampled-Data Sysretns
% F o r r n numerutor atrd denominator polytwmials
num=[2 I756 O];
times, given the coefficients AO, Ăl), Ă2), , ĂM) of the numerator and the
co-efficients B( 1), B(2), , B(N) of the denominator
Y(z) = YO + Y(l)z -’ + Y(2)z-2 + Y(3)zC3 + *
A0 + Ă l)z-’ + Ẵ)z-~ + + ĂM)z-~ (14.54)
= 1 + B(l)z-’ + B(2).@ + * * * + B(N)z-N
C Use of MATLAB for inversion
Now that we have discussed the classical inversion methods, we are ready tosee how inversion of z transforms can be easily accomplished using MATLAB soft-warẹ Specific numerical values of parameters must be specified Table 14.3 gives
a program that solves for the values of the output at the sampling periods for theYcz) considered in Example 14.6 First the numerator and denominator polynomialsare formed The number of sampling periods (ntotul) is specified, and the samplingperiod is set Then the [y,x]=nimpulse(num,den,r~totnl) command is used to gener-ate the output sequence ytn~,) at each value of n The results are the same as thoseobtained by long division
14.5
PULSE TRANSFER FUNCTIONS
We know how to find the : transformations of functions Let us now turn to theproblem of expressing input/output transfer function relationships in the z domain.Figure 14.7 shows a system with samplers on the input and on the output of the
Trang 19Pulse 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 ofthe process Each of these impulses produces a response from the.process Considerthe kth impulse L(TkT, )( Its area or strength is u(kr,Y) Its effect on the continuous output
of the plant y(,) is
where yk([) = response of the process to the kth impulse
g([) = unit impulse response of the process = 2-l [Gel]
Figure 14.7 shows these functions
The system is linear, so the total output y(,) is the sum of all the yk's
Trang 20498 PART FIVE: Sarnpkd-thta Systems
The continuous function yt,) coming out of the process is then impulse sampled,producing a sequence of impulses yt, If we z-transform yf,), we get
my;,,1 = >7 Y(nT,$)z-‘* = Y(z)
of Eq (14.59)
p=oDefining G(,) in this way permits us to use transfer functions in the z domain[Eq (14.60)] just as we use transfer functions in the Laplace domain Gtz) is the ztransform of the impulse-sampled response g;;, of the process to a unit impulse func-tion 6~~) In z-transforming functions, we used the notation %[&I = %[F;“,,] = F~,J
In handling pulse transfer functions, we use similar notation
where G& is the Laplace transform of the impulse-sampled response g&, of the cess to a unit impulse input
pro-(14.63)G& can also be expressed, using Eq (14.12), as
A hold device is always needed in a sampled-data process control system The
zero-order hold converts the sequence of impulses of an impulse-sampled function ,f;l;, to
Trang 21FIGURE 14.8
Zero-order hold.
a continuous stairstep function fHtI) The hold must convert an impulse f* of area.w
or strength f&,) at time t = rzT, to a square pulse (not an impulse) of height fcnr,$,and width T, See Fig 14.8 Let the unit impulse response of the hold be defined ashi) If the hold does what we want it to do (i.e., convert an impulse to a step up andthen a step down after Ts minutes), its unit impulse response must be
We are now ready to use the concepts of impulse-sampled functions, pulse transferfunctions, and holds to study the dynamics of sampled-data systems Consider thesampled-data system shown in Fig 14.9a in the Laplace domain The input entersthrough an impulse sampler The continuous output of the process Yc,) is
Y(.\) = G(s) u;.)
Yes) is then impulse sampled to give Y;‘r, Equation (14.13) says that YFs, is
ys, = ; ‘y Y(.s+inw,) \ ,,=-”
(14.67)
Trang 225 0 0 PART FIVE : Sampled-Data Sj slcins
(b) Series elements with intermediate sampler
(c) Series elements that are continuous
Without sampler
(d) System of Example 14.7
FIGURE 14.9
Openloop sampled-data systems
Substituting for Yts+inw,y), using Eq (14.67), gives
We showed [Eq (14.20)] that the Laplace transform of an impulse-sampled function
is periodic
Trang 234.68)
ction
cttwtm IA: Sampling, z Transforms, and Stability 501
‘l:s) = u&+iw,) = I/*-. <s WJ,~) = u~v+iZw,) = “* ( 14.69)Therefore, the U~~+i,lw,~~ terms can be factored out of the summation in Eq (14.68)
The term in the parentheses is Gt, according to Eq (14.64), and therefore the output
of the process in the Laplace domain is
In the z domain, this equation becomes
Y2(z) = G u:+%(z) u(z) (14.74)Thus, the overall transfer function of the process can be expressed as a product ofthe two individual pulse transfer functions if there is an impulse sampler betweenthe elements
Consider now the system shown in Fig 14.9c, where the two continuous ments GltSJ and G2CsI do not have a sampler between them The continuous outputY2(.v) is
ele-Y?(s) = G2c.r) Cc,, = Gxs$h(.s,U;, (14.75)