Docsity

Digital Signal Processing: Delta Functions, Periodic Sequences, and Fourier Transform, Study notes of Physics

Toggle sidebar
bg1
PHYS 7397 DIGITAL SIGNAL PROCESSING FOR SCIENTISTS
Dr. Zhuoer Shi, [email protected]du, Department of Physics, University of Houston
1
NOTE 1. LINEAR SYSTEM
Finite vs. Infinite Duration Signals
A discrete signal x[n] is finite duration if there exists two integers -∞ < N1 ≤ N2 < ∞,
such that x[n] ≠ 0 only for N1 ≤ n ≤ N2.
Otherwise, it is of infinite duration.
Right-sided, Left-sided, and Two-sided Signals
The terms apply only to infinite duration signals.
If there exists an integer N1 such that x[n] ≠ 0 only for n ≥ N1, then x[n] is right-sided.
If there exists an integer N2 such that x[n] ≠ 0 only for n ≤ N2, then x[n] is left-sided.
If x[n] is neither right-sided nor left-sided, then it is two-sided.
Causal and Anti-Causal Signals
A signal x[n] is causal if x[n] = 0 for all n < 0.
A signal x[n] is anti-causal if x[n] = 0 for all n > 0.
4. Zero phase, linear phase and nonlinear phase signals
Zero Phase: Left-right symmetry around sample number zero.
Linear Phase: Left-right symmetry around sample number other than zero. Linear phase signal
can be changed to zero phase one by simple shifting.
Nonlinear Phase: without left-right symmetry.
5. Time Delay
x[n] One Sample Delay x[n-1]
System (Transform, Mapping): A Relationship between Input and Output.
7. Linear System S can be characterized by the following conditions:
Homogeneity:
For constant k,
if system S satisfies S(x[n]) = y[n],
then S(kx[n]) = kS(x[n]) = ky[n].
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23

Partial preview of the text

Download Digital Signal Processing: Delta Functions, Periodic Sequences, and Fourier Transform and more Study notes Physics in PDF only on Docsity!

NOTE 1. LINEAR SYSTEM

Finite vs. Infinite Duration Signals

A discrete signal x [ n ] is finite duration if there exists two integers -∞ < N 1 ≤ N 2 < ∞,

such that x [ n ] ≠ 0 only for N 1 ≤ n ≤ N 2.

Otherwise, it is of infinite duration.

Right-sided, Left-sided, and Two-sided Signals

The terms apply only to infinite duration signals.

If there exists an integer N 1 such that x[n] ≠ 0 only for n ≥ N 1 , then x[n] is right-sided.

If there exists an integer N 2 such that x[n] ≠ 0 only for n ≤ N 2 , then x[n] is left-sided.

If x[n] is neither right-sided nor left-sided, then it is two-sided.

Causal and Anti-Causal Signals

A signal x[n] is causal if x[n] = 0 for all n < 0.

A signal x[n] is anti-causal if x[n] = 0 for all n > 0.

  1. Zero phase, linear phase and nonlinear phase signals

Zero Phase: Left-right symmetry around sample number zero.

Linear Phase: Left-right symmetry around sample number other than zero. Linear phase signal

can be changed to zero phase one by simple shifting.

Nonlinear Phase: without left-right symmetry.

  1. Time Delay

x[n] One Sample Delay x[n-1]

System (Transform, Mapping): A Relationship between Input and Output.

  1. Linear System S can be characterized by the following conditions:

Homogeneity:

For constant k ,

if system S satisfies S(x[n]) = y[n],

then S(kx[n]) = kS(x[n]) = ky[n].

Additivity:

If S(x 1 [n]) = y 1 [n], and S(x 2 [n]) = y 2 [n]

Then S(x 1 [n] + x 2 [n]) = S(x 1 [n]) + S(x 2 [n]) = y 1 [n] + y 2 [n]

Commutative:

for linear systems A and B

A(B(x[n])) = B(A(x[n]))

