z Analysis

advertisement
z Transform Signal and System
Analysis
Block Diagrams and Transfer
Functions
Just as with CT systems, DT systems are conveniently
described by block diagrams and transfer functions
can be determined from them. For example, from this
DT system block diagram the difference equation can
be determined.
1
y[n ] = 2 x[n ] − x[n − 1] − y[n − 1]
2
5/10/04
M. J. Roberts - All Rights Reserved
2
Block Diagrams and Transfer
Functions
From a z-domain block diagram the transfer function can
be determined.
1 −1
Y( z ) = 2 X( z ) − z X( z ) − z Y( z )
2
Y( z ) 2 − z −1 2 z − 1
H( z ) =
=
=
X( z ) 1 + 1 z −1 z + 1
2
2
−1
5/10/04
M. J. Roberts - All Rights Reserved
3
Block Diagram Reduction
All the techniques for block diagram reduction introduced
with the Laplace transform apply exactly to z transform
block diagrams.
5/10/04
M. J. Roberts - All Rights Reserved
4
System Stability
A DT system is stable if its impulse response
is absolutely summable. That requirement
translates into the z-domain requirement that
all the poles of the transfer function must lie
in the open interior of the unit circle.
5/10/04
M. J. Roberts - All Rights Reserved
5
System Interconnections
Cascade
Parallel
5/10/04
M. J. Roberts - All Rights Reserved
6
System Interconnections
Feedback
Y( z )
H1 ( z )
H1 ( z )
H( z ) =
=
=
X( z ) 1 + H1( z ) H 2 ( z ) 1 + T( z )
T( z ) = H1( z ) H 2 ( z )
5/10/04
M. J. Roberts - All Rights Reserved
7
Responses to Standard Signals
N( z )
If the system transfer function is H( z ) =
the z
D( z )
z N( z )
transform of the unit-sequence response is Y( z ) =
z − 1 D( z )
which can be written in partial-fraction form as
N1 ( z )
z
Y( z ) = z
+ H(1)
D( z )
z −1
N1 ( z )
z
If the system is stable the transient term,
, dies out
D( z )
z
and the steady-state response is H(1)
.
z −1
5/10/04
M. J. Roberts - All Rights Reserved
8
Responses to Standard Signals
Let the system transfer function be H( z ) =
Then Y( z ) =
Kz
z− p
z Kz
K  z
pz 
=
−


z − 1 z − p 1 − p  z − 1 z − p
K
n +1
1
−
p
u[n ]
and y[n ] =
(
)
1− p
Let the constant, K be 1 - p. Then y[n ] = (1 − p n +1 ) u[n ]
5/10/04
M. J. Roberts - All Rights Reserved
9
Responses to Standard Signals
Unit Sequence Response
One-Pole System
5/10/04
M. J. Roberts - All Rights Reserved
10
Responses to Standard Signals
Unit Sequence Response
Two-Pole System
5/10/04
M. J. Roberts - All Rights Reserved
11
Responses to Standard Signals
N( z )
If the system transfer function is H( z ) =
the z transform
D( z )
of the response to a suddenly-applied sinusoid is
N( z ) z[ z − cos(Ω0 )]
Y( z ) =
D( z ) z 2 − 2 z cos(Ω0 ) + 1
Let p1 = e jΩ 0. Then the system response can be written as
 N1 ( z ) 
+ H ( p1 ) cos ( Ω0 n + ∠ H ( p1 )) u [ n ]
y[n] = Z  z

 D(z) 
