Analog Computers

Reference / Paper · 2006

Workshop – Analog Computing

Read the PDF (40 pp) ↗

Slide deck from the 'Analog Computing' workshop held at VCFE-2006 in Munich, presented by Bernd Ulmann. Covers hands-on analog computer programming through three worked examples of increasing complexity: a mass-spring-damper system, Volterra predator-prey (rabbit-lynx) coupled differential equations, and a bouncing ball in a box with elastic reflections, friction, and gravity. All examples were patched and run on real Telefunken RA741/RA742 hardware; circuit diagrams, scaling considerations, and oscilloscope output photos are included throughout.

Manufacturer
Telefunken
System
Telefunken RA741 / RA742
Author
Bernd Ulmann
Year
2006
Type
Reference / Paper
Language
English
Learning track
introduction
Pages
40
  • Telefunken RA741 / RA742
  • Telefunken
  • analog computing
  • differential equations
  • simulation
  • programming examples

← Back to the Reference Library

Workshop – Analog Computing

Workshop – Analog Computing Bernd Ulmann 19-APR-2006 Commercial use prohibited. Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 1 Structure of this workshop The following slides are part of the workshop ”Analog Computing” which was held at the VCFE-2006 in Munich. This workshop gives an introduction to the art of analog computing by outlining some examples ranging from a mass-spring-damper system to a bouncing ball in a box. All examples have been programmed and executed on real analog computers like the Telefunken RA742, etc. Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 2 Simulating a mass-spring-damper system The first example shows how to simulate the behaviour of a rather simple mechanical system consisting of a mass, a spring and a damper. The basic elements of this system are shown below with the mathematical representation of the forces belonging to each: '$ &% Fm = ma = mÿ Workshop – Analog Computing 19-APR-2006 ........ ........   HH  HH  ... ......... ..... Fs = sy ulmann@vaxman.de Fd = dẏ http://www.vaxman.de 3 Putting all elements together Connecting these three elements together yields (thanks to nature and Newton) the following setup and equations: ......... ..  H  Fm + Fd + Fs = 0 H  ......... ..   Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de mÿ + dẏ + sy = 0 http://www.vaxman.de 4 Rearranging the equation To solve the equation mÿ + dẏ + sy = 0 on an analog computer it is rearranged in a way that yields the highest derivative of y on the left hand side: 1 ÿ = − (dẏ + sy) . m For setting up the computer assume that ÿ is known and generate the remaining terms incorporating lower derivatives of y by successive integration, multiplication and summing of terms. Note that each summer and each integrator will change the sign! Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 5 Generating −ẏ Assuming that ÿ is known, its next lower derivative, −ẏ , can be generated by using an integrator. The initial condition input of this integrator is used to set the initial value ẏ0 as shown in the picture below: ÿ Workshop – Analog Computing 19-APR-2006 ny˙0 @ −ẏ @ ulmann@vaxman.de http://www.vaxman.de 6 Generating Fs = sy In the following step the force Fs exerted by the spring will be generated: ÿ Workshop – Analog Computing 19-APR-2006 ny˙0 @ −ẏ @ ulmann@vaxman.de n−y0 @ y @ s n http://www.vaxman.de 7 Generating Fd and the sum of forces The force generated by the damper, Fd , can be generated accordingly using the already knwon value −ẏ . The setup shown below then creates the sum of Fs and Fd with a negative sign: ÿ ny˙0 @ −ẏ @ n−y0 @ y @ @ @ Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de ẏ s n @ − (dẏ + sy) @ d n http://www.vaxman.de 8 Closing the loop 1 The sum − (Fs + Fd ) can now be multiplied by the constant m yielding ÿ which is exactly what we expected at the input of the circuit. So closing the loop will result in a computer setup solving the initial differential equation readily: ÿ ny˙0 @ −ẏ @ n−y0 @ y @ − m1 (dẏ + sy) Workshop – Analog Computing 19-APR-2006 n ulmann@vaxman.de n @ − (dẏ + sy) @ d ẏ @ @ s n 1 m http://www.vaxman.de 9 Setting up the computer Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 10 Simulation run with s = 0.2 and d = 0.8 Here and in the following m = 1 is assumed. Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 11 Simulation run with s = 0.4 and d = 0.8 Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 12 Simulation run with s = 0.6 and d = 0.8 Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 13 Simulation run with s = 0.8 and d = 0.6 Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 14 Simulation run with s = 0.8 and d = 1 Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 15 Solving two coupled differential equations The following example is more complicated than the simple mass-spring-damper system shown before. The goal is to simulate the changes in population numbers in a two species ecosystem populated by rabbits r and lynxes l. Such a system is readily described by Volterra’s differential equations: ṙ = α1 r − α2 rl l˙ = −β1 l + β2 rl The parameters are as follows: Workshop – Analog Computing α1 Rabbit birth rate α2 Rate of Rabbits killed by lynxes β1 Lynx mortality rate β2 Lynx population growth due to killed rabbits 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 16 Partial circuit for ṙ = α1 r − α2 rl First of all, let us solve ṙ = α1 r − α2 rl assuming that there is a value rl already known. This leads to the following program: nr0 +1 ṙ @ @ AKA @@ A nα1 −r n rl α2 −(−α1 r + α2 rl) = α1 r − α2 rl Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 17 Partial circuit for l˙ = −β1 l + β2 rl Next, let us solve l˙ = −β1 l + β2 rl – again under the assumption that there already exists a term rl: nl0 +1 l˙ @ @ nβ1 β1 l − β2 rl O @@ ... ... ... ... ... −β1 l + β2 rl Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de @ @ −l n rl β2 http://www.vaxman.de 18 Partial circuit for l˙ = −β1 l + β2 rl Obviously we can do better and save two summers: n rl +1 nl0 β2 Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de @ @ nβ1 −l http://www.vaxman.de 19 Coupling both differential equations +1 lr0 @ @ lα1 l l @ @ α2 @ @ +1 ll0 @ @ Workshop – Analog Computing 19-APR-2006 β1 @ @ ........ ......... -r -l @ @ lβ2 ulmann@vaxman.de http://www.vaxman.de 20 Scaling the equations Due to the finite range of values which can be processed by an analog computer, it is necessary to scale the equations to be solved in order to avoid overloading the operational amplifiers and thus introducing erroneous terms. Coupled differential equations like the example above are normally quite difficult to scale since it is challenging to estimate maximum values for the variables. If a direct scaling is not possible (or if the programmer is too lazy which may be the case much more often) it is possible to run the calculation with a guessed scaling and check for overloads. Then use the values at the moment the overload occurred to determine the next ”guess” and so on. The values used for the following run were: α1 = 0.17, α2 = 0.4, β1 = 0.1, β2 = 0.27, r0 = 0.2, l0 = 0.8 (quite unrealistic number of initial lynxes to be honest). Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 21 The completed program The following picture shows the program as patched for a Telefunken RA741 analog computer: Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 22 The overall setup The next picture shows the overall setup featuring a two channel storage oscilloscope: Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 23 Running the simulation The picture below shows the results of the running simulation: Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 24 Simulating a ball in a box The following example is yet a bit more complicated – the simulation of a ball bouncing in a box (cf. [1]) as shown below: 1 v0 y (x, y) −1 1 x −1 Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 25 Overall setup of the simulation The ball is thrown into the left upper corner of the box with an initial velocity of v0 . Whenever it hits a wall of the box it will be reflected elastically. The ball is influenced by a gravitational force pointing downwards and it looses energy by air friction (which is assumed to be proportional to the speed of the ball). The simulation setup consists of essentially four parts: 1. A (sin(ωt), cos(ωt))-generator to create a real ball instead of a single moving point, 2. a circuit to generate the y -component of the ball’s movement in the box, 3. a circuit to generate the x-component and, finally, 4. a summing circuit to overlay these signals in a proper manner. Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 26 Generating the ball itself This is the easiest part of the simulation. A simple sine/cosine-generator with a rather high output frequency is necessary to create the impression of a ball (circle). These two values are generated by solving the well known differential equation ÿ = −αy as shown below:   HH H k = 100 0.02   H H0H S +1     0.5 k0 = 100   1 HH H S     0.1 0.5  ? −rx sin (ωt) Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de .... .... ....... . .... .... .... . ...  −rx cos (ωt) 0.1 10V http://www.vaxman.de 27 Generating the ball itself At the heart of this circuit is the simple sine/cosine-generator constisting of two integrators and a summer. The first thing to note is that the summing junctions of the integrators are used as the main inputs, thus allowing the use of variable input resistances by means of coefficient potentiometers. This is necessary to obtain the desired high output frequency (large ω ). The feedback path from the summer output to the 1-input of the rightmost integrator is used to ”heat up” the oscillation avoiding excessive decay. The two Zener-diodes are used to avoid overloading the integrator. They will clip the output signal once it reaches one machine unit. This, indeed, will result in a distorted output signal but this distortion is negligible for this application. Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 28 Calculating the y -position The next step towards a complete simulation is the calculation of the y -position of the bouncing ball. Drawing y(t) with t as the free variable results in a graph as shown below: y(t) t Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 29 Calculating y(t) Three terms constitute ÿ : The (constant) gravitation, the damping proportional to ẏ and the elastic rebound when the ball hits the floor (y < −1) or the ceiling of the box: ÿ = −g + dẏ   + c (|y| + 1) if y < −1  m c −m (y − 1) if y > 1 From ÿ the velocity ẏ and position y can be easily derived: ẏ = ZT ÿ dt + ẏ0 0 y = ZT ẏ dt + y0 0 Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 30 Computer setup to calculate y(t) -1   0.1 ẏ0  g +1 +1 -1 0.27 b k0 = 10 bb S " " "  0.03    0.5 Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de  0.52 +1 y0 −y b k0 = 10 b bb bb " " " " " " .... .... .... . ....... . . .... .. .. .... 10V http://www.vaxman.de 31 Tricks There are some tricks used in this computer setup: 1. The condition of hitting the floor or the ceiling of the surrounding box is detected by the two 10V-Zener-diodes instead of a classical backlash setup. This has the disadvantage that box heights different from ±1 are not covered as would be possible by using a backlash. The advantage is that two backlashes would require two amplifiers, two potentiometers and four diodes which are saved this way. 2. The slower the ball gets, the smaller the acceleration of the elastic rebounds will be. This is a bit unrealistic and will be partly compensated for by using the summing junction of the first integrator as the input from the simplified backlash instead of using a weighted input. Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 32 Calculating the x-position The calculation of x(t) assumes that the velocity diminishes with time t, eventually reaching zero (at this point the computer should enter the halt or initial condition mode). x(t) +1 t −1 Changing the direction of the ball when it hits the left or right wall is a bit tricky as the following computer setup will show. Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 33 Computer setup to calculate x(t) m 0.05 +1 Workshop – Analog Computing HH k0 = 1 H   19-APR-2006 +1 X @ -1 HH H   ulmann@vaxman.de -1 @ m 0.7 http://www.vaxman.de -1 HHk0 = 10 −x H   34 Putting everything together Now having calculated y(t) as well as x(t) all that is left to do is to superimpose those values with the (sin (ωt) , cos (ωt))-pair generated previously to display a real ball at a particular position vector (x(t), y(t)): −y(t) −ry cos(ωt) −x(t) −rx sin(ωt) Workshop – Analog Computing 19-APR-2006 HH HH    -y HH HH    -x ulmann@vaxman.de http://www.vaxman.de 35 The final computer setup Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 36 Bouncing ball Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 37 The end I hope you enjoyed the lecture and maybe you got a bit of the feeling of thinking the ”analog way” as Dr. Giloi once said. Analog computers are more than just fascinating relics – they are the last reminescences of a wonderful technology and (way more important) they teach one to think in a way completely different from the way one with a background in digital processing is trained to follow. Thinking the analog way will result in solutions which might never have been thought of in a conventional digital environment. Thank you for your interest and your patience. Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 38 Help As you may have noticed, analog computing is my passion! Therefore I would like to ask you for help: • I am trying to save analog computers from scrap whereever I can. If you happen to know about a system looking for a good home, please let me know. (I am not afraid of large systems and I would really love to get an RA770 or an RA800(H), for example! I will pay for all expenses to save the machine from scrap and I will arrange shipping, etc.) • I am interested in trivia, documentation, computer setups, sales brochures, etc. • Please spread the word and help to save these machines from getting lost and forgotten. You can reach me always at ulmann@vaxman.de or by mobile phone at 0177/5633531 (in Germany) in case of an emergency. Thank you very much! Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 39 References [1] AEG Telefunken, ”Demonstrationsbeispiel Nr.5, Ball im Kasten”. Workshop – Analog Computing 19-APR-2006 ulmann@vaxman.de http://www.vaxman.de 40