Aliases Continued
|
Daisies and Sunflowers Here is a diagram which has been created using a simple program which generates a spiral, and places a dot at equal intervals of angle. Near the middle we can "see" the spiral, but near the edge we can "see" only radial lines, and in between there is a region where we can "see" both. In fact, only the dots exist. We cannot deduce from them how the program worked. It could have been written to draw the radial lines of dots with the right positions, and the picture would have looked exactly the same. In the next picture the number of dots per circuit has been changed from 100.0 to 100.1. Next we make 100.5 dots per circuit. You can still see the radial lines, but now you can more easily see two sets of spirals. In the corners of the picture you can see that the dots appear to be arranged in triangular and hexagonal arrays. Nearer the centre you can see little squares. All completely artificial: artefacts of the way we see and construct patterns. What was generated was a long spiral with 100.5 dots per revolution. Nothing more. Finally we have a set of dots using the value 100.4, which makes the imaginary spirals unequal. In the page about Fibonacci numbers, we see that the spirals in daises, sunflowers, and many other flowers, are aliases, just like these. We also see that the plants do not even make these patterns from any kind of mathematical rule. |
####
####
|
The amplifier is needed because the ADC is designed for a fixed voltage range, which the amplifier must match. The gain and offset of the amplifier are controlled by information from the computer, so the signal path does not include large mechanical switches and other large parts which would introduce inductance and capacitance, both of which have bad effects on bandwidth. These effects arise both inductance and capacitance can store energy. The input of energy tends to slow things down, and its later release can also affect the signal. The sample and hold is controlled by a very accurate clock, which causes it to freeze the signal at regular intervals. In principle, the output signal is a series of averages over the open period of the gate, as the next picture shows. The clock drives the sample and hold, which opens a gate to the signal during the times represented by the grey bars. The red lines represent the output from the sample and hold circuit, which is essentially the average of what happens during the grey bars. If you have even the slightest knowledge of electronics you will know that this diagram is ridiculous: you will never see anything like this in reality. Real clock signals are never square: their rise time is limited by the circuit bandwidth. They may not even have flat tops. No matter – the important thing is the regularity of the times at which the pulses cross the timing threshold. And here we encounter some of the problems of high speed electronics. The clock itself may not be perfectly regular. Furthermore, noise on the system will cause the threshold to be crossed earlier or later than the correct times. Our enemy is noise. Once the signal has been digitized, the effects of noise can be almost entirely discounted. The penalty of digitizing is that we have to worry about these vulnerable points in the sample and hold and the ADC. Numerous difficulties beset the designer. The energy storing capabilities of inductance and capacitance mean that successive samples may not be independent of previous ones. |
####
|
The next stage is the analogue to digital converter. Most oscilloscopes use an eight-bit ADC, though some, running in the lower frequency ranges, use ten-bit or even twelve-bit ADCs. The CD recording system uses eighteen bits, because the ear-brain system is so sensitive to minute errors. What do we mean by an eight-bit ADC? A three digit counter runs from 0 to 999, or 0 to 103 – 1. An 8-bit ADC runs from 0 to 28 – 1, or 0 to 255. The input is a pair of wires between which the voltage is measured. The output is a set of eight wires, whose voltages are set either high or low, counting as either one or zero. We must remember that there is no such thing as the voltage on a wire, so we also need a zero reference, or ground wire. This wire is just as important as the signal wires. More so, in fact, because noise on this wire can affect many inputs. The next diagram shows the signal going from the sample and hold into the ADC. The latch holds each value of the ADC output long enough for it to be passed to the computer bus with no danger of fluctuation. From this point on, the data are as safe as any other digital data in a computer system. At this point the original continuous signal is represented by the isolated values at the times represented by the grey bars in the earlier diagram. Eventually the signal will be drawn on the oscilloscope screen. Eventually means as little as a few milliseconds after the event – as fast as the eye can take it in. |
####
|
Here is a simple signal, with some digitized points. This looks very satisfactory: we can get a good idea of the signal from the dots. But what if we change the conditions – Now we see only a confusing mass of dots, with hints of lines here and there. This is visual aliasing. Luckily there is a simple answer – we can make the scope join the dots with straight lines as in the third part of the picture. But now the trace on the screen is not quite like the real signal. The next picture shows why. This horizontal expansion shows that there are not enough points to give the illusion of a smooth curve. But we feel sure that real signals are not composed of little straight segments – certainly not ones which happen to fit our samples. Can we find a smooth curve which can be used to fill in the gaps? If we can, we must never forget that all we really know about are the samples – everything else is imaginary. The signal could, in principle, oscillate all over the place between the samples. Can we imagine a situation where we know that nothing untoward happens between the samples? Yes. If the ADC is preceded by a filter that sufficiently limits the bandwidth, we can then use a curve, because we know that the bandwidth prevents any oscillations which are finer than the dots can show. What is the correct curve? Would you know it if you saw it? Here it is (a part of it at any rate), on two different scales. This curve appears in many aspects of physics. If you look at a distant sodium lamp through a narrow slit you can see a series of bright fringes. Their intensity is given by the square of this curve. What is the curve? It is the graph of (sin x) / x, or sinc (x). It has an infinite array of zeroes at equal intervals. Only at x = 0 is there an exception. There, the value is 1. This is how the curve can help us with our scope trace. We make the spacing of the zeroes equal to the spacing of the samples on the screen. At each sample we make a copy of the sinc curve, with a height that matches the sample. It has a zero at every other sample, so it cannot affect them. We do this at every sample, until we have a large set of sinc curves. Then we add them together, and we get a smooth curve. If you don’t believe it, here is an example, most of which is off the screen, so the diagram shows only a small section. First we see the dots representing the samples, and then we see the signal reconstructed from using the sinc function. The process clearly requires a lot of calculations. Encouraged by this, let’s try another signal, a step. Something strange has happened – the reconstruction oscillates. The reason is that we are misusing the sinc function, on a data set which was undersampled. The required sampling frequency must be at least as high as twice the maximum frequency which is present in the signal. There is a fundamental flaw in all this – the sinc curve never ends – it just gets smaller away from the centre, so we ought to have an infinite set of data. This means that we can only make an approximation to the real trace. Furthermore, the data are not perfect. They are subject to noise, firstly from the finite steps of the ADC, and secondly from random noise. This noise affects the final curve, not only where it occurs, but at other places as well, because of the long oscillations of the curve. |
####
|
Here is another example of a sampled signal and its reconstruction. Although the samples are accurate, there are too few, and the scope reconstructs a copy of the signal which is accurate in all respects except its frequency. This is called an alias. The behaviour of the output frequency as a function of the input frequency is shown below. FN is the Nyquist frequency, the frequency above which aliasing happens. Another way of looking at this is to say that there are correlations between different points on the signal. In the example considered here, the correlations as so good that we can reconstruct the complete signal from the samples. Correlations are sometimes less than complete: the behaviour of a roulette wheel or a gaming machine is intended to be random, so that no prediction is possible. In practice, a few very patient people have been able to detect small imperfections in the behaviour, to the extent that they have been able to "beat the system". This is a deliberately chosen bad phrase: a perfect machine would have no "system", being random, so beating the system actually means finding the systematic behaviour and using it. |
###
|
Only in the first segment of the graph is the reconstruction correct: the rest of the graph is the basis of the bizarre behaviour of rotating objects on film or TV. In principle this behaviour can be used to measure very small changes in frequency. Suppose we have a nominal 1MHz oscillator, the frequency of which varies from 999900 Hz to 1000100 Hz. If we use aliasing to move the centre frequency to 500 Hz, the range is now from 400 Hz to 600 Hz, in other words, a swing of 20 % in each direction. The original swing was 0.01 %. We must, of course, be sure that our sampling frequency is very stable. Click here – and select "Run the program in the current location" you can see what happens. You should see something like the picture above. The effects of increasing frequency on the visual appearance and on a sampled signal will be seen. The frequency will increase and decrease alternately. You can quit the program by pressing "q". Note the red lines have no physical meaning: they are interpolations to make the result easily visible. But in a real sampled data stream, only the samples exist, any interpolation, however sophisticated, is a guess. Click here – and select "Run the program in the current location" you can see what happens when a series of pulses is sampled. This program illustrates both visual aliasing and actual aliasing. You will probably see some imperfections in the picture because of beating between your screen refresh rate and the update rate of the program. A special case of aliasing is the 19th century zoetrope. It consisted of a hollow cylinder that could rotate on an axis. On the inside of the cylinder there were N small pictures, each differing slightly from the previous one. There were also N slots for viewing the pictures, giving an effect like a crude movie picture. The viewing slots made the smoothly moving pictures look stationary, while the succession of pictures gave the illusion of movement from a set of pictures which included no motion. In the analogue world, parts of the frequency domain can be mapped on to other parts, as in the superheterodyne receiver. If a radio receiver has to cope with numerous different bands, complexity and expense can be much reduced by shifting all the frequency bands to an intermediate frequency (IF) band. The IF part of the receiver can be optimised quite separately from the input stages. The shifting is done using a local oscillator, which is "mixed" with the incoming signal. If the IF is 10.7 MHz, the local oscillator is tuned to a frequency which differs from the incoming one by 10.7 MHz. The term "mixing" is not very descriptive. The essential feature of the process is that the two signals have to pass through a non-linear circuit, which produced sum and difference frequencies. In an audio system, where many different signals are simultaneously present, non-linearity produces sum and difference frequencies which are not harmonics of the signal frequencies. The results can be quite noticeable and unpleasant if excessive in amplitude. |
####
|
The next picture was made by drawing alternate green and black circles. The pattern is an artefact of the discrete nature of the drawing function, and of the pixels of the display. In the next picture, the size of the drawing pixels has been matched to the size of the display pixels. You can sometimes see analogous shapes on the surface of a telegraph pole, where the cylinder intersects the annular growth rings of branches. Expanded view of a part of this picture – Below we see is another example, from a calculation about drops of liquid on a surface. The diagram is not a picture of the surface of one drop: it is a set of cross sections through drops of different sizes. Here is yet another example, showing lines of laminar flow around a circular obstacle. The notches in the lines form a larger copy of the pattern in the middle of the diagram. For what patterns is this true? Next we generate a triangle waveform with 3.5 cycles on the screen of a simulated ADC which has 256 levels. Ideally, the 2000 generated points would fall into the histogram bins, with only two different values. The castellated effect is purely an artefact of the ADC steps and the smaller steps in the triangle (which is in fact composed of seven ramps, each containing, in theory, 2000 / 7 = 285.7 samples. The actual contents of the bins can only be integers. The result is a form of Moiré effect.
For the second picture, below, the number of samples was 1747. This was obtained as follows. The peak to peak amplitude of the signal was 390 mV, and the ADC range was 400 mV. The signal occupied (390 / 400 ) X 256 ADC levels = 249.6 levels. Multiplying this by 7, for the seven half cycles, gives 1747.2.
Even this calculation might not have been enough, because in these examples, there was one histogram bin per ADC level. With some other bin size, a further Moiré generator would have been created. All these pictures provide visual warnings about all forms of computing. If we are using integers that have a range of 256, or 65536, or some other number, we have to beware of introducing artefacts as a result of the discreteness. Even with floating point numbers, and even with pseudo-random numbers, we need always to be aware that our method of calculation may be intrinsically faulty. It’s a good idea to support computer calculations with analytical ones, to try many different input values, to try values that give easily checkable results, and in general, to try all possible means to find a fault. Here is a simple example. We want to generate points at random positions in a circle. In the lower half the points were generated using a random radius and a random angle. In the upper half they were generated randomly by area. So what we mean by "random" requires definition. The fact is that if we make a plot of x versus y, and a plot of radius versus angle, the densities do not map uniformly from one to the other, unless we use the correct transformation. In the upper half of the diagram, the radii were generated using the square roots of random numbers. Why does this create a uniform distribution? A similar principle applies in three dimensions. Even the generation of random numbers is fraught with dangers. A digital computer cannot generate truly random numbers. It can only generate numbers that are uncorrelated to some degree, which we hope is sufficient for the work in hand. Furthermore, it is possible for the sequence to repeat. Again, we have to make the sequence long enough for our purposes. With 16-bit numbers, for example, we cannot make more than 65536 different values, and a pseudo-random algorithm cannot do better, and it may do worse. One solution is to collect values from a thermal noise source or some other external source of noise. Why would we want to generate random numbers anyway? One reason is that in a system with many variables, it is often impractical to use direct calculations, especially when boundary conditions are complicated. In such cases, it is often easier to generate random values of the variables. This is known as the Monte Carlo method. It is necessary to generate enough data to be reasonably sure that statistical fluctuations do not significantly affect any deductions which might be made from the results. We even have to define what we mean by "significantly". |
#####
|
Field Emission Microscopy An extremely fine needle with a hemispherical tip is held at a very high voltage difference from a phosphor screen. Electric charges stream out and cause the screen to emit light. The spots of light correspond to atoms on the surface of the needle. The pictures below show an idealised needle, with the atoms giving some of the effects of pixels, and a simulation of the resulting screen. A screen from a bigger needle is also shown. As in so much of science, by the time we possess an image in the literal form that we can see and comprehend with the eye, the subject in question has been long since accepted into the mainstream. The first evidence of something is very often indirect. But not always – the energy carried by alpha particles is usually so great that if you sit in the dark for a long time to get adapted, you can see the little flashes that the individual particles make as they hit a zinc sulphide screen. |
|
The portable radar systems which detect speeding vehicles use a radar emitter which has only one frequency. The vehicles themselves create a second frequency, by reflecting the radar beam. Because they are moving, they reflect waves with a slight frequency difference. The radar receiver is followed by a device which measures the frequency difference using the beat frequency between the two waves. The speed camera could use the same principle to decide whether to take a photograph, though it then uses marks on the ground to make the measurement, by means of a double exposure. What makes the frequency shift? Imagine a road on which all the vehicles are going at exactly 100 km per hour. You could stand by the road side and count the vehicles to find the flow rate. Were you to start walking, you would find that your count of oncoming vehicles would increase a little, and your count of following ones would decrease. In the extreme case that you were in one of the vehicles, your oncoming count would double, but you would count no passing vehicles at all on your side. Similar phenomena can be observed on the long moving walkways at large airports. People stand on the floor, and walk on it. Others stand on the walkways or walk on them. This counting phenomenon, the Döppler effect, is responsible for the change in pitch of an ambulance siren as it passes. Because electromagnetic waves such as light and radar behave differently from all other physical phenomena, in that the relative speed is always observed to be the same, these analogies to radar are not exact. The Döppler effect has been used through most of the twentieth century to measure the relative speed of stars and galaxies. It was this discovery that led to the idea of the expanding, or at least retreating universe. The beats resulting from slight differences in frequency can be used by piano tuners to tune in the double or triple strings that are used in the middle and lower ranges of the instrument. Beats can also occur between the harmonics of one note and the fundamental of another, and can be used to relate different notes. But in the equal-tempered system, in which the piano is not tuned to any particular key, the "true" tuning is not the one with no beats.
What of aliasing in nature? Insect eyes are composed of many ommatidia, in odonata and mantids, many thousands. The visual image is presumably pixellated, but the processing power no doubt compensates for this, just as we are not often aware of the retinal resolution and the optical deficiencies of our eyes. But the quantized insect image might even be advantageous in the detection of movement, since a small movement of the image might switch several ommatidia on or off. Suppose that a dragonfly has a total of 50000 ommatidia, and that the the eyes cover one half (two pi) of the total possible solid angle (four pi). Making a reasonable assumption about the update rate of the processing, can you estimate the minimum speed of motion that the insect could detect at a distance of one metre? To summarize this page, whenever a system includes two different periodicities, either spatial or temporal, there is a potential for the generation of interaction phenomena. But we haven’t finished yet . . . . There are many more ways in which sets of apparently unrelated objects can be mapped on to each other. Cryptology, the study of ciphers and codes, has invented a vast number of ways of making an alias of a message that is intended to be unrecognizable to an outsider. Some systems are intended for convenience, rather than secrecy. In ASCII, A > 65, B > 66, C > 67, etc. The ASCII system allows 256 different values to be recognized, because it uses eight bits. Some systems use more bits, even though this increases bandwidth costs. Why? Because with a suitably chosen extra bit, called a parity bit, an error in a character can be detected, though two in the same character will not. Using more than one extra bit, it is even possible, when an error occurs in one bit, to reconstruct the correct value, with high probability. Richard Hamming, also famous for a filtering window, was a pioneer in this field. Languages, too, inasmuch as words and sentences can be translated into other words and sentences, are in a sense, aliases. In fact, for a while, USA military people employed Navaho people to transmit messages, in the reasonable belief that Japanese military people would not guess what was going on. But languages are not exact maps of each other, either in grammar or in content. Sometimes ideas are untranslatable. And this brings us to the question (if indeed it is a meaningful question) of whether language (including pictures) is mappable on to thoughts. In "1984", George Orwell imagined a language, newspeak, which was continually and deliberately impoverished by the distortion of word meanings, and by the elimination of words, to prevent people thinking illegal thoughts, a reversal of the usual case in which the educated people can express themselves more articulately than the rest. In "1984", the "proles", while economically poor, were portrayed as emotionally richer than the party members. Like "the Party" in 1984, some real parties, and also some religions, do use words and phrases which are difficult, if not impossible, for outsiders to understand. Above the ordinary party members in 1984, of course, there was an elite that allowed itself to use proper English, and to posses and read real books. Aliasing of language can be looked at in another way. In the example below, every Nth character has been replaced by an x (counting a space as a character), where N takes the values 2, 3, 4, etc. Note that you can work out the probable content of the message probably without knowing all the letters. How can we recognize the message when parts of it are missing? We can do it because not all of the parts are necessary. All languages display some redundancy. The rules of spelling and grammar, even though they are not rigidly followed, limit the possible combinations of letter. Unfortunately, in many languages, the commonest verbs are usually the irregular ones, a fact which reduces the redundancy significantly. Why do you think that the most commonly used words are so irregular? When discussing digitizing, we used the idea of correlation. This applies to language also. In english, a "q" is almost always followed by a "u"; these letters are strongly correlated, though a "u" is not always preceded by a "q". Before a noun or an adjective, a three letter word beginning with "t" and ending with "e" is likely to be "the". But you could find "tee peg", "tie bar", "toe cap", and "tie tight knots". Two consonants are very often separated by a vowel. For example, we have "pat", "pet", "pit", "pot" and "put", but not "pbt", "pct", etc. The use of acronyms weakens this rule. In fact, "p" and "t" can be separated by a consonant, as in "capstan". Redundancy and correlation are precisely what enables a digital oscilloscope to work. As long as the signal is entirely within the required bandwidth, parts of the signal that are not sampled convey no information that is not implied by the samples. This statement is only true in a perfect system with no noise, but it beats the language system because it is purely mathematical. You could even regard some of the irregularities in language as a kind of noise. A perfectly logical language (with redundancy) would be easier to reconstruct from partial information than any actual language. Some word processing programs are able to use the properties of languages to make evaluations of entries. The simplest example is a spell checker, but grammar checkers also exist. Here are some examples. On a lighter note, young people of various persuasions are constantly generating idioms which older people cannot understand, and would be wise to refrain from using. Our belief that language maps on to thoughts is revealed if we judge that someone with a speech impairment is mentally not as bright as ourselves. Returning to more mathematical themes, as we pass a plantation of trees in orderly rows, we continually see, at intervals, the appearance of orderly lines. We feel sure that the trees were planted in parallel rows, in squares, but we cannot know which of the lines we see are the "real" ones. The planter could perversely have moved along diagonals to plant the trees, even though the final result looks square. Crystallographers face the same situation. In the simple diagram below, which is the "true" unit cell? Is this a sensible question? Is there a sensible answer to this question? Truly, things are not always what they seem. During the first half of the 20th century, two theories, Schrödinger’s wave mechanics, and Heisenberg’s matrix mechanics, proved to be completely equivalent, though they looked very different. Another one-for-one mapping relates conservation laws with symmetries. During the second half of the 20th century, Taniyama and Shimura conjectured that there is a one-to-one correspondence between elliptic curves and modular forms. Then Gerhard Frey showed that if the conjecture were true, this would lead to a proof of "Fermat’s Last Theorem". In the hands of Andrew Wiles, later assisted by Richard Taylor, the conjecture was indeed proved to be correct. A strange world indeed. As William Blake wrote of the tiger – "Did he who made the lamb, make thee?". Even at the level of school mathematics, you may remember being shown how exponentials and sinusoids are so closely related that they can be subsumed under a single formula. In the light of these events, should anyone ever find "the theory of everything", they will not know whether it is unique, and therefore "the right one", because there will always be the possibility of another mathematical approach that gives exactly the same results in every case. Perhaps physical theories are aliases of reality. In music too, many composers delight in transforming a theme or motto, most obviously in variation forms, and of course in many others too. However far the music seems to stray, there has to be a logical link with the original theme. In all the topics discussed here, there is been a mathematical relationship between the objects, however unrelated they appear. But in nature, the opposite frequently occurs – by convergent evolution, pairs of species or genera can look very similar, yet be only distantly related, just as many modern airliners, from different companies, look remarkably similar. Why? Because in nature and in engineering, similar problems are likely to result in similar solutions. Equally, in both fields, there are cases of strikingly different solutions to similar problems. Perhaps this occurs only during the immature stages of development of a field. Links Moiré in Magnetic Resonance Imaging Doppler Fringing Spectra Moiré Deflectometry Extra Solar Planet Searches Microstructure Images Program to make Moiré fringes Measuing Strain using Moiré Fringes Maths of Moiré Fringes Field Emission Microscopy FIM in Oxford and click on Image Gallery |
#####
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré
Moiré