Upload
gary-sparks
View
225
Download
5
Embed Size (px)
Citation preview
Echivalarea sistemelor analogice cu sisteme digitale
Prof.dr.ing. Ioan NAFORNITA
An analogic system is composed from circuits
A digital system is a computer algorithm
An analogic
(continuous time) signal
Digital signal, a numerical sequence, obtained by sampling and AD conversion
Constant signal with digital frequency 0 cycles/sample
The maximum digital frequency is 0.5 cycles/sample
There are some “problems” with sampling. The signal
having a 0 digital frequency can be obtained from many
analogic signals
The signal with 0.5 digital frequency can be also
obtained from many analogic signals
Sampling
Sampling – time-domain discretization
The Sampling Theorem
Ideal Sampling.
A sample of x(t) is obtained
multiplying the continuous-time signal x(t) with the rectangular impulse uΔ(t ):
Another sample can be obtained using the same rectangular impulse shifted by kTs.
0x t u t x u t
1
2 2u t t
s s sx t u t kT x kT u t kT
sampling process :
small values of Δ:
ideal sampling of the signal x(t) :
k k
s s sx t u t kT x kT u t kT
0
0
lim
limsT
k ks s s
u t t
u t kT t kT x kT t
ˆsT
ks sx t x t t x kT t kT
sT s s
k
x t x t t x kT t kT
Ideal Sampling
Mathematical model
System model
Spectrum of Ideal Sampled Signal
ideal sampled signal:
the spectrum of the ideal sampled signal :
sT s s
k
x t x t t x kT t kT
ˆsTX x t t F
The Fourier transform of a product is convolution of the Fourier transforms. The Fourier transform of the periodic Dirac’s distribution is also a periodic Dirac’s distribution.
The effect of the convolution of a specified function with the periodic Dirac’s distribution is the periodic repetition of the considered function.
1 2 2ˆ2sT
ks sX x t t X k
T T
F
1 2 1 2ˆk ks s s s
X X k X kT T T T
The spectrum of an ideal sampled signal is the periodic repetition of the spectrum of the original signal. The period is inverse proportional with the sampling step Ts.
s sk
x t x kT t kT
1 2ˆks s
X X kT T
Spectrum of original signal
Spectrum of periodic Dirac distribution
Spectrum of ideal sampled signal
Aliasing error 1 2ˆ
ks sX X k
T T
Sampling Band-limited Signalsx(t)-band-limited
MX if 0
• successive replica of the original signal spectrum are not superimposed and the spectrum of the original signal can be recovered by low-pass ideal filtering for
2s M
Ideal Low-pass Filter
t
tsinthpH c
c
the aliasing error can be avoided.
For perfect reconstruction :
c sM M
2s M Sampling freq.
Cutoff freq for the low pass filter
0r sH T
The frequency response of the reconstruction filter is:
Its response :
with the spectrum:
,
0, c
rc
cs
sT
H T p
c sM M
ˆr rx t x t h t
ˆ
1
r r
kcs s
s
X X H
X k T p XT
, . . .rx t x t a e w
When the condition: is not verified, the aliasing error appears.
M Ms
2 Me
Reconstruction
ˆ
sin
sin
sin
sin2
r r
c
k
c
k
c
k
cc
k s c
s s s
s s s
ss s
s
ss
s
x t h t x t
tT x kT t kT
t
tx kT T t kT
t
t kTx kT T
t kT
t kTx kT
t kT
sinc
cr s r s
tH T p h t T
t
If the finite energy signal x(t) is band limited at ωM , ( X(ω)=0 for |ω | > ωM), it is uniquely determined by its samples if the sampling frequency is higher or equal than twice the maximum frequency of the signal:
the original signal can be reconstructed from its samples a.e.w:
if the cut-off frequency of ideal low-pass reconstruction filter :
sx nT n
2s M
sin2 ccr
k s c
ss
s
t kTx t x kT
t kT
c sM M
WKS (Whittaker, Kotelnikov, Shannon) Sampling Theorem
The link between the two frequency axes of spectra of the discrete signal and of the corresponding continuous signal is:
spectrum periodic
The maximum frequencies are also related:
sT dX
; s sM MM
T T
Ideal Low-pass Filtering Reconstruction
The signal reconstructed from curves of type sin x / x.
Interpolation
,
,
sin
sin
2
1,
0,
Ms
k M
s sMk k
ss
s
ss s n k
n k
T n kx nT x kT
T n k
n kx nT x kT x kT x nT
n k
for n k
for n k
Linear interpolation• approximates the signal using straight lines
that unify points determined by the samples
• Reconstruction filter is triangular.
• errors
22sinsin
2
2
r s s
ss
s
s
T
H T TT
Reconstruction by Zero Order Extrapolation
2
2 2
2
2sin sin2 2
22
sinsin2
2
Ts
T Tj jr s
T jj sr s
s
s s
ss
s ss
s
s
s
T TT
h t p t e e TT
T
H e T eT
The frequency response of the reconstruction filter is not perfectly flat in the pass band.
The Fourier Transform of Distributions
1) The spectrum of the Dirac’s distribution
for any test function (t):
the Dirac’s distribution is even.
Hence, we have obtained:
0or 0
dtttdttt
1j t j tt e t e dt t
1t
2) The spectrum of the constant 1(t)
duality 221 t
cc 2
Approximation of continuous-time systems with discrete-
time systems
The continuous-time systems are replaced by discrete-time systems even for the processing of continuous-time signals.
1. Impulse invariance method
2. Step invariance method
3. Finite Difference Approximation (FDA)
4. Bilinear Transform
General Method for Quality Evaluation of Approximation
for Band-limited Systems
AD converter – Analog to Digital Converter
DA converter –Digital to Analog Converter
- transfer function of the analog
system to be approximated
- transfer function of equivalent
digital system.
The digital system - minimizes error .
Suppose:
a
d
a
H s
H z
e
H j
.
0, for
0, for
Signal : not defined
M
a M
a T
X
x t t t t
Identification of the impulse response of the system h(t)
-identifies a system,
.
sin -identifies a
with M
t
t
t
T
not
necessarilly band limited
band - limited
system
Identification of the impulse response of a band-limited system using the cardinal sine.
Frequency response of the band-limited system that must be identified
Spectrum of the input signal (cardinal sine)
Spectrum of the output signal
1. Impulse Invariance Method
1 ; .
1 1
1Minimum error :
a a d
a a
d d d
a d
y t h t x n nT y nT h nT
y n n h n h nT T
e nT h nT h nTT
d ah n Th nT
1
1
, band-limited / / 2 (half of sampling freq.)
Response of the c.t. system, at moments :
.
Response of the d.t. system:
Z .
Trans
a a M s
a a a
d d d d
-
x t X s T
nT
y nT X s H s nT
y nT y n X z H z
L
1 1
formation without error , 0 :
, or:
Z
d d a
d d a a
e nT
y n y nT y nT
X z H z X s H s nT
L
The digital system transfer function depends on the input signal due
to the presence of functions and .a dX s X z
-11Zd a a
d
H z X s H s nTX z L
• Change the input signal : changes the digital system.
• No perfect approximation.
• Approximation using “standard” signals:– Unit step (t)– Ramp signal t (t).
-11Zd a a
d
H z X s H s nTX z L
Approximation by sum of unit step signals, shifted and weighted
k kk
x t a t t
Approximation by sum of ramp signals, shifted and weighted
k k kk
x t a t t t t
Impulse invariance method for digital systems equivalent with band-limited c.t.
systems
1 1For sinc ; ;
The Laplace transform of the sampled signal is
ˆ
a d d a
a
a a T an
snTa a
n n
tx t x n n h n Th nT
T T T
y nt
Y s y t t h nT t nT
h nT t nT h nT e
L L
L
The Z transform of the output signal from the digital system is
1ˆ ; ;
1 2ˆFor any sampled signal we have
Replacing :
sT
n nd d a a d z e
n n
a ak
H z h n z Th nT z Y s H zT
kY j H j j
T T
j s
1 2ˆ .a ak
kY s H s j
T T
2 ;sTd az e
k
kH z H s j
T
.kT
ereereejy ; zxrezjωσs
TTjTjsTjΩ
2 ;
Relation between s and z planes for the Impulse Invariance Method
Left half plane <0 interior of unit disc
|z|=r<1
segment [-/T, /T) on imaginary axis one wrapping on the unit disc
Right half plane >0 exterior of unit disc |z|=r>1
Imaginary unit disc |z|=1
axis =0
• Avoid aliasing errors from the frequency response of the digital system obtained:
• frequency response of the analog system: completely included in freq. band -π/T , π/T.
• band-limited analog system
• Sampling freq.
TM /
2 / 2s MT
Impulse invariance method: link between frequency responses of
equivalent systemsTransfer functions
Freq. responses
2 ; ; ,
2 2.
sT
jd az e
k
jd a a
k kT
kH z H s j z e s j
T
kH e H k H
T T
The frequency response of the digital system is the same with the frequency response of the analog system of limited band for frequency less than half of sampling frequency
; and a d T MH HT T
• frequency response of the digital system ~ comb
Example: RC circuit
0
0
0
0
0
0
0
1 1 1 ; .
1
1Freq. response .
1
1Analog system: .
Digital system: .
aa a a
a
tt
a
nT
d a
dy tRC y t x t H s
sdt RC
Hjj
h t e t e t
Th n Th nT e n
non band limited system aliasing errors
The impulse response of the discrete system is
.
- small enough compared to (time constant of the circuit)
non band limited system aliasing errors (freq. response of
the digital
nT
d a
Th n Th nT e n
T
system affected at higher frequencies)
0
0
1 1
1
1 1
1 1
1
t
a a a
d d d T
T nT
T
Y s H s X s e ts s
T
Y z H z X z
e z z
Te e n
e
Unit step response
11 ; 1 .
1Error: 0
1 , 0 ; 1 1 , 0 and 1.
, 1 , 0.
1For , 0,905 , 0,
10
t T nT
a d T
a d
nT nT
a d
nT
T
Ty t e t y n e e n
ee nT y nT y nT
T Ty nT e n y nT e n
T Te nT e n
Te e nT
101 .n
e
10
0 0
0
0
0
1 0,1 (Higher T/ , error even smaller)
102
T/ 0.1
Sampling frequency 20
At 10 , the magnitude response of the analog system2
1 110 0.0318 or
1 10 10
n
s
s
s
Te nT e
T
Hj
020log 10 30
aliasing error negligeable
H dB
Frequency response
1 ;
1
1
1
a
d Tj
Hj
H
e e
2. Step Invariance Method
Input signal: unit step
Step response of the analog signal
Digital input signal:
1a ax t t X s
s
1a a a ay t h t t Y s H s
s
Z1
1
1d dx n n X zz
d as n s nT
Step responses:
and a a d ds t h t t s n h n n
d as n s nT
1 111
adH z H sn nT
sz
Z L
1 11 ad
H sH z z nT
s
Z L
Digital system:
Example: RC circuit
Step response
1
Step response of the equivalent digital system
1
with impulse response
1
t
a
nT
d
T nT
d a
s t e t
s n e n
h n e e n n h n
.
For 1: . nT
d
T
T T Th n e n n
aa a
dy tRC y t x t
dt
n
Error
, 1.
a
d a
a d
t h t
h n h nT
T Te nT h nT h n n
3. Finite difference approximation
0
1, time constant
1
1
aa a
a
dy tRC y t x t RC
dt
H ss
1d da a at nT
y n y ndy t y nT y nT T
dt T T
First derivative approximation
1 1T
y n y n x nT
11
11
1 1
11 1d a zs
T
H z H szz
T T T
Transfer function of the digital system:
0
k 0 0
0
0
11
Mk
k k kN Mk
k k a Nk kkk
kk
k kp p
t nT kk kp
b sd y t d x t
a b H sdt dt a s
d u tC u n p
dt T
General case
11
0
k 0 0 0 0
1 11
1 11 1
kk kp p
kkp
N k M kp pp p
k k k kk kp k p
zC z U z U z
T T
a C y n p b C x n pT T
1
1 1
0 0
1
0
11
0
Apply transform:
1 1
1
1
transfer functions, original c.t. system equivalent d.t. system,
finite differ
k kN M
k kk k
kM
kk
d ak zN sT
kk
z
z za Y z b X z
T T
zb
TH z H s
za
T
ence approximation.
...
1
1
1
1; d a z
sT
zH z H s s
T
Relation Between s and z planes Finite Difference Approximation
1
2 2
and .
1 1
11
; 0 11
jz x jy re s j
zs z
T sT
r z rT T
2 2
2
2 2 2
2
2 2
1 and
1 1
1notation: or
1
or 0, because generally 0
Tx y
T T
y xT x x
yx x yx
x y x x
2 22
The real and imaginary parts of describe a circle:
1 1
2 2
plane: imag. axis plane: contour of circle C= 1/2,0 , radius 1/2
z
x y
s z
Relation c.t. frequency & d.t. frequency :
= tg arctg y
T Tx
2 221 1
2 2x y
0 1/ 2,center 1/ 2,0
0 of 1/ 2,center 1/ 2,0
Imaginary axis , 0 1/ 2,center 1/ 2,0
z
z
s j z
z
Left half plane disc
Right half plane exterior disc
disc
21 1
1 1
j Tx jy
j T T
s-plane | z-plane
• Stable analog system => stable digital system
• Analog system and digital system: identical freq. response if imaginary axis on s-plane = unit circle on the z-plane.
• Not true for this method!!!
2 22
or 36
1 1and =1 very close
2 2
limited at : tg 36 36
36 2 very high value!!!!!
Sampling theorem 2 at limit 36
Very high sampling frequ
a M M M M
s M
s M s s
x y z
H ω T
ency appropriate for
modeling low frequency systems (electromechanical systems)
0
1
1time constant: .
1
1
1
a
d
RC
H ss
TTH z
zT
Example: first order LPF
Finite difference approximation
Finite difference approximation
higher accuracy !
Finite difference approximation
4. Bilinear Transform
1t
a
dyx t y t x d H s
dt s
Area An (ABCD)~ integral In: numerical methods (trapezoidal rule)
1
nT
n
n T
I x d
Input signal
• Bilinear transform:
1
1
1
2 2
1 12
nT
n
n T
I y nT y n T x d
x nT x n T TAB CD AD
Ty n y n x n x n
1
1
1
1 2 1
1
1
2 1d a zs
T z
T zH z H s
z
1
1
1
1 2 1
1
2 1;
1 d a zs
T z
zs H z H s
T z
Relation of the s and z planes for the bilinear transformation method
1
1
2 2
2 2
12 1 2 1 1
2
12 2
12 2
0 1.
0 1
0 1.
Tsz
s zTT z s
T T
zT T
z
z
z
0 1, left half plane (s plane) unit disc (z plane)
So: 0 1, imaginary axis (s plane) unit circle (z plane)
0 1, right half plane (s plane) outside the unit disc
z
z
z
Relation between frequency responses for the bilinear transform
Analog and digital frequencies connection:
2 or
2
2arctg2
tgT
T
2arctg2
12 1
12
1 and 2arctg 2
Imaginary axis ( plane) unit circle (z plane).
Analog and digital frequencies:
2 or: 2arctg .
2 2
Tj j
Tj
s j z e reT
j
Tr z
s
Ttg
T
Distorted digital freq.response due to non-linear relation between frequencies!!!