12201 FACTA UNIVERSITATIS Series: Mechanical Engineering Vol. 21, No 4, 2023, pp. 701 - 712 https://doi.org/10.22190/FUME230909047Z © 2023 by University of Niš, Serbia | Creative Commons License: CC BY-NC-ND Original scientific paper APPLICATION OF HE’S FREQUENCY FORMULA TO NONLINEAR OSCILLATORS WITH GENERALIZED INITIAL CONDITIONS Jian-Gang Zhang1, Qing-Ru Song1, Jian-Qiang Zhang2, Fang Wang1 1School of Mathematics and Physics, Lanzhou Jiaotong University, Lanzhou, China 2School of Automation and Electrical Engineering, Lanzhou Jiaotong University, Lanzhou, China Abstract. This paper focuses on the vibration periodic property of Duffing oscillator with generalized initial conditions. Firstly, the undamped case is solved by Ji-Huan He’s frequency formulation; Secondly, the formulation is extended to the damped case. Numerical verification shows that the frequency formulation is mathematically simple and physically insightful and practically applicable. This paper paves a novel way for engineers to use the formulation to study nonlinear vibration system with ease and reliability. Key words: Duffing equation, He’s frequency formulation, Ancient Chinese mathematics, Residual equation, Nonlinear vibrations 1. INTRODUCTION Nonlinear systems are widely present in the field of mechanical engineering and hold significant importance in unraveling the dynamical characteristics of nonlinear vibration systems. In the realm of mechanical engineering, nonlinear vibration systems are omnipresent, encompassing nano-scale vibrations [1], atomic-level lattice vibrations [2], and microelectromechanical systems [3,4], among others. The most renowned nonlinear oscillators in these systems include pendulum oscillators [5,6], Van der Pol oscillators, and Duffing oscillators [7]. With the rapid development of nonlinear science, more and more scholars have shown great interest in nonlinear problems. Solving large-scale linear equation systems is no longer a challenge, however, for nonlinear equation systems, traditional perturbation methods [8] have been widely applied in the nonlinear analysis of engineering problems. However, like other nonlinear asymptotic techniques, perturbation methods are also affected by limitations imposed by small parameters, and this point should Received: September 09, 2023 / Accepted November 30, 2023 Corresponding author: Jian-Gang Zhang School of Mathematics and Physics, Lanzhou Jiaotong University, Lanzhou, P. R. China E-mail: Zhangjg7715776@126.com 702 J.G.ZHANG, Q.R.SONG, J.Q.ZHANG, F.WANG also be taken into consideration. As is well known, most nonlinear problems do not involve small parameters. Even if appropriate small parameters exist, the approximate solutions obtained through perturbation methods are only effective for weakly nonlinear cases [9]. Furthermore, the approximate solutions obtained through perturbation methods often lose some crucial information, thereby failing to accurately reflect the important relationship between amplitude and frequency. The Duffing equation serves as an example of this case. Therefore, to solve this problem, Chinese mathematician, Ji-Huan He, inspired by ancient Chinese algorithms [10-12], proposed a simple method for conserving nonlinear vibrators, and a frequency-amplitude formulation was proposed, which is called He’s frequency formulation in literature [13-15]. The ancient Chinese mathematics was also further extended to solve nonlinear differential equations numerically [16], and in literature the method is called as Chun-Hui He’s iteration method [17,18]. He’s frequency formulation [10-12] not only can quickly unveil the relationship between the frequency and amplitude of various vibrators but also ensures high accuracy. Elías-Zúñiga, et al. [19] extended the formulation by coupling Jacobi elliptic function, Ma [20] suggested a Hamiltonian-based modification, Alyousef, et al. [21] used the formulation to solve a complex nonlinear system with great success. He and Liu [22] gave a mathematical proof of the formulation and suggested a powerful modification. All of the above studies considered simple initial conditions, and there is much space to extend the formulation to generalized initial condition. This paper considers a damped Duffing oscillator with generalized initial conditions to show the effectiveness and simplicity of He’s frequency formulation. This paper is divided into three sections. The first section considers an undamped Duffing oscillator with generalized initial conditions and applies He's frequency formulation to solve the approximate frequency, which is then compared with the RK4 numerical solution. In the second part, He's frequency formulation is applied to a linear damped oscillator with generalized initial condition. In the third part, a nonlinear Duffing oscillator with damping is considered to show reliability of He’s frequency formulation. 2. UNDAMPED DUFFING EQUATION We consider a Duffing equation 3 0u u u + + = (1) with the generalized initial conditions (0) , (0)u A u B = = (2) where A, B and ε are constants. There is much literature to study the above problem in case of small ε or A=0/B=0 by various methods, for examples, the homotopy perturbation method [23], the energy conservation principle [24] and the variational iteration method [25]. In this section, we will use He's frequency formulation to find the solution to Eq. (1). Assuming that the solution of Eq. (1) has the following form: cos( )u a t= +  (3) where ɑ and σ are constants, ω is the frequency to be determined. The initial conditions lead to the following relations: Application of He’s Frequency Formula to Nonlinear Oscillators with Generalized Initial Condition 703 (0) sin (0) cos u a A u a B  = − = = =    (4) Substituting Eq. (3) into Eq. (1) gives the residual equation as 2 3 3( ) cos( ) cos( ) cos ( )R t a t a t a t= − + + + + +        (5) Therefore, the average residual equation is defined as 2 0 2 cos( )dt T R R t T  = + (6) where T=2π/ω. By choosing two arbitrary frequencies ω1 and ω2, we obtain two residual equations, which are 2 3 3 1 1 1 1 1 2 3 3 2 2 2 2 2 ( ) cos( ) cos( ) cos ( ) ( ) cos( ) cos( ) cos ( ) R t a t a t a t R t a t a t a t = − + + + + + = − + + + + +                 (7) Therefore, the average residual equations as 2 32 1 1 1 10 2 32 2 2 2 20 2 3 cos( )dt 2 2 8 2 3 cos( )dt 2 2 8 T T a a R R t a T a a R R t a T = + = − + + = + = − + +           (8) We choose the location point as cos(ω1t+σ)=cos(ω2t+σ)=√3/2, Eq. (8) becomes 2 3 1 1 2 3 2 2 3 3 2 2 3 3 2 2 R a a a R a a a = − + + = − + +     (9) according to He’s frequency-amplitude formulation, we have 3 3 2 2 2 2 2 1 2 22 1 1 2 1 2 2 2 1 2 3 3 ( ( ) )( ) 32 2 1 43 ( ) 2 a a R R a R R a + − − = = = + − − −          (10) The result depends upon the location point, to overcome the shortcoming, we use the following formulation 2 2 2 2 1 1 2 1 2 3 2 2 2 1 2 2 2 1 2 3 ( )( ) 32 8 1 4 ( ) 2 R R R R a a a a − = − + − = = + − −          (11) 704 J.G.ZHANG, Q.R.SONG, J.Q.ZHANG, F.WANG From Eqs. (4) and (11), ɑ, σ and ω can be determined for given A and B. When A=0 or B=0, our result is the same as those obtained by the homotopy perturbation method or the variational iteration method. We compare the approximate solution based on He’s frequency formulation with the exact solution of the Runge-Kutta method, as shown in Fig. 1. From the figure, we can see that the two curves fit well, reflecting the consistency between the exact solution and the approximate solution. (A, B)=(0.01,0.01) (A, B)=(0.1,0.1) (A, B)=(1.6,1) (A, B)=(5.5,2) Fig. 1 The comparison between the exact solution and the approximate one based on He’s frequency formulation for different values of (A, B) 3. LINEAR OSCILLATOR WITH DAMPING In the previous section, we discussed the frequency formulation for a classical Duffing oscillator with general initial conditions, but in reality, perfect simple harmonic motion is almost non-existent. In reality, the amplitude of the Duffing oscillator described above will decrease due to air damping and other effects, eventually reaching an equilibrium state. There are many types of damping in engineering, and the most commonly used damping is viscous damping. Therefore, in this section, the linear oscillator with viscous damping is considered first. Application of He’s Frequency Formula to Nonlinear Oscillators with Generalized Initial Condition 705 Introducing viscous damping into a linear oscillator, the equation of vibration is: 2 0, (0) , (0)u u u u B u A+ + = = = (12) where 2η is the damping coefficient. The magnitude of damping is proportional to the vibration rate, and the direction is opposite to the speed direction. Based on He's frequency formula, the approximate solution is found in the following form: ( ) cos( )tu t ae t− = +   (13) where ω′ is the frequency to be solved later. Based on He's frequency formulation, an attempt is made to start from two arbitrary values of ω1′and ω2′, to obtain the following residual equations: 2 2 1 1 1 1 1 2 1 1 1 1 2 1 1 ( ) ( ) cos( ) 2 sin( ) 2 cos( ) sin( ) cos( ) (1 )cos( ) t t t t t t R t ae t a e t a e t a e t ae t ae t − − − − − −    = − + + +    − + − + + +  = − − +                          (14) 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ( ) ( ) cos( ) 2 sin( ) 2 cos( ) sin( ) cos( ) (1 )cos( ) t t t t t t R t ae t a e t a e t a e t ae t ae t − − − − − −    = − + + +    − + − + + +  = − − +                          (15) The residual integrals are given below 2 1 1 10 2 22 1 10 2 2 1 2 ( )cos( )d 2 (1 )cos ( )d 6 4 (1 ) 5 T T t R R t t t T = ae t t T e a          −  − = +  − − + − = − −    (16) 2 2 2 20 2 22 2 20 2 2 2 2 ( )cos( )d 2 (1 )cos ( )d 6 4 (1 ) 5 T T t R R t t t T = ae t t T e a          −  − = +  − − + − = − −    (17) where T=2π/η, then the frequency equation is 706 J.G.ZHANG, Q.R.SONG, J.Q.ZHANG, F.WANG 2 2 1 1 2 1 2 2 2 2 2 2 1 2 2 2 2 1 2 6 4 ( )(1 ) 5 6 4 ( ) 5 1 R R R R e a e a  −  −  −  = − −  − − = −  −  = −          (18) 4. NONLINEAR DUFFING OSCILLATOR WITH DAMPING Viscous damping is introduced in a nonlinear Duffing oscillator, its vibration equation is: 32 0, (0) , (0)u u u u u B u A+ + + = = =  (19) in the first section, the frequency formula of the nonlinear oscillator ü+u+εu3=0 is given by 2 23 1 4 a= +  (20) Therefore, the damped nonlinear oscillator can be equivalent to 22 0, (0) , (0)u u u u B u A+ + = = =  (21) similarly, there are approximate solutions of the following form ( ) cos( )tu t ae t− = +   (22) where ω′ is the frequency to be solved later. We try to get the following residual equations starting from two arbitrary ω1′and ω2′: 2 2 1 1 1 1 1 2 2 1 1 1 1 2 2 1 1 2 2 2 2 2 2 ( ) ( ) cos( ) 2 sin( ) 3 2 cos( ) sin( ) (1 )cos( ) 4 3 (1 )cos( ) 4 ( ) ( ) cos( ) 2 sin( t t t t t t t t R t ae t a e t a e t a e t ae a t ae a t R t ae t a e − − − − − − − −    = − + + +    − + − + + + +  = + − − +    = − + +                                   2 2 2 2 2 2 2 2 2 2 2 ) 3 2 cos( ) sin( ) (1 )cos( ) 4 3 (1 )cos( ) 4 t t t t t a e t a e t ae a t ae a t − − − − +    − + − + + + +  = + − − +                    (23) The residual integrals are Application of He’s Frequency Formula to Nonlinear Oscillators with Generalized Initial Condition 707 2 1 1 10 2 2 22 1 10 2 2 2 1 2 ( )cos( )d 2 3 (1 )cos ( )d 4 3 6 4 (1 ) 4 5 T T t R R t t t T = ae a t t T e a a −  − = +  + − − + − = + − −               (24) 2 2 2 20 2 2 22 2 20 2 2 2 2 2 ( )cos( )d 2 3 (1 )cos ( )d 4 3 6 4 (1 ) 4 5 T T t R R t t t T = ae a t t T e a a −  − = +  + − − + − = + − −               (25) so a frequency formulation is obtained, which is 2 2 2 2 2 2 1 2 2 22 1 1 2 1 2 2 2 2 2 1 3 6 4 ( )(1 ) 34 5 1 4 6 4 ( ) 5 e a a R R a R R e a  −  − −  − + −  −  = = = + − − −  −             (26) In addition, the frequency equation of Eq. (20) can be found by ( ) cos( )tu t ae t− = +   (27) (0) cos sinu a a A    = − − = (28) (0) cosu a B= = (29) Combining Eq. (28) and Eq. (29) yields 2 2 2 2 ( cos )a A a B +  = −    (30) In the following, we will use numerical simulation to analyze the impact of the variation of the damping term on nonlinear oscillators with generalized initial conditions. In order to better align with the actual operating conditions of the machinery, we make the values of A and B vary from small to large. Fig. 2-Fig. 4 show the fitting results of the exact and approximate solutions when the damping η is varied, respectively. 708 J.G.ZHANG, Q.R.SONG, J.Q.ZHANG, F.WANG In Fig. 2, we choose η=0.01 and let (A, B) vary from 0.2 to 1000, where the blue curve denotes the exact solution and the red denotes the approximate solution based on He’s frequency formulation. The two curves are highly fitted as can be seen in the figure. (A, B)=(0.2,0.2) (A, B)=(10,10) (A, B)=(99,100) (A, B)=(1000,1000) Fig. 2 When η=0.01, the comparison between the exact solution and the approximate one based on He’s frequency formulation for taking different values of (A, B) When η=0.1, considering that the nonlinear vibrations in the actual working conditions are all large parameters, as we take (A, B) from 1 to 1000, respectively. The resulting figure is shown in Fig. 3. From the figure, we can not only see that the increase of damping makes the system amplitude gradually decrease, but also find that the exact and approximate solutions are in good agreement. In addition, compared to Fig. 2, the magnitude of the system amplitude reduction is more pronounced when the damping is increased from 0.01 to 0.1. Application of He’s Frequency Formula to Nonlinear Oscillators with Generalized Initial Condition 709 (A, B)=(1,1) (A, B)=(10,10) (A, B)=(99,100) (A, B)=(1000,1000) Fig. 3 When η=0.1, the comparison between the exact solution and the approximate one based on He’s frequency formulation for taking different values of (A, B) To further verify the conclusion, we increase the damping so that η=0.15 and (A, B) is varied from 25 to 2500. the image is displayed in Fig. 4. The numerical simulation shows that even if we increase the damping and the initial values, the approximate solution based on He’s frequency formulation still agrees with the exact solution from the Runge-Kutta method. In addition, combined with Fig. 2, Fig. 3 and Fig. 4, we can observe that a small change in the damping term can make the amplitude oscillation of the oscillator solution curve more significant, and the solution curve will gradually approach equilibrium over time. 710 J.G.ZHANG, Q.R.SONG, J.Q.ZHANG, F.WANG (A, B)=(25,30) (A, B)=(100,120) (A, B)=(1100,1300) (A, B)=(2500,3000) Fig. 4 When η=0.15, the comparison between the exact solution and the approximate one based on He’s frequency formulation for taking different values of (A, B) 5. CONCLUSION This article mainly utilizes the He’s frequency formula to solve the solution of the nonlinear Duffing oscillator with generalized initial conditions, and compares it with the exact solution of the Runge-Kutta method. We summarize this article in the following two aspects: (1) For the undamped nonlinear Duffing oscillator, this paper first utilizes He’s frequency formula to calculate the approximate frequency and derive the corresponding approximate solution. Subsequently, we compare the approximate solution with the Runge-Kutta exact solution through numerical simulation and find consistent results between them. It is worth noting that this study focuses on generalized initial conditions, and when we set the initial condition A to 0 or B to 0, our results are in complete agreement with those obtained by the homotopy perturbation method or the variational iteration method. (2) In this paper, we investigate the Duffing oscillator with viscous damping. We divided the Duffing oscillator into linear and nonlinear types, and used He's frequency formula to find approximate solutions in both cases, followed by numerical simulations. Application of He’s Frequency Formula to Nonlinear Oscillators with Generalized Initial Condition 711 The experimental results show that, even when we increase the damping and the initial conditions A and B in the nonlinear Duffing oscillator, the approximate solution obtained using He's frequency formula still matches the exact solution obtained by the Runge-Kutta method very closely. This fully demonstrates that He's frequency formula is equally applicable to nonlinear damped oscillators with general initial conditions. The He's frequency formula method is both simple and fast, and we also observed a gradual decrease in the amplitude of the Duffing oscillator's solution, eventually reaching equilibrium as the damping increased. These results are of great significance for a deeper understanding and application of the dynamical behavior of Duffing oscillators. In conclusion, this frequency formula possesses simple yet profound mathematical properties and holds significant practical value. It provides engineers with an efficient and reliable approach to studying nonlinear vibration systems. In future research, we aim to further explore the application of this frequency formula to fractional-order nonlinear systems with generalized initial conditions, and thoroughly examine its effectiveness. By applying this formula in broader domains, we can enhance our understanding and analysis of complex vibration systems, offering more reliable and accurate solutions for engineering practices and scientific investigations. Acknowledgement: The paper was supported by the national natural science foundation of China (61863022) and the key project of Gansu natural science foundation (23JRRA882). REFERENCES 1. Yan, W., Noel, G., Loke, G., et al., 2022, Single fibre enables acoustic fabrics via nanometre-scale vibrations, Nature, 603(7902), pp. 616-623. 2. Chen, Z., Jiang, Y., Shao, Y.T., et al., 2021, Electron ptychography achieves atomic-resolution limits set by lattice vibrations, Science, 372(6544), pp. 826-831. 3. Skrzypacz, P., Ellis, G., He, J.H., He, C.H., 2022, Dynamic pull-in and oscillations of current-carrying filaments in magnetic micro-electro-mechanical system, Communications in Nonlinear Science and Numerical Simulation, 109, 106350. 4. Aditya, A., Rufus, E., 2023, The review of micro-electromechanical systems-based biosensor: A cellular base perspective, Sensors for Next-Generation Electronic Systems and Technologies, CRC Press, pp. 25-54. 5. Zaouali, E., Najar, F., Kacem, N., Foltete, E., 2022, Pendulum-based embedded energy harvester for rotating systems, Mechanical Systems and Signal Processing, 180, 109415. 6. Maadani, M., Butcher, E.A., 2022, 6-DOF consensus control of multi-agent rigid body systems using rotation matrices, International Journal of Control, 95(10), pp. 2667-2681. 7. Ramadoss, J., Kengne, J., Tanekou, S.T., Rajagopal, K., Kenmoe, G.D., 2022, Reversal of period doubling, multistability and symmetry breaking aspects for a system composed of a van der pol oscillator coupled to a duffing oscillator, Chaos, Solitons and Fractals, 159, 112157. 8. Amur, A.A., Memon, K.N., Shah, S.F., et al., 2023, The hydrodyanamics of gravity-driven vessel drainage of third order fluid using perturbation method, Heliyon, 9(10), e20196. 9. Qi, K.Y., Yao, X.K., Zhao, L.C., Yang, Z.Y., 2023, Solitonic attractors in the coupled nonlinear Schrodinger equations with weak dissipations, Communications in Theoretical Physics, 75(6), 065003. 10. Qie, N., Houa, W.F., He, J.H., 2021, The fastest insight into the large amplitude vibration of a string, Reports in Mechanical Engineering, 2(1), pp. 1-5. 11. He, J.H., 2019, The simplest approach to nonlinear oscillators, Results in Physics, 15(2019), 102546. 12. He, J.H., Yang, Q., He, C.H., Khan, Y., 2021, A Simple Frequency Formulation for the Tangent Oscillator, Axioms, 10(4), 320. 13. Elias-Zuniga, A., Palacios-Pineda, L.M., Jimenez-Cedeno, I.H., Martinez-Romero, O., Trejo, D.O., 2021, Equivalent power-form representation of the fractal Toda oscillator, Fractals, 29(02), 2150034. 14. Tian, Y., 2022, Frequency formula for a class of fractal vibration system, Reports in Mechanical Engineering, 3(1), pp. 55-61. 712 J.G.ZHANG, Q.R.SONG, J.Q.ZHANG, F.WANG 15. Feng, G.Q., 2021, He’s frequency formula to fractal undamped Duffing equation, Journal of Low Frequency Noise, Vibration and Active Control, 40(4), pp. 1671–1676. 16. He, C.H., 2016, An introduction to an ancient Chinese algorithm and its modification, International Journal of Numerical Methods for Heat and Fluid Flow, 26(8), pp. 2486-2491. 17. Khan, W.A., 2022, Numerical simulation of Chun-Hui He's iteration method with applications in engineering, International Journal of Numerical Methods for Heat and Fluid Flow, 32(3), pp. 944-955. 18. Khan, W.A., Arif, M., Mohammed, M., et al., 2022, Numerical and Theoretical Investigation to Estimate Darcy Friction Factor in Water Network Problem Based on Modified Chun-Hui He's Algorithm and Applications, Mathematical Problems in Engineering, 2022, 8116282, doi: 10.1155/2022/8116282. 19. Elías-Zúñiga, A., Palacios-Pineda, L.M., Jiménez-Cedeño, I.H., Martínez-Romero, O., Trejo, D.O., 2020, He’s frequency–amplitude formulation for nonlinear oscillators using Jacobi elliptic functions, Journal of Low Frequency Noise, Vibration and Active Control, 39(4), pp. 1216-1223. 20. Ma, H.J., 2022, Simplified Hamiltonian-based frequency-amplitude formulation for nonlinear vibration systems, Facta Universitatis Series Mechanical Engineering, 20(2), pp. 445-455. 21. Alyousef, H.A., Salas, A.H., Alharthi, M.R., El-Tantawy, S.A., 2022, Galerkin method, ansatz method, and He’s frequency formulation for modeling the forced damped parametric driven pendulum oscillators, Journal of Low Frequency Noise, Vibration and Active Control, 41(4), pp. 1426-1445. 22. He, C.H., Liu, C., 2022, A modified frequency-amplitude formulation for fractal vibration systems, Fractals, 30(3), 2250046. 23. Moatimid, G.M., Amer, T.S., Amer, W.S., 2023, Dynamical analysis of a damped harmonic forced duffing oscillator with time delay, Scientific Reports, 13(1), 6507. 24. Mirzabeigy, A., 2022, A Simple Approach for Dealing with Autonomous Conservative Oscillator under Initial Velocity, Journal of Applied and Computational Mechanics, 8(3), pp. 918-924. 25. Özaltun, G., Gümgüm, S., 2023, Numerical solutions of Troesch and Duffing equations by Taylor wavelets, Hacettepe Journal of Mathematics and Statistics, 52(2), pp. 292-302. 26. He, J.H., Jiao, M.L., He, C.H., 2022, Homotopy perturbation method for fractal Duffing oscillator with arbitrary conditions, Fractals, 30(09), 2250165.