Sunteți pe pagina 1din 77

Digital Control Systems

Dr. K. Das Sharma


Department of Applied Physics
University of Calcutta
Introduction
Comparison between ACS and CCS

2
A typical computer-controlled system
Computer
Synchronization
Clock

{y(tk)} {u(tk)} u(t) y(t)


A-D Algorithm D-A Process
a sequence of numbers

Schematic diagram of a computer-controlled system

3
ACS CCS

Process Process
Actuator Actuator
Structure:
Measure Measure
Controller (correcting network) Controller (digital computer)
Adapter (A/D, D/A)

Parts: Analog Analog + Digital

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

Sampler —the device which fulfill the sampling.


T
Another name —the sampling switch — which works like a switch

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:

r(t) e(t) e*(t) u*(t) u (t) c(t)


A/D computer D/A process

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 (k ) = r (0)δ (k ) + r (1)δ (k − 1) + r (2)δ (k − 2) + ... 1


∞ k

= ∑ r (n)δ (k − n) 0 2 4

n =0
Unit Step Sequence:
µ(k)
µ (k ) = 1, for k ≥ 0 1
= 0, otherwise k
0

Delayed Unit Step Sequence:


µ(k-n)
µ (k − n) = 1, for k ≥ n 1
= 0, otherwise k
0 n

Sinusoidal Sequence: cos(Ωk)µ(k)

r ( k ) = A cos(Ωk + φ ) µ (k ) k
0
Basic building blocks of LTI discrete time system:

x(k) ax(k) Discrete time First Order System:


Scalar Block: a
r(k) x(k+1) x(k)
+
Adder Block: x1(k) x1(k)+x2(k) +
+
ax(k)
+
x2(k)
a

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

• Impulse Response Model

• Transfer Function Model

• State Space Model


Difference Equation Model
• The i/p-o/p relationship for k ≥ 0 , a LTI discrete time system
composed of n dynamic elements can be analyzed using a
single nth order difference equation as its model as:
y (k + n) + a1 y (k + n − 1) + a2 y (k + n − 2) + L + an y (k )
= b0 r (k ) + b1r (k − 1) + L + bm r (k − m)

with initial condition: {y (−1), y (−2),L, y (−m)}


Impulse Response Model
• For a LTI, initially relaxed system {y(k ) = 0, for k < 0} , let, g (k ) be
the response to an impulse δ (k ) .

• Due to time invariance property, the response to δ (k − n) will be


g ( k − n)

• Thus, the impulse response of a system:


y (k ) = r (0) g (k ) + r (1) g (k − 1) + r (2) g (k − 2) + L

= ∑ r ( j ) g (k − j ), k ≥ 0
j =0
Impulse Response Model
• As the control system is always a ‘Causal’ system
k
y (k ) = ∑ r ( j ) g (k − j ), k ≥ 0
j =0
0
= ∑ r (k − m) g (m), [as k − j = m]
m=k
k
y ( k ) = ∑ g ( m) r ( k − m)
m=0
Transfer Function Model:
z – Transform (Brief Idea)

• We know that, F ( z ) ≡ Ζ[ f (k )] ≡ ∑ f (k ) z −k , where, z = re jΩ , a complex
k =0
variable.
x(t ) X (z)
x(t ) X ( s) X (z) z z (1 − e −αT )z
δ (t ) 1 1 1 − e −αt − =
z − 1 z − e −αT ( z − 1)(z − e −αT )
1 z
1( t )
s z−1 Tz Tze−αT
Tz te −αt =
t 1 ( z − 1) z = zeαT ( z − e −αT )2
2
s2 ( z − 1) 2
z z
e −α t
1 z ak =
s +α z − e −α T z − 1 z= z z − a
ω z sin ω T a
sin ω t
s2 + ω 2 z 2 − 2 z cos ω T + 1 d Tz T 2 z( z + 1)
t2 − Tz =
s z ( z − cos ω T ) dz ( z − 1)2 ( z − 1)3
cos ω t
s2 + ω 2 z 2 − 2 z cos ω T + 1 δ (t − mk ) z −m
Relation of f(t), F(s), F(z) and f(kt)
z – Transform: Shifting Theorems
• Shifting Theorem: Advance (Forward Shift)
∞ ∞
Ζ[ y (k + 1)] = ∑ y(k + 1) z −k
= z ∑ y ( k + 1) z −( k +1)
k =0 k =0
∞  ∞ 
Let, k + 1 = m, ⇒ Ζ[ y ( k + 1)] = z ∑ y ( m) z −m
= z  ∑ y ( m) z − m − y (0)  = zY ( z ) − zy (0)
m =1 m =0 
∴ Ζ[ y ( k + n)] = z nY ( z ) − z n y (0) − z n −1 y (1) − L − z 2 y (n − 2) − zy ( n − 1)

