Documente Academic
Documente Profesional
Documente Cultură
2
A typical computer-controlled system
Computer
Synchronization
Clock
3
ACS CCS
Process Process
Actuator Actuator
Structure:
Measure Measure
Controller (correcting network) Controller (digital computer)
Adapter (A/D, D/A)
Continuous analog
Signals: Analog Discrete analog
Discrete digital
4
• Improved sensitivity • Develop complex math
• Use digital components algorithms
• Control algorithms easily • Lose information during
modified conversions
• Many systems inherently digital
Advantages Disadvantages
Discrete (Sampling) System
x(t)
x*(t)
x(t)
Make a analog signal to be a discrete signal.
x(t) —analog signal.
x*(t) —discrete signal. t
0 t t t t t t
1 2 3 4 5 6
Signal sampling
x(t) x*(t)
Sampling period T— the time interval of the signal
sampling: T = ti+1 - ti .
t t
0 0
Sampling switch
Discrete time Signal
Digital Word Analog Signal
Decoder Zero Order Hold
y(k) y(t)
k t
0 2 4 6 0 2T 4T 6T
Some terminologies
1. Sampling period T: the time interval of the signal sampling: T = ti+1-ti .
2. Sampling frequency ωs : ωs = 2π fs = 2π / T .
3. Periodic Sampling : the sampling period Ts = constant.
4. Variable period sampling : the sampling period Ts ≠ constant.
5. Synchronous sampling : not only one sampling switch in a system, but
all work Synchronously.
Sampling (or discrete) control system
There are one or more discrete signals in a control system — the sampling (or
discrete) control system. For example the digital computer control system:
measure
Computer control system
Unit Sample Sequence:
δ(k)
δ (k ) = 1, for k = 0
1
= 0, otherwise k
0
Delayed Unit Sample Sequence:
δ(k-n)
δ (k − n) = 1, for k = n 1
= 0, otherwise k
0 n
An Arbitrary Sequence:
r(k)
= ∑ r (n)δ (k − n) 0 2 4
n =0
Unit Step Sequence:
µ(k)
µ (k ) = 1, for k ≥ 0 1
= 0, otherwise k
0
r ( k ) = A cos(Ωk + φ ) µ (k ) k
0
Basic building blocks of LTI discrete time system:
x(k) x(k-1)
Unit Delayer Block:
Discrete time Second Order System:
c1
+
r(k) x2(k+1) x1(k)
+ c1 +
y(k)
+
x2(k)=x1(k+1)
a2x2(k)
+ + a2
a1x1(k)
a1
x1 (k + 1) = x2 (k )
x2 (k + 1) = a1 x1 (k ) + a 2 x2 (k ) + r (k )
y (k ) = c1 x1 (k ) + c2 x2 (k )
Modelling of Discrete Time System
• Difference Equation Model
• Shifting Theorem:
∞
Delay (Backward Shift)
Ζ[ y (k − 1)] = ∑ y(k − 1) z −k = y(−1) z 0 + y(0) z −1 + y(1) z −2 + L
k =0
∞
−1
k =0
∑
= z y ( k ) z − k + y ( −1) = z −1Y ( z ) + y ( −1)
if y (k ) = 0, for k < 0
Ζ[ y (k − 1)] = z − nY ( z )
Inverse z-Transform
• It exactly same as Inverse Laplace Transform.
• Example:
2 z 2 − 1.5 z z (2 z − 1.5)
Y ( z) = =
z 2 − 1.5 z + 0.5 ( z − 0.5)( z − 1)
Y ( z) 2 z − 1.5 A B 1 1
= = + = + , as A = 1, B = 1.
z ( z − 0.5)( z − 1) ( z − 0.5) ( z − 1) ( z − 0.5) ( z − 1)
z z
Y ( z) = + ⇒ y (k ) = (0.5) k + 1, k ≥ 0
( z − 0.5) ( z − 1)
Transfer Function Model
k =0 k =0 j =0 j =0 k =0
∞ ∞
Y ( z ) = ∑ r ( j ) z − j ∑ g (m)z − m, since, g(k – j) = 0, for k < j, then, m = k – j (say)
j =0 m =0
= R ( z )G ( z )
Transfer Function Model
• Definition: Z-transfer (pulse) function — the ratio of the Z-
transformation of the output signal versus input signal for the
linear sampling systems in the zero-initial conditions, that is:
C ( z)
G( z) =
R(z
( z)
• From difference equation model:
Y ( z ) + a1 z −1Y ( z ) + a 2 z −2Y ( z ) + L + a n z − nY ( z ) = b0 R ( z ) + b1 z −1 R ( z ) + L + bm z − m R ( z )
b0 + b1 z −1 + L + bm z − m
G( z) =
1 + a1 z −1 + a2 z − 2 + L + a n z − n
b0 z n + b1 z n −1 + L + bn
= , for m = n
z n + a1 z n −1 + a 2 z n − 2 + L + an
N ( z)
= , D( z ) ⇒ char. equ., provides poles and N ( z ) ⇒ provides zeros of the discrete system
D( z )
Transfer Function of a Unit Delayer
0.95
Y ( z) 0.05 z
The t.f. of the overall system is: G( z) = =
R( z ) z − 0.95
If r(k)= unit step seq., then z
R( z ) =
z −1
0.05 z 2 Y ( z) 1 0.95
∴Y ( z) = ⇒ = − , [after partial fraction expansion]
( z − 0.95)( z − 1) z z − 1 z − 0.95
z 0.95 z
∴Y ( z) = −
z − 1 z − 0.95
∴ y ( k ) = Z −1 [Y ( z )] = µ ( k ) − 0.95(0.95) k = 1 − (0.95) k +1 , for k ≥ 0.
Transfer Function Modelling
Sampled-data systems:
a. continuous;
b. sampled input;
c. sampled input and output
Phantom / Notional Sampler is introduced
Sampled-data systems and their z-transforms
Block Diagram Reduction of a Sampled-Data System
Transfer Function Modelling
The Z-transfer function of the open-loop system
r(t) c*(t)
G1(s) G2(s) c(t)
T T
R(z) C(z)
G1(z)G2(z) G1(z) =Z [ G1(s)] G2(z) =Z [ G2(s)]
c*(t)
r(t)
G1(s) G2(s) c(t)
T
R(z) C(z)
G1G2(z) G1G2(z) =Z [ G1(s)G2(s) ]
Transfer Function Modelling
The z-transfer function of the closed-loop system
r c R( z )G ( z )
-
G(s)
C(z) = ⇒ GH ( z ) = Z [G ( s ) H ( s )]
H(s)
1 + GH ( z )
RG( z )
r
G(s)
c
C (z) = ⇒ RG( z ) = Z [R( s )G ( s )]
- 1 + GH ( z )
H(s)
r c R( z )G ( z )
G(s) C(z) =
- 1 + G( z ) H ( z )
H(s)
r
G1(s)
c RG1 ( z )G2 ( z )
G2(s) C(z) =
-
1+ G1G2 H ( z )
H(s)
r
G1(s)
c R( z )G1 ( z )G2 ( z )
G2(s) C (z) =
-
1+ G1 ( z )G2 H ( z )
H(s)
Transfer Function Modelling
r c
G1(s) G2(s) G3(s)
-
H(s)
RG1 ( z )G2 ( z )G3 ( z )
C (z) =
r c
1 + G2 ( z )G3 ( z )G1 ( z ) H ( z )
G1(s) G2(s)
- -
H1(s)
H2(s)
R( z )G1 ( z )G2 ( z )
C(z) =
1 + G2 H 1 ( z ) + G1 ( z )G2 H 2 ( z )
r c
G1(s) G2(s) G3(s)
- -
H1(s)
H2(s)
1 + GH ( z ) = 0
∵ z = eTs ∴ 1 + GH (eTs ) = 0
Suppose:
s = α + jβ ⇒ eTs = eT (α + jβ ) = eαT ⋅ e jβT
In s-plane, α need to be negative for a stable system, it means:
e Ts = z = eαT < 1
So we have:
The sufficient and necessary condition of the stability for the sampling control
systems is:
The roots zi of the characteristic equation 1+GH(z)=0 must all be inside the unity circle
of the z-plane, that is:
zi < 1
The stability criterion
critical stability Im
z-plane
1 Re
0.632 Kz
1 + G( z ) = 1 + 2
=0
z − 1.368 z + 0.368
Determine K for the stable system.
Solution : w +1
make z=
w −1
0.632 Kz
1+ = 0 ⇒ 0 .632 Kw + 1.264w + ( 2.736 − 0.632 K ) = 0
z 2 − 1.368 z + 0.368
0 .632 K 2.736 − 0.632 K
In terms o f the Routh criterion : 1.264
We have: 0 < K < 4.33.
2.736 − 0.632 K
The steady state error analysis
Using the final value theorem of the z-transform: e ss = lim ( z − 1) E ( z )
z →1
R( z )G ( z ) R( z ) r e c
E ( z ) = R( z ) − c ( z ) = R( z ) − = G(s)
1 + G( z ) 1 + G( z ) -
R( z )
e ss = lim ( z − 1) E ( z ) = lim ( z − 1)
z →1 z →1 1 + G( z )
1
z
* r ( t ) = 1( t ) ⇔ R( z ) = ; K *p = lim G ( z )
1 + K p z −1 z →1
T
Tz
= * r (t ) = t ⇔ R( z ) = 2
; K v* = lim ( z − 1)G ( z )
Kv ( z − 1) z →1
T2
2 T 2 z ( z + 1)
K a* r (t ) = t ⇔ R( z ) = ; K a* = lim ( z − 1) 2 G ( z )
( z − 1) 3 z →1
Example r e c
- T Z.o.h G (s)
−1 z
y (k ) = g (k ) = Z 2
z + a1 z + a 2
If all the poles of the system are real and distinct, then
Y ( z) A1 A2
z + a1 z + a2 = ( z − α1 )( z − α 2 ) ⇒
2
= +
z ( z − α1 ) ( z − α 2 )
A1 z A2 z
Y ( z) = + ⇒ y (k ) = A1 (α1 ) k + A2 (α 2 ) k
( z − α1 ) ( z − α 2 )
1
Re
Im
1
Re
The necessary and sufficient conditions for polynomial D(z) to have no roots on and outside the unit circle in z-plane
is that -
D(1) > 0
D( −1) > 0, for even n
< 0, for odd n
a n < a0
bn −1 > b0
c n − 2 > c0
(n-2) constraints
M
q2 > q0
Example
Determine the stability of the system with characteristic equation D ( z ) = 2 z 4 + 7 z 3 + 10 z 2 + 4 z + 1
Solution
Initial Conditions:
i ) D(1) = 2 + 7 + 10 + 4 + 1 = 24 > 0, condition satisfied
ii ) D(−1) = 2 − 7 + 10 − 4 + 1 = 2 > 0, condition satisfied as n(= 4) is even
iii ) an < a0 ⇒ 1 < 2
(n-2) constraints:
z0 z1 z2 z3 z4
1 1 4 10 7 2 i ) bn −1 > b0 ⇒ − 3 > − 1 , condition satisfied
2 2 7 10 4 1 ii ) cn − 2 > c0 ⇒ 8 > 20 , condition is not satisfied
3 −3 − 10 − 10 − 1 ×
4 −1 − 10 − 10 − 3 × The system is unstable.
5 8 20 20 × ×
6 20 20 8 × ×
7 − 336 − 240 × × ×
Sampling as Impulse Modulation
T Here xa(t) = analog signal and the sequence x(k) with value x(k) = xa(kT)
xa(t) x*(t) is said to be derived from xa(t) by periodic sampling with sampling
period T and sampling frequency 1/T.
T
x(t) x*(t)
x*(t) The sequence x(k) can be vied as a train of impulses
x(t) δT(t)
represented by continuous time function x*(t) :
× =
t t t x * (t ) = x(0) ⋅ δ (t ) + x(1) ⋅ δ (t − T ) + x(2) ⋅ δ (t − 2T ) + L
0 0 0
∞
Modulating
signal
Carrier
pulse
Modulated
signal
= ∑ x(kT)δ (t − kT)
k =0
δT(t)
1
The Impulse Train δT
t
0
∞ +∞ +∞ Laplace +∞
1 +∞ jkωst 1 1
∑e ∑ X ( s + jkω s )
jkω s t
δ T (t ) = ∑ δ (t − kT) = ∑ Cn e jkω s t
= ∑ e
T k = −∞
← ω s = 2π / T x * ( t ) = x( t ) ⋅
T k =− ∞
→
transforma tion
X * ( s) =
T k =− ∞
k =0 k = −∞
T /2 0 0 ∞
1 1 + 1 + 1 here : X ( s ) = L[ x ( t )] = x ( t )e − st dt
Cn = T
∫
δ T (t )e jkωs t
dt =
T ∫
δ T (t )e jkω s t
dt =
T ∫
δ T (t )dt =
T ∫
−T / 2 0− 0− 0
+∞
1
The frequency spectrum of x * ( t ) : X* ( jω ) =
T
∑ X [ j(ω + kω s )]
k =− ∞
X ( jω ) X * ( jω )
Filter ω max
−ω max ω max
ω ω Only: ω s ≥ 2ω max
ωs X ( jω ) could be
Frequency −ω max
2ω s reproduced
spectrum of x(t)
Frequency spectrum of x*(t)
Sampling theorem ( Shannon’s theorem)
If the analog signal could be whole restituted from the sampling signal, the sampling
frequency ω must satisfy
s
π
ω s ≥ 2ω max or T ≤
ω max
here : ω max → the maximu m frequenc y of the analog signal .
T → sampling period .
ωs → sampling frequency , ω s = 2π T .
Hold Operation
Usually the controlled process require the analog signals, so we need a discrete-to-analog converter. So it is an
inverse process of sampling operation.
The commonly used solution of this problem is POLYNOMIAL EXTRAPOLATION. Using Taylor’s series expansion
about t=kT, ya(t) can be expressed as:
&y&a (kT )
ya (t ) = ya (kT ) + y& a (kT )(t − kT ) + (t − kT ) 2 + L, kT ≤ t ≤ (k + 1)T
2!
dya (t ) 1
y& a (kT ) = ≅ [ ya (kT ) − ya ((k − 1)T )]
dt t = kT T
d 2 ya (t ) 1 1
&y&a (kT ) = 2
≅ [ &
y a ( kT ) − &
y a (( k − 1)T ) ] = 2
[ ya (kT ) − 2 ya ((k − 1)T ) + ya ((k − 2)T )]
dt t = kT
T T
Hold Operation
Zero-order hold (zoh):
If only the first term in Taylor’s series is used to construct ya(t), then the data hold is called a ZERO-ORDER HOLD (zoh).
ya (t ) = ya (kT ), kT ≤ t ≤ (k + 1)T
First-order hold (foh):
If the first two terms in Taylor’s series is used to construct ya(t), then the data hold is called a FIRST-ORDER HOLD (foh).
(t − kT )
ya (t ) = ya (kT ) + [ ya (kT ) − ya ((k − 1)T )], kT ≤ t ≤ (k + 1)T
T
The higher order approximation of the signal introduces time delay in the control circuitry which has got adverse
effects on the stability of the feedback control system. Thus normally zoh is used to hold the data within sampling
intervals.
ya*(t)
ya(t)
yh(t)
Zero-order hold
S/H System
T
xa(t) x*(t) ya(t)
zoh
δT(t) gho(t)
1
The unit impulse (δT) response of zoh is a unit pulse (gho(t)) of
1
zoh width T.
t t
0 T
∞ T
1 − e −Ts
∫
Gho ( s ) = L[g ho (t )] = g ho (t )e ∫
The Laplace transform of the impulse response gho(t) − st − st
dt = e dt =
is the transfer function of the hold operation. s
0 0
T
Xa(s) 1 − e −Ts Ya(S)
Gho ( s) =
∞ s
*
X (s) = ∑ x(kT )e −skT
k =0
Practical S/H Circuit
-
- Vout
+
Vin +
Hold
Capacitor
Control
S/H Pulse Logic
The OPAMP’s are used as a buffer to the analog circuit and also isolates the main
circuit from the capacitor’s effect on the driving waveform.
Sampled Spectra
If xa(t) be a continuous time signal, its spectrum is then given by Xa(jw), where w is the frequency in
rad/sec. Now the discrete sequence x(k) with values x(k) = xa(kt) is derived from xa(t) by periodic
sampling. The spectrum of x(k) is given by X(ejΩ), where Ω is frequency in rad/sample interval. Thus,
∞ ∞
X a ( jw) = ∫ xa (t )e
− jwt
and X (e jΩ
)= ∑ x(k )e − jΩk
−∞ k = −∞
∴ X (e jΩ ) = X * ( jw) Ω
w=
T
Contd.
X(ejΩ) is thus a frequency scaled version of X*(jw) with the frequency scaling Ω=wT. We know that
+∞ 2πkt
1 j
x * (t ) = xa (t ) ⋅
T
∑e T
k = −∞
The continuous time spectrum of x*(t) is
∞ ∞ ∞ j
2πkt
1 xa (t )e T e − jwt dt
∫ ∫ ∑
− jwt
X * ( jw ) = x * (t )e dt =
T
−∞ − ∞ k = −∞
∞
∞ 2πk
1 j w− t
1 ∞ 2πk
∑ ∫
∑
T
= x (t ) e dt = X jw − j
T k = −∞ T
a a
−∞ k = −∞ T
Where, Xa(jw) is the FT of xa(t).
Contd.
So, X*(jw) consists of periodically repeated copies of Xa(jw) scaled by 1/T. The
scaled copies of Xa(jw) are shifted by integer multiple of sampling frequency
ws=2π/T and then superimposed to produce X*(jw).
* Ω 1 ∞ Ω 2πk
X (e jΩ
)= X j =
T T
∑ Xa j −
T T
k = −∞
Aliasing
While sampling a continuous time signal xa(t)
to produce the sequence x(k) with values x(k) =
xa(kT), we want to ensure that all the information Plot of Xa(jw)
in the original signal is retained in the samples.
There will be no information loss if we can
exactly recover the continuous time signal from
the samples.
To determine the condition under which there Plot of X*(jw)
is no information loss, let us take xa(t) to be a
band limited signal with maximum frequency wm
i.e.
Freq. scaled
X a ( jw) = 0, for w > wm version of X*(jw)
Contd.
The continuous time signal xa(t) can be recovered from its samples x(k) without any distortion by
employing an ideal low-pass filter.
ws π
If = < wm then shifted version of X*(jw) overlap.
2 T
π
X*(jw) in the range w ≤ can be viewed as being found by superimposing onto
this frequency range. T
Folding Frequency
= π/T
Example of Information Loss due to SAMPLING
π
ω s ≥ 2ω max or T ≤
ω max
here : ω max → the maximu m frequenc y of the analog signal .
T → sampling period .
ωs → sampling frequency , ω s = 2π T .
Reconstruction of Analog Signal: Filtering
π π
Xa(jw) has the same form as the un-aliased spectrum of X*(jw) over − ≤w≤
T T
Xa(jw) can be recovered from X*(jw) by a low-pass filter.
π π The ideal low pass filter has a zero phase characteristics. Thus
G ( jw ) = T , for − ≤w≤
T T any signal whose frequency components are totally within the
= 0, otherwise pass band of the filter be passed undistorted.
The impulse response of the ideal low pass filter is given by:
πt
∞ ∞ πt −j
πt sin
1 1 T jT T
2π ∫ 2π ∫
jwt jwt
g (t ) = G ( jw ) e dw = Te dw = e −e T =
j 2πt πt
−∞ −∞
T
This characteristics of low pass filter is physically unrealizable as g(t) has got some finite value as t<0.
Use of ZOH
1 − e −Ts
The transfer function of ZOH will be Gho ( s ) =
s
Its frequency response will be
wT
T sin wT
1 − e − jwT 2 −j 2
Gho ( jw) = = e
jw wT
Now, 2
Gho ( jw) = Gho ( jw) ∠Gho ( jw)
wT
sin
Gho ( jw) = T 2
wT
2
wT 2πk
∠Gho ( jw) = − − 180o at w = , k = 1,2,L
2 T
Characteristics of ZOH
• The ZOH begins to attenuate at frequencies considerably
below ws/2.
• The ZOH allows high frequency to pass through, although they
are attenuated.
• As a consequence of shifting property the linear phase
characteristics introduces a time delay of T/2, thus degrades
the degree of system stability.
Anti-aliasing Filter
• In practice, signals in control system have frequency spectra
consisting of low frequency as well as high frequency noise
components.
• Due to aliasing effect high frequency noise will be folded in
and will corrupt the low frequency signal containing the
desired information.
• To avoid aliasing, we must either chose the sampling frequency
high enough or use an ‘anti-aliasing’ filters ahead of the
sampler.
Anti-aliasing Filter
• Anti-aliasing filters are analog filters used to ‘reshape’ the frequency spectrum
of the signal before the signal is sampled.
digital controller
clock
anti-
y(kT)
A/D aliasing sensor
T filter
State Variable Analysis of
Digital Control System
State Variable Analysis of Digital Control System
• The state model of LTI SISO system with n state variable
X(k)=[x1(k) x2(k) … xn(k)]T is as follows:
X (k + 1) = FX (k ) + gu (k ); X (0) = X 0
y (k ) = CX (k ) + du (k )
where
f11 f12 L f1n g1
f L f 2n g
21 f 22
F= g = 2
M M L M M
f n1 f n 2 L f nn n×n g n n×1
C = [c1 c2 L cn ]1×n d = [d ]1×1
Conversion of State Model to Transfer Function
X (k + 1) = FX (k ) + gu (k ); Thus, the Trnsfer fn.
zX ( z ) − zX 0 = FX ( z ) + gU ( z ) Y ( z)
G( z) = = C ( zI − F ) −1 g + d
U ( z)
Now, X 0 = 0 for Transfer fn.
CAdj( zI − F ) g
∴ zX ( z ) = FX ( z ) + gU ( z ) G( z) = +d
zI − F
( zI − F ) X ( z ) = gU ( z )
X ( z ) = ( zI − F ) −1 gU ( z ) | λI – F | = 0 is the characteristic equation of the system in
z-domain and provides the pole locations in z-plane.
Now, y (k ) = CX (k ) + du (k )
Y ( z ) = CX ( z ) + dU ( z )
Y ( z ) = C ( zI − F ) −1 gU ( z ) + dU ( z )
State Modelling in Digital Domain
• A z-domain transfer fn. may be transformed into state space
model. The transfer fn. of an nth order SISO system will be
C = [0 0 L 1]1×n d = [β 0 ]1×1
e2 (k + 1) + ae2 (k ) = be1 (k )
The state model of the plant is given by
X& = AX + Bu
y = Cx Obtain discrete-time state description for the closed-loop system.
0 1 0
A , B = , C [1 0]
0 − 1 1
0 1
A
0 − 1
1 1
s ( s + 1) 1 1 − e
−t
[
∴ e At = L−1 ( sI − A) −1 ] −1 s
=L =
1 0
0 e −t For T = 1 Sec.
( s + 1)
1 0.632 0.368
The discretized state equation of the plant is F= , g = 0.632
0 0.368
X (k + 1) = FX (k ) + gu (k )
1 1 − e −T
AT
where, F = e = −T
0 e
T T
1 1 − e −θ 0 T
1 − e −θ T − 1 + e −T
g = ∫ e Bdθ = ∫
Aθ
−θ
dθ = ∫ −θ dθ = −T
0 0 0 e 1 0 e 1 − e
r(t) e1(t) e1(k) Digital e2(k) u+(t) y(t)=x1
zoh Plant
+ T=1 Sec. controller
-
x1 (k + 1) 1 0.632 x1 (k ) 0.368
x (k + 1) = 0 0.368 x (k ) + 0.632 e2 (k )
2 2
e2(k) may be taken as the 3rd sate variable x3(k) whose dynamics are given by
x3 (k + 1) = −ax3 (k ) + be1 (k ) = −ax3 (k ) + b(r (k ) − x1 (k )) = −bx1 (k ) − ax3 (k ) + br (k )