Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals &...

75
Signals & Systems Lecture 3 – Spectrum and Fourier Series Alp Ertürk [email protected]

Transcript of Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals &...

Page 1: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Signals & Systems

Lecture 3 – Spectrum and Fourier Series

Alp Ertürk

[email protected]

Page 2: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Sinusoidal Signals:Phasor Addition

• The following statement is satisfied when we add several sinusoidal signals with the same frequency, but with different amplitudes and phases

𝑘=1

𝑁

𝐴𝑘 cos 𝜔0𝑡 + 𝜙𝑘 = 𝐵 cos 𝜔0𝑡 + 𝜃

• In other words, we obtain a single sinusoidal signal with the same frequency.

Page 3: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• What if the frequencies are different too?

𝑘=1

𝑁

𝐴𝑘 cos 2𝜋𝑓𝑘𝑡 + 𝜙𝑘 = ?

• Or, similarly:

𝑥 𝑡 = 𝐴0 +

𝑘=1

𝑁

𝐴𝑘 cos 2𝜋𝑓𝑘𝑡 + 𝜙𝑘 = ?

Page 4: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

𝑥 𝑡 = 10 + 14 cos 200𝜋𝑡 − 𝜋 3 + 8 cos 500𝜋𝑡 + 𝜋 2 =?

• Using Euler’s formula of:

𝐴 cos 2𝜋𝑓𝑡 + 𝜙 =𝐴

2𝑒𝑗𝜙𝑒𝑗2𝜋𝑓𝑡 +

𝐴

2𝑒−𝑗𝜙𝑒−𝑗2𝜋𝑓𝑡

• The first sinusoidal signal is:

14 cos 200𝜋𝑡 − 𝜋 3 =14

2𝑒𝑗 − 𝜋 3 𝑒𝑗2𝜋 100 𝑡 +

14

2𝑒−𝑗 − 𝜋 3 𝑒−𝑗2𝜋 100 𝑡

Page 5: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

𝑥 𝑡 = 10 + 14 cos 200𝜋𝑡 − 𝜋 3 + 8 cos 500𝜋𝑡 + 𝜋 2 =?

• We get:

𝑥 𝑡= 10 + 7𝑒−𝑗 𝜋 3𝑒𝑗2𝜋 100 𝑡 + 7𝑒𝑗 𝜋 3𝑒−𝑗2𝜋 100 𝑡

+ 4𝑒𝑗 𝜋 2𝑒𝑗2𝜋 250 𝑡 + 4𝑒−𝑗 𝜋 2𝑒−𝑗2𝜋 250 𝑡

Page 6: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• In other words:

𝑥 𝑡 = 𝐴0 +

𝑘=1

𝑁

𝐴𝑘 cos 2𝜋𝑓𝑘𝑡 + 𝜙𝑘

=

𝑘=−𝑁

𝑁

𝑎𝑘𝑒𝑗2𝜋𝑓𝑘𝑡

• where

𝑎𝑘 =

𝐴0 𝑘 = 01

2𝐴𝑘𝑒

𝑗𝜙𝑘 𝑘 ≠ 0

Page 7: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

𝑥 𝑡 = 10 + 14 cos 200𝜋𝑡 − 𝜋 3 + 8 cos 500𝜋𝑡 + 𝜋 2 =?

= 10 + 7𝑒−𝑗 𝜋 3𝑒𝑗2𝜋 100 𝑡 + 7𝑒𝑗 𝜋 3𝑒−𝑗2𝜋 100 𝑡

+ 4𝑒𝑗 𝜋 2𝑒𝑗2𝜋 250 𝑡 + 4𝑒−𝑗 𝜋 2𝑒−𝑗2𝜋 250 𝑡

Page 8: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• The above plot is named as the spectrum plot

• If a signal is composed of a finite number of sinusoidal components, we can find its spectral components

Page 9: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• Another representation:

