You are on page 1of 46

Fourier Series

Yi Cheng
Cal Poly Pomona

Fourier Series
Any periodic functions can be
expressed as a linear
combination of harmonics,
x(t) = ck ejkw0t
where ck = (1/T) x(t) e-jkw0t dt
and T is the period of x(t).

K Harmonic, w = kw0
th

K=1

K=2

K=3

K=4
3

Piano 88 Keys

f0

2 f0

4f0

8f0
4

Periodic Functions

4 runners running at different


speed
t=0

K=0,
Doesnt
move

K=2, Move at 2
revolution/sec

K=1, Move at 1
revolution/sec

K=3, Move at 3
revolution/sec

4 runners running at different


speed
t = 0.25
second

Doesnt
move

Move at 2
revolution/sec

Move at 1
revolution/sec

Move at 3
revolution/sec

4 runners running at different


speed
t = 0.5
second

Doesnt
move

Move at 2
revolution/sec

Move at 1
revolution/sec

Move at 3
revolution/sec

4 runners running at different


speed
t = 0.75
second

Doesnt
move

Move at 2
revolution/sec

Move at 1
revolution/sec

Move at 3
revolution/sec

4 runners running at different


speed
t = 1 second

Doesnt
move

Move at 2
revolution/sec

Move at 1
revolution/sec

Move at 4
revolution/sec

10

Orthonormal vectors

