Sie sind auf Seite 1von 59

Digital Signal Processing Related to Speech Recognition

Berlin Chen 2005


References:
1. A. V. Oppenheim and R. W. Schafer, Discrete-time Signal Processing, 1999 2. X. Huang et. al., Spoken Language Processing, Chapters 5, 6 3. J. R. Deller et. al., Discrete-Time Processing of Speech Signals, Chapters 4-6 4. J. W. Picone, Signal modeling techniques in speech recognition, proceedings of the IEEE, September 1993, pp. 1215-1247

Digital Signal Processing


Digital Signal
Discrete-time signal with discrete amplitude

x[n ]

Digital Signal Processing


Manipulate digital signals in a digital computer

SP- Berlin Chen

Two Main Approaches to Digital Signal Processing


Filtering
Signal in
x [n ]

Filter
Amplify or attenuate some frequency components of x[n ]

Signal out
y [n ]

Parameter Extraction
Signal in

x[n]

Parameter Extraction
e.g.: 1. Spectrum Estimation 2. Parameters for Recognition

Parameter out
c11 c12 c 1m c21 c22 c 2m cL1 cL2 c Lm
SP- Berlin Chen 3

Sinusoid Signals
x [n ] = A cos ( n + )

f : normalizedfrequency 0 f 1

: angular frequency (), = 2f : phase ()

A : amplitude ()

2 T
Period, represented by number of samples

x [n ] = A cos n 2

x [n ] = x [n + N ] = A cos ( n + N ) 2 2 k (k = 1, 2 ,... ) N = 2 k = N

T = 25 samples

Right-shifted

E.g., speech signals can be decomposed as sums of sinusoids

SP- Berlin Chen

Sinusoid Signals (cont.)


x [n ] is periodic with a period of N (samples)

A cos ( ( n + N ) + ) = A cos ( n + )

x [n + N ] = x [n ]

N = 2 k ( k = 1 ,2 ,... )
Examples (sinusoid signals)

x 1 [n ] = cos ( n / 4 ) x 2 [n ] = cos (3 n / 8 )
x 3 [n ] = cos (n )

2 = N

is periodic with period N=8 is periodic with period N=16 is not periodic
SP- Berlin Chen 5

Sinusoid Signals (cont.)


x1 [n ] = cos ( n / 4 )

= cos n = cos ( n + N 1 ) = cos n + N1 4 4 4 4


N1 = 8

N 1 = 2 k N 1 = 8 k

