Analog Computers

English translation

Computing Examples for the RAR Analog Computer — Workbook 1

This is an English translation of the original German-language document “rar_rb1” by Oliver Bach (2010), which constitutes Chapter 6 of a programming/application guide for the RAR small analog computer.


6. Computing Examples

The following simple demonstration examples from the field of analog computing show the function of this small analog computer, which is equipped with only a minimal number of computing components. Special programming details, such as variable and time scaling or the choice of initial conditions, are discussed in these examples only to the extent necessary for understanding the computing circuits. The variables in the following examples are given in dimensionless machine units. The machine unit +1 corresponds to a computing voltage of +50 volts; the unit −1 corresponds to a voltage of −50 V. The bipolar scale division of the display instrument and the large time constants of the integrators allow direct observation of dynamic processes, even without using an oscilloscope.

Table of Contents

6.1 Basic Operations with Summing Amplifiers

  • 6.1.1 Multiplication by a constant
  • 6.1.2 Sum of three variables
  • 6.1.3 Solution of a linear system of equations with two unknowns

6.2 Basic Operations with Integrators

  • 6.2.1 Integration of a constant input quantity: y = ∫ a dt
  • 6.2.2 Integration of a linearly time-dependent variable: y = ∫ (a·t + b) dt

6.3 Computing Operations with the Diode Function Generator

  • 6.3.1 Generating the function y = −x²
  • 6.3.2 Solution of a quadratic equation

6.4 Solution of Linear First-Order Differential Equations

  • 6.4.1 Solution of the differential equation y’ = y
  • 6.4.2 Solution of the differential equation y’ = −k·y

6.5 Solution of Linear Second-Order Differential Equations

  • 6.5.1 Solution of k3·y” + k2·y’ + k1·y = 0
  • 6.5.2 Solution of the differential equation y” = −ω²·y

6.6 Implementation of Discontinuous Functions

  • 6.6.1 Comparison of two variables (comparator)
  • 6.6.2 Generating the function y = sign x
  • 6.6.3 Generating the function y = |x|

6.1 Basic Operations with Summing Amplifiers

6.1.1 Multiplication by a Constant

Consider computing amplifier A3 as an example: it forms an output variable y according to the equation:

y = −(x1 + x2 + 2x3) (1.1)

If only one summing input is used (see Figure 1.1, circuit a), equation (1.1) reduces to:

y = −x

The amplifier then operates as a simple inverter.

Figure 1.1

If the input variable is connected to two summing inputs (circuit b), the output variable becomes:

y = −3x

The amplifier now acts as a multiplier, multiplying the input variable by a factor of 3.

If the output variable y is fed back to one input (circuit c), the computing amplifier has the same function as a coefficient potentiometer: since

y = −(x + y)

it follows that:

y = −0.5·x

For circuit d), from equation (1.1): y = −(2·x + x + 0.2·y), thus: y = −2.5·x

6.1.2 Sum of Three Variables

y = x1 − 2·x2 + 0.5·x3 + 1

The computing circuit in Figure 1.2 delivers at the output of summer A3:

y1 = −(x1 − 2·x2 + 1)

At the output of summer A1:

y2 = −0.5·x3

Summer A2 combines y1 and y2 into the final result:

y = x1 − 2·x2 + 0.5·x3 + 1

Figure 1.2

Numerical example 1: For x1 = 0.4, x2 = 0.2, x3 = −1.0, the solution is: y = +0.5

Numerical example 2: For x1 = −0.7, x2 = 0.8, x3 = 0.6, the calculated solution would be y = −1.0. Although this result lies within the permissible computing range −1.0 ≤ y ≤ +1.0, the computing circuit nevertheless delivers an incorrect result, because summer A3 is overdriven: y1 = −(−0.7 − 1.6 + 1) = 1.3.

6.1.3 Solution of a Linear System of Equations with Two Unknowns

x1 + 0.5·x2 − 0.3 = 0 0.2·x1 + x2 + 0.3 = 0

For variable separation, the equations are rearranged:

x1 = −(0.5·x2 − 0.3) x2 = −(0.2·x1 + 0.3)

The computing circuit in Figure 1.3 directly implements these two equations. The solutions are: x1 = +0.5, x2 = −0.4. Figure 1.3


6.2 Basic Operations with Integrators

