Me'Scopeves Application Note #2: Waveform Integration & Differentiation
Me'Scopeves Application Note #2: Waveform Integration & Differentiation
Me'Scopeves Application Note #2: Waveform Integration & Differentiation
www.vibetech.com
1/14/2002
where:
x( t )dt
Xi ( 2 f i ) ( j2 f i )
, i=1,,N/2
X i ( 2 f i ) = linear spectrum (FFT) of the signal th for 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 spectrum
where:
x( t )dt
i =1
x i + x i 1 t 2
x( t ) = continuous time domain waveform. x i = ith sample of the time waveform. x0 = 0 t = time increment between samples. N = number of samples (block size)
d(x( t )) ( j2 f i )( X i ( 2 f i )) , i=1,,N/2 dt
Page 1 of 8
App Note #2
www.vibetech.com
1/14/2002
In other words, differentiation of a time domain waveform is equivalent to multiplying each sample of its frequency spectrum
ple ( j2 f i ) .
Notice that the Trace has exactly 4 cycles of the sine wave in it. This signal is periodic in the window, since an integer number of cycles have been sampled (in this case synthesized) within the sampling window. Notice also that the sine wave units are Gs (gravitational units). The Integration commands in MEscopeVES will convert the units from acceleration to velocity, and velocity to displacement as you integrate signals. NOTE: Gs are automatically converted to (meters per second-squared) by the MEscopeVES integration commands.
PERIODIC SIGNALS
If a waveform is periodic in the sampling window, we will see that it can be accurately integrated and differentiated in either domain. To demonstrate this, use MEscopeVES to synthesize a sine wave that is periodic in the window. Execute File | New | Data Block in the MEscopeVES window. Name the Data Block file 3125.BLK, and click OK. The Synthesize Time Traces dialog box will open.
Page 2 of 8
App Note #2
www.vibetech.com
1/14/2002
Notice that the integrated signal in Figure 3 has a large bias (or DC offset) in it. That is, 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.
Method #1: DC =
where:
(Min + Max)
2
v(t ) = a( )d
=0
Min = the minimum waveform value. Max = the maximum waveform value. The average of minimum & maximum values works well for noise-free cyclic signals, such as sine, triangle, and square waves. On the other hand, it can give invalid results for signals such as transients, pulses, etc.
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 v(t ) = 9.80665
m/s. 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.
DC REMOVAL
If we integrated v(t) a second time, the 4.9949m/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 waveforms spectrum by its frequency is the same as multiplying it by the function (1/Frequency). Double integration multiples it 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. Time domain integration is the more straightforward method to use on time domain waveforms, if they dont have any DC offsets in them. Unfortunately, there is no foolproof method for removing a DC offset directly from a time domain signal, unless it is a cyclic waveform.
Notice that the velocity waveform now ranges between +4.99 and -4.99. Now, it can be integrated again to obtain displacement. Execute Tools | Math | Integrate again. Execute Tools | Math | Remove DC again.
Page 3 of 8
App Note #2
www.vibetech.com
1/14/2002
The resulting displacement (in meters), is shown in Figure 4. Notice (from the cursor value) that its ranges between +2.54 and -2.54 meters, the expected result.
Execute Transform | FFT to obtain the Linear spectrum of the sine wave. Execute Tools | Math | Integrate twice. Execute Transform | Inverse FFT to obtain the displacement sine wave.
The same signal as that shown in Figure 4 should be displayed. Again, the units of the signal are meters, and that the maximum amplitude is 2.54 meters. To recover the original signal, try transforming to the frequency domain, double differentiating, transforming back to the time domain, and changing units back to Gs, as done before. 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 the sampling window. Now, lets look at a case where DC Removal doesnt work properly.
Changing Units
The resulting acceleration signal is shown in Figure 5. No2 tice that its values range between +9.76 and 9.76 m/s . These are approximately +1.0 and -1.0 Gs.
In the next example, we will see that DC removal works in the frequency domain, but not in the time domain. To use the DC Removal command first, Execute File | Add and the select PLTMODES.BLK file from the Examples directory. Execute Format | Vertical Axis Scaling and select Linear magnitude. Zoom around DC (zero frequency), and scroll through the measurements.
Now, the original acceleration signal with unit amplitude and units of Gs should be displayed.
Page 4 of 8
App Note #2
www.vibetech.com
1/14/2002
Notice that all of the measurements have a non zero value at DC (the first sample in each Trace). The DC offset of M# 24 is shown in Figure 6. When transformed to the time domain, all of these measurements will have DC offsets in them. Now, transform all of the FRFs to Impulse Response Functions (IRFs) in the time domain, Execute Transform | Inverse FFT.
When the Inverse FFT has completed, the Impulse Responses will be displayed, as shown in Figure 7.
A resultant velocity IRF is shown in Figure 9. What happened? When the signals were integrated, the DC offset completely dominated the IRF. This is the correct result, but not very usable. We would prefer velocities that still look like impulse responses.
Notice in Figure 8, that instead of removing the DC value, it was made larger!
Now, when the band pass window is applied, all of the data outside of the cursor band will be zeroed, including DC. Execute Transform | Window Data | Band Pass. Click on No to window the data in the same Data Block.
Page 5 of 8
App Note #2
www.vibetech.com
1/14/2002
grow in amplitude at the end of the window. Of course this is not realistic, since real vibrations dont damp out and then begin to grow again. Instead, this is a signal processing error. This error is due to truncation of the signal in the frequency domain, the same as multiplying the true FRF by a rectangular window. (This effect is explained in more detail in Application Note #1.) 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.
The resulting Traces are now IRFs with displacement units. Notice that this time they still look like the expected impulse responses. M#24 is shown in Figure 11.
Page 6 of 8
App Note #2
www.vibetech.com
1/14/2002
Enter the following numbers into the dialog box (as shown in Figure 12), Number of Samples: 256 Max. Frequency: 10 Hz Number of Frequencies: 1 Number of Frequencies: 1 Number of Traces: 1 Frequency: 0.3515 Hz, Damping (%): 0 Magnitude: 1, Phase (deg): 0.
These parameters will synthesize a 0.3515 Hz sine wave with a magnitude of 1.0, and no damping. When all of the parameters are entered, press the OK button to synthesize the sine wave. Figure 14. Double Integration of Non Periodic Sine Wave.
The Data Block window will open with the sine wave in it, as shown in Figure 13. Execute File | Save and click OK to save it to disk.
Figure 13. Sine Wave Non-Periodic in the Window. A sinusoidal displacement waveform (the expected result) is shown in Figure 14. In this case, the Remove DC command worked correctly on a non-periodic signal, but only because DC was computed as the average of the minimum and maximum values. If all of the Trace data had been averaged together (by answering Yes during the Tools | Math | Remove DC command above), an incorrect DC value would have resulted.
Figure 15. Frequency Domain Integration of a NonPeriodic Sine Wave. The result is shown in Figure 15. What happened? Since the signal was non-periodic in the sampling window, severe leakage occurred, and the low frequencies in the spectrum, (distorted by leakage), where amplified by the double integration process.
Page 7 of 8
App Note #2
www.vibetech.com
1/14/2002
Of course, a Hanning or Flat Top window could have been used to reduce leakage before the frequency domain integration. (See Application 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 time window (truncation at both ends of the window). To minimize the error due to double integration, a band pass window can be used before integrating the signal, to remove as much of the low frequency leakage as possible. Close the 3515 Data Block and dont save its changes. Execute File | New | Data Block again. Click on OK to create the Data Block again. Execute Transform | FFT to transform the sine wave data to the frequency domain. Execute Format | Vertical Axis Scaling and select Linear magnitude. Zoom in and set up the Band Cursors around the peak, as shown in Figure 16.
Figure 17. Displacement of Non Periodic Sine Wave After Band Pass Windowing of Frequency Data.
CONCLUSIONS
First, we saw that a sine wave that was periodic in the sampling window, could be integrated & differentiated using either time or frequency domain methods, and the same result was obtained. Next we looked at the integration of impulse responses that were nearly periodic in the window, but had DC offsets in them. Since the IRFs were non cyclic, only band passing the data in the frequency domain could effectively remove the DC offsets. Finally we saw the effects of leakage when trying to perform frequency domain integration on a non-periodic sine wave. From these examples we can make the following conclusions, Time domain integration can be used on any time domain cyclic signal as long as DC removal is performed before integration. Frequency domain methods will also work well on time domain signals that are periodic in the sampling window. DC offsets of non-cyclic signals must be removed by band pass windowing the data in the frequency domain before integration can yield usable results. Before performing frequency domain integration of non-periodic waveforms, all non-essential low frequencies must be removed by band passing the data.
Figure 16. Band Cursors Surrounding Peak. Execute Transform | Window Data | Band Pass to preserve just the peak in the data. Select No, and click on OK to window the data. Execute Tools | Math | Integrate twice. Execute Transform | Inverse FFT to recover the integrated time domain signal, as shown in Figure 17.
This result is an improvement of that in Figure 15, but still not the expected result.
Page 8 of 8