never2old
Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
HomeHome  GalleryGallery  Latest imagesLatest images  RegisterRegister  Log inLog in  

 

 Program An Analogue Computer

Go down 
AuthorMessage
Fagin
Administrator
Administrator
Fagin


Posts : 156
Join date : 2010-02-18
Location : Isle Of Lewis

Program An Analogue Computer Empty
PostSubject: Program An Analogue Computer   Program An Analogue Computer EmptyFri Apr 09, 2010 11:31 am

Digital? Pah. Find out how to use simulators of classic analogue computers to solve differential equations with 1960s style.










Digital
electronics might be the engine behind today’s computers, but it hasn’t
always been that way. As recently as the ’70s, analogue electronic
circuitry also played an important role in some types of computation,
in particular simulation. This might sound like a rather specialised
application, but many of the world’s fastest computers are used for
simulation exercises in areas as diverse as engineering, climate study
and nuclear weapons research. Back in the heyday of analogue computing,
this technology could provide a solution in minutes where digital
techniques might have taken hours or days.Program An Analogue Computer PCP291_make8_bodycopy1
Analogue computers were programmed using patch leads, connecting different sockets and logic circuits together. (Picture credit: DVQ)


Simulation basics


Most real-world systems can be defined as a set of simultaneous
differential equations. These equations define the rate of change of a
so-called dependent variable with respect to an independent variable,
which is commonly time. To the uninitiated this might sound like
Gobbledygook, but the following example should clarify things. It
relates to the fictional radioactive element Aberdeenium (A), which
decays at the rate ka to produce Bristolium (B). This is also radioactive and decays at the rate kb to produce Cardiffium (C), which is stable. The following equations define this behaviour:
<blockquote>
dA
dt = -kaA
dB
dt = kaA - kaB
dC
dt = kbB
</blockquote>
The first equation says that the rate of change of the mass of
Aberdeenium is equal to its mass multiplied by a constant that is
related to its half-life. Note the minus sign: this indicates that the
change will be negative and hence the substance is decaying. The second
equation defines the rate of change of the mass of Bristolium. There
are two terms – one represents the amount created by the decay of
Aberdeenium, while the other shows the amount being lost by its own
radioactive decay. The third equation defines the rate of change of
Cardiffium. There is only a positive term since it is stable, and that
term is the same as the one we’ve already seen for the decay of
Bristolium. Solving differential equations like these involves the
mathematical process of integration (so, for example, if you integrate
dA/dt you get A), and this is the main strength of the analogue
computer.
Building blocks


An analogue computer is programmed by connecting together electronic
circuits that perform the various operations needed to solve
differential equations. The most common functions are integration,
addition, negation and multiplication. To start, we’ll look at how
analogue electronics are able to perform some of these functions. We
assume that you’d prefer not to burn your fingers with a soldering
iron, though, so we’ll use a circuit simulation package called LTspice.
Download it from http://linear.com/designtools/software/ltspice.jsp.Program An Analogue Computer PCP291_make8_bodycopy2
This circuit, simulated using LTSpice, integrates an analogue signal.


Start up LTspice and open the circuit called Integrator that we’ve included here.
It is remarkably similar to the Integrator circuit. In fact, if you are
creating these circuits yourself, the easiest way to create Summer is
by modifying Integrator. To do that, change the capacitor C1 to a 100k
resistor, add a second 100k resistor to the inverting input (the minus
sign) of U1 and connect the other end of that resistor to the plus sign
of a 4V voltage source. Finally, connect the minus sign of that new
voltage source to the ground. When you’ve opened Summer or created your
own circuit, simulate it as you did for Integrator. Unlike Integrator,
the output of this circuit remains constant for a constant input (or
more accurately, inputs plural). If you try changing the two voltage
inputs you’ll find that this circuit does as its name suggests – its
output is the sum of its two inputs, subject again to a negating and a
limit of approximately plus or minus 11V. In fact, real-world summers
often have more than two inputs, as do real-world integrators. This
allows them to integrate the sum of their inputs.
The only other component we need in order to solve our radioactive
decay problem is the potentiometer.. A potentiometer is like the volume
control on an old-fashioned radio – it’s a component that multiplies
the input voltage by a fixed value between 0 and 1 depending on its
setting. Analogue computers also had multiplication circuits that
permitted two variables to be multiplied but, for now, let’s stick with
these basic building blocks.
Patching things up


