ÐÓ°ÉÔ­´´

Chaos on the circuit board

No electronic system is perfect. Engineers are using chaos theory to help them to understand the wayward behaviour of electrical circuits

A nonlinear amplifier
An artificial negative resistance device

ENGINEERS prefer electronic circuits that behave predictably. When designing digital logic, they tend to choose circuits that perform well-defined functions such as AND, OR, or NOT. A careful search through the catalogues of most chip manufacturers will fail to find any PROBABLY, SOMETIMES, or WHYNOT functions. This is because it is difficult or impossible to predict just what a collection of such circuits would do when switched on.

Similarly, if we buy a watch, we expect it to keep ‘good time’. The hands should move or the displayed number should change at regular intervals. A clock whose hands moved unpredictably faster or slower, perhaps even sometimes going backwards, would not be very useful – except, maybe, to British Rail. As a result, most books on electronics concentrate on the things that ‘work well’, in other words, reliably. Despite this, it is surprisingly easy to devise electronic systems that behave ‘badly’, or chaotically. Now electronics engineers have come up with some neat ways of dealing with chaos in electronic circuits. Occasionally, they even use it constructively.

Transistors operate by responding to a change in the signal, a voltage or current, altering their output signal. A graph showing how the output changes as we alter the input gives us an idea of how the transistor behaves. A graph of this type is called the characteristic curve of the device. The ‘gain’ of the transistor, or any similar device, can then be calculated from the slope of the line which shows how much the output will alter if we change the input.

A common feature of all electronic systems, from hi-fi amplifiers to powerful computers, is that they exploit devices that show gain. Most modern electronic systems use various types of transistor. They also use devices such as valves and various types of semiconductor diode. We can describe how these devices behave in terms of how they respond to changes in an applied input voltage or current.

When a hi-fi company develops an amplifier, their main concern is that its output should simply be a larger version of the input. Ideally, an amplifier’s behaviour could then be specified by just one number, its overall gain, G. If we plotted the output from such an amplifier against the input, we would discover that the result was a straight line whose slope was equal to G. Such an amplifier would be described as linear.

Alas, any real electronic device is nonlinear. Its output will not simply be proportional to the input, and so its characteristic plot is not a straight line. No real amplifier can ever be absolutely linear because its behaviour will depend upon the detailed properties of all the devices from which it has been assembled. Nonlinearity is a problem in many situations. In hi-fi, for example, nonlinearity causes the output from an amplifier to become distorted so that what we hear is no longer precisely what was intended.

We can attempt to deal with nonlinearity in two ways. First, we can try to find devices that are inherently more linear – in other words, their characteristic plot looks as much like a straight line as possible. Secondly, we can apply an ingenious technique called feedback.

The principle behind feedback is quite simple: we arrange for the amplifier to be able to compare its output with its input.

Take, for example, an amplifier that is nonlinear, but which has a gain roughly equal to G for most input signals. We arrange for part of the amplifier’s output to be returned or fed back to its input for comparison with the original. Because we expect the output to be larger than the original input we must reduce the returned signal by an amount 1/G in order to make a fair comparison. This is done by passing the signal through a system designed to attenuate that signal by an amount, a (which, it is hoped, equals 1/G).

The amplifier can compare the fed-back signal with the original, and any difference between them can be used to correct the output, producing a better result. This process can never completely banish nonlinearity because the amplifier must always see some small ‘error’ between the desired and actual output in order to let the circuit know a correction is needed. Despite this, feedback can often reduce signal distortions to a thousandth or less of their uncorrected level.

Feedback can be tremendously helpful in reducing nonlinearities. But it must be applied with care, because adding feedback to a nonlinear circuit with gain is a recipe for chaos. In reality, any electronic device or circuit takes a finite time to respond to a change at its input. This gives us a problem because we have assumed that the original and the ‘fed-back’ comparison signal appear simultaneously, which is impossible. Any comparison signal taken from an amplifier’s output must take some time, however small, to get back to the input. This may lead to an amplifier that does not always do what we expect.

In some cases, these delays can be very useful. Many oscillators, including those in digital watches, make use of the effects of feeding back delayed signals. To see how this works, imagine what happens if we inject a brief pulse into the combination of an amplifier and a feedback network. For example, consider an amplifier of gain, G, which takes a time, t, to react to an input, being used with a feedback arrangement which takes a time, t, to return a signal while reducing it by an amount, a.

We start off by injecting a short pulse into the amplifier’s input. A time, t, later the output produces a pulse which is G times larger. Part of this travels back to the input. As a result, a time (t+) after the initial pulse, another fed-back ‘echoed’ pulse whose size is G multiplied by a bigger than the original, appears at the amplifier’s input. This, in turn, passes through the amplifier and produces another output pulse after a further delay. This is fed back, and so on. The result is a chain of re-echoed pulses reverberating around the amplifier and its feedback arrangement.

