Buscar

Numerical Analysis Assignment 2 - Fourier Series

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes
Você viu 3, do total de 9 páginas

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes
Você viu 6, do total de 9 páginas

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes
Você viu 9, do total de 9 páginas

Prévia do material em texto

CSI 148 - NUMERICAL ANALYSIS
ASSIGNMENT 2
Douglas do Amaral Monteiro - 11.2.8041
douglas.ammaral@yahoo.com.br
April 3, 2017
Resumo
This document presents a brief overview about one of the great accomplishments of Lagrange and his
pupil Fourier in the study of heat dissipation: The representation of periodic signals as infinite (or not)
sum of weighted sines and cosines.
1. Explain briefly the mathematical definition and significance of the Fourier series.
2. Visualize the relationship between time and frequency domain of signals.
Introduction
The Fourier series was discovered by the French mathematician Jean-Baptiste Fourier in late
eighteenth century, during his studies of the heat propagation. It is one of the most brilliant ideas of that
century, despite the fact it did not receive the deserved attention in his time. Let’s think of the Fourier
series as a form of interpolate a (periodic) function by means of the frequency included in the function.
Most of the time, it is easier to learn a concept through a comparison. We could say that the Fourier
series is the mathematical process that allows to find the ”receipt” to built a function. In the Fourier
series, the tool which allows us to find such ingredients is the Kernel function ejθ. Let’s consider the
figures below.
1
CSI 148 - Numerical Analysis ICEA-UFOP
Figure 1 – Complex Representation
Figure 2 – Relation between space, time and frequency in the circular
movement.
Mathematically, the Fourier series can be represented by the following functions
f(t) = a0 +
∞∑
n=1
ak cos
(
2 pi k t
T
)
+ bk sen
(
2 pi k t
T
)
(1)
where,
a0 =
1
T
∫ ∞
−∞
f(t) dt
ak =
2
T
∫ ∞
−∞
f(t) cos
(
2 pi k t
T
)
dt
bn =
2
T
∫ ∞
−∞
f(t) sen
(
2 pi k t
T
)
dt
and a0, ak e Bk are called coefficients of the Fourier Series (Oppenheim, 1998).
2
CSI 148 - Numerical Analysis ICEA-UFOP
In other words, the Fourier series is a way of measuring how a signal (or a function) varies with time
in a period and this is called frequency. Therefore, the Fourier series can say what are all frequencies
present in a periodic signal through the equation presented in [2]. Note that in following given problem,
the function is not periodic itself, however, it can be made periodic through repetitions of its period from
−∞ to +∞.
Fourier Series - Graphs
Let’s consider the following data set which contains N data points:
t = [0 0.0625 0.1250 0.1875 0.2500 0.3125 0.3750 0.4375 0.5000 0.5625...
0.6250 0.6875 0.7500 0.8125 0.8750 0.9375];
f = [10.00 11.13 3.656 4.380 6.000 -1.27 -4.343 5.480 10.00 -1.480...
-7.656 5.276 14.00 -0.3801 -15.65 -7.137];
The data is periodic with period T = 1. The sampling frequency is fs = 16 so that the interval
between the sampled times is dt = 1/fs, the number of intervals in the data period is N = T/dt. The
time data is thus generated by t = 0 : dt : T − dt. We can plot this signal and see its behavior in the
specified time range. This is shown in Figure 3.
Figure 3 – Plotted signal.
Clearly, we can see that this signal varies with time, since it is not a constant function. The question
is: with which frequency does it vary? Through the FS it is possible to find the exact frequencies included
in the signal, respected the Nyquist rate obviously. Performing the following scrip in Matlab or Octave,
3
CSI 148 - Numerical Analysis ICEA-UFOP
it is found that this specific signal has five peak frequencies, as shown in Figure 4 and Figure 7.
Note, however, that the plot shown in Figure 4 has its horizontal axis with respect to the bin number.
On the other hand, Figure 7 shows the plot over the frequency axis. The term (2/N) is required to
normalize the value of the amplitude.
F = fft(f);
dt = 1/fs ;
N = T/dt;
k = 1:N;
figure
stem(k,(2/N)*abs(F),’Linewidth’,2,’color’,[0 0.75 0]);
grid on
axis tight
Figure 4 – Absolute coefficient values.
4
CSI 148 - Numerical Analysis ICEA-UFOP
Figure 5 – Real coefficient values.
Figure 6 – Imaginary coefficient values.
5
CSI 148 - Numerical Analysis ICEA-UFOP
Figure 7 – Absolute coefficient values.
Figure 8 – Real coefficient values.
6
CSI 148 - Numerical Analysis ICEA-UFOP
Figure 9 – Imaginary coefficient values.
The figures above show the absolute, real and imaginary parts of the Fourier coefficients, respectively.
Finally we can say that the original signal has the frequencies shown, and they are f1 = 0, f2 = 1, f3 = 2,
f4 = 3 and f5 = 4. All of them with different amplitudes. As far as we can say, the most energy valued
frequency in this signal is 5 Hz and the least is 1 Hz.
Figure 10 shows the reconstructed signal by the ifft or idft def functions. As we could expect,
the signal is exactly the same. Figure 11 shows the interpolation (construction) of the sampled original
signal using the Fourier series.
This function can be written as follows
f(t) = a0 +
∞∑
k=1
ak cos
(
2 pi k t
T
)
+ bk sin
(
2 pi k t
T
)
(2)
f(t) = 4 + 8 cos (8pit) + 2 sin (2pit) + 4 sin (4pit) + 6 sin (6pit) (3)
The term 2/N is also included in the function f trig inter to normalize the amplitudes of the
interpolated function so that the graph produced by equation 4 and the function match exactly. Actually,
it was included on the division by the number of coefficients since it was already multiplying by 2.
7
CSI 148 - Numerical Analysis ICEA-UFOP
Figure 10 – Function returned by the function ifft or idft def.
Figure 11 – Interpolated function constructed with the coefficients found
by the function fft or dft def. Plotted over continuous time from 0 to
1 with 200 bins.
8
CSI 148 - Numerical Analysis ICEA-UFOP
Figure 12 – Function plotted with the expression in equation 4.
t = [0:1/199:1];
T = 1;
f=4+8*cos((8*pi*t)/T)+2*sin((2*pi*t)/T)+4*sin((4*pi*t)/T)+6*sin((6*pi*t)/T);
figure(12);
plot(t,f,’Linewidth’,2,’color’,’g’);
title(’’);
grid on
axis tight
References
[1] GILAT, A.; SUBRAMANIAM, V.; Numerical Methods for Engineers and Scientits: An intro-
duciton with applications using Matlab. 3 rd edition, John Wiley & Sons, New York, 2014.
[2] OPPENHEIM, A.V.; WILLSKY, A.S.; NAWAB, H. Sinais e Sistemas 2.ed, Pearson, Sa˜o Paulo,
2010.
9

Continue navegando