相空间重构与几个常用非线性模型实现

本文主要介绍了Lorenz模型、Rossler模型、Logistic映射以及其代码实现

1.Lorenz模型

%sy.m
t = -10*pi:pi/250:10*pi;
comet3((cos(2*t).^2).*sin(t),(sin(2*t).^2).*cos(t),t);
Lorenz.m
function xdot=lorenz(~,x)
xdot = [-8/3,0,x(2);0,-10,10;-x(2),28,-1]*x;
命令行:
过程图:
x0=[0,0, 1e-10]';
[t,x]=ode45(@lorenz,[0,1000],x0);
plot(t,x);
figure;
comet3(x(:,1),x(:,2),x(:,3));
%plotdata
x0=[0,0, eps]';
[t,x]=ode23(@lorenz,[0,100],x0);
plot3(x(:,1),x(:,2),x(:,3));
axis([10 40 -20 20 -20 20]);

 2.Rossler模型

%rossler.m
function xdot=rossler(t,x)
xdot = [0.9*x(2)*x(1);-x(1)-x(3);x(2)+0.15*x(3)];
命令行:
当t_final=1000时:
t_final=1000; x0=[0;0;1e-10];
[t,x]=ode45('rossler',[0,t_final],x0);
plot(t,x);
figure;
%plot3(x(:,1),x(:,2),x(:,3));
comet3(x(:,1),x(:,2),x(:,3));

 3.Logistic映射

%main
n=64;
key=0.512;
an=linspace(3.1,3.99,400);
hold on;
box on;
axis([min(an),max(an),-1,2]);
N=n^2;
xn=zeros(1,N);
for a=an
x=key;
for k=1:20
x=a*x*(1-x);% 产生公式 
end
for k=1:N
x=a*x*(1-x);
xn(k)=x;
b(k,1)=x; %一维矩阵记录迭代结果 
end
plot(a*ones(1,N),xn,'k.','markersize',1);
end
logistica.m
%xn+1=axn(1-xn) 
function ichao_ans = logistica(varargin)
%logistic序列生成算法
%函数名:
%logistic混沌序列生成函数
%参数:
%(n,key),n为矩阵阶数,key为迭代初始值。
%(n),n为矩阵阶数,key=0.600。
%()或(n,key,...),n=64,key=0.600。
switch nargin
case 1
n=varargin{1};
key=0.600;
case 2
n=varargin{1};
key=varargin{2};
    otherwise
key=0.600;
n=64;
end
N=n^2;
xn=zeros(1,N);
a=4;
x=key;
for k=1:20
x=a*x*(1-x);% 产生公式
end
for k=1:N
x=a*x*(1-x);
xn(k)=x;% 一维矩阵记录迭代结果
end
c=reshape(xn,n,n);% 一维矩阵转换二维矩阵
d=zeros(n,n);% 二维混沌矩阵调制
for a1=1:n
for a2=1:n
if c(a1,a2)>=0.5
d(a1,a2)=1;
else 
d(a1,a2)=0;
end
end
end;
end
%figure;title(‘logistic映射’);
%imshow(d);

1、3种模型是关于时间序列,本质是微分方程,Lorenz模型、Rossler模型是同一种,通过写导数公式画出图形,Logistic映射和Henon映射属同一类,与控制参数有关,与初始值的设定关系较大,设定矩阵阶数和迭代次数。

2、lorenz用相空间重构有2种常用方法,奇异值分解法即SVD法,还有自相关和互信息法,较为实用的是第二种方法。延时为重要参数,初始条件影响图形位置和方向。

3、lorenz相空间重构采样周期为0.01,相点数为N-(m-1)*tau,其中N为x的长度,m为阶数,tau为延时。

4、lorenz吸引子图当采样周期越短时,图形的轨迹线越稀疏,反之值采样周期越大线越密。

猜你喜欢

转载自blog.csdn.net/LusionLv/article/details/125206104
今日推荐