Research on Planar Double Compound Pendulum Based on RK-8 Algorithm

Establishing the Lagrangian equation of double complex pendulum system and obtaining the dynamic differential equation, we can analyze the motion law of double compound pendulum with application of the numerical simulation of RK-8 algorithm. When the double compound pendulum swings at a small angle, the Lagrangian equation can be simplified and the normal solution of the system can be solved. And we can walk further on the relationship between normal frequency and swing frequency of double pendulum. When the external force of normal frequency is applied to the double compound pendulum, the forced vibration of the double compound pendulum will show the characteristics of beats.


Introduction
The motion of simple pendulum with small angle is the model of simple harmonic motion in "College Physics". When the air resistance is ignored, the trajectory of the pendulum ball is harmonic vibration. Under the action of gravity, a rigid body that can swing around a fixed horizontal axis is called a compound pendulum. The research of compound pendulum is closer to daily life. Planar double compound pendulum is the basic model of many phenomena in real life. The research on it involves kinematics, dynamics, vibration theory and so on. Although the dynamic differential equation can be listed according to the force analysis, the equation is more complex and has no explicit solution. With the rise of numerical calculation methods, complex systems with multi degrees of freedom, highly nonlinear and multi parameter coupling, such as double pendulum, can be solved by different algorithms, and then their motion laws can be studied [1,2]. In this paper, based on Lagrangian method, the dynamic model is established with the kinetic energy and potential energy of the system, and the Lagrangian equations are obtained. The swing pattern of the double pendulum is solved by using RK-8 algorithm. Nevertheless, numerical simulation of the swing of the double pendulum cannot get the motion law of the double pendulum. Given the constraint conditions, the Lagrangian equations are simplified and the normal coordinates of the system are obtained. The oscillation of the double pendulum is approximately periodic, and the normal coordinate is simple harmonic vibration. Finally, the external force with periodic variation of normal frequency is loaded on the double pendulum system, which makes the vibration of upper and lower compound pendulum have "beats" characteristics, but only the normal coordinate close to the frequency of driving force can continuously receive the energy exerted by driving force.

Planar Double Compound Pendulum System
A planar double compound pendulum is composed of a compound pendulum connected by its head and tail. As shown in Fig. 1, we can establish a plane rectangular coordinate system whose coordinate origin is the suspension point . The angle between the upper complex pendulum and the y-axis is , and the angle between the lower complex pendulum and the y-axis is . The corresponding physical quantities of the system are shown in Tab. 1.   In this paper, the plane motion of double compound pendulum is studied. Therefore, the motion law of double compound pendulum can be determined by two degrees of freedom. If the position of point is the zero point of potential energy, ignoring the air resistance and the energy dissipation. Then with consideration of the rotation of the upper complex pendulum, the kinetic energy and potential energy are The center of mass coordinates of the lower complex pendulum( 2 , 2 ) = � 1 sin + 2 sin 2 , 1 cos + 2 cos 2 �, Its motion can be regarded as the combination of translation and rotation. If the coordinate origin is set as zero potential energy point, then the potential energy of the lower complex pendulum is (2-1) The kinetic energy of the lower complex pendulum is equal to the sum of translational kinetic energy and rotational kinetic energy.
After obtaining the kinetic energy and potential energy of the upper and lower complex pendulum, the Lagrangian function of the planar double complex pendulum system can be obtained.
The Lagrangian equations are then listed.
The dynamic differential equation of the planar double complex pendulum can be obtained.

