tp4 signaux.docx

21
UNIVERSITE HASSAN II MOHAMMEDIA CASABLANCA Faculté des Sciences et Techniques Mohammedia Réalisé par : BOULKROUCH Hamza LOUADDI Othmane TP n° 2 SIMULATION DES FONCTIONS DE TRANSFERT DANS LE DOMAINE

Upload: hamzaboulkrouch

Post on 15-Feb-2016

62 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TP4 signaux.docx

UNIVERSITE HASSAN II MOHAMMEDIA CASABLANCA

Faculté des Sciences et Techniques Mohammedia

Réalisé par :

BOULKROUCH Hamza LOUADDI Othmane

Encadré par :

Pr H.LEBBAR

TP n° 2

SIMULATION DES FONCTIONS DE TRANSFERT DANS LE DOMAINE

FREQUENTIEL « AVEC MATLAB »

Page 2: TP4 signaux.docx

I. THEORIQUE: Soit le signal analogique : x(t)=sin(2πfot+ ϕ). On se propose d’échantillonner x(t) à la fréquence d’échantillonnage Fe pour obtenir le signal à temps discret suivant :

X(n)=x(t)=sin((2π fo*n/Fe)+ ϕ).1- La fréquence d’échantillonnage Fe qui vérifie le théorème

de Shannon est : Fe=2fo.2- Théorème de Shannon :Le théorème de Shannon sert à reconstruire le signal échantillonné suivant la condition : Fe > 2*fo3- Le phénomène de recouvrement :

Si le spectre F(f) du signal analogique f(t) n'est pas nul au delà de fe, la superposition peut conduire à des empiétements des translatées. Ce phénomène est appelé recouvrement (ou repliement) spectral (en anglais : aliasing).

II. MANIPULATION : Exercice 1   :

On considère le signal sinusoïdal x(t)=sin(2π5 t) généré le code suivant :

t=[0 :0.01 :10]x(t)=sin(2¿ pi∗5∗t)

1-la fréquence maximale du signal analogique :

Te = 0.01 ==> Tmax = 0.01*10 = 0.1 alors fmax = 10.1=

10hz2-la fréquence d’échantillonnage : Fe=100hz

Page 3: TP4 signaux.docx

3-le théorème d échantillonnage :Il faut que : Fe>2fmax ==> Fe>20 et on a Fe=100hzAlors on a bien respecté le théorème d’échantillonnage donc on peut reconstruire le signal échantillonné 4-

- Pour fo=30hzFe>2fo <==> Fe>2*30 Le théorème d’échantillonnage est toujours respecté, on peut faire la reconstruction du signal échantillonné

- Pour fo=80hz On a fo*2=160 alors Fe=100<160Pour f0 = 80Hz, Le théorème d’échantillonnage n’est pas respecté  donc on ne peut pas reconstruire le signal échantillonné.

Exercice 2   : 1- Programme et affichage d’une seule période de signal:

f0=10; Fe=100;Te=1/Fe ; N=11;V = (0:Te:N-1)*Te;S=sin (2*pi*f0*V);plot(V,S);xlabel('Temps (sec)');ylabel('Amplitude ');title('signal sinusoïdal');

Page 4: TP4 signaux.docx

grid

2- programme et affichage du signal généré :f0=10;Fe=100;Te=1/Fe ; N=100;V =(0:Te:N-1)*Te;S=sin (2*pi*f0*V);plot(V,S);xlabel('Temps (sec)');ylabel('Amplitude ');

Page 5: TP4 signaux.docx

title('signal sinusoidal') ; grid

Exercice 3   : 1- f0=1000;Te1=1/20000 ; Te2=1/5000;Te3=1/1500 ;V1 = 0 : Te1 : 100;V2= 0 : Te2 : 100;V3= 0 : Te3 : 100;x1= sin (2*pi*f0*V1);x2= sin (2*pi*f0*V2);x3= sin (2*pi*f0*V3);

Page 6: TP4 signaux.docx