0 , 10 , 100 , 7𝑒−𝑗 𝜋 3 , −100 , 7𝑒𝑗 𝜋 3 , 250 , 4𝑒𝑗 𝜋 2 , −250 , 4𝑒−𝑗 𝜋 2

Page 10: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• What if we have sinusoidal multiplication instead of summation?

Page 11: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum• If we have sinusoidal multiplication instead of addition, then

we have to rewrite the multiplication as an additive combination of sinusoidals

• For example:

𝑥 𝑡 = cos(𝜋𝑡) sin 10𝜋𝑡

• Represent as:

𝑥 𝑡 =𝑒𝑗𝜋𝑡 + 𝑒−𝑗𝜋𝑡

2

𝑒𝑗10𝜋𝑡 − 𝑒−𝑗10𝜋𝑡

2𝑗

Page 12: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum• For example:

𝑥 𝑡 = cos(𝜋𝑡) sin 10𝜋𝑡

• Represent as:

𝑡 =𝑒𝑗𝜋𝑡 + 𝑒−𝑗𝜋𝑡

2

𝑒𝑗10𝜋𝑡 − 𝑒−𝑗10𝜋𝑡

2𝑗

=1

4𝑒−𝑗 𝜋 2𝑒𝑗11𝜋𝑡 +

1

4𝑒−𝑗 𝜋 2𝑒𝑗9𝜋𝑡 −

1

4𝑒−𝑗 𝜋 2𝑒−𝑗9𝜋𝑡 −

1

4𝑒−𝑗 𝜋 2𝑒−𝑗11𝜋𝑡

=1

4𝑒−𝑗 𝜋 2𝑒𝑗11𝜋𝑡 +

1

4𝑒−𝑗 𝜋 2𝑒𝑗9𝜋𝑡 +

1

4𝑒𝑗 𝜋 2𝑒−𝑗9𝜋𝑡 +

1

4𝑒𝑗 𝜋 2𝑒−𝑗11𝜋𝑡

=1

2cos 11𝜋𝑡 − 𝜋 2 +

1

2cos 9𝜋𝑡 − 𝜋 2

Page 13: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

𝑥 𝑡 = cos(𝜋𝑡) sin 10𝜋𝑡

=1

2cos 11𝜋𝑡 − 𝜋 2 +

1

2cos 9𝜋𝑡 − 𝜋 2

=1

4𝑒−𝑗 𝜋 2𝑒𝑗11𝜋𝑡 +

1

4𝑒𝑗 𝜋 2𝑒−𝑗11𝜋𝑡 +

1

4𝑒−𝑗 𝜋 2𝑒𝑗9𝜋𝑡 +

1

4𝑒𝑗 𝜋 2𝑒−𝑗9𝜋𝑡

Page 14: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• How does the multiplication of two sinusoidals appear in time domain?

𝑥 𝑡 = 2 cos(2𝜋 20 𝑡) cos 2𝜋 200 𝑡

• The two components individually:

Page 15: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• How does the multiplication of two sinusoidals appear in time domain?

𝑥 𝑡 = 2 cos(2𝜋 20 𝑡) cos 2𝜋 200 𝑡

• The two components multiplied:

Page 16: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• MATLAB Visual Example

Page 17: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• Matlab code:clear all; close all; clc;

t = 0:0.0001:0.1;

y1 = 2*cos(2*pi*20*t);

y2 = 2*cos(2*pi*200*t);

y3 = y1.*y2/2;

figure; plot(t,y1,'LineWidth',2);

legend('2*cos(2*pi*20*t)'); xlabel('time (s)'); ylabel('Amplitude');

pause; hold on; plot(t,y2,'r','LineWidth',2);

legend('2*cos(2*pi*20*t)' , '2*cos(2*pi*200*t)');

pause; hold on; plot(t,-y1,'b-.','LineWidth',2);

legend('2*cos(2*pi*20*t)' , '2*cos(2*pi*200*t)', '-2*cos(2*pi*20*t)');

