# Complex representation of fourier series

## Homework Statement

Using the complex representation of fourier series, find the Fourier coefficients of the periodic function shown below. Hence, sketch the magnitude and phase spectra for the first five terms of the series, indicating clearly the spectral lines and their magnitudes

## Homework Equations

Firstable, I dont know how indicate the spectral lines.
The other problem that i have is when i try to calculate the Cn coefficient and, therefore, the final serie. I dont know if it is right or not, and in case of it is right, im not able to rewrite "my final function" into the correct answer, which i have it in one of my books.

## The Attempt at a Solution

what i have done is:
Cn= 1/T∫(from 0 to T) f(t)*e^(-j*n*omega*t) dt
Cn=1/T ( ∫(from 0 to d) Vm*e^(-j*n*omega*t) dt + ∫(from d to T) 0 *e^(-j*n*omega*t) dt )
The second part of the integral is equal to 0, therefore:
Cn=1/T ∫(from 0 to d) Vm*e^(-j*n*omega*t) dt where omega= (2*pi/T)
Cn=1/T ∫(from 0 to d) Vm*e^(-j*n*(2*pi/T)*t) dt
Cn= Vm/T ∫(from 0 to d) e^(-j*n*(2*pi/T)*t) dt
Cn= Vm/(-j*n*(2*pi/T)*T) (limits of the resulting integral from 0 to d)[e^(-j*n*(2*pi/T)*t)]
Cn= Vm/ (-j*n*2*pi) [e^(-j*n*(2*pi/T)*d) - 1]
what is next?

#### Attachments

• funcion.JPG
2.7 KB · Views: 331
Last edited:

bump...
i am having a similar problem...
i am given a signal which can be written as:
s(t) = -1 {-1 < t < 0}, 1 {0 < t < 1}, 0 {1 < t < 2} [it's a pulse train]
the period, T, is 3.
i have calculated the trig. fourier series representation, which in matlab turns out to be correct, yet when i calculate the exponentical fsr, i get a version of the trig. fsr which has its amplitude halved.

for the trig fsr:

s(t) = 2/(pi * n) * (1 - cos((2 * pi * n)/3)) * sin((2 * pi * n * t)/3);

for the exp fsr:

s(t) = -1/(i * pi * n) * (cos((2 * pi * n)/3) - 1) * exp((i * 2 * pi * n * t)/3)

i also tried

c_n = 0.5 (a_n - i * b_n) = -0.5 * i * ( 2/(pi * n) * (1 - cos((2 * pi * n)/3))

either case, my complex fsr was a scaled amplitude version of my trig fsr

any guidance would be much appreciated