V = x0*i
+ y0
V*I = (x0*i) *i +(y0*j
= x0(i* i) + y0(i
(x0,y0
=x0
)

y
y0*j

x0*i

11

Orthonormal Functions
{Given] fk(t) = ejkwt fn(t) = ejnwt
[To prove]
T fk(t) fn(t)dt = 0 if n != k
= T if n = -k
[Proof] T fk(t) fn(t)dt = T ejkwt ejnwt
dt
= T ej(k+n)wt dt
= [ej(k+n)wT - 1]/[j(k+n)w] = 0 if
(k+n) !=0

12

Orthogonal Functions
Assume x(t) = 2 sin(2t) + 3
sin(4t)
Then x(t) is periodic with a
fundamental period of 1 second,
T = 1.
(1) 0T sin(2t) sin(4 t) dt
=(1/2) 0T [cos(2t) cos(6t)]dt
=0
(2) 0T sin(2t) sin(2 t) dt
T

13

Spectrum

14

Fourier Series
If x(t) is periodic with a period of T,
x(t) = x(t+T) for all t,
then x(t)= C0 +C1ejwt +C2ej2wt +C3ej3wt
+ -where C0= (1/T) T x(t) dt
C1= (1/T) T x(t) e-jwt dt
Ck= (1/T) T x(t) e-jkwt dt
and = 2/T
15

Fourier Coefficient, Ck, is the


amplitude and phase of Kth harmonic

C-4

C-3

C-2

-4 w0 -3 w0 -2 w0
w(rad/sec)

C-1

- w0

C0

C1

C2

w0

2 w0

C3

C4

3 w0

4 w0

16

1. Periodic pulses with 50% duty


cycle
x(t) = 1 for 0<t< T/2
=0 for T/2 < t < T
x(t)

-2T -3T/2

-T

-T/2 0

T/2 T

1.5T

17

Fourier Coefficients of Square


Wave
C0 = (1/T) x(t) dt
= (1/T) 0T/2 1 dt = (1/T) (T/2)
= (Average DC value)
Ck = (1/T) x(t) e-jkwt dt (k != 0)
= (1/T) 0T/2 e-jkwt dt = 1/(-jkwT) [e-jkwT/2 -1]
= 2e-jkwT/4 /(kwT) [ejkwT/4 e-jkwT/4] /2j
= 2e-jkwT/4 /(k T) sin(kT/4)
= 2e-jk2/4 /(k2) sin(2k/4) (because T =2 )
= e-jk/2 /(k) sin(k/2) = 0 K=even
= e-jk/2 /(k)
k=odd
18

DC term (C0) only


1.2

0.8
x(t) = periodic square
wave

0.6

C0
0.4

0.2

0
0

0.2

0.4

0.6

0.8

1.2

19

DC term+ First Harmonic


1.4

1.2

0.8

0.6

x(n)
C0
C1

0.4

0.2

0
0

10

15

20

25

30

35

-0.2

-0.4

20

DC + First +3rd Harmonic


1.2

0.8

0.6

x(n)
C0
#REF!
C3

0.4

0.2

0
0

10

15

20

25

30

35

-0.2

21

DC + First +3rd +5th Harmonic


1.2

0.8

0.6
x(n)
C5
0.4

0.2

0
0

10

15

20

25

30

35

-0.2

22

Fourier coefficients of periodic


discrete-time pulses
x(n)

= 1 0 <= n < N0
=0 N0 <= n < N
N-1

Ck

= (1/N) x(n)e

-j2nk/N

n=0

N -1

= (1/N) e

-j2nk/N

n=0

e -j2k/N + --- + e -j2N0k/N]


= (1/N)[ 1 - e -j2N k/N ]/( 1- e -j2k/N](k 0)
0
C0 = N0/N = duty cycle
= (1/N) [ 1 +

23

Derivative of Periodic pulses with


50% duty cycle
x(t) = (t) - (t- T/2) 0<t <T
x(t)

-2T -3T/2

-T

-T/2 0

T/2 T

1.5T

24

Fourier Coefficients of Derivative


of Square Wave
C0= (1/T) x(t) dt
= (1/T) 0T [(t) - (t- T/2)] dt = (1/T) (1-1)=0
(Average DC value)
Ck= (1/T) x(t) e-jkwt dt (k != 0)
= (1/T) 0T [(t) - (t- T/2)] e-jkwt dt
= 1/(T) [1 -e-jkwT/2]
Ck= (1/jkw0) Ck
= 1/(jkw0T) [1 -e-jkwT/2]
= 1/(jk 2 ) [1 -e-jk] (because w0T =2 )
= 0k=even
= 1/(jk )
k=odd
25

1. Periodic pulses with no DC


offset
x1(t) = 0.5 for 0<t< T/2
=-0.5 for T/2 < t < T
x(t)

0.5

-2T -3T/2

-T

-T/2 0

T/2 T

1.5T

-0.5

26

x1(t)

= 0.5
Fourier Coefficients 0<t<T/2
of Periodic
= -0.5
pulses with no DC offset
T/2<t<T
x(t) = 1
x1(t) = x(t) -0.5
0<t<T/2
C0 = - 0.5 =0
= 0 T/2<t<T
The Fourier
C0 = 1/2
Coefficients of
x(t) and x1(t) are
identical except
C0.

27

2. Periodic Saw tooth wave


x(t) = t/T for 0<t< T
x(t)

-2T -3T/2

-T

-T/2 0

T/2 T

1.5T

28

2. Derivative of Saw tooth wave


x(t) = (t) + 1/T

for 0<t< T
x(t)

1/T

-2T -3T/2

-T

-T/2 0

T/2 T

1.5T

2T

29

2 Fourier Coefficients of Derivative


of Periodic ramps
C0 = (1/T) x(t) dt
= (1/T) 0T ((t)+1/T) dt = (1/T) (1 + T/T)
=2/T (Average DC value)
Ck = (1/T) x(t) e-jkwt dt (k != 0)
= (1/T) 0T ((t)+1/T)e-jkwt dt
= (1/T) + (1/T2) 0T e-jkwt dt
= (1/T) + (1/T2) /(-jkw) [e-jkwT -1]
= (1/T) + (1/T2) /(-jkw) [e-j2k -1] (T =2 )
= 1/T

30

2. Fourier Coefficients of Periodic


ramps
Ck=

(1/jkw0) Ck

= (1/jkw0) (1/T)
= 1/jkw0T
= 1/(j2k) (k 0)
C0 = 1/(2T)

31

3. Periodic Triangular wave


x(t) = 4t/T for 0<t< T/4
= 1- 4(t-0.25T)/T
for T/4<t<
3T/4
= -1 + 4(t-.75T)/T for 3T/4<t< T
x(t)

-2T -3T/2

-T

-T/2 0

T/2 T

1.5T

2T

32

3 Derivative of Periodic Triangular


wave
x(t) = 4/T for 0<t< T/4
= -4/T for T/4<t< 3T/4
= 4/T for 3T/4<t< T
4/T
x(t)

-2T -3T/2

-T

-T/2 0

T/2 T

1.5T

2T

33

Fourier Coefficients of Derivative of


Periodic Triangular wave
The

derivative is a square wave


with an amplitude of 8/T and
without DC offset.
C0 = 0,
Ck

= (8/T)e-jk/2 /(k) if k is odd

= 0,

if k is even

34

3 Fourier Coefficients of Triangular


wave
Ck=

(1/jkw0) Ck (k 0)

=0 if k is even
= (1/jkw0) (8/T)e-jk/2 /(k) if k is
odd
= 1/[j8kkw0T ] e-jk/2
= 1/[j8kk(2 ) ] e-jk/2
= 1/(j4k )2 e-jk/2
C0 = 0

35

4. Periodic Full Waves


x(t) = sin(w0 t)
w0 = /T

for 0<t< T
x(t)

-2T -3T/2

-T

-T/2 0

T/2 T

1.5T

2T

36

Fourier Coefficients of Full Waves


C0 = (1/T) x(t) dt
= (1/T) 0T sin(t/T) dt = (1/T) (-1//T ) [cos() -1]
=2/ (Average DC value)
Ck = (1/T) x(t) e-jkwt dt (k != 0)
= (1/T) 0T sin( t/T)e-jkwt dt
= (1/T2) 0T te-jkwt dt
=
=
=
=
=
=

1/(-jkwT) [e-jkwT/2 -1]


2e-jkwT/4 /(kwT) [ejkwT/4 e-jkwT/4] /2j
2e-jkwT/4 /(kwT) sin(kwT/4)
2e-jk2/4 /(k2)sin(2k/4) (because WT =2 )
e-jk/2 /(k) sin(k/2) = 0 K=even
e-jk/2 /(k)
k=odd
37

5. Periodic Half Waves


x(t) = sin(w0 t) for 0<t< T
=0
for T<t<2T
period = 2T, w0 = /T
x(t)
1

-2T -3T/2

-T

-T/2 0

T/2 T

1.5T

2T

38

Fourier Coefficients of Half Waves


C0 = (1/2T) x(t) dt
= (1/2T) 0T sin(t/T) dt = (1/2T) (-1//T ) [cos() -1]
=1/ (Average DC value)
Ck = (1/2T) x(t) e-jkwt dt (k != 0)
= (1/2T) 0T sin( t/T)e-jkwt dt
= (1/2T2) 0T sin(w0t)e-jkwt dt
=
=
=
=
=
=

1/(-jkwT) [e-jkwT/2 -1]


2e-jkwT/4 /(kwT) [ejkwT/4 e-jkwT/4] /2j
2e-jkwT/4 /(kwT) sin(kwT/4)
2e-jk2/4 /(k2)sin(2k/4) (because WT =2 )
e-jk/2 /(k) sin(k/2) = 0 K=even
e-jk/2 /(k)
k=odd
39

Spectrum of Continuous-time
Square wave
X(k
)

X(k) =1/(k)

0.
5
0.2
5

40

Discrete-time Square wave


N=8, N0 =4
x(n
)
1.5

.5

41

Example: Discrete-time Square


wave
N0 =

N/2
Ck = (1/N)[ 1 - e
-j2k/N]

-j2N k/N
0

]/( 1- e

= (1/N)[ 1 - e -jk]/( 1- e -j2k/N]


C2= 0
C4= 0
All even harmonics are zero.
C6= 0
42

Spectrum of Discrete-time
Square wave
X(k
)
3

0.
5
0.2
5

43

Comparison of Spectra of Discrete-time


(Slide 25) vs. Continuous-time Square
wave (Slide 17)
Discrete-time

square waves have


finite harmonics, while
continuous-time have infinite
harmonics.
The values of the corresponding
Fourier coefficients are the same,
up to k = N/2.

44

Consider the signal


x(n) = 1 + 2cos(n/4) + 3cos(n/2) + 4cos(3n/4)
Determine and sketch its power density spectrum
x(n) = 1 + 2cos(2n/8) + 3cos(2n/4) + 4 cos(2n/(8/3))
The minimum period of x(n) , N =LCM( 8, 4, 8/3) = 8
x(n) = 1 + 2cos(2n/8) + 3cos(2 * 2n/8) + 4 cos(3 * 2n/N)
= 1 + (e j2n/N + e -j2n/N)+ 1.5(e j2n/N + e -j4n/N)+ 2(e j6n/N + e j6n/N)/4
x(n) = c (k=0)
0
+ c e j2n/N (k=1)
1
+ c e -j2n/N
-1
+ c e j4n/N (k=2)
2
+ c e j4n/N
-2
+ c e j6n/N (k=3)
3
+ c e -j6n/N
-3
Therefore, c

= 1, c =2/2=c , c = 1.5 = c
c = 4/2 = c
1
7 2
6, 3
5

45

Spectrum
x(n) = 1 + 2cos(n/4) + 3cos(n/2) +
4cos(3n/4)
X(k
)
3

46

You might also like