声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 6127|回复: 25

[分形与混沌] 关于lyapunov指数的问题

[复制链接]
发表于 2007-4-24 20:29 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
用“计算连续方程Lyapunov指数的程序”算了一个单自由度系统振动的lyapunov指数,
系统是一个二阶的微分方程,算出了有三个Lyapunov指数曲线,请问有没有人可以帮我解释一下,这三个是不是都是有效的,还是只有一个有用??

这个在Lyapunov指数的定义中好像没有看到过啊!!

请帮忙讨论一下,谢谢!

方程如下:
x''=-A*omiga^2*sin(omiga*t)-B0-B1*x-B2*x^3-C1*x'-C2*x'^2

参数这里就不给出了,可以自己定义的!

Lyapunov指数图

Lyapunov指数图

本帖被以下淘专辑推荐:

回复
分享到:

使用道具 举报

发表于 2007-4-25 02:12 | 显示全部楼层
三个Lyapunov指数?能否说明一下什么意思?
 楼主| 发表于 2007-4-25 07:39 | 显示全部楼层
对 啊,我就是不明白用这个程序怎么算出三个Lyapunov指数的啊!!
请各位懂的朋友多多帮忙啊!!
发表于 2007-4-25 07:42 | 显示全部楼层
原帖由 octopussheng 于 2007-4-25 07:39 发表
对 啊,我就是不明白用这个程序怎么算出三个Lyapunov指数的啊!!
请各位懂的朋友多多帮忙啊!!

那你就需要把程序给出,否则别人怎么知道你算得是什么
 楼主| 发表于 2007-4-25 07:44 | 显示全部楼层
本帖最后由 牛小贱 于 2015-3-16 11:35 编辑

