SlideShare a Scribd company logo
1 of 26
Ideal Filters
One of the reasons why we design a filter is to remove disturbances
⊕
)(ns
)(nv
)(nx )()( nsny ≅
Filter
SIGNAL
NOISE
We discriminate between signal and noise in terms of the frequency spectrum
F
)(FS
)(FV
0F0F− 0F
F
)(FY
0F0F−
Conditions for Non-Distortion
Problem: ideally we do not want the filter to distort the signal we want to recover.
IDEAL
FILTER
)()( tstx = )()( TtAsty −= Same shape as s(t),
just scaled and
delayed.
0 200 400 600 800 1000
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
0 200 400 600 800 1000
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
Consequence on the Frequency Response:



=
−
otherwise
passbandtheinisFifAe
FH
FTj
0
)(
2π
F
F
|)(| FH
)(FH∠
constant
linear
For real time implementation we also want the filter to be causal, ie.
0for0)( <= nnh
•
•
• •
•
•
•
••
h n( )
n
•
 since
∑
+∞
=
−=
0
)()()(
k
knxkhny 
onlyspast value
FACT (Bad News!): by the Paley-Wiener Theorem, if h(n) is causal and with finite energy,
∫
+
−
∞+<
π
π
ωω dH )(ln
ie cannot be zero on an interval, therefore it cannot be ideal.)(ωH
∫ +∞=⇒−∞== ωωω dHH )(log)0log()(log
1ω 2ω 1ω
2ω
Characteristics of Non Ideal Digital Filters
ω
|)(| ωH
pω
IDEAL
Positive freq. only
NON IDEAL
Two Classes of Digital Filters:
a) Finite Impulse Response (FIR), non recursive, of the form
)()(...)1()1()()0()( NnxNhnxhnxhny −++−+=
With N being the order of the filter.
Advantages: always stable, the phase can be made exactly linear, we can approximate any
filter we want;
Disadvantages: we need a lot of coefficients (N large) for good performance;
b) Infinite Impulse Response (IIR), recursive, of the form
)(...)1()()(...)1()( 101 NnxbnxbnxbNnyanyany NN −++−+=−++−+
Advantages: very selective with a few coefficients;
Disadvantages: non necessarily stable, non linear phase.
Finite Impulse Response (FIR) Filters
Definition: a filter whose impulse response has finite duration.
•
•
• •
•
•
•
••• • •
h n( )
n
h n( )
x n( ) y n( )
h n( ) = 0h n( ) = 0
•••••• •••••
Problem: Given a desired Frequency Response of the filter, determine the impulse
response .
Hd ( )ω
h n( )
Recall: we relate the Frequency Response and the Impulse Response by the DTFT:
{ } ∑
+∞
−∞=
−
==
n
nj
ddd enhnhDTFTH ω
ω )()()(
{ } ∫
+
−
==
π
π
ω
ωω
π
ω deHHIDTFTnh nj
ddd )(
2
1
)()(
Example: Ideal Low Pass Filter
+π−π +ωc−ωc
Hd ( )ω
A
ω
( ) c
sin1
( ) sinc
2
c
c
cj n c
d
n
h n Ae d A A n
n
ω
ω
ω
ω ω ω
ω
π π π π
+
−
 
= = =  ÷
 
∫
)(nhd
n
ω
π
c=
4
DTFT
Notice two facts:
• the filter is not causal, i.e. the impulse response h(n) is non zero for n<0;
• the impulse response has infinite duration.
This is not just a coincidence. In general the following can be shown:
If a filter is causal then
• the frequency response cannot be zero on an interval;
• magnitude and phase are not independent, i.e. they cannot be specified arbitrarily
⇒•
•
•
•
•
••
h n( )
••
h n( ) = 0
H( )ω
H( )ω = 0
As a consequence: an ideal filter cannot be causal.
Problem: we want to determine a causal Finite Impulse Response (FIR) approximation of the
ideal filter.
We do this by
a) Windowing
-100 -50 0 50 100
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
-100 -50 0 50 100
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
-100 -50 0 50 100
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
-100 -50 0 50 100
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
-100 -50 0 50 100
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
)(nhd
)(nhw
×
=
=
rectangular window
hamming window )(nhw
infinite impulse response
(ideal)
finite impulse response
L− L
L− L
L− L
L− L
b) Shifting in time, to make it causal:
-100 -50 0 50 100
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
-100 -50 0 50 100
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
)(nhw
)()( Lnhnh w −=
Effects of windowing and shifting on the frequency response of the filter:
a) Windowing: since then)()()( nwnhnh dw = )(*)(
2
1
)( ωω
π
ω WHH dw =
ωcωcω−
)(ωdH
0 0.5 1 1.5 2 2.5 3
-120
-100
-80
-60
-40
-20
0
20
0 0.5 1 1.5 2 2.5 3
-120
-100
-80
-60
-40
-20
0
20
0 0.5 1 1.5 2 2.5 3
-120
-100
-80
-60
-40
-20
0
20
40
0 0.5 1 1.5 2 2.5 3
-120
-100
-80
-60
-40
-20
0
20
40
*
*
=
|)(| ωW |)(| ωwHrectangular window
hamming window
0 0.5 1 1.5 2 2.5 3
-120
-100
-80
-60
-40
-20
0
20
=
0 0.5 1 1.5 2 2.5 3
-120
-100
-80
-60
-40
-20
0
20
ω∆
attenuation
For different windows we have different values of the transition region and the attenuation in the
stopband:
transition
region
Rectangular -13dB
Bartlett -27dB
Hanning -32dB
Hamming -43dB
Blackman -58dB
N/4π
N/8π
N/8π
N/8π
16 / Nπ
ω∆ nattenuatio
-100 -50 0 50 100
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
L− L
12 += LN
)(nhw
n
with
Effect of windowing and shifting on the frequency response:
b) shifting: since then)()( Lnhnh w −=
Lj
w eHH ω
ωω −
= )()(
Therefore
phase.inshift)(H)H(
magnitude,on theeffectno)()(
w L
HH w
ωωω
ωω
−∠=∠
=
See what is ).(ωwH∠
For a Low Pass Filter we can verify the symmetry Then).()( nhnh ww −=
)cos()(2)0()()(
1
nnhhenhH
n
ww
nj
n
ww ωω ω
∑∑
+∞
=
−
+∞
−∞=
+==
real for all . Thenω



=∠
otherwise,'
passband;in the0
)(
caretdon
Hw ω
The phase of FIR low pass filter:
passband;in the)( LH ωω −=∠
Which shows that it is a Linear Phase Filter.
0 0.5 1 1.5 2 2.5 3
-120
-100
-80
-60
-40
-20
0
20
don’t care
ω
)(ωH
dB
)(ωH∠
degrees
Example of Design of an FIR filter using Windows:
Specs: Pass Band 0 - 4 kHz
Stop Band > 5kHz with attenuation of at least 40dB
Sampling Frequency 20kHz
Step 1: translate specifications into digital frequency
Pass Band
Stop Band 2 5 20 2π π π/ /= → rad
0 2 4 20 2 5→ =π π/ / rad
− 40dB
F kHz54 10
ωππ
2
2
5
π
∆ω
π
=
10Step 2: from pass band, determine ideal filter impulse
response
h n nd
c c
( ) =





 =






ω
π
ω
π
sinc sinc
2n
5
2
5
Step 3: from desired attenuation choose the window. In this case we can choose the hamming
window;
Step 4: from the transition region choose the length N of the impulse response. Choose an odd
number N such that:
8
10
π π
N
≤
So choose N=81 which yields the shift L=40.
Finally the impulse response of the filter
h n
n
n
( )
. . cos , ,
=





 −











 ≤ ≤





2
5
054 0 46
2
80
0 80sinc
2(n -40)
5
if
0 otherwise
π
The Frequency Response of the Filter:
ω
ω
H( )ω
∠ H( )ω
dB
rad
A Parametrized Window: the Kaiser Window
The Kaiser window has two parameters:
=N
β
Window Length
To control attenuation in the Stop Band
0 20 40 60 80 100 120
0
0.5
1
1.5
n
][nw 0=β
1=β
10=β
5=β
There are some empirical formulas:
A
ω∆
Attenuation in dB
Transition Region in rad
⇒
N
β





Example:
Sampling Freq. 20 kHz
Pass Band 4 kHz
Stop Band 5kHz, with 40dB Attenuation
⇒ ,
5
2π
ω =P
2
π
ω =S
dBA
radPS
40
10
=
=−=∆
π
ωωω
⇒ 3953.3
45
=
=
β
N
Then we determine the Kaiser window
),( βNkaiserw =
][nw
n
Then the impulse response of the FIR filter becomes
( ) ][
)(
)(sin
][ nw
Ln
Ln
nh c
  
−
−
=
π
ω
ideal impulse
response
with ( )
20
9
2
1 π
ωωω =+= SPc
221245 =⇒+== LLN
][nh
n
dBH |)(| ω
(rad)ω
Impulse Response
Frequency Response
Example: design a digital filter which approximates a differentiator.
Specifications:
• Desired Frequency Response:



>
+≤≤−
=
kHzF
kHzFkHzFj
FHd
5if0
44if2
)(
π
• Sampling Frequency
• Attenuation in the stopband at least 50dB.
kHzFs 20=
Solution.
Step 1. Convert to digital frequency






≤<
≤≤=
== =
πω
π
π
ω
π
ωω
ω πω
||
2
if0
5
2
5
2
-if000,20
)()( 2/
jFj
FHH
s
FFdd
s
Step 2: determine ideal impulse response
{ } ∫
−
==
5
2
5
2
000,20
2
1
)()(
π
π
ω
ωω
π
ω dejHIDTFTnh nj
dd
From integration tables or integrating by parts we obtain 





−=∫ a
x
a
e
dxxe
ax
ax 1
Therefore








=
≠


















−






=
0if0
0if
5
2
sin
2
5
2
cos
5
4
000,20
)( 2
n
n
n
n
n
n
nhd
ππ
π
Step 3. From the given attenuation we use the Blackman window. This window has a transition
region region of . From the given transition region we solve for the complexity N
as follows
N/12π
N
π
π
ππ
ω
12
1.0
5
2
2
≥=−=∆
which yields . Choose it odd as, for example, N=121, ie. L=60.120≥N
Step 4. Finally the result












+





−












−





 −
−
−





 −
=
120
4
cos08.0
120
2
cos5.042.0
)60(
5
)60(2
sin
2
60
5
)60(2
cos
5
4
000,20)( 2
nn
n
n
n
n
nh
ππ
ππ
π
1200for ≤≤ n
0 20 40 60 80 100 120 140
-3
-2
-1
0
1
2
3
x10
4
0 0.5 1 1.5 2 2.5 3
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
x10
5
0 0.5 1 1.5 2 2.5 3 3.5
-250
-200
-150
-100
-50
0
50
100
150
Impulse response h(n)
ω
ω
)(ωH
dB
H )(ω
Frequency Response

More Related Content

What's hot

IIR filter design, Digital signal processing
IIR filter design, Digital signal processingIIR filter design, Digital signal processing
IIR filter design, Digital signal processingAbhishek Thakkar
 
Basics of Digital Filters
Basics of Digital FiltersBasics of Digital Filters
Basics of Digital Filtersop205
 
FILTER DESIGN
FILTER DESIGNFILTER DESIGN
FILTER DESIGNnaimish12
 
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter DesignDSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter DesignAmr E. Mohamed
 
DSP_FOEHU - Lec 10 - FIR Filter Design
DSP_FOEHU - Lec 10 - FIR Filter DesignDSP_FOEHU - Lec 10 - FIR Filter Design
DSP_FOEHU - Lec 10 - FIR Filter DesignAmr E. Mohamed
 
Digital signal processing By Er. Swapnil Kaware
Digital signal processing By Er. Swapnil KawareDigital signal processing By Er. Swapnil Kaware
Digital signal processing By Er. Swapnil KawareProf. Swapnil V. Kaware
 
Filter design techniques ch7 iir
Filter design techniques ch7 iirFilter design techniques ch7 iir
Filter design techniques ch7 iirFalah Mohammed
 
Dss
Dss Dss
Dss nil65
 
DSP_2018_FOEHU - Lec 05 - Digital Filters
DSP_2018_FOEHU - Lec 05 - Digital FiltersDSP_2018_FOEHU - Lec 05 - Digital Filters
DSP_2018_FOEHU - Lec 05 - Digital FiltersAmr E. Mohamed
 
Fir filter design using windows
Fir filter design using windowsFir filter design using windows
Fir filter design using windowsSarang Joshi
 
Basics of Analogue Filters
Basics of Analogue FiltersBasics of Analogue Filters
Basics of Analogue Filtersop205
 
Design of FIR Filters
Design of FIR FiltersDesign of FIR Filters
Design of FIR FiltersAranya Sarkar
 
Design of FIR filters
Design of FIR filtersDesign of FIR filters
Design of FIR filtersop205
 

What's hot (20)

Fir filter_utkarsh_kulshrestha
Fir filter_utkarsh_kulshresthaFir filter_utkarsh_kulshrestha
Fir filter_utkarsh_kulshrestha
 
1 digital filters (fir)
1 digital filters (fir)1 digital filters (fir)
1 digital filters (fir)
 
IIR filter design, Digital signal processing
IIR filter design, Digital signal processingIIR filter design, Digital signal processing
IIR filter design, Digital signal processing
 
Basics of Digital Filters
Basics of Digital FiltersBasics of Digital Filters
Basics of Digital Filters
 
FILTER DESIGN
FILTER DESIGNFILTER DESIGN
FILTER DESIGN
 
B tech
B techB tech
B tech
 
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter DesignDSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
 
Dsp lecture vol 6 design of fir
Dsp lecture vol 6 design of firDsp lecture vol 6 design of fir
Dsp lecture vol 6 design of fir
 
DSP_FOEHU - Lec 10 - FIR Filter Design
DSP_FOEHU - Lec 10 - FIR Filter DesignDSP_FOEHU - Lec 10 - FIR Filter Design
DSP_FOEHU - Lec 10 - FIR Filter Design
 
DSP 07 _ Sheet Seven
DSP 07 _ Sheet SevenDSP 07 _ Sheet Seven
DSP 07 _ Sheet Seven
 
Digital Filters Part 2
Digital Filters Part 2Digital Filters Part 2
Digital Filters Part 2
 
Digital signal processing By Er. Swapnil Kaware
Digital signal processing By Er. Swapnil KawareDigital signal processing By Er. Swapnil Kaware
Digital signal processing By Er. Swapnil Kaware
 
digital filter design
digital filter designdigital filter design
digital filter design
 
Filter design techniques ch7 iir
Filter design techniques ch7 iirFilter design techniques ch7 iir
Filter design techniques ch7 iir
 
Dss
Dss Dss
Dss
 
DSP_2018_FOEHU - Lec 05 - Digital Filters
DSP_2018_FOEHU - Lec 05 - Digital FiltersDSP_2018_FOEHU - Lec 05 - Digital Filters
DSP_2018_FOEHU - Lec 05 - Digital Filters
 
Fir filter design using windows
Fir filter design using windowsFir filter design using windows
Fir filter design using windows
 
Basics of Analogue Filters
Basics of Analogue FiltersBasics of Analogue Filters
Basics of Analogue Filters
 
Design of FIR Filters
Design of FIR FiltersDesign of FIR Filters
Design of FIR Filters
 
Design of FIR filters
Design of FIR filtersDesign of FIR filters
Design of FIR filters
 

Viewers also liked

Viewers also liked (10)

Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Lti system(akept)
Lti system(akept)Lti system(akept)
Lti system(akept)
 
Z transform
 Z transform Z transform
Z transform
 
Chapter 2 (maths 3)
Chapter 2 (maths 3)Chapter 2 (maths 3)
Chapter 2 (maths 3)
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier Transform
 
Fourier series and transforms
Fourier series and transformsFourier series and transforms
Fourier series and transforms
 
Laplace transforms
Laplace transformsLaplace transforms
Laplace transforms
 
z transforms
z transformsz transforms
z transforms
 
Design of IIR filters
Design of IIR filtersDesign of IIR filters
Design of IIR filters
 
Signals and classification
Signals and classificationSignals and classification
Signals and classification
 

Similar to FIR

DSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter DesignDSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter DesignAmr E. Mohamed
 
5 pulse compression waveform
5 pulse compression waveform5 pulse compression waveform
5 pulse compression waveformSolo Hermelin
 
CAPACITIVE SENSORS ELECTRICAL WAFER SORT
CAPACITIVE SENSORS ELECTRICAL WAFER SORTCAPACITIVE SENSORS ELECTRICAL WAFER SORT
CAPACITIVE SENSORS ELECTRICAL WAFER SORTMassimo Garavaglia
 
4 matched filters and ambiguity functions for radar signals
4 matched filters and ambiguity functions for radar signals4 matched filters and ambiguity functions for radar signals
4 matched filters and ambiguity functions for radar signalsSolo Hermelin
 
Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processingDsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processingAmr E. Mohamed
 
Ch4 2 _fm modulator and demodulator15
Ch4 2 _fm modulator and demodulator15Ch4 2 _fm modulator and demodulator15
Ch4 2 _fm modulator and demodulator15Jyothirmaye Suneel
 
A Simple Communication System Design Lab #3 with MATLAB Simulink
A Simple Communication System Design Lab #3 with MATLAB SimulinkA Simple Communication System Design Lab #3 with MATLAB Simulink
A Simple Communication System Design Lab #3 with MATLAB SimulinkJaewook. Kang
 
Variable frequencyresponseanalysis8ed
Variable frequencyresponseanalysis8edVariable frequencyresponseanalysis8ed
Variable frequencyresponseanalysis8edxebiikhan
 
First order active rc sections hw1
First order active rc sections hw1First order active rc sections hw1
First order active rc sections hw1Hoopeer Hoopeer
 
Presentació renovables
Presentació renovablesPresentació renovables
Presentació renovablesJordi Cusido
 
10 range and doppler measurements in radar systems
10 range and doppler measurements in radar systems10 range and doppler measurements in radar systems
10 range and doppler measurements in radar systemsSolo Hermelin
 
Data converter modelingの参考資料1
Data converter modelingの参考資料1Data converter modelingの参考資料1
Data converter modelingの参考資料1Tsuyoshi Horigome
 
Malik - Formal Element Report
Malik - Formal Element ReportMalik - Formal Element Report
Malik - Formal Element ReportJunaid Malik
 
Wideband Frequency Modulation.pdf
Wideband Frequency Modulation.pdfWideband Frequency Modulation.pdf
Wideband Frequency Modulation.pdfArijitDhali
 

Similar to FIR (20)

DSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter DesignDSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter Design
 
DSP.ppt
DSP.pptDSP.ppt
DSP.ppt
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
1-DSP Fundamentals.ppt
1-DSP Fundamentals.ppt1-DSP Fundamentals.ppt
1-DSP Fundamentals.ppt
 
5 pulse compression waveform
5 pulse compression waveform5 pulse compression waveform
5 pulse compression waveform
 
15963128.ppt
15963128.ppt15963128.ppt
15963128.ppt
 
CAPACITIVE SENSORS ELECTRICAL WAFER SORT
CAPACITIVE SENSORS ELECTRICAL WAFER SORTCAPACITIVE SENSORS ELECTRICAL WAFER SORT
CAPACITIVE SENSORS ELECTRICAL WAFER SORT
 
4 matched filters and ambiguity functions for radar signals
4 matched filters and ambiguity functions for radar signals4 matched filters and ambiguity functions for radar signals
4 matched filters and ambiguity functions for radar signals
 
Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processingDsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
 
Ch4 2 _fm modulator and demodulator15
Ch4 2 _fm modulator and demodulator15Ch4 2 _fm modulator and demodulator15
Ch4 2 _fm modulator and demodulator15
 
A Simple Communication System Design Lab #3 with MATLAB Simulink
A Simple Communication System Design Lab #3 with MATLAB SimulinkA Simple Communication System Design Lab #3 with MATLAB Simulink
A Simple Communication System Design Lab #3 with MATLAB Simulink
 
Variable frequencyresponseanalysis8ed
Variable frequencyresponseanalysis8edVariable frequencyresponseanalysis8ed
Variable frequencyresponseanalysis8ed
 
First order active rc sections hw1
First order active rc sections hw1First order active rc sections hw1
First order active rc sections hw1
 
Presentació renovables
Presentació renovablesPresentació renovables
Presentació renovables
 
10 range and doppler measurements in radar systems
10 range and doppler measurements in radar systems10 range and doppler measurements in radar systems
10 range and doppler measurements in radar systems
 
Filter_Designs
Filter_DesignsFilter_Designs
Filter_Designs
 
PAM
PAMPAM
PAM
 
Data converter modelingの参考資料1
Data converter modelingの参考資料1Data converter modelingの参考資料1
Data converter modelingの参考資料1
 
Malik - Formal Element Report
Malik - Formal Element ReportMalik - Formal Element Report
Malik - Formal Element Report
 
Wideband Frequency Modulation.pdf
Wideband Frequency Modulation.pdfWideband Frequency Modulation.pdf
Wideband Frequency Modulation.pdf
 

Recently uploaded

Tech Startup Growth Hacking 101 - Basics on Growth Marketing
Tech Startup Growth Hacking 101  - Basics on Growth MarketingTech Startup Growth Hacking 101  - Basics on Growth Marketing
Tech Startup Growth Hacking 101 - Basics on Growth MarketingShawn Pang
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...Paul Menig
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesDipal Arora
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...anilsa9823
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation SlidesKeppelCorporation
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Serviceritikaroy0888
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Servicediscovermytutordmt
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurVIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurSuhani Kapoor
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Roland Driesen
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLSeo
 
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service PuneVIP Call Girls Pune Kirti 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service PuneCall girls in Ahmedabad High profile
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageMatteo Carbone
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechNewman George Leech
 
GD Birla and his contribution in management
GD Birla and his contribution in managementGD Birla and his contribution in management
GD Birla and his contribution in managementchhavia330
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024christinemoorman
 
Eni 2024 1Q Results - 24.04.24 business.
Eni 2024 1Q Results - 24.04.24 business.Eni 2024 1Q Results - 24.04.24 business.
Eni 2024 1Q Results - 24.04.24 business.Eni
 

Recently uploaded (20)

Tech Startup Growth Hacking 101 - Basics on Growth Marketing
Tech Startup Growth Hacking 101  - Basics on Growth MarketingTech Startup Growth Hacking 101  - Basics on Growth Marketing
Tech Startup Growth Hacking 101 - Basics on Growth Marketing
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
 
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Service
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurVIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
 
KestrelPro Flyer Japan IT Week 2024 (English)
KestrelPro Flyer Japan IT Week 2024 (English)KestrelPro Flyer Japan IT Week 2024 (English)
KestrelPro Flyer Japan IT Week 2024 (English)
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service PuneVIP Call Girls Pune Kirti 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service Pune
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman Leech
 
GD Birla and his contribution in management
GD Birla and his contribution in managementGD Birla and his contribution in management
GD Birla and his contribution in management
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024
 
Eni 2024 1Q Results - 24.04.24 business.
Eni 2024 1Q Results - 24.04.24 business.Eni 2024 1Q Results - 24.04.24 business.
Eni 2024 1Q Results - 24.04.24 business.
 
Forklift Operations: Safety through Cartoons
Forklift Operations: Safety through CartoonsForklift Operations: Safety through Cartoons
Forklift Operations: Safety through Cartoons
 

FIR

  • 1. Ideal Filters One of the reasons why we design a filter is to remove disturbances ⊕ )(ns )(nv )(nx )()( nsny ≅ Filter SIGNAL NOISE We discriminate between signal and noise in terms of the frequency spectrum F )(FS )(FV 0F0F− 0F F )(FY 0F0F−
  • 2. Conditions for Non-Distortion Problem: ideally we do not want the filter to distort the signal we want to recover. IDEAL FILTER )()( tstx = )()( TtAsty −= Same shape as s(t), just scaled and delayed. 0 200 400 600 800 1000 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 200 400 600 800 1000 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 Consequence on the Frequency Response:    = − otherwise passbandtheinisFifAe FH FTj 0 )( 2π F F |)(| FH )(FH∠ constant linear
  • 3. For real time implementation we also want the filter to be causal, ie. 0for0)( <= nnh • • • • • • • •• h n( ) n •  since ∑ +∞ = −= 0 )()()( k knxkhny  onlyspast value FACT (Bad News!): by the Paley-Wiener Theorem, if h(n) is causal and with finite energy, ∫ + − ∞+< π π ωω dH )(ln ie cannot be zero on an interval, therefore it cannot be ideal.)(ωH ∫ +∞=⇒−∞== ωωω dHH )(log)0log()(log 1ω 2ω 1ω 2ω
  • 4. Characteristics of Non Ideal Digital Filters ω |)(| ωH pω IDEAL Positive freq. only NON IDEAL
  • 5. Two Classes of Digital Filters: a) Finite Impulse Response (FIR), non recursive, of the form )()(...)1()1()()0()( NnxNhnxhnxhny −++−+= With N being the order of the filter. Advantages: always stable, the phase can be made exactly linear, we can approximate any filter we want; Disadvantages: we need a lot of coefficients (N large) for good performance; b) Infinite Impulse Response (IIR), recursive, of the form )(...)1()()(...)1()( 101 NnxbnxbnxbNnyanyany NN −++−+=−++−+ Advantages: very selective with a few coefficients; Disadvantages: non necessarily stable, non linear phase.
  • 6. Finite Impulse Response (FIR) Filters Definition: a filter whose impulse response has finite duration. • • • • • • • ••• • • h n( ) n h n( ) x n( ) y n( ) h n( ) = 0h n( ) = 0 •••••• •••••
  • 7. Problem: Given a desired Frequency Response of the filter, determine the impulse response . Hd ( )ω h n( ) Recall: we relate the Frequency Response and the Impulse Response by the DTFT: { } ∑ +∞ −∞= − == n nj ddd enhnhDTFTH ω ω )()()( { } ∫ + − == π π ω ωω π ω deHHIDTFTnh nj ddd )( 2 1 )()( Example: Ideal Low Pass Filter +π−π +ωc−ωc Hd ( )ω A ω ( ) c sin1 ( ) sinc 2 c c cj n c d n h n Ae d A A n n ω ω ω ω ω ω ω π π π π + −   = = =  ÷   ∫ )(nhd n ω π c= 4 DTFT
  • 8. Notice two facts: • the filter is not causal, i.e. the impulse response h(n) is non zero for n<0; • the impulse response has infinite duration. This is not just a coincidence. In general the following can be shown: If a filter is causal then • the frequency response cannot be zero on an interval; • magnitude and phase are not independent, i.e. they cannot be specified arbitrarily ⇒• • • • • •• h n( ) •• h n( ) = 0 H( )ω H( )ω = 0 As a consequence: an ideal filter cannot be causal.
  • 9. Problem: we want to determine a causal Finite Impulse Response (FIR) approximation of the ideal filter. We do this by a) Windowing -100 -50 0 50 100 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 -100 -50 0 50 100 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 -100 -50 0 50 100 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 -100 -50 0 50 100 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 -100 -50 0 50 100 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 )(nhd )(nhw × = = rectangular window hamming window )(nhw infinite impulse response (ideal) finite impulse response L− L L− L L− L L− L
  • 10. b) Shifting in time, to make it causal: -100 -50 0 50 100 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 -100 -50 0 50 100 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 )(nhw )()( Lnhnh w −=
  • 11. Effects of windowing and shifting on the frequency response of the filter: a) Windowing: since then)()()( nwnhnh dw = )(*)( 2 1 )( ωω π ω WHH dw = ωcωcω− )(ωdH 0 0.5 1 1.5 2 2.5 3 -120 -100 -80 -60 -40 -20 0 20 0 0.5 1 1.5 2 2.5 3 -120 -100 -80 -60 -40 -20 0 20 0 0.5 1 1.5 2 2.5 3 -120 -100 -80 -60 -40 -20 0 20 40 0 0.5 1 1.5 2 2.5 3 -120 -100 -80 -60 -40 -20 0 20 40 * * = |)(| ωW |)(| ωwHrectangular window hamming window 0 0.5 1 1.5 2 2.5 3 -120 -100 -80 -60 -40 -20 0 20 =
  • 12. 0 0.5 1 1.5 2 2.5 3 -120 -100 -80 -60 -40 -20 0 20 ω∆ attenuation For different windows we have different values of the transition region and the attenuation in the stopband: transition region Rectangular -13dB Bartlett -27dB Hanning -32dB Hamming -43dB Blackman -58dB N/4π N/8π N/8π N/8π 16 / Nπ ω∆ nattenuatio -100 -50 0 50 100 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 L− L 12 += LN )(nhw n with
  • 13. Effect of windowing and shifting on the frequency response: b) shifting: since then)()( Lnhnh w −= Lj w eHH ω ωω − = )()( Therefore phase.inshift)(H)H( magnitude,on theeffectno)()( w L HH w ωωω ωω −∠=∠ = See what is ).(ωwH∠ For a Low Pass Filter we can verify the symmetry Then).()( nhnh ww −= )cos()(2)0()()( 1 nnhhenhH n ww nj n ww ωω ω ∑∑ +∞ = − +∞ −∞= +== real for all . Thenω    =∠ otherwise,' passband;in the0 )( caretdon Hw ω
  • 14. The phase of FIR low pass filter: passband;in the)( LH ωω −=∠ Which shows that it is a Linear Phase Filter. 0 0.5 1 1.5 2 2.5 3 -120 -100 -80 -60 -40 -20 0 20 don’t care ω )(ωH dB )(ωH∠ degrees
  • 15. Example of Design of an FIR filter using Windows: Specs: Pass Band 0 - 4 kHz Stop Band > 5kHz with attenuation of at least 40dB Sampling Frequency 20kHz Step 1: translate specifications into digital frequency Pass Band Stop Band 2 5 20 2π π π/ /= → rad 0 2 4 20 2 5→ =π π/ / rad − 40dB F kHz54 10 ωππ 2 2 5 π ∆ω π = 10Step 2: from pass band, determine ideal filter impulse response h n nd c c ( ) =       =       ω π ω π sinc sinc 2n 5 2 5
  • 16. Step 3: from desired attenuation choose the window. In this case we can choose the hamming window; Step 4: from the transition region choose the length N of the impulse response. Choose an odd number N such that: 8 10 π π N ≤ So choose N=81 which yields the shift L=40. Finally the impulse response of the filter h n n n ( ) . . cos , , =       −             ≤ ≤      2 5 054 0 46 2 80 0 80sinc 2(n -40) 5 if 0 otherwise π
  • 17. The Frequency Response of the Filter: ω ω H( )ω ∠ H( )ω dB rad
  • 18. A Parametrized Window: the Kaiser Window The Kaiser window has two parameters: =N β Window Length To control attenuation in the Stop Band 0 20 40 60 80 100 120 0 0.5 1 1.5 n ][nw 0=β 1=β 10=β 5=β
  • 19. There are some empirical formulas: A ω∆ Attenuation in dB Transition Region in rad ⇒ N β      Example: Sampling Freq. 20 kHz Pass Band 4 kHz Stop Band 5kHz, with 40dB Attenuation ⇒ , 5 2π ω =P 2 π ω =S dBA radPS 40 10 = =−=∆ π ωωω ⇒ 3953.3 45 = = β N
  • 20. Then we determine the Kaiser window ),( βNkaiserw = ][nw n
  • 21. Then the impulse response of the FIR filter becomes ( ) ][ )( )(sin ][ nw Ln Ln nh c    − − = π ω ideal impulse response with ( ) 20 9 2 1 π ωωω =+= SPc 221245 =⇒+== LLN
  • 22. ][nh n dBH |)(| ω (rad)ω Impulse Response Frequency Response
  • 23. Example: design a digital filter which approximates a differentiator. Specifications: • Desired Frequency Response:    > +≤≤− = kHzF kHzFkHzFj FHd 5if0 44if2 )( π • Sampling Frequency • Attenuation in the stopband at least 50dB. kHzFs 20= Solution. Step 1. Convert to digital frequency       ≤< ≤≤= == = πω π π ω π ωω ω πω || 2 if0 5 2 5 2 -if000,20 )()( 2/ jFj FHH s FFdd s
  • 24. Step 2: determine ideal impulse response { } ∫ − == 5 2 5 2 000,20 2 1 )()( π π ω ωω π ω dejHIDTFTnh nj dd From integration tables or integrating by parts we obtain       −=∫ a x a e dxxe ax ax 1 Therefore         = ≠                   −       = 0if0 0if 5 2 sin 2 5 2 cos 5 4 000,20 )( 2 n n n n n n nhd ππ π
  • 25. Step 3. From the given attenuation we use the Blackman window. This window has a transition region region of . From the given transition region we solve for the complexity N as follows N/12π N π π ππ ω 12 1.0 5 2 2 ≥=−=∆ which yields . Choose it odd as, for example, N=121, ie. L=60.120≥N Step 4. Finally the result             +      −             −       − − −       − = 120 4 cos08.0 120 2 cos5.042.0 )60( 5 )60(2 sin 2 60 5 )60(2 cos 5 4 000,20)( 2 nn n n n n nh ππ ππ π 1200for ≤≤ n
  • 26. 0 20 40 60 80 100 120 140 -3 -2 -1 0 1 2 3 x10 4 0 0.5 1 1.5 2 2.5 3 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x10 5 0 0.5 1 1.5 2 2.5 3 3.5 -250 -200 -150 -100 -50 0 50 100 150 Impulse response h(n) ω ω )(ωH dB H )(ω Frequency Response