0% found this document useful (0 votes)
2K views6 pages

Matlab Codes

The document describes MATLAB code for modeling and simulating different control methods for induction motors. It contains functions for stator voltage control, constant V/F control, and variable rotor resistance control. For each control method, the code calculates torque-speed curves by varying relevant motor parameters over a range of rotor speeds. The curves are then plotted for comparison.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views6 pages

Matlab Codes

The document describes MATLAB code for modeling and simulating different control methods for induction motors. It contains functions for stator voltage control, constant V/F control, and variable rotor resistance control. For each control method, the code calculates torque-speed curves by varying relevant motor parameters over a range of rotor speeds. The curves are then plotted for comparison.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 6

1.

STATOR VOLTAGE CONTROL


function out = InductionvarV()
Vl1=input('Enter the first Supply Voltage (line to line) RMS value:');
Vl2=input('Enter the second Supply Voltage (line to line) RMS value: ');
Vl3=input('Enter the third Supply Voltage (line to line) RMS value: ');
Vl4=input('Enter the fourth Supply Voltage (line to line) RMS value: ');
Vl5=input('Enter the fifth Supply Voltage (line to line) RMS value: ');
P=input('Enter the number of poles:');
Rs=input('Stator Resistance:');
Rr=input('Rotor Resistance:');
Xs=input('Stator Leakage Reactance @ 50 Hz frequency:');
Xr=input('Rotor Leakage Reactance @ 50 Hz frequency:');
Tm=input('Input Mechanical Torque:');
Ls=Xs/(2*pi*50);
Lr=Xr/(2*pi*50);
Wsync1=4*pi*50/P;
Tmf1=zeros(Wsync1*500+1,1);
Tmf2=zeros(Wsync1*500+1,1);
Tmf3=zeros(Wsync1*500+1,1);
Tmf4=zeros(Wsync1*500+1,1);
Tmf5=zeros(Wsync1*500+1,1);
m=1;
for Wrotor1=0:0.002:Wsync1
Tmf1(m)=(3*(((Vl1^2)*Rr/((Wsync1-Wrotor1)/Wsync1))/((Rs+Rr/((Wsync1- Wrotor1)/Wsync1))^2+(2*pi*50*Ls+2*pi*50*Lr)^2))/Wsync1); %sta
rconnected
m=m+1;
end
m=1;
for Wrotor1=0:0.002:Wsync1
Tmf2(m)=(3*(((Vl2^2)*Rr/((Wsync1-Wrotor1)/Wsync1))/((Rs+Rr/((Wsync1-Wrotor1)/Wsync1))^2+(2*pi*50*Ls+2*pi*50*Lr)^2))/Wsync1);
m=m+1;
end
m=1;
for Wrotor1=0:0.002:Wsync1
Tmf3(m)=(3*(((Vl3^2)*Rr/((Wsync1-Wrotor1)/Wsync1))/((Rs+Rr/((Wsync1-Wrotor1)/Wsync1))^2+(2*pi*50*Ls+2*pi*50*Lr)^2))/Wsync1);
m=m+1;
end]

for Wrotor1=0:0.002:Wsync1
Tmf2(m)=(3*(((Vl2^2)*Rr/((Wsync1-Wrotor1)/Wsync1))/((Rs+Rr/((Wsync1Wrotor1)/Wsync1))^2+(2*pi*50*Ls+2*pi*50*Lr)^2))/Wsync1);
m=m+1;
end
m=1;
for Wrotor1=0:0.002:Wsync1
Tmf3(m)=(3*(((Vl3^2)*Rr/((Wsync1-Wrotor1)/Wsync1))/((Rs+Rr/((Wsync1Wrotor1)/Wsync1))^2+(2*pi*50*Ls+2*pi*50*Lr)^2))/Wsync1);
m=m+1;
end]
m=1;
for Wrotor1=0:0.002:Wsync1
Tmf4(m)=(3*(((Vl4^2)*Rr/((Wsync1-Wrotor1)/Wsync1))/((Rs+Rr/((Wsync1Wrotor1)/Wsync1))^2+(2*pi*50*Ls+2*pi*50*Lr)^2))/Wsync1);
m=m+1;
end
m=1;
for Wrotor1=0:0.002:Wsync1
Tmf5(m)=(3*(((Vl5^2)*Rr/((Wsync1-Wrotor1)/Wsync1))/((Rs+Rr/((Wsync1Wrotor1)/Wsync1))^2+(2*pi*50*Ls+2*pi*50*Lr)^2))/Wsync1);
m=m+1;
end
plot(Tmf1);
holdon;
plot(Tmf2);
plot(Tmf3);
plot(Tmf4);
plot(Tmf5);
Plot(Tm);
holdoff;
ylabel('Torque(N-m)');
xlabel('Rotor Speed(Rad/s)');
end

