资源描述:
《非线性分析作业3.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、非线性分析第三次作业学院(系):电子信息与电气工程学部专业:信号与信息处理学生姓名:代菊学号:11409013任课教师:梅建琴大连理工大学DalianUniversityofTechnology1.GiventheODE:1)PlotthebifurcationdiagramandphasediagramsasFvaries,andinvestigatetheroutestochaos.2)ComputetheLyapunovexponents,andplotthevalueasafunctionofF.答:1)令,上述微分方程可
2、以化为:Matlab程序代码如下:%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%定义ODE方程%%%%%%%%%%%%%%%%%%%%%%%%%%%functiondx=ode(ignore,X)globalFwd;r=1;x=X(1);v=X(2);psi=X(3);dx=zeros(3,1);dx(1)=v;dx(2)=-r*v+x-x^3+F*cos(psi);dx(3)=wd;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%分岔图绘制程序%%%%%%%%%%%%%%%%%%%%%%%%%%%%f
3、unctionduffing_bifur_Fclear;clc;globalFwd;wd=1.2;range=0.4:0.0001:0.47;%F的范围%range=0.4:0.001:0.47;%F的范围period=2*pi/wd;k=0;YY1=[];rangelength=length(range);YY1=ones(rangelength,3000)*NaN;step=2*pi/300/wd;%步长,由于wd=1,周期即为2*pi,此步长为1周期取100个点。forF=rangey0=[200];k=k+1;%除去前面6
4、0个周期的数据,并将最后的结果作为下一次积分的初值tspan=0:step:60*period;[ignore,Y]=ode45(@duffing,tspan,y0);y0=Y(end,:);j=1;kkk=300;forii=20:59forpoint=(ii-1)*kkk+2:ii*kkkifY(point,1)>Y(point-2,1)&&Y(point,1)>Y(point+2,1)&&Y(point,1)>Y(point-100,1)YY1(k,j)=Y(point,1);j=j+1;endend%取出每一个周期内的第一
5、个解的最后一个值。y0=Y(end,:);endendplot(range,bifdata,'k.','markersize',5);运行上述程序,并对结果进行分析:以F为自变量,运动幅度为因变量的分岔图如下:其混沌道路描述如下:(a)当时,微分方系统为单周期运动,此时的相图如下所示:(b)当时,单摆处于双周期运动状态,此时的相图如下所示:(c)当,单摆经历倍周期分岔,此时相图如下所示(d)当时,单摆进入混沌运动区,此时的系统相图如下所示:由该相图可知,系统在数个周期内作运动。(e)当时,系统恢复规则运动,此时相图如下:由上图可知
6、,系统从混沌中恢复,且做单周期运动。(2)wolf算法来计算李雅普诺夫指数的matlab程序如下:%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%杜芬方程的参数%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%functionf=duff_ext(t,X);globalF;r=1;x=X(1);y=X(2);psi=X(3);dx=zeros(3,1);f(1)=y;f(2)=-r*y+x-x^3+F*cos(psi);f(3)=0.2;%Linearizedsystem.Jac=[0,1,0;1-3*x
7、^2,-r,-F*sin(psi);0,0,0];f(4:12)=Jac*Y;%变量方程%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%计算李雅普诺夫指数谱函数%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function[Texp,Lexp]=lyapunov2();globalF;n=3;rhs_ext_fcn=@duff_ext;fcn_integrator=@ode45;tstart=0;stept=0.5;tend=300;ystart=[111];ioutp=10;n1=n;n2=n1*(n
8、1+1);%Numberofsteps.nit=round((tend-tstart)/stept);%Memoryallocation.y=zeros(n2,1);cum=zeros(n1,1);y0=y;gsc=cum;znorm=cum;%I