The behaviour of the system now depends upon the size of the gain, G, multiplied by the feedback, a. If we have ensured that the reduction, a, exactly equals 1/G, then G times a will be 1. This means that each echoed pulse will be identical in size with the initial one. The result is a chain of identical pulses occurring at regular intervals, T = (t+). We have built a clock or oscillator that produces an output which repeats itself over and over again in a regular way with a fixed period, T.

In fact, when comparing the original and fed-back signals we are interested in the difference between them – we want to subtract one from the other. So, we generally arrange for G or a to be negative (a positive input produces a negative echo and vice versa). This means that the repeating pulses are alternately inverted. As a result, the output then repeats itself with a period 2T.

Unfortunately, we may well find in practice that the size of feedback reduction, a, is slightly bigger or smaller than the amplifier gain, G. The behaviour of the circuit then depends upon the size of a multiplied by G. If this is less than 1, each pulse is smaller than the last and the echoes fade away rapidly. If it is greater than 1 the echoes grow steadily.

If we apply a constant input, x, the output will initially be equal to x times G. After a time, this produces an echo and the output becomes xG(1 + aG) which in turn produces an echo, and so on. Provided that a times G is small, this series will add up to a finite number and the amplifier output will settle on a particular value. If a times G is too large, however, the series of echoes may try to add up to an infinite result.

In practice, the output cannot go on growing forever. The amplifier will be powered by batteries or a mains supply which provide it with some maximum voltage and current. This means that the amplifier cannot produce an output greater than this maximum level. At some point, a series of growing pulses will reach this maximum and stop growing. This, in itself, is a sort of nonlinearity because we find that, from now on, the output produced by a given input must be less than G times bigger.

You can analyse behaviour of the amplifier and its feedback in the same way as other chaotic systems. An input signal, x0, leads to a output, y0, which in turn produces a new input, x1, which leads to a new output, y1, and so on. Each output, yn, produces a new output, yn+1. We can describe this process in terms of what is called a logistic mapping: yi yi+1. Franco Vivaldi’s article earlier in the series described the logistic map in detail (‘An experiment with mathematics’, 28 October 1989).

A recipe for chaos

Here, we can think of the arrow, , as meaning ‘produces’. For a linear amplifier and feedback system we can say that an output, yi, will produce an output echo yi+1 = aGyi. In this case, the appropriate logistical mapping would be: y aGy. To see what happens when we apply a particular initial input, we can just repeatedly ‘update’ the output by calculating the change produced by this mapping over and over again.

Because the output from any practical amplifier cannot move outside some finite range, we can take this into account by replacing the constant value of aG with some other value that itself depends upon the size of y. Variation in this value with y can then represent the nonlinearity of the amplifier and its feedback arrangement. Although the details of these nonlinearities will differ from one system to another, we can expect that there will always be a tendency for this value to fall when y becomes very large. Otherwise the amplifier might be capable of producing infinite output.

One of the simplest mappings that can produce chaotic results is: y ky(1-y). Comparing this with the above we can see that this is the equivalent to building an amplifier whose echo gain is k(1-y), in other words, it falls as the output level, y, increases. If we repeatedly use this simple expression to produce new values for y, we find that the result depends critically upon the value chosen for k. Provided that k is between zero and three, y tends to reach some fixed value. When k is between three and four, y hops around repeatedly between a set of values, never settling to any one in particular. When k is greater than four, y jumps about in an apparently patternless, chaotic manner, never visiting any value more than once.

For most purposes, engineers concentrate on making amplifiers that have a fairly constant gain over some particular range of output values. They then try to arrange that the input given to the amplifier is always kept within limits that ensure that the output never has to try and reach unattainable levels. We can, however, deliberately produce circuits that have quite severe nonlinearities. These can sometimes be used to produce chaotic effects .

What happens when we feedback gain is important for designers who generally want linear amplifiers. It is also of critical importance to anyone who wants to design oscillators – circuits designed to generate regular, periodic output signals.

Electronic engineers employ two approaches when making oscillators. The most common is to combine an amplifier with a selective feedback arrangement. We can see that, in principle, any waveform that repeats itself after the right period will be re-echoed. Hence, if we want to ensure that an oscillator produces a specific sort of output – be it a series of pulses or a sine wave – we have to make the system ‘prefer’ the waveshape we want. We can do this by building a feedback circuit that passes only the waveshape that we require.

This approach works well provided that the amplifier is fairly linear. If it is very nonlinear, however, each successive pass through the amplifier seriously changes or distorts the shape of the repeating wave. What happens then depends upon the result of a fight between the amplifier and the feedback. If the feedback arrangement can reject the unwanted distortions and still see enough of the original shape to return once more to the amplifier, then the system continues to re-echo the same wave. If, however, the feedback circuit is unsuccessful, we find that each new echo may differ noticeably from the last.

