- #1
Fatima Hasan
- 319
- 14
- Homework Statement
- Attached below.
- Relevant Equations
- -
Here's my attempt:
I got a wrong result, I attached it below.
Could someone let me know where is my mistake please?
Matlab:
clc;
clear all;
Ra=1.8;
La=150*10^(-3);
Ls=150*10^(-3);
Rs=1.8;
Rt=Rs+Ra;
ws=100*pi;
c=1.25;
vrms=240;
vm=240*sqrt(2);
f=50;
T=1:0.5:50;
for a=0:pi/9:pi/3
vt=(2*vm*cos(a))/pi
wc=((ws*(Ls+La)/tan(a))-Rs-Ra)/c;
x=[wc; a+pi];
Tc=c*(2*vm*cos(a)/(pi*(c*wc+Ra+Rs)))^2;
for i=1:length(T)
if T(i)>Tc % Continuous Mode
w(i)=vt/(c*sqrt(T(i)))-Rt/c;
else %Discontinuous Mode
for j=1:100
g1=sin(x(1)-x(2))-sin(a-x(2))*exp(-(x(1)-a)/(tan(x(2))));
%Ia=sqrt(T)=sqrt(vt/(c*sqrt(T(i)))-Rt/c);
g2=vm*(cos(a)-cos(x(1)))*tan(x(2))-pi*ws*(Ls+La)*sqrt(vt/(c*sqrt(T(i)))-Rt/c);
G=[g1; g2];
J11=cos(x(1)-x(2))+sin((a-x(2))/(tan(x(2))))*exp(-(x(1)-a)/(tan(x(2))))
J12=-cos(x(1)-x(2))+cos(a-x(2))*exp(-(x(1)-a)/tan(x(2)))-sin(a-x(2))*exp(-(x(1)-a)/tan(x(2)))*(x(1)-a)/(sin(x(2))^2)
J21=vm*sin(x(1))*tan(x(2))
J22=vm*(cos(a)-cos(x(1)))/(cos(x(2)))^2
J=[J11 J12; J21 J22];
x=x-inv(J)*G
end
w(i)=x(1);
end
end
n=w*60/(2*pi);
plot(T,n)
end
legend('a=0 deg','a=20 deg','a=40 deg','a=60 deg')
title('Speed-Torque Characteristics')
xlabel('Torque (N.m)')
ylabel('Speed (rpm)')
I got a wrong result, I attached it below.
Could someone let me know where is my mistake please?