It's fantastic to work a chaotic system out and analyse it's propertities. Actually, our understanding of chaotic phenomenon is deepened by modeling the motion of a simple chaotic pendulum. In this progrem, I not only plot the angle changeing with time and the phrase diagram, but also analyse motion through changing with time to judge whether the syatem is chaotic and the Pioncare section diagram to analyse the strang attracter. Finally, a FFT was used to analyse the period property of the system going to chaos. I make efferts on how to draw a beautiful figure, as a result, I was satisfied with the figure I drawn.
The pseudocode:
This is also a periodic system, so I still use the Euler-Ceome method to calculate the integration. As usual, the main class function is simple(actually I use the main class in last homework), what we need to do is mainly to change the parameters and see what will happen. When there comes all the strange things about chaos, such as strange attractor and double period, we are surprised at the power of the nature as well as the power of conputer physics. The MOST important part is also the calculation section:
Also, to make the solution clearly understandable, we must extract useful information in the solution, and it would be better to draw a beautiful figure. That's what I do next.
The result:
First, the solution must be showed, as the parameters used in the text book, the vesuas diagrams are as follows whe the drive force changes:
We can easily find that when there is no drive force, the pendulum slows down. when the drive force increases, the pendulum lost his period property and goes to chaos.
To see the difference of the if we don't artificially make the to be in the , another figure is drawn as follows:
Second, it's hard to find the properties of the pendulum when the drive force is 1.2 because it's not periodic. Actually, we can see the difference between the and the is not just the period, but also the chaotic property. When we say a system is chaotic, we mean the syetem states are unpredictiable, that is to sat, the amall diffenence at the bagining, may cause very large impact on the final state. So we create two pendulums whose initial angles are different as small as , when in the drive force 0.5 and 1.2, the change of are quiet different. The result is as follows:
We can see that the changs exponentially with time, we call the constant in the exponential term Lyapunov exponent. (The in the ). Now, we can say eaxctly what the chaos mean quantificationally: the Lyapunov exponent are positive!
Third. Another way to understand the chaos is to draw the phrase diagram, where the time disappear. This method is from the self-excited oscillation theory, where the fixed point is an important concept. So we draw the phrase diagram of the pendulum, as well as the point every period of the drive force only. These points are called Pioncare section, if the syetem is periodic, the Pioncare section is only one points, but the chaos isn't. The RESULT is as follows:
The left two figure are the phrase diagrams, which are as expected, the trace of approaches an ellipse, but the looks more disordered. The Pioncare section is exactly one dot in the , but the looks more intertsting. We know that the points in the diagram is called strange attractor. The chaos is not periodic but every the 'period' ,the trace in phrase space can only in some of the positions but can not in others.
You would think that whether the strange attractor will change their position, if we change the samping time. The answer is yes, and we can see that the strange attractor with phrase difference of is symmetrical:
HA, PRETTY BEAUTIFUL!
Last, we know the propertity of the chaos now. But how exactly a syatem goes to chaos ? That is doubling period. We know that to analyse the period of a system, FFT is very useful. So I draw the pigure in the frequency domain,which is as follows:
I the first figure in the right, the first peak is exactly the drive force frequency , the others are multiple-frequency, which mean that the system is in a period of . WHEN the , the first peak is , and other midpeak also appear, which means the period of the system doubled. That's WHAT we can't see in the normal condition(multiple-frequency can exist).
When the , the system becomes chaotic, whose frequency are random. Till now, the mechanism of the chaos is clearified.
The conclusion:
With the progrem, we analysed the properties of the chaotic pendulum including: (1) We can see the angle change visually through the diagram, and we see that the chaoic pendulum has no definite period. (2) We can see the Lyapunov exponent of the chaotic system is positive but the period syetem is negative through the change diagram. (3) We find that the periodic system approaches the fix point as time goes by but the chaotic system goes nowhere(or intermittently go to strange attractors) through the phrase diagram. We also find that the shape of stranges attractors depend on when we obtained the points. (4) We also analysed the period doubled through the spectral analysis. That's why the syatem finally goes to chaos!