Académique Documents
Professionnel Documents
Culture Documents
TP traitement de signal 03
1. Préparation :
Manipulation 1 :
Soit un signal carré x(t) d’amplitude 1 et de période T0 (Figure 1).
Détermination de Bn :
T0
2 2π
Bn = ∫ x (t )sin nω0 t dt avec : T 0 =
T0 0 ω0
T0 T0
[ ]
2 2 0
4 4 4 cos nω0 t 2
Bn = ∫ x (t )sin nω 0 t dt = ∫ sin nω 0 t dt = T0
= [ 1−cos nπ ]
T0 0 T0 0 T 0 nω 0 nπ
2
2
= [ 1−(−1 )n ]
nπ
On vérifie bien que pour n pair , Bn = 0, donc il ne reste que les termes impairs.
4
Bn = n impair
nπ
4 1 1
x (t )= (sin ωt + sin 3 ωt + sin 5 ωt +. .. )
D’où : π 3 5 (1)
Manipulation 2 :
Soit le signal rampe suivant (Figure 2) de période T0 = 1 s et d’amplitude 5 :
Module : TAS71 TP 03
Détermination de Bn :
T0
2 2π
Bn = ∫ x (t )sin nω0 t dt avec : T 0 =
T0 0 ω0
T0 T0 T0
2 2 2
4 4 40
Bn = ∫ x (t )sin nω 0 t dt = ∫ 10 t sin nω 0 t dt = ∫ t sin nω0 t dt
T0 0 T0 0 T0 0
[[ ]
T0
]
0 2
40 t cos nω0 t cos nω0 t
Bn = T0
+∫ dt
T 0 nω 0 0 nω 0
2
[ ]
T0
2
20
t cos nω0 t ]T + ∫ cosnω 0 tdt
0
=
nπ [ 0
0
2
[ [ ]]
T0
20 T 0 sin nω 0 t 2
= − cos nπ +
nπ 2 nω 0 0
10 T 0
= (−1 )n+1
nπ
10
Bn = (−1 )n+1
Pour T0 = 1 s : nπ
10 1 1 1 1 1
x (t )= (sin ωt− sin 2 ωt+ sin 3 ωt− sin 4 ωt+ sin5 ωt − sin 6 ωt +. .. )
d’où : π 2 3 4 5 6 (2)
Manipulation 3 :
On considère maintenant le signal en forme de sinusoïde redressée de période
T0 = 1 s et d’amplitude 10 (Figure 3) :
T0 T0
[ ]
0
1 1 10 cos πt 10
A0 = ∫ s (t )dt= ∫ 10 sin πt dt= = (1−cos πT 0 )
T0 0 T0 0 T0 π T0 T0π
20
A0 =
Pour T0 = 1 s : π
T0 T0 T0
2 2 2
4 4 40 1
An = ∫ x(t )cos nω0 t dt = ∫ 10 sin ω0 t cos nω0 t dt = ∫ [ sin((n+1)ω0 t )−sin((n−1)ω0 t )] dt
T0 0 T0 0 T0 0 2
[ ] [ ]] [ ]
0 T0
20 cos((n+1 )ω0 t ) cos((n−1)ω0 t ) 10 1−cos((n+1) π ) cos((n−1 )π )−1
= T0
+ 2
= +
T 0 ( n+1)ω0 (n−1)ω 0 0 π n+1 n−1
2
= [
10 1−(−1 )n+1 1−(−1)n−1
π n+1
−
n−1 ]
40
An = n pair
π (1−n 2 )
20 40 1 1 1
x (t )= − ( cos2 ωt + cos4 ωt+ cos 6 ωt +.. .)
d’où : π π 3 3×5 5×7 (3)
Manipulation 4 :
Soit le signal carré de rapport cyclique 0.5, d’amplitude 1 et de période T0 = 4 s.
(Figure 4).
Module : TAS71 TP 03
T0
1 1 T0 1
A0 = ∫ x (t )dt= . =
T0 0 T0 2 2
T0
[ ]
2 T
2 sin nω 0 t
0
2 1
An = ∫ x (t )cos nω0 t dt= 2
sin nπ =0
T0 0 T 0 nω 0 0 nπ
T0 T0
[ ]
2 2 0
2 2 2 cos nω0 t 1
Bn = ∫ x (t )sin nω 0 t dt= ∫ sin nω 0 t dt= T0
= [ 1−(−1)n ]
T0 0 T0 0 T 0 nω 0 nπ
2
1 2 1 1 1
x (t )= + (sin ωt+ sin3 ωt+ sin5 ωt + sin7 ωt . .. )
D’où : 2 π 3 5 7 (4)
2. Exécution :
Manipulation 1 :
Tracé du signal :
Script :
t=-1:0.01:3;
s=square(2*pi*t);
figure(1)
plot(t,s)
grid
axis ([0 3 -2 3]);
xlabel('temps (s)');
ylabel('amplitude');
title('signal carre');
Module : TAS71 TP 03
Résultat :
A0=0;
T0=1;
x=A0;
for i=1:11
A(i)=0;
B(i)=(2/i/pi)*(1-(-1)^i);
end
b=[A0,B]
j=0:11;
figure(2)
stem(j,b)
xlabel('n');
ylabel('xn');
title('Spectre fréquentiel');
Résultats :
Coefficients Bn
b=
Module : TAS71 TP 03
0 0.1157
clear all
t=-1:0.01:3;
s=square(2*pi*t);
plot(t,s)
grid
axis ([0 2 -4 4]);
hold on
x1=(4/pi)*sin(2*pi*t)
x2=x1+(4/(3*pi))*sin(2*pi*3*t)
x3=x2+(4/(5*pi))*sin(2*pi*5*t)
x4=x3+(4/(7*pi))*sin(2*pi*7*t)
x5=x4+(4/(9*pi))*sin(2*pi*9*t)
x6=x5+(4/(11*pi))*sin(2*pi*11*t)
figure(5)
lot(t,x1)
grid
hold on
plot(t,x2,'r')
plot(t,x3,'g')
plot(t,x4,'b')
plot(t,x5,'m')
plot(t,x6,'c')
axis ([0 2 -4 4]);
Module : TAS71 TP 03
Résultat:
A0=0;
T0=1;
x=A0;
for i=1:11
A(i)=0;
B(i)=(2/i/pi)*(1-(-1)^i);
xi=A(i)*cos(i*2*pi*t/T0)+B(i)*sin(i*2*pi*t/T0);
figure(3)
plot(t,xi,'g');
hold on;
x=x+A(i)*cos(i*2*pi*t/T0)+B(i)*sin(i*2*pi*t/T0);
end
hold on
plot(t,s,'r')
hold on
plot(t,x,'m')
grid on
xlabel('t(s)');
ylabel('Amplitude');
title('Signaux origine et reconstitue');
Résultat:
Module : TAS71 TP 03
Résultats:
Manipulation 2 :
Tracé du signal :
Script :
t=0:0.01:2;
s=5*sawtooth(2*pi*(t-0.5));
figure(1)
plot(t,s)
grid
xlabel('temps (s)');
ylabel('amplitude');
title('signal dent de scie');
Résultats :
A0=0;
T0=1;
x=A0;
for i=1:6
A(i)=0;
B(i)=(10/i/pi)*((-1)^(i+1));
end
b=[A0,B]
j=0:6;
figure(2)
stem(j,b)
grid on
xlabel('n');
ylabel('xn');
title('Spectre fréquentiel');
Résultats :
Coefficients Bn
b=
clear all
t=-1:0.01:3;
s=5*sawtooth(2*pi*(t-0.5));
figure(5)
plot(t,s)
grid
axis ([0 2 -8 8]);
hold on
x1=(10/pi)*sin(2*pi*t)
x2=x1+(-5/(pi))*sin(4*pi*t)
x3=x2+(10/(3*pi))*sin(6*pi*t)
x4=x3+(-5/(2*pi))*sin(8*pi*t)
x5=x4+(2/(pi))*sin(10*pi*t)
x6=x5+(-5/(3*pi))*sin(12*pi*t)
plot(t,x1)
grid
hold on
plot(t,x2,'r')
plot(t,x3,'g')
plot(t,x4,'b')
plot(t,x5,'m')
plot(t,x6,'c')
Résultats :
Script :
for i=1:6
A(i)=0;
B(i)=(10/i/pi)*((-1)^(i+1));
xi=A(i)*cos(i*2*pi*t/T0)+B(i)*sin(i*2*pi*t/T0);
figure(3)
plot(t,xi,'g');
grid on
hold on;
x=x+A(i)*cos(i*2*pi*t/T0)+B(i)*sin(i*2*pi*t/T0);
end
hold on
plot(t,s,'r')
grid on
hold on
plot(t,x,'m')
grid on
xlabel('t(s)');
ylabel('Amplitude');
Résultats :
Résultats:
Manipulation 3 :
Tracé du signal :
Script :
Module : TAS71 TP 03
t=0:0.01:2;
s=abs(10*sin(2*pi*0.5*t));
figure(1)
plot(t,s)
grid
xlabel('temps (s)');
ylabel('amplitude');
title('signal sinus redressé');
Résultats:
A0=20/pi;
A(1)=0
T0=2;
x=A0;
for i=2:12
B(i)=0;
A(i)=(10/pi)*((1-(-1)^(i+1))/(i+1)-((1-(-1)^(i-1))/(i-1)))
end
a=[A0,A]
j=0:12;
figure(2)
stem(j,a)
grid on
xlabel('n');
ylabel('xn');
title('Spectre fréquentiel');
Résultats :
Module : TAS71 TP 03
Coefficients An
0 -4.2441 0 -0.8488 0 -0.3638 0 -0.2021 0 -0.1286
0 -0.0890
Script :
clear all
t=-1:0.01:3;
s=abs(10*sin(2*pi*0.5*t));
figure(5)
plot(t,s)
grid
axis ([0 2 -20 20]);
grid
hold on
x0=20/pi
x1=x0+(-40/(3*pi))*cos(2*pi*t)
x2=x1+(-40/(15*pi))*cos(4*pi*t)
x3=x2+(-40/(35*pi))*cos(6*pi*t)
x4=x3+(-40/(63*pi))*cos(8*pi*t)
x5=x4+(-40/(99*pi))*cos(10*pi*t)
x6=x5+(-40/(143*pi))*cos(12*pi*t)
plot(t,x1)
grid
hold on
plot(t,x2,'r')
plot(t,x3,'g')
plot(t,x4,'b')
plot(t,x5,'m')
plot(t,x6,'c')
Résultats :
Module : TAS71 TP 03
A0=20/pi;
A(1)=0
T0=2;
x=A0;
for i=2:12
B(i)=0;
A(i)=(10/pi)*((1-(-1)^(i+1))/(i+1)-((1-(-1)^(i-1))/(i-1)))
xi=A(i)*cos(i*2*pi*t/T0)+B(i)*sin(i*2*pi*t/T0);
x=x+A(i)*cos(i*2*pi*t/T0)+B(i)*sin(i*2*pi*t/T0);
figure(3)
plot(t,xi,'g');
grid on
hold on;
x=x+A(i)*cos(i*2*pi*t/T0)+B(i)*sin(i*2*pi*t/T0);
end
figure(3)
plot(t,x,'b')
hold on
plot(t,s,'r')
xlabel('t(s)');
ylabel('Amplitude');
title('Signaux origine et reconstitue');
Résultats:
Module : TAS71 TP 03
Résultats:
Nous pouvons faire les mêmes remarques que pour les manipulations précédentes, à
la différence prés que le signal est reconstitué plus rapidement que les autres signaux.
Manipulation 4 :
Tracé du signal :
Script :
t=0:0.01:16;
s=0.5*square(2*pi*0.25*t)+0.5
figure(1)
plot(t,s)
grid
axis ([0 5 0 2]);
xlabel('temps (s)');
ylabel('amplitude');
title('signal carré');
Résultats:
Script :
A0=1/2;
T0=4;
x=A0;
for i=1:11
A(i)=0;
B(i)=(1/i/pi)*(1-(-1)^i);
end
b=[A0,B]
j=0:11;
figure(2)
stem(j,b)
grid on
xlabel('n');
ylabel('xn');
title('Spectre fréquentiel');
Résultats:
Coefficients Bn
b=
0 0.0579
clear all
Module : TAS71 TP 03
t=-1:0.01:12;
s=0.5*square(2*pi*0.25*t)+0.5
figure(5)
plot(t,s)
grid
axis ([0 5 -2 2]);
grid
hold on
x0=1/2
x1=x0+(2/pi)*sin(2*pi*0.25*t)
x2=x1+(2/(3*pi))*sin(6*pi*0.25*t)
x3=x2+(2/(5*pi))*sin(10*pi*0.25*t)
x4=x3+(2/(7*pi))*sin(14*pi*0.25*t)
x5=x4+(2/(9*pi))*sin(18*pi*0.25*t)
x6=x5+(2/(11*pi))*sin(22*pi*0.25*t)
plot(t,x1)
grid
hold on
plot(t,x2,'r')
plot(t,x3,'g')
plot(t,x4,'b')
plot(t,x5,'m')
plot(t,x6,'c')
Résultats:
A0=1/2;
T0=4;
x=A0;
for i=1:11
A(i)=0;
B(i)=(1/i/pi)*(1-(-1)^i);
xi=A(i)*cos(i*2*pi*t/T0)+B(i)*sin(i*2*pi*t/T0);
x=x+A(i)*cos(i*2*pi*t/T0)+B(i)*sin(i*2*pi*t/T0);
figure(3)
plot(t,xi,'g');
hold on
grid on
x=x+A(i)*cos(i*2*pi*t/T0)+B(i)*sin(i*2*pi*t/T0);
end
plot(t,x,'b')
grid on
hold on
plot(t,s,'r')
grid on
xlabel('t(s)');
ylabel('Amplitude');
title('Signaux origine et reconstitue');
Résultats:
Résultats: