小数据量计算最大lyapunov代码_Software | 计算Lyapunov指数的GUI工具箱及函数包汇总...
二十年前讀書時用過的Lyapunov Exponents Toolbox,推薦給做非線性動力學入門的同學們。那個時候不會編寫程序,做分支圖、算連續或者離散系統的Lyapunov指數,極其困難,還好有這個工具箱,慢慢看源程序學會寫一點改進的程序。所以真的很感謝有人愿意分享自己的小工具給大家。
數學中非線性動力學是個經典的領域,每年都會有學生進入到這個領域學習,煎熬的日子也會重演,所以搜集一些小工具給他們也許會很有用。
先去這里看看GUI界面的LET工具箱吧:
https://www.mathworks.com/matlabcentral/fileexchange/233-let?s_tid=srchtitle
Lyapunov指數工具箱(LET)為用戶確定連續和離散混沌系統的Lyapunov指數和Lyapunov維數提供了一個圖形用戶界面。
此工具箱只能在Matlab5或更高版本的MATLAB上運行。它已經在Windows和Unix下測試過,也可以在其他平臺上運行。
要運行程序,請在MATLAB命令窗口中輸入LET。這個工具箱的詳細描述可以在文件README.M中找到。
Cite As:?
Steve SIU (2020).?
let,MATLAB Central File Exchange. Retrieved May 21, 2020.?
https://www.mathworks.com/matlabcentral/fileexchange/233-let.
如果你入門會使用它計算LE后,想自己寫代碼算一些個性化的系統的LE,你可以看看它的源代碼,或者看看下面的純腳本函數形式的LE計算小包,它是1985年Wolf那篇Phys D上經典文章的算法實現,也是軟件包MATDS的一部分,我個人覺得很有參考價值:
Calculation Lyapunov Exponents for ODE:
https://www.mathworks.com/matlabcentral/fileexchange/4628-calculation-lyapunov-exponents-for-ode?s_tid=FX_rc1_behav
本函數包實現ODE系統的Lyapunov指數計算。這個m文件中用于實現Lyapunov指數的算法,該算法來源于A.Wolf、J.B.Swift、H.L.Swinney和J.A.Vastano,Physica D,1985年,第16卷,第285-317頁的經典文章。
對于集成ODE系統可以使用任何MATLAB的ODE Suite。
此函數是MATDS動態系統研究工具箱的一部分。感興趣的讀者可參見:?
http://www.math.rsu.ru/mexmat/kvm/matds/
輸入參數簡介:
Input parameters:?
n - number of equation?
rhs_ext_fcn - handle of function with right hand side of extended ODE-system.?
This function must include RHS of ODE-system coupled with variational equation (n items of linearized systems, see Example).?
fcn_integrator - handle of ODE integrator function, for example: @ode45?
tstart - start values of independent value (time t)?
stept - step on t-variable for Gram-Schmidt renormalization procedure.?
tend - finish value of time?
ystart - start point of trajectory of ODE system.?
ioutp - step of print to MATLAB main window. ioutp==0 - no print, if ioutp>0 then each ioutp-th point will be print.
輸出參數簡介:
Output parameters:?
Texp - time values?
Lexp - Lyapunov exponents to each time value.
Users have to write their own ODE functions for their specified systems and use handle of this function as rhs_ext_fcn - parameter.?
樣例:
Example.?
洛倫茲系統:
Lorenz system:?
dx/dt = sigma*(y - x)?
dy/dt = r*x - y - x*z?
dz/dt = x*y - b*z
雅可比矩陣:
The Jacobian of system:?
| -sigma sigma 0 |?
J = | r-z -1 -x |?
| y x -b |
變分方程:
Then, the variational equation has a form:?
F = J*Y?
where Y is a square matrix with the same dimension as J.?
相關調用的動力系統函數:
Corresponding m-file:?
function f=lorenz_ext(t,X)?
SIGMA = 10; R = 28; BETA = 8/3;?
x=X(1); y=X(2); z=X(3);?
Y= [X(4), X(7), X(10);?
X(5), X(8), X(11);?
X(6), X(9), X(12)];?
f=zeros(9,1);?
f(1)=SIGMA*(y-x);?
f(2)=-x*z+R*x-y;?
f(3)=x*y-BETA*z;?
Jac=[-SIGMA,SIGMA,0;?
R-z,-1,-x; y, x,-BETA];?
f(4:12)=Jac*Y;
計算執行的代碼:
% Run Lyapunov exponent calculation:?
[T,Res]=lyapunov(3,@lorenz_ext,@ode45,0,0.5,200,[0 1 0],10);?
具體參見:
See files:?
lyapunov.m - algorithm?
lorenz_ext - Lorenz system extended rhs?
run_lyap - example of calling and result visualization?
此函數是MATDS動態系統研究工具箱的一部分。感興趣的讀者可參見:?
http://www.math.rsu.ru/mexmat/kvm/matds/
Cite As:?
Vasiliy Govorukhin (2020).?
Calculation Lyapunov Exponents for ODE,MATLAB Central File Exchange. Retrieved May 21, 2020.??
https://www.mathworks.com/matlabcentral/fileexchange/4628-calculation-lyapunov-exponents-for-ode.
同一篇文章的算法實現,你也可以看看下面論文原作者的這個函數怎么寫的:
Wolf Lyapunov exponent estimation from a time series.?
A Matlab version of the Lyapunov exponent estimation algorithm of Wolf et al. -- Physica 16D, 1985.?
by?Alan Wolf?
https://www.mathworks.com/matlabcentral/fileexchange/48084-wolf-lyapunov-exponent-estimation-from-a-time-series?s_tid=FX_rc2_behav
在Physica 16D(1985)那篇文章中,我們提出了一種通過監測軌道發散來估計一維時間序列的主Lyapunov指數的算法。該算法是作者用Fortran和C語言編寫的。現在我們把它轉換成了Matlab語言。? ? ? ? ? ? ??
上述地址下載的壓縮包里包括文檔:Physica D文章、名為Lyapunews的pdf文件。該包包含的示例文件是以unix換行符結尾的數據點編寫的。這些文件在被各種編輯器顯示時可能看起來很奇怪。它可以使用任何可以輸出時間序列值的軟件創建數據文件,每行一個,以回車和換行結束。現有的代碼可以很好地讀取這些文件。如果你有問題,請不要在這里發帖,直接發郵件給作者吧。
awolf.physics@gmail.com
Cite As:?
Alan Wolf (2020). Wolf Lyapunov exponent estimation from a time series.?
https://www.mathworks.com/matlabcentral/fileexchange/48084-wolf-lyapunov-exponent-estimation-from-a-time-series,?
MATLAB Central File Exchange. Retrieved May 21, 2020.?
其他方法計算LE,可以看看下面的這個Rosenstein方法:
Largest Lyapunov Exponent with Rosenstein's Algorithm?
https://www.mathworks.com/matlabcentral/fileexchange/38424-largest-lyapunov-exponent-with-rosenstein-s-algorithm?s_tid=FX_rc3_behav
by mirwais?
This code calculates the largest lyapunov exponent of time series with Rosenstein's Algorithm.
基于本代碼做圖,在圖上可以看到臨近軌線的發散。如果確定了軌線的線性范圍,代碼就可以計算出最大的lyapunov指數。代碼已經用Rosenstein文章的結果進行了測試。
Cite As:?
mirwais (2020). Largest Lyapunov Exponent with Rosenstein's Algorithm?
https://www.mathworks.com/matlabcentral/fileexchange/38424-largest-lyapunov-exponent-with-rosenstein-s-algorithm,?
MATLAB Central File Exchange. Retrieved May 21, 2020.?
總結
以上是生活随笔為你收集整理的小数据量计算最大lyapunov代码_Software | 计算Lyapunov指数的GUI工具箱及函数包汇总...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 国服服务器_外服玩家热议LOL国服倒计时
- 下一篇: 电大计算机网考上机操作题,电大计算机上机