Numerical Simulation Results and Analysis of double Compound Pendulum
In order to obtain the high-precision solution of Eq. (5), we used the eighth-order Runge Kutta (RK-8) method to solve the Eq. (3). In the process of solving, because of the uncertainty between the second derivative and the original function, the second derivative and the original function can be regarded as independent functions in the form of solution. To facilitate the solution of linear equations, the following matrices are written: Because there is a certain error between the simulated value and the real value of RK-8 algorithm, the algorithm error is tested by the conservation of mechanical energy. The mechanical energy error ratio is now defined as .
The accuracy of RK-8 algorithm is tested by solving error ratio under given initial conditions. Numerical simulation was carried out with 0 = /2 0 = /6 as initial conditions, and the results are shown in Fig. 2 and Fig. 3. Fig. 2(b) and Fig. 3(b) show that the error of RK-8 algorithm is very small, which is not more than 10 −8 . In Fig. 2(a), when 0 = /2, the angle change of the upper compound pendulum seems to have a certain regularity, but the swing angle of the lower compound pendulum changes more at first, and the change of time at any time shows a little regularity in the later stage of swing. When the initial conditions change as 0 = /6, as shown in Fig. 3(a), the swing angles of the upper and lower compound pendulums almost change regularly.

Numerical Simulation Results and Analysis of Small Angle Vibration of Double Compound Pendulum
It can be seen from Fig. 2(a) and Fig. 3(a) that, after a period of oscillation, the angle of the double compound pendulum is approximately regular, but it is not a simple harmonic vibration. In order to study its oscillation law, we had better simplify the Lagrangian function which describes the plane double complex pendulum with the second order function ignore.
The expression of Lagrangian function is simplified as follows: Order 1 = √ , 2 = √ , the potential energy of equilibrium type is zero potential energy, and by eliminating the constant, and the Lagrangian function of double pendulum system is simplified The coefficient matrix of kinetic energy and the coefficient matrix of potential energy are obtained.
The eigenvalue equation is The eigenvalue of the obtained matrix is The above solution satisfies the condition of small vibration, that is, the displacement and velocity of double compound pendulum are small, so the vibration energy is also small vibration. It is a basic method to study the small vibration characteristics of the system by linearizing the Lagrangian function near the equilibrium point of the system [4,5]. Two eigenfrequencies of vibration can be solved by Eq. (13).
The analytic solution of coordinates and is ( 1 + 1 ) + 2 12 Among them, 1 , 2 , 1 , 2 is related to the initial value of motion. By further simplification and substitution, we can get the analytical solution Q of two normal coordinates of vibration 1 The above formula gives the relationship between , obtained from the solution of Lagrangian equations and the two functions 1 ′ , 2 ′ describing the energy of the system. , can be solved separately according to the kinetic energy and potential energy of the upper and lower complex pendulums under given initial conditions. Fig. 4 shows , vibration images obtained under given initial conditions. It can be seen that the swing of the upper and lower compound pendulum has certain regularity, but it does not satisfy the simple harmonic vibration. Substituting , into Eq. (16), 1 ′ , 2 ′ are obtained, as shown in Fig. 5. It can be seen from the figure that 1 ′ , 2 ′ are periodic functions. In fact, 1 ′ , 2 ′ are normal coordinates, while 1 ′ , 2 ′ are normal frequencies [6]. If the plane double compound pendulum system only swings at one frequency and the vibration of other frequencies is not excited, then the coordinate reflecting the vibration mode is the normal coordinate. The corresponding vibration mode becomes normal vibration. Any vibration state of the system is the linear superposition of all kinds of normal vibration. The vibration of two normal frequencies is shown in Fig. 5. The vibration shown in Fig. 4 is the linear superposition of the normal vibration of Fig. 5. The period of 1 ′ , 2 ′ obtained by solving , by using the motion equation is also basically consistent with the normal period of 1 ′ , 2 ′ images. The results are shown in Tab. 2.  In this paper, the motion law of double compound pendulum in small angle vibration is discussed, which can be solved by Lagrangian equation. The results obtained are the same as those obtained by Newton's law of motion, which provides a new idea for the study of complex motion.

