Digital Control
Mo dule 1
Lecture 4
Module 1: Introduction to Digital Control Lecture Note 4
1
Data Data Reco Recons nstr truc ucti tion on
Most of the control systems have analog controlled processes which are inherently driven by analog analog inputs inputs.. Th Thus us the outputs outputs of a digita digitall contro controlle llerr should should first first be conve converte rted d into into analog analog signal signalss before before being applied applied to the system systems. s. Anothe Anotherr wa way y to look at the proble problem m is that that the high frequency components of f ( f (t) should be removed before applying to analog devices. A low pass filter or a data reconstruction device is necessary to perform this operation. In contro controll system system,, hold hold operati operation on becomes becomes the most popular popular wa way y of recons reconstru tructi ction on due to its simplicity simplicity and low cost. Problem Problem of data reconstruct reconstruction ion can be formulate formulated d as: “ Given a sequence of numbers, f (0) f (0),, f ( f (T ) T ), f (2 f (2T T )), · · · , f ( f (kt) kt), · · · , a continuous time signal f ( f (t), t ≥ 0, is to be reconstructed from the information contained in the sequence.” Data reconstruction process may be regarded as an extrapolation process since the continuous data signal has to be formed based on the information available at past sampling instants. Suppose the original signal f signal f ((t) between two consecutive sampling instants kT and (k (k + 1)T 1)T is k T and to be estimated based on the values of f of f ((t) at previous instants of k of kT (k − 1)T 1)T ,, (k − 2)T 2)T ,, T ,, i.e., (k · · · 0. Power series expansion is a well known method of generating the desired approximation which yields f (2) (kT ) kT ) + f (kT )( (t − kT ) f k (t) = f ( f (kT ) kT ) + f kT )(tt − kT ) kT ) + kT )2 + ..... 2! where, f k (t) = f ( 1) T and f (t) for kT ≤ t ≤ (k + 1)T dn f ( f (t) for n = 1, 2,... f (n)(kT ) kT ) = dtn t=kT Since the only available information about f ( f (t) is its magnitude at the sampling instants, the derivatives of f ( of f ((kT ), f (t) must be estimated from the values of f kT ), as 1 [f [f ((kT ) 1)T )] )] f (1) (kT ) kT ) ∼ kT ) − f (( f ((k k − 1)T = T 1 (1) Similarly, f (2) (kT ) [f [f (kT ) ((k − 1)T 1)T )] )] kT ) ∼ kT ) − f (1) ((k = T 1 where, f (1) ((k ((k − 1)T 1)T )) ∼ [f [f (( ((k 1)T )) − f (( 2)T )] )] k − 1)T f ((k k − 2)T = T (1)
I. Kar
1
Digital Control
1.1
Module 1
Lecture 4
Zero Order Hold
Higher the order of the derivatives to be estimated is, larger will be the number of delayed pulses required. Since time delay degrades the stability of a closed loop control system, using higher order derivatives of f (t) for more accurate reconstruction often causes serious stability problem. Moreover a high order extrapolation requires complex circuitry and results in high cost.
For the above reasons, use of only the first term in the power series to approximate f (t) during the time interval kT ≤ t < (k + 1)T is very popular and the device for this type of extrapolation is known as zero-order extrapolator or zero order hold. It holds the value of f (kT ) for kT ≤ t < (k + 1)T until the next sample f ((k + 1)T ) arrives. Figure 1 illustrates the operation of a ZOH where the green line represents the original continuous signal and brown line represents the reconstructed signal from ZOH. 1 0.8
Reconstructed signal Original signal
0.6 0.4 0.2
) t ( k f , ) t ( f
0
−0.2 −0.4 −0.6 −0.8 −1 0
1
2
3
4
5
6
7
8
9
10
Time (t)
Figure 1: Zero order hold operation The accuracy of zero order hold (ZOH) depends on the sampling frequency. When T → 0, the output of ZOH approaches the continuous time signal. Zero order hold is again a linear device which satisfies the principle of superposition. gh0 (t)
1
t T
Figure 2: Impulse response of ZOH
I. Kar
2
Digital Control
Module 1
Lecture 4
The impulse response of a ZOH, as shown in Figure 2, can be written as gho (t) = us (t) − us (t − T ) 1 − e−T S ⇒ Gho (s) = s 1 − e− jwT sin(wT /2) − jwT /2 = T Gho ( jw) = e jw wT /2 Since T =
2π , we can write ws Gho ( jw) =
2π sin(πw/ws ) − jπ w/w e ws πw/ws
s
Magnitude of G ho ( jw):
2π sin(πw/ws ) |Gho ( jw)| = ws πw/ws Phase of G ho ( jw):
Gh0 ( jw) = sin(πw/ws ) −
πw ws
rad
πw . The change of sign from + ws to − can be regarded as a phase change of −1800 . Thus the phase characteristics of ZOH is linear with jump discontinuities of −1800 at integral multiple of w s . The magnitude and phase characteristics of ZOH are shown in Figure 3. The sign of sin(πw/ws ) changes at every integral value of
ws At the cut off frequency wc = , magnitude is 0.636. When compared with an ideal low pass 2 filter, we see that instead of cutting of sharply at w = w2 , the amplitude characteristics of ws and integral multiples of w s . Gho ( jw) is zero at 2 s
1.2
First Order Hold
When the 1st two terms of the power series are used to extrapolate f (t), over the time interval kT < t < (k + 1)T , the device is called a first order hold (FOH). Thus f k (t) = f (kT ) + f 1 (kT )(t − kT ) f (kT ) − f ((k − 1)T ) where, f 1 (kT ) = T f (kT ) − f ((k − 1)T ) (t − kT ) ⇒ f k (t) = f (kT ) + T Impulse response of FOH is obtained by applying a unit impulse at t = 0, the corresponding output is obtained by setting k = 0, 1, 2,..... for k = 0, when 0 ≤ t < T, f0 (t) = f (0) + I. Kar
f (0) − f (−T ) t T 3
Digital Control
Module 1
Lecture 4
Frequency Response of Zero Order Hold 1
T 0.8 / | ) 0.6 w j ( 0.4 0 h
G | 0.2 0 0
1
2
3
4
5
6
7
8
5
6
7
8
w/w
s
) w j (
0
0 h−1000
G
f o e −2000 s a h P −3000 0
1
2
3
4
w/w
s
Figure 3: Frequency response of ZOH f (0) = 1
[impulse unit] f (−T ) = 0
f h1 (t) = 1 +
t in this region. When T ≤ t < 2T T
f (T ) − f (0) (t − T ) T t Since, f (T ) = 0 and f (0) = 1, f h1 (t) = 1 − in this region. f h1 (t) is 0 for t ≥ 2T , since T f (t) = 0 for t ≥ 2T . Figure 4 shows the impulse response of first order hold. f 1 (t) = f (T ) +
gh1 (t) 2
1
T
2T
t
−1
Figure 4: Impulse response of First Order Hold If we combine all three regions, we can write the impulse response of a first order hold as, t t t t gh1 (t) = (1 + )us (t) + (1 − )us (t − T ) − (1 + )us (t − T ) − (1 − )us (t − 2T ) T T T T t t t = (1 + )us (t) − 2 us (t − T ) − (1 − )us (t − 2T ) T T T I. Kar
4
Digital Control
Module 1
Lecture 4
One can verify that according to the above expression, when 0 ≤ t < T , only the first term produces a nonzero value which is nothing but (1 + t/T ). Similarly, when T ≤ t < 2T , first two terms produce nonzero values and the resultant is (1 − t/T ). In case of t ≥ 2T , all three terms produce nonzero values and the resultant is 0. The transfer function of a first order hold is: 1 + T s 1 − e−T s Gh1 (s) = T s
1 + jwT 1 − e− jwT Gh1 ( jw) = T s
Frequency Response
Magnitude: |Gh1 ( jw)| =
2
1 + jwT |Gh0 ( jw)|2 T 4π2 w2 sin(πw/ws ) 1+ ws2 πw/ws
2π = ws Phase:
2
Gh1 ( jw) = tan−1 (2πw/ws ) − 2πw/ws
2
rad
The frequency response is shown in Figure 5. Frequency Response of First Order Hold 2
T / 1.5 | ) w 1 j ( 1 h
G 0.5 | 0 0
1
2
3
4
5
6
7
8
5
6
7
8
w/w
s
) w j (
0 −500
1 h−1000
G
f −1500 o −2000 e s a −2500 h P −3000 0
1
2
3
4
w/w
s
Figure 5: Frequency response of FOH Figure 6 shows a comparison of the reconstructed outputs of ZOH and FOH.
I. Kar
5
Digital Control
Module 1
Lecture 4
1.5 o/p of ZOH original signal o/p of FOH
1
0.5 ) t ( k f , ) t ( f
0
−0.5
−1
−1.5 0
1
2
3
4
5
6
7
8
9
10
Time (t)
Figure 6: Operation of ZOH and FOH
I. Kar
6