2. CONSTANT V/F CONTROL


function out = inductionconstantVf()
Vl=input('Supply Voltage (line to line) RMS value @ 50 Hz: ');
f2=input('Enter the second frequency: ');
f3=input('Enter the third frequency: ');
f4=input('Enter the fourth frequency: ');
f5=input('Enter the fifth frequency: ');
P=input('Enter the number of poles: ');
Rs=input('Stator Resistance: ');
Rr=input('Rotor Resistance: ');
Xs=input('Stator Leakage Reactance @ 50 Hz frequency: ');
Xr=input('Rotor Leakage Reactance @ 50 Hz frequency: ');
Ls=Xs/(2*pi*50);
Lr=Xr/(2*pi*50);
Vlnf1=Vll/(3^0.5);
Vlnf2=Vlnf1*f2/50;
Vlnf3=Vlnf1*f3/50;
Vlnf4=Vlnf1*f4/50;
Vlnf5=Vlnf1*f5/50;
Wsync1=4*pi*50/P;
Wsync2=4*pi*f2/P;
Wsync3=4*pi*f3/P;
Wsync4=4*pi*f4/P;
Wsync5=4*pi*f5/P;
Tmf2=zeros(Wsync2*500+1,1);
Tmf3=zeros(Wsync3*500+1,1);
Tmf4=zeros(Wsync4*500+1,1);
Tmf5=zeros(Wsync5*500+1,1);
Tmf1=zeros(Wsync1*500+1,1);

m=1;
for Wrotor1=0:0.002:Wsync1
Tmf1(m)=(3*(((Vlnf1^2)*Rr/((Wsync1-Wrotor1)/Wsync1))/((Rs+Rr/((Wsync1-Wrotor1)/Wsync1))^2+(2*pi*50*Ls+2*pi*50*Lr)^2))/Wsync1); %star connected
m=m+1;
end
m=1;
for Wrotor2=0:0.002:Wsync2
Tmf2(m)=(3*(((Vlnf2^2)*Rr/((Wsync2-Wrotor2)/Wsync2))/((Rs+Rr/((Wsync2-Wrotor2)/Wsync2))^2+(2*pi*f2*Ls+2*pi*f2*Lr)^2))/Wsync2);
m=m+1;
end
m=1;
for Wrotor3=0:0.002:Wsync3
Tmf3(m)=(3*(((Vlnf3^2)*Rr/((Wsync3-Wrotor3)/Wsync3))/((Rs+Rr/((Wsync3-Wrotor3)/Wsync3))^2+(2*pi*f3*Ls+2*pi*f3*Lr)^2))/Wsync3);
m=m+1;
end
m=1;
for Wrotor4=0:0.002:Wsync4
Tmf4(m)=(3*(((Vlnf4^2)*Rr/((Wsync4-Wrotor4)/Wsync4))/((Rs+Rr/((Wsync4-Wrotor4)/Wsync4))^2+(2*pi*f4*Ls+2*pi*f4*Lr)^2))/Wsync4);
m=m+1;
end
m=1;
for Wrotor5=0:0.002:Wsync5
Tmf5(m)=(3*(((Vlnf5^2)*Rr/((Wsync5-Wrotor5)/Wsync5))/((Rs+Rr/((Wsync5-Wrotor5)/Wsync5))^2+(2*pi*f5*Ls+2*pi*f5*Lr)^2))/Wsync5);
m=m+1;
end
plot(Tmf1);
holdon;
plot(Tmf2);
plot(Tmf3);
plot(Tmf4);
plot(Tmf5);
holdoff;
ylabel('Torque(N-m)');
xlabel('Rotor Speed(Rad/s)');
end

