最大lyapunov指数图
本帖最后由 bohua1208 于 2011-4-18 09:57 编辑最大lyapunov指数图
不管改哪个参数
最大lyapunov指数图总是趋于0呢,一直没有大于0的情况怎么回事啊,我想要的是混沌运动的最大lyapunov指数图
function dX = DF(t,X)
a0=0.05;f1=5;f2=10;mu=0.1;w0=1;beta=0.1;ks=2;alafa=0.67;
b0=(f1-(f1^2-4*mu^2*w0^2*a0^2)^0.5)/(2*mu*w0);
omega=1;
x=X(1); y=X(2);
Y=[X(3),X(5);
X(4),X(6)];
dX = zeros(6,1);
dX(1)=y;
dX(2)=-(w0^2*x-ks*beta*x^2+ks*alafa*x^3+ks*mu*y-ks*f1*cos(omega*t)-ks*f2*cos(2*omega*t));
J=[ 0, 1;
-w0^2+2*ks*beta*x-3*ks*alafa*x^2,-mu*ks];
dX(3:6) = J*Y;
% 计算Rossler吸引子的Lyapunov指数
clc;clear all;
a0=0.05;f1=5;f2=10;mu=0.1;w0=1;beta=0.1;ks=2;alafa=0.67;
b0=(f1-(f1^2-4*mu^2*w0^2*a0^2)^0.5)/(2*mu*w0);
yinit = ;
orthmatrix = [1 0 ;
0 1 ];
y = zeros(6,1);
% 初始化输入
y(1:2) = yinit;
y(3:6) = orthmatrix;
tstart = 0; % 时间初始值
tstep = 1e-3; % 时间步长
wholetimes = 20000; % 总的循环次数
steps = 100; % 每次演化的步数
iteratetimes = wholetimes/steps; % 演化的次数
mod = zeros(2,1);
lp = zeros(2,1);
Lyapunov1 = zeros(iteratetimes,1);
Lyapunov2 = zeros(iteratetimes,1);
for i=1:iteratetimes
tspan = tstart:tstep:(tstart + tstep*steps);
= ode45('DF', tspan, y);
% 取积分得到的最后一个时刻的值
y = Y(size(Y,1),:);
% 重新定义起始时刻
tstart = tstart + tstep*steps;
y0 = [y(3) y(5);
y(4) y(6)];
%正交化
y0 = TwoGS(y0);
mod(1) = sqrt(y0(:,1)'*y0(:,1));
mod(2) = sqrt(y0(:,2)'*y0(:,2));
y0(:,1) = y0(:,1)/mod(1);
y0(:,2) = y0(:,2)/mod(2);
lp = lp+log(abs(mod));
Lyapunov1(i) = lp(1)/(tstart);
Lyapunov2(i) = lp(2)/(tstart);
y(3:6) = y0';
end
% 作Lyapunov指数谱图
i = 1:iteratetimes;
plot(i,Lyapunov1,i,Lyapunov2)
为何,我用这个程序计算出错呢???? Undefined function or method 'TwoGS' for input arguments of type 'double'.
Error in ==> Lyapunov at 31
y0 = TwoGS(y0); shengjunjie 发表于 2012-6-21 11:01 static/image/common/back.gif
为何,我用这个程序计算出错呢???? Undefined function or method 'TwoGS' for input arguments of type ' ...
http://www.chinavib.com/forum.php?mod=viewthread&tid=41358&page=2#pid323869
页:
[1]