Biomedical Engineering Reference
In-Depth Information
Solution
First note that
2p
T
¼ p
T
¼
2
and o
0
¼
To simplify the analysis, integration for
a
m
and
b
m
is carried out over the first period of the
waveform (from -1 to 1)
ð
1
ð
1=2
1
T
1
2
5
2
a
0
¼
1
x
ð
t
Þ
dt
¼
5
dt
¼
1
=
2
ð
1
ð
1=2
2
T
a
m
¼
1
x
ð
t
Þ
cos
ð
m
o
o
t
Þ
dt
¼
5
cos
ð
m
p
t
Þ
dt
1
=
2
1
=
2
5
sin
ð
m
p
t
Þ
5
sin
ð
m
p
=
2
Þ
¼
2
¼
¼
5
sinc
ð
p
=
2
Þ
m
m
p
m
p=
2
1
=
ð
1
ð
1=2
1
=
2
2
T
cos
ð
m
p
t
Þ
m
b
m
¼
1
x
ð
t
Þ
sin
ð
m
o
o
t
Þ
dt
¼
5
sin
ð
m
p
t
Þ
dt
¼
5
2
¼
0
p
1
=
2
1
=
where by definition sinc
ð
x
Þ¼
sin
ð
x
Þ=
x
. Substituting the values for
a
0
,
a
m
, and
b
m
into Eq. (11.3a)
gives
1
m
¼
5
2
þ
sin
ð
m
p=
2
Þ
x
ð
t
Þ¼
5
cos
ð
m
p
t
Þ
m
p
=
2
1
MATLAB implementation:
%Plotting Fourier Series Approximation
subplot(211)
time
¼
-2:0.01:2; %Time Axis
¼
x
5/2; %Initializing Signal
for m
¼
1:10
¼
þ
x
x
5*sin(m*pi/2)/m/pi*2*cos(m*pi*time);
end
plot(time,x,'k') %Plotting and Labels
xlabel('Time (sec)')
ylabel('Amplitude')
set(gca,'Xtick',[
2:2])
set(gca,'Ytick',[0 5])
set(gca,'Box','off')
%Plotting Fourier Magnitudes
subplot(212)
m
¼
1:10;