Analysis of Low Energy Vibration of Double Compound Pendulum under External Force
It is concluded that the upper and lower compound pendulums tend to vibrate regularly after a period of time. When the angle is small, the vibration of the upper and lower pendulum is linear superposition of normal vibration. If the periodic external force is applied to the double compound pendulum, and the frequency of the external force is equal to the normal frequency, can the double compound pendulum make simple harmonic vibration?
First, take a simple complex pendulum as an example, as shown in Fig. 6, when is very small at low energy, the vibration differential equation of the complex pendulum is At this time, the compound pendulum vibrates harmoniously and its angular frequency is 0 = �3 /2 . The periodic driving force 0 is loaded on the complex pendulum, and the rk-8 algorithm is used for numerical simulation, and the vibration image of the complex pendulum is obtained as shown in Fig. 6.
The reason is that only when theta is small can the simple harmonic vibration be satisfied. When the periodic external force is applied to the compound pendulum, the amplitude increases gradually [7,8]. At this time, the is no longer approximately equal to , which means that the intrinsic frequency of the complex pendulum is no longer equal to �3 /2 , but will change with the change of the amplitude, which is always different from the fixed frequency of the external driving force. From the point of view of energy, the work done by external force is transformed into the mechanical energy of the pendulum. When the simple pendulum swings at a small angle, the driving force does positive work to the system. When the system energy gradually accumulates, the amplitude increases. However, when the amplitude reaches a certain degree, the driving force starts to do negative work on the system, resulting in the gradual decrease of system energy. Fig. 7 shows the curve of the total energy of the system as a function of time when a single compound pendulum is loaded with driving force. It can be seen from the figure that the total energy of the system does not always increase, but gradually decreases after a certain time point. This is precisely because the swing angle of the complex pendulum increases and the driving force does negative work, and this change is also periodic.
According to the same solving process, we can get The initial conditions ( 1 = 1 , 2 = 1 , 1 = 1 , 2 = 1 , = 9.8 ⋅ −2 , 0 = 0, 0 = 0)are substituted and simulated by rk-8 algorithm. The dynamic differential equations are simplified to matrix equations: The eigenvalues are as follows: The intrinsic frequencies are as follows: If the frequency of the driving force is set to 1 and 2 respectively, then the forced vibration of the system is shown in Fig. 8. It can be seen from the figure that the forced vibration of double compound pendulum is similar to that of single compound pendulum. No matter what driving force of intrinsic frequency is applied to the upper and lower compound pendulum, the oscillation of double pendulum will have the characteristic of "beat", that is, the amplitude of pendulum will change periodically. At the same time, the vibration of the upper and lower compound pendulums has the characteristics of "beat", but does the normal vibration reflecting the arbitrary swing state of the double compound pendulum also have the same characteristics? Fig. 9 shows the vibration of two normal coordinates and the energy change in the two coordinate systems with 1 as the driving force frequency. Different from the characteristics of the upper and lower pendulums, the vibration of the normal coordinate is only "beat" vibration which is similar to the frequency of the driving force, while the other vibration almost does not occur. The energy of the normal coordinate 1 ′ also increases first and then decreases, with periodic changes. The energy of 1 ′ is almost zero. That is to say, when the driving force with normal frequency acts on the double compound pendulum system, the normal coordinate close to the driving force frequency can receive energy, while another normal coordinate with large difference from the driving force frequency will not be able to accumulate energy.

Summary
The motion law of the complex pendulum is analyzed by using the mechanical method. Under the condition of small angle, the compound pendulum vibrates simply. Although the mechanical equation can be listed, the analytical solution of the equation cannot be obtained when the pendulum swings at a large angle. Lagrangian function is used to avoid complex force analysis, and Lagrangian equations are obtained. Rk-8 algorithm can be used to simulate and analyze the motion characteristics of double compound pendulum, which provides a new idea for the analysis of complex mechanical process. When the double compound pendulum swings at a small angle, the Lagrangian equations are simplified and the normal coordinates of the system are solved. It can be proved that the normal coordinate is a simple harmonic vibration. Any vibration state of double compound pendulum is linear superposition of normal vibration. When the periodic driving force satisfying the normal frequency is loaded on the double compound pendulum system, the double pendulum shows obvious beat vibration characteristics under the coupling effect of the double compound pendulum. However, only the normal coordinate close to the frequency of the driving force can receive the energy of the driving force and form the vibration with periodic amplitude variation, while other normal coordinates cannot receive the energy of the driving force.

Conflicts of Interest:
The authors declare no conflicts of interest.