lec 19: april 6, 2017 discrete fourier transformese531/spring2017/handouts/lec19.pdf · "...

61
ESE 531: Digital Signal Processing Lec 19: April 6, 2017 Discrete Fourier Transform Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Upload: ledan

Post on 28-Aug-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

ESE 531: Digital Signal Processing

Lec 19: April 6, 2017 Discrete Fourier Transform

Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Today

!  Adaptive filtering "  Blind equalization

!  Discrete Fourier Series !  Discrete Fourier Transform (DFT) !  DFT Properties

2 Penn ESE 531 Spring 2017 - Khanna

Adaptive Filters

!  An adaptive filter is an adjustable filter that processes in time "  It adapts…

3

Adaptive Filter

Update Coefficients

x[n] y[n]

d[n]

e[n]=d[n]-y[n]

+ _

Penn ESE 531 Spring 2017 - Khanna

Adaptive Filter Applications

!  System Identification

4 Penn ESE 531 Spring 2017 - Khanna

Adaptive Filter Applications

!  Identification of inverse system

5 Penn ESE 531 Spring 2017 - Khanna

Adaptive Filter Applications

!  Adaptive Interference Cancellation

6 Penn ESE 531 Spring 2017 - Khanna

Adaptive Filter Applications

!  Adaptive Prediction

7 Penn ESE 531 Spring 2017 - Khanna

Stochastic Gradient Approach

!  Most commonly used type of Adaptive Filters !  Define cost function as mean-squared error

"  Difference between filter output and desired response

!  Based on the method of steepest descent "  Move towards the minimum on the error surface to get to

minimum "  Requires the gradient of the error surface to be known

8

Least-Mean-Square (LMS) Algorithm

!  The LMS Algorithm consists of two basic processes "  Filtering process

"  Calculate the output of FIR filter by convolving input and taps "  Calculate estimation error by comparing the output to desired

signal

"  Adaptation process "  Adjust tap weights based on the estimation error

9

Adaptive FIR Filter: LMS

10 Penn ESE 531 Spring 2017 - Khanna

Adaptive Filter Applications

!  Adaptive Interference Cancellation

11 Penn ESE 531 Spring 2017 - Khanna

Adaptive Interference Cancellation

12 Penn ESE 531 Spring 2017 - Khanna

Stability of LMS

!  The LMS algorithm is convergent in the mean square if and only if the step-size parameter satisfy

!  Here λmax is the largest eigenvalue of the correlation matrix

of the input data !  More practical test for stability is

!  Larger values for step size

"  Increases adaptation rate (faster adaptation) "  Increases residual mean-squared error

13

max

20

λ<µ<

power signal input2

0 <µ<

Discrete Fourier Series

Penn ESE 531 Spring 2017 - Khanna 14

Reminder: Eigenvalue (DTFT)

!  x[n]=ejωn

15 Penn ESE 531 Spring 2017 - Khanna

y[n]= x[n− k]h[k]k=−∞

= e jω (n−k )h[k]k=−∞

= e jωn h[k]k=−∞

∑ e− jωk

= H (e jω )e jωn

H (e jω ) = h[k]k=−∞

∑ e− jωk

!  Describes the change in amplitude and phase of signal at frequency ω

!  Frequency response !  Complex value

"  Re and Im "  Mag and Phase

Discrete Fourier Series

!  Definition: "  Consider N-periodic signal:

"  Frequency-domain also periodic in N:

"  “~” indicates periodic signal/spectrum

16 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Discrete Fourier Series

!  Define:

!  DFS:

17 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Discrete Fourier Series

!  Properties of WN:  "  WN

0 = WNN = WN

2N = ... = 1  "  WN

k+r = WNkWN

r and, WNk+N = WN

!  Example: WNkn (N=6)

18 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Discrete Fourier Transform

!  By convention, work with one period:

19

Same, but different!

Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Discrete Fourier Transform

!  The DFT

!  It is understood that,

20 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

DFS vs. DFT

21 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Example

22 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Example

23 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Discrete Fourier Series

!  Properties of WN:  "  WN

0 = WNN = WN

2N = ... = 1  "  WN

k+r = WNkWN

r and, WNk+N = WN

!  Example: WNkn (N=6)

24 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Example

!  Q: What if we take N=10? !  A: where is a period-10 seq.

25 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Example

!  Q: What if we take N=10? !  A: where is a period-10 seq.

26 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Example

!  Now, sum from n=0 to 9

27

9

Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Example

!  Now, sum from n=0 to 9

28

9

4

Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

DFT vs. DTFT

!  For finite sequences of length N: "  The N-point DFT of x[n] is:

"  The DTFT of x[n] is:

29 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

DFT vs. DTFT

!  The DFT are samples of the DTFT at N equally spaced frequencies

30 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

4

DFT vs DTFT

!  Back to example

31 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

4

DFT vs DTFT

!  Back to example

32 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

4

DFT vs DTFT

!  Back to example

33

Use fftshift to center around dc

Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

DFT and Inverse DFT

!  Use the DFT to compute the inverse DFT. How?

34 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

DFT and Inverse DFT

!  Use the DFT to compute the inverse DFT. How?

35 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

DFT and Inverse DFT

!  Use the DFT to compute the inverse DFT. How?

36 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

DFT and Inverse DFT

!  Use the DFT to compute the inverse DFT. How?

37 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

DFT and Inverse DFT

!  Use the DFT to compute the inverse DFT. How?

38 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

DFT and Inverse DFT

!  So

39 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

DFT and Inverse DFT

!  So

40 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

DFT and Inverse DFT

!  So

!  Implement IDFT by:

"  Take complex conjugate "  Take DFT "  Multiply by 1/N "  Take complex conjugate

41 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

DFT as Matrix Operator

42 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

DFT as Matrix Operator

43 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

DFT as Matrix Operator

44 N2 complex multiples Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

DFT as Matrix Operator

!  Can write compactly as

45 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Properties of the DFT

!  Properties of DFT inherited from DFS !  Linearity

!  Circular Time Shift

46 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Circular Shift

47 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Properties of DFT

!  Circular frequency shift

!  Complex Conjugation

!  Conjugate Symmetry for Real Signals

48 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Example: Conjugate Symmetry

49 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Example: Conjugate Symmetry

50 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Example: Conjugate Symmetry

51 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Example: Conjugate Symmetry

52 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Example

53 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Properties of the DFS/DFT

Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Properties (Continued)

Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Circular Convolution

!  Circular Convolution:

For two signals of length N

56 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Circular Convolution

!  For x1[n] and x2[n] with length N

57 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Multiplication

!  For x1[n] and x2[n] with length N

58 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Linear Convolution

!  Next.... "  Using DFT, circular convolution is easy "  But, linear convolution is useful, not circular "  So, show how to perform linear convolution with circular

convolution "  Use DFT to do linear convolution

59 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Big Ideas

!  Adaptive filtering "  Use LMS algorithm to update filter coefficients for

applications like system ID, channel equalization, and signal prediction

!  Discrete Fourier Transform (DFT) "  For finite signals assumed to be zero outside of defined

length "  N-point DFT is sampled DTFT at N points "  Useful properties allow easier linear convolution

60 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley

Admin

!  HW 7 out now "  Due tonight

!  Project posted after class tonight "  Work in groups of up to 2

"  Can work alone if you want "  Use Piazza to find partners "  Report your groups to me by 4/11 by email

"  [email protected]

61 Penn ESE 531 Spring 2017 – Khanna Adapted from M. Lustig, EECS Berkeley