SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

La actualidad más candente

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
Prof. Swapnil V. Kaware
 

La actualidad más candente (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
 

Destacado (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 a FIR

CAPACITIVE SENSORS ELECTRICAL WAFER SORT
CAPACITIVE SENSORS ELECTRICAL WAFER SORTCAPACITIVE SENSORS ELECTRICAL WAFER SORT
CAPACITIVE SENSORS ELECTRICAL WAFER SORT
Massimo Garavaglia
 
Ch4 2 _fm modulator and demodulator15
Ch4 2 _fm modulator and demodulator15Ch4 2 _fm modulator and demodulator15
Ch4 2 _fm modulator and demodulator15
Jyothirmaye Suneel
 
Variable frequencyresponseanalysis8ed
Variable frequencyresponseanalysis8edVariable frequencyresponseanalysis8ed
Variable frequencyresponseanalysis8ed
xebiikhan
 
Malik - Formal Element Report
Malik - Formal Element ReportMalik - Formal Element Report
Malik - Formal Element Report
Junaid Malik
 

Similar a 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
 

Último

The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai KuwaitThe Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
daisycvs
 

Último (20)

PHX May 2024 Corporate Presentation Final
PHX May 2024 Corporate Presentation FinalPHX May 2024 Corporate Presentation Final
PHX May 2024 Corporate Presentation Final
 
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All TimeCall 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
 
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 MonthsSEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
 
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service AvailableBerhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
 
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
PARK STREET 💋 Call Girl 9827461493 Call Girls in Escort service book now
PARK STREET 💋 Call Girl 9827461493 Call Girls in  Escort service book nowPARK STREET 💋 Call Girl 9827461493 Call Girls in  Escort service book now
PARK STREET 💋 Call Girl 9827461493 Call Girls in Escort service book now
 
Phases of Negotiation .pptx
 Phases of Negotiation .pptx Phases of Negotiation .pptx
Phases of Negotiation .pptx
 
Arti Languages Pre Seed Teaser Deck 2024.pdf
Arti Languages Pre Seed Teaser Deck 2024.pdfArti Languages Pre Seed Teaser Deck 2024.pdf
Arti Languages Pre Seed Teaser Deck 2024.pdf
 
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai KuwaitThe Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
 
Durg CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN durg ESCORTS
Durg CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN durg ESCORTSDurg CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN durg ESCORTS
Durg CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN durg ESCORTS
 
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGParadip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptxQSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1
 
Nashik Call Girl Just Call 7091819311 Top Class Call Girl Service Available
Nashik Call Girl Just Call 7091819311 Top Class Call Girl Service AvailableNashik Call Girl Just Call 7091819311 Top Class Call Girl Service Available
Nashik Call Girl Just Call 7091819311 Top Class Call Girl Service Available
 
Puri CALL GIRL ❤️8084732287❤️ CALL GIRLS IN ESCORT SERVICE WE ARW PROVIDING
Puri CALL GIRL ❤️8084732287❤️ CALL GIRLS IN ESCORT SERVICE WE ARW PROVIDINGPuri CALL GIRL ❤️8084732287❤️ CALL GIRLS IN ESCORT SERVICE WE ARW PROVIDING
Puri CALL GIRL ❤️8084732287❤️ CALL GIRLS IN ESCORT SERVICE WE ARW PROVIDING
 
Only Cash On Delivery Call Girls In Sikandarpur Gurgaon ❤️8448577510 ⊹Escorts...
Only Cash On Delivery Call Girls In Sikandarpur Gurgaon ❤️8448577510 ⊹Escorts...Only Cash On Delivery Call Girls In Sikandarpur Gurgaon ❤️8448577510 ⊹Escorts...
Only Cash On Delivery Call Girls In Sikandarpur Gurgaon ❤️8448577510 ⊹Escorts...
 
Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024
 
Buy gmail accounts.pdf buy Old Gmail Accounts
Buy gmail accounts.pdf buy Old Gmail AccountsBuy gmail accounts.pdf buy Old Gmail Accounts
Buy gmail accounts.pdf buy Old Gmail Accounts
 

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