LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Noisy Analogue Signal and Lowpass Filter Questions

Hi everyone,

 

I am getting analogue signals from a strain gauge that are a bit more noisy than I would like... Normally, I jump right in an smooth the signal using a lowpass filter of whatever order gave me the result that was acceptable, without overkill and smootig the signal to nothing... However, I am settingup a new DAQ device and would like to a little more informed about what and how am doing this...

 

So, here are my questions:

 

1. How do I determine the filter order? I usually use a 2nd order filter for smoothing.. I understand the comncepts of roll-offs and phase delay as they relate to the order numbers... On what basis should I decide which order filter to use for this specific signal?

 

2. I am still thinking that using a lowpass filter is the best approach... I assume the lower cutoff freq is in Hz (i.e. 10Hz) and is NOT a normalised freq [i.e. cutoff freq / (sample rate/2)]?.. The default value is 0.125, which seems too low for a Hz value? Also, on what basis should I decide what cutoff freq to use for this specific signal?

 

3. I need to synch the filtered strain gauge signal with other, unfiltered signals... But as the filter will add a phase delay it will affect signal synchronisation... I heard somewhere that a 4th order filter is zero-phase, but I can't see how that could be right as the filter only operates in one direction... Any suggestions for what I could do to maximise the timing alignment between the filtered and unfiltered signals?

 

All comments welcome!

 

Regards,

Jack

0 Kudos
Message 1 of 7
(4,284 Views)

Sorry... One other question:

 

As the data is a continuous, should the filter be reinitialised for each interation of the loop? (T/F constant)... My gut says no...

 

Thanks,

Jack

0 Kudos
Message 2 of 7
(4,282 Views)

Jack,

 

The answer is .... It depends...

 

1. You are aware of some of the disadvantages of filtering.  The determination of an optimum filter depends on the nature of the signal, the nature of the noise or interference, and what you will be doing with the signal after processing.

2. Some filter VIs use frequencies on Hz and others use normalized frequencies.  Read the help for the VI you are using to determine the units for your VI.

3. What you heard about fourth order filters is wrong. All filters have some phase shift or delay.  An all-pass filter has unity gain at all frequencies while having variable delay. This can be used to compensate for the delays/phase shifts of the low pass filters.  In principle you could use all-pass filters to equalize the delays on all channels.

4. All filters have a transient at startup. If you re-initialize the filters in a loop, your data will have the transient on every iteration. So your gut was right. Do not re-intialize filters for continuous data.

 

Maybe there are better ways to do what you want. What is the desired bandwidth of the signals? What is the source and nature of the noise? What kind of hardware signal conditioning are you using? Are the signals with which the strain gauge signals will be synchronized sampled in the same DAQ device? How accurate does the synchronization need to be?

 

Lynn

 

0 Kudos
Message 3 of 7
(4,266 Views)

Thanks Lyn for the reply...

 

I am an Exercise Scientist (Academic) by trade and basicaly use Labview for all my research data collection and some analysis (I also use Matlab). My area of interest in the neuromotor/neuromusuclar mechanisms associated with exercise-induced fatigue... I use labview to record joint torque from strain gauges and muscle electrical activity from EMG amplifers, and to control (and record) triggers sent to various (peripheral nerve and brain) stimulators... I use two PCIe cards; an series S for EMG and a series M for the strain gauge and stimulators)... I am at a small institution, so lab/tech staff are very limited... And none are EEs or have trainign in Labview... I have done a few Lbaview course and am getting better as programming... I generally know most of the right questions to ask, but finding to solution gets tough at time... These days, I find I an spending time learning Labview that writing papers... Not good..

 

Anyway... To provide you with more detail... The analogue signals from the strain gauge are actually come from the AO of a comerical isokinetic dynamometer... There are no brigdes/conditioners etc as these are within the dynamometer so that is taken care of off... I have no idea of signal bandwdith for strain guage signals (I think the signal freq will be dependant on the type of musle contraction, hard/fast versus slow/controlled)... Synching needed to be between both PCIe cards (I have an RTSI cable), as for synch accuracy, as accurate as I can get...

 

For phase delay, you suggest that I use an all-pass filter on all other signals at the same order as the lowpass?

 

Regards,

Jack

 

 

 

 

0 Kudos
Message 4 of 7
(4,264 Views)

Jack,

 

I was the Instrumentation Engineer at a university for 24 years and worked with several execise physiologists, biologists, and neuroscientists on similar projects.  My group was the "lab/tech staff" you have little of.  There were 3.5 (engineer, 1.5 electronics technicians, and machinist) of us for the entire university.

 

OK.  The strain gauge signals probably have no information above a few tens of Hz (hummingbirds) or a few Hz for most larger species.  EMG is usually filtered in the amplifiers to slightly larger bandwidths (few hundred Hz) unless you are trying to see the individual action potentials.  Does the dynamometer have specifications on the bandwidth or sampling rates used?

 

Since your bandwidths are realtively low, I suggest that you sample all the analog inputs (and the trigger outputs, if the boards have the capability) from the same clock.  You can later decimate or average data on channels where less data is needed.  Record the trigger signals on an unused analog input if you have one available.  It can be very handy to have the information about when the triggers actually occurred in the same dataset as the response data.

 

Delay equalization is a complex topic. Suppose that you are sampling all your channels at 1 kS/s. Suppose you have a 10 Hz low pass filter, 2 pole Butterworth, on a strain gauge channel and a 50 Hz filter, 4 pole, elliptical, on an EMG channel and you want to synchronize the filtered data with some unfiltered channels.  The two filters have very different phase and delay responses over the 0-500 Hz frequency range. To equalize you would need to determine the maximum delay at any frequency in the range for both filters. Then you would need to design THREE all-pass filters. One would have a phase response which compensates the 10 Hz filter. Another would compensate the 50 Hz filter.  These would need to be designed so that the total delays through the low pass plus all-pass filters is the same.  Then you need a third all pass filter with that same total delay to compensate the unfiltered data.  This is may be a non-trivial job for an expert, depending on the low pass filters.

 

What kind of noise are you seeing and how is it affecting your measurements?  Can you post some data?

 

Lynn

0 Kudos
Message 5 of 7
(4,259 Views)

Hi Lyn,

 

Thanks for the comments... They help a lot...

 

The EMG is pretty easy... The electrodes/amplifier is bandwidth limited to between 20-450Hz and the signals are pretty clean; thus I run a zero-phase bandpass filter between 20-450Hz to remove any artefact from cable sway etc offline only... No bandstop filter for mains noise etc is used...

 

For the triggers, I am currently recording them on spare AI channels (for the reasons you stated).

 

The delay equalisation solutions that you outlined are way over my head!!... If I overlay the unfiltered and filtered (low pass at 25Hz) strain gauge signals on a plot, the delay apears to be about 16-17ms... Might be easier if I test the delay duration more rigourously, wear it on the DAQ, and correct it offline when needed... Although my OCD is not liking that idea!

 

I have attached some data... Raw AI strain gauge signal, AI signal lowpass (LP) filtered at 50Hz, and LP at 25Hz... Data are scaled and in units of Force (Newtons).

 

Regards,

Jack

 

0 Kudos
Message 6 of 7
(4,249 Views)

Jack,

 

I have been busy with some of my real work.  I will try to look at your data in the next day or two.

 

Lynn

0 Kudos
Message 7 of 7
(4,233 Views)