You are on page 1of 10

Digital Signal

Processing
Lecture 5- Fourier Series
IVAN TANRA
Time series as a series of
trigonometry signal
A signal can be represented as a summation of the cosine and
sinusoidal signal
𝑀 𝑀
𝑥 ( 𝑛 ) = ∑ 𝑎 𝑛 cos 𝑚 𝜔 𝑜 𝑛𝑇 +¿ 𝑏𝑛 sin 𝑚 𝜔𝑜 𝑛𝑇 = ∑ 𝑐𝑚 𝑒
𝑗 𝑚 𝜔𝑜 𝑛𝑇
¿
𝑚=1 𝑚=1

Time domain
Summation of several sin signal
Time series as a series of
trigonometry signal
A signal can be represented as a summation of the cosine and
sinusoidal signal
𝑀 𝑀
𝑥 ( 𝑛 ) = ∑ 𝑎 𝑛 cos 𝑚 𝜔 𝑜 𝑛𝑇 +¿ 𝑏𝑛 sin 𝑚 𝜔𝑜 𝑛𝑇 = ∑ 𝑐𝑚 𝑒
𝑗 𝑚 𝜔𝑜 𝑛𝑇
¿
𝑚=1 𝑚=1

Summation of several sin signal Frequency signal


Discrete Fourier Transform
Fourier series is a method to transform a time signal into
frequency signal and obtain its amplitude component
Discrete Fourier Transform is formulated as

Where

If we want to reconstruct the signal it will be


(Inverse Fourier)
Discrete Fourier Transform
Suppose you have a set of data x(n) in matrix form
xN and X(k) in matrix form XN , the relationship will
be :
Coding for discrete Fourier
Transform
clear all %create matrix Wn
N=200; for j=1:1:n
fs=1000; %frequency sampling for k=1:1:n
fo=10; %frequency of triangle W(j,k)=exp(-i*2*pi/N*(j-
signal 1)*(k-1));
Ns=fs/fo; end
Amp =5; %Amplitude signal end
for n=1:1:N X=W*x';
x(n)=abs(rem(n+(Ns*3/4- Y=imag(X)/N*2;
1),Ns)-(Ns/2))/(Ns/(4*Amp))-Amp;
plot(x)
end
plot(Y)
Discrete Fourier Series
Coding to form discrete
Fourier Transform
for m =1:1:M
a(m)=0;
b(m)=0;
for n=1:1:N
a(m)=a(m)+x(n)*cos(2*pi*n*m/N);
b(m)=b(m)+x(n)*sin(2*pi*n*m/N);
end
a(m)=2/N*a(m);
b(m)=2/N*b(m);
end
Coding for arduino
https://create.arduino.cc/projecthub/abhilashpatel121/easyfft-fast-
fourier-transform-fft-for-arduino-9d2677

You might also like