Beruflich Dokumente
Kultur Dokumente
%%%%%%%%%%%%
%%
%%%%%%%%%%%%%%%%%%-Programme sur Matlab %%%%%%%%%%%%%%%%%%%%%%
clear all;
clc ;close all;
m = 63 ; % l'indice de modulation
r = 0.9; % Coefficient de r?glage
s = [0 0 0]';
sa = s(1);
sb = s(2);
sc = s(3);
vn = (E/3)*[2 -1 -1 ; -1 2 -1 ; -1 -1 2]*s;
van = vn(1);
vbn = vn(2);
vcn = vn(3);
tetas = ws*t;
ks = 2/3*[cos(tetas) cos(tetas-((2*pi)/3)) cos(tetas+((2*pi)/3));
sin(tetas) sin(tetas-((2*pi)/3)) sin(tetas+((2*pi)/3));
1/2 1/2 1/2];
vdq0s = ks*vn';
vds = vdq0s(1);
vqs = vdq0s(2);
v0s = vdq0s(3);
%%%%%%%%%%%%%%%%%%%%%%%% initialisation de la MAS 3 %%%%%%%%%%%%%%%%%%%%%%
%%
x = [0 0 0 0 0]';
wr = ws-x5;
k = 0;
X = [ ];
Ce = [ ];
N = [ ];
Varef = [ ];
Vbref = [ ];
Vcref = [ ];
N1 =500;
teta=0
for k = 0:1:N1
varef= r*(E/2)*cos(k*2*Tm*pi*fs );
vbref= r*(E/2)*cos(k*2*Tm*pi*fs -(2*pi)/3);
vcref= r*(E/2)*cos(k*2*Tm*pi*fs-(4*pi)/3);
Vabs = concordia*vref ;
vas = Vabs(1) ;
vbs = Vabs(2) ;
x = vas/vabs;
y = vbs/vabs;
beta = acos(x) ;
end
%%%%%%%%%%%%%%%%%%%%%%%%% boucle de temps %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for t = k*Tm+h:h:(1+k)*Tm
home % pour afficher les pts de fonctionnement a chaque instant %
t,
wr = ws - x5;
df=[(-1/(sigma*Ls))*(Rs+Rr*Lm^2/Lr^2)*x1+ws*x2+(1/
(sigma*Ls))*((Rr*Lm)/Lr^2)*x3+(1/(sigma*Ls))*(Lm/Lr)*x5*x4+(1/(sigma*Ls))*vds;
-ws*x1-(1/(sigma*Ls))*(Rs+((Rr*Lm^2)/Lr^2))*x2-(1/(sigma*Ls))*(Lm/Lr)*x5*x3+(1/
(sigma*Ls))*((Rr*Lm)/Lr^2)*x4+(1/(sigma*Ls))*vqs;
Rr*(Lm/Lr)*x1-(Rr/Lr)*x3+wr*x4;
Rr*(Lm/Lr)*x2-wr*x3-(Rr/Lr)*x4;
(p/J)*(ce-cr-fv*x5/p)];
x = [x1 x2 x3 x4 x5]';
x = x + h*df;
x1 = x(1);
x2 = x(2);
x3 = x(3);
x4 = x(4);
x5 = x(5);
ce = (3/2)* p*(Lm/Lr)*(x3*x2-x4*x1);
n = x5/p;
T = [T t];
X = [X x];
Ce = [Ce ce];
N = [N n];
t1 = sqrt(3)*r*(Tm/2)*sin(pi/3-teta) ;
t2 = sqrt(3)*r*(Tm/2)*sin(teta);
t0 = Tm-(t1+t2);
secteur = 1;
if t < (k*Tm + t0/2);
s = s0 ;
elseif t < (k*Tm + t0/2 + t1/2);
s = s1;
elseif t < (k*Tm + t0/2 + t1/2 + t2/2);
s = s2;
elseif t < (k*Tm + t0/2 + t1/2 + t2/2 + t0/2);
s = s7;
elseif t < (k*Tm + t0/2 + t1/2 + (2*t2)/2 + t0/2 );
s = s2;
elseif t < (k*Tm + t0/2 + (2*t1)/2 + (2*t2)/2 + t0/2);
s = s1;
else
end
% end
end
vn = (E/3)*[2 -1 -1 ; -1 2 -1 ; -1 -1 2]*s;
van = vn(1);
vbn = vn(2);
vcn = vn(3);
Vn=[van vbn vcn ]';
tetas = ws*t;
ks = 2/3*[cos(tetas) cos(tetas-((2*pi)/3)) cos(tetas+((2*pi)/3));
sin(tetas) sin(tetas-((2*pi)/3)) sin(tetas+((2*pi)/3));
1/2 1/2 1/2];
vdq0s = ks*Vn;
vds = vdq0s(1);
vqs = vdq0s(2);
v0s = vdq0s(3);
Vn = [Vn vn];
figure(1)
plot(t,SECTEUR ,'b')
title('evalution des secteurs');
figure(2)
plot(T,TETA,'r')
title('La variation de longle TETA en fonction temps');
%
%
figure(3)
subplot(311)
plot(T,Van)
title('La Tension de sortie Van');
subplot(312)
plot(T,Vbn)
title('La Tension de sortie Vbn');
subplot(313)
plot(T,Vcn)
title('La Tension de sortie Vcn');
figure(4)
% subplot(1,2,1)
plot(T,Ce)
title(' le graphe du couple')
xlabel('temps')
ylabel('amplitude')
legend('Ce')
grid
figure(22)
% subplot(1,2,2)
plot(T,N,'r')
title(' le graphe du N')
xlabel('temps')
ylabel('amplitude')
legend('N')
grid
subplot(312)
plot(T,sb)
title('Le cas de l interrupteur Sb')
subplot(313)
plot(T,sc)
title('Le cas de l interrupteur Sc')