pause; hold on; plot(t,y3,'k','LineWidth',2);

legend('2*cos(2*pi*20*t)' , '2*cos(2*pi*200*t)', '-2*cos(2*pi*20*t)' , '2*cos(2*pi*20*t)*cos(2*pi*200*t)');

pause; figure; plot(t,y3,'k','LineWidth',2);

xlabel('time (s)'); ylabel('Amplitude'); title('2*cos(2*pi*20*t)*cos(2*pi*200*t)');

Page 18: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• Multiplying sinuoidals is used in communication systems for modulation

• Amplitude modulation (AM) is the process of multiplying a low-frequency message signal by a high-frequency carrier signal

• AM can be represented by:

𝑥 𝑡 = 𝑣(𝑡) cos 2𝜋𝑓𝑐𝑡

where v(t) is the message signal, and the sinusoidal with the fc frequency is the carrier signal

Page 19: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• MATLAB Visual Example

Page 20: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• t = 0:0.0001:0.1;

• v = 5 + 4 * cos(2*pi*20*t);

• c = cos(2*pi*200*t);

• x = v .* c;

• figure; plot(t,v);

• hold on; plot(t,-v,'-.');

• hold on; plot(t,c,'r');

• hold on; plot(t,x,'g');

• xlabel('time (s)'); ylabel('Amplitude');

• legend('Message' , ' - Message' , 'Carrier' , 'AM Signal');

Page 21: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• Let v(t) = 5 + 4 cos (40πt) and fc = 200 Hz

𝑥 𝑡 = 5 + 4 cos 40𝜋𝑡 cos 400𝜋𝑡

Page 22: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• The term amplitude modulation (AM) is used because the effect of multiplying the higher-frequency sinusoid by the lower frequency sinusoid is to ‘‘modulate’’ the amplitude envelope of the carrier waveform

Page 23: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• Let v(t) = 5 + 4 cos (40πt) and fc = 200 Hz

𝑥 𝑡 = 5 + 4 cos 40𝜋𝑡 cos 400𝜋𝑡

=5

2𝑒𝑗400𝜋𝑡 + 𝑒𝑗440𝜋𝑡 + 𝑒𝑗360𝜋𝑡 +

5

2𝑒−𝑗400𝜋𝑡 + 𝑒−𝑗440𝜋𝑡 + 𝑒−𝑗360𝜋𝑡

Page 24: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• We had mentioned periodic signals and fundamental frequency before

• Can we synthesize a periodic signal by adding two or more cosine waves?

• Yes, if the cosine waves have harmonically related frequencies

• Harmonically related frequencies: Frequencies that are integer multiples of a frequency

Page 25: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• MATLAB Visual Example

Page 26: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• t = 0:0.01:1;

• s1 = cos(2*pi*1.2*t);

• s2 = cos(2*pi*2*t);

• s3 = cos(2*pi*6*t);

• figure; plot(t,s1);

• hold on; plot(t,s2,'--');

• hold on; plot(t,s3,'-.');

• hold on; plot(t,s1+s2+s3,'r');

• legend('cos(2*pi*1.2*t)' , 'cos(2*pi*2*t)' , 'cos(2*pi*6*t)', 'Sum of all three');

• xlabel('time (s)'); ylabel('Amplitude'); t = 0:0.01:5;

• s1 = cos(2*pi*1.2*t);

• s2 = cos(2*pi*2*t);

• s3 = cos(2*pi*6*t);

• figure; plot(t,s1+s2+s3,'r');

• xlabel('time (s)'); ylabel('Amplitude');

Page 27: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

𝑥 𝑡 = cos 2𝜋(1.2)𝑡 + cos 2𝜋(2)𝑡 + cos 2𝜋(6)𝑡

• The fundamental frequency of x(t) is 0.4 Hz

Page 28: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

Page 29: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