−1
and, if the system is stable, the steady-state response is
H( p1 ) cos(Ω0 n + ∠ H( p1 )) u[n ]
a DT sinusoid with, generally, different magnitude and phase.
5/10/04
M. J. Roberts - All Rights Reserved
12
Pole-Zero Diagrams and
Frequency Response
For a stable system, the response to a suddenly-applied
sinusoid approaches the response to a true sinusoid (applied
for all time).
5/10/04
M. J. Roberts - All Rights Reserved
13
Pole-Zero Diagrams and
Frequency Response
Let the transfer function of a DT system be
z
z
H( z ) =
=
z
5
( z − p1 )( z − p2 )
z2 − +
2 16
1 + j2
p1 =
4
H( e jΩ ) =
5/10/04
1 − j2
p2 =
4
e jΩ
e jΩ − p1 e jΩ − p2
M. J. Roberts - All Rights Reserved
14
Pole-Zero Diagrams and
Frequency Response
5/10/04
M. J. Roberts - All Rights Reserved
15
The Jury Stability Test
N( z )
Let a transfer function be in the form, H( z ) =
D( z )
where D( z ) = aD z D + aD −1z D −1 + L + a1z + a0
Form the “Jury” array
5/10/04
1
2
a0
aD
a1
aD −1
a2 L aD − 2
aD − 2 L a2
aD −1
a1
3
4
5
6
M
b0
bD −1
c0
cD − 2
M
b1
bD − 2
c1
cD − 3
M
b2
bD − 3
c2
cD − 4
M
L bD − 2
L b1
L cD − 2
L c0
N
bD −1
b0
2D − 3
s0
s1
s2
M. J. Roberts - All Rights Reserved
aD
a0
16
The Jury Stability Test
The third row is computed from the first two by
a0
b0 =
aD
aD
a0
, b1 =
a0
aD
a0
aD −1
, b2 =
a1
aD
aD − 2
a2
, L , bD −1 =
a0
a1
aD
aD −1
The fourth row is the same set as the third row except in
reverse order. Then the c’s are computed from the b’s in
the same way the b’s are computed from the a’s. This
continues until only three entries appear. Then the system
is stable if
D(1) > 0
( −1)D D( −1) > 0
aD > a0 , b0 > bD −1 , c0 > cD − 2 , L, s0 > s2
5/10/04
M. J. Roberts - All Rights Reserved
17
Root Locus
Root locus methods for DT systems are like root
locus methods for CT systems except that the
interpretation of the result is different.
CT systems: If the root locus crosses into the
right half-plane the system goes unstable at that
gain.
DT systems: If the root locus goes outside the
unit circle the system goes unstable at that gain.
5/10/04
M. J. Roberts - All Rights Reserved
18
Simulating CT Systems with DT
Systems
The ideal simulation of a CT system by a DT system would have
the DT system’s excitation and response be samples from the CT
system’s excitation and response. But that design goal is never
achieved exactly in real systems at finite sampling rates.
5/10/04
M. J. Roberts - All Rights Reserved
19
Simulating CT Systems with DT
Systems
One approach to simulation is to make the impulse response of
the DT system be a sampled version of the impulse response of
the CT system.
h[n ] = h( nTs )
With this choice, the response of the DT system to a DT unit
impulse consists of samples of the response of the CT system to a
CT unit impulse. This technique is called impulse-invariant
design.
5/10/04
M. J. Roberts - All Rights Reserved
20
Simulating CT Systems with DT
Systems
When h[n ] = h( nTs ) the impulse response of the DT system is a
sampled version of the impulse response of the CT system but the
unit DT impulse is not a sampled version of the unit CT impulse.
A CT impulse cannot be sampled. First, as a practical matter
the probability of taking a sample at exactly the time of
occurrence of the impulse is zero. Second, even if the impulse
were sampled at its time of occurrence what would the sample
value be? The functional value of the impulse is not defined at its
time of occurrence because the impulse is not an ordinary
function.
5/10/04
M. J. Roberts - All Rights Reserved
21
Simulating CT Systems with DT
Systems
In impulse-invariant design, even though the impulse response is a
sampled version of the CT system’s impulse response that does not
mean that the response to samples from any arbitrary excitation
will be a sampled version of the CT system’s response to that
excitation.
All design methods for simulating CT systems with DT systems
are approximations and whether or not the approximation is a good
one depends on the design goals.
5/10/04
M. J. Roberts - All Rights Reserved
22
Sampled-Data Systems
Real simulations of CT systems by DT systems usually sample
the excitation with an ADC, process the samples and then
produce a CT signal with a DAC.
5/10/04
M. J. Roberts - All Rights Reserved
23
Sampled-Data Systems
An ADC simply samples a signal and produces numbers. A
common way of modeling the action of a DAC is to imagine
the DT impulses in the DT signal which drive the DAC are
instead CT impulses of the same strength and that the DAC
has the impulse response of a zero-order hold.
5/10/04
M. J. Roberts - All Rights Reserved
24
Sampled-Data Systems
The desired equivalence between a CT and a DT system is
illustrated below.
The design goal is to make y d (t ) look as much like y c (t ) as
possible by choosing h[n] appropriately.
5/10/04
M. J. Roberts - All Rights Reserved
25
Sampled-Data Systems
Consider the response of the CT system not to the actual signal,
x(t), but rather to an impulse-sampled version of it,
xδ (t ) =
The response is
∞
∑ x(nT )δ (t − nT ) = x(t ) f
s
s
n =−∞
y(t ) = h(t ) ∗ xδ (t ) = h(t ) ∗
∞
s
comb( fs t )
∞
∑ x[m]δ (t − mT ) = ∑ x[m]h(t − mT )
s
m =−∞
s
m =−∞
where x[n ] = x( nTs ) and the response at the nth multiple of Ts
∞
is
y( nTs ) = ∑ x[ m ] h(( n − m )Ts )
m =−∞
The response of a DT system with h[n ] = h( nTs ) to the excitation,
x[n ] = x( nTs ) is
y[n ] = x[n ] ∗ h[n ] =
5/10/04
∞
∑ x[m]h[n − m]
m =−∞
M. J. Roberts - All Rights Reserved
26
Sampled-Data Systems
The two responses are equivalent in the sense that the values at
corresponding DT and CT times are the same.
5/10/04
M. J. Roberts - All Rights Reserved
27
Sampled-Data Systems
Modify the CT system to reflect the last analysis.
Then multiply the impulse responses of both systems by Ts
5/10/04
M. J. Roberts - All Rights Reserved
28
Sampled-Data Systems
In the modified CT system,
∞
 ∞

