You are on page 1of 7

Fourier series: Additional notes

1
1.1

Linking Fourier series representations for signals


Rectangular waveform

Require FS expansion of signal y (t) below:


1 y(t) 0 1 4 0 4 t (seconds) 8 12

Period T = 8, so 0 = 2/T = 2/8 = /4 and the signal has a FS representation

y (t) =
k=

dk ejk(/4)t .

We could nd the FS coecients using the formula dk = 1 8


8 0

y (t)ejk(/4)t dt =

1 8

4 0

(1)ejk(/4)t dt,

but will do something simpler (and more interesting) instead. Rectangular waveform: derivative signal Consider instead the derivative of the previous signal z (t) =
2 z(t) 0 2 4 0 4 t (seconds) 8 12
d dt y (t):

This also has a period T = 8, and a FS representation

z (t) =
k=

fk ejk(/4)t .

Note that this is of the same form as the FS for y (t), just with a dierent set of coecients. FS coecients for derivative signal Find the FS coecients for z (t) by integrating over one complete period. Choose the interval t = 2 to t = 6 to avoid integrating over half a Dirac delta (were free to choose the integration

range as long as we integrate over one period): fk = = 1 8 2 8


6

z (t)ejk(/4)t dt =
2 6 2 6

1 8 2 8

[2 (t) 2 (t 4)]ejk(/4)t dt
2 6 2 6 2 6

(t)ejk(/4)t dt

(t 4)ejk(/4)t dt (t 4)ejk(/4)4 dt (t 4)dt


2

1 = 4 =

1 (t)ejk(/4)0 dt 4 2