To add insult to injury, we can use an unselective feedback arrangement that delays different types of signal by differing amounts. Then both the nonlinear amplifier and the feedback will tend to scramble the echoed signals. If the system is ‘bad’ enough, the result may be a chaotic oscillation. The arrangement shown in Box 1 works in this way.

At very high frequencies, it becomes almost impossible to make conventional electronic amplifiers. As a consequence, microwave and millimetre-wave engineers tend to use the properties of individual devices instead of collections of transistors. For frequencies above about 50 gigahertz, we can use solid-state devices – for example, Gunn diodes (‘The rise and fall of negative resistance’, New ÐÓ°ÉÔ­´´, 31 March 1990) – which show negative resistance. Just as an ordinary, positive resistance tends to dissipate electrical oscillations, so a negative resistance tends to generate oscillations.

Millimetre-wave negative resistance diodes usually make use of the properties of fairly esoteric materials and complex semiconductor structures. They are also quite expensive and normally operate only at high frequencies. Fortunately, it is fairly easy to build simple transistor circuits that behave as negative resistances at audible frequencies .

Most houses contain quite a few very simple nonlinear electronic devices. Ordinary incandescent light bulbs have a resistance that increases with the applied voltage. Even more interesting are fluorescent lights and neon indicators which have a resistance that falls when the voltage is increased. As a consequence, neon indicators can be used to make a type of negative resistance oscillator, and fluorescent tubes have to be designed so as not to interfere with radio and TV reception.

Usually, engineers do not want chaotic circuits – although they sometimes find they have built one by accident. The performance of a microwave oscillator depends on its basic frequency of oscillation and by the amount of power it produces at that frequency. For most purposes, we require oscillators that produce a ‘pure’ sinewave at just one frequency.

In practice, all real oscillators suffer from two main defects. First, they tend to produce ‘extra’ oscillations at various frequencies. Secondly, their main, wanted output tends to fluctuate unpredictably in both power and frequency. Until recently, engineers have regarded these problems as separate. They considered unwanted oscillations as the product of distortions resulting from nonlinearity. Random fluctuations in the wanted output were considered as being due to random noise. This noise arises because of random movements of the electrons in any conductor or semiconductor.

Viewed with a chaotic eye, however, the picture looks subtly different. Given a nonlinear device that can amplify signals (a diode in this case) and a complex feedback arrangement, we have to accept the risk that the output of the circuit may not simply be an ideal, periodic signal. What is more, the apparently random movements of electrons can be seen as the result of millions of nonlinear interactions between all the electrons and the atoms they move between.

Although the subject is, for practical engineers, a fairly new one it begins to look as if chaos may help us to understand the behaviour of imperfect electronic systems. That is our main interest in the millimetre-wave group at the University of St Andrews. We are using chaos as a way of trying to understand how to make better, less chaotic oscillators. For this, studying chaos means ‘know thy enemy’. It is very difficult to observe the detailed behaviour of an oscillator operating at 100 gigahertz because everything happens so quickly. The ‘artificial’ negative resistance shown in Box 2 can be used to ‘mimic’ the millimetre-wave oscillator, but at frequencies below a few kilohertz.

This approach will allow us to develop new systems that avoid problems and behave in a more predictable, unchaotic manner. It may also allow us to invent entirely new systems that make use of enhanced forms of chaos to good effect. For engineers, the problem then will be: who wants chaos? Well, sometimes engineers want to produce random, noise-like, signals. Military communication systems, for example, sometimes transmit radio signals designed to ‘hide’ in the background noise. These cannot actually be random, otherwise they would not convey any information, but they should imitate real noise as closely as possible to avoid being noticed by eavesdroppers. The kinds of signals produced by ‘chaotic oscillators’ may be ideal for this.

* * *

Every chaotic circuit is an individual

THE diagram below shows the circuit diagram of a fairly simple transistor amplifier. Amplifiers of this type are used in many pieces of electronic equipment. They produce quite acceptable results, provided you keep the input signal small and the feedback arrangement fairly simple. The design, however, is inherently a ‘poor’ one and will show various sorts of nonlinearity if the input signal level is allowed to cover too large a range. Here the amplifier is shown with a fairly complex feedback arrangement of inductors (L1 to 3) and capacitors (C1 and 2, Cs) which make chaotic behaviour a distinct possibility.

A detailed analysis of this amplifier would be quite difficult. Despite this, we can fairly easily explain the two main effects that make the amplifier nonlinear. One of these can be seen by looking at its voltage characteristic curve. This shows that, at low voltages, as the input voltage, x, is increased, the output voltage, y, also rises rapidly. This is because the increasing input causes extra current to flow through both transistors, boosting the output.

