UNIVERSITY OF BAHRI
COLLAGE OF ENGINEERING AND ARCHITECTURE
ELECTERICAL ENGINEERING (control)
4th
year – 8th
semester
Report about
digital filters design
Present by :
1.‫محمد‬‫إبراهيم‬‫بالل‬‫احمد‬
2.‫معاذ‬‫عبدهللا‬‫إبراهيم‬‫محمدعلي‬
3.‫محسن‬‫عبد‬‫الماجد‬‫احمد‬‫إسماعيل‬
Supervisor :
Dr. zain alabdeen
1. INTRODUCTION:
It is sometimes desirable to have circuits capable of selectively filtering one frequency or range
of frequencies out of a mix of different frequencies in a circuit. A circuit designed to perform this
frequency selection is called a filter circuit, or simply a filter. A common need for filter circuits
is in high-performance stereo systems, where certain ranges of audio frequencies need to be
amplified or suppressed for best sound quality and power efficiency. You may be familiar with
equalizers, which allow the amplitudes of several frequency ranges to be adjusted to suit the
listener's taste and acoustic properties of the listening area. You may also be familiar with
crossover networks, which block certain ranges of frequencies from reaching speakers. A tweeter
(high-frequency speaker) is inefficient at reproducing low-frequency signals such as drum beats,
so a crossover circuit is connected between the tweeter and the stereo's output terminals to block
low-frequency signals, only passing high-frequency signals to the speaker's connection
terminals. This gives better audio system efficiency and thus better performance. Both equalizers
and crossover networks are examples of filters, designed to accomplish filtering of certain
frequencies.
FILTER:
A filter is one, which rejects unwanted frequencies from the input signal and allows
the desired frequencies. The range of frequencies of signal that are passed through the filter is
called passband and those frequencies that are blocked is called stopband.
The analog and digital filters can be divided into four sub categories –
 Lowpass filter
 Highpass filter
 Bandpass filter
 Bandreject filter
2. TYPES OF FILTER:
There are basically two types of filters in application purpose –
o Analog filter designing
o Digital filter designing
Analog filter:
Analog filter is used to filter out signals before conversion to the digital form, meaning they are
used before ADC in the circuit mainly in the analog part of the system. Analog filters are
designed using discrete components such as R (resistor), L (inductor) and C (capacitor).
RF/Microwave based analog filters are designed based on microstrip,strip line circuits or
waveguides etc.
Digitalfilter
Digital filter is used to filter out signals after conversion of the analog signal to the digital form ,
meaning they are used after ADC in the circuit mainly in the digital processing part of the
system. They are referred mainly as FIR or IIR filter, mainly designed in the form of software
ported either on FPGA/DSP .
Examples: FIR and IIR filters developed using C or assembly code or using any other languages.
These are ported on FPGA/DSP processor
.
xn yn
Digital Filter
Sampling
frequency
fS
A
D
C
D
A
C
x(t) y(t)
Analog
anti-
aliasing
filter
Analog
smoothing
filter
table (1) distinguish between continuous and digital filter.
CLASSIFICATIONOF DIGITAL FILTER :-
A digital filter transfer function can be realized in variety of way. There are
basically two types of realization
o Recursive
o Nonrecursive
Popularly those two types are known as –
o Infinite Impulse Response (IIR)
o Finite Impulse Response (FIR)
3. THE DESIGN OF A DIGITAL FILTER.
THE DESIGN OF A DIGITAL FILTER IS CARRIED OUT IN THREE STEPS:
1. specifications: they are determined by the applications
2. approximations: once the specification are defined, we use various concepts and mathematics that
we studied so far to come up with a filter description that approximates the given set of
specifications. (in detail)
3. implementation: the product of the above step is a filter description in the form of either a
difference equation, or a system function h(z), or an impulse response h(n). from this description
we implement the filter in hardware or through software on a computer.
IIR FILTER DESIGN:
For recursive realization the current output y(n) is a function of past outputs and
past and present inputs. This form corresponds to an Infinite Impulse Response (IIR) digital
filter. In this section we will discuss type of realization.
IIR filter do not have linear phase response. These filter are easily realized recursively
and are less flexibility, usually limited to specific kind of filters. The round off noise of IIR filter
is more than FIR filter.
IIR filter can be realized in many forms. They are
o Direct form – I realization,
o Direct form – II realization,
o Transposed direct form realization,
o Cascade form realization
o Parallel form realization
o Lattice – ladder structure
DIRECT FORM – I REALIZATION:
Let us consider an LTI recursive system described by the difference equation –
Y(n) = - ∑ 𝑎 𝑘
𝑁
𝑘=1 𝑦(𝑛 − 𝑘) + ∑ 𝑏 𝑘
𝑁
𝑘=1 𝑥(𝑛 − 𝑘)
= - a1y(n-1) – a2y(n-2) … - aN-1y(n-N+1) - aN y(n-N) +b0 x(n) + b1 x(n-1) + … +
bM x(n-M)
Let, b0 x(n) + b1 x(n-1) + … + bM x(n-M) = v[n]
Then, y(n) = - a1y(n-1) – a2y(n-2) … - aN-1y(n-N+1) - aN y(n-N) + v[n]
Fig : direct I realization of equation.
Direct form – II realization:
Consider the difference equation of the form
Y(n) = - ∑ 𝑎 𝑘
𝑁
𝑘=1 𝑦(𝑛 − 𝑘) + ∑ 𝑏𝑘
𝑁
𝑘=1 𝑥(𝑛 − 𝑘)
The system function of above difference equation can be expressed as
H(z) =
𝑌(𝑧)
𝑋(𝑧)
=
∑ 𝑏 𝑘 𝑧−𝑘𝑁
𝑘=0
1+∑ 𝑎 𝑘 𝑧−𝑘𝑁
𝑘=1
Let,
𝑌(𝑧)
𝑋( 𝑧)
=
𝑌(𝑧)
𝑤(𝑧)
*
𝑤(𝑧)
𝑋(𝑧)
where,
𝑤(𝑧)
𝑋(𝑧)
=
1
1+∑ 𝑎 𝑘 𝑧−𝑘𝑁
𝑘=1
And,
𝑌(𝑧)
𝑤(𝑧)
= ∑ 𝑏 𝑘 𝑧−𝑘𝑁
𝑘=0
Fig : direct II realization of equation
TRANSPOSED DIRECT FORM REALIZATION:
Representation of Direct Form II with signal flow graphs is given as –
The transpose of a structure is defined by the following operations:
o Reverse the direction of all branches in the signal flow graph.
o Interchange the inputs and outputs.
o Reverse the roles of all nodes in the flowgraph.
o Summing points become branching points.
o Brunching points become summing points.
According to transposition theorem, the system transfer function remain unchanged by
transposition.
     
   
     
   
   nwny
