|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
我用LET工具箱算最大lyapunov指数为1.5,然后用一组时序数列反过来算最大lyapunov指数的结果只有0.6。为什么会有这么大的误差,是系统的信息丢失问题还是程序的问题抑或其他?还有一个小疑问,相空间重构之后的嵌入维数是不是对应最大lyapunov的个数,那m与方程的元数又有什么关系呢?
- function [lambda_1,x,y]=largest_lyapunov_exponent(data,N,m,tau,P,delt_t)
- %the function is used to calcultate largest lyapunov exponent with the
- %mended algorithm,which put forward by lv jing hu.
- %data:the time series
- %N:the length of data
- %m:enbedding dimention
- %tau:time delay
- %P:the mean period of the time series,calculated with FFT
- %delt_t:Sampling interval
- %lambda_1:return the largest lyapunov exponent
- %skyhawk
- %delt_t=0.01;
- Y=reconstitution(data,N,m,tau);%reconstitute state space
- M=N-(m-1)*tau;%M is the number of embedded points in m-dimensional space
- for j=1:M
- d_max=1e+100;
- for jj=1:M %寻找相空间中每个点的最近距离点,并记下
- d_s=0; %该点下标
- if abs(j-jj)>P %限制短暂分离
- for i=1:m
- d_s=d_s+(Y(i,j)-Y(i,jj))*(Y(i,j)-Y(i,jj));
- d_min=d_max;
- if d_s<d_min
- d_min=d_s;
- idx_j=jj;
- end
- end
- end
- end
- % index(j)=idx_j;
- max_i=min((M-j),(M-idx_j));%计算点j的最大演化时间步长i
- for k=1:max_i %计算点j与其最近邻点在i个离散步后的距离
- d_j_i=0;
- for kk=1:m
- d_j_i=d_j_i+(Y(kk,j+k)-Y(kk,idx_j+k))*(Y(kk,j+k)-Y(kk,idx_j+k));
- d(k,j)=d_j_i;
- end
- end
- end
- %对每个演化时间步长i,求所有的j的lnd(i,j)平均
- [l_i,l_j]=size(d);
- for i=1:l_i
- q=0;
- y_s=0;
- for j=1:l_j
- if d(i,j)~=0
- q=q+1;
- y_s=y_s+log(d(i,j));
- end
- end
- y(i)=y_s/(q*delt_t);
- end
- x=1:length(y);
- pp=polyfit(x,y,1);
- lambda_1=pp(1);
- yp=polyval(pp,x);
- plot(x,y,'-o',x,yp,'--')
复制代码
|
|