finding the solution of a matriciel Differential Equation
1 view (last 30 days)
Show older comments
Hello all
i have this differential equation (induction machine model)
this is the code
syms i_ds(t) i_dr(t) i_qs(t) i_qr(t) w_r(t) t
J=0.024;
p=2;
f=50;
ws=2*pi*f;
ls=0.15;
lr1=0.15;
Lm=0.279;
Cr=10;
% M=(3/2)*Lm;
M=0.143;
Rs=1.15;
Rr1=1.44;
v_dr=0;
v_qr=0;
di_ds=diff(i_ds,t);
di_qs=diff(i_qs,t);
di_dr=diff(i_dr,t);
di_qr=diff(i_qr,t);
dw_r=diff(w_r,t);
ode1 =ls*di_ds+M*di_dr ==220*sin(100*pi*t) -Rs*i_ds;
ode2 =ls*di_qs+M*di_qr ==220*sin(100*pi*t-pi/2) -Rs*i_qs;
ode3 =M*di_ds+lr1*di_dr ==v_dr-Rr1*i_dr-M*w_r*i_qs-lr1*w_r*i_qr;
ode4 =M*di_qs+lr1*di_qr ==v_qr-Rr1*i_qr-M*w_r*i_ds-lr1*w_r*i_dr;
ode5 =J*dw_r==(3/2)*p*M*(i_dr*i_qs-i_qr*i_ds)-Cr;
odes = [ode1; ode2; ode3; ode4; ode5]
I=[i_ds(0)==0, i_qs(0)==0, i_dr(0)==0, i_qr(0)==0, w_r(0)==0];
yLT =dsolve(odes,I)
and i having this problem
Warning: Unable to find symbolic solution.
> In dsolve (line 209)
In MAS2 (line 32)
yLT =
[ empty sym ]
3 Comments
Walter Roberson
on 27 Nov 2023
When I asked Maple to solve all of them together, it got up to 120 gigabytes of memory before I killed it.
Answers (1)
Torsten
on 26 Nov 2023
Edited: Torsten
on 26 Nov 2023
Your equations cannot be solved analytically using "dsolve". Use a numerical solver instead:
J=0.024;
p=2;
f=50;
ws=2*pi*f;
ls=0.15;
lr1=0.15;
Lm=0.279;
Cr=10;
% M=(3/2)*Lm;
M=0.143;
Rs=1.15;
Rr1=1.44;
v_dr=0;
v_qr=0;
Mass = [ls 0 M 0 0;0 ls 0 M 0;M 0 lr1 0 0;0 M 0 lr1 0;0 0 0 0 J];
%fun = @(t,y)[220*sin(100*pi*t)-Rs*y(1);...
% 220*sin(100*pi*t-pi/2)-Rs*y(2);...
% v_dr-Rr1*y(3)-M*y(5)*y(2)-lr1*y(5)*y(4);...
% v_qr-Rr1*y(4)-M*y(5)*y(1)-lr1*y(5)*y(3);...
% (3/2)*p*M*(y(3)*y(2)-y(4)*y(1))-Cr];
fun = @(t,y)inv(Mass)*[220*sin(100*pi*t)-Rs*y(1);...
220*sin(100*pi*t-pi/2)-Rs*y(2);...
v_dr-Rr1*y(3)-M*y(5)*y(2)-lr1*y(5)*y(4);...
v_qr-Rr1*y(4)-M*y(5)*y(1)-lr1*y(5)*y(3);...
(3/2)*p*M*(y(3)*y(2)-y(4)*y(1))-Cr];
tspan = [0 0.3];
y0 = [0 0 0 0 0].';
%[T,Y] = ode45(fun,tspan,y0,odeset('Mass',Mass))
[T,Y] = ode45(fun,tspan,y0);
plot(T,Y(:,1))
4 Comments
Torsten
on 27 Nov 2023
The code is a direct translation of your equations and the results are similar with all ODE solvers available. So I think the equations solved in Simulink must be different from those you posted here.
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