• 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

• The impulse response of a LTI relaxed system is



y (k ) = ∑ r ( j ) g (k − j ), k ≥ 0
j =0

taking the z-Transform of the equation


∞ ∞ ∞  −k ∞ ∞
Y ( z ) ≡ Ζ[ y (k )] = ∑ y (k ) z −k
= ∑ ∑ r ( j ) g (k − j ) z ⇒ Y ( z ) = ∑ r ( j ) z ∑ g (k − j )z −( k − j )
−j

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

• From the model of the unit delayer,


x2 (k + 1) = x1 (k ), for x2 (0) = 0
∴ X 2 ( z ) = z −1 X 1 ( z )

• Thus, the transfer function:


X 2 ( z)
G( z) = = z −1
X1( z)
Example
0.05
z-1
X(z) +
R(z) Y(z)
+ 0.0475 +
+

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)

RG1 ( z )G2 ( z )G3 ( z )


C (z) =
1 + G2 ( z )G3 H 1 ( z ) + G2 ( z )G1G3 H 2 ( z )
Time-domain analysis of the sampling systems
The stability condition
The characteristic equation of the sampling control systems:

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

unstable zone Stable zone


The stability criterion

In the characteristic equation 1+GH(z)=0, substitute z with


w +1 —— W (bilinear) transformation.
z=
w −1

 Proof : suppose w = α + jβ , z = x + jy , then : 


 
 z + 1 x + jy + 1  x − 1 − jy  x2 + y2 − 1 2y 
 w = α + j β = = ⋅ 
 x − 1 − jy  = 2 2
− j 
 z − 1 x + jy − 1   ( x − 1) + y ( x − 1) 2 + y 2 
 2 2 2 2 
 α ≤ 0 ⇒ x + y − 1 ≤ 0 ⇒ x + y ≤1 
 ( for the left half of the w-plane ) ⇒ ( inside the unit circle of the z-plane ) 
 
Example

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)

Z.o.h —Zero-order hold. K


T = 1s G( s) =
1) Determine K for the stable system. s ( s + 5)
2) If r(t) = 1+t, determine ess=?

Solution
1)
 KTz Kz Kz 
 1 − e −Ts K  −1 5 5 25 
G( z ) = Z  ⋅  = (1 − z ) − + 
+  ( z − 1) 2 z − 1 z − e −5T
 s s ( s 5 )    T =1
 K  2
= (1 − e −Ts ) Z  2  K z − 2.2067 z + 0.2135
≈ − ⋅
 s ( s + 5)  5 ( z − 1)( z − 0.0067)
K −K K 
= (1 − e ) Z  2 +
−Ts 5 5 + 25 
 s s s+5
 
The charecteristic equation of the system :
K z 2 − 2.2067 z + 0.2135
1 + G( z ) = 1 − ⋅ =0
5 ( z − 1)( z − 0.0067 )
(5 -K ) z 2 + ( 2.2067 K − 5.0335) z + (0.0335 − 0.2135 K ) = 0
w +1
z= ⇒ 0.9932 w + (9.993 − 1.573 K )w + (10.067 − 2.4202 K ) = 0
w −1
0 < K < 4.16
K z 2 − 2.2067 z + 0.2135
2) K *p = lim G ( z ) = lim ⋅ =∞
z →1 z →1 5 ( z − 1)( z − 0.0067)
K z 2 − 2.2067 z + 0.2135
K v* = lim ( z − 1)G ( z ) = lim − ⋅ ≈ 0.2 K
z →1 z →1 5 ( z − 0.0067)
1 T T 5
e ss = + = 0+ =
1 + K *p K v* 0.2 K T=1 K
Stability Analysis in Z-plane
Consider a discrete time system as:
For r (t ) = δ (t ) ⇒ R ( z ) = 1
Y ( z) z
= G( z) = 2 z
R( z ) z + a1 z + a2 ∴Y ( z ) = 2
z z + a1 z + a2
Y ( z) = 2
R( z )
z + a1 z + a2
Y(z)
R(z) +
z-1 z-1
+
+
-a1
+
-a2
Contd.
The impulse response of the system is given by:


