Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

displacement signal from accelerometer

Hi all,

 

I'm new to labview (about 3.5 wks experience) so please excuse any silly questions and/or ignorance.

 

I'm putting together a VI to take x, y and z vibration data from a peizotronics accelerometer through a USB-6008 and having some problems converting acceleration to displacement. Attached is a modified snippet of the whole vi (small portion of x) and the output from the acceleration, velocity and displacement plots. Assuming the units are consistent, m.s^-2, m.s^-1 and m, something is clearly wrong with the data in that the values are far too high. The displacement will exceed 10m regularly when it should be a fraction of a mm, oscillating about zero. When I shake the accelerometer I get more defined responses that look right, i.e.. peaking velocity at zero acceleration so I'm sure the VI is right. The gradient of the displacement plot can be reversed when I change the offset in the raw voltage data so the average crosses zero - for some reason there is an intrinsic offset in the data of about 36-39mV. I'd like to automatically remove this offset from the data as it's being collected but can't find a way to use the output from the Averaged DC RMS VI that doesn't cause this error: LabVIEW:  (Hex 0xFFFFF8F6) Waveforms have different dt values. I've tried conversions to different formats (to DDT etc), pulling the data from an array. Does anybody have any ideas?

 

I have a couple of other niggling things, although this may be the wrong section for them:

 

1. When I do a PSD FFT on the acceleration data (unit g) I always get a very high signal at low frequency (<2.5Hz). Attached is a closeup of the FFT. This is mitigated somewhat by averaging but is still often greater in magnitude than the peaks I really want to see. Where does it come from?

 

2. The maximum frequency I am measuring is 500Hz, why? I'm pretty sure I've had higher from it while I've been building the VI but all the FFTs are limited to this value now.

 

Thanks in advance!

 

Download All
0 Kudos
Message 1 of 14
(11,277 Views)

Start with the obvious parts:

If you convert to g instead of m/s² , why do expect to get m/s or m after integration(s) ??

A small offset (and drifts of the offset!) integrate to big values over time 🙂 . a way to remove it is to apply high-pass filter

Already in your program the max bandwith of 500Hz is fixed . To see higher frequencies you need to increase the samplerate.

If you sample with 1k SPS you won't see frequencies higher than 500Hz and if you apply signals with higher frequency these fold down to (lower) frequncies.  Some keywords: 'shannon' & 'nyquist'

 

May I ask your technical background?

 

 

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 14
(11,254 Views)

Thanks for your response, Henrik. To answer your questions...

 

If you convert to g instead of m/s² , why do expect to get m/s or m after integration(s) ??

 

I don't, I also multiplied by 9.80665 in the diagram I attached previously but I will use both g and m/s² in the final version and make a way to select which one.

 

A small offset (and drifts of the offset!) integrate to big values over time :smileyhappy: . a way to remove it is to apply high-pass filter.

 

The high-pass filter is something I know almost nothing about, I'l look into it. Do you have any advice on where to start? Will this eliminate the need to subtract the average from the waveform?

 

Already in your program the max bandwith of 500Hz is fixed . To see higher frequencies you need to increase the samplerate.

If you sample with 1k SPS you won't see frequencies higher than 500Hz and if you apply signals with higher frequency these fold down to (lower) frequncies.  Some keywords: 'shannon' & 'nyquist'

 

OK, I see my VI needs a few tweaks. I've been confused about this because I changed my multiplier (and therefore the rate) and samples settings prior to posting here and the FFT output a max frequency of 500Hz in all cases! I don't know what I did wrong. I'm using a multiplier of 2.56*Fmax as my rate to counter any aliasing effects and now I realise my Fmax is variable in the program Smiley Mad I can now get this right. I've been using the following source as reference: http://irdbalancing.com/downloads/SIGCOND2_2.pdf.

 

My background includes Mechanical Engineering (degree), Biophysics (Masters) and Physical Chemistry (PhD and post-doc) but I'm no expert in anything. I now work for a company that designs, builds, tests and installs precision optical equipment for synchrotron radiation sources and we're introducing vibration analysis into our test regime so I'm learning vibration analysis and LabView from the ground up.

 

What of the consistent low frequency signal in the FFT?

 

Thanks,

Phil

 

0 Kudos
Message 3 of 14
(11,238 Views)

@idt13 wrote:
The high-pass filter is something I know almost nothing about, I'l look into it. Do you have any advice on where to start? Will this eliminate the need to subtract the average from the waveform?

 

Start with some basic online lesons on signal processing.

 