Any System violates above-mentioned three rules, is a nonlinear system.

  1. Shift (Time) Invariance System:

if S(x[n]) = y[n], then S(x[n + i]) = y[n + i].

9. Energy of signal x[n]: ∑

∞

=−∞

n

E xn

2 [ ].

Example:

sin [ 2 π f(n+N) ] = sin [ 2 π fn ], f is normalized frequency.

Definition 4: Convolution y [ n ]= h [ n ]∗ x [ n ]

x [ n ] Linear System h [ n ] y [ n ]

The impulse response of the system expresses the relation between input and output.

∞

=−∞

j

y [ i ] h [ j ] x [ i j ]

Convolution Sum (Linear System).

NOTE 3. Convolution Properties

Properties of Delta function: δ[ n ] is identity for convolution,

x [ n ]∗δ[ n ]= x [ n ]

x [ n ]∗ k δ[ n ]= kx [ n ]

x [ n ]∗δ[ n + i ]= x [ n + i ]

Properties of Convolution (Convolution is a linear system)

Commutative: a [ n ]∗ b [ n ]= b [ n ]∗ a [ n ]

Associative: { a [ n ]∗ b [ n ]}∗ c [ n ]= a [ n ]∗{ b [ n ]∗ c [ n ]}

Distributive: a [ n ]∗ b [ n ]+ a [ n ]∗ c [ n ]= a [ n ]∗{ b [ n ]+ c [ n ]}

Transference between the Input and Output

Suppose y [ n ]= x [ n ]∗ h [ n ],

If L is a linear system and x 1 [ n ] = L { x [ n ]}, y 1 [ n ] = L { y [ n ]}

Then y 1 [ n ]= x 1 [ n ]∗ h [ n ]

5. (Auto-Regression): ∑

−

=

1

0

[ ] [ ][ ]

M

k

yn ak xn k

For Example: y [ n ] = x [ n ] - x [ n -1] (first difference)

6. (Moving Average): ∑

−

=

1

1

[ ] [ 0 ][ ] [ ] [ ]

M

k

yn b xn bk yn k

For Example: y [ n ] = x [ n ] + y [ n - 1] (running sum)

  1. Central Limit Theorem: y [ n ]= x [ n ]∗ x [ n ]∗...∗ x [ n ]
  2. Correlation: Convolution = Cross-Correlation c [ n ]= a [ n ]∗ b [− n ]

Autocorrelation: c [ n ]= a [ n ]∗ a [− n ]

Detector (Not Restoration).

Low-Pass Filter h [ n ]: ∑ ≠

n

h [ n ] 0 , ∑ − =

n

n ( 1 ) h [ n ] 0

Cutoff the high-frequency components (undulation, pitches), smooth the signal

NOTE 4. Fourier Representation

Any continuous periodic signal ⇔ sum of properly chosen sinusoidal functions

Gibbs Effects: Problem of non-smooth continuous

4 Categories of Fourier Representation ( ω = 2 π f )

(1) Aperiodic Continuous Fourier Transform

+∞

−∞

− X f = xte dt

j 2 π ft ( ) ()

Aperiodic

Frequency f ∈ R Continuous

Time (Shift) t ∈ R Continuous

(2) Periodic Continuous Fourier Series (Frequency Response)

+∞

=−∞

−

n

j fn X f xne

2 π ( ) ( )

Use to Characterize the Filters and Signals. Response

Periodic X ( f ) = X ( f + 1)

Frequency f ∈ R Continuous

Time (Shift) k ∈ Z Discrete

Aperiodic Discrete Time Fourier Transform

+∞

−∞

− ∆ X k = xte dt

j 2 π kft ( ) ()

Aperiodic

Frequency k ∈ Z Discrete

Time (Shift) t ∈ R Continuous

(4) Periodic Discrete Fourier Transform

−

=

−

1

0

2 / [ ] []

N

i

j kiN X k xie

π

cos( 2 / ) sin( 2 / )

2 / e ki N j ki N

j ki N

