Download - 1 DSP Fundamentals
-
8/20/2019 1 DSP Fundamentals
1/26
Fundamentals of Digital Signal Processing
-
8/20/2019 1 DSP Fundamentals
2/26
Fourier Transform of continuous time signals
{ } ∫
+∞
∞−
−
== dt et xt 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
sinct T
FT rect T FT =
{ } ( )0
2 0
F F e FT
t F j
−=δ
π
( ){ } ( ) ( )021
021
02cos F F e F F et F FT j j ++−=+ − δ δ α π α α
-
8/20/2019 1 DSP Fundamentals
3/26
Discrete Time Fourier Transform of sampled signals
{ } ∑+∞
−∞=
−==n
fn jen xn x DTFT f X π 2][][)(
{ } ∫ −== 2
1
21
2)()(][ df e f X f X IDTFT n x fn j π
with f the digital fe!"enc# (no dimensions).
Example:
{ }02 0( ) j f n
k
DTFT e f f k π
δ
+∞
=−∞
= − −∑
since$ "sing the %o"ie &eies$
2( ) j nt
k n
t k e π δ +∞ +∞
=−∞ =−∞
− =∑ ∑
-
8/20/2019 1 DSP Fundamentals
4/26
Property of DTFT
' f is the digital fe!"enc# and has no dimensions
' is periodic with peiod f 1.)1()( += f X f X
21
21
-
8/20/2019 1 DSP Fundamentals
5/26
t F j
et x 02
)( π
=
n j
s
s F
F
enT xn x02
)(][ π
==
s s T F /1=
Sampled Complex Exponential: no aliasing
0 F F
)( F X
f
( ) X f
2
1−
1
2
1. o *liasing2
0 s F F <
2
s F −2
s F
0 f
s F
F f 00 =digital fe!"enc#
-
8/20/2019 1 DSP Fundamentals
6/26
t F j
et x 02
)( π
=
n j
s
s F
F
enT xn x02
)(][ π
==
s s T F /1=
Sampled Complex Exponential: aliasing
0 F F
)( F X
f
( ) X f
2
1−
1
2
2. *liasing 02
s F F >
2
s F −2
s F
0 f
0 00
s s
F F f round
F F
= − ÷
digital fe!"enc#
-
8/20/2019 1 DSP Fundamentals
7/26
t F jet x 02)( π = 02[ ] ( ) j f n s x n x nT e π = =
s s T F /1=
Mapping between Analog and Digital Freuency
−=
s s F
F round
F
F f 000
-
8/20/2019 1 DSP Fundamentals
8/26
Example
t jet x 10002)( π
= kHz F s +=
,hen:
' analog fe!"enc#
' %,:
' digital fe!"enc#
'-,%,: fo
)1000()( −= F F X FT δ
Hz F 10000 =
( ) ( )0 0 1 1 10 + + + s s F F
F F f round round = − = − =
( )+1)( −= f f X DTFT δ 2
1
-
8/20/2019 1 DSP Fundamentals
9/26
Example
t jet x 20002)( π =kHz F s +=
,hen:
' analog fe!"enc#
' %,:
' digital fe!"enc#
'-,%,: fo
)2000()( −= F F X FT δ
Hz F 20000 =
( )+1)( += f f X DTFT δ 2
1
-
8/20/2019 1 DSP Fundamentals
10/26
Example
t j jt j j eeeet t x π π π π π π 0001.02
10001.0
2
1)1.0000cos()( −−
+=+=kHz F s +=
,hen:
' analog fe!"encies
' %,:
' digital fe!"encies
'-,%,
)000()000()( 1.0211.0
21 ++−= − F e F e F X j j FT δ δ
π π
0 1000 $ 000 F Hz F Hz = = −
21
-
8/20/2019 1 DSP Fundamentals
11/26
!inear Time "n#ariant $!T"% Systems and &'Transform
][n x ][n y][nh
f the s#stem is , we comp"te the o"tp"t with the con3ol"tion:
∑
+∞
−∞=
−==m
mn xmhn xnhn y ][][][4][][
f the imp"lse esponse has a finite d"ation$ the s#stem is called %5
(%inite mp"lse 5esponse):
][][...]1[]1[][]0[][ N n x N hn xhn xhn y −++−+=
-
8/20/2019 1 DSP Fundamentals
12/26
{ } ∑+∞
−∞=
−==n
n z n xn x Z z X ][][)(
('Transform
%acts:
)()()( z X z H z Y =
][n x ][n y)( z H
%e!"enc# 5esponse of a filte:
f j
e z
z H f H π 2)()(=
=
-
8/20/2019 1 DSP Fundamentals
13/26
Digital Filters
)( z H
][n x ][n y
deal ow 6ass %ilte
f 21
21−
)( f H
f 21
21−
)( f H ∠
P f
P f
pass7and
constant magnit"dein pass7and8
8 and linea phase
A
-
8/20/2019 1 DSP Fundamentals
14/26
"mpulse )esponse of "deal !PF
∫ ∫ −− == P
P
f
f
fn j fn j
idea df Aedf e f H nh
π π 2221
21 )(][
*ss"me zeo phase shift$
⇒ ( )n f sinc Af nh P P idea 22][ =
,his has nfinite mp"lse 5esponse$ non ec"si3e and it is non9
ca"sal. ,heefoe it cannot 7e ealized.
-50 -40 -30 -20 -10 0 10 20 30 40-0.05
0
0.05
0.1
0.15
0.2
n
fp=0.1
[ ]h n
n
0.1
1
P f
A
==
-
8/20/2019 1 DSP Fundamentals
15/26
*on "deal "deal !PF
,he good news is that fo the deal 6%
0][lim =±∞→ nhidea n
n
][nh
!− !
n !2 !
][nh
-
8/20/2019 1 DSP Fundamentals
16/26
Freuency )esponse of t+e *on "deal !PF
P f "T#P f
passstop stop
f
tansition egion
attenuation
ri$$e
)( f H 11 δ +
11 δ −2δ
6% specified 7#:
' pass7and fe!"enc#
' pass7and ipple o
' stop7and fe!"enc#
' stop7and atten"ation o
P f
1δ d% & P 11
1
1
10log20 δ δ
−+=
"T#P f
2δ
d% & '" δ
10log20=
-
8/20/2019 1 DSP Fundamentals
17/26
est -esign tool fo %5 %iltes: the E!"iipple algoithm (o 5emez). t
minimizes the maxim"m eo 7etween the fe!"enc# esponses of the
ideal and act"al filte.
1 f 2 f 21
attenuation
ri$$e
)( f H 11 δ +
11 δ −
2δ
[ ] [ ] [ ]( )1 2 + + 1 2$ 0$ $ $ / $ 1$1$0$0 $ $h fir$m N f f f f ( (=
imp"lse esponse
[ ]][]$...$0[ N hhh =
1 f 2 f 21
+ = f 0
inea ntepolation
1
1/ (δ
2/ (δ
-
8/20/2019 1 DSP Fundamentals
18/26
,he total imp"lse esponse length N ;1 depends on:
' tansition egion
' atten"ation in the stop7and
1 f 2 f
)( f H
2δ
12 f f f −=∆
( ) N f 1
< 22)(log20 210 δ
∆
Example:
we want
6ass7and: +=Hz
&top7and: +.>=Hz
*tten"ation: ?0d&ling %e!: 1> =Hz
,hen: fom the specs
@e detemine the ode the filte
+01
0.1>0.+>.+ ==∆ − f
2+0<22
?0 =× N
-
8/20/2019 1 DSP Fundamentals
19/26
%e!"enc# esponse
0 0.1 0.2 0.3 0.4 0.5-100
-80
-60
-40
-20
0
20magnitude
digital frequency
d B
0 0.1 0.2 0.3 0.4 0.5-120
-100
-80
-60
-40
-20
0
20magnitude
digital frequency
d B
2
A
-
8/20/2019 1 DSP Fundamentals
20/26
Example: ow 6ass %ilte
0 0.1 0.2 0.3 0.4 0.5-120
-100
-80
-60
-40
-20
0
20 magnitude
digital frequency
d B
6ass7and f 0.2
&top7and f ) 0.2> with atten"ation 0d
Bhoose ode 0/(224(0.2>90.20))+C
( ) H f
f
Amost *+d%,,,
-
8/20/2019 1 DSP Fundamentals
21/26
Example: ow 6ass %ilte
6ass7and f 0.2
&top7and f ) 0.2> with atten"ation 0d
Bhoose ode 0 D +C
( ) H f
f
0 0.1 0.2 0.3 0.4 0.5-80
-70
-60
-50
-40
-30
-20
-10
0
10magnitude
digital frequency
d B
FGGG
l %5 %il f 7i % 5
-
8/20/2019 1 DSP Fundamentals
22/26
eneal %5 %ilte of a7ita# %e!"enc# 5esponse
]$...$$[
]$...$$$0[
10
21
-
-
H H H H
f f f f
=
=
01 f 2 f + f 1− - f 2
1= - f
0 H 1 H 2 H
+ H 1− - H - H
@eights fo Eo:
1(
2( 2/)1( + - (
]$...$$[ 2/)1(21 += - ((((
,hen appl#:
( )$ / $ $ - h fir$m N f f H (=8 and alwa#s chec= fe!"enc# esponse if it is what #o" expectG
E l
-
8/20/2019 1 DSP Fundamentals
23/26
Example:( ) 1/ sinc( ) H f f = fo 0 0.2 f ≤ <
( ) 0 H f = 0.2> 0.> f ≤ <
0 0.2 0.2> 0.> f
f$)+.+/+0.+/'1 2 3ector of $ass4and fre5uencies
fs)[0.2>$0.>]I 2 sto$4and fre5uencies
-)[1./sinc(fp)$ 0$ 0]I 2 desired ma6nitudes Df 0.2>90.2I 2 transition re6ion
N ceil(*/(224 Df ))I 2 first 6uess of order
hfipm( N $ [ f$$ fs]/0.>$ - )I 2 im$use res$onse
0 A d%=
-
8/20/2019 1 DSP Fundamentals
24/26
0 0.1 0.2 0.3 0.4 0.50
0.2
0.4
0.6
0.8
1
1.2
1.4magnitude
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 3e# good heeG
d%
+C N =
-
8/20/2019 1 DSP Fundamentals
25/26
,o impo3e it:
1. ncease ode
2. *dd weights
0 0.2 0.2> 0.> f
0 A d%=
1( = 0.2( =
w[14ones(1$length(fp)/2)$ 0.24ones(1$ length(fs)/2)]I
hfipm($ [fp$ fs]/0.>$J$w)I
magnitude
-
8/20/2019 1 DSP Fundamentals
26/26
0 0.1 0.2 0.3 0.4 0.50
0.2
0.4
0.6
0.8
1
1.2
1.4magnitude
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 =d%