Digital Control System Modelling
Digital Control System Modelling
1
Lecture Outline
• Sampling Theorem
• Frequency Response
• ADC Model
• DAC Model
• Combined Models
2
Sampling Theorem
• Sampling is necessary for the processing of analog data
using digital elements.
3
Sampling Theorem
• Following figure shows two distinct waveforms with
identical samples.
4
Sampling Theorem
• The
band limited signal with
• In practice, the sampling rate chosen is often larger than the lower
bound specified in the sampling theorem.
𝜔 𝑠= 𝑘 𝜔𝑚 , 5 ≤ 𝑘 ≤ 10
6
Frequency Response
• Consider
a transfer function of an LTI system.
For the discrete input , the steady state output
is .
• In other words, setting in gives magnitude
and phase change. Refer to page 40-41 in the
textbook.
7
Example 1
• Compute
the steady state response for the
following system due to the sampled
sinusoidal
• Set , so the steady state response is
8
Digital Control System Modeling
• A common configuration of digital control system is shown in
following figure.
9
ADC Model
• Assume that
– ADC outputs are exactly equal in magnitude to their inputs
(i.e., quantization errors are negligible)
– The ADC yields a digital output instantaneously
– Sampling is perfectly uniform (i.e., occur at a fixed rate)
u(t) u*(t)
t t
0 0
10
Sampling Process
T
u(t) u*(t)
u*(t)
u(t)
δT(t)
× =
t t t
0 0 0
Modulation modulating modulated
signal pulse(carrier) wave
u (t ) u (t ) (t kT )
*
k 0
DAC Model
• Assume that
– DAC outputs are exactly equal in magnitude to their inputs.
– The DAC yields an analog output instantaneously.
– DAC outputs are constant over each sampling period (ZOH).
u(k)
u(t)
uh(t)
𝑢 ( 𝑘 ) 𝑍 𝑂𝐻 𝑢h ( 𝑡 ) ,𝑘𝑇 ≤ 𝑡 ≤ ( 𝑘 +1 ) 𝑇
→ 12
DAC Model
• Unit impulse response of ZOH
13
DAC Model
• As shown in figure the impulse response is a unit pulse of
width T.
• Using the Laplace transform of a unit step and the time delay
theorem for Laplace transforms,
1 𝑒− 𝑇𝑠
L { 𝑢(𝑡 ) } = L { −𝑢(𝑡 −𝑇 ) }=−
𝑠 𝑠 14
DAC Model
1 𝑒− 𝑇𝑠
L { 𝑢(𝑡 ) } = L { −𝑢(𝑡 −𝑇 ) }=−
𝑠 𝑠
• Thus, the transfer function of the ZOH is
1− 𝑒− 𝑇𝑠
𝐺 𝑍𝑂𝐻 (𝑠 )=
𝑠
15
DAC, Analog Subsystem, and ADC Combination
Transfer Function
• The cascade of a DAC, analog subsystem, and ADC is shown in
following figure. The time difference between the negative
step and positive step is T.
16
DAC and Analog Subsystem
• Using the DAC model, and assuming that the transfer function
of the analog subsystem is G(s), the transfer function of the
DAC and analog subsystem cascade is
𝐺
𝑍𝐴 ( 𝑠 ) =𝐺 𝑍𝑂𝐻 (𝑠)𝐺(𝑠)
1 − 𝑒−𝑇𝑠
𝐺 𝑍𝐴 ( 𝑠 ) = 𝐺 ( 𝑠)
𝑠
17
DAC and Analog Subsystem
1 − 𝑒−𝑇𝑠
𝐺 𝑍𝐴 ( 𝑠 ) = 𝐺 ( 𝑠)
𝑠
• The corresponding impulse response is
𝐺 (𝑠) − 𝐺(𝑠 ) 𝑒− 𝑇𝑠
𝐺𝑍𝐴 ( 𝑠 ) =
𝑠
18
DAC and Analog Subsystem
19
DAC and Analog Subsystem
𝑔𝑍𝐴 ( 𝑡 )=𝑔𝑠 (𝑡 )− 𝑔 𝑠 (𝑡 −𝑇 )
• Where
20
DAC, Analog Subsystem, and ADC Combination
Transfer Function
𝑔𝑍𝐴 ( 𝑡 )=𝑔𝑠 (𝑡 )− 𝑔 𝑠 (𝑡 −𝑇 )
• Z-Transform is given as
𝐺 (𝑠)
𝐺
𝑍𝐴𝑆 ( 𝑧 ) =(1 − 𝑧
−1
)Z { 𝑠
𝑔
❑∗
(𝑡 )
} 𝑔𝑠 ( 𝑡 ) =L−1
∗
{ 𝑠 }
𝐺 𝑍𝐴𝑆 ( 𝑧 ) =(1 − 𝑧 −1 )Z L−1
[ { }] 𝐺 ( 𝑠)
𝑠
• The * in above equation is to emphasize that sampling of a
time function is necessary before z-transformation.
23
Example 2
• 𝐾 /𝜏
𝐺 ( 𝑠 )=
𝑠+1/ 𝜏
• Where and
• Now we know
𝐺 (𝑠)
• Therefore,
−1
𝐺 𝑍𝐴𝑆 ( 𝑧 ) =(1 − 𝑧 )Z
𝑠[ ]
𝐺 ( 𝑠 ) 𝐾 /𝜏
=
𝑠 𝑠( 𝑠+1 / 𝜏 )
• The corresponding partial fraction expansion is
𝐺 ( 𝑠 )
𝐾 𝜏 𝜏
𝑠
=
𝜏 ( )[ −
𝑠 𝑠+1/ 𝜏 ] 24
Example 2
𝐾 𝜏 𝜏
𝐺 𝑍𝐴𝑆 ( 𝑧 ) =z (1− 𝑧 ) Z
−1
[( ){
𝜏
−
𝑠 𝑠+1 / 𝜏 }]
• Using the z-transform table, the desired z-domain transfer
function is
1 1
𝐺 𝑍𝐴𝑆 ( 𝑧 ) =(1 − 𝑧 −1
[ {
)Z 𝐾 −
𝑠 𝑠+1/ 𝜏 }]
𝑧 −1 𝑧 𝑧
𝐺 𝑍𝐴𝑆 ( 𝑧 ) =
𝑧 [ {
𝐾
𝑧−1
−
𝑧−𝑒
−𝑇/𝜏 }]
𝑧 −1
𝐺 𝑍𝐴𝑆 ( 𝑧 ) = 𝐾 1−
{
𝑧 −𝑒
−𝑇 / 𝜏 } 25
Example 3
• Find GZAS(z) for the transfer function of the system given as
𝑌 ( 𝑠) 1
𝐺 ( 𝑠 )= =
𝑈 (𝑠) 𝑠( 𝑀𝑠 +𝑏)
Solution
• Rewrite transfer function in standard form
𝐾 𝐾 /𝜏
𝐺 ( 𝑠 )= =
𝑠( 𝜏 𝑠+1) 1
𝑠 ( 𝑠+ )
𝜏
26
Example 3
• 𝐾 /𝜏
𝐺 ( 𝑠 )=
1
𝑠( 𝑠+ )
• Where and 𝜏
• Now we know
𝐺 (𝑠)
• Therefore,
𝐺 𝑍𝐴𝑆 ( 𝑧 ) =(1 − 𝑧 )Z
−1
𝑠 [ ]
𝐺 ( 𝑠 ) 𝐾/𝜏
= 2
𝑠 𝑠 ( 𝑠+1/ 𝜏)
• The corresponding partial fraction expansion is
𝐺 ( 𝑠 )1 𝜏 𝜏
𝑠
=𝐾 2 − +
𝑠 [
𝑠 𝑠+1/ 𝜏 ] 27
Example 3
• The desired z-domain transfer function can be obtained as
1 𝜏 𝜏
( ) −1
𝐺 𝑍𝐴𝑆 𝑧 =(1 − 𝑧 )Z 𝐾
[ 𝑠
2
− +
𝑠 𝑠+1/ 𝜏 ]
𝑧 −1 𝑧 𝜏𝑧 𝜏𝑧
𝐺 𝑍𝐴𝑆 ( 𝑧 ) =
𝑧
𝐾
( 𝑧 −1)[
2
− +
𝑧 −1 𝑧 − 𝑒−𝑇 /𝜏 ]
1 𝜏 (𝑧 −1)
[ ]
𝐺 𝑍𝐴𝑆 ( 𝑧 ) = 𝐾 −𝜏 +
𝑧 −1 𝑧 − 𝑒− 𝑇 / 𝜏
𝑇 𝑇
[ ( 1− 𝜏 +𝜏 𝑒 ) 𝑧 + [ 𝜏 − 𝑒 ]
]
− −
𝜏 𝜏
(𝜏 +1)
𝐺 𝑍𝐴𝑆 ( 𝑧 ) = 𝐾 −𝑇 / 𝜏
( 𝑧 − 1)( 𝑧 − 𝑒 )
28