|
楼主 |
发表于 2010-7-17 12:39
|
显示全部楼层
吴老师,你好,根据你给的提示,建立了chunshui2003.m文件如下:
function chunshui2003
%%%% 基本参数数值 %%%%%
mr=600*10^3;
De=0.5*10^6;
Ke=0.5*10^10;
delta_0=18*10^-3;
e_0=2*10^-3;
omega=13.1; %水轮发电机额定转速,单位rad/s
%%%% 电磁刚度参数数值 %%%%%
Rg=6.24;
L1=2.1;
k_u=1.102;
mu_0=4*pi*10^(-7);
f=50;
theta=30.64/180*pi;
phi=acos(0.875);
p=40;
Fsm=19210;
Fjm=24214;
Lambda_0=mu_0./(k_u*delta_0);
sigma=k_u*delta_0;
omega_f=2*pi*f./p;
function uu=diff_equ(t,u)
%
%%%%% Fx,Fy 表达式 %%%%%%
Fx=mr.*omega.^2.*e_0.*cos(omega.*t);
Fy=mr.*omega.^2.*e_0.*sin(omega.*t);
%%%% 电磁刚度表达式 %%%%%
coeff_1=Rg.*L1.*Lambda_0./(2*sigma.^2);
coeff_2=coeff_1.*sigma;
B=Fsm.*cos(omega_f.*t-p.*alpha); %积分大括号内第一项
C=Fjm.*cos(omega_f.*t-p.*alpha+theta+phi+pi/2); %积分大括号内第二项
C11=1+cos(2.*alpha);
C12=sin(2.*alpha);
C22=1-cos(2.*alpha);
C_1=cos(alpha);
C_2=sin(alpha); %不同电磁刚度项的积分内容
%
D11=coeff_1.*C11.*(B+C).^2;
D12=coeff_1.*C12.*(B+C).^2;
D22=coeff_1.*C22.*(B+C).^2;
D_1=coeff_2.*C_1.*(B+C).^2;
D_2=coeff_2.*C_2.*(B+C).^2; %电磁刚度积分表达式
%
K11=quadl(@(alpha)D11,0,2*pi);
K12=quadl(@(alpha)D12,0,2*pi);
K21=quadl(@(alpha)D12,0,2*pi);
K22=quadl(@(alpha)D22,0,2*pi);
K_1=quadl(@(alpha)D_1,0,2*pi);
K_2=quadl(@(alpha)D_2,0,2*pi); %电磁刚度求解
uu=zeros(4,1);
uu(1)=u(2);
uu(2)=-De/(mr*omega)*u(2)-(K11+Ke)/(mr*omega^2)*u(1)-K12/(mr*omega^2)*u(3)+Fx/(mr*delta_0*omega^2)-K_1/(mr*delta_0*omega^2);
uu(3)=u(4);
uu(4)=-De/(mr*omega)*u(4)-K21/(mr*omega^2)*u(1)-(K22+Ke)/(mr*omega^2)*u(3)+Fy/(mr*delta_0*omega^2)-K_2/(mr*delta_0*omega^2);
end
y0=[0.001 0.001 0.001 0.001];
period=2*pi/13.1;
[t,u]=ode45(@diff_equ,[0:period/100:100*period],y0);
end
运行后在主窗口出现错误提示:
??? Error using ==> alpha
Too many output arguments.
Error in ==> chunshui2003>diff_equ at 45
B=Fsm.*cos(omega_f.*t-p.*alpha); %积分大括号内第一项
Error in ==> odearguments at 110
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ==> ode45 at 173
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
Error in ==> chunshui2003 at 77
[t,u]=ode45(@diff_equ,[0:period/100:100*period],y0);
如果将参数部分
%%%% 基本参数数值 %%%%%
mr=600*10^3;
De=0.5*10^6;
Ke=0.5*10^10;
delta_0=18*10^-3;
e_0=2*10^-3;
omega=13.1; %水轮发电机额定转速,单位rad/s
%%%% 电磁刚度参数数值 %%%%%
Rg=6.24;
L1=2.1;
k_u=1.102;
mu_0=4*pi*10^(-7);
f=50;
theta=30.64/180*pi;
phi=acos(0.875);
p=40;
Fsm=19210;
Fjm=24214;
Lambda_0=mu_0./(k_u*delta_0);
sigma=k_u*delta_0;
omega_f=2*pi*f./p;
写入到子函数function uu=diff_equ(t,u)中,同样会出现类似的提示。
请你看一下! |
|