Vous êtes sur la page 1sur 15

REPUBLIQUE ALGERIENNE DEMOCRATIQUE ET POPULAIRE

MINISTERE DE L’ENSEIGNEMENT SUPERIEUR ET DE LA RECHERCHE


SCIENTIFIQUE
Université Aboubekr Belkaid -TLEMCEN

Faculté de TECHNOLOGIE
Département de Génie Electrique et Electronique (GEE)
Filière : Licence ELECTRONIQUE

Niveau : L3ELN_S5
Matière : TP NS543 (TP Traitement de signal)

TP N°03

Séries de Fourier et transformée de Fourier sous Matlab

Effectué par:
• AYAD Abdelhak S/Groupe : G11

Enseignant : Mr Brixi

Année Universitaire : 2021/2022

1
1- Serie de Fourier :
Selon le théorème de Fourier, toute fonction périodique de fréquence 𝑤0 peut être
exprimée en une somme infinie de fonctions sinus ou cosinus qui sont des multiples
de 𝑤0. Donc une fonction donnée f(t) peut-être représentée par :

𝑓(𝑡)=𝑎0+Σ(𝑎𝑛 cos𝑛𝑤0𝑡+ 𝑏𝑛 sin𝑛𝑤0𝑡)


Avec :

1 𝑇
𝑎0= ∫0 f(t)dt
𝑇
2 𝑇
𝑎1= ∫0 f(t)cos𝑛𝑤0𝑡 dt
𝑇
2 𝑇
b1= ∫0 f(t)sin𝑛𝑤0𝑡 dt
𝑇

2- Calculs des coefficients des séries de Fourier en utilisant


Matlab :
• Fonction (Script) pour le calcul des coefficients a0, an et bn :

2
La fonction Définition sur matlab
syms Short-cut for constructing symbolic variables.
syms arg1 arg2 ...
is short-hand notation for creating symbolic variables
arg1 = sym('arg1');
arg2 = sym('arg2'); ...
heaviside heaviside Step function.
heaviside(X) is 0 for X < 0, 1 for X > 0, and .5 for X == 0.
heaviside(X) is not a function in the strict sense.
for for Repeat statements a specific number of times.
The general form of a for statement is:

for variable = expr, statement, ..., statement END


double double Convert to double precision.
double(X) returns the double precision value for X.
If X is already a double precision array, double has
no effect.

• deuxième script faisant appel à la fonction que nous avons créé


précédemment est créé :

3
4
5
La fonction Définition sur matlab
close close Close figure.
close(H) closes the window with handle H.
close, by itself, closes the current figure window.

close('name') closes the named window.

close ALL closes all the open figure windows.


close ALL HIDDEN closes hidden windows as well.
6
ezplot ezplot Easy to use function plotter
ezplot(FUN) plots the function FUN(X) over the default
domain
-2*PI < X < 2*PI, where FUN(X) is an explicitly defined
function of X.
harmonic Harmonic function.
Y = harmonic(X) is the harmonic function of X.
It is defined as
harmonic(x) = psi(x+1) + eulergamma.
pause pause Wait for user response.
pause(n) pauses for n seconds before continuing, where n can
also be a
fraction. The resolution of the clock is platform specific.
Fractional
pauses of 0.01 seconds should be supported on most platforms.
plot plot(X,Y) plots vector Y versus vector X. If X or Y is a matrix,
then the vector is plotted versus the rows or columns of the
matrix,
whichever line up. If X is a scalar and Y is a vector,
disconnected
line objects are created and plotted as discrete points vertically
at
X.

3- Transformée de Fourier:

La transformée de Fourier est une extension du développement en séries de Fourier


pour les signaux non-périodiques. Donc, la transformée de fourier permet une
transformation du domaine temporel au domaine fréquentiel et ce même si le
signal est non-périodique.
+∞
𝑓(𝑤)=2𝑇∫−∞ 𝐟(𝐭) 𝑒−𝑗𝑤𝑡 𝑑𝑡

• Exemples de transformée de Fourier sous Matlab en utilisant l’équation


f(w) :

