A Stochastic Treatment for Oscillatory Behavior with Damping
* Author to whom correspondence should be addressed.
Sigma Journal of Engineering and Natural Sciences 2019, Vol. 10, Suppl. 2, pp. 179-186; doi.org/10.62051/ytu.sigma-journal-of-engineering-and-natural-sciences-a-stochastic-treatment-for-oscillatory-behavior-with-damping
Abstract
Keywords: Duffing oscillator; Monte Carlo simulation; stochastic method; nonlinear process; initial value problem.
1. Introduction
A differential equation becomes an oscillator equation when it is included a damping term or an external forcing term which allows to exhibit a vast range of different dynamical behaviors in the solution [1]. It is involved extra nonlinear stiffness term to make a linear second order differential equation nonlinear. The equation is commonly considered in modelling of nonlinear dynamics. The Duffing equation is used for any oscillatory motion which represented by a differential equation having quadratic or cubic stiffness terms for damping or excitation [2-3]. It is a fundamental model for nonlinear phenomena since it preserves the meaning of nonlinear behavior inside. It has taken remarkable attention in recent decades due to its various appropriate applications in many different fields of science, especially for mechanical systems in vibration theory. The name is coming from the non-academic person Georg Duffing whose original work depends on the free and forced harmonic vibration of an oscillator. Although he had only few publications in this subject, their densities makes his studies remarkable. After the discovery of the effective potential of the equation for representation of nature, issues of finding a solution to the equation are deeply taken into consideration. Without a damping effect, the equation represents conservative cases and it can be relatively handled by conventional developed methods. A variety of solution methods have been developed to solve conservative nonlinear Duffing equation. The homotopy analysis method [4-5], harmonic balance *
Corresponding Author: e-mail: usluh@yildiz.edu.tr, tel: (212) 383 43 38 179
H. Uslu, M. Sari / Sigma J Eng & Nat Sci 10 (2), 179-186, 2019
method [6] or homotopy perturbation method [7] are examples of these methods which are properly applied to the equation [8-10]. However, involving both damping and nonlinearity terms increase the complexity of the equation and the system becomes non-conservative. Despite the fact that some methods have ability to find a solution such as Laplace decomposition method [11], homotopy perturbation method [12], modified differential transformation [13-14] method and so on [15-16], most analytical methods are inadequate in terms of handling the nonconservative cases. Although conventional methods has been applied to wide range of area, they are known to suffer for intricate problems. At this point, new approaches such that simulation techniques can be considered by eliminating suffered aspects of these methods. Simulation techniques, such as Monte Carlo simulation technique, can overcome the corresponding drawbacks [17-23]. It has been generally defined as a random sampling method for solving any model. The method is classified as a stochastic approach since it represents physical processes by using random variables. Moreover, it can be easily used to explain random behavior. Even if the method has been introduced few decades ago, a significant progress in the method has taken place until this time and the method has begun to be used in various fields of science; including statistics, engineering, computer science and so on. In this sense, application of the simulation technique to problems of interest can be considered an important milestone for application point of view. This study aims to present the Monte Carlo based stochastic algorithm to solve Duffing equation considering different damping effects and stiffness with different initial conditions. The predicted results are qualitatively and quantitatively compared with the results of numerical methods by using MATLAB functions.
2. AN Implementation Of A Stochastic Approach
One of the most practical way for solving a differential equation is the usage of integration. Even if applying the integration to the system of equations may not be as easy as expected, the present algorithm is proposed to solve first order nonlinear ordinary differential equations (ODE) through the Monte Carlo approach. To be able to apply the algorithm, the system of differential equations is modified. 𝑑𝑥 Let us rewrite the first order nonlinear differential equations in implicit forms = 𝐹(𝑥, 𝑦, 𝑡) 𝑑𝑡
and = 𝐺(𝑥, 𝑦, 𝑡) where 𝐹 and 𝐺 represent arbitrary functions including rest of the terms of the 𝑑𝑡 equations. Then the closed interval [𝑥0 , 𝑥𝑓 ] should be divided uniformly to 𝑚 points for determining the step size in the algorithm. Before the random stage, a reference number is determined. This reference number is a decision element in the algorithm for randomly generated numbers and it is renewed for each iteration. First one is created by using initial conditions. Let us name this reference number as 𝑑𝑥 Classification Number (CN) defined by 𝐶𝑁 ≔ = 𝐹(𝑥𝑛 , 𝑦𝑛 , 𝑡) where 𝑛 = 0,1, … , 𝑚. 𝑑𝑡 After this arrangements, the random stage begins. 𝑁 random number is generated for each iteration in the algorithm. Each random number is compared with the 𝐶𝑁, then evaluated the number of ones greater or less than 𝐶𝑁. These random numbers are created in an interval which has upper and lower bounds. These estimated bounds are used calculating the value of current iteration. The algorithm works according to below strategy:
A Stochastic Treatment for Oscillatory Behavior … / Sigma J Eng & Nat Sci 10 (2), 179-186, 2019
3. AN Application To The Nonlinear Model Equation
The Duffing oscillator equation considering the damping effect with initial conditions is: 𝑥 ′′ + 𝑥 ′ + 𝑥 + 𝑥 3 = 0, for 0 ≤ 𝑡 ≤ 𝑡 ∗ where ,
and are constant coefficients and 𝑡 ∗ is a final time. Even though
𝑥(𝑡) and 𝑥′(𝑡) are initial conditions for the differential equation, in terms of the represented system point of view, 𝑥(𝑡) represents the initial position and 𝑥′(𝑡) is the initial velocity. 𝛼𝑥 is included to allow damping in the system to eliminate conservation and 𝛽𝑥 is a classical restoring force whereas 𝛾𝑥 3 represents a cubic nonlinearity of the system. If the system has an external force, the equation becomes nonhomogeneous. Converting this nonlinear differential equation to a system of first order nonlinear differential equations is useful way for approaching the equation. Let us introduce the variable transformation to consider converting a system. If the unknown function is chosen 𝑦(𝑡) = 𝑥 ′ (𝑡) and substituted into the equation, the system of equations becomes: 𝑥 ′ (𝑡) = 𝑦(𝑡) 𝑦 ′ (𝑡) = 𝑥 ′′ (𝑡) = −𝑦 − 𝑥 − 𝑥 3
with initial conditions 𝑥(0) = 𝑥0 and 𝑦(0) = 𝑥1 . Now, the presented algorithm can be applied these two nonlinear differential equations to analyze the behavior of the processes represented by the Duffing equation.
4. Illustrative Examples
In this section, Duffing equation is converted to nonlinear first order nonlinear differential equation systems and the system is solved by using the Monte Carlo based stochastic algorithm. The method is applied with 100000 random samples for each example. For comparison purpose, the systems are solved by the ode45 function of MATLAB2018b which is based on the RungeKutta method to solve nonlinear ordinary differential equations numerically. After the application of the algorithm to the problems, predicted results have been compared with the numerical ode45 results, the qualitative and quantitative behaviors have been shown in detail. The formula |p-y| where p is the predicted solution and y is the ode45 solution of the given problem is used for this 181
H. Uslu, M. Sari / Sigma J Eng & Nat Sci 10 (2), 179-186, 2019
difference comparison. In addition to the following simulated results, effects of the parameters in terms of physical aspects are also discussed in this section.
4.1. Example 1
In the present case, Equation (1) is considered with the following parameters: = 0.5, = = 25, 𝑥(0) = 0.1, 𝑥 ′ (0) = 0
The algorithm is applied to the system by dividing the time interval uniformly with the increment 0.001. The qualitative behavior of the predicted solutions is compared with the numerical solutions obtained by the ode45 shown in Figures 1 and 2. Quantitative results have been given detailed in Table 1. 0.1
Figure 2. Comparison of the predicted and ode45 solutions for Equation (3)
Figure 3. Comparison of the predicted and ode45 solutions for Equation (3) in terms of the absolute differences
It can be easily seen the effects of the damping term, when the qualitative behavior of the solution analyzed. The solution appears to change periodically damping with time. This case includes low damping effect and strong nonlinearity because of the magnitudes of the parameters 𝛼 and 𝛾. The predicted results have reasonable agreement with the results of ode45 according to the figures and the differences between the predicted and ode45 solutions. Even after a while they shows little deviations and delays, it can be claimed that the obtained results shows good agreement in a small range of the solution domain. Computational time of the algorithm is 2.6126 s while the ode45 is of 0.0364 s for this example. Even if the cost of the present method is slightly higher than the ode45, the accuracy level is in rather good agreement with the ode45 solution. Since simulation techniques, in particular the MC algorithm, can overcome successfully general drawbacks of the traditional methods, the cost can usually be sacrified in intricate problems.
4.2. Example 2
In Example 1, a system of first order nonlinear differential equations is considered and the system is non-conservative. Now the conservative case of the cubic nonlinear Duffing equation can be assumed with the following parameter values:
A Stochastic Treatment for Oscillatory Behavior … / Sigma J Eng & Nat Sci 10 (2), 179-186, 2019
Table 1. Comparison of the predicted and ode45 solutions and corresponded differences for Example 1 Time 𝑡 0.0010 0.0050 0.0100 0.0500 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000 0.7000 0.8000 0.9000 1.0000
ode45 Results 0.1000000 0.0999765 0.0998928 0.0969239 0.0878869 0.0556366 0.0117701 -0.0328253 -0.0676017 -0.0849977 -0.0810532 -0.0578610 -0.0218242 0.0178964
Predicted Results 0.0999987 0.0999685 0.0998740 0.0968866 0.0878457 0.0551449 0.0108173 -0.0339410 -0.0683725 -0.0847426 -0.0799126 -0.0561276 -0.0200468 0.0190600
Differences 1.26E-06 8.01E-06 1.88E-05 3.73E-05 4.12E-05 4.92E-04 9.53E-04 1.12E-03 7.71E-04 2.55E-04 1.14E-03 1.73E-03 1.78E-03 1.16E-03
The present algorithm is applied to Equation (1) with the above parameters by considering the conditions same as Example 1. Compared qualitative behaviors are shown in Figures 3 and 4 and quantitative results have been given in Table 2. In the following example, it is analyzed that what happens if damping term is excluded in equations. In this respect, the behavior of the system changes periodically undamped with time. Computational time of the algorithm is 1.7715 s whilst the ode45 is 0.0414 s for the present example. Although the number of random variables of the current algorithm imposes a high computational cost, it is preferable for a better accuracy level. The predicted results are seen to be relatively in good agreement with the ode45 results as realized from the figures and table. 0.15
Figure 4. Comparison of the predicted and ode45 solutions for Equation (4)
Figure 5. Comparison of the predicted and ode45 solutions for Equation (4) in terms of the absolute differences
H. Uslu, M. Sari / Sigma J Eng & Nat Sci 10 (2), 179-186, 2019
Table 2. Comparison of the predicted and ode45 solutions and corresponded differences for Example 2 Time 𝑡 0.0010 0.0050 0.0100 0.0500 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000 0.7000 0.8000 0.9000 1.0000
ode45 Results 0.1000000 0.1000000 0.0998760 0.0963730 0.0869567 0.0567705 0.0095885 -0.0404223 -0.0767930 -0.0966485 -0.0932567 -0.0658725 -0.0209451 0.0300327
Predicted Results 0.0999987 0.0999684 0.0998738 0.0968606 0.0876443 0.0536647 0.0064982 -0.0422753 -0.0806444 -0.0991684 -0.0931506 -0.0641556 -0.0193663 0.0301573
Differences 1.26E-06 3.16E-05 2.22E-06 4.88E-04 6.88E-04 3.11E-03 3.09E-03 1.85E-03 3.85E-03 2.52E-03 1.06E-04 1.72E-03 1.58E-03 1.25E-04
4.3. Example 3
In this example, the non-conservative case of the cubic nonlinear Duffing equation can be assumed with the following parameter values: = 1, = 20, = 2, 𝑥(0) = −0.2, 𝑥 ′ (0) = 2 (5) The presented algorithm is applied with the parameters in (5) by dividing the time interval uniformly as same as previous ones. The qualitative behavior and quantitative results are given Figures 5 and 6 and Table 3. Since the damping is added to the differential equations, the results change. The damping terms is relatively higher from Example 1 and low nonlinearity. The solutions is seen to be a periodical decaying oscillation. Though the solution remains close to the referenced solution curves in a large scale of vertical axis, the deviations may occurs. Computational cost of the algorithm is 2.5941 s here while the ode45 has 0.0597 s. Even though the algorithm has relatively higher cost, the decaying behavior is properly captured. 0.03
Figure 5. Comparison of the predicted and ode45 solutions for Equation (5)
Figure 6. Comparison of the predicted and ode45 solutions for Equation (5) in terms of the absolute differences 184
A Stochastic Treatment for Oscillatory Behavior … / Sigma J Eng & Nat Sci 10 (2), 179-186, 2019
Table 3. Comparison of the predicted and ode45 solutions and corresponded differences for Example 3 Time 𝑡 0.0010 0.0050 0.0100 0.0500 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000 0.7000 0.8000 0.9000 1.0000
ode45 Results -0.1980053 -0.1900071 -0.1799652 -0.0986339 0.0026438 0.1856784 0.3164381 0.3793008 0.3724235 0.2983156 0.1746570 0.0295913 -0.1074768 -0.2096244
Predicted Results -0.1979990 -0.1899759 -0.1799020 -0.0984081 0.0029678 0.1861094 0.3168354 0.3754788 0.3574740 0.2736549 0.1464018 0.0036898 -0.1262406 -0.2201259
Differences 6.33E-06 3.13E-05 6.32E-05 2.26E-04 3.24E-04 4.31E-04 3.97E-04 3.82E-03 1.49E-02 2.47E-02 2.83E-02 2.59E-02 1.88E-02 1.05E-02
5. Conclusions And Recommendation
The cubic nonlinear Duffing equation representing behavior of oscillators has been solved by the Monte Carlo based stochastic algorithm. Since the exact solutions of the corresponding equation for all initial guesses are relatively hard to find by conventional methods, the solution for specific parameters was found by ode45 function of MATLAB2018b. It has been seen that the approach has ability to capture nonlinear behavior of the physical process. It can be concluded that the present method is an accurate tool in handling a nonlinear oscillator with a high level of accuracy.
Acknowledgements
The authors would like to thank the anonymous reviewers for their valuable comments and suggestions for improving the paper. The first author also would like to thank Scientific and Technological Research Council of Turkey (TUBITAK), under the 2211-E Program which supports the author.
Share and Cite
USLU, H.; SARI, M. A Stochastic Treatment for Oscillatory Behavior with Damping. Sigma Journal of Engineering and Natural Sciences 2019, Vol. 10, pp. 179-186. https://doi.org/10.62051/ytu.sigma-journal-of-engineering-and-natural-sciences-a-stochastic-treatment-for-oscillatory-behavior-with-damping