Analogue computers are programmed by connecting together the various
building blocks we’ve explored over the last few pages in such a way as
to solve a set of simultaneous differential occasions. Since analogue
computers are now few and far between, we’re going to do this using
VisSim. This application is programmed in a similar way to an analogue
computer, but with mouse clicks rather than patch leads. It’s a lot
simpler because it has theoretically perfect summers and integrators.
This means that we don’t have to take account of the fact that analogue
summers and integrators work within a limited voltage range and negate
the output. A real analogue computer requires careful scaling using
potentiometers to ensure that each opamp remains within its voltage
range, while the problem with negation is solved (if you genuinely need
a non-negated result) by using an extra inverter, which is just a
summer with only one input used. Using VisSim (grab it from http://bit.ly/65wXZ) bypasses these issues.Program An Analogue Computer PCP291_make8_akat
This beautiful transistor-based differential equation analyser emerged from Poland in 1959. (Picture credit: Warsaw Museum for Technology)


First, start VisSim and create the arrangement of building blocks shown in this screenshot.
‘1/S’ is an integration block, the circle with the sigma inside is a
summer (use the ‘+’ button to add it), the pointed box with the number
inside is a gain block that we’re using as a potentiometer, and the
window labelled Plot is where the results are displayed. You should be
able to recognise that this arrangement is what’s needed to solve our
radioactive decay simulation. Buttons for all the building blocks
you’ll need can be found at the top of the screen.
To put a block on-screen, click on its icon and then click anywhere
on the main part of the screen. Blocks can subsequently be moved simply
by clicking and dragging. To make a connection between a pair of
blocks, move the cursor to the output of one block and, when it changes
to an up arrow, click and drag from it to the input of the second
block. When you release the mouse button, a line will have been drawn
between the two blocks. To disconnect two blocks, move the cursor to
the input end of the line and, when it changes to an up arrow, click,
drag away from it and release. To flip a block so that its input is on
the right, select it by dragging a box around it and then choose ‘Flip
Horizontal’ from the Edit menu. And finally, to change the gain of a
gain block, right-click on it and enter a new value for ‘Gain’ in the
Gain Properties window that will be displayed. It’s much the same
process to change the initial value of an integrator from 0. You’ll
also need to ensure that the left-most integrator – the one that
evaluates the mass of Aberdeenium – starts off with a positive value,
say 10.
Now all you have to do to make VisSim solve the problem and display
the graphs in the Plot window is choose ‘Go’ from the Simulate menu. In
this case we’ve chosen values of the gain blocks such that most of the
action takes place within 10 seconds, which is the default amount of
time in which VisSim will simulate a system. If you find that you need
a shorter or longer time period then you can change it in the
Simulation Properties window, which is accessible from the Simulate
window.
Hybrid computing


In their heyday, analogue computers were good at solving
differential equations while digital computers were good at solving
problems that involved logic and decision making. Hybrid machines
combined elements of analogue and digital computers in order to gain
the strengths of each. Typically the digital computer could read the
outputs of the analogue building blocks such as summers and
integrators, and it could also do things like adjust the settings of
the potentiometers, set the initial condition of the integrators and
start and stop the analogue computation.Program An Analogue Computer PCP291_make8_patchbay
This GPS Analog Computer is so complex that it resembles an early telephone exchange. (Picture credit: Dmitry Sumin)


A classic example is using a simulation of the trajectory of a
projectile to determine the angle at which it should be fired to hit a
target at a particular distance. The problem would be created on the
analogue portion, and the digital program would then take over running
the analogue simulation. Depending on the range achieved it would
adjust the conditions by changing the settings of the potentiometers
and then rerun. This would continue until the required range was
achieved.
Solve second order equations


Our radioactive decay simulation involved first-order differential
equations. Some simulations involve solving second-order differential
equations, which include second-order differentials. An everyday
example will clarify this. The first-order differential of distance
with time, dx/dt – the rate at which distance varies with time – is
velocity (speed). The second-order differential of distance with time, d2x/dt2,
is the rate at which the first-order differential (speed) varies with
time (in other words, acceleration). To solve a second-order
differential equation you’ll need to use two integrators, one after the
other. The first generates the first-order differential equation and
the second generates the dependent variable.
<blockquote>
d2Y dY
___ +D ___ + Y = 0
dt2 .. dt
</blockquote>
If you’d like to have a go, the example shown above defines the
movement of a weight on a spring. D is the damping coefficient; it can
take values from 0 (no damping) to 1. First, rewrite as a pair of
first-order differential equations with a new variable (V, say) that is
equal to dY/dt. Next, rewrite so that one equation has only dV/dt to
the left of the equals sign and the other has only dY/dt. Finally,
define a positive initial condition for the second integrator to
represent the initial displacement of the spring.
The patch panel


Program An Analogue Computer PCP291_make8_patchThe
diagram on the right shows part of the patch panel of a typical
analogue computer. Each block represents one amplifier which, in this
case, could be configured as either a summer or an integrator. The top
left socket provided a constant positive voltage, while alternate
blocks had a +1 and a -1 socket. Using this in conjunction with a
potentiometer allowed any constant to be generated. The six unmarked
sockets on the left are connected internally but are not connected to
anything else, so they can be used as a handy interconnecting strip.
The blocks labelled P and Q provide connections to potentiometers – the
actual potentiometer knobs would be elsewhere. The sockets labelled 1
and 10 are inputs to the amplifier. Those labelled 10 have a gain of 10
(through the use of smaller input resistors) and the ones labelled 1
have a gain of one. The four sockets labelled OP are all connected to
the output of the amplifier, while the green block at the bottom
defines the operation of the amplifier. If you wanted it to become a
summer you would connect M to sigma, while if you wanted it to be an
integrator you would connecting it to either of the other two sockets
so that it had a gain of one or 10. We can ignore the other sockets.
Mike Bedford

Back to top Go down
https://never2old.darkbb.com
 
Program An Analogue Computer
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
never2old :: Main Forums :: Retro Computing-
Jump to: