Professional Documents
Culture Documents
Review:
a- Difference Equation:
homogeneous equation
assume
since
where are the roots of the equation and is the homogenous solution.
Note that when , which is the impulse response.
The impulse response must satisfy the homogeneous difference equation for n > 0.
The constants are evaluated using the initial conditions for .
if , then
Let for
define
is the frequency response of the system whose impulse response is
Consider:
1
…
n
0 N-1
and
the above can be applied to any convergent sequence since it is periodic in the
frequency domain.
← DTFT
Example 1:
Ideal Lowpass Filter ( zero phase )(no delay)
→
is not causal.
for an ideal low-pass filter with constant-amplitude response and linear phase response
and
where is the fundamental frequency of a square wave input
→ )
→ ← no distortion with linear phase.
Also, for linear phase system and is maximum at
proof:
H(jω) H(jω)
ω ω
-τω
-τω
e- Z-Transform
← two-sided, if the sum starts from zero, then one-sided
→ →
for , i.e., for , the z-transform is equal to the Fourier transform of the sequence.
converges to or is ROC
Im Z-plane
o x Re
Inverse z-Transform:
* In the case where is nonzero for both positive and negative indices, it is imperative to realize that
itself cannot uniquely determine the sequence .
Example 3: and both have z-transform equal to
DFS:
period and integer
or
The sequence is periodic with period of N → .
Define
→ DFS pair
and
The periodic sequence has a convenient interpretation as samples on the unit circle, equally spaced
in angle, of the z-transform of one period of .This then corresponds to sampling the z-transform
X(z) at N points equally spaced in angle around the unit circle.
Z-plane
2π/N
→ or
→ → and
→ → rad
when (beginning of the next period), the values repeat.
Properties of DFS:
-shift of a sequence:
if → then →
-periodic convolution:
let and be periodic sequences of period , then is periodic
with period N. .
Consider aperiodic sequence with finite duration , its X(z) has ROC that includes the unit circle, a
condition that is always met for finite sequence
Evaluating the z-transform at N equally spaced points around the unit circle and as we have seen before
this equivalent to:
where
since , we have
since
→
* frequency domain sampling is similar to time domain sampling.
* if the aperiodic sequence is of finite duration less than N, then each period of
is the exact replica of .
*if is of duration less than N, it can be recovered exactly from
* if is of duration greater than N, there will be an overlap of nonzero samples (aliasing).
DFT:
and
and
-properties of DFT:
* everything is based on the periodic sequences
1- Linearity
both and need to be of the same length N.
if , we add ( ) zero values to .
2-Circular Shift:
→
3-Circular Convolution:
→
for and ,
Example 6:
note:
decompose x(n) into sum of sections, each section having only nonzero points
→
2- Overlap-save method:
in this method we would section x(n) into sections of length so that each input section overlapped
the preceding section by points.
Discrete Cosine Transform DCT
to be added later
Block-diagram representation of Digital Filters
b- Direct Form II
c- cascade form
d- Parallel Form
2- FIR Systems:
Consider causal systems with finite duration response. The output y(n) depends only on
and its past values. This type of circuit is called non-recursive.
or
→
has poles at and zeros that can be anywhere in the finite z-plane.
a- Direct Form:
which follows directly from the convolution
b- Cascade Form:
in the graph
for N even
for N odd
for N even
for N odd
in both cases, the sums are real, implying a linear phase shift corresponding to delay of
samples. This implies Direct-Form implementation which require N/2 (N even) or (N+1)/2 (N odd)
multiplications rather than N.
M=N and N is even
Imposing the symmetry condition on the coefficients of the polynomial causes the zeros of to
occur in mirror-image.
Nonlinear Phase
Example 7: Perform the running average of the last six digital samples.
or
the poles are all located at the origin of the z-plane and the zeros are at
0.5000 + j0.8660
0.5000 - j0.8660
-1.0000 + j0.0000
-0.5000 + j0.8660
-0.5000 - j0.8660
note: usually when plotting magnitude and phase, we use normalized frequency range i.e.;
Example 8:
given and estimate the tone frequency using DFT.
max at and
0 1 t
*see page 181 (Applied Digital Signal) for matlab phase functions angle(x) and atan2(x)
We will adopt the notation being the digital radian frequency or angle and being the analog radian
frequency per cycle as shown by the above figure.
← passband
← stopband
transition band of nonzero width
- many of the filters used in practice are specified by such a tolerance scheme, with no constraints on
the phase response other than those imposed by stability and causality requirements; i.e., the poles of
the system function must be inside the unit circle.
In transforming an analog system to a digital system we must therefore obtain either H(z) or h(n) from
the analog filter design. This implies that we want the imaginary axis of the s-plane to map into the unit
circle of the z-plane. A second condition is that stable analog filter should be transformed to a stable
digital filter.That is, if the analog system has poles in only in the left-half s-plane, then the digital filter
must have poles only inside the unit circle.
let
let → and
or
→ and since
→
Ω s-plane
3π/T z-plane
π/T
1
-π/T
-3π/T
stripes of width in s-plane map into the entire z-plane. The left half of each z-plane strip maps
inro the interior of the unit circle.The right half plane of each s-plane strip maps into the exterior of the
unit circle. The imaginary axis of the s-plane maps into the unit circle in such a way that each segment
of length is mapped once around the unit circle.
because the in practice the analog filters are not band limited (hence aliasing in the sampled filter), the
digital filter will not be identical to the original analog filter frequency response.
Also, T in this method does not have effect on the amount of aliasing in the impulse invariant design
procedure ( ).
Let →
since
→ where
→ in s-plane maps into in z-plane so that if the real part of the is less
than zero ( left-half s-plane), then is less than unity ( inside unit-circle), and if
the real part of of is greater tha zero (right-half s-plane ) , the is greater
than unity (outside unit-circle ). If ,however, , then (unit-circle ).
note: while the poles in the s-plane map to poles in the z-plane according to the relation
, it is important to recognize that the impulse invariant design procedure does nor correspond
to a mapping of the s-plane to the z-plane by that relation or in fact by any relation. The zeros
of the digital filter are a function of the poles and the coefficients .
Example 10:
-π/T
→
→ and
in general,
taking the z-transform of the approximated differential equation, yields
and let →
z-plane
jΩ
s-plane
σ 0 1
3- Bilinear Transformation
It is based on integrating the differential equation and then using a numerical approximation to the
integral (Trapezoidal rule:
or ).
but
where
comparing and →
This also hold true for the order differential equation of the form given earlier, since
it can be written as a set of first-order differential equations.
The above invertible transformation is recognized as a bilinear transformation.
Mapping :
a- for and is negative ( left-half plane), the numerator magnitude is always
less than that of the denominator, and so the values are interior of the unit-circle.
c- for , the numerator magnitude is always equal that of the denominator, and so the
values are always on the unit-circle.
jΩ z-plane
s-plane
s=jΩ
σ 1
Typical frequency selective analog filter designs are Butterworth, Chebyshev, and elliptic filters.
These analog approximation methods have closed-form design formulas which make the design
procedure straightforward. A Butterworth analog filter is monotonic in the passband and in the
stopband. A chebyshev filterhas an equiripple in the passband and monotonic in the stopband.
An elliptic filter is equiripple in both passband and stopband.Using bilinear transformation will
preserve these properties as shown below
Analog-Digital Transformation
The roots of the denominator polynomial (the poles of the squared magnitude ) are at
. Utilizing the fact( )→ where
, and . Therefore, there are poles equally spaced in angle on a
circle of radius in the s-plane. The poles are symmetricly located with respect to the imaginary axis
and one occurs on the real axis for odd. The angular spacing between the poles is ( ex: →
). If we restrict the filter to be stable and causal, then these poles will correspond to the ones
on the left-half s-plane.
s-plane
Ωc
o
60
Note:
to assure that →
Example 11:
Assume we require a filter such that the passband magnitude is constant to within
for frequencies below and the stopband attenuation is greater than for frequencies
between and . Thus, if the passband magnitude is normalized to unity at , then
and
→ and
or
0
1
2
3
4
5
6
…. ……. ……………….
since , the poles on the left-half s-plane are chosen for stability and causality. Also
to assure , we have
It is evident from the above equation, the system function resulting from the impulse invariant design
method can be realized directly in parallel form.
2-Design Using the Bilinear transformation
→ and so
Allowing equiripple behavior in either passband or stopband rather than monotonic, will
distribute the accuracy of the approximation uniformly over the passband or the stopband or both.
Usually this also leads to lower-order filter.
where , , and .
The poles of the Chebyshev filter lie on an ellipse in the s-plane. The ellipse is defined by two circles
with radius ( inner circle) and ( outer circle) where and
with .
Example 12:
Consider the same filter specs as that of the previous example.
and
at we have or or
or →
also, or
or →
→ and
0
1
2
3
4
5
6
7
(N is even)
using partial fraction for impulse invariance transformation
2- Bilinear Transformation:
and
and
so as before
note:
again for →
and for →
this results in the same value for , which means and are also the same.
The only value changed is . Note that is also the same.
0
1
2
3
4
5
6
7
Elliptic Filters
Equiripple in both passband and stopband
where is a Jacobian elliptic function.
Advantages:
a- Computational speed of FFT and implement a filter as finite-duration impulse response.
b- FIR can have exactly linear phase.
has zeros that can be located anywhere in the finite z-plane and poles all of
which lie at . Recall that any finite-duration sequence is completely specified by N samples
of its Fourier transform , so that the design of an FIR filter may be accomplished
by finding either its impulse response coefficients or samples of its frequency response.
In the following both methods are discussed.
From the the property of linear phase FIR filter , it was shown that
linear phase shift corresponding to a delay of samples (for N odd it is an integer plus one-half sample).
As with IIR filter design, we saw two design approaches: time domain approach ( impulse
invariance) and frequency domain approach ( Bilinear transformation), the same thing can be said for
the design of FIR filters: time domain approach ( Windowing ), and frequency domain approach
(Computer-Aided Frequency-Sampling) and (Comuter-Aided Equiripple Approximation).
Because the frequency response of is periodic with period , (IIR ) can represent the
Fourier coefficients of the infinite series and
Truncating ( FIR) will produce a least mean square error that will depend on the window
used.
Example 13:
Suppose we wish to design an FIR filter of length 11 that approximates a low-pass with cutoff
frequency of for sampling frequency of .
→ →
for 11 coefficients
the impulse response is noncausal. To obtain a causal response we shift the impulse response so that
becomes ( linear time-invariant casual system property for all ). This process delays
the output by an amount of the shift.
let →
x(n)
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1
z z z z z z z z z z
y(n)
where
which expresses as circular convolution because and are both periodic in with
period of .
and where
Types of Windows:
Rectangular
Triangular/
Bartlett
Hanning
Hamming
Kaiser windows are another type where windows parameters can be adjusted for optimal results.
2- Computer-Aided Design of FIR Filters
if we let
or
the above equation suggests a simple approach to filter design, i.e., to specify the filter in terms
of samples of one period of the desired frequency response
relying on the interpolation indicated by the equation stated above to fill in the gaps in the
frequency response.
Example 14:
is the frequency response of an ideal low-pass filter with . The number
of samples is taken to be .
frequency spacing is →
since
is odd
is even
Example 15:
|H(ω)|
ω
0 1 2 7 8
π 2π k
0 1
1 1
2 0.5
3 0
4 0
5 0
6 0
7 0.5
8 1
Note that the samples at k = 2 and k = 7 are taken as 0.5 rather than 1 or 0. By using the average of the
two extreme values, we will design a much better filter, i.e. one that satisfies the specification more
closely than if either 1 or 0 had been used.
y(n)
note that we could have used the equation instead to
b- Equiripple Approximation
→ is pure real
H(e^jω)
1+δ1
1
1-δ1
δ2
ωp ωs ω
-δ2 π
Suppose that we wish to design a low-pass filter according the tolerance scheme of the figure above.
Approximate 1 in the band with maximum error and approximate zero in the band
with maximum error .
Two distinct approaches have been developed. Herrmann and Schuessler(Nonlinear equation solution
for maximal ripple FIR filters), and later Hofstetter(Polynomial interpolation solution for maximal
ripple FIR filters) developed procedures in which are fixed and and are variable.
Parks and McClellan and Rabiner developed procedures(Weighted Chebyshev approximation) in
which are fixed and and are variable.
where
and
The design procedure is to minimize . It turns out that there are at least alternations
with and contained in the intervals and as shown by
the figure below for . For a low-pass filter the desired frequency response is piecewise constant
and the frequencies correspond to peaks in the error function . is constrained such that
and and it will always have a local maximum or minimum at
and . Therefore a low-pass filter response has either or alterations of the error
function.
Matlab functions for Parks-McClellan ( firpm , firpmord).