%{
calculation of the largest lyapunov exponent (lle) by the method suggested by J.C.Sprott,
Department of Physics, University of Wisconsin, Madison, WI 53706, USA
%}
% http://sprott.physics.wisc.edu/chaos/lyapexp.htm
%{
used to find the lyapunov exponent spectrum of a system of nonlinearly
coupled oscillators as the coupling parameter is varied
%}
global be;
global gm;
%'gm' and 'be' are the parameters of the system
be=1;
c1=1;
lya3=zeros(101,2); %stores the lle and the corresponding value of gm
for gm=10:0.05:40 %any range may be chosen by the user
c=1;
t0=0;
tf=8;
N=80;
E=0.2; px=0.2;
x1=0;
x2=px;
x3=0;
x4=sqrt(2*E-(px^2));
%(x1,x2,x3,x4) and (x11,x22,x33,x44) are arbitrarily close initial conditions
x11=10^-8;
x22=px+10^-8;
x33=10^-8;
x44=x4+10^-8;
d0=sqrt((x11-x1)^2+(x22-x2)^2+(x33-x3)^2+(x44-x4)^2); % initial separation between the trajectories
lam=zeros(401,1); % stores the exponent calculated at each iteration
for i=1:400
%solving the equations of the system of interest for each of the trajectories
[t,x] = ode_RK4_Yang([t0 tf],[x1 x2 x3 x4],N);
[tt,xx] = ode_RK4_Yang([t0 tf],[x11 x22 x33 x44],N);
d1=sqrt((xx(81,1)-x(81,1))^2+(xx(81,2)-x(81,2))^2+(xx(81,3)-x(81,3))^2+(xx(81,4)-x(81,4))^2); %separation at the end of each iteration
lam(c,1)=log(d1/d0);
%reinitialization of the trajectories after each iteration
x11=x(81,1)+(xx(81,1)-x(81,1))*(d0/d1);
x22=x(81,2)+(xx(81,2)-x(81,2))*(d0/d1);
x33=x(81,3)+(xx(81,3)-x(81,3))*(d0/d1);
x44=x(81,4)+(xx(81,4)-x(81,4))*(d0/d1);
x1=x(81,1);
x2=x(81,2);
x3=x(81,3);
x4=x(81,4);
t0=tf;
tf=tf+8;
c=c+1;
end
lya3(c1,1)=mean(lam(100:400)); % finally lle is the mean of all the calculated exponents
lya3(c1,2)=gm;
c1=c1+1;
end
天天Matlab代码科研顾问
- 粉丝: 3w+
- 资源: 2504
最新资源
- 无刷直流电机稳定运行和制动工况双闭环仿真,PWM-ON-PWM,PWM-OFF-PWM调制方式 图一为拓扑图,图二为调制方式,图三为转速和电磁转矩波形,图四和图五为三相电流和电磁转矩放大和整体图,相
- XShell7 XFtp7 破解 安装
- 矽创7789p3资料介绍
- 复现《基于扩展(EKF)和无迹卡尔曼滤波(UKF)的电力系统动态状态估计》 该程序对应文章Power System Dynamic State Estimation Using Ext
- 加强版魔术轮胎公式模型MagicFormula车辆动力学轮胎动力学Carsim联合仿真Matlab和Simulink 软件使用:Matlab Simulink Carsim 适用场景:采用模块化建模方
- 基于open3D的雷达点云上插值
- ZeroBasedOne-ZIP
- 机械设计商用链式披萨炉sw16可编辑非常好的设计图纸100%好用.zip
- 2022年江苏省高职组信息安全管理与评估竞赛1卷
- 免费加速器-加速服务:githup、Steam、Origin、Twitch直播、公共CDM、国外验证码平台、Nexus Modes、网盘服务
- 基于扩展卡尔曼滤波(EKF)的车辆状态估计(采用基于Dugoff轮胎的七自由度车辆动力学模型,B09基础上建模) 1.软件: MATLAB 2018以上;CarSim 2020.0 2.介绍: (1
- 机械设计双封口包装机袋式颗粒封口机sw16非常好的设计图纸100%好用.zip
- LittelCMS在QT6.8.1下的编译好的库文件,含Debug和Release版本
- 9792278062664491_235887660.jpg
- VID_20250103_143902_533.mp4
- VID_20250103_142502_218.mp4
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