y(t ) = xδ (t ) ∗ Ts h(t ) =  ∑ x( nTs )δ (t − nTs ) ∗ h(t )Ts = ∑ x( nTs ) h(t − nTs )Ts
n =−∞

n =−∞
In the modified DT system,
y[n ] =
∞
∞
∑ x[m]h[n − m] = ∑ x[m]T h((n − m )T )
s
m =−∞
s
m =−∞
where h[n ] = Ts h( nTs ) and h(t) still represents the impulse
response of the original CT system. Now let Ts approach zero.
lim y(t ) = lim
Ts → 0
Ts → 0
∞
∑ x(nT ) h(t − nT )T
s
n =−∞
s
s
∞
=
∫ x(τ ) h(t − τ )dτ
−∞
This is the response, y c (t ) , of the original CT system.
5/10/04
M. J. Roberts - All Rights Reserved
29
Sampled-Data Systems
Summarizing, if the impulse response of the DT system is
chosen to be Ts h( nTs ) then, in the limit as the sampling rate
approaches infinity, the response of the DT system is exactly
the same as the response of the CT system.
Of course the sampling rate can never be infinite in practice.
Therefore this design is an approximation which gets better as
the sampling rate is increased.
5/10/04
M. J. Roberts - All Rights Reserved
30
Digital Filters
• Digital filter design is simply DT system
design applied to filtering signals
• A popular method of digital filter design is to
simulate a proven CT filter design
• There many design approaches each of which
yields a better approximation to the ideal as
the sampling rate is increased
5/10/04
M. J. Roberts - All Rights Reserved
31
Digital Filters
• Practical CT filters have infinite-duration
impulse responses, impulse responses which
never actually go to zero and stay there
• Some digital filter designs produce DT filters
with infinite-duration impulse responses and
these are called IIR filters
• Some digital filter designs produce DT filters
with finite-duration impulse responses and
these are called FIR filters
5/10/04
M. J. Roberts - All Rights Reserved
32
Digital Filters
• Some digital filter design methods use timedomain approximation techniques
• Some digital filter design methods use
frequency-domain approximation techniques
5/10/04
M. J. Roberts - All Rights Reserved
33
Digital Filters
Impulse and Step Invariant Design
5/10/04
M. J. Roberts - All Rights Reserved
34
Digital Filters
Impulse and Step Invariant Design
Impulse invariant:
H s ( s)
L−1
Step invariant:
1
×
s
H s ( s)
Z
5/10/04
h(t )
Sample
H s ( s)
s
L−1
z
H z ( z)
z −1
z −1
×
z
Z
h[n ]
h −1(t )
H z ( z)
Sample
h −1[n ]
H z ( z)
M. J. Roberts - All Rights Reserved
35
Digital Filters
Impulse and Step Invariant Design
Impulse invariant approximation of the one-pole system,
1
H s ( s) =
s+a
yields
1
H z ( z) =
1 − e − aTs z −1
5/10/04
M. J. Roberts - All Rights Reserved
36
Digital Filters
Impulse and Step Invariant Design
Let a be one and let Ts = 0.1 in H z ( z ) =
1
1 − e − aTs z −1
Digital Filter
Impulse Response
CT Filter
Impulse Response
5/10/04
M. J. Roberts - All Rights Reserved
37
Digital Filters
Impulse and Step Invariant Design
Step response of H z ( z ) =
1
1 − e − aTs z −1
Digital Filter
Step Response
Notice scale difference
CT Filter
Step Response
5/10/04
M. J. Roberts - All Rights Reserved
38
Digital Filters
Why is the impulse response exactly
right while the step response is wrong?
This design method forces an equality
between the impulse strength of a CT
excitation, a unit CT impulse at zero,
and the impulse strength of the
corresponding DT signal, a unit DT
impulse at zero. It also makes the
impulse response of the DT system,
h[n], be samples from the impulse
response of the CT system, h(t).
5/10/04
M. J. Roberts - All Rights Reserved
39
Digital Filters
A CT step excitation is not an impulse. So what should the
correspondence between the CT and DT excitations be now? If the
step excitation is sampled at the same rate as the impulse response
was sampled, the resulting DT signal is the excitation of the DT
system and the response of the DT system is the sum of the
responses to all those DT impulses.
5/10/04
M. J. Roberts - All Rights Reserved
40
Digital Filters
If the excitation of the CT system were a sequence of CT unit
impulses, occurring at the same sampling rate used to form h[n],
then the response of the DT system would be samples of the
response of the
CT system.
5/10/04
M. J. Roberts - All Rights Reserved
41
Digital Filters
Impulse and Step Invariant Design
Impulse invariant approximation of
s
H s ( s) = 2
s + 400 s + 2 × 10 5
with a 1 kHz sampling rate
yields
z( z − 0.9135 )
H( z ) = 2
z − 1.508 z + 0.6703
5/10/04
M. J. Roberts - All Rights Reserved
42
Digital Filters
Impulse and Step Invariant Design
Step invariant approximation of
s
H s ( s) = 2
s + 400 s + 2 × 10 5
with a 1 kHz sampling rate
yields
7.97 × 10 −4 ( z − 1)
H z ( z) = 2
z − 1.509 z + 0.6708
5/10/04
M. J. Roberts - All Rights Reserved
43
Digital Filters
Finite Difference Design
Every CT transfer function implies a corresponding differential
equation. For example,
1
d
H s ( s) =
⇒ ( y(t )) + a y(t ) = x(t )
s + a dt
Derivatives can be approximated by finite differences.
Forward
Backward
d
d
y[n + 1] − y[n ]
y[n ] − y[n − 1]
(y(t )) ≅
(y(t )) ≅
dt
Ts
dt
Ts
Central
d
y[n + 1] − y[n − 1]
(y(t )) ≅
dt
2Ts
5/10/04
M. J. Roberts - All Rights Reserved
44
Digital Filters
Finite Difference Design
Using a forward difference to approximate the derivative,
1
y[n + 1] − y[n ]
H s ( s) =
⇒
+ a y[n ] = x[n ]
s+a
Ts
A more systematic method is to realize that every s in a CT
transfer function corresponds to a differentiation in the time
domain which can be approximated by a finite difference.
Forward
z −1
s→
Ts
5/10/04
Backward
1 − z −1
s→
Ts
M. J. Roberts - All Rights Reserved
Central
z − z −1
s→
2Ts
45
Digital Filters
Finite Difference Design
Then
1
1 
Ts

