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

James Tursa
James Tursa 2021년 1월 26일
Please post the differential equation you are trying to solve. For starters, your use of theta is incorrect.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

질문:

2021년 1월 26일

댓글:

2021년 1월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by