Week 3: Harmonic Oscillator#
What you see#
The example show the Harmonic Oscillator example simulated using RK4. There is no control signal, \(u(t) = 0\), so the system just oscillates forever.
How it works#
The bead has a position and a velocity which form the two coordinates of the state \(\mathbf{x}(t)\). The position vector obey a linear differential equation, shown in the slide, and I then simply simulate that differential equation using RK4 as implemented in the exercises.