nwnw
nwbnwbnw
nwnw
nxnawnw
3
24
41203
12
41
1





     
     1
1
1110
11


nwbnwbny
nxnawnw
CASCADE FORM REALIZATION:
Let us consider an IIR system with system function –
H(z) = H1(z) H2 (z) … Hk(z)
This can be represent as the block diagram –
Now realize each Hk(z) in direct form II and cascade all structures.
General form for cascade implementation is -
More practical form in 2nd order systems is –
 
    
    











 21
21
1
11
1
1
1
11
1
1
111
111
N
k
kk
N
k
k
M
k
kk
M
k
k
zdzdzc
zgzgzf
AzH
  





1
1
2
2
1
1
2
2
1
10
1
M
k kk
kkk
zaza
zbzbb
zH
PARALLEL FORM REALIZATION:
A parallel form realization of an IIR system can be obtained by performing a partial
expansion of –
H(z) = c + ∑
𝑐 𝑘
1−𝑝 𝑘 𝑧−1
𝑁
𝑘=1
Where, { 𝑝 𝑘} are the poles.
H(z) = c +
𝑐1
1−𝑝1 𝑧−1 +
𝑐2
1−𝑝2 𝑧−1 + … +
𝑐 𝑁
1−𝑝 𝑁 𝑧−1
H(z) =
𝑌(𝑧)
𝑋(𝑧)
= c + H1(z) +H2 (z) + … +HN(z)
Now, 𝑌(𝑧) = c X(z) + H1(z) X(z) + H2(z) X(z) + … + HN(z) X(z)
The transfer function can be also represent as -
   







SP N
k kk
kk
N
k
k
k
zaza
zee
zCzH
1
2
2
1
1
1
10
0 1
Fig : Parallel form realization of equation
FIR FILTER DESIGN:
For non-recursive realization current output sample y(n) is a function of only past and
present inputs. This form corresponds to a Finite Impulse Response (FIR) digital filter.
In many digital processing applications FIR filters are preferred over their IIR
counterparts. The following main advantages of FIR filter over IIR filter are -
 FIR filters are always stable.
 FIR filters with exactly linear phase can easily be designed.
 FIR filters are free of limit cycle oscillation, when implemented on a finite word length
digital system.
 FIR filters can be realized in both recursive and non-recursive structures.
The disadvantage of FIR filters are –
 The implementation of narrow transition band FIR filters are very costly, as it requires
considerably more arithmetic operations and hardware components such as multipliers,
adder and delay elements.
 Memory requirement and execution time are very high.
4. Designof FIR filters using windows:
There are different window structures to design a FIR filter, they are –
 Rectangular window
 The Triangular or Bartlett window
 Raised cosine window
 Hanning window
 Hamming window
 Blackman window
 Kaiser window
