Fourier analysis of nonlinear pendulum oscillations

Since the times of Galileo, it is well-known that a simple pendulum oscillates harmonically for any sufficiently small angular amplitude. Beyond this regime and in absence of dissipative forces, the pendulum period increases with amplitude and then it becomes a nonlinear system. Here in this work, we make use of Fourier series to investigate the transition from linear to nonlinear oscillations, which is done by comparing the Fourier coefficient of the fundamental mode (i.e., that for the small-angle regime) to those corresponding to higher frequencies, for angular amplitudes up to 90◦. Contrarily to some previous works, our results reveal that the pendulum oscillations are not highly anharmonic for all angular amplitudes. This kind of analysis for the pendulum motion is of great pedagogical interest for both theoretical and experimental classes on this theme.


Introduction
The measurement of the period of a simple pendulum is a popular experiment for undergraduates.Its simplicity is subjected to a singular and important condition that the initial angular displacement θ m rendered to the bob is small.Mathematically, this reduces the non-linear equation of motion [1] to a linear equation of motion where ω 0 ≡ g/L, L being the pendulum length and g being the local acceleration of gravity.An invariable problem arising by the imposition of this condition is the characterization of the small-angle regime.Would it be θ m = 3 • , 5 • , 10 • , or more?A more inquisitive mind would ask how different would the motion of the pendulum be if this condition is not adhered.In fact, the time period is found to increase with the initial angular displacement θ m according to the Bernoulli's power series [2] where T 0 is the period of the pendulum in the limit of small-angle oscillations, in which it exhibits a simple harmonic motion (SHM).It is only for small initial displacements, namely θ m π/2 rad, that the pendulum * Endereço de correspondência: fabio@fis.unb.br.
Here in this paper, we address the distinction between small and large-angle oscillations based upon Fourier series analysis.This method has not been explored in literature, except by the works by Gil and co-workers in Ref. [20] and Simon and Riesz in Ref. [21], standing out for its simplicity, in contrast to Borghi's more complex treatment [22].The use of Fourier Series is of academic interest, especially at graduate level where the concepts of Mechanics, Electronics, Data Acquisition, and Mathematical Methods are taught.In fact, a consolidated approach can be developed following our method for studying the nonlinear oscillations of a simple pendulum.