Page 30: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• The vowel sound ‘‘ah’’ can be approximated by the following complex amplitudes

• The spectrum obtained by adding these signals is the addition of their respective spectrums:

Page 31: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• In time domain, adding the signals up one at a time:

Page 32: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

Page 33: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• Hence the total signal has a fundamental frequency of 100 Hz

Page 34: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• We can synthesize a periodic signal by adding two or more cosine waves if the cosine waves have harmonically related frequencies

Page 35: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

𝑥 𝑡 = 2 cos 20𝜋𝑡 −2

3cos 20𝜋(3)𝑡 +

2

3cos 20𝜋(5)𝑡

Page 36: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

𝑥 𝑡 = 2 cos 20𝜋𝑡 −2

3cos 20𝜋(3)𝑡 +

2

3cos 20𝜋(5)𝑡

Page 37: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

• What if the frequencies of the added sinusoidal signals are not harmonically related?

Page 38: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

𝑥 𝑡 = 2 cos 20𝜋𝑡 −2

3cos 20𝜋( 8)𝑡 +

2

3cos 20𝜋( 27)𝑡

Page 39: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Spectrum

𝑥 𝑡 = 2 cos 20𝜋𝑡 −2

3cos 20𝜋( 8)𝑡 +

2

3cos 20𝜋( 27)𝑡

Page 40: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series

• Any periodic signal can be synthesized with a sum of harmonically related sinusoids *

• Note that this may require an infinite number of terms

𝑥 𝑡 =

𝑘=−∞

𝑎𝑘𝑒𝑗 2𝜋 𝑇0 𝑘𝑡

* This is not 100% correct, and we will get back to that point later on

Page 41: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series

𝑥 𝑡 =

𝑘=−∞

𝑎𝑘𝑒𝑗 2𝜋 𝑇0 𝑘𝑡

• When the complex amplitudes are conjugate-symmetric, i.e. 𝑎−𝑘 = 𝑎𝑘

∗ , the synthesis formula becomes:

𝑥 𝑡 = 𝐴0 +

𝑘=1

𝐴𝑘 cos 2𝜋 𝑇0 𝑘𝑡 + 𝜙𝑘

Page 42: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series

• Driving the coefficients for the harmonic sum of a periodic signal:

𝑎𝑘 =1

𝑇0

0

𝑇0

𝑥(𝑡)𝑒−𝑗 2𝜋 𝑇0 𝑘𝑡𝑑𝑡

• As a special case, the DC component is obtained by:

𝑎0 =1

𝑇0

0

𝑇0

𝑥 𝑡 𝑑𝑡

Page 43: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series: Example

• Determine the Fourier series coefficients of 𝑥 𝑡 = sin3 3𝜋𝑡

Page 44: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series: Example

• Determine the Fourier series coefficients of 𝑥 𝑡 = sin3 3𝜋𝑡

• In this case, an easier approach is to use Euler’s formula

𝑥 𝑡 = sin3 3𝜋𝑡 =𝑒𝑗3𝜋𝑡 − 𝑒−𝑗3𝜋𝑡

2𝑗

3

=1

−8𝑗𝑒𝑗9𝜋𝑡 − 3𝑒𝑗6𝜋𝑡𝑒−𝑗3𝜋𝑡 + 3𝑒𝑗3𝜋𝑡𝑒−𝑗6𝜋𝑡 − 𝑒−𝑗9𝜋𝑡

=𝑗

8𝑒𝑗9𝜋𝑡 +

−3𝑗

8𝑒𝑗3𝜋𝑡 +

3𝑗

8𝑒−𝑗3𝜋𝑡 +

−𝑗

8𝑒−𝑗9𝜋𝑡

Page 45: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series: Example

𝑥 𝑡 = sin3 3𝜋𝑡 =𝑒𝑗3𝜋𝑡 − 𝑒−𝑗3𝜋𝑡

2𝑗

3

=𝑗