H s ( s) =
⇒ H z ( z) = 
=

z
−
1
s+a
z − (1 − aTs )
 s + a  s→
Ts
5/10/04
M. J. Roberts - All Rights Reserved
46
Digital Filters
Finite Difference Design
Finite difference approximation of
s
H s ( s) = 2
s + 400 s + 2 × 10 5
with a 1 kHz sampling rate
yields
6.25 × 10 −4 z( z − 1)
H( z ) = 2
z − 1.5 z + 0.625
5/10/04
M. J. Roberts - All Rights Reserved
47
Digital Filters
Direct Substitution and Matched z-Transform Design
Direct substitution and matched filter design use the relationship,
z = e sTs to map the poles and zeros of an s-domain transfer
function into corresponding poles and zeros of a z-domain
transfer function. If there is an s-domain pole or zero at a, the zdomain pole or zero will be at e aTs .
Direct Substitution
s − a → z − e aTs
Matched z-Transform
s − a → 1 − e aTs z −1
5/10/04
z = e sTs
M. J. Roberts - All Rights Reserved
48
Digital Filters
Direct Substitution and Matched z-Transform Design
Matched z-transform approximation of
s
H s ( s) = 2
s + 400 s + 2 × 10 5
with a 1 kHz sampling rate
yields
z( z − 1)
H z ( z) = 2
z − 1.509 z + 0.6708
5/10/04
M. J. Roberts - All Rights Reserved
49
Digital Filters
Bilinear Transformation
This method is based on trying to match the frequency response
of a digital filter to that of the CT filter. As a practical matter it
is impossible to match exactly because a digital filter has a
periodic frequency response, but a good approximation can be
made over a range of frequencies which can include all the
expected signal power.
The basic idea is to use the transformation,
1
s → ln( z )
Ts
or
e sTs → z
to convert from the s to z domain.
5/10/04
M. J. Roberts - All Rights Reserved
50
Digital Filters
Bilinear Transformation
1
The straightforward application of the transformation, s → ln( z )
Ts
would be the substitution,
H z ( z ) = H s ( s ) s→ 1 ln ( z )
Ts
But that yields a z-domain function that is a transcendental
function of z with infinitely many poles. The exponential
function can be expressed as the infinite series,
k
2
3
∞
x
x
x
ex = 1 + x + + + L = ∑
2! 3!
k = 0 k!
and then approximated by truncating the series.
5/10/04
M. J. Roberts - All Rights Reserved
51
Digital Filters
Bilinear Transformation
Truncating the exponential series at two terms yields the
transformation,
+ sTs → z
or
z −1
s→
Ts
This approximation is identical to the finite difference method
using forward differences to approximate derivatives. This
method has a problem. It is possible to transform a stable sdomain function into an unstable z-domain function.
5/10/04
M. J. Roberts - All Rights Reserved
52
Digital Filters
Bilinear Transformation
The stability problem can be solved by a very clever
modification of the idea of truncating the series. Express the
T
s s
exponential as
e 2
sTs
e = Ts → z
−s
e 2
Then approximate both numerator and denominator with a
truncated series.
sTs
1+
2 z −1
2 →z
s→
sTs
Ts z + 1
1−
2
This is called the bilinear transformation because both numerator
and denominator are linear functions of z.
5/10/04
M. J. Roberts - All Rights Reserved
53
Digital Filters
Bilinear Transformation
The bilinear transformation
has the quality that every
point in the s plane maps into
a unique point in the z plane,
and vice versa. Also, the left
half of the s plane maps into
the interior of the unit circle
in the z plane so a stable sdomain system is
transformed into a stable zdomain system.
5/10/04
M. J. Roberts - All Rights Reserved
54
Digital Filters
Bilinear Transformation
The bilinear transformation is unique among the digital filter design
methods because of the unique mapping of points between the two
complex planes. There is however a “warping” effect. It can be seen
by mapping real frequencies in the z plane (the unit circle) into
corresponding points in the s plane (the ω axis). Letting z = e jΩ with
Ω real, the corresponding contour in the s plane is
2 e jΩ − 1
2
 Ω