Fourier series analysis of the nonlinear pendulum motion
Before we address the problem in hand, for completeness, we introduce the basic ideas involved.Mathematically, the solution of Eq. ( 2) that describes small-angle oscillations is Importantly, it can be noted that the solution is written in terms of trigonometric functions of a single frequency.Let us assume that the pendulum is released from a state of rest at an initial displacement θ m , with 0 < θ m ≤ π/2 rad, and θ (t = 0) = 0.The solution then reduces to The mathematical description of the pendulum oscillations in this regime of small amplitudes then reduces to a single cosine term, thus only one frequency suffices and that is why this motion is called a 'Simple Harmonic Motion'.The question of importance that now remains is, "What would be the nature of the motion beyond the small-angle regime, when Eq. ( 1) becomes a poor approximation?"Clearly, even when the pendulum motion has to be described by Eq. ( 1), a restoring force exists that tries to bring the pendulum back to its mean position, resulting in periodic oscillations.Its motion might not be 'simple' since the restoring force is not directly proportional to the displacement but it would still present a to-and-fro motion, hence a periodic motion.Mathematically, any periodic function which is both bounded and continuous by parts can be expanded in a trigonometric series (i.e., the Fourier Series), as given by [23] where ω is the fundamental frequency n ω are its integral multiples, referred to as the higher harmonics.
The fundamental frequency here is related to the SHM oscillation's frequency through Eq. ( 3), and is given as for 0 < θ m ≤ π/2 rad.The term a 0 in Eq. ( 6) of course acts as a constant term, which does not vary with time.
Then, by identifying the θ m value for which the higher harmonics become significant, one would be in a position to identify the transition from SHM to anharmonic motion.In the case of SHM, for the initial condition θ(t = 0) = θ m and θ(t = 0) = 0, one can expect a 1 = θ m and b 1 = 0, thus enabling us to identify the small-angle condition.This method is unique when compared to those found in literature [24].In order to study the mentioned transition, we have solved Eq. ( 1) numerically using a short Scilab code, 1 as given in Appendix A. In Fig. 1, it is shown the numerical solution of the differential equation in Eq. ( 1) for both small and large-angle oscillations (panel a), as well as the increase of the time period with the angular amplitude (panel b).To avoid ambiguity, the large-angle oscillation data was generated for θ m = 45 • .The fundamental frequency ω of the pendulum oscillations was fixed as 1 rad/s, which corresponds to a time period of T 0 = 2 π ≈ 6.28 s.We have truncated the series to just three terms, which is accurate for oscillations with θ m ≤ 0.7 rad.
We now proceed to obtain the Fourier coefficients a 0 , a n and b n of the series given by Eq. ( 6) using the Discrete Fourier Series (DFS) program given in Appendix B. The interesting result we find on the onset is that the coefficients associated with the sine terms b n are all zero.It may be pointed out here that only periodic graphs of an even function, which by definition are symmetrical about the y-axis (i.e. it is a mirror image about the y-axis), would give b n = 0 [23].Thus, the solution of Eq. ( 1) for the initial condition θ(t = 0) = θ m is an even function.
In Fig. 2, it is shown how the coefficient a 1 varies with θ m .For SHM, i.e. for small values of θ m , and θ(t = 0) = 0, we know that Eq. ( 6) should reduce to Eq. ( 5), with a 1 = θ m .That is, for small-angle oscillations a 1 would be equal to θ m , the initial angular displacement.As θ m becomes larger, a deviation from the proportionality is expected.However, pin pointing would not be possible as this deviation from SHM to anharmonic behavior would be gradual.To reflect on this, the values of a 1 shown in Fig. 2 are listed in Table I along with the deviation from θ m (let us call this deviation the 'error'), which is given by 1 Scilab is an open source software for numerical computation, which is useful for engineering and scientific applications [25].For small angles the motion of the simple pendulum is described by θm cos (ωt).As the angle of displacement increases, a1 is found to decrease (trend is given by Eq. ( 9)).The (b) variation of a0, a3, and a5 coefficients obtained by Fourier series analysis of the periodic oscillations of the pendulum with θm.The value of a0 becomes appreciable in the third decimal place for θm > 1.3 rad.0.00 0.00 0.00 0.00 0.01 0.01 0.02 0.03 0.04 0.05 0.07 0.10 0.13 a 5 (rad) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.01 Err (%) -0.08 -0.02 0.05 1.03 as usual.As seen in Table I, below, the magnitude of deviation in the second place after decimal for small angles becomes 1% and more for θ m ≥ 0.8 rad.On using the freeware CurveExpert 1.4 to fit data points of Fig. 2, a low standard deviation of 0.00375 and a very good correlation coefficient of 0.9999 is found.The trend is The deviation then increases with θ m according to At panel (b) of Fig. 2 it is shown that the coefficient a 0 tends to zero, with a 3 and a 5 giving a significant contribution for θ m > 0.8 rad and θ m > 1.6 rad, respectively.In Ref. [21], Simon also presented a Fourier series analysis for large-angle pendulum oscillations and reported that only odd harmonic terms contribute to the solution.They explained this feature as being due to the symmetry of the problem, however Kreyszig [23] explains that odd or even coefficients disappear if mixed initial or boundary conditions are imposed.For example (as in this case), while one condition is position at a given time, θ(t = 0) = θ m , the second condition is velocity at a given position, dθ/dt = 0 at θ = θ m .Hence, the Fourier analysis shows that simulated pendulum undergoing periodic oscillations can be fully described by θ(t) ≈ a 1 cos (ωt) + a 3 cos (3ωt) + a 5 cos (5ωt) , (11) where, from the above discussions, it is clear that the coefficients are functions of θ m and, for small-angle approximation, a 1 (θ m → 0) = θ m , a 3 (θ m → 0) = 0 and a 5 (θ m → 0) = 0.As can be seen, the result in Eq. ( 11) differs from that found by Simon in Ref. [21], so its conclusion that the simple pendulum is highly harmonic for all amplitudes is in contrast to our findings.The pertinent question as to what is a 'small angle' then resurfaces.
The need for determining "What a small angle is?" in undergraduate classes usually arises in experiments conducted to determine the local acceleration of gravity g.It is clear from the above arguments that Eq. ( 2) is valid only for θ m → 0 and beyond this limit some error is always induced.It is then important to investigate the error committed in g with the increase of θ m .For this we use the data of Fig. 1.
At panel (a) of Fig. 3, it is shown the variation of g with θ m , whereas at panel (b) the error in the evaluation of g is depicted.The acceptable small angle is, therefore, the error acceptable in our result.If we demand an acceptable error of 0.5%, we find that the acceptable small-angle boundary would be 0.211 rad or 12 • .This boundary for the small-angle regime is in good agreement with earlier reports [24].Interestingly, if we revisit Eq. ( 10), we find that the minimum of this expression is at θ m ≈ 0.244 rad or ≈ 14 • which again indicates that the simple harmonic approximation for Eq.(1) within experimental limits is valid for θ m < 12 − 14 • .This method, hence, gives an alternative way to study the transition from SHM to anharmonic motion in the simple pendulum.

Conclusion
The Fourier series analysis of a pendulum undergoing large-angle oscillation has itself as an interesting alternative to the analysis of its nonlinear motion.Indeed, it could help students to understand the difference of simple harmonic motion and other more general periodic motions without going into the involved mathematics of elliptic integrals and Jacobi elliptic functions [10], which compose the exact solution of the pendulum nonlinear differential equation.

Figure 1 : 3 Figure 2 :
Figure 1: Theoretical curves for the motion of a simple pendulum.(a) Comparison of a complete cycle for a small and a large-angle oscillation.The amplitudes have been normalised for a better comparison.(b) Shows the increase of the time period (rounded-off to the second decimal place) with the initial angle.

Figure 3 :
Figure 3: Panel (a) shows the variation in the local acceleration of gravity (g = 4π 2 L/T 2 ) with θm, obtained by using the time period found in Fig. 1.Panel (b) shows the increase of the error in g calculated for different simulated time periods of the pendulum, for varying θm w.r.t. the standard value 9.8 m/s 2 .

Table 1 :
Results of the DFS simulations listed for various θm.All coefficients and deviations in a1 with respect to θm are rounded-off at the second decimal place.Err(%) is as given in Eq. (8).