−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 )

The response is solely dependent on the values of α1 and α2.


Contd.
For the complex conjugate pole pair at z=p=rejΩ and z=p*=re-jΩ of Y(z),
the response y(k) is obtained as:
Y ( z) A A* *
= + *
, where A = A ∠ϕ and A is complex conjugate of A
z ( z − p) ( z − p )
The impulse response of the system is given by:
k * * k
y (k ) = A( p) + A ( p ) = A( p) + A( p ) k
[ ]
k *
Thus, the complex conjugate pole pair
[ ] [
= 2 Re A( p ) k = 2 Re A e jϕ r k e jΩk ] give rise to a sinusoidal or oscillatory
response function rkcos(Ωk+φ) whose
[
= 2 A r k Re e j ( Ωk +ϕ ) ] envelop rk can be constant, growing or
decaying depending on whether
y (k ) = 2 A r k cos(Ωk + ϕ )
r=1, r>1 or r<1 respectively.
Nature of response fn. αk for different values of α.
Im

1
Re

Im

1
Re

Nature of response fn. rkcos(Ωk+φ) for different values of r.


The Jury’s Stability Test
• The characteristic equation D(z)=0 gives the idea about the stability of the system
according to Jury’s criterion.
Let, D ( z ) = a0 z n + a1 z n −1 + L + ak z n − k + L + an −1 z + an , a0 > 0

z0 z1 z2 L zk L z n−2 z n −1 zn Jury’s Table


1 an a n −1 an−2 L an − k L a2 a1 a0 1. 1st row is the coefficients of ‘z’ in
ascending order of power & 2nd row
2 a0 a1 a2 L ak L an −2 a n −1 an is the reverse of that.
3 bn −1 bn − 2 bn −3 L bn −k −1 L b1 b0 ×
2. All even numbered row are simply
4 b0 b1 b2 L bk L bn − 2 bn −1 × the reverse of the immediately
5 cn − 2 c n −3 cn − 4 L c n − k − 2 L c0 × × preceding odd numbered rows.
6 c0 c1 c2 L ck L cn − 2 × ×
7 M M M L M L M M M
The Jury’s Stability Test
3. The elements for row 3 through (2n-3) by the following determinants:
an an −1− k
bk = , k = 0,1,2, L, (n − 1)
a0 ak +1
bn −1 bn − 2− k
ck = , k = 0,1,2, L, ( n − 2)
b0 bk +1

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.

y(k) Discrete-to-analog ya(t) D/A conversion


converter

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 = −∞

Now, x*(t) -> the impulse modulated xa(t).


∞ ∞
∞ 
[ *
]
FT x (t ) = X ( jw) = *
∫ x (t )e
* − jwt
dt = ∫ ∑ x(k )δ (t − kt )e − jwk dt
−∞ − ∞ k = 0 
∞ ∞ ∞
= ∑ ∫ δ (t − kt ) x(k )e
k = −∞ − ∞
− jwt
dt = ∑ x(k )e
k = −∞
− jwT

∴ 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).

So, the relation between the spectrum of xa(t) and x(k) is

* Ω 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

Frequency folding phenomenon

Folding Frequency
= π/T
Example of Information Loss due to SAMPLING

Sampled signal looks like a sinusoidal of a lower frequency


Sampling theorem Revisited
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 .
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.

Ideal 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

r(t) r(kT) e(kT) control: u(kT) D/A and u(t) y(t)


plant
difference hold
T + G(s)
equations
-

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

Y ( z ) β 0 z n + β1z n −1 + ... + β n −1z + β n


G( z) = =
U ( z) z n + α1z n −1 + ... + α n −1z + α n
First Companion Form /
Controllable Canonical Form (CCF)
X (k + 1) = FX (k ) + gu (k ); X (0) = X 0
y (k ) = CX (k ) + du (k )
where
 0 1 0 ... 0 
 0  0 
 0 1 ... 0  0 
F= M M M M M  g= 
  M
 0 0 0 ... 1   
− α n − α n −1 − α n − 2 ... − α1  1 n×1
n× n
C = [β n − α n β 0 β n −1 − α n −1β 0 L β1 − α1β 0 ]1×n d = [β 0 ]1×1