s=
= j tan
jΩ
 2
Ts e + 1
Ts
or
 ωTs 
Ω = 2 tan
 2 
−1
5/10/04
M. J. Roberts - All Rights Reserved
55
Digital Filters
Bilinear Transformation
Bilinear approximation of
s
H s ( s) = 2
s + 400 s + 2 × 10 5
with a 1 kHz sampling rate
yields
z2 − 1
H( z ) = 2
z − 1.52 z + 0.68
5/10/04
M. J. Roberts - All Rights Reserved
56
Digital Filters
FIR Filters
FIR digital filters are based on the
idea of approximating an ideal
impulse response. Practical CT
filters have infinite-duration impulse
responses. The FIR filter
approximates this impulse by
sampling it and then truncating it to
a finite time (N impulses in the
illustration).
5/10/04
M. J. Roberts - All Rights Reserved
57
Digital Filters
FIR Filters
FIR digital filters can also
approximate non-causal filters
by truncating the impulse
response both before time t = 0
and after some later time which
includes most of the signal
energy of the ideal impulse
response.
5/10/04
M. J. Roberts - All Rights Reserved
58
Digital Filters
FIR Filters
The design of an FIR
filter is the essence of
simplicity. It consists of
multiple feedforward
paths, each with a
different delay and
weighting factor and all
of which are summed to
form the response.
N −1
h N [n ] = ∑ amδ [n − m ]
m =0
5/10/04
M. J. Roberts - All Rights Reserved
59
Digital Filters
FIR Filters
Since this filter has no feedback paths its transfer function is of the
form,
N −1
H N ( z ) = ∑ am z − m
m =0
and it is guaranteed stable because it has N - 1 poles, all of which
are located at z = 0.
5/10/04
M. J. Roberts - All Rights Reserved
60
Digital Filters
FIR Filters
The effect of truncating an impulse response can be modeled by
multiplying the ideal impulse response by a “window” function. If
a CT filter’s impulse response is truncated between t = 0 and t = T,
the truncated impulse response is
h(t ) , 0 < t < T 
hT (t ) = 
 = h(t ) w(t )