6.2.1 Integration of a Constant Input Quantity

The integrators of the analog computer deliver an output variable y according to:

y = −(1/T) · ∫₀ᵗ (x1 + x2) dt − IC (2.1)

The integration time constant T is 1 second.

If only one integrator input is used, equation (2.1) reduces to:

y = −∫₀ᵗ x1 dt − IC (2.2)

In the demonstration circuit (Figure 2.1), a constant input quantity a is obtained from the reference signal −1 using a coefficient potentiometer. According to the fundamental rules of integral calculus:

∫ a dt = a·t (2.3)

From equation (2.2), the output variable of the integrator is therefore:

y = IC − a·t (2.4)

Figure 2.2 shows the time behavior of output variable y for the initial condition IC = −1 and for three different values of constant a: a = −0.05, a = −0.1, a = −0.2.

(The red line in the oscillogram marks the zero line of output variable y.)

6.2.2 Integration of a Linearly Time-Dependent Variable

The computing circuit of the previous example is now extended with a second integrator (Figure 2.3). According to a fundamental rule of integral calculus:

∫ (a·t + b) dt = y2

The output variable y2 of the second integrator therefore takes on a quadratic time behavior. Figure 2.4 shows the course of the integration process. At the zero crossing of y1, y2 has an inflection point.

(The red line in the oscillogram marks the zero lines y1 = 0 and y2 = 0.)


6.3 Computing Operations with the Diode Function Generator

6.3.1 Generating the Function y = −x²

To approximate a quadratic function, the function is approximated in a diode function generator by five line segments (Figure 3.1). The diode function generator delivers an output current Ia, which is converted into the final output variable y in a subsequent open-loop amplifier (Figure 3.2):

y = −x² for 0 ≤ x ≤ +1

Since the function y = x² is even, the variable y takes only positive values (see Figure 3.3).

The computing circuit in Figure 3.2 can therefore be easily extended by adding two diodes and an inverter to cover the full value range:

y = −x² for −1 ≤ x ≤ +1

Figure 3.4 shows this extended computing circuit.

6.3.2 Solution of the Quadratic Equation y = x² − 0.7·x − 0.2

In the adjacent computing circuit, summer A1 delivers at its output the variable:

y1 = 0.7·x − 0.2

At the output of summer A2:

y = −(−x² + y1)

or: y = x² − 0.7·x − 0.2

The two roots are: x1 = −0.22, x2 = +0.92. Figure 3.6 shows the course of the function y = x² − 0.7·x − 0.2. The diagram shows that for the value range x ≤ −0.8, overdriving of the computing circuit occurs.


6.4 Solution of Linear First-Order Differential Equations

6.4.1 Solution of the Differential Equation y’(t) = y(t)

To solve the equation y’(t) = y(t) (4.1), the computing circuit (Figure 4.1) is used. Assuming that the derivative y’(t) is present at the integrator input, the variable −y(t) must appear at its output. To satisfy equation (4.1), the integrator output is fed back to its input through an inverter. According to a general integration rule:

∫ eᵃᵗ = (1/a)·eᵃᵗ (4.2)

Setting the constant a = 1, the solution of equation (4.1) is:

y(t) = y(0)·eᵗ (4.3)

Figure 4.2 shows solutions y(t) for various initial conditions y(0) and an integrator time constant of T = 1 s. Three oscillographically determined solutions are shown with initial conditions: a) y(0) = +0.5, b) y(0) = +0.1, c) y(0) = −0.1.

6.4.2 Solution of the Differential Equation y’(t) = −k·y(t)

The solution is performed similarly to Example 4.1, but the inverter must be replaced by a coefficient potentiometer, since −k·y(t) rather than y(t) is to be fed back to the integrator input. With the approach a = −k, from integration rule (4.2):

y(t) = y(0)·e^(−k·t) (4.5)

Figure 4.5 shows solutions y(t) for various coefficients k and initial conditions y(0) = ±1. Three oscillographically determined solutions with: a) y(0) = +1, k = 0.1; b) y(0) = +1, k = 0.5; c) y(0) = −1, k = 0.5.


6.5 Solution of Linear Second-Order Differential Equations

6.5.1 Solution of k3·y” + k2·y’ + k1·y = 0

To design a computing circuit for the solution of

