Professional Documents
Culture Documents
(digital filters)
H
{xn} {yn} = H [{xn}]
H
{xn} {yn} = H [{xn}]
n
For causal systems: hn=0, n<0 yn = xh k n−k
k =−
LTI systems
H
Stability / instability: Let us assume, that X(z) has all its poles within the unit circle. It means
that the input signal xn → 0 as n → (see last slide „Z transform”)
For stable systems the output signal yn → 0 as n → . That is every
pole of X(z) H(z) must be within the unit circle.
H(z) N M
xn yn = bi xn −i − ai yn −i
i =0 i =1
M N
Introducing a0=1,
a i yn −i = bi xn −i
we obtain: i =0 i =0
M N M N
−i −i
Z transform: ai [ yn−i ] = bi [ xn−i ] a
i z Y ( z ) = b z
i X ( z)
i =0 i =0 i =0 i =0
M N
−i
Y ( z ) ai z = X ( z ) bi z −i Polynomial of degree N
i =0 i =0 has N zeros (roots)
N N
−i −N N −i
bi z z b
i z
Y ( z) i =0 i =0 B( z )
Transfer function H ( z ) = = M
= M
=
X ( z) A( z )
a i z −i z − M ai z M −i
i =0 i =0
Rational function, Polynomial of degree M
has N zeros and M poles Values z-M and z-N represent has M zeros (roots)
only time shift
FIR and IIR filters
N
Nonrecursive (FIR): M=0 yn = bi xn −i
FIR – finite impulse response i =0
N M
yn = bi xn −i − ai yn −i
i =0 i =1
H
An example: z2
Transfer function of a filter is described with the formula: H ( z) = 2
Is this filter stable? z − z + 0.5
1
| z1 | = | z 2 |= 1 , poles lie in the circle of radius =1 and the filter is stable.
2
Difference equations – an example
A filter is described with the following difference equation
Is it FIR or IIR filter? Calculate the transfer function H(z) . Is this filter stable?
Y ( z ) [1 − 14 z −1 − 18 z −2 ] = X ( z )
Y ( z) 1 z2 Rational function,
Transfer function H ( z) = = 1 −1 1 −2
= 2 1
X ( z) 1 − 4 z − 8 z z − 4 z − 18 has 2 zeros and 2 poles
This is an IIR filter, because the current output sample yn depends on previous
output samples yn-1, yn-2 (see difference equation).
Moreover, the transfer function has poles (roots of the polynomial in denominator). These roots
are z1 = 12 and z2 = − 1 . They lie in the unit circle, so the filter is stable.
4
Block diagrams
Filter may be described with the block diagram. Block diagram (block scheme) contains sufficient
information to obtain difference equation or transfer function.
Example:
Operator z-1 represents delay of one sample (T seconds, where T is sampling interval).
Transfer function may be obrained directly from the block diagram, by reading
Y ( z) = b[ X ( z) + a z −1Y ( z) ]
Frequency response
T – sampling period
1/T – sampling frequency
frequency response of
H ( z) = H (e j 2 fT ) = H s ( f ) discrete time filter
(a complex function!)
Frequency response of this system equals H s ( f ) , but we are interested only in its value at
z −1
H ( z ) = 1 − z −1 = z
has one zero at z=1.
Pole at z=0 has no influence on the frequency response and stability
(it is only a time shift)
Using the substitution z = e j 2 f T we read the frequency response of our filter on the unit circle:
At f=0, z=1 and H(z) for z=1 is equal to zero. Our filter stops
H s ( f ) = H (e j 2 fT )
frequency equal to zero (signals of constant values): Hs(0)=0. It is due to zero of the polynomial
(see red point).
At frequency equal to half of the sampling frequency f = 1 z = -1 and H(z) = 2 . Our filter is
2T
a highpass filter.
Zeros and poles of the transfer function and
their influence on frequency response - example
Without detailed calculation we may draw the approximate frequency magnitude response
of the filter H ( z) = 1 − z −1
stopband attenuation
passband stopband
transition band
−1
h =W H = IDFT ( H )
The impulse response is obtained using the inverse discrete Fourier transform (IDFT)
of the frequency response values.
FIR filters
design by sampling in frequency
= 2 f T
frequency response of ideal filter
Hk
*
h0 , h1 ,, h12 = H L −k = H k
= IDFT [ H 0 ,, H12 ]
= 2 f T
12
sampled frequency response (L=13 samples)
H ( z ) = hn z −n
n =0 H ()
H f ( f ) = H ( z ) z =e j 2 f T
H f ( LTk ) = H k
= 2 f T
transition
band the obtained frequency magnitude response
FIR filters
design by sampling in frequency
frequency
frequency
time frequency
zero crossings
frequency
FIR filters
design by windowing in time domain
zero crossings
frequency
FIR filters
design by windowing in time domain
impulse response
Hamming window:
frequency
Infinite impulse response filters (IIR)
B ( z ) g ( z + 1) M
Lowpass Butterworth filter H ( z) = = M
A( z )
( z − zi )
i =1
poles
zeros z
z-zi
zi
frequency
M
In passband i
( z − z ) = const
i =1
Elliptic IIR filters
zeros
lowpass filter
poles
Elliptic IIR filters
frequency frequency
Highpass, bandpass and stopband filters
Bandpass filter may be obtained by subtraction of transfer functions of two lowpass filters.
Stopband filter for suppression of narrowband distortions , e.g. hum of power network 50 Hz,
may be obtained by zeros of transfer function at
50
z= exp( j ) , where = (fs is sampling frequency)
2 fs
at z = exp( j ), 1
Decibels (revision)
P
PdB = 10 log 10
Pr
Instead of powers we may compare amplitudes od two signals of the same kind.
Because power is proportional to the squared amplitude (for example P=A2/2
for sine signals), we may rewrite the formula as follows:
2
2
A A A
PdB = 10 log 10 2
= 10 log 10 = 20 log 10
Ar A
Ar r
In the last slides, reference power and reference amplitude are equal to one.
Frequency magnitude response equal to 0 dB means that |Hs(f)| =1.
Frequency magnitude response equal to -100 dB means that |Hs(f)| =10-5.
See table in the following slide
Decibels