, otherwise 
0
where, in this case,
 T
t−
2
w(t ) = rect
 T 




5/10/04
M. J. Roberts - All Rights Reserved
61
Digital Filters
FIR Filters
The frequency-domain effect of truncating an impulse response is
to convolve the ideal frequency response with the transform of the
window function.
HT ( f ) = H( f ) ∗ W ( f )
If the window is a rectangle,
W( f ) = T sinc(Tf )e − jπfT
5/10/04
M. J. Roberts - All Rights Reserved
62
Digital Filters
FIR Filters
 f  − jπfT
e
Let the ideal transfer function be H( f ) = rect
 2 B
The corresponding impulse response is
  T 
h(t ) = 2 B sinc 2 B t −
  2
The truncated impulse response is
 T
t−
  T 
2
hT (t ) = 2 B sinc 2 B t −
rect
 T 
  2




The transfer function for the truncated impulse response is
 f  − jπfT
e
HT ( f ) = rect
∗ T sinc(Tf )e − jπfT
 2 B
5/10/04
M. J. Roberts - All Rights Reserved
63
Digital Filters
FIR Filters
5/10/04
M. J. Roberts - All Rights Reserved
64
Digital Filters
FIR Filters
5/10/04
M. J. Roberts - All Rights Reserved
65
Digital Filters
FIR Filters
5/10/04
M. J. Roberts - All Rights Reserved
66
Digital Filters
FIR Filters
The effects of windowing a digital filter’s impulse response are
similar to the windowing effects on a CT filter.
h[n ] , 0 ≤ n < N 
h N [n ] = 
 = h[n ] w[n ]
, otherwise 
0
H N ( jΩ) = H( jΩ)
5/10/04
W( jΩ)
M. J. Roberts - All Rights Reserved
67
Digital Filters
FIR Filters
5/10/04
M. J. Roberts - All Rights Reserved
68
Digital Filters
FIR Filters
5/10/04
M. J. Roberts - All Rights Reserved
69
Digital Filters
FIR Filters
5/10/04
M. J. Roberts - All Rights Reserved
70
Digital Filters
FIR Filters
The “ripple” effect in the frequency domain can be reduced by
using windows of different shapes. The shapes are chosen to
have DTFT’s which are more confined to a narrow range of
frequencies. Some commonly-used windows are
1.
1
2πn  