π = −

−

−

=

1

0

[ ] []cos( 2 / )

N

i

X k xi π ki N ∑

−

=

1

0

[]sin( 2 / )

N

i

j xi π ki N

Periodic X ( k + N ) = X ( k )

Frequency k ∈ Z Discrete

Time (Shift) n ∈ Z Discrete

Frequency Response Frequency Transform of Sequence h [ n ]

∞

=−∞

−

k

jk H hke

ω (ω ) [ ]

Inverse Frequency Transform

π

π

ω

h k H e d

jk ( ) 2

[ ]

Continuous

Periodic H ( ω + 2 π) = H ( ω)

≠ Discrete Fourier Transform (DFT)

Ideal Low-pass Filter

H ω

Inverse Frequency Response

π

π

π ω

π

ω

k

k

h k H e d e d

jk jk

−

−

sin

[ ]^2

2

Not Causal

Technically CAN NOT be Realized

Cut-off cause Gibbs Oscillation

NOTE 5. Properties of Frequency Response

Periodic Continuous Fourier Series

+∞

=−∞

−

n

jn X xne

ω (ω ) ( )

Frequency Response of Convolution

∞

=−∞

k

y [ n ] h [ n ] x [ n ] x [ k ] h [ n k ]

Y ( ω) = X ( ω) H ( ω)

H ( ω) = Y ( ω) / X ( ω) Transfer Function of the Linear System

| H ( ω)| = [Im H ( ω)

2 +Re H ( ω)

2 ]

1/ Magnitude of Transfer Function

Arg( H ( ω)) = arctan(Im H ( ω)/Re H ( ω)) Phase of Transfer Function

Even Symmetry around Point Zero x [ n ] = x [- n ]

+∞

=−∞

−

n

jn X xne

ω (ω ) ( )

∞

=

−

    • − 1

[ 0 ] ([ ] [ ] )

n

j n jn x xne x ne

ω ω

∞

=

−

1

[ 0 ]

n

j n jn x xn e e

ω ω

∞

=

1

[ 0 ] 2 [ ]cos( ) n

x xn ω n

Real Spectrum

Phase Arg( H ( ω)) = 0 Zero-phase Signal

Odd Symmetry around Point Zero x [ n ] = - x [- n ], x [0] = 0

+∞

=−∞

−

n

jn X xne

ω (ω ) ( )

∞

=

−

    • − 1

[ 0 ] ([ ] [ ] )

n

j n jn x xne x ne

ω ω

∞

=

− − 1

n

j n jn xn e e

ω ω

∞

= 1

2 [ ]sin( ) n

j xn ω n

Complex Spectrum

Phase Arg( H ( ω)) = - π/

Even Symmetry around sample number N other than zero x [ N+n ] = x [ N - n ]

+∞

=−∞

−

k

jk X xke

ω (ω ) ( )

∞

= +

−

−

=−∞

− −

1

1 [ ] [ ] [ ] k N

jk

N

k

j N jk xNe xke xke

ω ω ω

∞

=

− − −

1

[ ]

n

j N jN jn jn xNe e xn N e e

ω ω ω ω

= { [ ] 2 [ ]cos( )}

1

∞

=

−

n

j N e xN xn N ω n

ω

Complex Spectrum

Phase Arg( H ( ω)) = - N ω Linear-phase Signal

Odd-symmetric signal Generalized linear-pase signal

Even/Odd Decomposition of any Real Signal x [ n ]

Even Symmetry xe [ n ] = ( x [ n ] + x [- n ]) / 2

xe [ n ] = xe [- n ]

Odd Symmetry xo [ n ] = ( x [ n ] - x [- n ])/

xo [ n ] = -xo [- n ]

NOTE 6. Digital Fourier Transform (DFT)

Periodic Continuous Fourier Series of x [ n ], n = 0, N -

−

=

−

1

0

( ) [ ]

N

n

jn X xne

ω ω

Let ω = 2 π k / N , k = 0, N -

−

