Direct YouTube link: https://youtu.be/tnak3NfnMes
It is often needed to know how the frequency content of a signal changes with time. This is true even of short time-duration events like clicks, clunks, and slams. Traditional Fourier transform methods usually do not work well for these short duration events.
Wavelets are an alternative method to determine the frequency content vs time of transient events.
See Figure 1 (below) for a comparison of Fourier transform (FFT) methods vs the wavelet method.
Notice that the wavelet method provides more detailed information about what frequency content is present at various times.
Figure 1: Top Graph: Time signal of transient event, Middle Graph: FFT versus Time of transient signal, Bottom Graph: Wavelet analysis of transient signal.
The wavelet method gives much finer resolution in both time and frequency.
This article will cover the following:
1. Background:
Fourier Transform
The traditional FFT decomposes a time signal into its component sine functions of various frequency, amplitude, and phase.
From there, a spectrum (a plot of amplitude vs frequency) is generated. It is possible to calculate many spectrums for a single signal to see how the amplitudes and frequencies change with time.
Figure 2: Any time signal (black) can be decomposed into various sine waves of differing amplitude and frequency (red, green, blue). These waves can be displayed on a frequency spectrum by plotting amplitude vs frequency (right side of graphic).
When calculating a spectrum, there is an inverse relationship between observation time and frequency resolution. Essentially, the longer the time-chunk that is analyzed, the finer the frequency resolution that can be obtained in the spectrum.
This means that when analyzing very short-time events (transients) with a short time window, the frequency resolution is forced to be rather coarse. If the frequency resolution is refined, the time block will be much greater than the transient event.
Therefore, when doing an FFT on short time duration events, there is a fair bit of smearing in the frequency domain due to coarse frequency resolution. When attempting to dial in a finer frequency resolution, the time domain resolution will suffer (Figure 3, below).
Figure 3: Top Graph: Time signal of transient event, Middle Graph: FFT with a 0.02 second frame size resulting in 50Hz frequency resolution. Fine time resolution, coarse frequency resolution. Bottom Graph: FFT with a 0.20 second frame size resulting in 5Hz frequency resolution. Finer frequency resolution, coarser time resolution.
This is a disadvantage when using the FFT on short-time events.
Wavelets
On the other hand, the signal can be decomposed into wavelets (instead of sine functions).
A wavelet is a function that rapidly increases, oscillates about a zero mean, and rapidly decays.
Figure 4: A sine wave oscillates in time from negative infinity to infinity. Contrarily, a wavelet oscillates for a short time duration.
In order to understand how wavelets correspond to frequency and time, let’s take a look at scaling and shifting.
Scale
Scaling is straight forward, the wavelet is simply stretched or compressed in time.
A stretched wavelet (Figure 5, below, left) helps quantify the slow changing portion of a signal (low frequency) while a compressed wavelet (Figure 5, below, right) helps quantify the abruptly changing (high frequency) content of the signal.
Figure 5: Stretched wavelets (left) represent lower frequencies, while compressed wavelets (right) represent higher frequencies.
The wavelet in the frequency domain has a band-pass characteristic. By stretching and compressing the wavelet, the center frequency of the band-pass filter is shifted higher or lower.
Now that the frequency component is understood, let’s discuss the time component.
Shift/ time:
The output of the wavelet analysis is frequency (scale) vs. time (shift). The wavelet is both shifted and scaled to determine how it aligns with various features of the signal.
For the purposes of simplicity, imagine that the wavelet is shifted though the time data. At each location, the shape of the wavelet is “compared” to the shape of the time data. Similarities between the time data and wavelet indicate that the frequency content that the wavelet represents is present.
Figure 6: The wavelet is shifted in time relative to the signal being analyzed.
What actually happens?
Wavelets of different scales and shifts are convolved with the original signal to determine if the original signal has similar frequency content.
Essentially, wavelets can be thought of as a discrete-time filter-bank of band-pass filters.
Comparison of FFT vs Wavelet:
By nature of the processing type, the traditional FFT has a fixed relationship between time and frequency.
Conversely, the wavelet does not have a fixed relationship between time and frequency.
As shown in Figure 7, wavelets have different behavior at different frequencies:
The change in the frequency resolution is due to the fact that the frequency scale for the wavelet processing is based on octaves.
Figure 7: Left Graph - The FFT smear and resolution is equal at all frequencies. Right Graph - Conversely, wavelets have a variable relationship between time and frequency.
Figure 8 (below) shows the wavelet result of a transient event. Look at the right side of Figure 7 to better understand how data is smeared in a wavelet map as shown in Figure 8.
Figure 8: In a wavelet analysis, at low frequencies the frequency resolution is finer. At high frequencies, the time resolution is finer.
An impulse in the time domain is represented by broadband frequency response in the frequency domain. Most transient events are "impulsive" in nature and therefore have a rather broadband signature in the frequency domain. Therefore, a fine frequency resolution at high frequencies is typically not necessary. However, the improved time resolution the wavelet has to offer can be hugely beneficial when analyzing transients.
2. Output Comparison – Fourier Transform vs. Wavelet:
Let’s take a closer look at the results to better understand the differences between FFT and wavelet analysis.
The colormap results for both the FFT and wavelet transformations are created by stacking a series of tracked results together.
In the case of the FFT, for each time increment an ‘amplitude vs frequency’ result is created. These results are stacked together to create the colormap.
In Figure 9 (below), each individual calculation of ‘amplitude vs frequency’ in the ‘waterfall’ map display (left) is shown. These individual calculations are smoothed together to create the ‘colormap’ display on the right.
Figure 9: The Fourier transform results in amplitude vs frequency spectrums for each increment in time. These results are smoothed together to create the colormap on the right.
Alternatively, the wavelet analysis will create an ‘amplitude vs time’ result for each frequency increment (as specified by the wavelets per octave setting). These individual calculations (as seen in the waterfall display, left) are smoothed together to create the ‘colormap’ display on the right.
Figure 10: The wavelet analysis results in time versus amplitude results for each frequency increment. These results are smoothed together to create the colormap on the right.
Understanding the results helps to better understand the calculations that are being performed by Simcenter Testlab.
3. Performing Wavelet Analysis in Simcenter Testlab
To access the wavelet analysis functions, go to Tools -> Add-ins -> Time-Variant Frequency Analysis. This add-in requires 34 tokens.
Figure 11: The “Time-Variant Frequency Analysis” add-in requires 34 tokens.
To begin, create a data set in the “Time Data Selection” workbook. It is possible to import a data trace and only use a small segment for processing. Select the segment by clicking and dragging in the middle pane (it will become highlighted in black). Then select the “Use Segment for Processing” button (shown with a red box in Figure 12, below).
Figure 12: Select the desired time trace in “Time Data Selection”.
From here, there are two locations to do a wavelet calculation:
It is recommended to use the Time Frequency Analysis tab to play with the settings for the wavelet. The layout of the workbook allows for easy adjustment and analysis of the wavelet settings.
If batch processing is desired, it is recommended to use the Time Data Processing workbook.
First determine the settings in the Time Frequency Analysis workbook and then easily batch process in the Time Data Processing workbook.
1. Time Frequency Analysis
Once the data set is created, go to the “Time Frequency Analysis” workbook (Figure 13, below).
The result is a colormap of frequency vs time.
Figure 13: Result of a wavelet analysis.
Use the following guidelines to determine wavelet processing settings:
The wavelet result can be saved to the project by using the “Save…” button in the lower left corner of the screen.
2. Time Data Processing
Alternatively, it is possible to perform a wavelet analysis in “Time Data Processing”. Turn on the “Signature Throughput Processing” add in from the add-in list. This requires 36 tokens.
Figure 14: Go to Tools -> Add-ins -> Signature Throughput Processing. This add-in requires 36 tokens.
The “Time-Variant Frequency Analysis” add-in must also be turned on for 34 tokens.
To calculate a wavelet:
By default, automatic wavelet parameters will be entered. To adjust these parameters, change the “Freq interval” drop down menu to “Manual”.
The processing settings are the same as those described in the above section.
Figure 15: Access the wavelet settings from the “Section Settings” pop-up in Time Data Processing.
Calculate and save the results to the project.
4. Methods to manage file sizes:
Wavelet analysis can produce a lot of high resolution data. It may be desired to reduce the file size of a wavelet analysis result – especially if doing batch processing on a large amount of data.
There are two main methods to reduce the file size: adjust the number wavelets per octave and down sample.
1. Adjust the number of wavelets per octave:
Reducing the number of wavelets per octave will reduce both file size and resolution of the resulting colormap.
Play with the settings to determine the minimum number of wavelets per octave required to obtain the desired level of resolution. In Figure 16 (below), the same data is re-processed multiple times to determine to optimal wavelets per octave setting:
The engineer selects to calculate the wavelet maps with 16 wavelets per octave: a good balance between resolution and file size.
Figure 16: Pay attention to how number of wavelets per octave affects the resolution of the colormaps.
2. Down sample:
Without down sampling, the time blocks in the wavelet map will have the same x-axis resolution as the original time trace sample frequency(for example, a 50,000 data point time history analyzed with 100 wavelets creates a dataset of 50,000 x 100 data points). This can consume a lot of disk space and processing time. Applying a down sampling ratio will reduce the file size.
To access the down sampling option in “Time Frequency Analysis”, select the “Settings…” button and then choose a “down sampling ratio”.
Figure 17: Access the down sampling ratio setting in “Time Frequency Analysis” under the “Settings…” box.
If processing wavelet maps in “Time Data Processing”, the down sampling ratio is available in the Section Settings pop-up window.
Figure 18: Access the down sampling ratio setting in “Time Data Selection” under the “Wavelet Maps” section of the “Section Settings” pop-up window.
Reducing file size is especially important when batch processing wavelet maps.
5. Example:
Piston Slap:
Piston slap occurs when the piston inside of a cylinder hits the cylinder wall during the operating cycle. This causes an audible transient noise.
Figure 19: Wear on the piston due to abrasion on the cylinder wall.
It may be desired to know the timing of the piston slap. Traditional FFT methods do not make it obvious when the piston slap occurs. Alternatively, the wavelet analysis highlights the timing and the frequency content of the piston slap.
In Figure 20 (below), time vs pressure data from a microphone near an engine block is displayed (top). Some of the transient events are highlighted. This data is analyzed in two way: FFT (middle) and wavelet (bottom).
The wavelet has much better time resolution. The FFT is smeared both in the time domain and the frequency domain.
Figure 20: Top Graph – Time history with multiple transient events, Middle Graph – FFT versus Time analysis does not contain clear indication of the exact timing and frequency content of the transient events, Bottom Graph – Wavelet analysis shows both time and frequency content of transients accurately.
Wavelet analysis can be used for any type of transient: piston slap, door slams, pyro-technic shock, diesel clatter, injection tick, button clicks, etc.
The main benefit of wavelet analysis is improved time and frequency resolution.
Questions? Contact charles.rice@siemens.com
Related Links: