# Introduction to DSP - frequency: frequency leakage II

 If we only measure the signal for a short time, the Fourier Transform works as is the data were periodic for all time. If the signal is periodic, two case arise: If an integral number of cycles fit into the total duration of the measurement, then when the Fourier Transform assumes the signal repeats, the end of one signal segment connects smoothly with the beginning of the next - and the assumed signal happens to be exactly the same as the actual signal. If not quite an integral number of cycles fit into the total duration of the measurement, then when the Fourier Transform assumes the signal repeats, the end of one signal segment does not connect smoothly with the beginning of the next - the assumed signal is similar to the actual signal, but has little 'glitches' at regular intervals. There is a direct relation between a signal's duration in time and the width of its frequency spectrum: short signals have broad frequency spectra long signals have narrow frequency spectra The 'glitches' are short signals. So they have a broad frequency spectrum. And this broadening is superimposed on the frequency spectrum of the actual signal: if the period exactly fits the measurement time, the frequency spectrum is correct if the period does not match the measurement time, the frequency spectrum is incorrect - it is broadened This broadening of the frequency spectrum determines the frequency resolution - the ability to resolve (that is, to distinguish between) two adjacent frequency components. Only the one happy circumstance where the signal is such that an integral number of cycles exactly fit into the measurement time gives the expected frequency spectrum. In all other cases the frequency spectrum is broadened by the 'glitches' at the ends. Matters are made worse because the size of the glitch depends on when the first measurement occurred in the cycle - so the broadening will change if the measurement is repeated. For example a sine wave 'should' have a frequency spectrum which consists of one single line. But in practice, if measured say by a spectrum analyser, the frequency spectrum will be a broad line - with the sides flapping up and down like Batman's cloak. When we see a perfect single line spectrum - for example in the charts sometimes provided with analogue to digital converter chips - this has in fact been obtained by tuning the signal frequency carefully so that the period exactly fits the measurement time and the frequency spectrum is the best obtainable.