key: cord-0137490-ginp8vyl authors: Meer, David; Myers, Eric; Halpern, Richard title: A Low Cost Duffing Oscillator date: 2021-12-28 journal: nan DOI: nan sha: 7b296df0c8633dc8fab933236b6f8010c2de3c20 doc_id: 137490 cord_uid: ginp8vyl We describe an undergraduate project to build a Duffing oscillator. Although the ultimate goal was to demonstrate chaos, the overriding consideration was cost, as this was during COVID-19, and budgets were frozen. Previous designs used expensive parts that were out of the question in terms of cost. An inexpensive design whose centerpiece is a video tracking system is presented, along with some comments about aspects of the theory concerning the bi-stable case. In its most general form, the Duffing oscillator is described by the following equation: x + γẋ ± αx ± βx 3 = F cos(ω F t) (1) where α, β, γ, ω, and F are are taken to be positive. Here x = x(t) is the position, with the first and second derivatives denoting velocity and acceleration, respectively. For purposes of this discussion, it is convenient to think of the oscillating object as having unit mass. Then x is the net force, and by Newton's second law we have: The γ term is a friction force that is assumed to depend on the velocity. The α and β terms are linear and nonlinear restoring forces, respectively, while the term on the right is a sinusoidal driving term with amplitude F and angular frequency ω F . When the α and β terms are both positive, the equation is referred to as the hardening case. When the α term is positive and the β term is negative, it is called the softening case. We are interested in equation (1) where the linear restoring term has the minus sign and the nonlinear restoring term has the plus sign. This is called the bi-stable case: x + γẋ − αx + βx 3 = F cos(ω F t) For the special case where there is no damping we have: The right side of equation (3) is derivable from a potential, U (x): When the driving force is zero, the potential has the form of a double well ( figure 1, left) . The effect of the driving force is to skew the well, an instance of which is shown in figure 1 at the right. U(x) x U(x) x Figure 1 : Graph of U(x) in equation (4) at two different times. The locations of the fixed points at some arbitrary time τ are given by: The locations x 1 and x 2 are stable fixed points; x 3 is an unstable fixed point. When the forcing term is set to zero, the above expressions reduce to the values calculated by others [6] : If the initial energy is positive then the object can jump from one well to the other. In the absence of friction, this inter-well motion continues indefinitely. The effect of the damping force is to dissipate energy so that even if a jump is initially possible, the object will eventually be trapped in one of the two wells. We refer to motion confined to a single well as intra-well motion. The unforced, undamped Duffing equation can be solved analytically using the Jacobi elliptic functions cn and dn, depending on the case. For example, in the bi-stable case we have: inter-well motion : Here, A denotes amplitude; it is constant throughout the motion and the same for both the cn and dn functions. What is the situation when damping is included? Is there still a single amplitude function for both cn and dn cases? We certainly expect the amplitude to decrease with time; previous research into the damped hardening and softening cases [6] , [7] has shown that the amplitude is basically a decaying exponential: This can't be the case for the bi-stable oscillator since the amplitude must end up at one of the double well fixed points, not zero. We speculated that an amplitude function analogous to (6) for the bi-stable case might look like this: Here, A 0 is the initial amplitude, x * is the position of the bottom of the well, and h is a parameter that we can adjust to get the best fit for a given set of initial conditions. Even with the optimum h value there is a problem with the result. In figure 2 (left) we see plots of amplitude vs time (magenta), and position vs time for the pendulum (black). We would expect the amplitude graph to just touch each peak over the entire interval of the motion. That is not the case, as figure 2 (right) demonstrates. Here, the difference between the amplitude value and each trajectory peak is plotted. Ideally, each peak should be at the horizontal line. The inter-well peaks are below where one would expect them to be, while the intra-well peaks are above where one would expect. This strongly suggests that a single exponential function does not capture the actual behavior of the amplitude. It is questionable that combinations of exponentials in the two different regimes will do the trick. This is an issue that certainly needs further investigation. Another problem we ran into was a discrepancy between our expression for the amplitude of the hardening oscillator, equation (7) A and the expression given in [6] , equation (8): We present the derivation of our result in equation (7) in an Appendix. Previous implementations of the Duffing oscillator suitable for an undergraduate project [4] , [5] used expensive tools for measuring the motion of the system. Our objective, which was motivated by a strict COVID-19 budget freeze, was to construct a device as inexpensively as possible. That meant building as much as possible from scratch, using materials that we had on hand, and figuring out an economical way to track the motion. A schematic representation of the apparatus is shown in figure 3 . The "pendulum" is a vertically mounted flexible plastic ruler with a pair of permanent magnets at the top. (The attractive force of the two magnets is strong enough so that they hold firmly to the ruler.) The bottom of the ruler is fastened to a movable wooden stage that allows for small lateral adjustments in its position. The dotted lines indicate how the ruler can flex. There are four other pairs of permanent magnets, all at fixed locations. Each pair is held in place the same way as described for the pendulum. Two of them, which attract the pendulum and are labeled "A", are mounted on a 3D-printed strut in the shape of an arc that roughly parallels the arc traced out by the pendulum. We call this a "beta arc" because we can change the value of β by changing the position of these magnets on the strut. Their placement also determines the locations of the two potential minima seen in figure 1. The two magnets labeled "R", located at the base of the beta arc, repel the magnets on the pendulum; they enhance the restoring force when pendulum swings far enough to pass beyond either of the potential minima. The small yellow rectangle on the pendulum top is a piece of yellow tape which is used for tracking the motion, as described in the next section. The aforementioned components are mounted between a pair of Helmholtz coils that were constructed from scratch. They were wound on a pair of 26 inch bicycle wheels that had been discarded by a local bike shop. A bicycle wheel is a convenient frame on which to wind a coil. It is rigid, easily mounted, and has a deep channel in which many turns of wire can be held. The coils are connected to a function generator whose (sinusoidal) output is increased by a small power amplifier. The resulting sinusoidal magnetic field between the coils provides the variable driving force for the oscillator. Figure 4 shows a 3D view of the apparatus as rendered using OpenSCAD software. There is no physical significance to the color scheme; it is simply for ease of viewing. When we first planned the construction of the Helmholtz coils, the bike wheels seemed attractive because they gave us enough space between them to set up the video system. The fact that they were free also didn't hurt. Budgetary considerations forced us to use the only magnet wire we had available, which was thin and unmarked. We used 123 turns of this wire giving a total resistance of 60 Ω. We were able to drive a 45 mA current through the coils, and while the magnetic field at the center was quite uniform, it was only 0.2 mT, too small to drive the pendulum effectively. Hence, the only choice we had to test our tracking system was to do it on the unforced pendulum, the details of which are given in the next section. Data are collected using a novel video tracking scheme. A bright square of tape is affixed to the center of the pendulum head. The apparatus is situated in a dim room, and a cell phone set to record video at 240 FPS is mounted on a tripod and focused on the tape. The dotted line in figure 4 is the line of sight for the video camera. At a high frame rate, the only significant light in the video comes from the light reflected off the tape ( figure 5, left) . The video is then cropped to block any light not coming from the tape. The result is converted to grayscale, and isolumes are plotted. The isolume encapsulating the largest area is selected, and a box is drawn around this area ( figure 5, right) . The center of this box is recorded, and an angle is computed from the bottom of the data frame. We use this angle to track the relative motion of the oscillator. We tested out the video tracking system starting with the unforced oscillator. Some results are shown in figure 6 . At the left is a position vs time plot, and at the right is the corresponding phase portrait. The initial amplitude is large enough so that the pendulum can jump from one well to the other, but very soon it loses enough energy so that it gets trapped in the right hand part of the double well, eventually tailing off to zero. One can see a slowing down at about t = 2 s, beyond which the pendulum no longer has the energy to jump from one well to the other. In both of these results, the behaviors were what we expected, and provided evidence that the video tracking system was working properly. We plan to continue theoretical work on two issues: • We want to find a function that predicts how much initial energy the damped, unforced pendulum can have yet be incapable of inter-well oscillation. • We know the trajectory as a function of amplitude, but we don't know how the amplitude changes with time. Hence, we would like to find a function that gives us the amplitude as a function of time. Also, we now know that we can use the video system with smaller diameter coils; with thicker wire and the smaller coils we should be able to produce a stronger Helmholtz field. That will open up the possibility of using this system to investigate chaotic motions. Despite the cost constraints that we noted, we made toward our goal of building an inexpensive Duffing oscillator suitable for classroom demonstration and undergraduate research. We would like to thank Dr. Catherine Herne and Joe Spiconardi for their help in this project. Dr. Herne spearheaded the data collection method and created an initial version, and Joe Spiconardi helped in the initial design and construction. We are also grateful for the general support of the Department of Physics and Astronomy at SUNY New Paltz. The hardening form of the unforced, undriven Duffing oscillator and its solution are equation :ẍ + α x + β x 3 = 0 solution : x(t) = A cn(u, m) Here, u = ω t + θ and m is the elliptic modulus. For this case, it is known that In this derivation, we will make use of two identities: We will also need the time derivative of cn: Start with the expression for the velocity: Let the initial velocity be denoted by v 0 , and the initial position be denoted by x 0 . Then For brevity and clarity in the notation, we will henceforth write sn(θ, m) as simply sn, with the same idea holding for cn and dn. Then v 0 = −A ω sn dn also: cn = x 0 A Now square the initial velocity and use the identities to make substitutions: For the cn solutions, mω 2 = 1 2 β A 2 , so substituting gives Substitute for cn: Canceling and combining terms gives: We also know that ω 2 = α + β A 2 , so Arrange in descending powers of "A", then multiply by 2/β: β + x 4 0 + 2v 2 0 β More algebra: Now solve the quadratic equation in A 2 : Yes, more algebra: More rearranging, and the final result: Energy Harvesting Systems: Principles, Modeling, and Applications Stochastic Resonance in an all-optical passive bistable system Vibration of Axially Loaded Structures A mechanical Duffing oscillator for the undergraduate laboratory The Duffing Equation: Nonlinear Oscillators and Their Phenomena The Duffing oscillator with damping Reconstructing the transient, dissipative dynamics of a bistable Duffing oscillator with an enhanced averaging method and Jacobian elliptic functions