8𝑒𝑗9𝜋𝑡 +

−3𝑗

8𝑒𝑗3𝜋𝑡 +

3𝑗

8𝑒−𝑗3𝜋𝑡 +

−𝑗

8𝑒−𝑗9𝜋𝑡

• Therefore,𝜔0 = 3𝜋

𝑎𝑘 =∓𝑗

3

8𝑘 = ±1

±𝑗1

8𝑘 = ±3

Page 46: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series: Example

𝑥 𝑡 =𝑗

8𝑒𝑗9𝜋𝑡 +

−3𝑗

8𝑒𝑗3𝜋𝑡 +

3𝑗

8𝑒−𝑗3𝜋𝑡 +

−𝑗

8𝑒−𝑗9𝜋𝑡

𝜔0 = 3𝜋 , 𝑎𝑘 =∓𝑗

3

8𝑘 = ±1

±𝑗1

8𝑘 = ±3

Page 47: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series: Another Example

• Determine the Fourier series coefficients of:

𝑥 𝑡 = 1 + sin𝜔0𝑡 + 2 cos𝜔0𝑡 + cos 2𝜔0𝑡 +𝜋

4

Page 48: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series: Another Example

𝑥 𝑡 = 1 + sin𝜔0𝑡 + 2 cos𝜔0𝑡 + cos 2𝜔0𝑡 +𝜋

4

= 1 +1

2𝑗𝑒𝑗𝜔0𝑡 − 𝑒−𝑗𝜔0𝑡 + 1 𝑒𝑗𝜔0𝑡 + 𝑒−𝑗𝜔0𝑡

+1

2𝑒𝑗 2𝜔0𝑡+ 𝜋 4 + 𝑒−𝑗 2𝜔0𝑡+ 𝜋 4

• Collecting terms:

= 1 + 1 +1

2𝑗𝑒𝑗𝜔0𝑡 + 1 −

1

2𝑗𝑒−𝑗𝜔0𝑡 +

1

2𝑒𝑗𝜋/4 𝑒𝑗2𝜔0𝑡

+1

2𝑒−𝑗𝜋/4 𝑒−𝑗2𝜔0𝑡

Page 49: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series: Another Example

𝑎0 = 1

𝑎1 = 1 +1

2𝑗= 1 −

1

2𝑗

𝑎−1 = 1 −1

2𝑗= 1 +

1

2𝑗

𝑎2 =1

2𝑒𝑗𝜋/4 =

2

41 + 𝑗

𝑎−2 =1

2𝑒−𝑗𝜋/4 =

2

41 − 𝑗

𝑎𝑘 = 0 , 𝑘 > 2

Page 50: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series: Square Wave

• Consider the periodic square wave, which is defined for one cycle by:

𝑠 𝑡 =1 for 0 ≤ 𝑡 <

1

2𝑇0

0 for1

2𝑇0 ≤ 𝑡 < 𝑇0

Page 51: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series: Square Wave

𝑎𝑘 =1

𝑇0

0

𝑇0

𝑥(𝑡)𝑒−𝑗 2𝜋 𝑇0 𝑘𝑡𝑑𝑡

=1

𝑇0

0

𝑇0/2

1𝑒−𝑗 2𝜋 𝑇0 𝑘𝑡𝑑𝑡

=1

𝑇0

𝑒−𝑗 2𝜋 𝑇0 𝑘(

12𝑇0) − 𝑒−𝑗 2𝜋 𝑇0 𝑘(0)

−𝑗 2𝜋 𝑇0 𝑘

Page 52: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series: Square Wave

=1

𝑇0

𝑒−𝑗 2𝜋 𝑇0 𝑘(

12𝑇0) − 𝑒−𝑗 2𝜋 𝑇0 𝑘(0)

−𝑗 2𝜋 𝑇0 𝑘

=𝑒−𝑗𝜋𝑘 − 1

−𝑗2𝜋𝑘