k3·y” + k2·y’ + k1·y = 0 (5.1)

the equation must be rearranged so that the highest derivative y” is isolated:

y” = −(1/k3)·(k2·y’ + k1·y) (5.2)

Assuming that the second derivative y” is present at the input of the first integrator A1, the inverted first derivative −y’ will appear at its output. At the output of the second integrator A2, y is then formed. At the output of the subsequent summer A3, the sum −(k2·y’ + k1·y) is formed. To satisfy equation (5.2), this sum must be fed back to the input of the first integrator via coefficient potentiometer k3. The differential equation is thus solved, but the two integrators must still be assigned the specified initial conditions.

In mechanics, this homogeneous second-order differential equation describes the motion of a spring-mass system defined by mass m, spring constant c, and damping constant d (Figure 5.2). If mass m is displaced from its rest position by y(0) at time t = 0, it undergoes periodic oscillation about the rest position:

m·y” + d·y’ + c·y = 0 (5.3)

The variable y corresponds to the oscillation displacement of mass m, y’ to velocity, and y” to acceleration. Comparing equations (5.1) and (5.3): k3 = m, k2 = d, k1 = c.

Oscillograms show oscillation behavior for k3 = m = 0.7, y(0) = −1, y’(0) = 0, with varying k1 (spring force) and k2 (damping):

  • Figures 5.3/5.4: Effect of spring constant k1 = 0.1 vs. 0.5 on frequency (k2 = 0.05)
  • Figures 5.4/5.5/5.6: Effect of damping k2 = 0.05, 0.4, 1.0 on transient behavior (k1 = 0.5)

6.5.2 Solution of y” = −ω²·y

Setting the damping factor k2 = 0 in equation (5.1) yields a linear second-order differential equation describing an undamped oscillation:

y” = −(k1/k3)·y

Designating ω = √(k1/k3) as the angular frequency (ω = 2π·f):

y” = −ω²·y (5.6)

The solution approach y” = −ω²·sin(ωt) with the integrator inputs weighted by C gives:

y’ = C·ω·cos(ωt) (5.8) y = C²·sin(ωt) (5.9)

This leads to C = ω = 2π·f, so: f = ω/(2π). For a weight factor C = 1, the oscillation frequency is f = 0.159 Hz. With both integrator inputs paralleled (C = 2): f = 0.318 Hz. Figure 5.8 shows two 90°-phase-shifted sine signals at the outputs of the two integrators. Due to non-ideal amplifier characteristics and capacitor losses, a slight damping occurs.


6.6 Implementation of Discontinuous Functions

6.6.1 Comparison of Two Variables x1, x2 (Comparator)

To compare two variables x1 and x2, the circuit in Figure 6.1 is used. Variable x2 is inverted and fed to one input of open-loop amplifier A4. Input variable x1 is directly connected to another input of A4. Due to the high gain factor (V ≈ 1000) of the open-loop amplifier, its output voltage immediately reaches the positive saturation value of approximately +120 V when x1 < x2. The output voltage jumps to the negative saturation value of approximately −100 V when x1 > x2.

A diode suppresses positive output voltages; negative voltage values are limited to −50 V (machine unit −1) by a coefficient potentiometer. The subsequent inverter A1 forms the final output variable y:

y = 0 for x1 < x2 y = 1 for x1 > x2

Figure 6.2 shows the time behavior of output variable y for a sinusoidal input variable x1 and a constant x2.

6.6.2 Generating the Function y = sign x

Setting x2 = 0 in Figure 6.1, the circuit operates as a function generator for the signum function:

y = 1 for x1 ≥ 0 y = 0 for x1 < 0

Figure 6.4 shows the time behavior of output variable y for a sinusoidal input variable x1.

6.6.3 Generating the Function y = |x|

The adjacent computing circuit generates the absolute value of a variable x for the value range −1 ≤ x ≤ +1. For positive values of x, diode D1 is reverse-biased, D2 is conducting. Open-loop amplifier A4 therefore operates as a simple inverter: x* = −x. For negative values of x, diode D2 is reverse-biased, so: x* = 0. Summer A3 delivers the output variable y:

y = −(x + 2·x*)

Therefore:

y = x for x > 0 y = −x for x < 0

Figure 6.5


[Translation covers the first 10 pages (the complete document); this is the entire content of the PDF.]