Various sources of information are available online, textbooks made in the golden age of
analog computing and more recent material. I mention only a few examples, not meaning that others are less valuable.
Two fundamental books by Prof. Bernd Ullmann, published by De Gruyter:
Analog and Hybrid Computer Programming
Analog computing recently updated, the new title is Analog Computing: Development, Programming, Applications, and Future Directions
Two beautiful, often cited, classic textbooks:
Handbook of analog computing Introduction to analog computer programming
The manuals of the Continuum modules are an attempt to summarize a little of that large competence base. Herein below, a
description of the case of linear differential equations is proposed, in the key of state-space theory, as those equations are
particularly useful when considering physical phenomena.
Software is available to facilitate the setup of the analog computer, a sort
of compiler telling which modules are required and the settings, as scaling can be a tricky matter.
Also software to facilitate the setup of the analog computer in case of non-linear equations is proposed.
Resolving a linear ordinary differential equation
Linear Ordinary Differential Equation and space state
Many phenomena of classical psysics can be modelled by linear Ordinary Differential Equations.
A linear ODE is a mathematical equation relating an unknown function of a single independent variable to its derivatives.
E.g.: a d2y/dt2 + b dy/dt + c y = u(t), or, equivalently written: ay'' + by' + cy = u(t)
is a 2nd order linear ODE with input u(t).
If you have a differential equation with order higher than 1, you cannot solve it in one single jump.
An analog computer only has basic integrators, and an integrator can only step down the math one order at a time (e.g. from acceleration to velocity, or from velocity to position).
state-space representation is a mathematical trick to break one complicated n-th order equation down into a neat stack of n simple, 1st-order equations. What is a "state"?
The states (which we write as a vector) represent the minimum amount of information you need to know at any time to predict exactly what the system will do next. In the physical world
of the analog computer, the states are the voltages at the output pin of each integrator. If you have three integrators, you have three states: x1, x2, and x3.
The core equations. The state-space method models the system with two standard equations: 1. The state equation (how the system changes): dx/dt = Ax + Bu 2. The output equation (what we actually measure): y = Cx + Du
A, B, C and D are matrixes whose dimension depends on the number of states.
Note that the output is the current states multiplied by C (for this reason called "output matrix") plus the input multiplied by D
(called "feedforward" matrix).
Matrix A (system matrix / feedback loops): it describes how the states interact with each other.
In your analog computer, matrix A dictates exactly which integrator outputs need to be wired back into other integrators
(possibly through a summing junction),
and what are the potentiometer values (gains) for those connections.
Matrix B (input matrix): describes how the external driving force u(t) enters the system.
It tells you which specific integrators need to be connected to the external input.
Matrix C (output matrix): you might have a system with N states (N integrators), but you only care about knowing one value.
Matrix C acts like a selector switch, telling you which integrator's output pin is the final answer y(t)
you should plug your oscilloscope or voltmeter into.
Matrix D (feedthrough matrix): This is for systems where the input signal bypasses the integrators and
connects directly to the final output. For classical physics,
this is often a matrix of zeros.
Example: mass-spring-damper
Step 1: the physics (the equation). Imagine a block of mass m attached to a spring with stiffness k and a viscous resistance with coefficient C.
An external force F = u(t) pushing on this block. Newton's Second Law (F=ma) gives us this 2nd-order differential equation for the block's position (y):
my''+cy'+ky = u(t), or, by isolating the highest order derivative: y'' = -(k/m)y - (c/m)y' + (1/m)u(t).
Step 2: defining the states. An analog computer steps down derivatives using integrators. For a 2nd-order system, we need two integrators,
which means we have two states.
State 1 (x1): the physical position of the mass (y). On the computer, this is the voltage coming out of the final integrator in the chain.
State 2 (x2): the physical velocity of the mass (y'). This is the voltage coming out of the first integrator.
Step 3: creating the first-order equations
Now, we define how these states change over time (their derivatives, x1' and x2').
The velocity equation: how does position change? The rate of change of position x1' is velocity x2.
So, our first equation is: x1' = x2.
The acceleration equation: how does velocity change? The rate of change of velocity x2' is acceleration x2''.
We just substitute our state variables into the physics equation we rearranged earlier:
x2' = -(k/m)x1 - (c/m)x2 + (1/m)u(t)
Step 4: building the matrices
Recalling that the format is x' = Ax + Bu
Matrix A (the system / feedback wiring):$$A = \begin{bmatrix} 0 & 1 \\ -\frac{k}{m} & -\frac{c}{m} \end{bmatrix}$$Top Row [0, 1]:
This means that the integral of the velocity gives the new position. It's a direct wire between the two integrators.
Bottom Row [-k/m, -c/m]: it tells the summing node to take the position, pass it through a potentiometer set to k/m.
Take the velocity, pass it through a pot set to c/m. Add them together to find the acceleration.
Matrix B (the input wiring): $$B = \begin{bmatrix} 0 \\ \frac{1}{m} \end{bmatrix}$$Top Row [0]:
You cannot instantly change the position of a mass just by pushing it. So, the external force does not wire directly into the position state.
Bottom Row [1/m]: force creates acceleration. This tells you to wire the signal representing the force into the main summing node through a potentiometer
set to 1/m.
Matrix C (the output measurement):
$$C = \begin{bmatrix} 1 & 0 \end{bmatrix}$$
This says: y = 1 x1 + 0 x2. It tells you to plug your oscilloscope or multimeter into the output of the position integrator
(x1), ignoring the velocity integrator (x2) for your final reading.
In summary: matrix A is a patch scheme. The 1 is a direct patch cord. The -k/m is the spring potentiometer dial. Turning this dial up means a stiffer spring. The -c/m is the viscous damper potentiometer dial. Turning this up means more viscous resistance.
The software
The programs are written in Python using version 3.14 and rely on various libraries that need to be installed.
To install the libraries: pip install (name of the library)
In all programs, the equation to be solved has to be written in the main function.
I am happy if you use and reuse the program code and would appreciate if you cite its origin. Needless to say, any feedback is appreciated, whether it is good or about bugs.
Linear ODE and space state compiler
This program takes a linear ordinary differential equation and generates the
instructions to set up the analog computer modules based on the state space method.
The space state matrixes are generated. Amplitude scaling coefficients are calculated.
About timing, the recommended time constant, based on the options available in Continuum, is selected.
Finally, a diagram is generated to show how to connect the various modules.
Required libraries: sympy, numpy, scipy, matplotlib, schemdraw.
Download linearODE.py (zip file)
Another program of the same kind which generates a different type of diagram.
Required libraries: numpy, networkx, matplotlib.
Download ODE2.py (zip file)
Non-linear equations
This program takes a non-linear differential equation and generates a netlist aiming to facilitate
setting up the analog computer. It indicates which kind of modules are required, including division variable/variable,
which is achieved by combining a multiplier and an open loop amp. The scaling coefficients are calculated.
Required library: sympy.
Download netlist.py (zip file)