You are on page 1of 28

Digital and Non-Linear Control

Digital System Frequency Response and Modeling

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.

• Successful digital data processing requires that the


samples reflect the nature of the analog signal and that
analog signals be recoverable from a sequence of samples.

3
Sampling Theorem
• Following figure shows two distinct waveforms with
identical samples.

• Obviously, faster sampling of the two waveforms would


produce distinguishable sequences.

4
Sampling Theorem
• The
  band limited signal with
 

• can be reconstructed from the discrete-time waveform


  ∞

𝑓 ( 𝑡 )= ∑ 𝑓 ( 𝑡 ) 𝛿(𝑡 − 𝑘𝑇 )
𝑘 =−∞
• if and only if the sampling angular frequency satisfies (so
sampling frequency needs to double the required
reconstruction frequency)
𝜔 𝑠 >2 𝜔 𝑚
 
5
Selection of Sampling Frequency
•• A  general signal often has a finite “effective bandwidth” beyond
which its spectral components are negligible.

• This allows us to treat physical signals as band limited and choose


a suitable sampling rate for them based on the sampling theorem.

• In practice, the sampling rate chosen is often larger than the lower
bound specified in the sampling theorem.

• A rule of thumb is to choose as

𝜔 𝑠= 𝑘 𝜔𝑚 , 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)

• The ADC can be modeled as an ideal sampler with


sampling period T.
T

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)

• The input-output relationship of the DAC is given by

 𝑢 ( 𝑘 ) 𝑍 𝑂𝐻 𝑢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.

• A pulse can be represented as a positive step at time zero


followed by a negative step at time 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
  𝐺 (𝑠)  − 𝐺(𝑠 )   𝑒− 𝑇𝑠
𝐺𝑍𝐴 ( 𝑠 ) =
𝑠

  𝐺 (𝑠) 𝐺 (𝑠)   𝑒−𝑇𝑠


𝐺𝑍𝐴 ( 𝑠 ) = −
𝑠 𝑠
• The impulse response is the analog system step response
minus a second step response delayed by one sampling
period.

18
DAC and Analog Subsystem

  𝐺 (𝑠) 𝐺 (𝑠)   𝑒−𝑇𝑠


𝐺 𝑍𝐴 ( 𝑠 ) = −
𝑠 𝑠

19
DAC and Analog Subsystem

•     𝐺 (𝑠) 𝐺 (𝑠)   𝑒−𝑇𝑠


𝐺 𝑍𝐴 ( 𝑠 ) = −
𝑠 𝑠
• Inverse Laplace yields

𝑔𝑍𝐴 ( 𝑡 )=𝑔𝑠 (𝑡 )− 𝑔 𝑠 (𝑡 −𝑇 )
 

• Where

20
DAC, Analog Subsystem, and ADC Combination
Transfer Function
𝑔𝑍𝐴 ( 𝑡 )=𝑔𝑠 (𝑡 )− 𝑔 𝑠 (𝑡 −𝑇 )
 

• The analog response is sampled to give the sampled impulse


response (ADC part)

𝑔𝑍𝐴 ( 𝑘𝑇 )=𝑔 𝑠 (𝑘𝑇 ) − 𝑔𝑠 ( 𝑘𝑇 −𝑇 )


 

• By z-transform, we can obtain the z-transfer function of the


DAC (zero-order hold), analog subsystem, and ADC (ideal
sampler) cascade.
21
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.

• Having made this point, the equation can be rewritten more


conveniently as
𝐺 (𝑠)
 
−1
𝐺 𝑍𝐴𝑆 ( 𝑧 ) =(1 − 𝑧 )Z
𝑠 [ ] 22
Example 2
• Find GZAS(z) for the transfer function of the system given as
  𝑉 ( 𝑠) 1
𝐺 ( 𝑠 )= =
𝑈 (𝑠) 𝑀𝑠 +𝑏
Solution
• Rewrite transfer function in standard form
  𝐾 𝐾 /𝜏
𝐺 ( 𝑠 )= =
𝜏 𝑠+1 𝑠+1/ 𝜏

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

You might also like