早教吧作业答案频道 -->数学-->
用四阶龙格库塔法求解矩阵微分方程要求电流就是求解矩阵微分方程:(R+pM(t))*I(t)+M(t)*pI(t)-U(t)=0,其中p是求导,R是6*6常数矩阵,M(t)是6*6的时变矩阵,U(t)是6*1的时变矩阵,求I(t),也是6*1的矩阵.已
题目详情
用四阶龙格库塔法求解矩阵微分方程
要求电流就是求解矩阵微分方程:(R+pM(t))*I(t)+M(t)*pI(t)-U(t)=0,
其中p是求导,
R是6*6常数矩阵,
M(t)是6*6的时变矩阵,
U(t)是6*1的时变矩阵,
求I(t),也是6*1的矩阵.
已知条件:
M=[ 0,0,0,-15727/10000*sin(5/12*pi+80*pi*t)*pi,15727/10000*cos(1/4*pi+80*pi*t)*pi,15727/10000*sin(1/12*pi+80*pi*t)*pi;
0,0,0,15727/10000*sin(1/12*pi+80*pi*t)*pi,-15727/10000*sin(5/12*pi+80*pi*t)*pi,15727/10000*cos(1/4*pi+80*pi*t)*pi;
0,0,0,15727/10000*cos(1/4*pi+80*pi*t)*pi,15727/10000*sin(1/12*pi+80*pi*t)*pi,-15727/10000*sin(5/12*pi+80*pi*t)*pi;
-15727/10000*sin(5/12*pi+80*pi*t),15727/10000*sin(1/12*pi+80*pi*t)*pi,15727/10000*cos(1/4*pi+80*pi*t)*pi,0,0,0;
15727/10000*cos(1/4*pi+80*pi*t)*pi,-15727/10000*sin(5/12*pi+80*pi*t)*pi,15727/10000*sin(1/12*pi+80*pi*t)*pi,0,0,0;
15727/10000*sin(1/12*pi+80*pi*t)*pi,15727/10000*cos(1/4*pi+80*pi*t)*pi,-15727/10000*sin(5/12*pi+80*pi*t)*pi,0,0,0];
U=[380*cos(100*pi*t);
380*cos(100*pi*t-2*pi/3);
380*cos(100*pi*t+2*pi/3);
0;
0;
0];
R=[0.0247,0,0,0,0,0;
0,0.0247,0,0,0,0;
0,0,0.0247,0,0,0;
0,0,0,0.0193,-0.0193,0;
0,0,0,0,0.0193,-0.0193;
0,0,0,1,1,1];
电流I的初值是:I(0)=[0;0;0;0;0;0];
t是时间
预期最后的结果是6个电流与时间的关系
要求电流就是求解矩阵微分方程:(R+pM(t))*I(t)+M(t)*pI(t)-U(t)=0,
其中p是求导,
R是6*6常数矩阵,
M(t)是6*6的时变矩阵,
U(t)是6*1的时变矩阵,
求I(t),也是6*1的矩阵.
已知条件:
M=[ 0,0,0,-15727/10000*sin(5/12*pi+80*pi*t)*pi,15727/10000*cos(1/4*pi+80*pi*t)*pi,15727/10000*sin(1/12*pi+80*pi*t)*pi;
0,0,0,15727/10000*sin(1/12*pi+80*pi*t)*pi,-15727/10000*sin(5/12*pi+80*pi*t)*pi,15727/10000*cos(1/4*pi+80*pi*t)*pi;
0,0,0,15727/10000*cos(1/4*pi+80*pi*t)*pi,15727/10000*sin(1/12*pi+80*pi*t)*pi,-15727/10000*sin(5/12*pi+80*pi*t)*pi;
-15727/10000*sin(5/12*pi+80*pi*t),15727/10000*sin(1/12*pi+80*pi*t)*pi,15727/10000*cos(1/4*pi+80*pi*t)*pi,0,0,0;
15727/10000*cos(1/4*pi+80*pi*t)*pi,-15727/10000*sin(5/12*pi+80*pi*t)*pi,15727/10000*sin(1/12*pi+80*pi*t)*pi,0,0,0;
15727/10000*sin(1/12*pi+80*pi*t)*pi,15727/10000*cos(1/4*pi+80*pi*t)*pi,-15727/10000*sin(5/12*pi+80*pi*t)*pi,0,0,0];
U=[380*cos(100*pi*t);
380*cos(100*pi*t-2*pi/3);
380*cos(100*pi*t+2*pi/3);
0;
0;
0];
R=[0.0247,0,0,0,0,0;
0,0.0247,0,0,0,0;
0,0,0.0247,0,0,0;
0,0,0,0.0193,-0.0193,0;
0,0,0,0,0.0193,-0.0193;
0,0,0,1,1,1];
电流I的初值是:I(0)=[0;0;0;0;0;0];
t是时间
预期最后的结果是6个电流与时间的关系
▼优质解答
答案和解析
global R M U
syms t
R=[
0.0247,0,0,0,0,0;
0,0.0247,0,0,0,0;
0,0,0.0247,0,0,0;
0,0,0,0.0193,-0.0193,0;
0,0,0,0,0.0193,-0.0193;
0,0,0,1,1,1
];
M=[
0,0,0,-15727/10000*sin(5/12*pi+80*pi*t)*pi,15727/10000*cos(1/4*pi+80*pi*t)*pi,15727/10000*sin(1/12*pi+80*pi*t)*pi;
0,0,0,15727/10000*sin(1/12*pi+80*pi*t)*pi,-15727/10000*sin(5/12*pi+80*pi*t)*pi,15727/10000*cos(1/4*pi+80*pi*t)*pi;
0,0,0,15727/10000*cos(1/4*pi+80*pi*t)*pi,15727/10000*sin(1/12*pi+80*pi*t)*pi,-15727/10000*sin(5/12*pi+80*pi*t)*pi;
-15727/10000*sin(5/12*pi+80*pi*t),15727/10000*sin(1/12*pi+80*pi*t)*pi,15727/10000*cos(1/4*pi+80*pi*t)*pi,0,0,0;
15727/10000*cos(1/4*pi+80*pi*t)*pi,-15727/10000*sin(5/12*pi+80*pi*t)*pi,15727/10000*sin(1/12*pi+80*pi*t)*pi,0,0,0;
15727/10000*sin(1/12*pi+80*pi*t)*pi,15727/10000*cos(1/4*pi+80*pi*t)*pi,-15727/10000*sin(5/12*pi+80*pi*t)*pi,0,0,0
];
U=[
380*cos(100*pi*t);
380*cos(100*pi*t-2*pi/3);
380*cos(100*pi*t+2*pi/3);
0;
0;
0
];
DM=diff(M,t);
%%%要调节的参数在这里
%%注意,你的M有点奇异,计算很快发散掉了,你检察一下相关的参数吧.
%%det(subs(M,t,0))
I0=[0;0;0;0;0;0];
tstart=0;
tend=0.1;
dt=0.1;
%%%end
tout=tstart:dt:tend;
n=length(tout);
M_t_dt=subs(M,t,tstart);
U_t_dt=subs(U,t,tstart);
DM_t_dt=subs(DM,t,tstart);
II=I0;
for i=1:n-1
tt=tout(i);
M_t=M_t_dt;
U_t=U_t_dt;
DM_t=DM_t_dt;
M_t_dt_2=subs(M,t,tt+dt/2);
U_t_dt_2=subs(U,t,tt+dt/2);
DM_t_dt_2=subs(DM,t,tt+dt/2);
M_t_dt=subs(M,t,tt+dt);
U_t_dt=subs(U,t,tt+dt);
DM_t_dt=subs(DM,t,tt+dt);
k1=dt*M_t \(U_t -(R+DM_t )*(II(:,end) ));
k2=dt*M_t_dt_2\(U_t_dt_2-(R+DM_t_dt_2)*(II(:,end)+0.5*k1));
k3=dt*M_t_dt_2\(U_t_dt_2-(R+DM_t_dt_2)*(II(:,end)+0.5*k2));
k4=dt*M_t_dt \(U_t_dt -(R+DM_t_dt )*(II(:,end)+k3 ));
I_t=II(:,end)+(k1+2*k2+2*k3+k4)/6;
II=[II,I_t];
end
plot(tout',II')
syms t
R=[
0.0247,0,0,0,0,0;
0,0.0247,0,0,0,0;
0,0,0.0247,0,0,0;
0,0,0,0.0193,-0.0193,0;
0,0,0,0,0.0193,-0.0193;
0,0,0,1,1,1
];
M=[
0,0,0,-15727/10000*sin(5/12*pi+80*pi*t)*pi,15727/10000*cos(1/4*pi+80*pi*t)*pi,15727/10000*sin(1/12*pi+80*pi*t)*pi;
0,0,0,15727/10000*sin(1/12*pi+80*pi*t)*pi,-15727/10000*sin(5/12*pi+80*pi*t)*pi,15727/10000*cos(1/4*pi+80*pi*t)*pi;
0,0,0,15727/10000*cos(1/4*pi+80*pi*t)*pi,15727/10000*sin(1/12*pi+80*pi*t)*pi,-15727/10000*sin(5/12*pi+80*pi*t)*pi;
-15727/10000*sin(5/12*pi+80*pi*t),15727/10000*sin(1/12*pi+80*pi*t)*pi,15727/10000*cos(1/4*pi+80*pi*t)*pi,0,0,0;
15727/10000*cos(1/4*pi+80*pi*t)*pi,-15727/10000*sin(5/12*pi+80*pi*t)*pi,15727/10000*sin(1/12*pi+80*pi*t)*pi,0,0,0;
15727/10000*sin(1/12*pi+80*pi*t)*pi,15727/10000*cos(1/4*pi+80*pi*t)*pi,-15727/10000*sin(5/12*pi+80*pi*t)*pi,0,0,0
];
U=[
380*cos(100*pi*t);
380*cos(100*pi*t-2*pi/3);
380*cos(100*pi*t+2*pi/3);
0;
0;
0
];
DM=diff(M,t);
%%%要调节的参数在这里
%%注意,你的M有点奇异,计算很快发散掉了,你检察一下相关的参数吧.
%%det(subs(M,t,0))
I0=[0;0;0;0;0;0];
tstart=0;
tend=0.1;
dt=0.1;
%%%end
tout=tstart:dt:tend;
n=length(tout);
M_t_dt=subs(M,t,tstart);
U_t_dt=subs(U,t,tstart);
DM_t_dt=subs(DM,t,tstart);
II=I0;
for i=1:n-1
tt=tout(i);
M_t=M_t_dt;
U_t=U_t_dt;
DM_t=DM_t_dt;
M_t_dt_2=subs(M,t,tt+dt/2);
U_t_dt_2=subs(U,t,tt+dt/2);
DM_t_dt_2=subs(DM,t,tt+dt/2);
M_t_dt=subs(M,t,tt+dt);
U_t_dt=subs(U,t,tt+dt);
DM_t_dt=subs(DM,t,tt+dt);
k1=dt*M_t \(U_t -(R+DM_t )*(II(:,end) ));
k2=dt*M_t_dt_2\(U_t_dt_2-(R+DM_t_dt_2)*(II(:,end)+0.5*k1));
k3=dt*M_t_dt_2\(U_t_dt_2-(R+DM_t_dt_2)*(II(:,end)+0.5*k2));
k4=dt*M_t_dt \(U_t_dt -(R+DM_t_dt )*(II(:,end)+k3 ));
I_t=II(:,end)+(k1+2*k2+2*k3+k4)/6;
II=[II,I_t];
end
plot(tout',II')
看了 用四阶龙格库塔法求解矩阵微分...的网友还看了以下:
设矩阵A=|1-2||43|,I为单位矩阵,则(1-A)^T=~设矩阵A=|1-2|I为单位矩阵,则 2020-03-31 …
用四阶龙格库塔法求解矩阵微分方程要求电流就是求解矩阵微分方程:(R+pM(t))*I(t)+M(t 2020-05-13 …
A为n阶正交矩阵,α1α2…αn为A的列向量组,当i≠j时,(1/3αi,2/3αj)=?A为n阶 2020-06-12 …
谁能帮我看下这个程序问题出在哪?function[variancebsbkbnsigma]=tra 2020-06-21 …
设{an}是各项为正数的无穷数列,Ai是边长为ai,ai+1的矩形的面积(i=1,2,3..设an 2020-07-19 …
当I>1时√i+√i-1<2√i从而1/√i<2(√i-√i-1)怎么推出来的? 2020-07-25 …
设A是y=x²-3x所确定的抛物线上位于x轴下方,且在对称轴左侧的一个动点,过点A作x轴的平行线, 2020-07-31 …
设A是y=x²-3x所确定的抛物线上位于x轴下方,且在对称轴左侧的一个动点,过点A作x轴的平行线, 2020-07-31 …
点A是抛物线y=x2-3x上位于x轴下方,且在对称轴左侧的一个动点,过点A作x轴的平行线,交抛物线 2020-07-31 …
设A=I-ξξT,其中I是n阶单位矩阵,ξ是n维非零列向量,ξT是ξ的转置.证明(1)A2=A的充分 2020-11-03 …