FILTER DESIGN BY WINDOWING:
The basic characteristics of Filter Design by Windowing are –
 Simplest way of designing FIR filters
 Method is all discrete-time no continuous-time involved
 Start with ideal frequency response
 Choose ideal frequency response as desired response
 Most ideal impulse responses are of infinite length
 The easiest way to obtain a causal FIR filter from ideal is
   




n
nj
d
j
d enheH 
    




deeHnh njj
dd 

2
1
 
 


 

else
Mnnh
nh d
0
0
 More generally
 The central lobe of the frequency response of the window should contain most of the
energy and should be narrow.
 The highest side lobe level of the frequency response should be small.
 The side lobe of the frequency response should decrease in energy rapidly as 𝜔 tends to
𝜋.
Windowing in Frequency Domain
Windowed frequency response can be expressed as mathematically –
The windowed version is smeared version of desired response is expressed in the given below
figure –
       


 

else
Mn
nwnwnhnh d
0
01
where
     
  





deWeHeH jj
d
j 


2
1
Here, if w[n]=1 for all n, then W(ej) is pulse train with 2 period .
Properties of Windows:
 Prefer windows that concentrate around DC in frequency
-Less smearing, closer approximation
 Prefer window that has minimal span in time
-Less coefficient in designed filter, computationally efficient
 So we want concentration in time and in frequency
- Contradictory requirements
RECTANGULAR WINDOW:
 
 
  
 2/sin
2/1sin
1
1 2/
1
0 



 



 





M
e
e
e
eeW Mj
j
MjM
n
njj
• Narrowest main lob
– 4/(M+1)
– Sharpest transitions at discontinuities in frequency
• Large side lobs
– -13 dB
– Large oscillation around discontinuities
Simplest window possible W[n] = 1 for 0 ≤ n ≤ M
0 elsewher
BARTLETT (TRIANGULAR) WINDOW
• Medium main lob
– 8/M
– Side lobs
– -25 dB
– Hamming window performs better
• Simple equation
 








else
MnMMn
MnMn
nw
0
2//22
2/0/2
• Medium main lob
– 8/M
– Side lobs
– -31 dB
– Hamming window performs better
• Same complexity as Hamming
 



















else
Mn
M
n
nw
0
0
2
cos1
2
1 
HAMMING WINDOW:
• Medium main lob
– 8/M
– Good side lobs
– -41 dB
– Simpler than Blackman
 












else
Mn
M
n
nw
0
0
2
cos46.054.0

BLACKMAN WINDOW:
• Large main lob
– 12/M
– Very good side lobs
– -57 dB
– Complex equation
Kaiser Window Filter Design Method:
 


















else
Mn
M
n
M
n
nw
0
0
4
cos08.0
2
cos5.042.0

• Parameterized equation forming a set of windows
– Parameter to change main-lob width and side-lob area trade-off
– I0(.) represents zeroth-order modified Bessel function of 1st kind
 
 





















 


else
Mn
I
M
Mn
I
nw
0
0
2/
2/
1
0
2
0


MATLABPROGRAMMING SIMULATION:
IIR FILTER METHOD
The following table summarizes the various filter methods in the toolbox and lists the functions available
to implement these methods.
Toolbox Filters Methods and Available Function
2.3.2 FIR FILTER
FIR FILTER
Window-based FIR filter design
SYNTAX
b = fir1(n,Wn)
b = fir1(n,Wn,ftype)
b = fir1(___,window)
b = fir1(___,scaleopt)
DESCRIPTION
b = fir1(n,Wn) uses a Hamming window to design an nth-order lowpass, bandpass, or multiband FIR filter with
linear phase.The filter type depends on the number of elements of Wn.
b = fir1(n,Wn,ftype) designs a lowpass, highpass, bandpass, bandstop, or multiband filter, depending on the value
of ftype and the number of elements of Wn.
b = fir1(___,window) designs the filter using the vector specified in window and any of the arguments from previous
syntaxes.
b = fir1(___,scaleopt) additionally specifies whether or not the magnitude response ofthe filter is normalized.
Note: Use fir2 for windowed filters with arbitrary frequency response.
5. CASE STUDY
by method Window-based FIR filter design
design the following by using matlab
A. Design a 48th-order FIR bandpass filter with passband rad/sample.
Visualize its magnitude and phase responses.
B. Design a lowpass filter with the same specifications. Filter the signal and compare the result to
the original. Use the same y-axis scale for both plots.
C. Design a 34th-order FIR highpass filter to attenuate the components of the signal below Fs/4. Use
a cutoff frequency of 0.48 and a Chebyshev window with 30 dB of ripple.
D. Filter the signal. Display the original and highpass-filtered signals. Use the same y-axis scale for
both plots
solution
A. MATLAB CODE
b = fir1(48,[0.35 0.65]);
freqz(b,1,512)
B.
matlab code
>> blo = fir1(34,0.48,chebwin(35,30));
outlo = filter(blo,1,y);
subplot(2,1,1)
plot(t,y)
title('Original Signal')
ys = ylim;
subplot(2,1,2)
plot(t,outlo)
title('Lowpass Filtered Signal')
xlabel('Time (s)')
ylim(ys)
C.
matlab code
>> load chirp
t = (0:length(y)-1)/Fs;
bhi = fir1(34,0.48,'high',chebwin(35,30));
freqz(bhi,1)
D.
matlab code
outhi = filter(bhi,1,y);
subplot(2,1,1)
plot(t,y)
title('Original Signal')
ys = ylim;
subplot(2,1,2)
plot(t,outhi)
title('Highpass Filtered Signal')
xlabel('Time (s)')
ylim(ys)
4. CONCLUSION
 IIR filters are difficult to control and have no particular phase, whereas FIR filters make a
