• No se han encontrado resultados

DEL GOBIERNO ESCOLAR

In document MANUAL DE CONVIVENCIA (página 50-54)

Figure 2.35 shows that if the amplitude and phase of each frequency compo- nent is known, linearly adding the resultant components in an inverse transform results in the original waveform. In digital systems the waveform is expressed as a number of discrete samples. As a result the Fourier transform analyses the signal into an equal number of discrete frequencies. This is known as a discrete Fourier transform or DFT in which the number of frequency coefficients is equal to the number of input samples. The fast Fourier transform (FFT) is no more than an efficient way of computing the DFT.2 As was seen in the previous section, practical systems must use windowing to create short-term transforms.

It will be evident from Figure 2.35 that the knowledge of the phase of the frequency component is vital, as changing the phase of any component will seriously alter the reconstructed waveform. Thus the DFT must accurately analyse the phase of the signal components.

There are a number of ways of expressing phase. Figure 2.36 shows a point which is rotating about a fixed axis at constant speed. Looked at from the side, the point oscillates up and down at constant frequency. The waveform of that motion is a sine wave, and that is what we would see if the rotating point were to translate along its axis whilst we continued to look from the side.

One way of defining the phase of a waveform is to specify the angle through which the point has rotated at time zero (T D 0). If a second point is made to revolve at 90°to the first, it would produce a cosine wave when translated. It

is possible to produce a waveform having arbitrary phase by adding together the sine and cosine wave in various proportions and polarities. For example,

Figure 2.35 Fourier analysis allows the synthesis of any periodic waveform by the addition of

discrete frequencies of appropriate amplitude and phase.

adding the sine and cosine waves in equal proportion results in a waveform lagging the sine wave by 45°.

Figure 2.36 shows that the proportions necessary are respectively the sine and the cosine of the phase angle. Thus the two methods of describing phase can be readily interchanged.

The discrete Fourier transform spectrum-analyses a string of samples by searching separately for each discrete target frequency. It does this by multi- plying the input waveform by a sine wave, known as the basis function, having the target frequency and adding up or integrating the products. Figure 2.37(a) shows that multiplying by basis functions gives a non-zero integral when the input frequency is the same, whereas (b) shows that with a different input frequency (in fact all other different frequencies) the integral is zero showing

Figure 2.36 The origin of sine and cosine waves is to take a particular viewpoint of a rotation.

Any phase can be synthesized by adding proportions of sine and cosine waves.

that no component of the target frequency exists. Thus from a real waveform containing many frequencies, all frequencies except the target frequency are excluded. The magnitude of the integral is proportional to the amplitude of the target component.

Figure 2.37(c) shows that the target frequency will not be detected if it is phase shifted 90° as the product of quadrature waveforms is always zero.

Thus the discrete Fourier transform must make a further search for the target frequency using a cosine basis function. It follows from the arguments above that the relative proportions of the sine and cosine integrals reveal the phase of the input component. Thus each discrete frequency in the spectrum must be the result of a pair of quadrature searches.

Searching for one frequency at a time as above will result in a DFT, but only after considerable computation. However, a lot of the calculations are repeated

Figure 2.37 The input waveform is multiplied by the target frequency and the result is averaged

or integrated. In (a) the target frequency is present and a large integral results. With another input frequency the integral is zero as in (b). The correct frequency will also result in a zero integral shown in (c) if it is at 90°to the phase of the search frequency. This is overcome by making two searches in quadrature.

many times over in different searches. The FFT gives the same result with less computation by logically gathering together all of the places where the same calculation is needed and making the calculation once.

The amount of computation can be reduced by performing the sine and cosine component searches together. Another saving is obtained by noting that every 180° the sine and cosine have the same magnitude but are simply

inverted in sign. Instead of performing four multiplications on two samples 180°apart and adding the pairs of products it is more economical to subtract

the sample values and multiply twice, once by a sine value and once by a cosine value.

The first coefficient is the arithmetic mean which is the sum of all of the sample values in the block divided by the number of samples. Figure 2.38 shows how the search for the lowest frequency in a block is performed. Pairs of samples are subtracted as shown, and each difference is then multiplied by the sine and the cosine of the search frequency. The process shifts one sample period, and a new sample pair are subtracted and multiplied by new sine and cosine factors. This is repeated until all of the sample pairs have been

Figure 2.38 An example of a filtering search. Pairs of samples are subtracted and multiplied by

sampled sine and cosine waves. The products are added to give the sine and cosine components of the search frequency.

Figure 2.39 The basic element of an FFT is known as a butterfly as in (a) because of the shape

of the signal paths in a sum and difference system. The use of butterflies to compute the first two coefficients is shown in (b).

Figure 2.39 (continued) An actual example is given in (c) which should be compared with the

result of (d) with a quadrature input.

Figure 2.39(c) shows a numerical example. If a sine-wave input is considered where zero degrees coincides with the first sample, this will produce a zero sine coefficient and non-zero cosine coefficient. Figure 2.39(d) shows the same input waveform shifted by 90°. Note how the coefficients change over.

Figure 2.39(e) shows how the next frequency coefficient is computed. Note that exactly the same first stage butterfly outputs are used, reducing the compu- tation needed.

A similar process may be followed to obtain the sine and cosine coefficients of the remaining frequencies. The full FFT diagram for eight samples is shown in Figure 2.40(a). The spectrum this calculates is shown in Figure 2.40(b). Note that only half of the coefficients are useful in a real band-limited system

Figure 2.39 (continued) In (e) the butterflies for the first two coefficients form the basis of the

Figure 2.40 In (a) is the full butterfly diagram for an FFT. The spectrum this computes is shown

in (b).

because the remaining coefficients represent frequencies above one half of the sampling rate.

In STFTs the overlapping input sample blocks must be multiplied by window functions. Figure 2.41 shows that multiplying the search frequency by the window has exactly the same result except that this need be done only once

Figure 2.41 Multiplication of a windowed block by a sine wave basis function is the same as

multiplying the raw data by a windowed basis function but requires less multiplication as the basis function is constant and can be pre-computed.

and much computation is saved. Thus in the STFT the basis function is a windowed sine or cosine wave.

The FFT is used extensively in such applications as phase correlation, where the accuracy with which the phase of signal components can be analysed is essential. It also forms the foundation of the discrete cosine transform.

In document MANUAL DE CONVIVENCIA (página 50-54)

Documento similar