1 jk(/4)0 6 1 e (t)dt ejk(/4)4 4 4 2 1 jk(/4)0 1 jk(/4)4 e = e 4 4 1 jk ). = (1 e 4

Rectangular waveform: Relationship between coecients Since z (t) =


d dt y (t),

we can nd a relationship between the coecients: d d y (t) = dt dt


z (t) = =

dk ejk(/4)t =
k= k=

d dk ejk(/4)t dt

dk
k=

d jk(/4)t = e dt

dk jk (/4)ejk(/4)t .
k=

But the FS for y (t) is of the same form

z (t) =
k=

fk ejk(/4)t ,

so each of the coecients must be equal: fk = dk jk (/4) = jk dk . 4 The FS coecients dk (for the square wave) are related to the coecients fk (for the derivative signal) by 1 dk = fk . jk/4 This formula will work for all k except k = 0 (where it becomes an indeterminate form division by zero). To nd d0 , just go back to y (t) and calculate directly:
8

d0 =
0

y (t)dt =

1 8

(1)dt +
0

1 8

(1)dt = 0.
4

Therefore the FS coecients dk of y (t) are dk = 0


1 jk (1

ejk )

(k = 0) (k = 0).

Rectangular wave: FS coecient plot


Fourier series coefficients for rectangular wave 1 |dk|

0.5

0 2 dk

2 pi

pi

pi

2 pi

2 pi

pi

pi

2 pi

1.2

Triangular waveform

Now nd the FS coecients of x(t) below:


2 x(t) 0 2 4 0 4 t (seconds) 8 12

Period T = 8, so 0 = 2/T = 2/8 = /4 and the signal has a FS representation

x(t) =
k=

ck ejk(/4)t .

Triangular waveform: FS coecients We could nd the FS coecients using the formula ck = 1 8


8 0 4 0 4 0

x(t)ejk(/4)t dt x(t)ejk(/4)t dt + 1 8
8 4

1 = 8 = so ck = 1 8
4 0

x(t)ejk(/4)t dt
8 4

1 8

(t 2)ejk(/4)t dt +

1 8

(4 t)ejk(/4)t dt

tejk(/4)t

2 8

4 0

ejk(/4)t +

4 8

8 4

ejk(/4)t

1 8

8 4

tejk(/4)t .

Two of these integrals are easy, but two have to be done by parts. Exercise 1: Calculate the FS coecients for the above. 3

Triangular waveform: alternative method Consider instead the signal y (t) =


1 y(t) 0 1 4 0 4 t (seconds) 8 12
d dt x(t):

This also has a period T = 8, and a FS representation

y (t) =
k=

dk ejk(/4)t

and the coecients were found earlier to be dk = 0


1 jk (1

jk

(k = 0) (k = 0).

Triangular waveform: Relationship between coecients As before, since y (t) = y (t) = =


k= d dt x(t)

a relationship exists between the coecients:


d d x(t) = dt dt

ck ejk(/4)t =
k= k=

d ck ejk(/4)t dt

ck

d jk(/4)t = e dt

ck jk (/4)ejk(/4)t .
k=

But the FS for y (t) is of the same form

y (t) =
k=

dk ejk(/4)t ,

so each of the coecients must be equal: dk = ck jk (/4) = jk ck . 4 The FS coecients ck (for the triangular wave) can therefore be found from the coecients dk (for the square wave) using 1 ck = dk , jk/4 as long as k = 0. To nd c0 , just go back to x(t) and calculate directly: c0 = 1 8
8

x(t)dt =
0

1 8

(t 2)dt +
0

1 8

(4 t)dt = 0.
4

The FS coecients for x(t) are therefore ck = No integration by parts needed! 4 0


1 1 jk/4 jk (1

ejk )

(k = 0) (k = 0).

Triangular wave: FS coecient plot


Fourier series coefficients for triangular wave 1

|ck|

0.5

0 5 ck

2 pi

pi

pi

2 pi

2 pi

pi

pi

2 pi

Check with Matlab j = sqrt(-1); % to be sure tv = -6:0.001:14; % time values (a row vector) xv = zeros(size(tv)); % signal values initially zero N = 10; % highest term in synthesis equation for k=-N:N % Current complex exponential values (a row vector) xcv = exp(j*k*pi/4*tv); % Coefficient for current complex exponential if k==0 ck = 0; % DC else ck = 4/((j*k*pi)^2)*(1 - exp(-j*k*pi)); % formula %ck = 1/(j*k*pi)*(1 - exp(-j*k*pi)); % y(t) %ck = 1/4*(1 - exp(-j*k*pi)); % z(t) end % Add scaled complex exponential to signal values xv = xv + ck*xcv; end plot(tv,real(xv)); % the values *should* be real Exercise 2: Run the above code in Matlab. Open Matlab, type edit fs reconstruct.m, press enter. Copy the code above into the editor, save it, and run the le. You will see the reconstruction of the triangular wave using N terms. Try dierent values N . Look at the code and nd the line that calculates the formula, and try the formulas for the two derivative signals. Whats going on for the impulse train signal? Triangular wave: synthesis

Synthesised triangular waveform (N=10) 2 xN(t) 0 2 4 0 4 t (seconds) 8 12

Exercise 3:

Find the FS of the signal below:


1 0.5 0 6 3 0 3 6 t (seconds) 9 12

Notes Some interesting observations: 1. Triangular waveform is continuous (quite smooth), but has discontinuous derivatives FS 1 coecients decreases as 2 they decrease very quickly as frequency increases. 2. Rectangular waveform is discontinuous (less smooth than triangular waveform) FS coef1 cients decreases as more slowly. 3. Smooth waveforms generally contain less high frequency components their coecients go to zero closer to the origin in the frequency domain. 4. Alternatively, to reconstruct a signal with fast variations (i.e. discontinuities) requires large components at high frequencies. Linking coecients for other transformations Consider a signal x(t) with period T : it has a FS expansion

x(t) =
k=

ck ejk0 t

with 0 = 2/T . Let y (t) be a signal related to x(t). If y (t) is also periodic with period T then it has a FS expansion

y (t) =
k=

dk ejk0 t .

and the coecients ck and dk are related. Relationship for shift transformation

Consider the case where y (t) = x(t a) for some a. Clearly y (t) is periodic with the same period as x(t), and

y (t) = x(t a) =
k=

ck ejk0 (ta) =
k=

ck ejk0 t ejk0 a dk ejk0 t .

=
k=

(ck ejk0 a )ejk0 t =


k=

The coecients are therefore related by dk = ck ejk0 a Thus a shift corresponds to a change in the phase of each coecient, where the amount of the change is proportional to the size of the shift. Exercise 4: Find the FS of the signal below, using the series coecients ck found earlier for x(t):
2 x(t) 0 2 4 0 4 t (seconds) 8 12

You might also like