App Note #2
www.vibetech.com
2/25/2014
ME’scope Application Note #2 Waveform Integration & Differentiation INTRODUCTION
FREQUENCY DOMAIN INTEGRATION
NOTE: The steps in this Application Note can be duplicated using any Package that includes the VES-3000 Signal Processing Option.
Frequency domain integration is done by dividing the waveform by frequency values. This, by itself, is accurate.
The most common type of vibration transducer is an accelerometer, which measures acceleration. However, in order to answer the question “How much is the machine or structure really moving?” a common requirement of signal processing is to integrate acceleration (or velocity) signals to displacements. In this note, we will exercise both the integration and differentiation methods in ME’scope. Integration and differentiation can be done on either time domain or frequency domain waveforms. We will see how DC offsets and leakage can cause errors when integrating waveforms, and how these errors can be dealt with effectively. Since ME’scope has a built-in FFT, any waveform can be easily transformed from one domain to the other. Therefore, either time or frequency domain integration or differentiation can be used on any waveform.
TIME DOMAIN INTEGRATION The main difficulty with the repeated use of time domain integration (for example, double integration to obtain displacement from acceleration) is that any DC offset must be removed before integration is performed. Otherwise, the integrated DC offset will dominate the result. Time domain waveforms are integrated in ME’scope by using the trapezoidal rule. That is, the area under the curve is approximating with a summation, N
x i x i 1 t 2
x( t )dt i 1 where:
x( t ) continuous time domain waveform x i ith sample of the time waveform x0 0
However, the main difficulty with the frequency domain method is that if you want to integrate a time domain waveform, you must first FFT it to the frequency domain. If the waveform is not periodic in its sampling window (see Application Note #1 for details), leakage will occur, which can cause significant errors in the results. Frequency domain waveforms are integrated by using the following equivalent frequency domain operation,
x( t )dt
X i ( 2 f i ) , i=1,…,N/2 ( j2 f i )
where:
X i ( 2f i ) Fourier spectrum (DFT) of the signal for th the i sample ( j2f i ) frequency of the ith sample (in rad./sec)
f i frequency of the ith sample (in Hz) j - denotes the imaginary operator In other words, integration of a time domain waveform is equivalent to dividing each sample of its frequency spec-
trum Xi ( 2f i ) by the frequency ( j2f i ) .
TIME DOMAIN DIFFERENTIATION When Tools | Differentiate is executed in a Data Block window containing time domain Traces, the data is differentiated using the following rules, The first sample is differentiated using a forward difference formula. The last sample is differentiated using a backward difference formula. All other samples are differentiated using a central difference formula.
t time increment between samples
N = number of samples (or Block Size)
Page 1 of 8
App Note #2
www.vibetech.com
FREQUENCY DOMAIN DIFFERENTIATION
2/25/2014
Enter the following Data Block Parameters;
When Tools | Differentiate is executed in a Data Block of frequency domain Traces, the data is differentiated using the following equivalent operation,
dx( t ) ( j2 f i ) X i ( 2 f i ) , i=1,…,N/2 dt
Time Domain Block Size: 256 Samples Fmax: 10 Hertz On the Sinusoidal tab, enter;
In other words, differentiation of a time domain waveform is equivalent to multiplying each sample of its frequency spectrum X i ( 2f i ) by the sample frequency ( j2f i ) .
PERIODIC SIGNALS If a waveform is periodic in its sampling window, we will see that it can be accurately integrated and differentiated in either domain. To demonstrate this, we will synthesize a sine wave that is periodic in its window. Execute File | New | Data Block in the ME’scope window.
Number of Frequencies: 1 Number of Traces: 1 Frequency (Hz): 0.3125, Damping (%): 0 Magnitude: 1, Phase: 0 These parameters will be used to synthesize a 0.3125 Hz sine wave with a magnitude of 1.0 and no damping. Press the OK button to synthesize the sine wave. The new Data Block window will open with the sine wave in it. Execute File | Save to save the Data Block in the Project file.
Name the Data Block file “3125”, and click on OK. The following dialog box will open.
Periodic Acceleration Sine Wave. Notice that the Trace has exactly 4 cycles of the sine wave in it. This signal is periodic in the sampling window, since an integer number of cycles have been sampled (in this case synthesized) within the window. Notice also that the sine wave units are Gs (gravitational units). The Integration command in ME’scope will convert the units from acceleration to velocity, and velocity to displacement as you integrate signals. NOTE: G’s are automatically converted to (meters per second-squared) by the ME’scope integration command. File | New | Data Block Dialog Box for Periodic Sine.
Page 2 of 8
App Note #2
www.vibetech.com
2/25/2014
Time Domain Integration of a Periodic Signal
DC REMOVAL
To integrate the periodic acceleration sine wave,
If we integrated v(t) a second time, the 4.99 m/s constant would create a ramp function in the data. In more general terms, integration greatly amplifies the low frequencies in a waveform, including DC (zero frequency). This is made clear by the frequency domain integration equation. Dividing each sample of a waveform’s spectrum by its frequency is the same as multiplying it by the function (1/frequency).
Execute Tools | Integrate in its Data Block window. After the integration is complete, the acceleration signal will be replaced with the velocity signal shown below. Notice that the units of the signal are meters/second (m/s).
Double integration multiples a spectrum by (1/frequency2).
Unfortunately, most real world signals have some amount of DC offset in them, even when DC coupling is used in the acquisition system to remove it. Even a small amount of DC will dominate the result when integration is performed. Execute Tools | Remove DC in the window containing the velocity sine wave. Notice that the velocity waveform now ranges between ±4.99 m/s. Now, it can be integrated again to obtain displacement. Execute Tools | Integrate.
Velocity Sine Wave After Integration. Notice also that the velocity signal has a large bias (or DC offset) in it. Instead of being a cosine wave ranging between (+) and (-) the same value, it ranges between 0 and 9.98. This corresponds to the following integral. t
v(t ) a( )d 0
m t sin(.3125 * 2 )d s 2 0 m 9.80665 2 s cos(.3125 * 2t ) cos( 0) v( t ) rad .3125 * 2 s m v(t ) 4.99449 1 cos(.3125 * 2t ) s Setting t=0 produces v(0)=0. At t =1.6 sec, v(1.6)= 9.9898
The resulting displacement, in meters (m), is shown above. Notice (by dragging the Line cursor through the data) that its range is between ±2.54 meters, the expected result.
m/s.
Time Domain Differentiation of a Periodic Signal
NOTE: The accuracy of the integrated signal increases as Δt decreases. With a Δt = 0.00625, integration yields a v(1.6)=9.9888 m/s.
Now, let’s doubly differentiate the displacement time waveform to recover the original acceleration signal.
v(t ) 9.80665
Displacement After Double Integration.
Execute Tools | Differentiate twice. The resulting acceleration signal is shown below. Notice 2 that its values range between ±9.76 m/s .
Page 3 of 8
App Note #2
www.vibetech.com
2/25/2014
So far, we have seen that both time and frequency integration & differentiation yield the same result when applied to a sine wave that is periodic in its sampling window.
NON-PERIODIC SIGNALS To create a sine wave that is non-periodic in its sampling window, Execute File | New | Data Block in the ME’scope window. Name the Data Block file “3515” and click on OK. The following dialog box will open.
Acceleration After Double Differentiation.
Changing Units To change units from m/s2 to g’s, Drag the Vertical Blue Bar in the Data Block window to the left, to expose the Traces spreadsheet. Double click on the Units column heading. Select g from the drop down list in the dialog box that opens, and click on Yes to re-scale the data. Now, the original acceleration signal with values in the range ±1 g should be displayed.
Frequency Domain Integration of a Periodic Signal So far, we have seen that time domain integration can be performed repeatedly on time domain signals, but DC removal must be performed before integration. To doubly integrate the same periodic sine-wave in the frequency domain, Execute Transform | FFT in the BLK: 3125 window. Execute Tools | Integrate twice.
Dialog Box to Synthesize a Non-Periodic Sine Wave.
Execute Transform | Inverse FFT to obtain the displacement sine wave.
Enter Frequency (Hz) = 0.3515 into the spreadsheet on the Sinusoidal tab, and click on OK.
Again, the signal has values in the range ±2.54 meters, the expected result.
A 0.3515 Hz sine wave with a magnitude of 1.0, and no damping will be synthesized, and a new Data Block window will open with the sine wave in it, as shown below.
Frequency Domain Differentiation of a Periodic Signal To recover the original signal, transform the signal to the frequency domain, double differentiate it, and transform it back to the time domain. Then, change the units from m/s2 to g’s, as done before.
Execute File | Save to save BLK: 3515 in the Project file.
Time Domain Integration of a Non-Periodic Signal To doubly integrate this waveform, Execute Tools | Integrate.
Page 4 of 8
App Note #2
www.vibetech.com
Execute Tools | Remove DC.
2/25/2014
Time Domain Differentiation of Non-Periodic Signal
Execute Tools | Integrate again.
We will now recover the original non-periodic sine wave by doubly differentiating the displacement sine wave, and changing its units to g’s. Execute Tools | Differentiate twice. Double click on the Units column heading in the Traces spreadsheet. Select g from the drop down list in the dialog box that opens, and click on Yes to re-scale the data.
Sine Wave Non-Periodic in the Sampling Window. The resulting sinusoidal displacement waveform is shown below. Notice that the peak amplitudes of the non-periodic sine wave (±2.09 m) are different from the peak amplitudes for the periodic sine wave (±2.54 m). This is expected because the non-periodic sine wave completes more cycles in the same time period (T=12.75 seconds) than the periodic sine wave. Notice also that the doubly integrated non-periodic sine wave exhibits a very low frequency component (a slightly increasing ramp) that wasn’t present in the doubly integrated periodic sine wave. This error is due to leakage, an FFT phenomenon that occurs with non-periodic signals (see App Note #1 for details)
Recovered Non-Periodic Sine Wave. The non-periodic acceleration sine wave (in g’s) is shown above. The original waveform was recovered with very little error.
Frequency Domain Integration of a Non-Periodic Signal Now, let’s integrate the non-periodic acceleration signal using frequency domain integration. Close the 3515 Data Block and don’t save its changes. Open the 3515 Data Block from the Project panel. Execute Transform | FFT to obtain the Fourier spectrum of the sine wave. Execute Tools | Integrate twice. Execute Transform | Inverse FFT to obtain the displacement sine wave.
Time Domain Integration of Non-Periodic Sine Wave.
Page 5 of 8
App Note #2
www.vibetech.com
2/25/2014
Removal of Low Frequencies Before Integration When a signal is non-periodic in its sampling window, its DC (or low frequency) components must be removed from its spectrum before it can be integrated using frequency domain integration. Open Flat Plate Demo.VTprj from the Demos fly out panel. Open the BLK: Plate 30 FRFs Data block window. Execute Format | Overlaid. The overlaid FRFs are shown below.
Frequency Domain Integration of a Non-Periodic Sine Wave. The result is shown above. What happened? Since the signal was non-periodic in the sampling window, severe leakage occurred in its spectrum, and the low frequencies, (which were distorted by leakage), where amplified by the double integration process. Execute Transform | FFT again. Zoom the display around DC. Instead of a single frequency peak at 0.3515 Hz, the spectrum contains leakage of its entire frequency span. NOTE: Frequency domain integration automatically removes DC by zeroing the first few frequency samples.
Overlaid FRFs Showing DC & Other Low Frequencies. Notice that all of the FRFs have non-zero DC values (the first sample in each Trace), plus many other low frequency samples with non-zero values. This low frequency response is the rigid body motion of the plate, which was impacttested while resting on a form rubber pad. When these measurements are doubly integrated, the low frequencies will dominate the FRFs. Their corresponding time domain IRFs (Impulse Response Functions) will also show evidence of the amplified low frequencies Execute Tools | Integrate twice. Notice that even though the first few samples were zeroed, the other low frequencies are greatly amplified by the double integration. Now, transform all of the FRFs to Impulse Response Functions (IRFs) in the time domain, Execute Transform | Inverse FFT.
Frequency Spectrum Showing Leakage. A Hanning or Flat Top window could have been used to reduce the leakage before performing the frequency domain integration. (See App Note #1 for details.) The integrated frequency spectrum would be more accurate, but the resulting time waveform would show the effects of multiplication by the Hanning or Flat Top time window.
Page 6 of 8
App Note #2
www.vibetech.com
2/25/2014
After the Band Pass window has been applied, the FRFs will be smoothly tapered to zero outside of the Band cursor edges, as shown below.
Distorted IRFs Due to Double Integration. Clearly this is not the expected result! The IRFs above do not even resemble impulse responses. More of the low frequencies must be removed before integrating the FRFs.
Removing Lower Frequencies Close the BLK: Plate 30 FRFs Data block window, and then re-open it. Display the Band cursor
.
Drag the band cursors to enclose a band of 180 to1050 Hz, as shown below. When the Band Pass window is applied to the FRFs, all of the data outside of the cursor band will be zeroed, including DC.
FRFs After Band Pass Windowing. Now the FRFs are ready for double integration. Execute Tools | Integrate twice. Execute Transform | Inverse FFT. The resulting Traces are now IRFs with displacement response units. Notice that they also look like the expected impulse response functions, with one exception.
Band Cursors @ (180, 1052) Hz. Execute Transform | Window Traces. Select Band Pass from the Window Type list, as shown below. Click on the Apply button. Displacement Response IRFs.
Page 7 of 8
App Note #2
www.vibetech.com
2/25/2014
WRAP AROUND ERROR
CONCLUSIONS
Even though DC and the low frequency rigid body motion has been removed prior to double integration of the FRFs, the resulting IRFs still exhibit a problem, called time domain leakage or wrap around error.
First, we saw that a sine wave that was periodic in its sampling window could be integrated and differentiated using time or frequency domain methods, and the same result was obtained.
All of the IRFs exhibit the characteristic damped sinusoidal response, but many of them begin to grow in amplitude near the end of the sampling window. This is not realistic, since real vibration doesn’t damp out and then grow again. This is a signal processing error which is the same as leakage in the frequency spectrum of a non-periodic waveform.
Next, we saw the effects of leakage errors when trying to perform frequency domain integration on a non-periodic sine wave.
This time domain error is due to truncation of the signal in the frequency domain, the same as multiplying the true FRF by a rectangular window. The result is a smeared signal in the time domain. In this case, the IRFs were smeared by using the band pass window in the frequency domain to remove the low frequencies, and also some higher frequencies.
Finally, we looked at the integration of FRFs that had DC offsets and low frequency rigid body dynamics in them. We saw that applying a Band Pass window to the FRFs effectively removed the low frequency components, permitted double integration of the FRFs, which yielded realistic IRFs. From these examples we can make the following conclusions, Time domain integration can be used on any time domain signal, whether it is periodic or non-periodic in its sampling window. Frequency domain integration works well if its corresponding time domain signal is periodic in its sampling window. DC removal causes errors if there is significant leakage in the spectrum near DC. DC offsets and significant low frequency components must be removed by Band Pass windowing the data in the frequency domain before integration will yield usable results. Truncation of signals in the frequency domain by windowing causes wrap around error in the time domain.
Page 8 of 8