初めてこのページに来られた方へ
for first-time visitors to this page

昔、私が非線形システムやカオスの勉強を始めたとき、色んな本を読みました。それらの本には、カオスの有名なモデル(システム)の数式が紹介され、美しいアトラクターが描かれ、そして、その軌道がカオス的であるとき、正のリアプノフ指数が存在すると書かれていました。システムの変数の数がk 個の場合、k 個のリアプノフ指数が存在し、その組のことをリアプノフスペクトラムと呼ぶと書かれていました。それを見て、紹介されたモデルのデータを発生させ、そのアトラクターを描いて、記載されているリアプノフスペクトラムの値を自分で求めたいと思いました。それを手計算で行うわけにはいかないので、ほぼ同時にプログラミングの勉強も始めました。
数式からデータを発生させるプログラムを組み、アトラクタを描くところまでは、あまり時間がかかりませんでした。しかし、リアプノフスペクトラムを計算することが、すぐには出来ませんでした。リアプノフスペクトラムを計算するためには、ヤコビ行列やグラム・シュミットの正規直交化法を使う必要があります。ちょっと恥ずかしい話なのですが、私は非常に不勉強な学生だったので、授業で習ったはずのヤコビ行列やグラム・シュミットの正規直交化法のことを良く分かっていなかったのです。しばらくしてそれらのことが分かり、差分方程式のリアプノフスペクトラムを求められるようになりました。でも、微分方程式のリアプノフスペクトラムを求められるようになるのは、ずっと後になってからでした。つまり、エノン写像のリアプノフスペクトルは求められたけれど、ローレンツ方程式のリアプノフスペクトラムは長い間求められなかったということです。
カオスとプログラミングを学び始めた頃、困ったことがありました。計算が上手くいかなかったとき、その原因が自分のプログラムが間違っているのか、それとも理論に対する自分の理解が間違っているのかがはっきりしなかったのです。私の理論を理解する力やプログラミング能力が低いことが一番の理由ですが、もし分かりやすいプログラムがあったら、随分と助かっていただろうと思います。
私は、これまで非常に多くの人に迷惑をかけながら、そして助けられながら勉強をしてきました。私のようにちょっとお馬鹿で不器用人が、世の中には少しはいるだろうと思います。そこで、どれだけ需要があるか分かりませんが、ささやかな恩返しとせめてもの罪滅ぼしとして、自分がなかなかできなくて困った非線形システムのリアプノフスペクトラムを計算するプログラムを公開することにしました。私が用いた計算方法は、James  Doyne Farmerが1982年に発表した方法 Alan Wolfらが1985年に発表した方法 ですので、非常に基本的なものです。いろんなところで私のプログラミングの変な癖は出ていると思いますが、私は未だにプログラミングが得意ではないので、誰が見ても分かる非常に単純な書き方をしています。ですから、多くの人が見ても分かりやすいプログラムになっていると思います。これらのプログラムが、みなさんの役に少しでも立ってくれたら嬉しいです。

中村 知道

When I started studying nonlinear systems and chaos a long time ago, I read various books.  In these books, the mathematical formulae for the well-known models (systems) of chaos were introduced, beautiful attractors were drawn, and it was written that a positive Lyapunov exponent exists when the trajectory is chaotic.  It further mentioned that when the number of the variables in the system is k, the number of the Lyapunov exponents is also k and the pair is called the Lyapunov spectrum.  Then I wanted to generate the data for the models, draw the attractors, and calculate the value of the Lyapunov spectrum by myself.  As I cannot do the calculations by hand, I started studying programming at almost the same time. 
It did not take long time to make the programmes to generate the data from the formulae and to draw the attractors.  However, I could not calculate the Lyapunov spectrum immediately.  To calculate the Lyapunov spectrum, we need to use the Jacobian matrix and the Gram-Schmidt orthonormalisation method.  Although it is a little embarrassing, as I was a very lazy student, I did not really understand about them, which I should have learned in class.  After a while, I could understand them and could calculate the Lyapunov spectrum of difference equations.  However, it was much later that I could calculate the Lyapunov spectrum of differential equations.  That is to say, although I could calculate the Lyapunov spectrum of the Henon map, I could not calculate the Lyapunov spectrum of the Lorenz equations for a long time.
When I started learning about chaos theories and programming, I had a problem.   When calculations did not work well, it was not clear to me whether my programmes were wrong or my understanding of the theories was wrong.  Although my lack of understanding ability and programming skills was the main reason, if there were programmes that were easy to understand, these would be very useful and helpful for me at the time.
Thanks to many help and supports of so many people, I could study.  I think there are a few people in the world who are a bit silly and clumsy like me.  So, although I do not know how much demand there is,  as a small thank-you gift and an atonement, I decided to publish my programmes to calculate the Lyapunov spectrum of nonlinear systems, which I have had difficulty in doing.  The ideas  I used for the calculations are very basic, as they were published by James Doyne Farmer in 1982 and by Alan Wolf et al. in 1985.  Although I think there are some strange programming habits in various places, as I am still not good at programming, my writing style is not elaborate but very simple.  So, I believe that my programmes are so simple that anyone can easily understand them.   It would be my pleasure, if these programmes are useful and helpful for some people.

Tomo Nakamura