Unit Ii Infinite Impulse Response Filters
Unit Ii Infinite Impulse Response Filters
net
t
To remove or to reduce strength of unwanted signal like noise and to improve the
ne
quality of required signal filtering process is used. To use the channel full bandwidth
we mix up two or more signals on transmission side and on receiver side we would
like to separate it out in efficient way.
.
Hence filters are used. Thus the digital filters are mostly used in
pz
1. Removal of undesirable noise from the desired signals
2.
ee
Equalization of communication channels
In signal processing, the function of a filter is to remove unwanted parts of the signal,
w
such as random noise, or to extract useful parts of the signal, such as the components
lying within a certain frequency range.
www.padeepz.net
www.padeepz.net
t
ne
There are two main kinds of filter, analog and digital. They are quite different in
their physical makeup and in how they work.
.
An analog filter uses analog electronic circuits made up from components such as
pz
resistors, capacitors and op amps to produce the required filtering effect. Such filter
circuits are widely used in such applications as noise reduction, video signal
enhancement, graphic equalizers in hi-fi systems, and many other areas.
ee
In analog filters the signal being filtered is an electrical voltage or current which is
the direct analogue of the physical quantity (e.g. a sound or video signal or
transducer output) involved.
ad
A digital filter uses a digital processor to perform numerical calculations on sampled
values of the signal. The processor may be a general-purpose computer such as a
PC, or a specialized DSP (Digital Signal Processor) chip.
.p
The analog input signal must first be sampled and digitized using an ADC (analog
to digital converter). The resulting binary numbers, representing successive sampled
values of the input signal, are transferred to the processor, which carries out
numerical calculations on them. These calculations typically involve multiplying the
w
input values by constants and adding the products together. If necessary, the results
of these calculations, which now represent sampled values of the filtered signal, are
output through a DAC (digital to analog converter) to convert the signal back to
w
analog form.
w
www.padeepz.net
www.padeepz.net
t
. ne
pz
BASIC BLOCK DIAGRAM OF DIGITAL FILTERS
ee
ad
a. Samplers are used for converting continuous time signal into a discrete time
.p
signal by taking samples of the continuous time signal at discrete time instants.
w
b. The Quantizer are used for converting a discrete time continuous amplitude
signal into a digital signal by expressing each sample value as a finite number of
digits.
w
d. The digital filters are the discrete time systems used for filtering of sequences.
www.padeepz.net
www.padeepz.net
e. These digital filters performs the frequency related operations such as low pass,
t
high pass, band pass and band reject etc. These digital Filters are designed with
ne
digital hardware and software and are represented by difference equation.
.
pz
ee
ad
.p
w
w
Analog Filter
1 Analog filters are used for filtering analog signals.
w
2 Analog filters are designed with various components like resistor, inductor and
capacitor
3 Analog filters less accurate & because of component tolerance of active
components & more sensitive to environmental changes.
www.padeepz.net
www.padeepz.net
4 Less flexible
5 Filter representation is in terms of system components.
6 An analog filter can only be changed by redesigning the filter circuit.
t
ne
Digital Filter
1 Digital filters are used for filtering digital sequences.
2 Digital Filters are designed with digital hardware like FF, counters shift registers,
ALU and software s like C or assembly language.
.
3 Digital filters are less sensitive to the environmental changes, noise and
pz
disturbances. Thus periodic calibration can be avoided. Also they are extremely
stable.
4 These are most flexible as software programs & control programs can be easily
modified. Several input signals can be filtered by one digital filter.
ee
5 Digital filters are represented by the difference equation.
6 A digital filter is programmable, i.e. its operation is determined by a program
stored in the processor's memory. This means the digital filter can easily be changed
without affecting the circuitry (hardware).
ad
Lowpass Filter
A lowpass filter is made up of a passband and a stopband, where the lower
w
frequencies Of the input signal are passed through while the higher frequencies are
attenuated.
w
www.padeepz.net
www.padeepz.net
t
. ne
Highpass Filter
pz
A highpass filter is made up of a stopband and a passband where the lower
frequencies of the input signal are attenuated while the higher frequencies are
passed. ee
ad
.p
Bandpass Filter
w
A bandpass filter is made up of two stopbands and one passband so that the lower
and higher frequencies of the input signal are attenuated while the intervening
w
www.padeepz.net
www.padeepz.net
t
. ne
pz
Bandstop Filter
A bandstop filter is made up of two passbands and one stopband so that the lower
and higher frequencies of the input signal are passed while the intervening
frequencies are attenuated. An idealized bandstop filter frequency response has the
following ee
ad
.p
Multipass Filter
w
A multipass filter begins with a stopband followed by more than one passband. By
w
default, a multipass filter in Digital Filter Designer consists of three passbands and
w
four stopbands. The frequencies of the input signal at the stopbands are attenuated
while those at the passbands are passed.
www.padeepz.net
www.padeepz.net
Multistop Filter
A multistop filter begins with a passband followed by more than one stopband. By
default, a multistop filter in Digital Filter Designer consists of three passbands and
two stopbands.
t
ne
All Pass Filter
An all pass filter is defined as a system that has a constant magnitude response for
.
all frequencies.
pz
|H(ω)| = 1 for 0 ≤ ω < ∏
The simplest example of an all pass filter is a pure delay system with system function
H(z) = Z-k. This is a low pass filter that has a linear phase characteristic.
ee
All Pass filters find application as phase equalizers. When placed in cascade with a
system that has an undesired phase response, a phase equalizers is designed to
compensate for the poor phase characteristic of the system and therefore to produce
ad
an overall linear phase response.
1. Ideal filters have a constant gain (usually taken as unity gain) passband
characteristic and zero gain in their stop band.
w
Digital filters are of two types. Finite Impulse Response Digital Filter & Infinite
Impulse Response Digital Filter
www.padeepz.net
www.padeepz.net
t
. ne
pz
ee
ad
.p
w
w
M Thus the unit sample response exists for the duration from 0 to M-1.
2. FIR systems are non recursive. Thus output of FIR filter depends upon present
and past inputs.
www.padeepz.net
www.padeepz.net
t
4. FIR systems has limited or finite memory requirements.
ne
5. FIR filters are always stable
6. FIR filters can have an exactly linear phase response so that no phase distortion is
introduced in the signal by the filter.
.
7. The effect of using finite word length to implement filter, noise and quantization
pz
errors are less severe in FIR than in IIR.
8. All zero filters
9. FIR filters are generally used if no phasedistortion is desired.
Example:
ee
System described by
Y(n) = 0.5 x(n) + 0.5 x(n-1) is FIR filter.
h(n)={0.5,0.5}
ad
1. IIR system has infinite duration unit sample response. i. e h(n) = 0 for n<0 Thus
the unit sample response exists for the duration from 0 to ∞.
w
2. IIR systems are recursive. Thus they use feedback. Thus output of IIR filter
depends upon present and past inputs as well as past outputs
3. Difference equation of the LSI system for IIR filters becomes
w
w
www.padeepz.net
www.padeepz.net
6. IIR filter is usually more efficient design in terms of computation time and
memory requirements. IIR systems usually requires less processing time and storage
as compared with FIR.
7. Analogue filters can be easily and readily transformed into equivalent IIR digital
filter. But same is not possible in FIR because that have no analogue counterpart.
t
ne
8. Poles as well as zeros are present.
9. IIR filters are generally used if sharp cutoff and high throughput is required.
Example:
System described by
.
pz
Y(n) = y(n-1) + x(n) is IIR filter.
h(n)=an u(n) for n≥0
ee
STRUCTURES FOR FIR SYSTEMS
3. Frequency-Sampling Structures
4. Lattice structures.
w
The convolution of h(n) and x(n) for FIR systems can be written
w
www.padeepz.net
www.padeepz.net
Implementation of direct form structure of FIR filter is based upon the above
equation.
t
. ne
pz
1. There are M-1 unit delay blocks. One unit delay block requires one memory
location. ee
Hence direct form structure requires M-1 memory locations.
ad
2. The multiplication of h(k) and x(n-k) is performed for 0 to M-1 terms. Hence M
multiplications and M-1 additions are required.
3. Direct form structure is often called as transversal or tapped delay line filter.
.p
In cascade form, stages are cascaded (connected) in series. The output of one system
w
is input to another. Thus total K number of stages are cascaded. The total system
function 'H' is given by
H= H1(z) . H2(z)……………………. Hk(z) (1)
w
www.padeepz.net
www.padeepz.net
t
Each H1(z), H2(z)… etc is a second order section and it is realized by the direct form
ne
as shown in below figure.
System function for FIR systems
.
pz
Expanding the above terms we have
H(z)= H1(z) . H2(z)……………………. Hk(z)
ee
ad
1.
DIRECT FORM STRUCTURE FOR IIR SYSTEMS
www.padeepz.net
www.padeepz.net
t
. ne
pz
Overall IIR system can be realized as cascade of two function H1(z) and H2(z). Here
H1(z) represents zeros of H(z) and H2(z) represents all poles of H(z).
ee
ad
.p
w
w
w
www.padeepz.net
www.padeepz.net
t
2. There are M+N-1 unit delay blocks. One unit delay block requires one
ne
memory location. Hence direct form structure requires M+N-1 memory
locations.
.
M+N number of additions and M+N+1 number of memory locations.
pz
DIRECT FORM - II
ee
1. Direct form realization of H(z) can be obtained by cascading the realization of
H1(z) which is all pole system and H2(z) which is all zero system.
2. Two delay elements of all pole and all zero system can be merged into single
ad
delay element.
www.padeepz.net
www.padeepz.net
t
. ne
pz
ee
ad
.p
is input to another. Thus total K number of stages are cascaded. The total system
function 'H' is given by
w
www.padeepz.net
www.padeepz.net
t
. ne
Each H1(z), H2(z)… etc is a second order section and it is realized by the direct form
pz
as shown in below figure.
System function for IIR systems
ee
ad
www.padeepz.net
www.padeepz.net
t
ne
The above system function can be expanded in partial fraction as follows
.
H(z) = C + H1(z) + H2(z)…………………….+ Hk(z) (3)
pz
Where C is constant and Hk(z) is given as
ee
ad
.p
w
w
w
www.padeepz.net
www.padeepz.net
IMPULSE INVARIANCE
BILINEAR TRANSFORMATION
t
ne
BUTTERWORTH APPROXIMATION
.
pz
Impulse Invariance Method is simplest method used for designing IIR Filters.
Important Features of this Method are
ee
1. In impulse variance method, Analog filters are converted into digital filter just by
replacing unit sample response of the digital filter by the sampled version of impulse
response of analog filter. Sampled signal is obtained by putting t=nT hence
h(n) = ha(nT) n=0,1,2. ………….
ad
where h(n) is the unit sample response of digital filter and T is sampling interval.
2. But the main disadvantage of this method is that it does not correspond to simple
.p
4. Because of these factors, its application is limited to design low frequency filters
like LPF or a limited class of band pass filters.
www.padeepz.net
www.padeepz.net
t
ne
Here we have three condition
1. If σ = 0 then r=1
.
pz
2. If σ < 0 then 0 < r < 1
3. If σ > 0 then r> 1
Thus
1.
ee
Left side of s-plane is mapped inside the unit circle.
2. Right side of s-plane is mapped outside the unit circle.
3. jΩ axis is in s-plane is mapped on the unit circle.
ad
.p
w
w
w
www.padeepz.net
www.padeepz.net
t
. ne
pz
ee
CONVERSION OF ANALOG FILTER INTO DIGITAL FILTER
where pk are the poles of the analog filter and ck are the coefficients of partial
fraction expansion. The impulse response of the analog filter ha(t) is obtained by
w
The unit sample response of the digital filter is obtained by uniform sampling of
ha(t). h(n) = ha(nT)
n=0,1,2. ………….
www.padeepz.net
www.padeepz.net
t
. ne
Using the standard relation and comparing equation (1) and (4) system function of
pz
digital filter is given as
ee
STANDARD RELATIONS IN IIR DESIGN
ad
.p
w
w
www.padeepz.net
www.padeepz.net
t
ne
IIR FILTER DESIGN - BILINEAR TRANSFORMATION METHOD (BZT)
.
pz
The method of filter design by impulse invariance suffers from aliasing. Hence in
order to overcome this drawback Bilinear transformation method is designed. In
analogue domain frequency axis is an infinitely long straight line while sampled data
ee
z plane it is unit circle radius. The bilinear transformation is the method of squashing
the infinite straight analog frequency axis so that it becomes finite.
3. There is one to one correspondence between continuous time and discrete time
frequency points. Entire range in Ω is mapped only once into the range -∏≤ω≤∏.
w
www.padeepz.net
www.padeepz.net
response of digital filter is expanded at the lower frequencies and compressed at the
higher frequencies in comparison of the analog filter.
5. But the main disadvantage of frequency warping is that it does change the shape
t
of the desired filter frequency response. In particular, it changes the shape of the
ne
transition bands.
.
Z is represented as rejω in polar form and relationship between Z plane and S plane
pz
in BZT method is given as
ee
ad
.p
www.padeepz.net
www.padeepz.net
When r =1
t
. ne
The above equations shows that in BZT frequency relationship is non-linear. The
pz
frequency relationship is plotted as
ee
ad
.p
METHOD.
w
www.padeepz.net
www.padeepz.net
t
. ne
pz
ee
Impulse Invariance
1. In this method IIR filters are designed having a unit sample response h(n) that is
sampled version of the impulse response of the analog filter.
2. In this method small value of T is selected to minimize the effect of aliasing.
ad
3. They are generally used for low frequencies like design of IIR LPF and a limited
class of bandpass filter
4. Frequency relationship is linear.
5. All poles are mapped from the s plane to the z plane by the relationship Zk= epkT.
.p
But the zeros in two domain does not satisfy the same relationship.
w
Bilinear Transformation
1. This method of IIR filters design is based on the trapezoidal formula for numerical
integration.
w
components.
3. For designing of LPF, HPF and almost all types of Band pass and band stop filters
this method is used.
www.padeepz.net
www.padeepz.net
t
ne
LPF AND HPF ANALOG BUTTERWORTH FILTER TRANSFER
FUNCTION
.
pz
ee
METHOD FOR DESIGNING DIGITAL FILTERS USING BZT
ad
step 2. Find out the value of frequency scaled analog transfer function
w
w
www.padeepz.net
www.padeepz.net
Apply BZT. i.e Replace s by the ((z-1)/(z+1)). And find out the desired transfer
function of digital function.
t
Example:
ne
Q) Design first order high pass butterworth filter whose cutoff frequency is 1 kHz at
sampling frequency of 104 sps. Use BZT Method
.
pz
Step 1. To find out the cutoff frequency
ωc = 2∏f
ee
= 2000 rad/sec
For First order HPF transfer function H(s) = s/(s+1) Scaled transfer function H*(s)
= H(s) |s=s/ωc*
w
Step 4. Find out the digital filter transfer function. Replace s by (z-1)/(z+1)
w
www.padeepz.net
www.padeepz.net
t
Q) Design second order low pass butterworth filter whose cutoff frequency is 1 kHz
at sampling frequency of 104 sps.
ne
Q) First order low pass butterworth filter whose bandwidth is known to be 1 rad/sec
. Use BZT method to design digital filter of 20 Hz bandwidth at sampling frequency
.
60 sps.
pz
Q) Second order low pass butterworth filter whose bandwidth is known to be 1
rad/sec . Use BZT method to obtain transfer function H(z) of digital filter of 3 DB
cutoff frequency of 150 Hz and sampling frequency 1.28 kHz.
ee
Q) The transfer function is given as s2+1 / s 2+s+1 The function is for Notch filter
with frequency 1 rad/sec. Design digital Notch filter with the following specification
ad
The filter passes all frequencies below Ωc. This is called passband of the filter. Also
the filter blocks all the frequencies above Ωc. This is called stopband of the filter.
w
ideal characteristic are used. Such approximations are standard and used for filter
design.
www.padeepz.net
www.padeepz.net
t
ne
Butterworth filters are defined by the property that the magnitude response is
maximally flat in the passband.
.
pz
ee
ad
.p
w
w
w
www.padeepz.net
www.padeepz.net
t
. ne
pz
ee
ad
.p
w
w
w
www.padeepz.net
www.padeepz.net
t
required to get ideal characteristic.
. ne
pz
ee
ad
.p
w
w
w
www.padeepz.net
www.padeepz.net
t
. ne
pz
ee
Ap= attenuation in passband.
As= attenuation in stopband.
ad
Ωp = passband edge frequency
Ωs = stopband edge frequency
.p
www.padeepz.net
www.padeepz.net
t
. ne
pz
ee
ad
.p
w
w
w
www.padeepz.net
www.padeepz.net
t
. ne
pz
ee
ad
.p
www.padeepz.net
www.padeepz.net
t
. ne
pz
Filter Type - Low Pass Filter
Ap - 0.89125
As - 0.17783
ee
Ωp - 0.2∏
Ωs - 0.3∏
ad
Step 1) To convert specification to equivalent analog filter.
N= 5.88
www.padeepz.net
www.padeepz.net
t
ne
Hence N=6
.
pz
cutoff frequency Ωc = 0.7032
ee
Step 4) To find out the poles of analog filter system function.
ad
.p
w
w
w
For stable filter all poles lying on the left side of s plane is selected. Hence
www.padeepz.net
www.padeepz.net
t
ne
Step 5) To determine the system function (Analog Filter)
.
pz
ee
ad
.p
(In Bilinear transformation replace s by the term ((z-1)/(z+1)) and find out the
w
www.padeepz.net
www.padeepz.net
Ap= -1 db at 0.2∏
As= -15 db at 0.3∏
t
ne
a) Calculate N and Pole location
.
pz
Q) Obtain transfer function of a lowpass digital filter meeting specifications
Cutoff 0-60Hz
Stopband > 85Hz
ee
Stopband attenuation > 15 db
Sampling frequency= 256 Hz . use butterworth characteristic.
Q) Design second order low pass butterworth filter whose cutoff frequency is 1 kHz
ad
at sampling frequency of 104 sps. Use BZT and Butterworth approximation.
FREQUENCY TRANSFORMATION
.p
When the cutoff frequency Ωc of the low pass filter is equal to 1 then it is called
normalized filter. Frequency transformation techniques are used to generate High
pass filter, Bandpass and bandstop filter from the lowpass filter system function.
w
www.padeepz.net
www.padeepz.net
t
. ne
pz
ee
FREQUENCY TRANSFORMATION ((DIGITAL FILTER)
ad
.p
w
w
w
Example:
www.padeepz.net
www.padeepz.net
t
ne
Step 2. LPF to HPF transformation
.
transfer function H*(s) = H(s) |s=ωc*/s H*(s)= s/(s + 0.7265)
pz
Step 3. Find out the digital filter transfer function. Replace s by (z-1)/(z+1)
ee
Q) Design second order band pass butterworth filter whose passband of 200 Hz and
ad
300 Hz and sampling frequency is 2000 Hz. Use BZT and Frequency transformation.
Q) Design second order band pass butterworth filter which meet following
specification Lower cutoff frequency = 210 Hz
Upper cutoff frequency = 330 Hz Sampling Frequency = 960 sps
.p
www.padeepz.net