=

− = = =

1

0

2 / [ ] ( )| 2 / [ ]

N

n

j knN X k X k N xne

π ω ω π

Periodic Discrete Fourier Transform of Real Signal

cos( 2 / ) sin( 2 / )

2 / e ki N j ki N

j ki N

π = −

−

−

=

1

0

Re [ ] []cos( 2 / )

N

i

X k xi π ki N ∑

−

=

1

0

Im [ ] []sin( 2 / )

N

i

Xk xi π ki N

Periodic Character

X [ k + N ] = X [ k ]

Inverse Discrete Fourier Transform

−

=

−

−

=

−

=

1

0

2 / 2 /

1

0

1

0

2 / [ ] { [ ] }

N

n

j knN j kmN

N

k

N

k

j kmN X ke xne e

π π π = [ ]{ }

1

0

2 ( )/

1

0

−

=

−

−

=

N

k

j kmn N

N

n

xn e

π

Because

−

=

−

m n

N m n e

N

k

j km n N

0 ,

0

2 π( )/

Then [ ] [ ]

1

0

2 / X ke Nxm

N

k

j kmN

−

=

π

−

=

1

0

2 / [ ]

[ ]

N

k

j knN X ke N

xn

π

Simplified Algorithm

−

=

− − − =

1

0

2 ( ) / [ ] [ ]

N

n

j N knN X N k xne

π

−

=

1

0

2 / [ ]

N

n

j knN xne

π

Re X [ N - k ] = Re X [ k ] Im X [ N-k ] = -Im X [ k ]

| X [ N - k ] | = | X [ k ] |, Arg( X [ N - k ]) = -Arg X [ k ]

−

=

1

0

2 / [ ]

[ ]

N

k

j knN X ke N

xn

π

−

=

−

=

1

0

1

0

Im [ ]sin( 2 / )

Re [ ]cos( 2 / )

1 N

k

N

k

X k kn N N

X k kn N N

π π

cos(2 π( N - k ) n / N ) = cos(2 π kn / N )

sin(2 π( N - k ) n / N ) = -sin(2 π kn / N )

x [ n ] = {Re X [0] + Re X [ N / 2] cos( n π)} / N

−

=

−

=

/ 21

1

/ 21

1

Im [ ]sin( 2 / )

Re [ ]cos( 2 / )

2 N

k

N

k

X k kn N N

X k kn N N

π π

Discrete Cosine Transform

Orthogonal Transform

Symmetry-Periodic Extension

x [ − n ]= x [ n ]

JPEG (Joint Photographic Expert Group)

MPEG (Moving Picture Expert Group)

DCT ∑

−

=

1

[ ] [ ]cos

[ ]

N

n N

n k ak xn N

X k

IDCT ∑

−

=

1

[ ] [ ]cos

[ ]

N

k N

n k ak X k N

xn

where

 

else

k ak

1 ,

[ ]

DCT and IDCT share the same transformation kernel

Real spectrum, can be implemented by 2N-dot FFT, smaller boundary effects.

NOTE 8 ADDITIONAL STATEMENT ON DFT

Parseval Relation

−

=

−

=

−

=

/ 21

1

2

2 2

1

0

2

1

0

2

2 [ ]

[ 0 ]

[ ]

[ ]

N

k

N

k

N

n

X k

N

X X

N

X k N

xn

Let [ 0 ] 2

X [ 0 ]= X , [ / 2 ]

X [ N / 2 ]= X N

=

−

=

/ 2

0

2

1

0

2 [ ]

[ ]

N

k

N

n

X k N

xn

New IDFT Equation

−

=

−

=

/ 21

1

/ 21

1

Re [ 0 ] Re / 2 2 Re [ ]cos( 2 / ) 2 Im [ ]sin( 2 / )

1 [ ]

N

k

N

k

n X XN Xk kn N Xk kn N N

xn π π

Let [ 0 ] 2

X [ 0 ]= X , [ / 2 ]

X [ N / 2 ]= X N

