# Circuit Theory/Analog Computer

## Goal

Design an analog computer that generates a solution to this differential equation:

${\displaystyle a_{2}{d^{2}v(t) \over dt^{2}}+a_{1}{dv(t) \over dt}+a_{o}v(t)=f(t)}$
f(t) is the input, the bump the car is going over
v(t) is the output, the vertical motion of the car in response to the bump
a2 is related to the spring constant of a shock absorber
a1 is related to the damping coefficient and viscosity of the oil
ao is varied depending upon the desired ride
The goal is to vary a2, a1, and ao electronically, rather than build many models physically. This is modeling as done before WWII instead of using matlab or similar software.
Modern applications of this include control systems (opening and closing valves in an industrial process, turning off and on motors, controlling a nuclear power plant).

## Organizing

At first glance, need 6 op-amps, 2 for differentiation, 3 for scaling, 1 for adding.

But the adder can do scaling also.

Need to think about the overall circuit design too. The desired output is v(t). The function f(t) is an input. The derivatives are temporary values that are built from the output being feed back. So the math is going to look something like this:

${\displaystyle {\frac {a_{2}}{a_{o}}}{d^{2}v(t) \over dt^{2}}+{\frac {a_{1}}{a_{o}}}{dv(t) \over dt}-{\frac {1}{a_{o}}}f(t)=v(t)}$

Need to feed the output back into the input also ... and will take first derivative, then second, then feed into the adder with f(t). So the math would look more like this:

${\displaystyle -(-{\frac {a_{1}}{a_{o}}}{dv(t) \over dt}-{\frac {a_{2}}{a_{o}}}{d^{2}v(t) \over dt^{2}}+{\frac {1}{a_{o}}}f(t))=v(t)}$

## Simulating

Assume the output of OA4 is v(t).

Then the output of OA1 is:

${\displaystyle -R_{1}C_{1}{dv(t) \over dt}}$

The output of OA2 is:

${\displaystyle -{\frac {R_{3}}{R_{2}}}(-R_{1}C_{1}{dv(t) \over dt})={\frac {R_{3}R_{1}}{R_{2}}}C_{1}{dv(t) \over dt}}$

The output of OA3 is:

${\displaystyle -R_{4}C_{2}{d({\frac {R_{3}R_{1}}{R_{2}}}C_{1}{dv(t) \over dt}) \over dt}=-{\frac {R_{4}R_{3}R_{1}}{R_{2}}}C_{1}C_{2}{d^{2}v(t) \over dt^{2}}}$

Assume V14 is f(t). Then the output of OA4, the adder is:

${\displaystyle -R_{8}({\frac {f(t)}{R_{7}}}+{\frac {-{\frac {R_{4}R_{3}R_{1}}{R_{2}}}C_{1}C_{2}{d^{2}v(t) \over dt^{2}}}{R_{5}}}+{\frac {-R_{1}C_{1}{dv(t) \over dt}}{R_{56}}})={\frac {R_{8}R_{1}}{R_{56}}}C_{1}{dv(t) \over dt}+{\frac {R_{8}R_{4}R_{3}R_{1}}{R_{5}R_{2}}}C_{1}C_{2}{d^{2}v(t) \over dt^{2}}-{\frac {R_{8}}{R_{7}}}f(t)}$

Comparing this to:

${\displaystyle {\frac {a_{1}}{a_{o}}}{dv(t) \over dt}+{\frac {a_{2}}{a_{o}}}{d^{2}v(t) \over dt^{2}}-{\frac {1}{a_{o}}}f(t)=v(t)}$

We can see that:

${\displaystyle {\frac {a_{1}}{a_{0}}}={\frac {R_{8}R_{1}}{R_{56}}}C_{1}}$
${\displaystyle {\frac {a_{2}}{a_{o}}}={\frac {R_{8}R_{4}R_{3}R_{1}}{R_{5}R_{2}}}C_{1}C_{2}}$
${\displaystyle {\frac {1}{a_{0}}}={\frac {R_{8}}{R_{7}}}}$

There are three knowns a0, a1, and a2, 10 unknowns and 3 equations. So the problem is under constrained, meaning that other requirements can be used to pick the resistor and capacitor values.