毕业论文求帮助!!!!!! 为什么反接制动总是有错误!!!!!谁能告诉我这个错误是什么意思,怎么改???万分感谢
function dx=ABC4(t,x)P=2;
Xm=33.8015;
X1=0.5114;
X2=1.3374;
R1=0.2543;
R2=0.2004;
U0=380;
f=50;
w0=2*pi*f;
LS=1/w0*(X1+2/3*Xm);
LR=1/w0*(X2+2/3*Xm);
MSR=1/w0*2/3*Xm;
MS=1/w0*(1/3*Xm);
MR=MS;
RS=R1;
RR=R2;
U=380;
J=0.02;
TL=0;
if t>0.4 TL=30;end
w=P*x(7)*2*pi/60;
w0=2*pi*f;
ST0=x(8);
ST2=ST0+2*pi/3;
ST1=ST0-2*pi/3;
A1=[LS,-MS,-MS,MSR*cos(ST0),MSR*cos(ST1),MSR*cos(ST2)];
A2=[-MS,LS,-MS,MSR*cos(ST2),MSR*cos(ST0),MSR*cos(ST1)];
A3=[-MS,-MS,LS,MSR*cos(ST1),MSR*cos(ST2),MSR*cos(ST0)];
A4=[MSR*cos(ST0),MSR*cos(ST2),MSR*cos(ST1),LR,-MR,-MR];
A5=[MSR*cos(ST1),MSR*cos(ST0),MSR*cos(ST2),-MR,LR,-MR];
A6=[MSR*cos(ST2),MSR*cos(ST1),MSR*cos(ST0),-MR,-MR,LR];
DA1=[0,0,0,-MSR*sin(ST0),-MSR*sin(ST1),-MSR*sin(ST2)];
DA2=[0,0,0,-MSR*sin(ST2),-MSR*sin(ST0),-MSR*sin(ST1)];
DA3=[0,0,0,-MSR*sin(ST1),-MSR*sin(ST2),-MSR*sin(ST0)];
DA4=[-MSR*sin(ST0),-MSR*sin(ST2),-MSR*sin(ST1),0,0,0];
DA5=[-MSR*sin(ST1),-MSR*sin(ST0),-MSR*sin(ST2),0,0,0];
DA6=[-MSR*sin(ST2),-MSR*sin(ST1),-MSR*sin(ST0),0,0,0];
B1=[-RS,0,0,w*MSR*sin(ST0),w*MSR*sin(ST1),w*MSR*sin(ST2)];
B2=[0,-RS,0,w*MSR*sin(ST2),w*MSR*sin(ST0),w*MSR*sin(ST1)];
B3=[0,0,-RS,w*MSR*sin(ST1),w*MSR*sin(ST2),w*MSR*sin(ST0)];
B4=[w*MSR*sin(ST0),w*MSR*sin(ST2),w*MSR*sin(ST1),-RR,0,0];
B5=[w*MSR*sin(ST1),w*MSR*sin(ST0),w*MSR*sin(ST2),0,-RR,0];
B6=[w*MSR*sin(ST2),w*MSR*sin(ST1),w*MSR*sin(ST0),0,0,-RR];
AA=[A1;A2;A3;A4;A5;A6];
DAA=[DA1;DA2;DA3;DA4;DA5;DA6];
BB=[B1;B2;B3;B4;B5;B6];
if t>0.6 UU=[sqrt(2)*U*sin(w0*t+2*pi/3);sqrt(2)*U*sin(w0*t);sqrt(2)*U*sin(w0*t-2*pi/3);0;0;0];
XX=[x(1);x(2);x(3);x(4);x(5);x(6)];
dxx=AA^-1*BB*XX+AA^-1*UU;
Te=1/2*P*XX'*DAA*XX;
dx7=(Te-TL)/J*60/2/pi;
dx8=w;
dx=[dxx;dx7;dx8];
end
主函数是这个:
tspan=[0,1];
x0=[0;0;0;0;0;0;0;0];
[t,val]=ode45(@ABC4,tspan,x0);
x1=val(:,1);
x2=val(:,2);
x3=val(:,3);
x4=val(:,4);
x5=val(:,5);
x6=val(:,6);
x7=val(:,7);
figure(1);
plot(t,x1);
figure(2);
plot(t,x7);
这是显示的错误、、、不知道图片形式能不能行 我觉得图片形式可能看的更明白些