lecture 3 - fourier transform 3... · 2021. 1. 19. · lab 1 -ex 1: the sine_genfunction. pykc 19...

20
Lecture 3 Slide 1 PYKC 19 Jan 2021 DESE50002 - Electronics 2 Lecture 3 Frequency Domain Analysis and Fourier Transform URL: www.ee.ic.ac.uk/pcheung/teaching/DE2_EE/ E-mail: [email protected] Peter Y K Cheung Dyson School of Design Engineering Imperial College London

Upload: others

Post on 19-Apr-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 1PYKC 19 Jan 2021 DESE50002 - Electronics 2

Lecture 3

Frequency Domain Analysis and Fourier Transform

URL: www.ee.ic.ac.uk/pcheung/teaching/DE2_EE/E-mail: [email protected]

Peter Y K Cheung

Dyson School of Design EngineeringImperial College London

Page 2: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 2PYKC 19 Jan 2021 DESE50002 - Electronics 2

Relationship between exponentials and sinusoids! Euler’s formula:

  e jωt  = cos(ωt)+j sin(ωt)  e− jωt  = cos(−ωt) +  j sin(−ωt)           = cos(ωt) −  j sin(ωt)

 cos(ωt) =   ejωt + e− jωt

2

 sin(ωt) =   ejωt − e− jωt

2 j

! Therefore, in signal analysis, we usual regard “frequency” to be w in the exponential vector: e jωt

! The frequency spectrum is therefore a plot of the amplitude (and phase) projected onto exponential components for different w. e jωt

+w-w 0

|A|0.50.5

+1.5rad/sec

ω = 2π f

cos(ωt)

Page 3: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 3PYKC 19 Jan 2021 DESE50002 - Electronics 2

Fourier Series in three forms

𝑎" =2𝑇&'&

()

𝑥 𝑡 cos 𝑛𝜔&𝑡 𝑑𝑡

𝑥 𝑡 = 𝑎& + ∑"456 𝑎" cos 𝑛𝜔&𝑡 + 𝑏" sin 𝑛𝜔&𝑡

𝑏" =2𝑇&'&

()

𝑥 𝑡 sin 𝑛𝜔&𝑡 𝑑𝑡

𝐷" =1𝑇&

'<()/>

()/>

𝑥 𝑡 𝑒<@"ABC𝑑𝑡

𝑥 𝑡 = 𝐶& + ∑"456 𝐶" cos( 𝑛𝜔&𝑡 + 𝜃")

𝑥 𝑡 = ∑<66 𝐷" 𝑒@("ABCH IJ)

𝐶" = 𝑎"K + 𝑏"K

Page 4: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 4PYKC 19 Jan 2021 DESE50002 - Electronics 2

Definition of Fourier Transform

! The forward and inverse Fourier Transform are defined for aperiodicsignal as:

! Fourier series is used for periodic signals.

Page 5: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 5PYKC 19 Jan 2021 DESE50002 - Electronics 2

Define three useful functions

! A unit rectangular window function rect(x):

! The unit impulse function d(t) (Dirac impulse):

! Interpolation function sinc(x):

or

Page 6: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 6PYKC 19 Jan 2021 DESE50002 - Electronics 2

More about sinc(x) function

! sinc(x) is an even function of x.

! sinc(x) = 0 when sin(x) = 0 except when x=0, i.e. x = ±p,±2p,±3p…..

! sinc(0) = 1 (derived with L’Hôpital’s rule)

! sinc(x) is the product of an oscillating signal sin(x) and a monotonically decreasing function 1/x. Therefore it is a damping oscillation with period of 2p with amplitude decreasing as 1/x.

Page 7: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 7PYKC 19 Jan 2021 DESE50002 - Electronics 2

Fourier Transform of x(t) = rect(t/t)

! Evaluation:

! Since rect(t/t) = 1 for -t/2 < t < t/2 and 0 otherwise

Û

Bandwidth » 2p/t

Page 8: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 8PYKC 19 Jan 2021 DESE50002 - Electronics 2

Fourier Transform of unit impulse x(t) = d(t)

! Using the sampling property of the impulse, we get:

! IMPORTANT – Unit impulse contains COMPONENT AT EVERY FREQUENCY.

Page 9: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 9PYKC 19 Jan 2021 DESE50002 - Electronics 2

Inverse Fourier Transform of d(w)

! Using the sampling property of the impulse, we get:

! Spectrum of a constant (i.e. d.c.) signal x(t) = 1 is an impulse 2pd(w).

or

Page 10: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 10PYKC 19 Jan 2021 DESE50002 - Electronics 2

Inverse Fourier Transform of d(w - w0)

! Using the sampling property of the impulse, we get:

! Spectrum of an everlasting exponential ejw0t is a single impulse at w=w0.

and

or

Page 11: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 11PYKC 19 Jan 2021 DESE50002 - Electronics 2

Fourier Transform of everlasting sinusoid cos w0t

! Remember Euler’s formula:

! Use results from previous slide, we get:

! Spectrum of cosine signal has two impulses at positive and negative frequencies.

Page 12: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 12PYKC 19 Jan 2021 DESE50002 - Electronics 2

Fourier Transform of any periodic signal

! Fourier series of a periodic signal x(t) with period T0 is given by:

! Take Fourier transform of both sides, we get:

! This is rather obvious!

Page 13: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 13PYKC 19 Jan 2021 DESE50002 - Electronics 2

Fourier Transform of a unit impulse train

! Consider an impulse train

! The Fourier series of this impulse train can be shown to be:

! Therefore using results from the last slide (slide 11), we get:

0 0( ) ( )T t t nTd d¥

= -å

0

0 00 0

2 1( ) where and jn tT n nt D e D

T Tw pd w

¥

= = =å

Page 14: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 14PYKC 19 Jan 2021 DESE50002 - Electronics 2

Fourier Transform Table (1)

Page 15: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 15PYKC 19 Jan 2021 DESE50002 - Electronics 2

Fourier Transform Table (2)

Page 16: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 16PYKC 19 Jan 2021 DESE50002 - Electronics 2

Fourier Transform Table (3)

Page 17: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 17PYKC 19 Jan 2021 DESE50002 - Electronics 2

Lab 1 - Ex 1: The sine_gen function

Page 18: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 18PYKC 19 Jan 2021 DESE50002 - Electronics 2

Lab 1 - Ex 2: The plot_spec function

Page 19: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 19PYKC 19 Jan 2021 DESE50002 - Electronics 2

Lab 1 - Ex 3: Two tones (fs = 8192, T = 1)! s1 = 440Hz sine at 1V ! s2 = 1kHz sine at

0.5V

+

! sig = s1 + s2 ! plot_spec (sig, 8192)

Page 20: Lecture 3 - Fourier Transform 3... · 2021. 1. 19. · Lab 1 -Ex 1: The sine_genfunction. PYKC 19 Jan 2021 DESE50002 -Electronics 2 Lecture 3 Slide 18 Lab 1 -Ex 2: The plot_specfunction

Lecture 3 Slide 20PYKC 19 Jan 2021 DESE50002 - Electronics 2

Lab 1 - Ex 4: Two tones + noisy! Noisy = sig + randn(size(sig));

! plot_spec (noisy, 8192)