代码如下:
  1. %
  2. % 计算Rossler吸引子的Lyapunov指数
  3. %  2004.10.20 zya
  4. %

  5. clear;
  6. yinit = [1,1,0.5];
  7. orthmatrix = [1 0 0;
  8.               0 1 0;
  9.               0 0 1];
  10. a = 0.15;
  11. b = 0.20;
  12. c = 10.0;
  13. y = zeros(12,1);
  14. % 初始化输入
  15. y(1:3) = yinit;
  16. y(4:12) = orthmatrix;

  17. tstart = 0; % 时间初始值
  18. tstep = 1e-3; % 时间步长
  19. wholetimes = 1e5; % 总的循环次数
  20. steps = 10; % 每次演化的步数
  21. iteratetimes = wholetimes/steps; % 演化的次数

  22. mod = zeros(3,1);
  23. lp = zeros(3,1);
  24. % 初始化三个Lyapunov指数
  25. Lyapunov1 = zeros(iteratetimes,1);
  26. Lyapunov2 = zeros(iteratetimes,1);
  27. Lyapunov3 = zeros(iteratetimes,1);

  28. for i=1:iteratetimes
  29.     tspan = tstart:tstep:(tstart + tstep*steps);   
  30.     [T,Y] = ode45('Rossler_ly', tspan, y);
  31.     % 取积分得到的最后一个时刻的值
  32.     y = Y(size(Y,1),:);
  33.     % 重新定义起始时刻
  34.     tstart = tstart + tstep*steps;
  35.     y0 = [y(4) y(7) y(10);
  36.           y(5) y(8) y(11);
  37.           y(6) y(9) y(12)];
  38.     %正交化
  39.     y0 = FourGS(y0);
  40.     % 取三个向量的模
  41.     mod(1) = sqrt(y0(:,1)'*y0(:,1));
  42.     mod(2) = sqrt(y0(:,2)'*y0(:,2));
  43.     mod(3) = sqrt(y0(:,3)'*y0(:,3));
  44.     y0(:,1) = y0(:,1)/mod(1);
  45.     y0(:,2) = y0(:,2)/mod(2);
  46.     y0(:,3) = y0(:,3)/mod(3);
  47.    
  48.     lp = lp+log(abs(mod));
  49.     %三个Lyapunov指数
  50.     Lyapunov1(i) = lp(1)/(tstart);
  51.     Lyapunov2(i) = lp(2)/(tstart);
  52.     Lyapunov3(i) = lp(3)/(tstart);
  53.    
  54.     y(4:12) = y0';
  55. end
  56. % 作Lyapunov指数谱图
  57. i = 1:iteratetimes;
  58. plot(i,Lyapunov1,i,Lyapunov2,i,Lyapunov3)
复制代码


点评

善用编辑功能!  发表于 2015-3-16 11:37
 楼主| 发表于 2007-4-25 07:45 | 显示全部楼层
本帖最后由 牛小贱 于 2015-3-16 11:36 编辑

Rosser吸引子程序:
  1. function dX = Rossler_ly(t,X)
  2. %
  3. %  Rossler吸引子,用来计算Lyapunov指数
  4. %        a=0.15,b=0.20,c=10.0
  5. %        dx/dt = -y-z,
  6. %        dy/dt = x+ay,
  7. %        dz/dt = b+z(x-c),
  8. %  2004.10.20 zya
  9. %

  10. a = 0.15;
  11. b = 0.20;
  12. c = 10.0;

  13. x=X(1); y=X(2); z=X(3);
  14. % Y的三个列向量为相互正交的单位向量
  15. Y = [X(4), X(7), X(10);
  16.     X(5), X(8), X(11);
  17.     X(6), X(9), X(12)];
  18. % 输出向量的初始化,必不可少
  19. dX = zeros(12,1);

  20. % Rossler吸引子
  21. dX(1) = -y-z;
  22. dX(2) = x+a*y;
  23. dX(3) = b+z*(x-c);

  24. % Rossler吸引子的Jacobi矩阵
  25. Jaco = [0 -1 -1;
  26.         1 a  0;
  27.         z 0  x-c];
  28.         
  29. dX(4:12) = Jaco*Y;
复制代码


 楼主| 发表于 2007-4-25 07:46 | 显示全部楼层
本帖最后由 牛小贱 于 2015-3-16 11:36 编辑

还有中间用到的那个FourGS程序:
  1. % 四维G-S变换
  2. function A = FourGS(V)  % V 为4*4向量
  3. v1 = V(:,1);
  4. v2 = V(:,2);
  5. v3 = V(:,3);
  6. v4 = V(:,4);
  7. a1 = zeros(4,1);
  8. a2 = zeros(4,1);
  9. a3 = zeros(4,1);
  10. a4 = zeros(4,1);
  11. a1 = v1;
  12. a2 = v2-((a1'*v2)/(a1'*a1))*a1;
  13. a3 = v3-((a1'*v3)/(a1'*a1))*a1-((a2'*v3)/(a2'*a2))*a2;
  14. a4 = v4-((a1'*v4)/(a1'*a1))*a1-((a2'*v4)/(a2'*a2))*a2-((a3'*v4)/(a3'*a3))*a3;
  15. A = [a1,a2,a3,a4];
复制代码
其实这些都是论坛里面的!
发表于 2007-4-25 16:03 | 显示全部楼层
这个方程是应该有三个Lyapunov指数的!
虽然这个方程是二阶微分方程,但是含有强迫激励,因此在计算Lyapunov指数时,转换为状态空间应该是三维的,那么最后就应该有三个Lyapunov指数。
发表于 2007-4-25 17:28 | 显示全部楼层
由方程x''=-A*omiga^2*sin(omiga*t)-B0-B1*x-B2*x^3-C1*x'-C2*x'^2
改写为
dx=y;
dy=-A*omiga^2*sin(omiga*z)-B0-B1*x-B2*x^3-c1*y-c2*y^2;
dz=1;
对应的Jocobi矩阵也是3*3的
得到三个Lyapunov指数
发表于 2007-4-25 18:19 | 显示全部楼层
弱弱的问一句,什么是lyapunov指数?
发表于 2007-4-26 00:44 | 显示全部楼层
原帖由 net22446688 于 2007-4-25 18:19 发表
弱弱的问一句,什么是lyapunov指数?

判断运动稳定性的方法,任何非线性动力学的书上都会介绍到,以下是转贴

  1. The hardest thing to get right about Lyapunov exponents is the spelling of Lyapunov, which you will variously find as Liapunov, Lyapunof and even Liapunoff. Of course Lyapunov is really spelled in the Cyrillic(古代斯拉夫语) alphabet: (Lambda)(backwards r)(pi)(Y)(H)(0)(B). Now that there is an ANSI standard of transliteration for Cyrillic, we expect all references to converge on the version Lyapunov.

  2. Lyapunov was born in Russia in 6 June 1857. He was greatly influenced by Chebyshev and was a student with Markov. He was also a passionate(充满热情的) man: Lyapunov shot himself the day his wife died. He died 3 Nov. 1918, three days later. According to the request on a note he left, Lyapunov was buried with his wife.
  3. Lyapunov left us with more than just a simple note. He left a collection of papers on the equilibrium shape of rotating liquids, on probability, and on the stability of low-dimensional dynamical systems. It was from his dissertation(论文) that the notion of Lyapunov exponent emerged. Lyapunov was interested in showing how to discover if a solution to a dynamical system is stable or not for all times. The usual method of studying stability, i.e. linear stability, was not good enough, because if you waited long enough the small errors due to linearization would pile up and make the approximation invalid.
  4. Lyapunov developed concepts (now called Lyapunov Stability) to overcome these difficulties. Lyapunov exponents measure the rate at which nearby orbits converge or diverge. There are as many Lyapunov exponents as there are dimensions in the state space of the system, but the largest is usually the most important. Roughly speaking the (maximal) Lyapunov exponent is the time constant, lambda, in the expression for the distance between two nearby orbits, exp(lambda * t).! If lambda is negative, then the orbits converge in time, and the dynamical system is insensitive to initial conditions.! However, if lambda is positive, then the distance between nearby orbits grows exponentially in time, and the system exhibits sensitive dependence on initial conditions.

  5. There are basically two ways to compute Lyapunov exponents. In one way one chooses two nearby points, evolves them in time, measuring the growth rate of the distance between them. This is useful when one has a time series, but has the disadvantage that the growth rate is really not a local effect as the points separate. A better way is to measure the growth rate of tangent vectors to a given orbit.
  6. More precisely, consider a map f in an m dimensional phase space, and its derivative matrix Df(x). Let v be a tangent vector at the point x. Then we define a function
  7. L(x,v) = lim (1/n)ln |( Dnf (x)v )|
  8.         n -> ¥

  9. Now the Multiplicative Ergodic Theorem of Oseledec states that this limit exists for almost all points x and all tangent vectors v. There are at most m distinct values of L as we let v range over the tangent space. These are the Lyapunov exponents at x.
复制代码
发表于 2007-4-26 00:46 | 显示全部楼层
原帖由 shenyongjun 于 2007-4-25 16:03 发表
这个方程是应该有三个Lyapunov指数的!
虽然这个方程是二阶微分方程,但是含有强迫激励,因此在计算Lyapunov指数时,转换为状态空间应该是三维的,那么最后就应该有三个Lyapunov指数。
  1.     % 取三个向量的模

  2.     mod(1) = sqrt(y0(:,1)'*y0(:,1));

  3.     mod(2) = sqrt(y0(:,2)'*y0(:,2));

  4.     mod(3) = sqrt(y0(:,3)'*y0(:,3));

  5.     y0(:,1) = y0(:,1)/mod(1);

  6.     y0(:,2) = y0(:,2)/mod(2);

  7.     y0(:,3) = y0(:,3)/mod(3);

  8.    

  9.     lp = lp+log(abs(mod));

  10.     %三个Lyapunov指数

  11.     Lyapunov1(i) = lp(1)/(tstart);

  12.     Lyapunov2(i) = lp(2)/(tstart);

  13.     Lyapunov3(i) = lp(3)/(tstart);
复制代码


看这一段程序,已经说明的非常清楚了

评分

1

查看全部评分

 楼主| 发表于 2007-4-26 08:01 | 显示全部楼层
感谢gghhjj的指教!

那这样的话,按照理解,是不是只有第一个Lyapunov指数的值才是对于判断系统稳定性有用的啊??
发表于 2007-4-27 01:57 | 显示全部楼层
原帖由 octopussheng 于 2007-4-26 08:01 发表
感谢gghhjj的指教!

那这样的话,按照理解,是不是只有第一个Lyapunov指数的值才是对于判断系统稳定性有用的啊??

要看最大Lyapunov指数
 楼主| 发表于 2007-4-27 07:21 | 显示全部楼层
谢谢gghhjj的指点!!
了解了!:lol
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-12-28 13:44 , Processed in 0.079569 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表