Eventually, the output transistor, T2, ‘saturates’ and it cannot produce any extra current. Any further increase in the input makes the first transistor, T1, ‘drag down’ the output. Hence, above some critical level, any rise in the input causes the output to fall. This process finally stops when T1 also saturates.

The other main nonlinearity comes from the fact that an ordinary transistor has an input that shares some of the character of a diode. Current can flow through the transistor more easily in one direction than the other. As a result the circuit tends to ‘rectify’ the input signal it sees.

Usually in electronics it is easy to decide whether the choice of components (transistors, resistors, and so on) is critical or not. For circuits intended to be chaotic the situation becomes rather odd. This is because no two components will be identical – even if they are marked as being the same. A pair of resistors may both be marked ‘270 ohms’, but if we measure them precisely enough we will always find that their values differ. They may be similar to one part in a million or a billion, but never identical.

Most electronic components are normally specified with an accuracy of only a few per cent. Usually, this does not matter but with chaotic systems it means that no two ‘identical’ circuits will ever do precisely the same thing. I built a test ‘chaotic oscillator’ for this article using components listed below. We found that varying the applied bias voltage over a range of 5 to 20 volts, or slowly altering the value of R2 made the circuit pass through alternating regions of chaos and regular, periodic oscillations.

Another circuit, built using similar components would behave in a similar way, but the exact details of its behaviour would be different. A circuit made using very different components would show its own pattern of behaviour. When it comes to chaos, every component, every circuit, is an individual.

—————————————————————- Component values —————————————————————- R1=2700 ohms, R3=R4=R5=270 ohms (all +/- 5 per cent) R2 was a variable resistor to cover a range of 10 to 100 kiloohms T1=BC109, T2=BC477, Cs=C1=C2=C3=0.01 microfaradays (all +/- 20 per cent) L1=5.2 millihenries, L2=3.5 millihenries, L3=4.9 millihenries (all +/- 10 per cent) —————————————————————-

* * *

Negative resistance generates chaos

ELECTRONIC engineers use negative resistance devices to make microwave and millimetre-wave oscillators. Carefully designed oscillators can produce sine-waves at frequencies up to about 100 gigahertz. As with amplifiers, you can produce ‘bad’ devices and feedback circuits that behave chaotically.

These devices are essentially diodes, so they cannot be used in exactly the same way as an amplifier because their output does not appear in a different place to the input. Instead, engineers use a feedback arrangement that is sensitive to the change in current resulting from altering the input voltage. The feedback circuit is designed to respond to a current change by producing a change in the voltage after a short time delay.

Any change in the input voltage produces an alteration in the current, once the device has had time to respond. This change in current passes through the feedback arrangement and results in a further voltage change after another delay. If the device behaves as a negative resistance, so that the current falls when the voltage rises, this combination may lead to variations that persist in much the same way as the ‘echoes’ in a conventional combination of an amplifier with a suitable feedback circuit.

The diagram opposite shows a transistor circuit that you can use to mimic how a negative resistance device behaves. When the applied input voltage, Vin, is small, no current will pass through either of the two transistors. Under these circumstances the input current is simply given by Ohm’s law, Iin = Vin/R1.

When Vin rises to a ‘peak’ level the transistors will begin to conduct. (In the circuit shown, Vin will need to exceed about 3 volts to reach the ‘turn-on’ voltage of the transistors and the red light-emitting diode, D1.) Now any increase in Vin will generate ‘extra’ current from T2, which will pass through R1. If R2 equals R4 and R3 is less than or equal to R1, this produces more current than is required to increase Vin and so Iin falls. As Vin is increased, we find that at a ‘valley’ level the second light-emitting diode, D2, will conduct and Iin begins to increase with Vin once again.

A small capacitor, C1, can be used to mimic the time taken for a real device to respond to a change in the applied voltage. It is then possible to experiment with the effects of supplying a range of voltages to the input through various types of feedback arrangement. Under most circumstances, the ‘negative resistance’ device and feedback arrangement either does nothing or oscillates in a periodic manner. You can, however, use the system to generate chaotic output. In particular, you can connect several of these devices together in a network in an attempt to combine their outputs. Such a system can produce very complex patterns of behaviour. The component values below will give a system that behaves as a negative device.

——————————————————————— Typical component values ——————————————————————— R1=R2=R4=270 ohms, R3=100 ohms (all +/- 5 per cent) C1=0.01 microfaradays (+/- 20 per cent) T1=BC109, 72=BC477, two red light emitting devices Vr=between 8 and 20 volts This circuit shows negative resistance for Vin between about 3 and 4 volts ———————————————————————

Jim Lesurf is a lecturer in the department of physics and astronomy at the University of St Andrews.

More from New ÐÓ°ÉÔ­´´

Explore the latest news, articles and features