von Hann w[n ] = 1 − cos
, 0≤n<N

 N − 1 
2
2.
Bartlett
5/10/04
N −1
 2n
, 0≤n≤
N − 1
2
w[n ] = 
2 − 2 n , N − 1 ≤ n < N

2
N −1
M. J. Roberts - All Rights Reserved
71
Digital Filters
FIR Filters
(windows continued)
3.
 2πn 
Hamming w[n ] = 0.54 − 0.46 cos
, 0≤n<N
 N − 1
4.
Blackman
 2πn 
 4πn 
w[n ] = 0.42 − 0.5 cos
, 0≤n<N
+ 0.08 cos
 N − 1
 N − 1
5.
5/10/04
Kaiser
2
2

1
1
N
−
N
−

 
 
I0  ω a
− n−



2
2  

w[n ] =
 N − 1
I0 ω a

2 
M. J. Roberts - All Rights Reserved
72
Digital Filters
FIR Filters
Windows
5/10/04
Window Transforms
M. J. Roberts - All Rights Reserved
73
Digital Filters
FIR Filters
Windows
5/10/04
Window Transforms
M. J. Roberts - All Rights Reserved
74
Standard Realizations
• Realization of a DT system closely parallels
the realization of a CT system
• The basic forms, canonical, cascade and
parallel have the same structure
• A CT system can be realized with integrators,
summers and multipliers
• A DT system can be realized with delays,
summers and multipliers
5/10/04
M. J. Roberts - All Rights Reserved
75
Standard Realizations
Canonical
Summer
Delay
Multiplier
5/10/04
M. J. Roberts - All Rights Reserved
76
Standard Realizations
Cascade
5/10/04
M. J. Roberts - All Rights Reserved
77
Standard Realizations
Parallel
5/10/04
M. J. Roberts - All Rights Reserved
78
State-Space Analysis
In DT system state-space analysis the “next” state-variable values
are set equal to a linear combination of the “present” state-variable
values and the “present” excitations. The system and output
equations are
q[n + 1] = Aq[n ] + Bx[n ] , y[n ] = Cq[n ] + Dx[n ]
For this system,
1 1 
 q1 [ n ] 
3 4
q[n ] = 
A=


1
n
q
 2 [ ]
0

2

 x1 [ n ] 
1 0 
x[n ] = 
B=


n
x
 2 [ ]
0 1 
y[n ] = [ y[n ]]
5/10/04
C = [ 2 3]
D = [0 0]
M. J. Roberts - All Rights Reserved
79
State-Space Analysis
For illustration purposed let the excitation vector be
 u[n ]
x[n ] = 

n
δ
[
]