OK, I see my VI needs a few tweaks. I've been confused about this because I changed my multiplier (and therefore the rate) and samples settings prior to posting here and the FFT output a max frequency of 500Hz in all cases!
Try autoscale on the axes 😉

My background includes Mechanical Engineering (degree), Biophysics (Masters) and Physical Chemistry (PhD and post-doc) but I'm no expert in anything.

YMMD!

 

What of the consistent low frequency signal in the FFT?

Maybe artifacs of samplin and FFT or real signal? Every integration is a division by omega in the frequency domain. Asuming white noise in the acceleration you will end in higher levels for the low freq in distance. But most probably you have seen the DC part and the first LF bin(s) with leakage and assumed every interpolated plotted line dot as data?


 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 14
(11,218 Views)

Smiley Very Happy Glad I could provide you with some entertainment, Henrik! 

 

Well, my VI is outputting things I just don't understand so I'm going to leave this thread for now and get back to basics with another poorly informed question about sampling in another thread.

0 Kudos
Message 5 of 14
(11,167 Views)

Ok, so back to this!

 

I have everything sorted now, including all the sampling. To deal with the offset I subtracted the Offset output from Normalize Waveform VI from the original data stream. This worked really well and I can now get a displacement signal that doesn't fly off sharply away from 0. I do now have one further problem with this signal, though. In each of the attached files are two data sets, one exported from the FFT and the other from the displacement plot. The displacement plot shows a large signal peaking just short of 0.1s - corresponding to ~2.5Hz. It turns out this is related to the bandpass filter, which passes frequencies between 3 and 500Hz. The filter worked really well to attenuate a large peak below 2.5Hz that was originally in the FFT but it introduces another large peak that corresponds with the low frequency cut off for the bandpass filter, 3Hz in this case.

 

As expected, this feature moves when the cut off is changed so is directly related to it. The further away from 0 the cut off is the smaller and broader the feature is in the FFT but then I lose even more of the low frequency signal so I want to avoid that. Changing the filter settings - order, type, etc, do nothing. I've attached a second data file with the cut off at 10Hz. The frequency of the main feature in the displacement plot is now 4*1/0.0257s = ~10Hz and the FFT shows a feature around 10Hz. I don't understand what's happening, any suggestions?

 

This happens only after the double integration to get the displacement from the acceleration signal. Keeping the units in 'g' gives the expected response.

 

As an aside, I assumed the bandpass filter was a low-pass then a high-pass filter in series, but I get very different results when I use this combination. Any ideas why they could be different, even though the settings are the same?

Download All
0 Kudos
Message 6 of 14
(11,081 Views)

Hi idt13,

 

Just letting you know that I will be looking into this for you, could you let me know which methods you are using to filter the signal (hardware/software, type, etc.)? If possible could you also attach a data file where your aquisiton is filtered by just a lowpass?

Regards,

Ben Clark
0 Kudos
Message 7 of 14
(10,991 Views)

Hi Ben,

 

Thanks for helping. Here is a summary of my hardware:

 

I'm using a PCB Piezotronic 356A16 Accelerometer that is input to a PCB Piezotronic 482C05 Sensor Signal Conditioner. I can't tell you precisely what this does but it doesn't appear to be causing any problems. The output from this is run into the analog input of a NI USB-6008 DAQ device. This is connected via USB to my workstation where it is controlled by the LabVIEW VI, which is attached with it's library. Using just a 3rd order lowpass butterworth filter set to remove signals above 500Hz I get the FFT data attached below. The displacement flies off to unreasonably high values so I haven't attached it.

 

In response to Lynn from the other thread, columns in the data files I posted are as follows: columns one and two are frequency and amplitude data for the FFT, the other two are the displacement signal with time on the left and amplitude on the right. There is no raw acceleration data in the files. I will attach some in a post after this one.

 

Something that might be relevant that I forgot is the Filter VI I used isn't the original express VI - LabVIEW returned an error saying the SubVI wasn't executable. I had to copy the block diagram into a new VI and save it into my library to get it working.

 

Let me know if there's anything else you need to help me with this problem. As usual, if there are any general points you want to make about my VI or anything else go right ahead. I'm tidying it up and making general improvements as I'm doing the training online, which I probably should have done earlier Smiley Tongue

 

Thanks!

0 Kudos
Message 8 of 14
(10,945 Views)

Attached is the raw acceleration exported directly from the plot. All three axes are present.

0 Kudos
Message 9 of 14
(10,944 Views)

I will try to look at your data tomorrow.

 

Lynn

0 Kudos
Message 10 of 14
(10,921 Views)