Analog Computer

Damped harmonic oscillator

Some days ago I finally received my #analogcomputer #THAT from #Anabrid.
The very first trials were easy, the first real application is this damped harmonic oscillator, like a suspension of a car, a pendulum in air or a spring in air.
Attached is the output of such a system in a not optimized way. As can be seen, the oscillations go on for a while before being fully damped. It is easy to adjust spring constant and damping to optimize this circuit.
Further parameters are the mass (used here just to keep the amplitude in range) and the initial speed.
The circuit was realized as said above with an Anabrid-THAT, the visualization with the linux software Xoscope (I am still waiting for my physical oscilloscope).

Differential equation: my’’ + Dy’ + Sy = 0, with m the mass, D the damping with speed and S the spring constant. Rewritten to y’’=-1/m * (Dy’+Sy).
An initial condition is required; we put the deflection to y0 and the speed to y0’.

The wiring is described below. Note that I am using my own "Analog Engine Scripting Language". The syntax and further examples can be found in my git repository https://permondes.de/gitweb/Analog_Engine.git/tree

IDENTIFICATION DIVISION
PROGRAM-ID Damped_Oscillator

ENVIRONMENT DIVISION
ENGINE Anabrid-THAT
REQUIRES COEFFICIENT 5
REQUIRES INTEGRATOR 2
REQUIRES INVERTER 1
REQUIRES SUMMER 2

DATA DIVISION
OUTPUT OUT_u y
COEFFICIENT.1 -y0 # -initial position
Coefficient.2 y0s’  # initial speed
COEFFICIENT.3 S   # spring force
COEFFICIENT.4 D   # damping, linear to speed
COEFFICIENT.5 1/m # 1 / mass

PROGRAM DIVISION
# Colors being used for wiring
# - black:  y0
# - blue:   y0’
# - green:  y0’’
# - yellow: y’’, y’
# - red:    y
-1 -> COEFFICIENT.1 -> -y0 # -initial position of the mass
-1 -> Coefficient.2 -> y0s’ # y’ is scaled to be within -1..+1
+1, y0s’, y0s’ -> Summer.1 -> y0’

y’’, IC:y0’ -> INTEGRATOR.1 -> -y’
-y’,IC:-y0 -> INTEGRATOR.2 -> y
y -> COEFFICIENT.3 -> S*y # springforce times displacement
-y’ -> INVERTER.1 -> y’
y’ -> COEFFICIENT.4 -> D*y’ # damping times speed
S*y, D*y’ -> SUMMER.2 -> -(Dy’+Sy)
-(Dy’+Sy) -> COEFFICIENT.5 -> -1/m*(Dy’+Sy)=y’’

OPERATION DIVISION
MODE REPEAT
SPEED 80ms # REPF 0.800; Osci: 10 ms/div, trigger: rising at 50
1

There are no comments yet.