and let the system be initially
at rest. Then by direct
recursion,
n q1 [ n ]
q 2 [n ]
y[n ]
0
1
0
1
0
1
0
5
2 1.5833
0.5
4.667
3 1.6528 0.7917 5.681
M
M
M
M
5/10/04
M. J. Roberts - All Rights Reserved
80
State-Space Analysis
The recursion process proceeds as follows
q[1] = Aq[0 ] + Bx[0 ]
q[2 ] = Aq[1] + Bx[1] = A 2 q[0 ] + ABx[0 ] + Bx[1]
q[ 3] = Aq[2 ] + Bx[2 ] = A 3q[0 ] + A 2 Bx[0 ] + ABx[1] + Bx[2 ]
M
q[n ] = A n q[0 ] + A n −1Bx[0 ] + A n − 2 Bx[1] + L + A1Bx[n − 2 ] + A 0 Bx[n − 1]
and
y[1] = Cq[1] + Dx[1] = CAq[0 ] + CBx[0 ] + Dx[1]
y[2 ] = Cq[2 ] + Dx[2 ] = CA 2 q[0 ] + CABx[0 ] + CBx[1] + Dx[2 ]
y[ 3] = Cq[ 3] + Dx[ 3] = CA 3q[0 ] + CA 2 Bx[0 ] + CABx[1] + CBx[2 ] + Dx[ 3]
M
y[n ] = CA n q[0 ] + CA n −1Bx[0 ] + CA n − 2 Bx[1] + L + CA 0 Bx[n − 1] + Dx[n ]
5/10/04
M. J. Roberts - All Rights Reserved
81
State-Space Analysis
The recursions can be written in the more compact forms,
n −1
q[n ] = A n q[0 ] + ∑ A n − m −1Bx[ m ]
Zero-Input
Response
m =0
n −1
Zero-State
Response
y[n ] = CA q[0 ] + C ∑ A n − m −1Bx[ m ] + Dx[n ]
n
m =0
These two equations can be written in the forms,
q[n ] = φ[n ]q[0 ] + φ[n − 1] u[n − 1] ∗ Bx[n ]
1
424
3 144424443
zero − excitation
response
zero − state
response
y[n ] = Cφ[n ]q[0 ] + Cφ[n − 1] u[n − 1] ∗ Bx[n ] + Dx[n ]
where A n = φ[n ] (pp. 866-867).
5/10/04
M. J. Roberts - All Rights Reserved
82
State-Space Analysis
An alternate to the previous discrete-time-domain solution of
the state and output equations is to solve them using the z
transform. Transforming the system equation,
zQ( z ) − zq[0 ] = AQ( z ) + BX( z )
Q( z ) = [ zI − A ] [ BX( z ) + zq[0 ]] = [ zI − A ] BX( z ) + z[ zI − A ] q[0 ]
1442443 144244
3
−1
−1
zero − state
response
−1
zero − excitation
response
by comparing this equation with a previous one,
q[n ] = φ[n ]q[0 ] + φ[n − 1] u[n − 1] ∗ Bx[n ]
1
424
3 144424443
zero − excitation
response
zero − state
response
Z
→ z[ zI − A ] and therefore Φ( z ) = z[ zI − A ]
it is apparent that φ[n ]←
−1
5/10/04
M. J. Roberts - All Rights Reserved
−1
83
State-Space Analysis
 u[n ]
Let the excitation vector again be x[n ] = 
and let the system

δ [n ]

be initially at rest.
−1
z − 1 − 1 
 z 
1
0


 3

4
Q( z ) = 
  0 1   z − 1
1
  1 
z  
−
 2

1.846 − 0.578 − 0.268 
 z − 1 z − 0.5575 z + 0.2242 
Q( z ) = 
0.923
0.519
0.596 
−
+


 z − 1 z − 0.5575 z + 0.2242 
Inverse transforming (pg. 868),
1.846 − 0.578( 0.5575 )( n −1) − 0.268( −0.2242 )( n −1) 
q[n ] = 
( n −1)
( n −1)  u[n − 1]
+ 0.596( −0.2242 )
0.923 − 0.519( 0.5575 )

5/10/04
M. J. Roberts - All Rights Reserved
84
State-Space Analysis
The response vector is easily found from the state-variable
vector.
[
y[n ] = 6.461 − 2.713( 0.5575 )
( n −1)
( n −1)
+ 1.252( −0.2242 )
] u[n − 1]
The closed-form solution has the same initial values as the
recursion solution indicating it is probably correct.
n
0
1
q1 [ n ]
0
1
q 2 [n ]
0
1
y[n ]
0
5
2 1.5833
0.5
4.667
3 1.6528 0.7917 5.681
M
M
M
M
5/10/04
M. J. Roberts - All Rights Reserved
85
State-Space Analysis
Some other results of state-space analysis that are similar to
those from the CT-system case are
Transfer Function
H( z ) = C[ zI − A ] B + D
−1
If q2 [n ] = Tq1[n ] and q1[n + 1] = A1q1[n ] + B1x[n ] then
q2 [n + 1] = A 2 q2 [n ] + B2 x[n ]
where A 2 = TA1T −1 and B2 = TB1 and
y[n ] = C2 q2 [n ] + D2 x[n ]
where C2 = C1T −1 and D2 = D1 .
5/10/04
M. J. Roberts - All Rights Reserved
86
Download