ode数值积分出现复数解是怎么造成的
系统运动微分方程functionuu = equ_6_11(T,u)
m1 = 1.44*10^5;
m2 = 1.0*10^4;
c1 = 4.3*10^5;
c2 = 3*10^5;
Ke = 5.0*10^7;
e0 = 0.8*10^-3;
Rr = 0.6;
Lr = 0.3;
delta_0 = 2.0*10^-3;
cz = 0.4*10^-3;
Rb = 0.2;
Lb = 0.3;
mu = 24*10^-3;
mu_0 = 4*pi*10^-7;
kj = 0.8;
global Ij
Fj = kj * Ij;
kr = 5*10^8;
f = 0.01;
omega = 13;
e = sqrt(u(1).^2 + u(3).^2);
F_coeffi = Rr * Lr *pi *mu_0 *Fj^2 /delta_0.^2;
Fx = F_coeffi * (1/2 * e + 5/8 * e.^3) * u(1)./e;
Fy = F_coeffi * (1/2 * e + 5/8 * e.^3) * u(3)./e;
sigma = mu * omega * Rb * Lb * (Rb/cz)^2 * (Lb/2/Rb)^2;
A1 = u(7) + 2*u(6);
A2 = u(5) - 2*u(8);
alpha = atan(A1./A2) - pi/2* sign(A1./A2) - pi/2* sign(A1);
E = sqrt(u(5).^2 +u(7).^2);
E_minus = sqrt(1 -E.^2);
B1 = u(7)*cos(alpha) - u(5)*sin(alpha);
B2 = u(5)*cos(alpha) + u(7)*sin(alpha);
G = 2./E_minus * ( pi/2 + atan(B1./ E_minus) );
V = (2 + B1 * G) ./E_minus.^2;
S = B2 ./ ( 1 - B2.^2 );
F_oil_same = -sqrt( A2.^2 + A1.^2 ) ./ E_minus.^2;
f_x = F_oil_same * ( 3* u(5) *V - sin(alpha) * G - 2 *cos(alpha)*S );
f_y = F_oil_same * ( 3* u(7) *V + cos(alpha) * G - 2 *sin(alpha)*S );
fx = sigma * f_x;
fy = sigma * f_y;
H = 1/2 * (sign(abs(e-1)) + sign(e-1));
Fx_rub = -delta_0 * (e-1)*kr./e * (u(1) - f.* u(3))*H;
Fy_rub = -delta_0 * (e-1)*kr./e * (f.* u(1) + u(3))*H;
uu = zeros(8,1);
uu(1) = u(2);
uu(2) = -c1/(m1*omega) * u(2) - Ke/(m1*omega^2) * (u(1) - u(5)) + ...
e0 * cos(T)/delta_0 + Fx/(m1*omega^2*delta_0)+ Fx_rub/(m1*omega^2*delta_0) ;
uu(3) = u(4);
uu(4) = -c1/(m1*omega) * u(4) - Ke/(m1*omega^2) * (u(3) - u(7)) + ...
e0 * sin(T)/delta_0 + Fy/(m1*omega^2*delta_0)+ Fy_rub/(m1*omega^2*delta_0);
uu(5) = u(6);
uu(6) = -c2/(m2*omega) * u(6) - Ke/(2*m2*omega^2) * (u(5) - u(1)) + fx/(m2*omega^2*delta_0);
uu(7) = u(8);
uu(8) = -c2/(m2*omega) * u(8) - Ke/(2*m2*omega^2) * (u(7) - u(3)) + fy/(m2*omega^2*delta_0);
求解
period = 2*pi;
step = period/200;
tspan = 0:step:period;
global Ij
Ij = 600;
s = ;
y0 = ;
= ode45('equ_6_11',tspan,y0);
在此初值条件下得到的结果为复数,首次遇到这样的情况。如改用其他初值,如s = 则可以顺利求解。
然而,这一组初值是通过迭代获得,无法更改,其结果对后续运算也会产生影响。
请教大家,为什么会出现复数解,应采用何种方法加以解决。
代码没错呀,这多试几次看看。。 回复 2 # jxldc.com 的帖子
代码没有毛病。问题主要是在采用第一组初值时,得到的结果是复数的,不知道这是什么原因造成的。 感觉 应该是没什么问题的
页:
[1]