diff --git a/signal/matlab/Matlab rapport/Lasers.m b/signal/matlab/Matlab rapport/Lasers.m new file mode 100644 index 0000000..fbca359 --- /dev/null +++ b/signal/matlab/Matlab rapport/Lasers.m @@ -0,0 +1,49 @@ +close all; +Flasers = [85.005E3,90E3,95E3,100E3,115E3,120E3]; +Fsin = Flasers; +deltaF = 5E3; +T = 1/deltaF; +Fe = 320E3;%kHz +Te = 1/Fe; +M= Fe*T; +Tsim = T-Te; +frequence = deltaF*(0:1:M-1); + + +Res=sim('SimuliDFT'); + + + +figure +plot(Res.temps,Res.Sinus_Continu); +hold on; +plot(Res.temps_Echanti,Res.Sinus_Echanti, 'o'); +sig= Res.Sinus_Echanti; +%sig(1:20,4)=0; +echantFft = fft(sig,M); + + +figure +stem(frequence,abs(echantFft)/M); + + +%carreeee----------------------- + +% figure(1) +% plot(Res.temps,Res.Carre_Continu1); +% hold on; +% plot(Res.temps,Res.Sinus_Carre_Continu); +% hold on; +% plot(Res.temps_Echanti,Res.Sinus_Carre_Echanti, 'o'); +% echantFft_Carre = fft(Res.Sinus_Carre_Echanti,M); +% +% +% +% figure(2) +% stem(frequence,abs(echantFft_Carre)/M); +% +% Fp = tf(1,[1.7483*10^(-23), 7.6663*10^(-18), 1.162*10^(-11), 3.0332*10^(-6),1]); +% figure(3) +% bode(Fp); + + diff --git a/signal/matlab/Matlab rapport/ScriptDFT.m b/signal/matlab/Matlab rapport/ScriptDFT.m new file mode 100644 index 0000000..dde5aef --- /dev/null +++ b/signal/matlab/Matlab rapport/ScriptDFT.m @@ -0,0 +1,30 @@ +close all; +clear all; +Fsin = 14; % pour une fréquence de 4Hz +T = (1/Fsin);%0.25 +M=32; +Te = T/M; +Tsim = T-Te; + + +Res=sim('SimuliDFT'); + +%Res.Sinus_Continu=Res.Sinus_Continu/100 + +X1=linspace(0,Tsim,M); +figure +plot(Res.temps,Res.Sinus_Continu); +hold on; % permet de superposer la courbe à suivre +plot(X1,Res.Sinus_Echanti, 'o'); + +echantFft = fft(Res.Sinus_Echanti,M); + +X2=linspace(0,M-1,M); + +%figure +%plot(X2,abs(echantFft)/M,'o'); + +X3=X2/T; + +figure +stem(X3,abs(echantFft)/M); \ No newline at end of file diff --git a/signal/matlab/Matlab rapport/SimuliDFT.slx b/signal/matlab/Matlab rapport/SimuliDFT.slx new file mode 100644 index 0000000..b1ccc9e Binary files /dev/null and b/signal/matlab/Matlab rapport/SimuliDFT.slx differ diff --git a/signal/matlab/Matlab rapport/valeurs.m b/signal/matlab/Matlab rapport/valeurs.m new file mode 100644 index 0000000..e3505f4 --- /dev/null +++ b/signal/matlab/Matlab rapport/valeurs.m @@ -0,0 +1,21 @@ +coef11 = 8.976e-12; +coef12 = 2.783e-6; +coef21 = 1.948e-12; +coef22 = 2.502e-7; + +om1 = sqrt(1/coef11); +f1 = om1/(2*pi); +m1 = coef12*om1/2; + +om2 = sqrt(1/coef21); +f2 = om2/(2*pi); +m2 = coef22*om2/2; + +L1 = 220e-6; +L2 = 1e-3; + +C1 = 1/(om1^2*L1); +C2 = 1/(om2^2*L2); + +R1 = 2*m1/(om1*C1); +R2 = 2*m2/(om2*C2); \ No newline at end of file