linear phase always possible. IIR can be unstable, whereas FIR is always stable. IIR,
when compared to FIR, can have limited cycles, but FIR has no limited cycles. IIR is
derived from analog, whereas FIR has no analog history. IIR filters make polyphase
implementation possible, whereas FIR can always be made casual.

 Our Command
FIR stands for Finite IR filters, whereas IIR stands for Infinite IR filters. IIR and FIR
filters are utilized for filtration in digital systems. FIR filters are more widely in use,
because they differ in response. FIR filters have only numerators when compared to IIR
filters, which have both numerators and denominators.
5. REFERANCE
here are some various sites from where we collectsome of important information related to our
report .these are : -
1. http://www.rfwireless-world.com/Terminology/analog-filter-vs-digital-filter.html
2. https://ch.mathworks.com/help/signal/ug/iir-filter-
design.html?s_tid=gn_loc_drop#brbq5qb
3. “Design of IIR Filter” by K.S Chandra, M.Tech, IIT-Bombay,Jan-2006
4. “Digital Filter Design” by Prof.A.G. Constantinides, University of Auckland, 2006
5. WWW.WIKIPEDIA.ORG
6. WWW.TUTORIALPOINT.COM
7. DIGITAL SIGNAL PROCESSING BOOKS
BY RAMESH BABU

More Related Content

PPTX
Linear Predictive Coding
PPT
digital filters
PPT
Fir and iir filter_design
PPTX
Design of Filters PPT
PPTX
NYQUIST CRITERION FOR ZERO ISI
PPSX
VLSI Testing Techniques
PDF
EC8562 DSP Viva Questions
PPTX
Orthogonal Frequency Division Multiplexing (OFDM)
Linear Predictive Coding
digital filters
Fir and iir filter_design
Design of Filters PPT
NYQUIST CRITERION FOR ZERO ISI
VLSI Testing Techniques
EC8562 DSP Viva Questions
Orthogonal Frequency Division Multiplexing (OFDM)

What's hot (20)

PPTX
5. convolution and correlation of discrete time signals
PDF
Design of FIR filters
PPTX
Overview of sampling
PPTX
Adaptive equalization
PPTX
Lecture Notes: EEEC6440315 Communication Systems - Inter Symbol Interference...
PPT
Du binary signalling
PPTX
Butterworth filter
PPTX
Design of digital filters
PPTX
FILTER DESIGN
PPT
PPTX
MINIMUM SHIFT KEYING(MSK)
PPT
Equalization
PPTX
TYPES OF ANTENNA
PDF
MIMO Channel Capacity
PPT
Spread spectrum modulation
PDF
Sampling Theorem
PDF
Chapter4
PPTX
IIR filter
PPT
Beamforming antennas (1)
PPTX
Super heterodyne receiver
5. convolution and correlation of discrete time signals
Design of FIR filters
Overview of sampling
Adaptive equalization
Lecture Notes: EEEC6440315 Communication Systems - Inter Symbol Interference...
Du binary signalling
Butterworth filter
Design of digital filters
FILTER DESIGN
MINIMUM SHIFT KEYING(MSK)
Equalization
TYPES OF ANTENNA
MIMO Channel Capacity
Spread spectrum modulation
Sampling Theorem
Chapter4
IIR filter
Beamforming antennas (1)
Super heterodyne receiver
Ad

Similar to digital filter design (20)