3. VARIABLE ROTOR RESISTANCE


function out = inductionvarRr()
Vl=input('Enter the Supply Voltage (line to line) RMS value: ');
P=input('Enter the number of poles: ');
Rs=input('Stator Resistance: ');
Rr1=input('Enter the first Rotor Resistance: ');
Rr2=input('Enter the second Rotor Resistance: ');
Rr3=input('Enter the third Rotor Resistance: ');
Rr4=input('Enter the fourth Rotor Resistance: ');
Rr5=input('Enter the fifth Rotor Resistance: ');
Xs=input('Stator Leakage Reactance @ 50 Hz frequecny: ');
Xr=input('Rotor Leakage Reactance @ 50 Hz frequecny: ');
Ls=Xs/(2*pi*50);
Lr=Xr/(2*pi*50);
Wsync1=4*pi*50/P;
Tmf2=zeros(Wsync1*500+1,1);
Tmf3=zeros(Wsync1*500+1,1);
Tmf4=zeros(Wsync1*500+1,1);
Tmf5=zeros(Wsync1*500+1,1);
Tmf1=zeros(Wsync1*500+1,1);
Ls=Xs/(2*pi*50);
Lr=Xr/(2*pi*50);
Wsync1=4*pi*50/P;
Tmf2=zeros(Wsync1*500+1,1);
Tmf3=zeros(Wsync1*500+1,1);
Tmf4=zeros(Wsync1*500+1,1);
Tmf5=zeros(Wsync1*500+1,1);
Tmf1=zeros(Wsync1*500+1,1);

m=1;
for Wrotor1=0:0.002:Wsync1
Tmf1(m)=(3*(((Vl1^2)*Rr1/((Wsync1Wrotor1)/Wsync1))/((Rs+Rr1/((Wsync1Wrotor1)/Wsync1))^2+(2*pi*50*Ls+2*pi*50*Lr)^2))/Wsync1); %star connected
m=m+1;
end
m=1;
for Wrotor1=0:0.002:Wsync1
Tmf2(m)=(3*(((Vl1^2)*Rr2/((Wsync1-Wrotor1)/Wsync1))/((Rs+Rr2/((Wsync1Wrotor1)/Wsync1))^2+(2*pi*50*Ls+2*pi*50*Lr)^2))/Wsync1);
m=m+1;
end
m=1;
for Wrotor1=0:0.002:Wsync1Tmf3(m)=(3*(((Vl1^2)*Rr3/((Wsync1-Wrotor1)/Wsync1))/((Rs+Rr3/((Wsync1Wrotor1)/Wsync1))^2+(2*pi*50*Ls+2*pi*50*Lr)^2))/Wsync1);
m=m+1;
end
m=1;
forWrotor1=0:0.002:Wsync1Tmf4(m)=(3*(((Vl1^2)*Rr4/((Wsync1Wrotor1)/Wsync1))/((Rs+Rr4/((Wsync1Wrotor1)/Wsync1))^2+
(2*pi*50*L+2*pi*50*Lr)^2))/Wsync1);
m=m+1;
end
m=1;
for Wrotor1=0:0.002:Wsync1
Tmf5(m)=(3*(((Vl1^2)*Rr5/((Wsync1Wrotor1)/Wsync1))/((Rs+Rr5/((Wsync1Wrotor1)/Wsync1))^2+(2*pi*50*Ls+2*pi*50*Lr)^2))/Wsync1);
m=m+1;
end
plot(Tmf1);
holdon;
plot(Tmf2);
plot(Tmf3);
plot(Tmf4);
plot(Tmf5);
holdoff;
ylabel('Torque(N-m)');
xlabel('Rotor Speed(Rad/s)');
end

You might also like