|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
本帖最后由 liliangbiao 于 2011-4-24 03:55 编辑
回复了看了很久的一个帖子,但是我认为有必要单独列出来一个帖子,供大家参考和评论!以期获得各位同仁的更为深邃的见解,不要说谢谢,太好了,共享你的程序,骂人或者挖苦的话语,等等无关的词汇,把你的看法告诉我,我们共同学习!
对于确定性动力系统,请参看Mathworks网站上的关于计算Lorenz系统的指数计算程序,尽管那只是一个在确定的参数条件下,计算Lyapunov指数谱的程序,(LET工具箱计算指数的部分也是用的那个程序哦)!要得到随一个参数变化的指数谱,只需要对这个参数做循环,记录下原来的程序中每个值对应的最后时间的三个数值即可,这是因为我们按照这个程序的思路,最后一刻的时间的三个指数才是准确的哦(这是这个程序的核心思想,时间序列的不断迭代,为了达到平衡状态,也就是某个attractor的指数谱平稳或者收敛状态,必须延长积分时间和缩小积分步长,达到这点你首先要明白积分时间和步长选择多少合适,比如看折这个attrator下的指数谱在设定的时间和步长的收敛情况,也就是指数谱的平滑情况),并且如果要想得到更为精确的最后的指数,需要对积分步长 tstep=0.5让它足够的小,例如取tstep=0.01,最后的时间tend=200足够的长,例如取tend=10000或者tend=10^8,但是这样会time-consuming!再有,一般的积分的时候,例如本程序利用的是ode45,那么就会产生transient response,也就是说从积分轨线从初始值出发到attracting on the orbits 需要一段时间,that is, transient response! (你要明白我们计算Lyapunov指数指的是某个attractor的指数,而不是某个轨线的指数,只有attracting on the orbits 才能用于计算哦),所以我们必须去掉这一块transient response,而只计算去掉transient response之后的部分,这样计算出来的平均数(Lyapunov指数就是\sigma(log(dx_n/dx_0))/n n\rightarrow inf, 这个计算公式对于任何的动力系统来说都是永远不变的哦) 才会更准确,但是很可惜,这个程序没有做到这一点(这就是为什么你看到在tend比较小的时候, 三条指数谱出现震荡的缘故,但是tend比较大的时候,就会出现平衡的,收敛的轨线的缘故。并且对于某些系统而言,如果取非常小的tend,往往会导致错误的结果,比如有些指数谱可能大于零的,但是一旦取tend非常大或者除掉transient response 之后,发现这条大于零的指数谱却趋向于0<limit cycles>或者穿越0变为负的<periodic>了,这样就会导致你的错误判断!!那么tend取多少合适呢?因为Lyapunov指数是一个极限状态,如果你的系统中含有一个微分方程是线性的,比如Lorenz系统的第一项,那么对于这个系统来说,理论上必有一条指数谱为0与之对应,因为这条轨线不会指数倍的分离,但是实际计算机运行中,你的积分次数不可能为inf, 因此只要这条指数充分靠近与0即可,比如误差在0.0001之内甚至更小!如果你的编程能力不错,你可以在源程序上改进这一点,甚至我认为你必须改正这一点!)。
注意:这里保存数组时需要做至少四列数值, 分别保存参数值,对应的指数lamda_1, 2, 3, 顺便利用Kaplan-Yorke公式把Lyapunov维数也计算出来(DKY)保存在第五列,假设例子如下:
参数 指数1 指数2 指数3 维数(DKY)
1 0.010 0 -14.00 2.0010
1.1 0.011 0 -14.10 2.0001
......(具体的Lorenz系统指数见后,格式相同)
如何对这个程序修改看各位的编程能力,呵呵,说白了,其实是修改程序的能力!
网址是http://www.mathworks.com/matlabcentral/fileexchange/4628-calculation-lyapunov-exponents-for-ode
或者是google搜索:Lyapunov exponents matlab 第一项就是(不要用百度,学术搜索或者国外搜索太烂!!).
顺便说一下,很多优秀的程序都可以在mathworks这个网站的File Exchange 板块中找到!为何不试试呢?劝各位初学者不要一味的依赖于别人的程序,自己动手搜索,自己消化吸收别人的编程思想,这样入手更快一些!自己的永远是自己的!
另外注意,对于非自治系统来说必须化为自治系统来计算Lyapunov指数,这样的话,肯定有一个指数谱恒为零(因为肯定有一个线性项)!
欢迎各位评论我的个人的观点!
附表(Lorenz系统随某参数变化的指数值及维数值, 因长度限制,不全,即作为参考格式用)
参数值 指数1 指数2 指数3 维数(DKY)
4.00000000 -1.01322859 -1.01393773 -11.63901045 0.00000000
4.10000000 -1.00424710 -1.00524168 -11.65668294 0.00000000
4.20000000 -0.99549671 -0.99649252 -11.67417756 0.00000000
4.30000000 -0.98680484 -0.98785884 -11.69149799 0.00000000
4.40000000 -0.97827580 -0.97923246 -11.70864838 0.00000000
4.50000000 -0.96967740 -0.97084184 -11.72563236 0.00000000
4.60000000 -0.96143988 -0.96225312 -11.74245361 0.00000000
4.70000000 -0.95304643 -0.95397963 -11.75911565 0.00000000
4.80000000 -0.94476019 -0.94575488 -11.77562156 0.00000000
4.90000000 -0.93659417 -0.93756258 -11.79197500 0.00000000
5.00000000 -0.92849557 -0.92945236 -11.80817884 0.00000000
5.10000000 -0.92031515 -0.92157041 -11.82423627 0.00000000
5.20000000 -0.91241626 -0.91355041 -11.84015014 0.00000000
5.30000000 -0.90437891 -0.90580946 -11.85592368 0.00000000
5.40000000 -0.89657174 -0.89797610 -11.87155929 0.00000000
5.50000000 -0.88878497 -0.89025742 -11.88705983 0.00000000
5.60000000 -0.88109688 -0.88257246 -11.90242795 0.00000000
5.70000000 -0.87341912 -0.87500698 -11.91766639 0.00000000
5.80000000 -0.86602009 -0.86729007 -11.93277735 0.00000000
5.90000000 -0.85848777 -0.85983127 -11.94776363 0.00000000
6.00000000 -0.85093839 -0.85251192 -11.96262741 0.00000000
6.10000000 -0.84362130 -0.84508030 -11.97737121 0.00000000
6.20000000 -0.83628732 -0.83778324 -11.99199743 0.00000000
6.30000000 -0.82886519 -0.83068967 -12.00650826 0.00000000
6.40000000 -0.82176809 -0.82338408 -12.02090631 0.00000000
6.50000000 -0.81457800 -0.81628216 -12.03519326 0.00000000
6.60000000 -0.80729451 -0.80938195 -12.04937217 0.00000000
6.70000000 -0.80036535 -0.80223326 -12.06344525 0.00000000
6.80000000 -0.79334446 -0.79527953 -12.07741477 0.00000000
6.90000000 -0.78624162 -0.78850814 -12.09128431 0.00000000
7.00000000 -0.77935405 -0.78161860 -12.10505667 0.00000000
7.10000000 -0.77235858 -0.77493010 -12.11873584 0.00000000
7.20000000 -0.76551892 -0.76817355 -12.13232733 0.00000000
7.30000000 -0.75874130 -0.76143451 -12.14583922 0.00000000
7.40000000 -0.75181112 -0.75491238 -12.15928675 0.00000000
7.50000000 -0.74487416 -0.74842360 -12.17270773 0.00000000
7.60000000 -0.73759603 -0.74211355 -12.18629091 0.00000000
7.70000000 -0.73128106 -0.73552511 -12.19918963 0.00000000
7.80000000 -0.72538277 -0.72883374 -12.21177480 0.00000000
7.90000000 -0.71933231 -0.72220309 -12.22445132 0.00000000
8.00000000 -0.71305319 -0.71583152 -12.23709754 0.00000000
8.10000000 -0.70686735 -0.70942497 -12.24968528 0.00000000
8.20000000 -0.70077346 -0.70299512 -12.26220449 0.00000000
8.30000000 -0.69463402 -0.69668407 -12.27465032 0.00000000
8.40000000 -0.68853924 -0.69040371 -12.28702097 0.00000000
8.50000000 -0.68237254 -0.68427152 -12.29931531 0.00000000
8.60000000 -0.67632745 -0.67809421 -12.31153310 0.00000000
8.70000000 -0.67040234 -0.67187323 -12.32367451 0.00000000
8.80000000 -0.66430516 -0.66590024 -12.33574024 0.00000000
8.90000000 -0.65845083 -0.65975975 -12.34773076 0.00000000
9.00000000 -0.65242173 -0.65386873 -12.35964617 0.00000000
9.10000000 -0.64651753 -0.64792678 -12.37148776 0.00000000
9.20000000 -0.64069140 -0.64197996 -12.38325638 0.00000000
9.30000000 -0.63498547 -0.63598534 -12.39495282 0.00000000
9.40000000 -0.62909037 -0.63025150 -12.40657675 0.00000000
9.50000000 -0.62345083 -0.62433286 -12.41813052 0.00000000
9.60000000 -0.61762080 -0.61867467 -12.42961439 0.00000000
9.70000000 -0.61191882 -0.61295757 -12.44102872 0.00000000
9.80000000 -0.60627250 -0.60725313 -12.45237513 0.00000000
9.90000000 -0.60070318 -0.60153918 -12.46365391 0.00000000
10.00000000 -0.59521979 -0.59580600 -12.47486591 0.00000000
10.10000000 -0.58952176 -0.59035337 -12.48601221 0.00000000
10.20000000 -0.58414029 -0.58464929 -12.49709321 0.00000000
10.30000000 -0.57860024 -0.57916814 -12.50811001 0.00000000
10.40000000 -0.57308429 -0.57372646 -12.51906325 0.00000000
10.50000000 -0.56765480 -0.56826115 -12.52995369 0.00000000
10.60000000 -0.56230476 -0.56277849 -12.54078187 0.00000000
10.70000000 -0.55701706 -0.55729483 -12.55154889 0.00000000
10.80000000 -0.55155367 -0.55204750 -12.56225516 0.00000000
10.90000000 -0.54634007 -0.54661032 -12.57290159 0.00000000
11.00000000 -0.54095376 -0.54140508 -12.58348868 0.00000000
11.10000000 -0.53579359 -0.53603224 -12.59401755 0.00000000
11.20000000 -0.53062614 -0.53072457 -12.60448806 0.00000000
11.30000000 -0.52543498 -0.52549782 -12.61490177 0.00000000
11.40000000 -0.52026685 -0.52030459 -12.62525896 0.00000000
11.50000000 -0.51506463 -0.51520139 -12.63556015 0.00000000
11.60000000 -0.50988303 -0.51013285 -12.64580607 0.00000000
11.70000000 -0.50492476 -0.50489566 -12.65599727 0.00000000
11.80000000 -0.49975629 -0.49992273 -12.66613451 0.00000000
11.90000000 -0.49485654 -0.49473454 -12.67621824 0.00000000
12.00000000 -0.48975246 -0.48980357 -12.68624921 0.00000000
12.10000000 -0.48473516 -0.48483811 -12.69622694 0.00000000
12.20000000 -0.47979283 -0.47984937 -12.70615497 0.00000000
12.30000000 -0.47486615 -0.47489617 -12.71603060 0.00000000
12.40000000 -0.46995462 -0.46997845 -12.72585504 0.00000000
12.50000000 -0.46511349 -0.46504036 -12.73563005 0.00000000
12.60000000 -0.46036168 -0.46006251 -12.74535439 0.00000000
12.70000000 -0.45541882 -0.45532467 -12.75503207 0.00000000
12.80000000 -0.45068021 -0.45043110 -12.76465996 0.00000000
12.90000000 -0.44582623 -0.44570085 -12.77423998 0.00000000
13.00000000 -0.44118859 -0.44080174 -12.78377239 0.00000000
13.10000000 -0.43637850 -0.43612207 -12.79325809 0.00000000
13.20000000 -0.43161164 -0.43144564 -12.80269722 0.00000000
13.30000000 -0.42691763 -0.42674238 -12.81209027 0.00000000
13.40000000 -0.42225160 -0.42205666 -12.82143795 0.00000000
13.50000000 -0.41760702 -0.41739456 -12.83074080 0.00000000
13.60000000 -0.41301772 -0.41272182 -12.83999827 0.00000000
13.70000000 -0.40850619 -0.40801547 -12.84921171 0.00000000
13.80000000 -0.40386713 -0.40348032 -12.85838196 0.00000000
13.90000000 -0.39926002 -0.39895650 -12.86750872 0.00000000
14.00000000 -0.39482534 -0.39430311 -12.87659282 0.00000000
14.10000000 -0.39020996 -0.38987281 -12.88563444 0.00000000
14.20000000 -0.38574615 -0.38533295 -12.89463408 0.00000000
14.30000000 -0.38134817 -0.38076882 -12.90359228 0.00000000
14.40000000 -0.37681248 -0.37638358 -12.91250950 0.00000000
14.50000000 -0.37233213 -0.37198375 -12.92138548 0.00000000
14.60000000 -0.36791017 -0.36756589 -12.93022108 0.00000000
14.70000000 -0.36351366 -0.36316255 -12.93901707 0.00000000
14.80000000 -0.35913703 -0.35877892 -12.94777283 0.00000000
14.90000000 -0.35480365 -0.35439122 -12.95648988 0.00000000
15.00000000 -0.35053965 -0.34997295 -12.96516819 0.00000000
15.10000000 -0.34622087 -0.34564789 -12.97380789 0.00000000
15.20000000 -0.34181397 -0.34144900 -12.98241012 0.00000000
15.30000000 -0.33762888 -0.33706600 -12.99097407 0.00000000
15.40000000 -0.33328931 -0.33287479 -12.99950075 0.00000000
15.50000000 -0.32911083 -0.32855948 -13.00799089 0.00000000
15.60000000 -0.32478171 -0.32443142 -13.01644435 0.00000000
15.70000000 -0.32067477 -0.32011740 -13.02486140 0.00000000
15.80000000 -0.31645781 -0.31594934 -13.03324261 0.00000000
15.90000000 -0.31220093 -0.31185669 -13.04158893 0.00000000
16.00000000 -0.30802462 -0.30771871 -13.04989945 0.00000000
16.10000000 -0.30389178 -0.30357213 -13.05817494 0.00000000
16.20000000 -0.29976927 -0.29944971 -13.06641626 0.00000000
16.30000000 -0.29564697 -0.29536124 -13.07462402 0.00000000
16.40000000 -0.29153378 -0.29129750 -13.08279698 0.00000000
16.50000000 -0.28745976 -0.28722808 -13.09093689 0.00000000
16.60000000 -0.28346117 -0.28311638 -13.09904360 0.00000000
16.70000000 -0.27944853 -0.27905148 -13.10711793 0.00000000
16.80000000 -0.27530478 -0.27515016 -13.11515957 0.00000000
16.90000000 -0.27133454 -0.27110744 -13.12316923 0.00000000
17.00000000 -0.26733998 -0.26712074 -13.13114723 0.00000000
17.10000000 -0.26330697 -0.26320393 -13.13909371 0.00000000
17.20000000 -0.25935779 -0.25923428 -13.14700935 0.00000000
17.30000000 -0.25542075 -0.25528312 -13.15489430 0.00000000
17.40000000 -0.25138483 -0.25146108 -13.16274928 0.00000000
17.50000000 -0.24752670 -0.24749115 -13.17057388 0.00000000
17.60000000 -0.24365015 -0.24356909 -13.17836948 0.00000000
17.70000000 -0.23968354 -0.23976617 -13.18613579 0.00000000
17.80000000 -0.23574482 -0.23596388 -13.19387397 0.00000000
17.90000000 -0.23184869 -0.23214707 -13.20158292 0.00000000
18.00000000 -0.22797740 -0.22833287 -13.20926627 0.00000000
18.10000000 -0.22412359 -0.22452828 -13.21692152 0.00000000
18.20000000 -0.22029484 -0.22072481 -13.22455058 0.00000000
18.30000000 -0.21650805 -0.21690509 -13.23215411 0.00000000
18.40000000 -0.21274029 -0.21309106 -13.23973329 0.00000000
18.50000000 -0.20887228 -0.20940099 -13.24728809 0.00000000
18.60000000 -0.20500266 -0.20573520 -13.25482085 0.00000000
18.70000000 -0.20130733 -0.20191630 -13.26233236 0.00000000
18.80000000 -0.19745869 -0.19827014 -13.26982450 0.00000000
18.90000000 -0.19369626 -0.19455488 -13.27729940 0.00000000
19.00000000 -0.18988981 -0.19089759 -13.28476022 0.00000000
19.10000000 -0.18618762 -0.18714457 -13.29221270 0.00000000
19.20000000 -0.18230011 -0.18357930 -13.29966218 0.00000000
19.30000000 -0.17849426 -0.17992272 -13.30712182 0.00000000
19.40000000 -0.17467945 -0.17624287 -13.31461347 0.00000000
19.50000000 -0.17074851 -0.17259810 -13.32218604 0.00000000
19.60000000 -0.16676172 -0.16876762 -13.32999998 0.00000000
19.70000000 -0.15866950 -0.16411026 -13.34273886 0.00000000
19.80000000 -0.15710528 -0.16119003 -13.34722447 0.00000000
19.90000000 -0.14974192 -0.15715165 -13.35861617 0.00000000
20.00000000 -0.14143057 -0.15154567 -13.37251928 0.00000000
20.10000000 -0.14740896 -0.15075764 -13.36734510 0.00000000
20.20000000 -0.14334689 -0.14718593 -13.37497473 0.00000000
20.30000000 -0.14049064 -0.14323405 -13.38177930 0.00000000
20.40000000 -0.13778087 -0.14041632 -13.38730738 0.00000000
20.50000000 -0.10153628 -0.13197724 -13.43192846 0.00000000
20.60000000 -0.12522270 -0.13260726 -13.40766001 0.00000000
20.70000000 -0.11003365 -0.12756066 -13.42787170 0.00000000
20.80000000 -0.11940000 -0.12582069 -13.42026419 0.00000000
20.90000000 -0.11349288 -0.12212696 -13.42986039 0.00000000
21.00000000 -0.11732127 -0.11977556 -13.42839505 0.00000000
21.10000000 -0.10959233 -0.11524018 -13.44064880 0.00000000
21.20000000 -0.10292363 -0.11196690 -13.45058333 0.00000000
21.30000000 -0.10517287 -0.10896083 -13.45134585 0.00000000
21.40000000 -0.09164035 -0.10457815 -13.46924027 0.00000000
21.50000000 -0.06829059 -0.09859797 -13.49853131 0.00000000
21.60000000 -0.08989103 -0.09847804 -13.47709794 0.00000000
21.70000000 -0.07125024 -0.09354196 -13.50064316 0.00000000
21.80000000 -0.08393852 -0.09224058 -13.48928385 0.00000000
21.90000000 -0.08157201 -0.08873665 -13.49515792 0.00000000
22.00000000 -0.07027148 -0.08471666 -13.51045709 0.00000000
22.10000000 -0.06615445 -0.08154178 -13.51774726 0.00000000
22.20000000 -0.02248328 -0.07412006 -13.56875577 0.00000000
22.30000000 -0.06657774 -0.07564729 -13.52323029 0.00000000
22.40000000 -0.05594720 -0.07178840 -13.53770111 0.00000000
22.50000000 -0.05872253 -0.06899854 -13.53772625 0.00000000
22.60000000 -0.06321988 -0.06643083 -13.53581139 0.00000000
22.70000000 0.03398536 -0.05544599 -13.64380266 1.00249090
22.80000000 -0.03997542 -0.05878884 -13.56665820 0.00000000
22.90000000 0.00214376 -0.05257804 -13.61490622 1.00015746
23.00000000 0.04161877 -0.04720477 -13.65967936 1.00304683
23.10000000 0.04824213 -0.04359166 -13.66990167 2.00034020
23.20000000 0.36892758 -0.02126282 -14.01224141 2.02481150
23.30000000 0.72842975 0.00230842 -14.39455365 2.05076491
23.40000000 0.31183413 -0.02148137 -13.95504746 2.02080629
23.50000000 -0.02877049 -0.03739779 -13.59926705 0.00000000
23.60000000 0.73061604 0.00235997 -14.39677176 2.05091253
23.70000000 0.76964809 0.00243078 -14.43575548 2.05348379
23.80000000 0.75375586 0.00225116 -14.41971568 2.05242871
23.90000000 0.77170258 0.00196833 -14.43733429 2.05358821
24.00000000 0.77381282 0.00266195 -14.44011876 2.05377205
24.10000000 0.77830248 0.00191120 -14.44384656 2.05401703
24.20000000 0.77353474 0.00228992 -14.43947641 2.05372942
24.30000000 0.79010511 0.00214556 -14.45585457 2.05480483
24.40000000 0.78459638 0.00214480 -14.45034483 2.05444446
24.50000000 0.79158060 0.00253276 -14.45767397 2.05492677
24.60000000 0.80887873 0.00211998 -14.47454854 2.05602929
24.70000000 0.81065982 0.00195491 -14.47613337 2.05613479
24.80000000 0.80660711 0.00275114 -14.47288867 2.05592237
24.90000000 0.82259571 0.00194847 -14.48801047 2.05691217
25.00000000 0.81942784 0.00212805 -14.48506254 2.05671746
25.10000000 0.82548194 0.00189506 -14.49082906 2.05709660
25.20000000 0.82558699 0.00249203 -14.49152847 2.05714228
25.30000000 0.82687842 0.00234800 -14.49267366 2.05721694
25.40000000 0.82876050 0.00256173 -14.49474356 2.05735336
25.50000000 0.83281550 0.00206299 -14.49829561 2.05758460
25.60000000 0.82839713 0.00257569 -14.49439595 2.05733063
25.70000000 0.83603001 0.00209563 -14.50153467 2.05779565
25.80000000 0.84626392 0.00218018 -14.51179524 2.05846583
25.90000000 0.84470432 0.00246276 -14.51054221 2.05838287
26.00000000 0.84785969 0.00241880 -14.51362878 2.05858483
26.10000000 0.84638118 0.00261297 -14.51234283 2.05850152
26.20000000 0.86441116 0.00242272 -14.53011614 2.05965774
26.30000000 0.85652778 0.00247069 -14.52231018 2.05915026
26.40000000 0.86511867 0.00267889 -14.53105181 2.05972022
26.50000000 0.84856009 0.00273680 -14.51461281 2.05865102
26.60000000 0.86723832 0.00247549 -14.53298243 2.05984414
26.70000000 0.85836400 0.00252359 -14.52416631 2.05927277
26.80000000 0.87099161 0.00244943 -14.53669719 2.06008525
|
-
-
评分
-
2
查看全部评分
-
|