𝑎𝑘 =−1 𝑘 − 1

−𝑗2𝜋𝑘, for 𝑘 ≠ 0

𝑎0 =1

𝑇0

0

𝑇0/2

1𝑒−𝑗0𝑡𝑑𝑡 =1

𝑇0

1

2𝑇0 =

1

2

Page 53: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series: Square Wave

𝑠 𝑡 =1 for 0 ≤ 𝑡 <

1

2𝑇0

0 for1

2𝑇0 ≤ 𝑡 < 𝑇0

𝑎𝑘 =

1

𝑗𝜋𝑘𝑘 = ±1,±3,±5,…

0 𝑘 = ±2,±4,±6,…1

2𝑘 = 0

Page 54: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series: Square Wave

• For the 50% duty cycle square wave, if the fundamental frequency is 25 Hz:

Page 55: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series: Triangle Wave

• Consider the periodic square wave, which is defined for one cycle by:

𝑠 𝑡 = 2𝑡 𝑇0 for 0 ≤ 𝑡 <

1

2𝑇0

2 𝑇0 − 𝑡 𝑇0 for1

2𝑇0 ≤ 𝑡 < 𝑇0

• where 𝑇0 = 0.04 s

Page 56: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series: Triangle Wave

𝑎0 =1

𝑇0

0

𝑇0

𝑥 𝑡 𝑑𝑡 =1

𝑇0𝐴𝑟𝑒𝑎 =

1

2

𝑎𝑘 =1

𝑇0

0

𝑇0

𝑥(𝑡)𝑒−𝑗 2𝜋 𝑇0 𝑘𝑡𝑑𝑡

=1

𝑇0

0

𝑇0/2

( 2𝑡 𝑇0)𝑒−𝑗 2𝜋 𝑇0 𝑘𝑡𝑑𝑡 +

1

𝑇0

𝑇0/2

𝑇0

( 2 𝑇0 − 𝑡 𝑇0)𝑒−𝑗 2𝜋 𝑇0 𝑘𝑡𝑑𝑡

Page 57: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Fourier Series: Triangle Wave

• After some steps, we arrive at:

𝑎𝑘 =𝑒−𝑗𝑘𝜋 − 1

𝜋2𝑘2

• Since 𝑒−𝑗𝑘𝜋 = (−1)𝑘 :

𝑎𝑘 =

−2

𝜋2𝑘2𝑘 = ±1,±3,±5,…

0 𝑘 = ±2,±4,±6,…1

2𝑘 = 0

Page 58: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Convergence of Fourier Series

• Some History:

• Euler and Lagrange would agree with our examples before the square wave, but have objected to the square wave example

• However, Fourier maintained that the Fourier representation of the square wave is valid

• In fact, Fourier maintained that any periodic signal could be represented by a Fourier series

Page 59: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Convergence of Fourier Series

• This is not quite correct

• However, an extremely large class of periodic signals, including the square wave, can be reprented by a Fourier series

• To illuminate this point, let us consider approximating a given periodic signal by a linear combination of a finite number of harmonically related complex exponentials

Page 60: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Convergence of Fourier Series

𝑥𝑁 𝑡 =

𝑘=−𝑁

𝑁

𝑎𝑘𝑒𝑗𝑘𝜔0𝑡

• Then, an approximation error can be calculated by:

𝑒𝑁 𝑡 = 𝑥 𝑡 − 𝑥𝑁 𝑡 = 𝑥 𝑡 −

𝑘=−𝑁

𝑁

𝑎𝑘𝑒𝑗𝑘𝜔0𝑡

Page 61: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Convergence of Fourier Series

• Error magnitudes when approaching a square wave with a sum of harmonic components:

Page 62: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Convergence of Fourier Series

• To derive a quantitative measure of approximation error, we can use the energy of the error signal over one period:

𝐸𝑁 = 𝑇

𝑒𝑁(𝑡)2𝑑𝑡

