Comparative analysis of linear and non-linear free vibrations of harmonic oscillator

. Free vibrations of a harmonic oscillator in the form of a mathematical pendulum in linear and nonlinear formulations are considered. Their comparative analysis is carried out as a conservative system with one degree of freedom. To solve a nonlinear differential equation, the finite difference method and Euler's scheme are used. Specific examples are given, the limits of the mathematical pendulum deviations angles, at which the solutions of linear and nonlinear problems practically coincide, are determined. The law of potential and kinetic energy sum conservation is used for the oscillations of conservative systems. The conclusions are drawn for the practical application of the results obtained.


Introduction
The design diagram of the harmonic oscillator is shown in Fig. 1 and consists of an oscillating mass m and an elastic element with a stiffness coefficient c. It is a conservative system with one degree of freedom, which performs free harmonic oscillations. They have been studied in literary sources [1][2][3][4][5]. Analytical, topological and graphical methods for solving nonlinear oscillations were considered by the authors [6][7][8][9][10][11].

Fig.1. Harmonic oscillator
It should be noted that there is a wide variety of oscillators differing in their design schemes. Several different schemes from this set, taken from structural mechanics, are shown in Fig. 2. All circuits depict harmonic oscillators. In diagrams a), b), f), g), the role of an elastic element is played by thin rods with low masses, which can be neglected. Scheme a) depicts a vertical harmonic oscillator oscillating about a static equilibrium position. Schemes d), e) correspond to mathematical and physical pendulums. It is known that the mathematical model of a physical pendulum is easily reduced to the model of a mathematical pendulum.

Fig.2. Examples of harmonic oscillators.
When formulating problems on the oscillations of mathematical pendulums, linear models are often used based on the hypothesis of small deviations. Meanwhile, "smallness" is a relative and subjective concept. In many cases, such uncertainty is unacceptable, since errors in determining such parameters of free oscillations as frequency and amplitude can have a significant, "considerable" effect on forced oscillations. These questions are currently poorly studied, are relevant and require an answer.

Mathematical model of oscillations
Let us first consider free linear oscillations of the harmonic oscillator shown in Fig. 1. A mathematical model of its oscillations is given in [1,4]. The main equation is represented by an ordinary differential equation of the second order where m is the oscillating mass, x are displacements, c is the coefficient of stiffness (elasticity) of a cylindrical spring, two points above x here and below correspond to the second derivative with respect to time t. The basic equation of vibrations (2) is supplemented by the initial conditions at t = 0 which are the sources of vibration. The equation (1) and additional conditions (2) form a mathematical model of free oscillations of a harmonic oscillator. As you know, its solution has the form x(t) = С 1 cos ω 0 t + С 2 sin ω 0 t Where Moreover ω 0 makes sense of the frequency of free vibrations of a harmonic oscillator in the absence of friction. Solution (3) is often written in the form of harmonics x(t) = A sin(ω 0 t + φ), х( ) = A cos(ω 0 t + ψ), A > 0, 0 > 0 (4) where the amplitude of oscillations A is calculated by the formula Here ω 0 t + φ, and ω 0 t + ψoscillation phases, φ, ψ -initial phases. Oscillation frequency 0 does not depend on the method of excitation of oscillations, is a property of the oscillatory system.
Let us study the oscillations using a specific example in the environment of the Matlab computing complex. Let us consider using the example of the design scheme shown in Fig.  1. Here τ is the time step for calculations using the first formula (4). The calculation results are shown in Fig. 3. It is seen that with increasing mass, the frequency decreases significantly. Similar calculations show that increasing the stiffness factor increases the vibration frequency. Now let us consider the free oscillations of a mathematical pendulum (Fig. 4), represented by one of the schemes in Fig. 2 as an example. Here it is assumed that the mass m is suspended on a weightless thin thread. In the absence of damping, the mass fluctuations in a circular orbit are described by the differential equation ma = −F sin θ.

