18
Theory LMS proprietary information: reproduction or distribution of this document requires permission in writing from LMS Spectral processing.doc Category: Signal processing Topic: Spectral processing Digital signal processing Time and frequency domains It is a property of all real waveforms that they can be made up of a number of sine waves of certain amplitudes and frequencies. Viewing these waves in the frequency domain rather than the time domain can be useful in that all the components are more readily revealed. time frequency amplitude Each sine wave in the time domain is represented by one spectral line in the frequency domain. The series of lines describing a waveform is known as its frequency spectrum. Fourier transform The conversion of a time signal to the frequency domain (and its inverse) is achieved using the Fourier Transform as defined below.

Spectral Processing

Embed Size (px)

DESCRIPTION

good

Citation preview

  • Theory

    LMS proprietary information: reproduction or distribution

    of this document requires permission in writing from LMS

    Spectral processing.doc

    Category: Signal processing

    Topic: Spectral processing

    Digital signal processing

    Time and frequency domains

    It is a property of all real waveforms that they can be made up of a number of sine waves of certainamplitudes and frequencies. Viewing these waves in the frequency domain rather than the time domaincan be useful in that all the components are more readily revealed.

    time frequency

    amplitude

    Each sine wave in the time domain is represented by one spectral line in the frequency domain. Theseries of lines describing a waveform is known as its frequency spectrum.

    Fourier transform

    The conversion of a time signal to the frequency domain (and its inverse) is achieved using the FourierTransform as defined below.

  • This function is continuous and in order to use the Fourier Transform digitally a numerical integrationmust be performed between fixed limits.

    The Discrete Fourier Transform (DFT)

    The digital computation of the Fourier Transform is called the Discrete Fourier Transform. It calculatesthe values at discrete points (mDf) and performs a numerical integration as illustrated below betweenfixed limits (N samples).

    Since the waveform is being sampled at discrete intervals and during a finite observation time, we donot have an exact representation of it in either domain. This gives rise to shortcomings which arediscussed later.

    Hermitian symmetry

    The Fourier transform of a sinusoidal function would result in complex function made up of real andimaginary parts that are symmetrical. This is illustrated below. In the majority of cases only the realpart is taken into account and of this only the positive frequencies are shown. So the representation ofthe frequency spectrum of the sine wave shown below would become the area shaded in grey.

    +f0-f+f0-f

    A

    A/2

    A/2A/2

    S(f) imaj S(f) realX(t)

    The Fast Fourier Transform (FFT)

    The Fast Fourier Transform is a dedicated algorithm to compute the DFT. It thus determines thespectral (frequency) contents of a sampled and discretized time signal. The resulting spectrum is alsodiscrete. The reverse procedure is referred to as an inverse or backward FFT.

  • time

    frequency

    N samples

    N/2 spectral lines

    inverse

    To achieve high calculation performance the FFT algorithm requires that the number of time samples(N) be a power of 2 (such as 2, 4, 8, ...., 512, 1024, 2048).

    Blocksize

    Such a time record of N samples is referred to as a block of data with N being the blocksize. Nsamples in the time domain converts to N/2 spectral (frequency) lines. Each line contains informationabout both amplitude and phase.

    Frequency range

    The time taken to collect the sample block is T. The lowest frequency that can be detected then is thatwhich is the reciprocal of the time T.

    TThe frequency spacing between the spectral lines is therefore 1/T and the highest frequency that canbe determined is (N/2).(1/T).

  • The frequency range that can be covered is dependant on both the blocksize (N) and the samplingperiod (T). To cover high frequencies you need to sample at a fast rate which implies a short sampleperiod.

    Real time Bandwidth

    Remember that an FFT requires a complete block of data to be gathered before it can transform it. Thetime taken to gather a complete block of data depends on the blocksize and the frequency range but itis possible to be gathering a second time record while the first one is being transformed. If thecomputation time takes less than the measurement time, then it can be ignored and the process is saidto be operating in real time.

    timerecord 1

    timerecord 2

    timerecord3

    timerecord 4

    FFT 1 FFT 2 FFT 3

    Real timeoperation

    timerecord 1

    timerecord 2

    timerecord3

    timerecord 4

    FFT 1 FFT 2 FFT 3

    This is not the case if the computation time is taking longer than the measurement time or if theacquisition requires a trigger condition.

    Overlap

    Overlap processing involves using time records that are not completely independent of each other asillustrated below.

  • timerecord 1

    timerecord 2

    timerecord3

    timerecord 4

    FFT 1 FFT 2 FFT 3

    If the time data is not being weighted at all by the application of a window, then overlap processingdoes not include any new data and therefore makes no statistical improvement to the estimationprocedure. When windows are being applied however, the overlap process can utilize data that wouldotherwise be ignored.

    The figure below shows data that is weighted with a Hanning window. In this case the first and last20% of each sample period is practically lost and contributes hardly anything towards the averagingprocess.

    Sampleddata

    Processed datawith no overlap

    Applying an overlap of at least 30% means that this data is once again included - as shown below. Thisnot only speeds up the acquisition (for the same number of averages) but also makes it statistically

  • more reliable since a much higher proportion of the acquired data is being included in the averagingprocess.

    Sampleddata

    Processed data with 30% overlap

    Aliasing

    Sampling at too low a frequency can give rise to the problem of aliasing which can lead to erroneousresults as illustrated below.

    This problem can be overcome by implementing what is known as the Nyquist Criterion, whichstipulates that the sampling frequency (fs) should be greater than twice the highest frequency of theinterest (fm).

  • The highest frequency that can be measured is fmax which is half the sampling frequency (fs), and is alsoknown as the Nyquist frequency (fn).

    The problem of aliasing can also be illustrated in the frequency domain.

    inputfrequency

    measuredfrequency

    fn

    fn 2 fn = fs

    f1

    f1 f2 f3 f43 fn 4 fn

    All multiples of the Nyquist frequency (fn) act as folding lines. So f4 is folded back on f3 around line 3 fn,f3 is folded back on f2 around line 2 fn and f2 is folded back on f1 around line fn. Therefore all signals atf2, f3, f4 are all seen as signals at frequency f1.

    The only sure way to avoid such problems is to apply an analog or digital anti-aliasing filter to limit thehigh frequency content of the signal. Filters are less than ideal however so the positioning of the cut offfrequency of the filters must be made with respect to fmax and the roll off characteristics of the filter.

    ideal filter

    fmax fs

    fmax fs

    roll offcharacteristicsof a real filter

    Leakage and windows

    A further problem associated with the discrete time sampling of the data is that of leakage. Acontinuous sine wave such as the one shown below should result in the single spectral line.

  • time

    frequency

    continuouswaveform

    Because the signals are measured over a sample period T, the DFT assumes that this is representativefor all time. When the sine wave is not periodic in the sample time window, the result is a consequentleakage of energy from the original line spectrum due to the discontinuities at the edges.

    The user should be aware that leakage is one of the most serious problems associated with digitalsignal processing. Whilst aliasing errors can be reduced by various techniques, leakage errors cannever be eliminated. Leakage can be reduced by using different excitation techniques and increasingthe frequency resolution, or through the use of windows as described below.

    Windows

    The problem of discontinuities at the edge can be alleviated either by ensuring that the signal and thesampling period are synchronous or by ensuring that the function is zero at the start and end of thesampling period. This latter situation can be achieved by applying what is called a window functionwhich normally takes the form of an amplitude modulated sine wave.

  • Frequency spectrum ofa sine wave, periodic inthe sample period T.

    Frequency spectrum of asine wave, not periodicwith the sample periodwithout a window.

    Frequency spectrum ofa sine wave that is notperiodic with the sampleperiod with a window.

    sampleperiod T.

    sampleperiod T.

    X =

    The use of windows gives rise to errors itself of which the user should be aware and should be avoidedif possible. The various types of windowing functions distribute the energy in different ways. Thechoice of window depends on the input function and on your area of interest.

    Self windowing functionsSelf windowing functions are those that are periodic in the sample period T or transient signals.Transient signals are those where the function is naturally zero at the start and end of the samplingperiod such as impulse and burst signals. Self windowing functions should be adopted wheneverpossible since the application of a window function presents problems of its own. A rectangular oruniform window can then be used since it does not affect the energy distribution.

    Note! It should be noted that synchronizing the signal and the sampling time, or using a selfwindowing function is preferable to using a window.

    Window characteristics

    The time windows provided take a number of forms - many of which are amplitude modulated sinewaves. There are all in effect filters and the properties of the various windows can be compared byexamining their filter characteristics in the frequency domain where they can be characterized by thefactors shown below.

  • The windows vary in the amount of energy squeezed in to the central lobe as compared to that in theside lobes. The choice of window depends on both the aim of the analysis and the type of signal youare using. In general, the broader the noise Bandwidth, the worse the frequency resolution, since itbecomes more difficult to pick out adjacent frequencies with similar amplitudes. On the other hand,selectivity (i.e. the ability to pick out a small component next to a large on) is improved with side lobefalloff. It is typical that a window that scores well on Bandwidth is weak on side lobe fall off and thechoice is therefore a trade off between the two. A summary of these characteristics of the windowsprovided is given in Table 1.1.

    Window type Highest sidelobe (dB)

    Sidelobe falloff(dB/decade)

    Noise Bandwidth(bins)

    Max. Amperror (dB)

    Uniform -13 -20 1.00 3.9

    Hanning -32 -60 1.5 1.4

    Hamming -43 -20 1.36 1.8

    Kaiser-Bessel -69 -20 1.8 1.0

    Blackman -92 -20 2.0 1.1

    Flattop -93 0 3.43

  • The following windows -Hanning, Hamming, Blackman, Kaiser-Bessel andFlattop all take the form of an amplitude modulatedsine wave in the time domain. For a comparison oftheir frequency domain filter characteristics - seeTable 1.1.

    HanningThis window is most commonly applied for general purpose analysis of random signals with discretefrequency components. It has the effect of applying a round topped filter. The ability to distinguishbetween adjacent frequencies of similar amplitude is low so it is not suitable for accuratemeasurements of small signals.

    HammingThis window has a higher side lobe than the Hanning but a lower fall off rate and is best used when thedynamic range is about 50dB.

    BlackmanThis window is useful for detecting a weak component in the presence of a strong one.

    Kaiser-BesselThe filter characteristics of this window provide good selectivity, and thus make it suitable fordistinguishing multiple tone signals with widely different levels. It can cause more leakage than aHanning window when used with random excitation.

    FlattopThis windows name derives from its low ripple characteristics in the filter pass band. This windowshould be used for accurate amplitude measurements of single tone frequencies and is best suited forcalibration purposes.

    Force window

    This type of window is used with a transient signal in the case of impact testing.It is designed to eliminate stray noise inthe excitation channel as illustrated here.It has a value of 1 during the impact period and 0 otherwise.

  • Exponential window

    This window is also used with a transientsignal. It is designed to ensure that the signal dies away sufficiently at the end of thesampling period as shown below. Theform of the exponential window is described by the formula e-bt . The `Exponential decay' determines the % level at theend of the time window.

    An exponential window is normally applied to the response (output) channels during impact testing. It isalso the most appropriate window to be used with a burst excitation signal in which case it should beapplied to all channels i.e. force(s) and response(s). It does however introduce artificial damping intothe measurement data which should be carefully taken into account in further processing in modalanalysis.

    Choosing window functions

    For the analysis of transient signals use :

    Uniform for general purposes

    Force for short impulses and transients to improve the signal to noise ratio

    Exponential for transients which are longer than the sample period or which do notdecay sufficiently within this period.

    For the analysis of continuous signals use :

    Hanning for general purposes

    Blackman orKaiser-Bessel

    if selectivity is important and you need to distinguish between harmonicsignals with very different levels

    Flattop for calibration procedures and for those situations where the correctamplitude measurements are important.

    Uniform only when analyzing special sinusoids whose frequencies coincide withcenter frequencies of the analysis.

  • For system analysis i.e. measurement of FRFs use :

    Window correction mode

    Applying a window distorts the nature of the signal and correction factors have to be applied tocompensate for this. This correction can be applied in one of two ways.

    Amplitude where the amplitude is corrected to the original value.

    Energy where the correction factor gives the correct signal energy for a particular frequency band. Thisis the only method that should be used for broad band analysis.

    If a number of windows is applied to a function, the effect of the window may be squared or cubed, andthis affects the correction factor required.

    Amplitude correctionConsider the example of a sine wave signal and a Hanning window.

    When the windowed signal (sine wave x Hanning window) is transformed to the frequency domain, thenthe amplitude of the resulting spectrum will be only half that of the equivalent unwindowed signal. Thus

    Force for the excitation (reference) signal when this is a hammer

    Exponential for the response signal of lightly damped systems with hammer excitation

    Hanning for reference and response channels when using random excitationsignals

    Uniform for reference and response channels when using pseudo randomexcitation signals

  • in order to correct for the effect of the Hanning window on the amplitude of the frequency spectrum, theresulting spectrum has to be multiplied by an amplitude correction factor of 2.

    Amplitude correction must be used for amplitude measurements of single tone frequencies if theanalysis is to yield correct results.

    Energy correctionWindowing also affects broadband signals.

    In this case however it is the energy in the signal which it is usually important to maintain, and anenergy correction factor will be applied to restore the energy level of the windowed signal to that of theoriginal signal.

    In the case of a Hanning window, the energy in the windowed signal is 61% of that the original signal.The windowed data needs to be multiplied by 1.63 therefore to correct the energy level.

    Window correction factors

    The actual correction factor that is needed to compensate for the application of the time windowdepends on the window correction mode and the number of windows applied. Table 1.2 lists the valuesused.

    Window type Amplitude mode Energy mode

    Uniform 1 1

    Hanning x1 2 1.63

    Hanning x2 2.67 1.91

    Hanning x3 3.20 2.11

    Blackman 2.80 1.97

  • Hamming 1.85 1.59

    Kaiser-Bessel 2.49 1.86

    Flattop 4.18 2.26

    Table 1.2 Window correction factors

    Averaging

    Signals in the real world are contaminated by noise -both random and bias. This contamination can bereduced by averaging a number of measurements in which the random noise signal will average tozero. Bias errors however, such as nonlinearities, leakage and mass loading are not reduced by theaveraging process. A number of different techniques for averaging of measurements are provided.

    Linear

    This produces a linearly weighted average in which all the individual measurements have the sameinfluence on the final averaged value. If the average value of M consecutive measurement ensemblesis x then -

    The intermediate average is xa?n=xan-1+xn. The final averaging can be done at the end of theacquisition.

    Stable

    In the case of stable averaging again all the individual measurements have the same influence on thefinal averaged value. In this case though, the intermediate averaging result is based on

    The advantage of stable averaging is that the intermediate averaging results are always properlyscaled. This scaling however makes the procedure slightly more time consuming.

    Exponential

    Exponential averaging on the other hand yields an averaging result to which the newest measurementhas the largest influence while the effect of the older ones is gradually diminished. In this case -

  • where t is a constant which acts as a weighting factor.

    Peak level hold

    In this case a comparison has to be made between individual measurement ensembles. When theycontain complex data, comparison is done based on the amplitude information. For peak level holdaveraging, the last measurement ensemble consisting of k individual samples, xn (k), (where k= 0...N-1and N is the blocksize) is compared to the average of the n-1 previous steps, xn-1(k).The new average xn(k), is then defined as

    In this way, the averaging result contains, for a specific k, the maximum value in an absolute sense ofall the ensembles, considered during the averaging process.

    Peak reference hold

    In peak reference hold averaging, one channel determines the averaging process. If xi is the ensemblefor channel i and xr represents the reference channel, then the last measurement ensemble xrn(k)(where k= 0...N-1) is compared to the average of the n-1 previous steps, xrn-1(k).The new average xn(k), is then defined as -

    This way, the averaging result contains all values that coincide with the maximum values for thereference channel.

    Reading list

    Signal and system theory

    J. S. Bendat and A.G. Piersol.Random Data : Analysis and Measurement ProceduresWiley - Interscience, 1971.

    J. S. Bendat and A.G. Piersol.Engineering Applications of Correlation and Spectral AnalysisWiley - Interscience, 1980.

  • R.K. Otnes and L. Enochson.Applied Time Series AnalysisJohn Wiley & Cons, 1978.

    J. MaxMthodes et Techniques de Traitement du Signal (2 Tomes)Masson, 1972, 1986.

    General literature in digital signal processing

    A.V. Oppenheimer and R.W. SchaferDigital Signal ProcessingPrentice Hall, Englewood Cliffs N.J., 1975.

    L.R. Rabiner and B. GoldTheory and Application of Digital Signal ProcessingPrentice Hall, Englewood Cliffs N.J., 1975.

    K.G. Beauchamp and C.K. YueuDigital Methods for Signal AnalysisGeorge Allen & Unwin, London 1979.

    M. BellangerTraitement Numrique du SignalMasson, Paris 1981.

    A. Peled and B. LiuDigital Signal ProcessingTheory, Design And ImplementationJohn Wiley & Sons.

    Discrete Fourier Transform

    E.O. BrighamThe Fast Fourier TransformPrentice Hall, Englewood Cliffs N.J., 1974.

    R.W. RamirezThe FFT : Fundamentals and ConceptsPrentice Hall, Englewood Cliffs N.J., 1985.

    C.S. Burrus and T.W. ParksDFT/FFT and Convolution Algorithms : Theory and ImplementationJohn Wiley & Sons, 1985.

    H.J. NussbaumerFast Fourier Transform and Convolution AlgorithmsSpringer Verlag, 1982.

  • R.E. BlahutFast Algorithms for Digital Signal ProcessingAddison Wesley, 1985.

    IEEE-ASSP SocietyPrograms for Digital Signal ProcessingIEEE Press, New York, 1979.

    Digital signal processingDigital signal processingTime and frequency domainsFourier transformThe Discrete Fourier Transform (DFT)Hermitian symmetryThe Fast Fourier Transform (FFT)BlocksizeFrequency rangeReal time BandwidthOverlap

    AliasingLeakage and windowsWindowsWindowsSelf windowing functions

    Window characteristicsWindow typesUniform windowHanningHammingBlackmanKaiser-BesselFlattopForce windowExponential window

    Choosing window functionsWindow correction modeAmplitude correctionEnergy correction

    Window correction factors

    AveragingAveragingLinearStableExponentialPeak level holdPeak reference hold

    Reading listReading listSignal and system theoryGeneral literature in digital signal processingDiscrete Fourier Transform