Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ......

27
Chapter 2 – Part 2 Liner System Review, DFT & FFT Updated:2/23/15

Transcript of Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ......

Page 1: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Chapter 2 – Part 2

Liner System Review, DFT & FFT Updated:2/23/15

Page 2: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Outline •  Review of linear systems •  Sampling theorem •  Fast Fourier Transform

Page 3: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Linear Time Invariant System (LTIS) - 1

L is a Linear Operation

Example: y(t) = t – 3 Is a linear time invariant system

Page 4: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Linear Time Invariant System (LTIS) - 2

Δt

n=1 2 3 4 5 6 7 8 .... N

δ(t-7t)

δ(t) h(t)

Page 5: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Linear Time Invariant System (LTIS) - 3

This is called the convolution integral!

Page 6: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Linear Time Invariant System (LTIS) - 4

Page 7: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Example: Linear Time Invariant System (LTIS) - 5

power transfer function (or power gain) of the system

Page 8: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Example: RC Low-Pass Filter Characterization

When f=foà G(fo)=0.5à-3dB attenuation 10log(|H(f)|^2)=0dBßà 1.0

10log(|H(f)|^2)=10log (0.5)=-3dBßà 0.5

See Fourier Pair Table (Exponential one-sided)

Page 9: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Distortionless Transmission -1 •  An LTI system is termed distortionless if it introduces the

same attenuation to all spectral components and offers linear phase response over the frequency band of interest:

Ho is the gain (or attenuation!) If Ho is unity then there is no lossà Lossless system We refer to to as the Td or time delay

Page 10: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Distortionless Transmission -2

Note that the phase response is a linear function of frequency in LTI! Group delay: refers to time delay that difference spectral components experience!

Page 11: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Distortionless Transmission -3 •  The phase delay of an LTI system is defined as

•  For a LTI system

(from before)

Page 12: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Is the Output of an RC Filter Distortionless? Remember, for RC filter:

-

Introducing both amplitude and phase distortion! …see next

Page 13: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Is the Output of an RC Filter Distortionless? Amplitude distortion if the amplitude response is not flat

Phase response is not a linear function of frequency at high frequencies

Range of frequencies (<0.5fo) where (almost) no distortion occurs: For example: If fo=10KHz, @ Td(1KHz)=1/2πfo=0.2 msec delay; producing small percentage of phase error.

Page 14: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Different Distortions

Page 15: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Different Distortions (Example) A phase error of 15 degrees for an audio filter at 15KHz would produce a variation (error) in time delay of about 3 micsec:

http://www.wolframalpha.com/input/?i=1%2F(2*pi*15000)*(15*2*pi%2F360)&t=crmtb01

Page 16: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

FT for Discrete-Time Signals •  For discrete-time signals x [ n ], two alternative frequency

domain representations are extremely useful. –  Discrete-time Fourier transform (DTFT)

•  Infinite length – infinite sequence of signal –  Discrete Fourier transform (DFT)

•  Finite length – finite sequence of signal

Page 17: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Discrete Fourier Transform (DFT) •  Communication designs usually use computer

simulations based on DFT and IDFT

•  Applications of DFT: –  uses the DFT to approximate the spectrum continuous W(f) –  uses the DFT to evaluate the complex Fourier series coefficients cn

Remember: for each x(n) we generate the equivalent DFT X(n)

Page 18: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

The Fast Fourier transform (FFT) •  The Fast Fourier transform (FFT) is an extremely efficient

algorithm for computing DFT •  The FFT requires that the sequence length N is an integer

power of 2 •  To accomplish this we usually append zeros on either side

of discrete-time sequence x [ n ].

Appended Zeros

Page 19: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Application of DFT

Cont. Signal W(t)

Disc. Signal W(n)

Fourier Series CFT DFT

Magnitude Spectrum

(Fourier Coef.) (Cn)=|W(f)|

W(n) @ Δt W(f)

Cn=1/N W(n)

Page 20: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Example: Using DFT to Compute Continuous FT (CFT)

Continuous waveform and it magnitude spectrum

Windowed waveform and its magnitude spectrum – ww(t) is the truncated version of w(t) over [0,T]à we only obtain N (finite) samples

Remember from before:

Page 21: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Example: Using DFT to Compute Continuous FT (CFT)

Sampled Windowed waveform and its magnitude spectrum – fs=1/dt

Periodic Sampled Windowed waveform and its magnitude spectrum – fs=1/dt=N/T & dt=T/N (or Period T = N.dt) & fo=1/To

X(n) is the DFT

Page 22: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Example: Using DFT to Compute Continuous FT (CFT)

Sampled Windowed waveform and its magnitude spectrum – fs=1/dt

In Summary: •  N is the number of sampled points •  T is the interval of the interest •  Δt is called the time resolution or sample interval = T/N •  fs is the sampling frequency (1/Δt ) •  B is the highest frequency in w(t) – our waveform •  CHECK: fs > 2B •  Δf is frequency resolution = 1/T •  f represents the frequency points = n/T ; n = [0,1,2, N-1]

Periodic Sampled Windowed waveform and its magnitude spectrum – fs=1/dt=N/T & dt=T/N (or Period T = N.dt) & fo=1/To

X(n) is the DFT

Page 23: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Using FFT to find the DFT - MATLAB Example M = 7; N = 2^M; % Using zero padding n = 0:1:N-1; T = 10; % period dt = T/N; % sampling period t = n*dt; % simulation time % Creating time waveform % w=Your waveform! % Calculating FFT W = dt*fft(w); f = n/T; plot(t,w); plot(f,abs(W); plot(f,180/pi*angle(W));

Tend = 1 T=10

Pos. Freq. Neg. Freq.

Zoomed to f = [0, 4]

Page 24: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Using DFT to Compute the Fourier Series

w w

Page 25: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Example (MATLAB Implementation)

We use the DFT (FFT) to approximate the spectrum continuous W(f) & evaluate the complex Fourier series coefficients cn

Page 26: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

Example (MATLAB Implementation)

Magnitude Spectrum: |Cn|

10Hz

70Deg. @ 10Hz

fo=10

Note f=n*fo=10

Page 27: Chapter 2 – Part 2 - Sonoma State University · Chapter 2 – Part 2 Liner System Review, ... simulations based on DFT and IDFT ... Using FFT to find the DFT - MATLAB Example M

References •  Leon W. Couch II, Digital and Analog Communication

Systems, 8th edition, Pearson / Prentice, Chapter 1 •  Electronic Communications System: Fundamentals Through

Advanced, Fifth Edition by Wayne Tomasi – Chapter 2 (https://www.goodreads.com/book/show/209442.Electronic_Communications_System)