2- plot(v1,x1,'r') hold onplot(v2,x2,'b') plot(v3,x3,'m') hold offaxis([0 0.003 -1 1]);xlabel('temps (sec)') ;ylabel('amplitude') ;title('signal echantillonné') ;grid

Page 7: TP4 signaux.docx

3- on constate que les signaux échantillonnés V1 et V2, qui ont des fréquences f1 = 20000 et f2 = 5000, ont respecté le théorème de Shannon Fe>2*f0. Concernant le signal V3, le théorème n’est pas respecté car on Fe <2*f0 .

Exercice 4: 1-fe=8000;f=linspace(100,475,4)V=0:1/fe:0.01;for j=1:4hold onx=sin(2*pi*f(j)*V);2-gridplot(V,x,'r')hold offendgridxlabel('temps (sec)') ;ylabel('amplitude') ;title('quatre signaux sinusoidaux') ;

Page 8: TP4 signaux.docx

3- les fréquences obtenues sur les courbes tracées correspondants aux valeurs de fo.Pour: T0=0.01 ==> fo=100Pour: To=0.002 ==> fo=475Pour: To=0.003 ==> fo=325Pour: To=0.004 ==> fo=2254- fe=8000;f=[7525 76500 7875 7900];for j=1:4hold onx=sin(2*pi*f(j)*V); gridplot(V,x,'r'); hold off end

Page 9: TP4 signaux.docx

5- fe=8000;f=[32100 32225 32350 32475];for j=1:4hold onx=sin(2*pi*f(j)*V);gridplot(V,x,'r')hold offend

Page 10: TP4 signaux.docx

Exercice 5 : 1-

fe=1000;V=0:1/fe:0.8x=sin(2*pi*100*V);\hold onplot(V,x);hold off2-Ne=800

Page 11: TP4 signaux.docx

3-fe=1000;V=0:1/fe:0.8;x=sin(2*pi*100*V);subplot(3,1,1); plot(Vx);y=fft(x) ; Y=abs(y);subplot(3,1,2); plot(V,Y); Z=Y^2; clear subplot (3,1,3);plot2(V,Z);

5-fe=1000;vt=0.8 ;ne=vt*fe;n=0:ne-1;freq=n*(fe/ne);

Page 12: TP4 signaux.docx

x=sin(2*pi*100*vt);y=fft(x);Y=abs(y);subplot(3,1,2);plot(freq,Y)

Exercice 6   : 1-fe=1000;fr=950;t=0:1/fe:0.1x=sin(2*pi*fr*t);plot(t,x)grid

Page 13: TP4 signaux.docx

La période t= 1Fe=0.001 s

2-3- a-fe=2000;fr=950;t=0:1/fe:0.01;x=sin(2*pi*fr*t);plot(t,x) grid

Page 14: TP4 signaux.docx

3- b-fe=20000;fr=950;t=0:1/fe:0.01;x=sin(2*pi*fr*t);plot(t,x) grid

Page 15: TP4 signaux.docx

Exercice 7   : 1-le signal dent de scie :f = 10000; t = 0:1/f:1.5; V1 =2*sawtooth(2*pi*180*t);plot(t,x1);xlabel('Temps t (en s)')ylabel('Amplitude') grid ;

2- le signal carré :f = 10000; t = 0:1/f:1.5; V2=2*square (2*pi*180*t); plot(t,V2);xlabel('Temps t (en s)')ylabel('Amplitude') grid

Page 16: TP4 signaux.docx

3-le graphe des deux signaux:f = 10000; t = 0:1/f:0.2; V1 =2*sawtooth(2*pi*180*t);V2 =2*square (2*pi*180*t); Hold onplot(t,V1,'r')plot(t,V2,’b’)hold offtitle('signaux générés sur une durée de 0.2 sec');xlabel('temps (sec)'); ylabel('amplitude');

Page 17: TP4 signaux.docx

4-le spectre de module des deux signaux :f = 10000; t = 0:1/f:0.2; V1 =2*sawtooth(2*pi*180*t); V2 =2*square (2*pi*180*t); H1=fft(V1); H2=fft(V2);plot(t,H1,'r',t,H2) title('spectre de deux signaux');