PPTX
Dss
PDF
DSP_FOEHU - Lec 07 - Digital Filters
PDF
Paper id 252014114
PPT
BUTTERWORTH FILTER AND CHEBYSHEW FILTERS
PDF
Dsp 2marks
PDF
Simulink based design simulations of band pass fir filter
PDF
Simulink based design simulations of band pass fir filter
PPTX
FIR Filters Lecture (What are FIR FIlters)pptx
PDF
Design Technique of Bandpass FIR filter using Various Window Function
PDF
Design Technique of Bandpass FIR filter using Various Window Function
PPTX
Chapter10. Realization of Digital Filter.pptx
PDF
SIMULATION OF FIR FILTER BASED ON CORDIC ALGORITHM
PDF
DESIGN OF QUATERNARY LOGICAL CIRCUIT USING VOLTAGE AND CURRENT MODE LOGIC
PDF
SIMULATION OF FIR FILTER BASED ON CORDIC ALGORITHM
PDF
DSP_FOEHU - Lec 10 - FIR Filter Design
DOCX
dsp module 4 pptpptrpppptxppppppppp.docx
PPTX
DSP_Filters_150505.pptx
PDF
DSP_FOEHU - Lec 11 - IIR Filter Design
PDF
Lt2419681970
PDF
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
Dss
DSP_FOEHU - Lec 07 - Digital Filters
Paper id 252014114
BUTTERWORTH FILTER AND CHEBYSHEW FILTERS
Dsp 2marks
Simulink based design simulations of band pass fir filter
Simulink based design simulations of band pass fir filter
FIR Filters Lecture (What are FIR FIlters)pptx
Design Technique of Bandpass FIR filter using Various Window Function
Design Technique of Bandpass FIR filter using Various Window Function
Chapter10. Realization of Digital Filter.pptx
SIMULATION OF FIR FILTER BASED ON CORDIC ALGORITHM
DESIGN OF QUATERNARY LOGICAL CIRCUIT USING VOLTAGE AND CURRENT MODE LOGIC
SIMULATION OF FIR FILTER BASED ON CORDIC ALGORITHM
DSP_FOEHU - Lec 10 - FIR Filter Design
dsp module 4 pptpptrpppptxppppppppp.docx
DSP_Filters_150505.pptx
DSP_FOEHU - Lec 11 - IIR Filter Design
Lt2419681970
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
Ad

Recently uploaded (20)

PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PPTX
communication and presentation skills 01
PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
PPTX
introduction to high performance computing
PDF
22EC502-MICROCONTROLLER AND INTERFACING-8051 MICROCONTROLLER.pdf
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PPTX
CyberSecurity Mobile and Wireless Devices
PPTX
Chemical Technological Processes, Feasibility Study and Chemical Process Indu...
PPTX
Fundamentals of Mechanical Engineering.pptx
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PPTX
Amdahl’s law is explained in the above power point presentations
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PPTX
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PPT
Total quality management ppt for engineering students
PPTX
Information Storage and Retrieval Techniques Unit III
PPTX
Current and future trends in Computer Vision.pptx
PDF
Improvement effect of pyrolyzed agro-food biochar on the properties of.pdf
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
communication and presentation skills 01
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
introduction to high performance computing
22EC502-MICROCONTROLLER AND INTERFACING-8051 MICROCONTROLLER.pdf
III.4.1.2_The_Space_Environment.p pdffdf
CyberSecurity Mobile and Wireless Devices
Chemical Technological Processes, Feasibility Study and Chemical Process Indu...
Fundamentals of Mechanical Engineering.pptx
"Array and Linked List in Data Structures with Types, Operations, Implementat...
Amdahl’s law is explained in the above power point presentations
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
Total quality management ppt for engineering students
Information Storage and Retrieval Techniques Unit III
Current and future trends in Computer Vision.pptx
Improvement effect of pyrolyzed agro-food biochar on the properties of.pdf
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems

digital filter design

  • 1. UNIVERSITY OF BAHRI COLLAGE OF ENGINEERING AND ARCHITECTURE ELECTERICAL ENGINEERING (control) 4th year – 8th semester Report about digital filters design Present by : 1.‫محمد‬‫إبراهيم‬‫بالل‬‫احمد‬ 2.‫معاذ‬‫عبدهللا‬‫إبراهيم‬‫محمدعلي‬ 3.‫محسن‬‫عبد‬‫الماجد‬‫احمد‬‫إسماعيل‬ Supervisor : Dr. zain alabdeen
  • 2. 1. INTRODUCTION: It is sometimes desirable to have circuits capable of selectively filtering one frequency or range of frequencies out of a mix of different frequencies in a circuit. A circuit designed to perform this frequency selection is called a filter circuit, or simply a filter. A common need for filter circuits is in high-performance stereo systems, where certain ranges of audio frequencies need to be amplified or suppressed for best sound quality and power efficiency. You may be familiar with equalizers, which allow the amplitudes of several frequency ranges to be adjusted to suit the listener's taste and acoustic properties of the listening area. You may also be familiar with crossover networks, which block certain ranges of frequencies from reaching speakers. A tweeter (high-frequency speaker) is inefficient at reproducing low-frequency signals such as drum beats, so a crossover circuit is connected between the tweeter and the stereo's output terminals to block low-frequency signals, only passing high-frequency signals to the speaker's connection terminals. This gives better audio system efficiency and thus better performance. Both equalizers and crossover networks are examples of filters, designed to accomplish filtering of certain frequencies. FILTER: A filter is one, which rejects unwanted frequencies from the input signal and allows the desired frequencies. The range of frequencies of signal that are passed through the filter is called passband and those frequencies that are blocked is called stopband. The analog and digital filters can be divided into four sub categories –  Lowpass filter  Highpass filter  Bandpass filter  Bandreject filter
  • 3. 2. TYPES OF FILTER: There are basically two types of filters in application purpose – o Analog filter designing o Digital filter designing Analog filter: Analog filter is used to filter out signals before conversion to the digital form, meaning they are used before ADC in the circuit mainly in the analog part of the system. Analog filters are designed using discrete components such as R (resistor), L (inductor) and C (capacitor). RF/Microwave based analog filters are designed based on microstrip,strip line circuits or waveguides etc. Digitalfilter Digital filter is used to filter out signals after conversion of the analog signal to the digital form , meaning they are used after ADC in the circuit mainly in the digital processing part of the system. They are referred mainly as FIR or IIR filter, mainly designed in the form of software ported either on FPGA/DSP . Examples: FIR and IIR filters developed using C or assembly code or using any other languages. These are ported on FPGA/DSP processor . xn yn Digital Filter Sampling frequency fS A D C D A C x(t) y(t) Analog anti- aliasing filter Analog smoothing filter
  • 4. table (1) distinguish between continuous and digital filter. CLASSIFICATIONOF DIGITAL FILTER :- A digital filter transfer function can be realized in variety of way. There are basically two types of realization o Recursive o Nonrecursive Popularly those two types are known as – o Infinite Impulse Response (IIR) o Finite Impulse Response (FIR)
  • 5. 3. THE DESIGN OF A DIGITAL FILTER. THE DESIGN OF A DIGITAL FILTER IS CARRIED OUT IN THREE STEPS: 1. specifications: they are determined by the applications 2. approximations: once the specification are defined, we use various concepts and mathematics that we studied so far to come up with a filter description that approximates the given set of specifications. (in detail) 3. implementation: the product of the above step is a filter description in the form of either a difference equation, or a system function h(z), or an impulse response h(n). from this description we implement the filter in hardware or through software on a computer. IIR FILTER DESIGN: For recursive realization the current output y(n) is a function of past outputs and past and present inputs. This form corresponds to an Infinite Impulse Response (IIR) digital filter. In this section we will discuss type of realization. IIR filter do not have linear phase response. These filter are easily realized recursively and are less flexibility, usually limited to specific kind of filters. The round off noise of IIR filter is more than FIR filter. IIR filter can be realized in many forms. They are o Direct form – I realization, o Direct form – II realization, o Transposed direct form realization, o Cascade form realization o Parallel form realization o Lattice – ladder structure
  • 6. DIRECT FORM – I REALIZATION: Let us consider an LTI recursive system described by the difference equation – Y(n) = - ∑ 𝑎 𝑘 𝑁 𝑘=1 𝑦(𝑛 − 𝑘) + ∑ 𝑏 𝑘 𝑁 𝑘=1 𝑥(𝑛 − 𝑘) = - a1y(n-1) – a2y(n-2) … - aN-1y(n-N+1) - aN y(n-N) +b0 x(n) + b1 x(n-1) + … + bM x(n-M) Let, b0 x(n) + b1 x(n-1) + … + bM x(n-M) = v[n] Then, y(n) = - a1y(n-1) – a2y(n-2) … - aN-1y(n-N+1) - aN y(n-N) + v[n]
  • 7. Fig : direct I realization of equation.
  • 8. Direct form – II realization: Consider the difference equation of the form Y(n) = - ∑ 𝑎 𝑘 𝑁 𝑘=1 𝑦(𝑛 − 𝑘) + ∑ 𝑏𝑘 𝑁 𝑘=1 𝑥(𝑛 − 𝑘) The system function of above difference equation can be expressed as H(z) = 𝑌(𝑧) 𝑋(𝑧) = ∑ 𝑏 𝑘 𝑧−𝑘𝑁 𝑘=0 1+∑ 𝑎 𝑘 𝑧−𝑘𝑁 𝑘=1 Let, 𝑌(𝑧) 𝑋( 𝑧) = 𝑌(𝑧) 𝑤(𝑧) * 𝑤(𝑧) 𝑋(𝑧) where, 𝑤(𝑧) 𝑋(𝑧) = 1 1+∑ 𝑎 𝑘 𝑧−𝑘𝑁 𝑘=1 And, 𝑌(𝑧) 𝑤(𝑧) = ∑ 𝑏 𝑘 𝑧−𝑘𝑁 𝑘=0 Fig : direct II realization of equation
  • 9. TRANSPOSED DIRECT FORM REALIZATION: Representation of Direct Form II with signal flow graphs is given as – The transpose of a structure is defined by the following operations: o Reverse the direction of all branches in the signal flow graph. o Interchange the inputs and outputs. o Reverse the roles of all nodes in the flowgraph. o Summing points become branching points. o Brunching points become summing points. According to transposition theorem, the system transfer function remain unchanged by transposition.                        nwny nwnw nwbnwbnw nwnw nxnawnw 3 24 41203 12 41 1                 1 1 1110 11   nwbnwbny nxnawnw
  • 10. CASCADE FORM REALIZATION: Let us consider an IIR system with system function – H(z) = H1(z) H2 (z) … Hk(z) This can be represent as the block diagram – Now realize each Hk(z) in direct form II and cascade all structures. General form for cascade implementation is - More practical form in 2nd order systems is –                         21 21 1 11 1 1 1 11 1 1 111 111 N k kk N k k M k kk M k k zdzdzc zgzgzf AzH         1 1 2 2 1 1 2 2 1 10 1 M k kk kkk zaza zbzbb zH
  • 11. PARALLEL FORM REALIZATION: A parallel form realization of an IIR system can be obtained by performing a partial expansion of – H(z) = c + ∑ 𝑐 𝑘 1−𝑝 𝑘 𝑧−1 𝑁 𝑘=1 Where, { 𝑝 𝑘} are the poles. H(z) = c + 𝑐1 1−𝑝1 𝑧−1 + 𝑐2 1−𝑝2 𝑧−1 + … + 𝑐 𝑁 1−𝑝 𝑁 𝑧−1 H(z) = 𝑌(𝑧) 𝑋(𝑧) = c + H1(z) +H2 (z) + … +HN(z) Now, 𝑌(𝑧) = c X(z) + H1(z) X(z) + H2(z) X(z) + … + HN(z) X(z) The transfer function can be also represent as -            SP N k kk kk N k k k zaza zee zCzH 1 2 2 1 1 1 10 0 1
  • 12. Fig : Parallel form realization of equation FIR FILTER DESIGN: For non-recursive realization current output sample y(n) is a function of only past and present inputs. This form corresponds to a Finite Impulse Response (FIR) digital filter. In many digital processing applications FIR filters are preferred over their IIR counterparts. The following main advantages of FIR filter over IIR filter are -  FIR filters are always stable.  FIR filters with exactly linear phase can easily be designed.  FIR filters are free of limit cycle oscillation, when implemented on a finite word length digital system.  FIR filters can be realized in both recursive and non-recursive structures. The disadvantage of FIR filters are –
  • 13.  The implementation of narrow transition band FIR filters are very costly, as it requires considerably more arithmetic operations and hardware components such as multipliers, adder and delay elements.  Memory requirement and execution time are very high. 4. Designof FIR filters using windows: There are different window structures to design a FIR filter, they are –  Rectangular window  The Triangular or Bartlett window  Raised cosine window  Hanning window  Hamming window  Blackman window  Kaiser window FILTER DESIGN BY WINDOWING: The basic characteristics of Filter Design by Windowing are –  Simplest way of designing FIR filters  Method is all discrete-time no continuous-time involved  Start with ideal frequency response  Choose ideal frequency response as desired response  Most ideal impulse responses are of infinite length  The easiest way to obtain a causal FIR filter from ideal is         n nj d j d enheH           deeHnh njj dd   2 1          else Mnnh nh d 0 0
  • 14.  More generally  The central lobe of the frequency response of the window should contain most of the energy and should be narrow.  The highest side lobe level of the frequency response should be small.  The side lobe of the frequency response should decrease in energy rapidly as 𝜔 tends to 𝜋. Windowing in Frequency Domain Windowed frequency response can be expressed as mathematically – The windowed version is smeared version of desired response is expressed in the given below figure –              else Mn nwnwnhnh d 0 01 where               deWeHeH jj d j    2 1
  • 15. Here, if w[n]=1 for all n, then W(ej) is pulse train with 2 period . Properties of Windows:  Prefer windows that concentrate around DC in frequency -Less smearing, closer approximation  Prefer window that has minimal span in time -Less coefficient in designed filter, computationally efficient  So we want concentration in time and in frequency - Contradictory requirements RECTANGULAR WINDOW:         2/sin 2/1sin 1 1 2/ 1 0                 M e e e eeW Mj j MjM n njj
  • 16. • Narrowest main lob – 4/(M+1) – Sharpest transitions at discontinuities in frequency • Large side lobs – -13 dB – Large oscillation around discontinuities Simplest window possible W[n] = 1 for 0 ≤ n ≤ M 0 elsewher
  • 17. BARTLETT (TRIANGULAR) WINDOW • Medium main lob – 8/M – Side lobs – -25 dB – Hamming window performs better • Simple equation           else MnMMn MnMn nw 0 2//22 2/0/2
  • 18. • Medium main lob – 8/M – Side lobs – -31 dB – Hamming window performs better • Same complexity as Hamming                      else Mn M n nw 0 0 2 cos1 2 1 
  • 19. HAMMING WINDOW: • Medium main lob – 8/M – Good side lobs – -41 dB – Simpler than Blackman               else Mn M n nw 0 0 2 cos46.054.0 
  • 20. BLACKMAN WINDOW: • Large main lob – 12/M – Very good side lobs – -57 dB
  • 21. – Complex equation Kaiser Window Filter Design Method:                     else Mn M n M n nw 0 0 4 cos08.0 2 cos5.042.0 
  • 22. • Parameterized equation forming a set of windows – Parameter to change main-lob width and side-lob area trade-off – I0(.) represents zeroth-order modified Bessel function of 1st kind                              else Mn I M Mn I nw 0 0 2/ 2/ 1 0 2 0  
  • 23. MATLABPROGRAMMING SIMULATION: IIR FILTER METHOD The following table summarizes the various filter methods in the toolbox and lists the functions available to implement these methods. Toolbox Filters Methods and Available Function
  • 25. FIR FILTER Window-based FIR filter design SYNTAX b = fir1(n,Wn) b = fir1(n,Wn,ftype) b = fir1(___,window) b = fir1(___,scaleopt) DESCRIPTION b = fir1(n,Wn) uses a Hamming window to design an nth-order lowpass, bandpass, or multiband FIR filter with linear phase.The filter type depends on the number of elements of Wn. b = fir1(n,Wn,ftype) designs a lowpass, highpass, bandpass, bandstop, or multiband filter, depending on the value of ftype and the number of elements of Wn. b = fir1(___,window) designs the filter using the vector specified in window and any of the arguments from previous syntaxes. b = fir1(___,scaleopt) additionally specifies whether or not the magnitude response ofthe filter is normalized. Note: Use fir2 for windowed filters with arbitrary frequency response. 5. CASE STUDY by method Window-based FIR filter design design the following by using matlab A. Design a 48th-order FIR bandpass filter with passband rad/sample. Visualize its magnitude and phase responses. B. Design a lowpass filter with the same specifications. Filter the signal and compare the result to the original. Use the same y-axis scale for both plots.
  • 26. C. Design a 34th-order FIR highpass filter to attenuate the components of the signal below Fs/4. Use a cutoff frequency of 0.48 and a Chebyshev window with 30 dB of ripple. D. Filter the signal. Display the original and highpass-filtered signals. Use the same y-axis scale for both plots solution A. MATLAB CODE b = fir1(48,[0.35 0.65]); freqz(b,1,512) B. matlab code >> blo = fir1(34,0.48,chebwin(35,30));
  • 27. outlo = filter(blo,1,y); subplot(2,1,1) plot(t,y) title('Original Signal') ys = ylim; subplot(2,1,2) plot(t,outlo) title('Lowpass Filtered Signal') xlabel('Time (s)') ylim(ys)
  • 28. C. matlab code >> load chirp t = (0:length(y)-1)/Fs; bhi = fir1(34,0.48,'high',chebwin(35,30)); freqz(bhi,1)
  • 29. D. matlab code outhi = filter(bhi,1,y); subplot(2,1,1) plot(t,y) title('Original Signal') ys = ylim; subplot(2,1,2) plot(t,outhi) title('Highpass Filtered Signal') xlabel('Time (s)')
  • 31. 4. CONCLUSION  IIR filters are difficult to control and have no particular phase, whereas FIR filters make a linear phase always possible. IIR can be unstable, whereas FIR is always stable. IIR, when compared to FIR, can have limited cycles, but FIR has no limited cycles. IIR is derived from analog, whereas FIR has no analog history. IIR filters make polyphase implementation possible, whereas FIR can always be made casual.   Our Command FIR stands for Finite IR filters, whereas IIR stands for Infinite IR filters. IIR and FIR filters are utilized for filtration in digital systems. FIR filters are more widely in use, because they differ in response. FIR filters have only numerators when compared to IIR filters, which have both numerators and denominators.
  • 32. 5. REFERANCE here are some various sites from where we collectsome of important information related to our report .these are : - 1. http://www.rfwireless-world.com/Terminology/analog-filter-vs-digital-filter.html 2. https://ch.mathworks.com/help/signal/ug/iir-filter- design.html?s_tid=gn_loc_drop#brbq5qb 3. “Design of IIR Filter” by K.S Chandra, M.Tech, IIT-Bombay,Jan-2006 4. “Digital Filter Design” by Prof.A.G. Constantinides, University of Auckland, 2006 5. WWW.WIKIPEDIA.ORG 6. WWW.TUTORIALPOINT.COM 7. DIGITAL SIGNAL PROCESSING BOOKS BY RAMESH BABU