Evaluating Exponential Fourier Series: Registration No. 2017-EE-352, 362 (B) Marks
Evaluating Exponential Fourier Series: Registration No. 2017-EE-352, 362 (B) Marks
and
We can use this result to convert the Trigonometric Fourier Series into an Exponential Fourier
Series which has only one integral term to solve per harmonic.
Next, for any signal f(t) over [0,T0], or any periodic f(t) with period T0 we can compute the
Exponential Fourier Series. We begin by writing
since our basis set is now . We must find the D0 and Dn coefficients to find the EFS
of the signal f.
As before with trigonometric Fourier
Series and
Code:
Task 1: Code for plotting Amplitude and Phase spectrum
clear
nneg = -10:-1;
npos = 1:10;
Fnneg = (1./(1j*nneg*pi)).*(-3*exp(-
1j*nneg*6*pi/7)+2*exp(1j*nneg*2*pi/7)+exp(-1j*nneg*12*pi/7));
Fnpos = (1./(1j*npos*pi)).*(-3*exp(-
1j*npos*6*pi/7)+2*exp(1j*npos*2*pi/7)+exp(-1j*npos*12*pi/7));
F0 = 10/7;
n = [nneg,0,npos];
Fn = [Fnneg,F0,Fnpos];
figure(1)
subplot(2,1,1)
stem(n,abs(Fn))
xlabel('n')
ylabel('abs(Fn)')
subplot(2,1,2)
stem(n,angle(Fn))
xlabel('n')
ylabel('angle(Fn)')
figure(2)
subplot(2,1,1)
stem(n*(1/7),abs(Fn))
xlabel('f(Hz)')
ylabel('abs(Fn)')
subplot(2,1,2)
stem(n*(1/7),angle(Fn))
xlabel('f(Hz)')
ylabel('angle(Fn)')
Task 2: Code for plotting the truncated Fourier Series
clear
nneg = -30:-1;
npos = 1:30;
Fnneg = (1./(1j*nneg*pi)).*(-3*exp(-
1j*nneg*6*pi/7)+2*exp(1j*nneg*2*pi/7)+exp(-1j*nneg*12*pi/7));
Fnpos = (1./(1j*npos*pi)).*(-3*exp(-
1j*npos*6*pi/7)+2*exp(1j*npos*2*pi/7)+exp(-1j*npos*12*pi/7));
F0 = 10/7;
n = [nneg,0,npos];
Fn = [Fnneg,F0,Fnpos];
k = 0;
for t= -1:0.01:6
k = k+1;
fapprox(k) = sum(Fn.*(exp(1j*n*2*pi*t/7)))
end
t = -1:0.01:6
fexact = 4*(t<=3)-2*(t>=3)
plot(t,fapprox,t,fexact)
Results:
Conclusion:
In this lab we learned about, different commands of MATLAB to deal with Fourier Series. In
first task we found Fourier Series coefficients of a given waveform and plotted them with
MATLAB. In second task we used Fourier Series to approximate the function f(t) and then co-
plotted it with exact waveform of function f(t).
Reference:
1. https://cpjobling.github.io/EG-247-Resources/week5/exp_fs1.pdf
2. https://users.wpi.edu/~goulet/Matlab/overlap/efs.html