The simple harmonic oscillator (SHO) captures the core oscillatory behavior of waves, without any spatial dimensions to bother with. It can be seen as the 0-dimensional version of a wave, where the force that drives the oscillation comes not from neighbors, but from the position (height) of the wave itself.
There is also a simple version using complex numbers, which provides a clean way of understanding the difference between the second-order wave equation versus first-order complex waves.
Figure 1:
The mass-on-a-spring physical model of a simple harmonic oscillator, where the deviation of the mass from the neutral point of the spring creates a restoring force that drives the mass back toward the neutral point. Figure by Svjo on wikimedia
As is intuitively clear from the mass-on-a-spring physical model of a SHO (Figure 1), the restoring force is directly proportional to the height of the weight:
\[ f = -c^2 y^t \]
where \(c\) is the basic rate update constant, analogous to the speed of light in waves, which determines the effective strength of the restoring force, and thus the oscillation rate. The t suffix indicates the time step (only for variables that require integration over time). Everything else from this point onward is the same as for the wave equations, in the basic Newtonian physics framework of acceleration, velocity, and position:
\[ a = \frac{f}{m} \]
\[ v^{t+1} = v^t + a \]
\[ y^{t+1} = y^t + v^{t+1} \]
The equivalent of the wavelength for the SHO is the period, in time, for the cycle to repeat, which is a function of the constants, via the angular frequency factor omega (\(\omega\)):
\[ \omega = \frac{c}{\sqrt{m}} = 2 \pi f \]
so the frequency f is:
\[ f = \frac{\omega}{2 \pi} = \frac{c}{2 \pi \sqrt{m}} \]
and the wavelength is the inverse of the frequency:
\[ \lambda = \frac{1}{f} = \frac{2 \pi \sqrt{m}}{c} \]
As with the wave equation, the kinetic and potential energy of the system are defined as follows:
\[ E_k = \frac{m}{2 c^2} v^2 \]
\[ E_p = \frac{1}{2} y^2 \]
The following simulation shows the behavior of this harmonic oscillator.
Simple harmonic oscillator
Total E: 0.51 λ: 22.2 f 0.045
mass: 0.5
c: 0.2
start: 1.0
You can see that the overall behavior is independent of the amplitude (given by the starting position), but this amplitude does affect the energy.
Damping
Damping in the SHO happens via a negative factor applied to the velocity term:
\[ f = -c^2 y^t - r v^t \]
where r is a damping constant applied to the velocity \(v^t\).
Driving
Driving the SHO typically happens via a sine function added to the force. This need for a sine function introduces a significant implausibility for a fundamental physical process. For this reason, the version with complex numbers, described next, is more appropriate for the Spinfield Model functionality, because it can be driven with a simple linear factor.
Initial values
To compute position and velocity values at any point in the cycle, we can use the kinetic and potential energy equations.
When the system is initialized at either extreme of position, the velocity is 0, and all of the energy is potential:
\[ E_p = \frac{1}{2} y^2_0 \]
All of this potential energy is converted into kinetic energy at position = 0:
\[ \frac{m}{2 c^2} v^2 = \frac{1}{2} y^2_0 \]
\[ v^2 = \frac{c^2}{m} y^2_0 \]
\[ v = \frac{c}{\sqrt{m}} y_0 = \omega y_0 \]
Complex numbers
Figure 2:
Complex-valued simple harmonic oscillator, which rotates around the complex plane by the \(\omega\) factor at each discrete time increment.
As we can see in many other cases (e.g., the Schrodinger wave function vs Klein-Gordon, and the 1st order vs 2nd order versions of the Dirac equation), the two elements of a complex number can be used to drive an oscillator, using a first-order equation instead of a second-order equation. This equation effectively just rotates a point around the complex plane, as shown in Figure 2. We refer to this as a complex-valued harmonic oscillator (CVHO), which is different than a complex harmonic oscillator, which is a harmonic oscillator with more complex dynamics (e.g., damping, driving).
If you think of the real component as the position in the second-order SHO, then the imaginary component acts like the velocity, in being always 90 degrees out of phase. However, unlike the velocity, this imaginary component is of the same magnitude as the real component, and the two retain a hypotenuse (radius) of 1 as they rotate around the circle, which is what makes this system so simple and robust.
\[ \frac{dz}{dt} = i \omega z \]
where \(z = a + ib\) is a complex number, and \(\omega\) is the effective angular frequency, determining how quickly the two components a and b rotate into each other.
To drive this system, or to damp it, you simply increment or decrement the \(\omega\) factor, and it will always respond appropriately.
Expanding Eq 11 with the complex number, and separating the terms into the real and imaginary parts, results in two simple update equations:
\[ \frac{d (a + ib)}{dt} = i \omega (a+ib) \]
\[ \frac{da}{dt} + i \frac{db}{dt} = i \omega a - \omega b \]
\[ \frac{da}{dt} = - \omega b \]
\[ \frac{db}{dt} = \omega a \]
Thus, each complex value rotates into the other in proportion to \(\omega\), which we could compute from c and m parameters to replicate the behavior of the “physical” harmonic oscillator explored above.
As is the case for all the other first-order complex wave functions, if you perform a discrete stepwise integration of these two functions, using the current values of a and b to compute the next values, the result is numerically unstable. However, unlike the wave functions, this oscillator is entirely local to one cellular automaton (CA) cell, so it is possible to update the a and b values in sequential order, using the updated value for a to compute b, or vice-versa. By contrast, the wave functions require integrating over neighbors, so it is not possible to get the current state values in a discrete-time parallel update CA model.
The following simple simulation shows the behavior of the complex-valued SHO, using the \(\omega = \frac{c}{\sqrt{m}}\) parameters for angular frequency.
Complex-valued simple harmonic oscillator
Total E: 0.51 ω: 0.283 λ: 22.2
mass: 0.5
c: 0.2
start: 1.0
You can see that the behavior of the oscillation is identical to the physical harmonic oscillator. However, the notion of potential and kinetic energy is not as natural in this system, because there are just these two essentially symmetric values that rotate into each other. Instead, it makes more sense to think in terms of the relativistic particle energy represented by the oscillator, as derived next.
Planck-like particle energy
We can use the fundamental Planck relation to derive an angular frequency term \(\omega_0\) that would produce the Compton wavelength for a particle of a given rest mass:
\[ \omega_0 = \frac{m_0 c^2}{\hbar} \]
where \(\hbar = \frac{h}{2 \pi}\).
And more generally, the angular frequency associated with a given energy level is:
\[ \omega_E = \frac{E}{\hbar} \]
Thus, unlike the mass in the physical harmonic oscillator, the rest mass of a particle has a direct proportional influence on the rate of oscillation, rather than an inverse relationship. Higher frequencies are associated with greater energy.
Charge from phase
As explored in the complex KG (Klein-Gordon) system, one can compute a stable scalar value as a function of the phase relationships between oscillators, in this case two complex-valued harmonic oscillators, numbered with subscripts 1 and 2, each with a and b components. The resulting charge value from this system is computed as:
\[ \rho = e \left( b_2 a_1 - a_2 b_1\right) \]
where e is the value of the unit (electron) charge, and we assume that the complex values a and b are normalized with unit radius, which results in the maximum charge value for 90 degrees out of phase being 1.
This simulation shows the conserved charge value generated from these phase relationships, and also uses the \(\omega_0\) factor reflecting the rest mass energy of a particle.
Complex charge
Charge: 1 ω: 0.2 λ: 31.4
phase off: 90
m_0: 0.1
hbar: 0.5
Quantum harmonic oscillator
The quantum harmonic oscillator (QHO) is a well-studied entity (see wikipedia) that might otherwise be confused with our use of the complex-valued harmonic oscillator in the Spinfield Model. The QHO uses the Schrodinger wave function to model the behavior of the mass-on-a-spring system (Figure 1) instead of using Newtonian physics. This results in much more complex behavior than the very simple complex-valued harmonic oscillator used here.