0% found this document useful (0 votes)
2 views3 pages

CodeMLIMatlab PDF

The document contains MATLAB code for simulating a three-phase modulation system using sinusoidal and sawtooth waveforms. It calculates the differences between the modulating signals and the carrier signal to determine switching states for each phase. Finally, it computes and plots the output voltage for each phase based on the switching states.

Uploaded by

LoÏC MINTO'O
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

CodeMLIMatlab PDF

The document contains MATLAB code for simulating a three-phase modulation system using sinusoidal and sawtooth waveforms. It calculates the differences between the modulating signals and the carrier signal to determine switching states for each phase. Finally, it computes and plots the output voltage for each phase based on the switching states.

Uploaded by

LoÏC MINTO'O
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

%constantes

Vdc=320000;

fmod=50;
fport=500;

ts=0.04;
te=0.000001;
t=0:te:ts;
i=1:(ts/te)+1;

%modulantes
modpha=sin(2*pi*fmod*t(i))/2;
modphb=sin(2*pi*fmod*t(i)-2*pi/3)/2;
modphc=sin(2*pi*fmod*t(i)+2*pi/3)/2;

%Porteuse
port=sawtooth(2*pi*fport*t(i),1/2);

figure
plot(t,modpha,t,modphb,t,modphc,t,port);
xlabel('temps (s)');
ylabel('Amplitude');
grid on

%commutations
%differences
difpha=modpha-port;
difphb=modphb-port;
difphc=modphc-port;

%iterations
for i=1:(ts/te)+1
if difpha(i)>0
Sa(i)=1;
else
Sa(i)=0;
end
Sa(1,i)=Sa(i);
end

for i=1:(ts/te)+1
if difphb(i)>0
Sb(i)=1;
else
Sb(i)=0;
end
Sb(1,i)=Sb(i);
end

for i=1:(ts/te)+1
if difphc(i)>0
Sc(i)=1;
else
Sc(i)=0;
end
Sc(1,i)=Sc(i);
end

figure
plot(t,Sa)
xlabel('temps (s)');
ylabel('Amplitude (V)');
grid

figure
plot(t,Sb)
xlabel('temps (s)');
ylabel('Amplitude (V)');
grid

figure
plot(t,Sc)
xlabel('temps (s)');
ylabel('Amplitude (V)');
grid

%Tension de sortie
V=(Vdc/3)*[2 -1 -1; -1 2 -1;-1 -1 2]*[Sa; Sb; Sc];

figure
plot(t,V(1,:))
xlabel('temps (s)');
ylabel('Amplitude (V)');
grid

figure
plot(t,V(2,:))
xlabel('temps (s)');
ylabel('Amplitude (V)');
grid
figure
plot(t,V(3,:))
xlabel('temps (s)');
ylabel('Amplitude (V)');
grid

You might also like