LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with waveform integration

hello

"do you have made a study of the relationship between the sampling frequency and the maximum frequency of the signal?."

No. Well, first of all the sampling rate has to be at least twice the maximum signals rate, otherwise you may get some real ugly aliasing effects. But the question is what erros are you willing to accept. with a sampling rate of ~10 times the signals rate you get an error of about ~1% as seen in my previous post. to be on the sure side, use the highest sampling rate your system can provide.

filtering:
just a suggestion, but try to do this: you already calculate the FFT. try to filter the signal in frequency space, i.e. set all amplitudes of those frequencies in your fft you want to be filtered to zero and do in inverse FFT to get the filtered time signal. needs a little bit of drawing, but can be done.

best regards and let us know
chris
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 11 of 22
(1,907 Views)
yes, i am consious about the aliasing matter. thank you anyway.

about the filtering:
i already did that, but the process is time consuming.

the signals that i have to integrate have components that reach the 4500 Hz. this means that i have to sample the signal at a frequency of 20kHz, besides, i am getting 10 channels, thus i can't perform a simultaneous acquisition with my ADC Board at 10 times 20 kHz for all the signals.

what i have in mind is to get a curve giving the amount of deviation of the amplitudes as a function of the frequency, and then correct the results in the spectrum.
0 Kudos
Message 12 of 22
(1,905 Views)
As the previous posts have made clear, to do this the easy way, you will need another acquisition board. You need at least 20kHz, and 45kHz would be better. You probably would also like a simultaneously sampled input (either a sample-and-hold front end or discrete digitizers). However, there are alternatives.
  1. Do you absolutely need to sample all the channels at once, or can you run the experiment twice and get deterministic results with two sets of data? You may also be able to get the information you need by staggering which channels you take over successive runs (e.g. with three channels, take data sets with 1 and 2, 2 and 3, and 3 and 1).

  2. Since you know you have no frequency components over 4.5kHz, use the same techniques used in CD players to oversample your data before you integrate. I have never looked into this technique, so I can't give you details, but the algorithms work almost down to the Nyquist limit (sampling frequency twice the maximum frequency).

  3. Do you have a low frequency component you need to remove with the 5Hz high-pass filter? A simple subtraction of the signal average produces no distortion or phase shifts and is quite fast.
One last note: as mentioned aboved, beware the time offset you get if your acquisition board only has one analog-to-digital converter and no sample-and-hold input. Successive channels will be sampled at different times.
0 Kudos
Message 13 of 22
(1,881 Views)
The simultaneous acquisition is a must for the application.

The acceleration input signal that I'm using come from an accelerometer, thus they have a lot of noise in the low frequencies that I have to remove, because I'm interested in the AC portion of the velocity.

And yes, I'm using SS/H, thus the 10 channels are sampled at the same time.


what I have done until now is this:
1.- Filter the acc signal with a HP Butterworth filter with Fc =5Hz
2.- The filtered signal is integrated using the trapezoid method.
3.- Then I perform the FFT of the integrated signal.

As I have mentioned before, the results of the amplitudes of this FFT is no good in the high frequency portion of the frequency spectrum, but I have made some test and found that the attenuation of the amplitudes is the same n terms of the percentage of the maximum frequency of the spectrum (the picture attached show this bahaviour for the trapezoid method). This allow us to correct the results obtained from the FFT and get the real amplitudes of the components of the signal.

4.- So, I perform the correction of the FFT with the curve constructed for the trapezoid method
5.- If we need the Waveform, we can re-construct the waveform from the corrected FFT and taking into account that there is a phase difference of 90º between the acceleration and the velocity signal.
0 Kudos
Message 14 of 22
(1,859 Views)
If your main interest is the frequency amplitudes, why do the integration and filtering? It introduces errors you don't want or need. Take the Fourier transform of the raw data and use the known change of phase and amplitude under integration to get your actual phases and amplitudes. For example, the integral of a cosine wave (one point on the FFT) is:

∫cos(ax)dx = (1/a) sin(ax)

The Fourier transform gives you the phase, so you can calculate the final amplitude of either the velocity or displacement. Your low frequency noise will be in the low end of the spectrum. Ignore it or delete it, as mentioned in an earlier post.

You will also need to correct for the bandwidth of your collection apparatus.
0 Kudos
Message 15 of 22
(1,843 Views)
This is about all you can do since the discrepancy you see is from your approximation of an integral. As for the filtering, you might just filter in the frequency domain and use an ideal highpass filter to zero out the low frequency signals. And you can also zero pad the frequency domain signal and then do an inverse FFT to improve the resolution of the time domain signal if you need a 'prettier' looking signal.
Randall Pursley
0 Kudos
Message 16 of 22
(1,837 Views)
Here is an example using the frequency domain to perform the integration. Since 0 Hz is undefined (1/zero)after the integration, I set it to zero since you would have to do this anyway. While in the frequency domain, you can also do your highpass filtering to eliminate the low frequency noise.

Integration of f(t) <=> (1/jw)*F(w)
Randall Pursley
0 Kudos
Message 17 of 22
(1,827 Views)
-------------------------------------------------------------------------------------------------------------------------
If your main interest is the frequency amplitudes, why do the integration and filtering? It introduces errors you don't want or need. Take the Fourier transform of the raw data and use the known change of phase and amplitude under integration to get your actual phases and amplitudes. For example, the integral of a cosine wave (one point on the FFT) is:

∫cos(ax)dx = (1/a) sin(ax)

The Fourier transform gives you the phase, so you can calculate the final amplitude of either the velocity or displacement. Your low frequency noise will be in the low end of the spectrum. Ignore it or delete it, as mentioned in an earlier post.
--------------------------------------------------------------------------------------------------------------------------

Yes, I am interested in the amplitud, but also in getting the most near-to-reality integrated waveform. This can't be accomplished by working in the frequency domain (with the Fourier Transform) because the noise also include phase distortion that i can't correct, and this distortion will not allow me to re-construct the real waveform.
0 Kudos
Message 18 of 22
(1,821 Views)
The same noise is present in both domains just expressed differently. Why is it better to deal with it in the time domain? Most of the time it is easier to visualize and minimize the noise in the frequency domain.

Can you post some of your data so we can see what problems you are having?
Randall Pursley
0 Kudos
Message 19 of 22
(1,812 Views)
in time domain the influence of integrating the noise (area under the curve) is preety insignificant compared with the real components of the vibration signal.

in the frequency domain, as you say, the same noise is present and though its influence in the amplitude is not significant, it is in the phase of the components. thus, when you perform the inverse fourier transform, what you do is the sum of cosines with the frequency and amplitude given by the amplitud spectrum (little distortion) and with a phase given by the phase spectrum (lot of distortion), so, what you have is a waveform with the same cosines of the integrated signal but added in the times that they should, thus you have a signal that is quite different of the integrated signal.

in the attached llb is the procedure that i have mentioned early and the two files that contains the corrections curves for boths simple and double integration

greetings, CJMV
0 Kudos
Message 20 of 22
(1,803 Views)