7
La fonction Définition sur matlab
int int Integrate
int Integrate
int(S) is the indefinite integral of S with respect to its symbolic
variable as defined by SYMVAR. S is a SYM (matrix or
scalar).
8
If S is a constant, the integral is with respect to 'x'.
real real Complex real part.
real(X) is the real part of X.
See I or J to enter complex numbers.
imag imag Complex imaginary part.
imag(X) is the imaginary part of X.
See I or J to enter complex numbers.
abs abs Absolute value.
abs(X) is the absolute value of the elements of X. When
X is complex, abs(X) is the complex modulus (magnitude) of
the elements of X.

angle angle Phase angle.


angle(H) returns the phase angles, in radians, of a matrix with
complex elements.
hold hold Hold current graph
hold ON holds the current plot and all axis properties,
including
the current color and linestyle, so that subsequent graphing
commands
add to the existing graph without resetting the color and
linestyle.
hold OFF returns to the default mode whereby PLOT
commands erase
the previous plots and reset all axis properties before drawing
new plots.

• Exemples de transformée de Fourier sous Matlab en utilisant la fonction


<< fourier>> :

Methode 1 :

9
La fonction Définition sur matlab
rectangularPulse rectangularPulse Rectangular pulse function.
Y = rectangularPulse(X) is the rectangular pulse
over the interval from -1/2 to 1/2.

Y = rectangularPulse(A,B,X) is the rectangular pulse


over the interval from A to B.
fourier fourier Fourier integral transform.
F = fourier(f) is the Fourier transform of the sym f with

10
default independent variable x. The default return is a
function of w.

Methode 2 :

4- Transformée de Fourier discrète:

La transformée de Fourier discrète d’un signal sous matlab peut être calculée en
utilisant l’algorithme de tranformation rapide avec la fonction « FFT » sous Matlab.

11
12
La fonction Définition sur matlab
randn randn Normally distributed pseudorandom numbers.
R = randn(N) returns an N-by-N matrix containing
pseudorandom values drawn
from the standard normal distribution. randn(M,N) or
randn([M,N]) returns
an M-by-N matrix. randn(M,N,P,...) or randn([M,N,P,...])
returns an
13
M-by-N-by-P-by-... array. randn returns a scalar.
randn(SIZE(A)) returns
an array the same size as A.

Title title Graph title.


title('text') adds text at the top of the current axis.

Grid grid Grid lines.


grid ON adds major grid lines to the current axes.
grid OFF removes major and minor grid lines from the current
axes.
grid MINOR toggles the minor grid lines of the current axes.
grid, by itself, toggles the major grid lines of the current axes.
grid(AX,...) uses axes AX instead of the current axes.
axis axis Control axis scaling and appearance.
axis([XMIN XMAX YMIN YMAX]) sets scaling for the x-
and y-axes
on the current plot.
axis([XMIN XMAX YMIN YMAX ZMIN ZMAX]) sets the
scaling for the
x-, y- and z-axes on the current 3-D plot.
axis([XMIN XMAX YMIN YMAX ZMIN ZMAX CMIN
CMAX]) sets the
scaling for the x-, y-, z-axes and color scaling limits on
the current axis
legend legend Display legend.
legend(string1,string2,string3, ...) puts a legend on the current
plot
using the specified strings as labels. legend works on line
graphs,
bar graphs, pie graphs, ribbon plots, etc. You can label any
solid-colored patch or surface object. The fontsize and
fontname for
the legend strings matches the axes fontsize and fontname.
xlabel xlabel X-axis label.
xlabel('text') adds text beside the X-axis on the current axis.
ylabel ylabel Y-axis label.
ylabel('text') adds text beside the Y-axis on the current axis.

14
5- Conclusion:

Dans ce TP, nous avons vu quelques programmes de bases nous permettant de


calculer les coefficients des séries de Fourier ainsi que les transformée de Fourier de
quelques signaux sous Matlab/Octave. Ce TP vous servira de base si vous voulez
approfondir vos connaissances et faire d’autres tests sur d’autres signaux.

15

Vous aimerez peut-être aussi