SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Fundamentals of Digital Signal Processing
Fourier Transform of continuous time signals
  





 dt
e
t
x
t
x
FT
F
X Ft
j 
2
)
(
)
(
)
(
  




 dF
e
F
X
F
X
IFT
t
x Ft
j 
2
)
(
)
(
)
(
with t in sec and F in Hz (1/sec).
Examples:
 
   
0 0 0
sinc
t
T
FT rect T FT

   
0
2 0
F
F
e
FT t
F
j

 

 
     
0
2
1
0
2
1
0
2
cos F
F
e
F
F
e
t
F
FT j
j




 



 

Discrete Time Fourier Transform of sampled signals
  






n
fn
j
e
n
x
n
x
DTFT
f
X 
2
]
[
]
[
)
(
  


2
1
2
1
2
)
(
)
(
]
[ df
e
f
X
f
X
IDTFT
n
x fn
j 
with f the digital frequency (no dimensions).
Example:
 
0
2
0
( )
j f n
k
DTFT e f f k




  

since, using the Fourier Series,
2
( ) j nt
k n
t k e 

 
 
 
 
Property of DTFT
• f is the digital frequency and has no dimensions
• is periodic with period f = 1.
)
1
(
)
( 
 f
X
f
X
2
1
2
1


 f


f
1
1
2
1
2

1

)
( f
X
• we only define it on one period
f
1
2

)
( f
X
1
2
t
F
j
e
t
x 0
2
)
( 

n
j
s
s
F
F
e
nT
x
n
x
0
2
)
(
]
[



s
s T
F /
1

Sampled Complex Exponential: no aliasing
0
F F
)
(F
X
f
( )
X f
2
1

1
2
1. No Aliasing
2
0
s
F
F 
2
s
F

2
s
F
0
f
s
F
F
f 0
0 
digital frequency
t
F
j
e
t
x 0
2
)
( 

n
j
s
s
F
F
e
nT
x
n
x
0
2
)
(
]
[



s
s T
F /
1

Sampled Complex Exponential: aliasing
0
F
F
)
(F
X
f
( )
X f
2
1

1
2
2. Aliasing 0
2
s
F
F 
2
s
F

2
s
F
0
f
0 0
0
s s
F F
f round
F F
 
   
 
digital frequency
t
F
j
e
t
x 0
2
)
( 
 0
2
[ ] ( ) j f n
s
x n x nT e 
 
s
s T
F /
1

Mapping between Analog and Digital Frequency










s
s F
F
round
F
F
f 0
0
0
Example
t
j
e
t
x 1000
2
)
( 

kHz
Fs 3

Then:
• analog frequency
• FT:
• digital frequency
•DTFT: for
)
1000
(
)
( 
 F
F
XFT 
Hz
F 1000
0 
   
0 0 1 1 1
0 3 3 3
s s
F F
F F
f round round
    
 
3
1
)
( 
 f
f
XDTFT  2
1
|
| 
f
Example
t
j
e
t
x 2000
2
)
( 

kHz
Fs 3

Then:
• analog frequency
• FT:
• digital frequency
•DTFT: for
)
2000
(
)
( 
 F
F
XFT 
Hz
F 2000
0 
 
3
1
)
( 
 f
f
XDTFT  2
1
|
| 
f
   
0 0 2 2 1
0 3 3 3
s s
F F
F F
f round round
     
Example
t
j
j
t
j
j
e
e
e
e
t
t
x 




 8000
1
.
0
2
1
8000
1
.
0
2
1
)
1
.
0
8000
cos(
)
( 





kHz
Fs 3

Then:
• analog frequencies
• FT:
• digital frequencies
•DTFT
)
4000
(
)
4000
(
)
( 1
.
0
2
1
1
.
0
2
1



 
F
e
F
e
F
X j
j
FT 
 

0 1
4000 , 4000
F Hz F Hz
  
2
1
|
| 
f
   
3
1
1
.
0
2
1
3
1
1
.
0
2
1
)
( 


 
f
e
f
e
f
X j
j
DTFT 
 

 
4 4 4 1
0 3 3 3 3
1
f round
    
 
4 4 4 1
1 3 3 3 3
( 1)
f round
         
Linear Time Invariant (LTI) Systems and z-Transform
]
[n
x ]
[n
y
]
[n
h
If the system is LTI we compute the output with the convolution:







m
m
n
x
m
h
n
x
n
h
n
y ]
[
]
[
]
[
*
]
[
]
[
If the impulse response has a finite duration, the system is called FIR
(Finite Impulse Response):
]
[
]
[
...
]
1
[
]
1
[
]
[
]
0
[
]
[ N
n
x
N
h
n
x
h
n
x
h
n
y 





  






n
n
z
n
x
n
x
Z
z
X ]
[
]
[
)
(
Z-Transform
Facts:
)
(
)
(
)
( z
X
z
H
z
Y 
]
[n
x ]
[n
y
)
(z
H
Frequency Response of a filter:
f
j
e
z
z
H
f
H 
2
)
(
)
( 

Digital Filters
)
(z
H
]
[n
x ]
[n
y
Ideal Low Pass Filter
f
2
1
2
1

)
( f
H
f
2
1
2
1

)
( f
H

P
f
P
f
passband
constant magnitude
in passband…
… and linear phase
A
Impulse Response of Ideal LPF

 



P
P
f
f
fn
j
fn
j
ideal df
Ae
df
e
f
H
n
h 
 2
2
2
1
2
1
)
(
]
[
Assume zero phase shift,
  
n
f
sinc
Af
n
h P
P
ideal 2
2
]
[ 
This has Infinite Impulse Response, non recursive and it is non-
causal. Therefore it cannot be realized.
-50 -40 -30 -20 -10 0 10 20 30 40 50
-0.05
0
0.05
0.1
0.15
0.2
n
fp=0.1
[ ]
h n
n
0.1
1
P
f
A


Non Ideal Ideal LPF
The good news is that for the Ideal LPF
0
]
[
lim 


n
hideal
n
n
]
[n
h
L
 L
n
L
2
L
]
[n
h
Frequency Response of the Non Ideal LPF
P
f STOP
f
pass
stop stop
f
transition region
attenuation
ripple
|
)
(
| f
H
1
1 

1
1 

2

LPF specified by:
• passband frequency
• passband ripple or
• stopband frequency
• stopband attenuation or
P
f
1
 dB
RP 1
1
1
1
10
log
20 




STOP
f
2
 dB
R 2
S 
10
log
20

Best Design tool for FIR Filters: the Equiripple algorithm (or Remez). It
minimizes the maximum error between the frequency responses of the
ideal and actual filter.
1
f 2
f 2
1
attenuation
ripple
|
)
(
| f
H
1
1 

1
1 

2

     
 
1 2 3 3 1 2
, 0, , , / , 1,1,0,0 , ,
h firpm N f f f f w w

impulse response
 
]
[
],...,
0
[ N
h
h
h 
1
f 2
f 2
1
3 
f
0
Linear Interpolation
1
1
/ w

2
/ w

The total impulse response length N+1 depends on:
• transition region
• attenuation in the stopband
1
f 2
f
|
)
(
| f
H
2

1
2 f
f
f 


 N
f
1
~ 22
)
(
log
20 2
10 

Example:
we want
Passband: 3kHz
Stopband: 3.5kHz
Attenuation: 60dB
Sampling Freq: 15 kHz
Then: from the specs
We determine the order the filter
30
1
0
.
15
0
.
3
5
.
3


 
f
82
30
~ 22
60


N
Frequency response
0 0.1 0.2 0.3 0.4 0.5
-100
-80
-60
-40
-20
0
20
magnitude
digital frequency
dB
0 0.1 0.2 0.3 0.4 0.5
-120
-100
-80
-60
-40
-20
0
20
magnitude
digital frequency
dB
N=82
N=98
Example: Low Pass Filter
0 0.1 0.2 0.3 0.4 0.5
-120
-100
-80
-60
-40
-20
0
20
magnitude
digital frequency
dB
Passband f = 0.2
Stopband f = 0.25 with attenuation 40dB
Choose order N=40/(22*(0.25-0.20))=37
| ( ) |
H f
f
Almost 40dB!!!
Example: Low Pass Filter
Passband f = 0.2
Stopband f = 0.25 with attenuation 40dB
Choose order N=40 > 37
| ( ) |
H f
f
0 0.1 0.2 0.3 0.4 0.5
-80
-70
-60
-50
-40
-30
-20
-10
0
10
magnitude
digital frequency
dB
OK!!!
General FIR Filter of arbitrary Frequency Response
]
,...,
,
[
]
,...,
,
,
0
[
1
0
2
1
M
M
H
H
H
H
f
f
f
f


0 1
f 2
f 3
f 1

M
f 2
1

M
f
0
H
1
H
2
H
3
H 1

M
H M
H
Weights for Error:
1
w
2
w 2
/
)
1
( 
M
w
]
,...,
,
[ 2
/
)
1
(
2
1 
 M
w
w
w
w
Then apply:
 
, / , ,
M
h firpm N f f H w

… and always check frequency response if it is what you expect!
Example:
( ) 1/sinc( )
H f f
 for 0 0.2
f
 
( ) 0
H f  0.25 0.5
f
 
0 0.2 0.25 0.5 f
fp=0:0.01:0.2; % vector of passband frequencies
fs=[0.25,0.5]; % stopband frequencies
M=[1./sinc(fp), 0, 0]; % desired magnitudes
Df=0.25-0.2; % transition region
N=ceil(A/(22*Df)); % first guess of order
h=firpm(N, [ fp, fs]/0.5,M); % impulse response
40
A dB

0 0.1 0.2 0.3 0.4 0.5
0
0.2
0.4
0.6
0.8
1
1.2
1.4
magnitude
digital frequency
0 0.1 0.2 0.3 0.4 0.5
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
not very good here!
dB
37
N 
To improve it:
1. Increase order
2. Add weights
0 0.2 0.25 0.5 f
40
A dB

1
w  0.2
w 
w=[1*ones(1,length(fp)/2), 0.2*ones(1, length(fs)/2)];
h=firpm(N, [fp, fs]/0.5,M,w);
0 0.1 0.2 0.3 0.4 0.5
0
0.2
0.4
0.6
0.8
1
1.2
1.4
magnitude
digital frequency
0 0.1 0.2 0.3 0.4 0.5
-160
-140
-120
-100
-80
-60
-40
-20
0
20
100
N 
dB

Weitere ähnliche Inhalte

Ähnlich wie 1-DSP Fundamentals.ppt

Digital filters (FIR).ppt
Digital filters (FIR).pptDigital filters (FIR).ppt
Digital filters (FIR).ppt
DevipriyaS21
 
Time reversed acoustics - Mathias Fink
Time reversed acoustics - Mathias FinkTime reversed acoustics - Mathias Fink
Time reversed acoustics - Mathias Fink
Sébastien Popoff
 

Ähnlich wie 1-DSP Fundamentals.ppt (20)

RF Module Design - [Chapter 8] Phase-Locked Loops
RF Module Design - [Chapter 8] Phase-Locked LoopsRF Module Design - [Chapter 8] Phase-Locked Loops
RF Module Design - [Chapter 8] Phase-Locked Loops
 
1-Digital filters (FIR).pdf
1-Digital filters (FIR).pdf1-Digital filters (FIR).pdf
1-Digital filters (FIR).pdf
 
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Frequency modulation
Frequency modulationFrequency modulation
Frequency modulation
 
DIGITAL FILTER SPECIFICATIONS AND MATHEMATICS.ppt
DIGITAL FILTER SPECIFICATIONS AND MATHEMATICS.pptDIGITAL FILTER SPECIFICATIONS AND MATHEMATICS.ppt
DIGITAL FILTER SPECIFICATIONS AND MATHEMATICS.ppt
 
Digital filters (FIR).ppt
Digital filters (FIR).pptDigital filters (FIR).ppt
Digital filters (FIR).ppt
 
Measuring Jitter Using Phase Noise Techniques
Measuring Jitter Using Phase Noise TechniquesMeasuring Jitter Using Phase Noise Techniques
Measuring Jitter Using Phase Noise Techniques
 
Time reversed acoustics - Mathias Fink
Time reversed acoustics - Mathias FinkTime reversed acoustics - Mathias Fink
Time reversed acoustics - Mathias Fink
 
Analog Communication Chap 3-pages-2-41.pdf
Analog Communication Chap 3-pages-2-41.pdfAnalog Communication Chap 3-pages-2-41.pdf
Analog Communication Chap 3-pages-2-41.pdf
 
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_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
 
Design of digital filters
Design of digital filtersDesign of digital filters
Design of digital filters
 
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
 
Eece 301 note set 14 fourier transform
Eece 301 note set 14 fourier transformEece 301 note set 14 fourier transform
Eece 301 note set 14 fourier transform
 
Lecture13
Lecture13Lecture13
Lecture13
 
Nss fourier
Nss fourierNss fourier
Nss fourier
 
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
 
Note and assignment mis3 5.3
Note and assignment mis3 5.3Note and assignment mis3 5.3
Note and assignment mis3 5.3
 

Mehr von KrishnaveniManickam3 (11)

UNIT 03 ORGANISING.ppt
UNIT 03 ORGANISING.pptUNIT 03 ORGANISING.ppt
UNIT 03 ORGANISING.ppt
 
UNIT 5 CONTROLLING.ppt
UNIT 5 CONTROLLING.pptUNIT 5 CONTROLLING.ppt
UNIT 5 CONTROLLING.ppt
 
boolean-logic.pptx
boolean-logic.pptxboolean-logic.pptx
boolean-logic.pptx
 
Review report-template_ECE_AVSEC (10_09_2014).pptx
Review report-template_ECE_AVSEC (10_09_2014).pptxReview report-template_ECE_AVSEC (10_09_2014).pptx
Review report-template_ECE_AVSEC (10_09_2014).pptx
 
unit 5.ppt
unit 5.pptunit 5.ppt
unit 5.ppt
 
piezo ele.ppt.pptx
piezo ele.ppt.pptxpiezo ele.ppt.pptx
piezo ele.ppt.pptx
 
UNIT 2.ppt
UNIT 2.pptUNIT 2.ppt
UNIT 2.ppt
 
PPT-DC.pptx
PPT-DC.pptxPPT-DC.pptx
PPT-DC.pptx
 
staffing.ppt
staffing.pptstaffing.ppt
staffing.ppt
 
UNIT 5 CONTROLLING.ppt
UNIT 5 CONTROLLING.pptUNIT 5 CONTROLLING.ppt
UNIT 5 CONTROLLING.ppt
 
Organising unit ppt.ppt
Organising unit ppt.pptOrganising unit ppt.ppt
Organising unit ppt.ppt
 

Kürzlich hochgeladen

Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Kürzlich hochgeladen (20)

KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 

1-DSP Fundamentals.ppt

  • 1. Fundamentals of Digital Signal Processing
  • 2. Fourier Transform of continuous time signals          dt e t x t x FT F X Ft j  2 ) ( ) ( ) (         dF e F X F X IFT t x Ft j  2 ) ( ) ( ) ( with t in sec and F in Hz (1/sec). Examples:       0 0 0 sinc t T FT rect T FT      0 2 0 F F e FT t F j             0 2 1 0 2 1 0 2 cos F F e F F e t F FT j j            
  • 3. Discrete Time Fourier Transform of sampled signals          n fn j e n x n x DTFT f X  2 ] [ ] [ ) (      2 1 2 1 2 ) ( ) ( ] [ df e f X f X IDTFT n x fn j  with f the digital frequency (no dimensions). Example:   0 2 0 ( ) j f n k DTFT e f f k         since, using the Fourier Series, 2 ( ) j nt k n t k e          
  • 4. Property of DTFT • f is the digital frequency and has no dimensions • is periodic with period f = 1. ) 1 ( ) (   f X f X 2 1 2 1    f   f 1 1 2 1 2  1  ) ( f X • we only define it on one period f 1 2  ) ( f X 1 2
  • 5. t F j e t x 0 2 ) (   n j s s F F e nT x n x 0 2 ) ( ] [    s s T F / 1  Sampled Complex Exponential: no aliasing 0 F F ) (F X f ( ) X f 2 1  1 2 1. No Aliasing 2 0 s F F  2 s F  2 s F 0 f s F F f 0 0  digital frequency
  • 6. t F j e t x 0 2 ) (   n j s s F F e nT x n x 0 2 ) ( ] [    s s T F / 1  Sampled Complex Exponential: aliasing 0 F F ) (F X f ( ) X f 2 1  1 2 2. Aliasing 0 2 s F F  2 s F  2 s F 0 f 0 0 0 s s F F f round F F         digital frequency
  • 7. t F j e t x 0 2 ) (   0 2 [ ] ( ) j f n s x n x nT e    s s T F / 1  Mapping between Analog and Digital Frequency           s s F F round F F f 0 0 0
  • 8. Example t j e t x 1000 2 ) (   kHz Fs 3  Then: • analog frequency • FT: • digital frequency •DTFT: for ) 1000 ( ) (   F F XFT  Hz F 1000 0      0 0 1 1 1 0 3 3 3 s s F F F F f round round        3 1 ) (   f f XDTFT  2 1 | |  f
  • 9. Example t j e t x 2000 2 ) (   kHz Fs 3  Then: • analog frequency • FT: • digital frequency •DTFT: for ) 2000 ( ) (   F F XFT  Hz F 2000 0    3 1 ) (   f f XDTFT  2 1 | |  f     0 0 2 2 1 0 3 3 3 s s F F F F f round round      
  • 10. Example t j j t j j e e e e t t x       8000 1 . 0 2 1 8000 1 . 0 2 1 ) 1 . 0 8000 cos( ) (       kHz Fs 3  Then: • analog frequencies • FT: • digital frequencies •DTFT ) 4000 ( ) 4000 ( ) ( 1 . 0 2 1 1 . 0 2 1      F e F e F X j j FT     0 1 4000 , 4000 F Hz F Hz    2 1 | |  f     3 1 1 . 0 2 1 3 1 1 . 0 2 1 ) (      f e f e f X j j DTFT       4 4 4 1 0 3 3 3 3 1 f round        4 4 4 1 1 3 3 3 3 ( 1) f round          
  • 11. Linear Time Invariant (LTI) Systems and z-Transform ] [n x ] [n y ] [n h If the system is LTI we compute the output with the convolution:        m m n x m h n x n h n y ] [ ] [ ] [ * ] [ ] [ If the impulse response has a finite duration, the system is called FIR (Finite Impulse Response): ] [ ] [ ... ] 1 [ ] 1 [ ] [ ] 0 [ ] [ N n x N h n x h n x h n y      
  • 12.          n n z n x n x Z z X ] [ ] [ ) ( Z-Transform Facts: ) ( ) ( ) ( z X z H z Y  ] [n x ] [n y ) (z H Frequency Response of a filter: f j e z z H f H  2 ) ( ) (  
  • 13. Digital Filters ) (z H ] [n x ] [n y Ideal Low Pass Filter f 2 1 2 1  ) ( f H f 2 1 2 1  ) ( f H  P f P f passband constant magnitude in passband… … and linear phase A
  • 14. Impulse Response of Ideal LPF       P P f f fn j fn j ideal df Ae df e f H n h   2 2 2 1 2 1 ) ( ] [ Assume zero phase shift,    n f sinc Af n h P P ideal 2 2 ] [  This has Infinite Impulse Response, non recursive and it is non- causal. Therefore it cannot be realized. -50 -40 -30 -20 -10 0 10 20 30 40 50 -0.05 0 0.05 0.1 0.15 0.2 n fp=0.1 [ ] h n n 0.1 1 P f A  
  • 15. Non Ideal Ideal LPF The good news is that for the Ideal LPF 0 ] [ lim    n hideal n n ] [n h L  L n L 2 L ] [n h
  • 16. Frequency Response of the Non Ideal LPF P f STOP f pass stop stop f transition region attenuation ripple | ) ( | f H 1 1   1 1   2  LPF specified by: • passband frequency • passband ripple or • stopband frequency • stopband attenuation or P f 1  dB RP 1 1 1 1 10 log 20      STOP f 2  dB R 2 S  10 log 20 
  • 17. Best Design tool for FIR Filters: the Equiripple algorithm (or Remez). It minimizes the maximum error between the frequency responses of the ideal and actual filter. 1 f 2 f 2 1 attenuation ripple | ) ( | f H 1 1   1 1   2          1 2 3 3 1 2 , 0, , , / , 1,1,0,0 , , h firpm N f f f f w w  impulse response   ] [ ],..., 0 [ N h h h  1 f 2 f 2 1 3  f 0 Linear Interpolation 1 1 / w  2 / w 
  • 18. The total impulse response length N+1 depends on: • transition region • attenuation in the stopband 1 f 2 f | ) ( | f H 2  1 2 f f f     N f 1 ~ 22 ) ( log 20 2 10   Example: we want Passband: 3kHz Stopband: 3.5kHz Attenuation: 60dB Sampling Freq: 15 kHz Then: from the specs We determine the order the filter 30 1 0 . 15 0 . 3 5 . 3     f 82 30 ~ 22 60   N
  • 19. Frequency response 0 0.1 0.2 0.3 0.4 0.5 -100 -80 -60 -40 -20 0 20 magnitude digital frequency dB 0 0.1 0.2 0.3 0.4 0.5 -120 -100 -80 -60 -40 -20 0 20 magnitude digital frequency dB N=82 N=98
  • 20. Example: Low Pass Filter 0 0.1 0.2 0.3 0.4 0.5 -120 -100 -80 -60 -40 -20 0 20 magnitude digital frequency dB Passband f = 0.2 Stopband f = 0.25 with attenuation 40dB Choose order N=40/(22*(0.25-0.20))=37 | ( ) | H f f Almost 40dB!!!
  • 21. Example: Low Pass Filter Passband f = 0.2 Stopband f = 0.25 with attenuation 40dB Choose order N=40 > 37 | ( ) | H f f 0 0.1 0.2 0.3 0.4 0.5 -80 -70 -60 -50 -40 -30 -20 -10 0 10 magnitude digital frequency dB OK!!!
  • 22. General FIR Filter of arbitrary Frequency Response ] ,..., , [ ] ,..., , , 0 [ 1 0 2 1 M M H H H H f f f f   0 1 f 2 f 3 f 1  M f 2 1  M f 0 H 1 H 2 H 3 H 1  M H M H Weights for Error: 1 w 2 w 2 / ) 1 (  M w ] ,..., , [ 2 / ) 1 ( 2 1   M w w w w Then apply:   , / , , M h firpm N f f H w  … and always check frequency response if it is what you expect!
  • 23. Example: ( ) 1/sinc( ) H f f  for 0 0.2 f   ( ) 0 H f  0.25 0.5 f   0 0.2 0.25 0.5 f fp=0:0.01:0.2; % vector of passband frequencies fs=[0.25,0.5]; % stopband frequencies M=[1./sinc(fp), 0, 0]; % desired magnitudes Df=0.25-0.2; % transition region N=ceil(A/(22*Df)); % first guess of order h=firpm(N, [ fp, fs]/0.5,M); % impulse response 40 A dB 
  • 24. 0 0.1 0.2 0.3 0.4 0.5 0 0.2 0.4 0.6 0.8 1 1.2 1.4 magnitude digital frequency 0 0.1 0.2 0.3 0.4 0.5 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 not very good here! dB 37 N 
  • 25. To improve it: 1. Increase order 2. Add weights 0 0.2 0.25 0.5 f 40 A dB  1 w  0.2 w  w=[1*ones(1,length(fp)/2), 0.2*ones(1, length(fs)/2)]; h=firpm(N, [fp, fs]/0.5,M,w);
  • 26. 0 0.1 0.2 0.3 0.4 0.5 0 0.2 0.4 0.6 0.8 1 1.2 1.4 magnitude digital frequency 0 0.1 0.2 0.3 0.4 0.5 -160 -140 -120 -100 -80 -60 -40 -20 0 20 100 N  dB