The system realization is same as continuous time state modelling.


Second Companion Form /
Observable Canonical Form (OCF)
X (k + 1) = FX (k ) + gu (k ); X (0) = X 0
y (k ) = CX (k ) + du (k )
where
0 0 ... 0 − αn 
1  βn − α n β0 
 0 ... 0 − α n −1  β 
− α β
F = 0 1 ... 0 − α n − 2  g= n −1 n −1 0 
   M 
M M ... M M   
 β − α β
1 0  n×1
0 0 ... 1 − α1  n×n
1

C = [0 0 L 1]1×n d = [β 0 ]1×1

The system realization is same as continuous time state modelling.


Parallel Decomposition Form /
Jordan Canonical Form (JCF)
X (k + 1) = FX (k ) + gu (k ); X (0) = X 0 Case-II: For repeated eigen values
y (k ) = CX (k ) + du (k )
λ1 1 0 ... 0  0
0 λ 1 ... 0  0
Case-I: For distinct eigen values  1
0   
M M M M M  M
λ1 0 ... 0  1
 0 λ ... 0  1 F =0 0 0 0 λ1
 g = 1 
  1 
F = 2  g=   λm +1 ... 0 
 
M M M M M  
   
0 M ... M
 M
 0 0 0 λ n  n× n 1 n×1 1 n×1
 0 ... λn  n×n
C = [r1 r2 L rn ]1×n d = [β 0 ]1×1
C = [r11 r12 L r1m rm +1 ... rn ]1×n d = [β 0 ]1×1

The system realization is same as continuous time state modelling.


State Description of Sample Data System
u(k) u+(t) y(t) y(k)
zoh
Discrete Continuous Discrete
Time Time Sampler Time
System System System

Equivalent Discrete-Time System

The continuous time system has the state model as:


& +
X (t ) = AX (t ) + Bu (t ) Now, we use zoh, so

y (t ) = CX (t ) + Du + (t ) u + (t ) = u (kT ), kT ≤ t ≤ (k + 1)T , k = 0,1,2,...


The solution of the state equation is as (considering D=0): t 
A(t − kT ) −τ
t
∴ X (t ) = e X (kT ) +  ∫ e A( t )
Bdτ u (kT )
X (t ) = e A(t −t0 ) X (t0 ) + e A(t −τ ) Bu + (τ )dτ
∫ kT 
t0
Contd.
In response to the u(kT), the state settles to the value X((k+1)T) prior to the application of the input u((k+1)T), where,
( k +1)T 
+ −τ
X ((k + 1)T ) = e X (kT ) + 
AT
∫ e A(( k 1)T )
Bdτ u (kT ) So, the state description of the
 kT  sample data system is:
 
= FX (kT ) + Gu (kT )
Let, σ = τ − kT , X (k + 1) = FX (k ) + Gu (k )
T y (k ) = CX (k ) + Du (k )
G = ∫ e A(T −σ ) Bdσ
0 Where,
if, θ = T − σ
F = e AT
T
G = ∫ e Aθ Bdθ T
0 G = ∫ e Aθ Bdθ
and, y (kT ) = CX (kT ) + Du (kT ) 0
Example
Consider a closed loop computer controlled system. The digital controller is described by the difference equation:

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

r(t) e1(t) e1(k) Digital e2(k) u+(t) y(t)=x1


zoh Plant
+ T=1 Sec. controller
-
r(t) e1(t) e1(k) Digital e2(k) u+(t) y(t)=x1
zoh Plant
+ T=1 Sec. controller
-

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θ = ∫ 

−θ   
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
-

So, the plant described by the state equation

 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 )

 x1 (k + 1)   1 0.632 0.368  x1 (k )  0


 x2 (k + 1) =  0 0.368 0.632  x2 (k ) + 0 r (k )
From the above calculation, the state model for       
the closed-loop digital system x
 2 ( k + 1) 
 − b 0 − a   3  b
  x ( k )
 x1 (k ) 
y (k ) = [1 0 0] x2 (k )
 
 x3 (k ) 
At the end…
• Thus the digital control enhance the capability of the controllers.
• The basic concept of stability issues and characteristics are same
as continuous type system, but the calculations are to be done in
z-domain instead of s-domain.
• The state variable approach of analysis and design of controllers
are also equally applicable to digital control systems.
• Application of intelligent control strategies can easily be applied
to digital control system.

S-ar putea să vă placă și