Fig. 4. Mathematical pendulum
Sign F is the gravity of mass m at the end of the thread, θ is the angle of deviations, minus on the right side, is due to the fact that the projection of the force F and the tangent to the trajectory τ have opposite directions. Let us take into account that the force and tangential acceleration of the mass m are determined by the formulas Then, to describe the oscillations, we obtain a homogeneous ordinary differential equation of the second order in time t where θis the angle of deviation from the vertical,, ω 0 -Is the angular frequency of free oscillations of the pendulum, l is the length of the pendulum, g is the acceleration of gravity. Next, we consider oscillations at small angles of deflection, i.e. sin θ ≈ 0. Then the nonlinear equation (5) becomes linear and has the form: Here, the solution to the equation is the function The usual notation is used for amplitude, phase of oscillation, initial phase, angular frequency of oscillation. Further, by analogy with the previous case, we can write for the amplitude of angular deviations where θ 0 is the initial deflection angle, ψ 0 is the initial angular velocity. Solution (3) can be written in a more convenient form In this case, the constants of integration C1 and C2 are determined by the initial conditions: Under the same initial conditions, the left-hand sides of equations (5) and (6) differ by the factors of the second terms sinθ и θ. For small values of θ the difference between them is insignificant. Then one should expect also a small difference in the solutions of linear and nonlinear problems. Calculations show that the difference at angles of 30º is only 4.7198%. For harmonic oscillators, from which a high degree of accuracy is not required, the use of a linear oscillation model is quite acceptable.
Along with oscillations with small deviations, there is still interest in oscillations with large deviations. In such cases, the proposed suspension of the mass with a thin thread may be untenable. At low speeds and a large deflection angle π/2 < θ < π the thread may be in a compressed state, which is impossible due to the properties of the thread. Chaotic downward movement of the mass sets in. Therefore, in a nonlinear formulation, one should replace the thread with a thin rod with a low mass, much less than the main mass, or go to a mathematical model of a physical pendulum, taking into account the mass of the rod.
Additional reasons for studying the oscillations of a pendulum with large deviations are that there are many mechanisms in the form of oscillators or containing them, which must perform working operations in space with a high degree of accuracy. These include, first of all, the mechanisms of robotics and mechatronics, which move parts and tools along complex spatial paths and simultaneously oscillate.
Equation (5) We supplement them with the initial conditions It is not possible to find the exact solution of problem (8), (9) by analytical methods. Let's use the numerical finite difference method. For this purpose, we pass from the region of continuous variation of the argument t to the discrete region (grid) Here h is the grid step, a small number; the accuracy of the assumed calculations depends on its choice.
There are many ways to reduce the analytically formulated problem (8), (9) to its finitedifference numerical analogue. In this case, the system of equations will take the form: Equations (10), (11) are supplemented with the initial conditions Now the mathematical model of oscillations is represented by equations (10) -(12). To solve the problem, we will use the so-called Euler scheme, which is distinguished by the greatest clarity and simplicity in comparison with other methods. Let's consider a specific problem with initial data. Example 2. Given: ω 0 = 1 s -1 , T = 10 s, n =10001, h =10 -3 s, θ 1 = 0, The results of calculations carried out in the environment of the computing complex Mаtlab on the time interval t [0, T] are shown in the graphs in Fig. 5. Curve 1 corresponds to the linear problem, partially studied above. Curve 2 corresponds to a nonlinear problem considering large deflection angles of the pendulum. : The bold points indicate the amplitude deviations of the mass m. At the beginning of the process, the difference in results is small. Over time, the difference becomes noticeable. The longer the duration of the oscillations, the greater the difference becomes. Non-linear oscillations occur with a lower frequency and with large periods and amplitudes. The initial sections of the curves almost coincide.
There are differences between curves 1 and 2 in the magnitudes of the amplitude of the deflection angles θ and the vibration frequencies. They are formed due to the second terms in the left-hand sides of equations (5) and (6). An explanation can be easily constructed if for the pendulum we accept the oscillator circuit shown in Fig. 1. We will use the principle of conservation of energy for conservative systems, which include the pendulums under consideration, i.e., the sum of potential and kinetic energies remains constant throughout the oscillations P + К = const, Obviously, the coefficient of elasticity of the spring in the second term in equation (6) is greater than in equation (5), i.e., c1 ≥ c2. At the same time, the initial kinetic energies of the systems in the absence of potential energy at the beginning of oscillations are the same in both cases.K 1 = K 2 ￼. The potential energy of a deformed spring is directly proportional to the coefficient of elasticity with The kinetic energies at the maximum deviations of the mass, marked by points on curves 1 and 2, are equal to zero. Then here, by (14), at these points From (14) and (15) the equality follows Hence, a conclusion about the amplitudes of the deviations angles is drawn The curves 1 and 2 along the entire length confirm this relationship. Likewise, it is known that the greater the coefficient of elasticity, the greater the vibration frequency. The same curves show that ω1 > ω2.
The image in the phase plane is clearer and especially well represents nonharmonic oscillations as in this case [6,11]. The phase portrait is obtained as follows: the angular coordinate θ is plotted along the abscissa axis, and the angular velocity ψ is plotted along the ordinate axis. Each movement at time t corresponds to a depicting point on the specified plane with coordinates θ, ψ, uniquely determined by the instantaneous values of the deviation θ and the velocity ψ.
An example of the phase plane and phase trajectories for different initial conditions θ(0), ψ(0) is shown in Fig. 6. On the phase plane there are special points of the "center" (A) and "saddle" (B) types. They correspond to the equilibrium positions of the oscillatory system. Phase trajectories of separatrices 3 pass through points B, dividing the phase plane into two regions: inside and outside the separatrix loops.
If the equilibrium states corresponding to the singular points A are given as small perturbations, then the pendulum performs periodic oscillations with a trajectory in the form of an ellipse. This equilibrium position will be stable. Disturbances in the state of equilibrium A will lead to oscillations inside the separatrix loops, if in the position of type B, the oscillations will be unstable or turn into rotational movements, along trajectories 4, 5 in Fig. 6.
. 2. The numerical characteristics of linear and nonlinear oscillations, necessary for practical use, are easily determined from the graphs obtained using the Matlab computer complex.
3. The study and comparative analysis of linear and nonlinear oscillations in the systems with one degree of freedom using small computer programs in the Matlab computing environment are of methodological interest in teaching courses in technical mechanics in universities.