(N 1 and

k are positive integers

x 2 [n ] = cos (3n / 8 ) 3 3 3 3 (n + N 2 ) = cos n = cos n + N2 = cos 8 8 8 8 3 16 k ( N 2 and k are positive numbers ) N 2 = 2 k N 2 = 8 3 N 2 = 16

x3 [n ] = cos (n )

= cos (1 n ) = cos (1 (n + N 3 )) = cos (n + N 3 )

N 3 = 2 k Q N 3 and k are positive integers N 3 doesn' t exist !


SP- Berlin Chen 6

Sinusoid Signals (cont.)


Complex Exponential Signal
Use Eulers relation to express complex numbers

z = x + jy z = Ae
j
2

= A (cos + j sin )
x
y x + y2
2

(A

is a real number

x + y

x2 + y2

Imaginary part

Im

x = A cos y = A sin
Re
real part
SP- Berlin Chen 7

Sinusoid Signals (cont.)


A Sinusoid Signal

x [n ] = A cos ( n + = Re
real part

= Re

{Ae {Ae

j ( n + j n

} }

SP- Berlin Chen

Sinusoid Signals (cont.)


Sum of two complex exponential signals with same frequency
A 0 e j ( n + 0 ) + A1 e j ( n + 1 ) = e = e
j n j n

(A e
0

j 0

+ A1 e

j1

)
A , A 0 and A1 are real numbers

Ae

= Ae j ( n + )

When only the real part is considered

A0 cos ( n + 0 ) + A1 cos ( n + 1 ) = A cos ( n + )


The sum of N sinusoids of the same frequency is another sinusoid of the same frequency

SP- Berlin Chen

Sinusoid Signals (cont.)


Trigonometric Identities

A 0 sin 0 + A1 sin 1 tan = A 0 cos 0 + A1 cos 1

A 2 = ( A 0 cos 0 + A1 cos 1 )2 + ( A 0 sin 0 + A1 sin 1 )2


2 A 2 = A0 + A12 + 2 A 0 A1 (cos 0 cos 1 + sin 0 sin 1 ) 2 = A0 + A12 + 2 A 0 A1 cos ( 0 1 )
SP- Berlin Chen 10

Some Digital Signals

SP- Berlin Chen

11

Some Digital Signals


Any signal sequence x [n ] can be represented as a sum of shift and scaled unit impulse sequences (signals) x [n ] = x [k ] [n k ]
n = ..., 2 , 1 , 0 ,1 , 2 , 3 ,...

k = scale/weighted

Time-shifted unit impulse sequence

x [n ] =

= x [ 2 ] [n + 2 ] + x [ 1 ] [n + 1 ] + x [0 ] [n ] + x [ 1] [n 1 ] + x [2 ] [n 2 ] + x [3 ] [n 3 ] = (1 ) [n + 2 ] + ( 2 ) [n + 1 ] + (2 ) [n ] + (1 ) [n 1 ] + ( 1 ) [n 2 ] + (1 ) [n 3 ]
SP- Berlin Chen 12

k =

x [k

] [n

k ]=

k = 2

x [k ] [n

Digital Systems
A digital system T is a system that, given an input signal x[n], generates an output signal y[n]
y [n ] = T {x [n ]}

x [n ]

T{ }

y [n ]

SP- Berlin Chen

13

Properties of Digital Systems


Linear
Linear combination of inputs maps to linear combination of outputs
T {ax1 [n ] + bx 2 [n ]} = aT {x1 [n ]} + bT {x 2 [n ]}

Time-invariant (Time-shift)
A time shift in the input by m samples gives a shift in the output by m samples y [n m ] = T {x [n m ]}, m
time sift
x [n m ] (if m > 0 ) right shift m samples x [n + m ] (if m > 0 ) left shift m samples

SP- Berlin Chen

14

Properties of Digital Systems (cont.)


Linear time-invariant (LTI)
The system output can be expressed as a convolution () of the input x[n] and the impulse response h[n]

} = x [n ] h [n ] = T {x [n ]

k =

x [k ] h [n k ] =

k =

x [n k ] h [k

The system can be characterized by the systems impulse response h[n], which also is a signal sequence If the input x[n] is impulse [n ], the output is h[n]
[n ]
Digital System

h [n ]

SP- Berlin Chen

15

Properties of Digital Systems (cont.)


Linear time-invariant (LTI)
Explanation: x [n ] =
T
k =

x [k
T

] [n
k =

scale

Time-shifted unit impulse sequence

{x [n ]} =
=

x [k ] [n k

k =

x [k ] T { [n k x [k k

]}

linear

Impulse response [n ] Digital


System

=
h [n ]

] h [n k = x [n ] h [n ]

]
Time-invariant

Time invariant

convolution

T [n k ] h[n k ]
SP- Berlin Chen 16

T [n ] h[n ]

Properties of Digital Systems (cont.)


Linear time-invariant (LTI)
Convolution Example
[n ]
Length=L=3 3 2 1 Length=M=3 3 1 2 -2 Length=L+M-1

x [n ]

LTI LTI

h [n ]

0 1

?
3 h[n]

3 [n] 2 [n 1] 1 [n 2]

0 1 2 3 0 2 1 1 2

9 2 -6 6 2 1 2 3 -4 1 3 2 3 -2
SP- Berlin Chen 17

0 1

Sum up
11 3 1

2 h[n 1] h[n 2]

y [n ]
3 4 -1 -2

0 12

Properties of Digital Systems (cont.)


Linear time-invariant (LTI)
Convolution: Generalization Reflect h[k] about the origin ( h[-k]) Slide (h[-k] h[-k+n] or h[-(k-n)] ), multiply it with x[k] y [n ] = x [k ] h [n k ] Sum up = x [k ] h [ (k n )]
k =

x [k

k =

h [k

Reflect

Multiply Sum up slide

h [ k ]

n
SP- Berlin Chen 18

h [k
Reflect

] ]
3

1 0 1 3

Convolution
2 -2

y [n ] = x [n ] h [n ] =
3 0 11
k =

x [k
h [ k

2 1

0 1 2 -2 1

x [k ] h [n k ]

y [n ], n = 0 y [n ], n = 1
Sum up
1 2

-1 0 -2 3 -1 -2

h[ k + 1] h[ k + 2] h[ k + 3] h[ k + 4]

1 1 1

0 1 3 0 -2 1 -2 2 -2

y [n ], n = 2 y [n ], n = 3 y [n ], n = 4
4 -2

11 3 1

y [n ]
3 4 -1 -2

1 2 3 1

0 12

3 -1 1

2 3 3

3 4
SP- Berlin Chen 19

Properties of Digital Systems (cont.)


Linear time-invariant (LTI)
Convolution is commutative and distributive
Commutation
h 1 [n ] h 2 [n ] h 2 [n ] h 1 [n ]
= x [n ]* h 1 [n ]* h

[n ] x [n ]* h 2 [n ]* h 1 [n ]
2

h 2 [n ]

Distribution

h 1 [n ] + h 2 [n ]

= x [n ]* h 1 [n ] + x [n ]* h 2 [n

x [n ]* (h 1 [n ] + h 2 [n

])

h 1 [n ]

An impulse response has finite duration Finite-Impulse Response (FIR) An impulse response has infinite duration Infinite-Impulse Response (IIR)

y [n

]=
= = =

]* h [n ] h [n ]* x [n ] x [k ] h [n k =
k =

x [n

k k

] ]
20

h [k

] x [n

SP- Berlin Chen

Properties of Digital Systems (cont.)


Prove convolution is commutative
y [n ] = x [n ]* h [n = = =
k = m = k =

] x [k ] h [n

]
m = n k

x [n m

] h [m ] (let ]

h [k ]x [n k

= h [n ]* x [n

SP- Berlin Chen

21

Properties of Digital Systems (cont.)


Linear time-varying System
E.g., y [n ] = x [n ]cos 0 n is an amplitude modulator
x1 [n ] = x [n n 0 ] y1 [n ]= y [n n 0 ] y1 [n ] = x1 [n ]cos 0 n = x [n n 0 ]cos 0 n But y [n n 0 ] = x [n n 0 ]cos 0 (n n 0 )
?

suppose

that

SP- Berlin Chen

22

Properties of Digital Systems (cont.)


Bounded Input and Bounded Output (BIBO): stable
x [n

] y [n ]

B B

x y

< <

n n

and

A LTI system is BIBO if only if h[n] is absolutely summable

k =

[k ]

SP- Berlin Chen

23

Properties of Digital Systems (cont.)


Causality
A system is casual if for every choice of n0, the output sequence value at indexing n=n0 depends on only the input sequence value for n n0

y [n 0 ] =
K k =1

y [n 0 k ] + k x [n 0 m
M k=m

x [n ]
z-1 z-1

0 1 2 M

y [n ]
1 2
z-1 z-1

z-1

z-1

Any noncausal FIR can be made causal by adding sufficient long delay
SP- Berlin Chen 24

Discrete-Time Fourier Transform (DTFT)


Frequency Response H (e j ) H (e
j

Defined as the discrete-time Fourier Transform of h [n ]

) is continuous and is periodic with period= 2

proportional to two times of the sampling frequency

e j n = cos n + j sin n

H e

is a complex function of
j

H e

( )=
=

(e ) + H (e ) e
j r j

Im

jH

j H e j

(e )
j

phase

Re
SP- Berlin Chen 25

magnitude

Discrete-Time Fourier Transform (cont.)


Representation of Sequences by Fourier Transform
H

(e

)=
1 2

n =

h [n H

]e

j n

DTFT
j n

h [n

]=

(e

)e

Inverse DTFT

A sufficient condition for the existence of Fourier transform


n =

h [n ]
jn

< absolutely summable

Fourier transform is invertible : He

( )=
j

[ n]e n =
h

h[n] =

1 1 jm jn j jn H e e d = e d h[m]e 2 2 m = 1 j ( n m ) = h[m] d = h[m] [n m] = h[n] e m = m = 2

( )

1 j ( n m ) d e 2 1 = e j ( n m ) j 2 ( n m ) sin (n m ) = (n m )

1, m = n = 0, m n = [n m ]
SP- Berlin Chen 26

Discrete-Time Fourier Transform (cont.)


Convolution Property
H

(e

)=

h [n

]e

j n

n =

y [ n ] = x [ n ] h [n

]=

x [k ]h [n k

]
n'= n k n = n '+ k n = n ' k

k =

Y e

)=
n =

x [k ]h [n k ]e
j k

j n

k =

k =

x [k ]e

= X x [ n ] h [n

(e

)H (e
X

n ' =

h [n ' ]e

j n '

Y e j = X e j H e j
j

(e

)H (e

( ) ( ) ( ) Y (e ) = X (e ) H (e ) Y (e ) = X (e ) + H (e )
j j j j j j

SP- Berlin Chen

27

Discrete-Time Fourier Transform (cont.)


*

: complex conjugate z * = x jy
2

Parsevals Theorem
power spectrum
n =

z = x + jy

z z* = x 2 + y 2 = z

x [n ]

1 = 2

X e

The total energy of a signal can be given in either the time or frequency domain.

Define the autocorrelation of signal x [n ]


R xx [n ] =
m =

x [ m + n ]x * [ m ]

l = m+n m = l n = (n l )

= x [ l ]x * [ (n l )] = x [ n ] x [ n ]

l =

S xx ( ) = X ( )X

( ) =
j n

X (

)2

1 R xx [n ] = 2
Set R
xx

S xx ( )e
*

1 d = 2

X ( ) e jn d
2

n = 0

[0 ] =

x [m ]x

m =

[m ] =

x [m

]2

m =

1 2

X (

)2 d
SP- Berlin Chen 28

Discrete-Time Fourier Transform (DTFT)


A LTI system with impulse response h [n ]
x1 [n ] = jA sin ( n + )

What is the output y [n ] for x [n ] = A cos ( n + )


x 0 [n ] = x [n ] + x1 [n ] = Ae j ( n + ) y 0 [n ] = Ae j ( n + ) * h [n ]
k =

= h [k ]Ae j ( (n k )+ ) = Ae
j ( n + )

( ) ( ) = Ae ( ) H (e )e ( ) = A H (e )e ( ) y [n ] y [n ] = A H (e ) cos (( n + ) + H (e )) + jA H (e ) sin (( n + ) + H (e )) y [n ] = A H (e ) cos (( n + ) + H (e ))


= Ae j ( n + ) H e j
j n+ j j j H e j j n+ + j H e j

k =

e h [k ]

j k

Systems frequency response

( ) H (e ) < 1
j

H e j > 1 amplify attenuate

SP- Berlin Chen

29

Discrete-Time Fourier Transform (cont.)

SP- Berlin Chen

30

Z-Transform
z-transform is a generalization of (Discrete-Time) Fourier transform h [n ] H e j

( )

h [n ]
z-transform of

H (z )

H (z ) =

n =

h [n ] is defined as

h [n ]z n
j

Where z = re , a complex-variable For Fourier transform

Im

complex plane
z = e j

H e

( ) = H (z )
j

z = e j

Re

z-transform evaluated on the unit circle

z = e j ( z = 1)

unit circle
SP- Berlin Chen 31

Z-Transform (cont.)
Fourier transform vs. z-transform
Fourier transform used to plot the frequency response of a filter z-transform used to analyze more general filter characteristics, e.g. stability Im complex plan
R2

ROC (Region of Converge)


Is the set of z for which z-transform exists (converges)

R1

Re

In general, ROC is a ring-shaped region and the Fourier transform exists if ROC includes the unit circle ( z = 1 )
SP- Berlin Chen 32

n =

h [n ] z

<

absolutely summable

[n ] =
= = =

Z-Transform (cont.)

x [n h [n
k

]* h [n ] ]* x [n ] x [k ] h [n =

k k

] ]

k =

[k ] x [n

An LTI system is defined to be causal, if its impulse response is a causal signal, i.e.

h [n ] = 0 for n < 0
h [n ] = 0 for n > 0

Right-sided sequence

Similarly, anti-causal can be defined as Left-sided sequence

An LTI system is defined to be stable, if for every bounded input it produces a bounded output
Necessary condition:
n =

h [n ] <

That is Fourier transform exists, and therefore z-transform includes the unit circle in its region of converge
SP- Berlin Chen 33

Z-Transform (cont.)
Right-Sided Sequence
E.g., the exponential signal
n

1 for n 0 1. h1 [n ] = a u [n], where u[n ] = 0 for n < 0 n n 1 1 n H1 (z ) = a z = az = have a pole at z = a 1 n = n = 1 az (Pole: z-transform goes to infinity)

( )

1 If az < 1

ROC
the unit cycle Im

is z > a
Fourier tr ansform of h1 [n ] exists if a < 1

Re

SP- Berlin Chen

34

Z-Transform (cont.)
Left-Sided Sequence
E.g. 0

2. h2[n] = anu[ n 1] (n = 0,-1,-2,.. .,-)


H 2 (z ) =
n =

u[ n 1]z
n

=
1

n = n

z n

If a 1 z < 1

= a z = 1
n =1

n =0

(a z )

1 a 1 z 1 = 1 = = 1 1 1 a z 1 a z 1 az 1

ROC
the unit cycle Im

is z < a
when a < 1, the Fourier transform of h2 [n ] doesn' t exist, because h2 [n ] will go
Re

exponentia lly as n
SP- Berlin Chen 35

Z-Transform (cont.)
Two-Sided Sequence
E.g. 0

3.
1 u [n ] 3 1 u [ n 1 ] 2
n n

1 1 [ ] [ ] h3 n = u n u[ n 1] 3
z > 1 3 1 2

1 , 1 1 z 1+ 3 1 , 1 1 z 1 2

H 3 (z ) =

z <

1 1 + 1 1 1 + z 1 1 z 1 2 3

1 2 z z 12 = 1 z + z 3

1 2

the unit cycle

ROC
Im
1 3

1 1 is z < and z > 2 3


Fourier tr ansform of h3 [n ] doesn' t exist,
Re

1
2

because ROC 3 doesn' t include the unit circle


SP- Berlin Chen 36

Z-Transform (cont.)
Finite-length Sequence
E.g. 0 N-1

a n , 3. h4 [n] = 0,
H 4 (z ) = a z
N 1 n=0 n n

0 n N 1 others
= az
n =0 N 1

z N 1 + az N 2 + a 2 z N 3 + ..... + a N 1

( )

1 n

1 az 1 zN aN = = N 1 1 za 1 az z

( )
(

1 N

ROC 4 is entire z - plane except z = 0


the unit cycle Im

1 3

z k = ae
If N=8

j 2k

k = 1 ,..,N 1

Re A pole and zero at z = a is cancelled


SP- Berlin Chen 37

7 poles at zero

Z-Transform (cont.)
Properties of z-transform
1. If h[n ] is right-sided sequence, i.e. h[n ] = 0, n n1 and if ROC is the exterior of some circle, the all finite z for which z > r0 will be in ROC

If

n1 0

,ROC will include z =

A causal sequence is right-sided with n1 0 ROC is the exterior of circle including z =

2. If h[n ] is left-sided sequence, i.e. h[n ] = 0, n n 2 , the ROC is the interior of some circle, 3. If h[n ] is two-sided sequence, the ROC is a ring 4. The ROC cant contain any poles

If n 2 < 0 ,ROC will include z = 0

SP- Berlin Chen

38

Summary of the Fourier and z-transforms

SP- Berlin Chen

39

LTI Systems in the Frequency Domain


Example 1: A complex exponential sequence x[n ] = e jn System impulse response h [n ]
y [n ] = x [n ] h [n ] = = e
j n k = -
y [n

]=
= = =

x [n h [n
k

]* h [n ] ]* x [n ] x [k ] h [n =

k k

] ]

h [k ] e
j k

j ( n k )

k =

[k ] x [n

= H e

k = - j

h [k ] e
j n

)e

H e j : the Fourier tr ansform of the system impulse response. It is often referred to as the system frequency response.

( )

Therefore, a complex exponential input to an LTI system results in the same complex exponential at the output, but modified by H e j The complex exponential is an eigenfunction of an LTI system, and H e j is the associated eigenvalue

( )

T {x [n ]} = H e

( )

( )x [n ]

scalar j

SP- Berlin Chen

40

LTI Systems in the Frequency Domain (cont.)


Example 2: A sinusoidal sequence x[n] = A cos(w0 n + )
x[n ] = A cos ( 0 n + ) = A j j 0 n A j j 0 n e e + e e 2 2
z = x + jy z * = x jy

e j = cos + i sin e j = cos i sin cos = 1 j e + e j 2

System impulse response h[n ]


y [n ] = H e j0

e j = cos + j sin e j e

( )
j

= cos j sin = cos j sin

= cos ( ) + j sin ( )

( )

j j * A j ( 0 n + ) j 0 j ( 0 n + ) j0 * H = H e e +H e e 2 A j0 j0 j H (e j0 ) j ( 0 n + ) j H (e j0 ) j ( 0 n + ) = H e e e + H e e e 2 phase response magnitude response = A H e j0 cos 0 n + + H e j0


0 0

[ ( )

A j j 0 n j0 A j j 0 n e e +H e e e 2 2

( )

H e j0 = H * e j0

) ( ) (e ) = H (e )e

jH e j0

[ ( )

( ) [

( ) ( )]

]
41

SP- Berlin Chen

LTI Systems in the Frequency Domain (cont.)


Example 3: A sum of sinusoidal sequences

x [n ] =

k =1

y [n ] = Ak H e j k cos k n + k + H e j k
magnitude response

k =1 K

A k cos ( k n + k )

( ) [

phase response

( )]

A similar expression is obtained for an input consisting of a sum of complex exponentials

SP- Berlin Chen

42

LTI Systems in the Frequency Domain (cont.)


Example 4: Convolution Theorem x[n]h[n] X (e j )H(e j )
x [n ] = [n kP ]

DTFT DTFT

h [n ] =

k =

X e

( )=
j

k =

a n u [n ], a < 1

H e j =

( )

k =

1 1 ae j

2 2 k P P

Y e j = H e j X e j

( ) ( )( )

2 1 2 = k P 1 ae j k = P 2 1 = a nonzero P 1 ae j has value when

k=

P 2

SP- Berlin Chen

43

LTI Systems in the Frequency Domain (cont.)


1 Example 5: Windowing Theorem x[n]w[n] W e j X e j 2

( ) ( )

x [n ] =

k =

[n kP ]
Hamming window
1 W e j X e j 2 1 2 2 j We k = P 2 k = P 1 2 = W e j k P k = P Y e j =

2n 0.54 0.46 cos , n = 0,1,......, N 1 w[n] = N 1 0 otherwise

( )

( ) ( )

( )

( )

1 m = 2 = W e jm k m P k = m = P 2 j k has a nonzero 1 P value when = We 2 P k = m = P k

( )

SP- Berlin Chen

44

Difference Equation Realization for a Digital Filter


The relation between the output and input of a digital filter can be expressed by x [n ] N M y [n ] y [n ] = k y [n k ] + k x [n k ]
0

k =1

k =0

z-1

z-1 z-1

linearity and delay properties

delay property
x [n n 0 ] X ( z )z x [n ] X ( z )
M
n0

z-1

2 M

z-1

z-1

Y (z ) =

k =1

k Y ( z )z

k =0

k X ( z )z k
Causal: Rightsided, the ROC outside the outmost pole Stable: The ROC includes the unit circle Causal and Stable: all poles must fall inside the unit circle (not including zeros)

A rational transfer function

H (z ) =

Y (z ) = k = 0N X (z ) 1 z k k

k =1

k z k

SP- Berlin Chen

45

Difference Equation Realization for a Digital Filter (cont.)

SP- Berlin Chen

46

Magnitude-Phase Relationship
Minimum phase system:
The z-transform of a system impulse response sequence ( a rational transfer function) has all zeros as well as poles inside the unit cycle Poles and zeros called minimum phase components Maximum phase: all zeros (or poles) outside the unit cycle

All-pass system:
Consist a cascade of factor of the form
1-a * z 1 1 az
1

Characterized by a frequency response with unit (or flat) magnitude for all frequencies
Poles and zeros occur at conjugate reciprocal locations

1-a * z =1 1 1 az

SP- Berlin Chen

47

Magnitude-Phase Relationship (cont.)


Any digital filter can be represented by the cascade of a minimum-phase system and an all-pass system
H (z ) = H min (z )H ap (z )
Suppose that H (z ) has only one zero 1 H (z ) = H 1 (z ) 1 a * z = H1 where : ( a < 1) a* outside the unit circle. H (z ) can be expressed as :

( (z )(1 az )

) ( H (z ) is a minimum phase filter) (1 a z ) ) (1 az )


1 * 1

H 1 (z ) 1 az 1 is also a minimum phase filter.

(1 a z ) is a all - pass filter. (1 az )


* 1

SP- Berlin Chen

48

FIR Filters
FIR (Finite Impulse Response)
The impulse response of an FIR filter has finite duration Have no denominator in the rational function No feedback in the difference equation H (z )

y [n ] =
h [n

]=

n, 0,

r=0

r x [n r ]
0 n M otherwise

x [n ]
z-1 z-1

y [n ]
0 1 M

M Y (z ) = k z k H (z ) = X (z ) k = 0 Can be implemented with simple a train of delay, multiple, and add operations
z-1

SP- Berlin Chen

49

First-Order FIR Filters


A special case of FIR filters
y [n ] = x [n ] + x [n 1 ]
H e

H (z ) = 1 + z 1
2 2

( )
j

= 1 + (cos j sin )
Re
2

H e

)= 1 + e

= (1 + cos ) + ( sin ) = 1 + 2 cos

Im

(e j ) = arctan
Re

sin + 1 cos

< 0 : pre-emphasis filter

10 log H e j

( )

SP- Berlin Chen

50

Discrete Fourier Transform (DFT)


The Fourier transform of a discrete-time sequence is a continuous function of frequency
We need to sample the Fourier transform finely enough to be able to recover the sequence For a sequence of finite length N, sampling yields the new transform referred to as discrete Fourier transform (DFT)

X (k ) = x [n ] e
n=0 N 1

N 1

2 kn N , j

0 n N 1 0 n N 1

DFT, Analysis

1 x [n ] = X (k ) e N k =0

2 kn N ,

Inverse DFT, Synthesis

SP- Berlin Chen

51

Discrete Fourier Transform (cont.)


0 k N 1 X [k ] = x[n] e
n =0 N 1 j 2 kn N

, 0 n N 1
2 j 1( N 1) N

Orthogonal

1 1 2 j 11 N 1 e M M 2 j ( N 1)1 N 1 e

x[0] X [0] X [1] L e [ ] x 1 = M M L M 2 j ( N 1)( N 1) L e N x[N 1] X [N 1] L 1

SP- Berlin Chen

52

Discrete Fourier Transform (cont.)


Orthogonality of Complex Exponentials

1 N
x [n

e
n=0

N 1

2 ( k r )n N

1, if k-r = mN = 0 , otherwise
j 2 kn N

]=
N 1 n = 0

1 N

N 1 k = 0

X
j

[k ] e
=

x [n
N 1

]e

2 rn N

N 1 n = 0
j

1 N
2 N

N 1 k = 0
(k
r

X
)n

[k ] e

2 N

(k

)n

1 = X [k ] N k = 0 = X [r ] X

N 1 n = 0

X [k ] = X [r + mN = X [r ]

[k ] =

N 1 n = 0

x [n

]e

2 kn N

SP- Berlin Chen

53

Discrete Fourier Transform (DFT)


Parsevals theorem

x [n ]
n=0

N 1

1 = N

N 1 k =0

X (k )

Energy density

SP- Berlin Chen

54

Analog Signal to Digital Signal


Analog Signal

Digital Signal: Discrete-time Signal or Digital Signal

x[n ] = xa (nT ), T : sampling period


t = nT

Discrete-time signal with discrete amplitude

Fs = 1

sampling rate

sampling period=125s =>sampling rate=8kHz


SP- Berlin Chen 55

Analog Signal to Digital Signal (cont.)


Continuous-Time Signal Continuous-Time to Discrete-Time Conversion

x a (t )

Sampling
x s (t )
switch

Impulse Train To Sequence


n =

Discrete-Time Signal

= x a (t )s (t ) = =

[n] (= xa (nT)) x

x a (t ) (t nT

s (t ) =

n =

(t nT )

Periodic Impulse Train

) = x [n ] (t nT ) n = n = xs (t ) can be uniquely specified by x[n]


x a (nT ) (t nT

x[n]

Digital Signal

x a (t )

Discrete-time signal with discrete amplitude

(t ) =

0 , t 0 = 1
SP- Berlin Chen 56

s(t ) =

n =

(t nT )

(t )dt

-2T -T 0

2T 3T 4T 5T 6T 7T 8T

Analog Signal to Digital Signal (cont.)


A continuous signal sampled at different periods
x a (t ) x a (t )

1
x s (t ) = x a (t )s (t ) = =
a n =

x (t ) (t nT )
a n =

n =

x (nT ) (t nT ) = x[n ] (t nT )
SP- Berlin Chen 57

Analog Signal to Digital Signal (cont.)


Spectra
Xa ( j)

S ( j

)=

2 T

N
k =

( k

s =

2 = 2Fs (sampling frequency) T

1 X a ( j ) S ( j ) 2 1 X s ( j ) = X a ( j ( k s )) T k =
s

( j ) =

T R s ( j ) = 0

< s / 2 otherwise

X a ( j ) = R s ( j ) X p ( j )

Low-pass filter

1 N < s = 2 T
Q(s N ) > N s > 2N

high frequency components got superimposed on low frequency components

1 N > s = 2 T
X a ( j ) can' t be recovered from X p ( j )

aliasing distortion

Q(s N ) < N s < 2N


SP- Berlin Chen

58

Analog Signal to Digital Signal (cont.)


To avoid aliasing (overlapping, fold over)
The sampling frequency should be greater than two times of frequency of the signal to be sampled s > 2 N (Nyquist) sampling theorem

To reconstruct the original continuous signal


Filtered with a low pass filter with band limit Convolved in time domain
h (t ) = sinc s t

x a (t ) = =

n =

x (nT )h(t nT )
a a s

n =

x (nT )sinc (t nT )

SP- Berlin Chen

59

Das könnte Ihnen auch gefallen