∑{^ }

=

/ 2

0

Re [ ]cos( 2 / ) Im [ ]sin( 2 / )

[ ]

N

k

X k kn N X k kn N N

xn π π

Convolution Equivalence of DFT

Let

j knN hk n e

2 / []

π

0

1

0

[ ] [] [ 0 ] [ ] [ ]|=

−

=

= ∑ − = ∗ k n

N

i

Xk xihk i xn h n

Time Sampler of All Filters is 0.

Frequency Response

j j k N

N jN j k

n

jn j nkN

N

n

jn k k e e

e e H h ne e e 2 /

1 2

0

2 /

1

0 1

1 [ ] [] ω π

ω π ω ω π ω (^) −

− −

=

−

−

=

− −

−

Magnitude Response

sin( / 2 / )

sin( / 2 ) | [ ]| k N

N k H (^) k ω π

ω π ω −

−

Center Frequency N

k k

π ω

2 =.

Frequency Leakage: when signal frequency ω is between (^) ω (^) k and (^) ω (^) k + 1.

Example 2:

If x [ n ] = 1, n = 0, M and x [ n ] = 1, n = N - M , N – 1,

then sin( / )

sin( ( 2 1 )/ ) [ ] k N

k M N X k

Frequency Region: If X [ k ] = 1, when k = 0, M ; and X [ k ] = 1, when k = N - M , N – 1,

then sin( / )

1 1 sin( ( 2 1 )/ ) [ ]

1 2 /

0

2 /

n N

n M N

N

e e N

xn

N

kNM

knN

M

k

j knN

−

= = −

DFT( x [ n - M ]) = X [ k ] e

-j2 π kM/N

IDFT( X [ k - M ]) = x [ n ] e

j2 π nM/N

NOTE 10. FAST FOURIER TRANSFORM

FFT: Fast implementation of DFT

Signal Length N = 2

L

Let x 1 [ r ] = x [2 r ], x 2 [ r ] = x[2 r + 1], r = 0, N /2 - 1

−

=

− +

−

=

− = + +

/ 21

0

2 ( 2 1 ) /

/ 21

0

2 ( 2 ) / [ 2 ] [ 2 1 ]

( [ ])

[ ]

N

r

j r kN

N

r

j rkN x re x r e

DFT xn

X k

π π

−

=

− −

−

=

− = + +

/ 21

0

2 / 2 /( / 2 )

/ 21

0

2 /( / 2 ) [ 2 ] [ 2 1 ]

N

r

j kN j rk N

N

r

j rk N x re e x r e

π π π

= X 1 [ k ] + X 2 [ k ] e

-j2 π k/N

( N /2 dot FFT !!!)

  1. For k = 0, N / 2 – 1,

X [ k ] = X 1 [ k ] + X 2 [ k ] e

-j2 π k/N , k = 0, N / 2 - 1

  1. For k = N / 2, N – 1,

Because X 1 [ k + N / 2] = X 1 [ k ], X 2 [ k+N /2]= X 2 [ k ], e

-j2 π( k + N /2)/ N = -e

-j2 π k/N

X [ k + N / 2] = X 1 [ k ] - X 2 [ k ] e

-j2 π k/N , k = 0, N / 2 - 1

Butterfly Algorithm

X 1 [ k ] X 1 [ k ] + X 2 [ k ] e

-j2 π k/N ( X [ k ])

X 2 [ k ]× e

-j2 π k/N X 1 [ k ] - X 2 [ k ] e

-j2 π k/N ( X [ k + N /2])

One Butterfly: generates 2 Dots of DFT

Each Layer: N / 2 Butterflies

Each Butterfly: 1 multiply + 2 add

Layer Number: L = log 2 N

Calculation Efficiency:

  1. FFT Cost = ( N / 2) × L × (1 Multiply + 2 Add) = N^ log 2 N 2

Multiply + N log 2 N Add

  1. DFT Cost = N

2 Multiply + N ( N - 1) Add