ODE problem in motor

Hello everybody
I wrote the following code but it has error. I could not debug it.
could you please help?
thanks in advance
clear
clc
Rs=0.1;
Rr=0.1;
Ls=0.5*10^-3;
Lr=0.5*10^-3;
M=0.8*10^-3;
B=0;
a=linspace(0,2*pi);
f=50;
w=314; % w=2*pi*f
theta=linspace(0,2*pi);
ir=200;
Vr=20;
Va=sin((w*a)-B);
Vb=sin((w*a)-B-(pi/2));
dIdt=@(t,I)[(Va-Rs*I(1)+M*w*ir*sin(theta))/Ls;(Vb-Rs*I(2)+M*w*ir*cos(theta))/Ls];
[t,I]=ode45(dIdt,[0 2*pi],[0 0])

1 个评论

Please post the differential equation you are trying to solve. For starters, your use of theta is incorrect.

请先登录,再进行评论。

回答(0 个)

类别

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by