• To minimize this energy:

𝑎𝑘 =1

𝑇0

0

𝑇0

𝑥(𝑡)𝑒−𝑗 2𝜋 𝑇0 𝑘𝑡𝑑𝑡

Page 63: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Convergence of Fourier Series

𝐸𝑁 = 𝑇

𝑒𝑁(𝑡)2𝑑𝑡

𝑎𝑘 =1

𝑇0

0

𝑇0

𝑥(𝑡)𝑒−𝑗 2𝜋 𝑇0 𝑘𝑡𝑑𝑡

• If a signal x(t) has a Fourier series representation, limit of 𝐸𝑁as N →∞ is zero

• What if the integral diverges?

Page 64: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Convergence of Fourier Series

• Three conditions, derived by Dirichlet, guarantees that a given signal equals its Fourier series representation

• , except at isolated values of t for which x(t) is discontinuous

Page 65: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Convergence of Fourier Series

Condition 1:

Over any period, x(t) must be absolutely integrable:

𝑇

𝑥(𝑡) 𝑑𝑡 < ∞

This guarantees that each coefficient 𝑎𝑘 will be finite

Page 66: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Convergence of Fourier Series

• A periodic signal that violates the first Dirichlet condition is:

𝑥 𝑡 =1

𝑡, 0 < 𝑡 ≤ 1

Page 67: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Convergence of Fourier Series

Condition 2:

In any finite interval of time, x(t) is of bounded variation

In other words, there are no more than a finite number of maxima and minima during any single period of the signal

Page 68: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Convergence of Fourier Series

• A periodic signal that satisfies the first Dirichlet condition, but violates the second condition is:

𝑥 𝑡 = sin2𝜋

𝑡, 0 < 𝑡 ≤ 1

Page 69: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Convergence of Fourier Series

Condition 3:

In any finite interval of time, there are only a finite number of discontinuities.

Furthermore, each of these discontinuities is finite

Page 70: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Convergence of Fourier Series

A signal that violates this condition:

Page 71: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Frequency Variation

• MATLAB Audio Example

Page 72: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Frequency Variation

• A simple case of signals with varying frequency is the chirp signal

• A chirp signal’s frequency changes linearly from some low value to a high value

• A simple way to obtain chirp signals would be concatenate a number of sinusoids with different constant frequencies

• But this causes discontinuities in the boundaries unless the initial phases are carefully adjusted

Page 73: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Frequency Variation

Page 74: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Frequency Variation

• A better appraoch is to modify the sinusoid signal formula

𝑥 𝑡 = 𝐴 cos 𝜓(𝑡)

• As an example,

𝑥 𝑡 = 𝐴 cos 2𝜋𝜇𝑡2 + 2𝜋𝑓0𝑡 + 𝜙

𝑓𝑖 𝑡 =1

2𝜋

𝑑𝜓(𝑡)

𝑑𝑡= 2𝜇𝑡 + 𝑓0

Page 75: Signals & Systems - Kocaeli Üniversitesiehm.kocaeli.edu.tr/dersnotlari_data/aerturk/Signals & Systems/3... · Signals & Systems Lecture 3 –Spectrum and Fourier Series Alp Ertürk

Frequency Variation

• Suppose we want to synthesize a frequency sweep from f1 = 220Hz to f2 = 2320Hz over a 3 – second time interval. Then,

𝑓𝑖 𝑡 =𝑓2 − 𝑓1𝑇2

𝑡 + 𝑓1 =2320 − 220

3𝑡 + 220

𝜓 𝑡 =

0

𝑡

2𝜋𝑓 𝜏 𝑑𝜏 =

0

𝑡

2𝜋2320 − 220

3𝜏 + 220 𝑑𝜏

= 700𝜋𝑡2 + 440𝜋𝑡 + 𝜙

• Note: A frequency variation produced by the time-varying angle function is called frequency modulation (FM)