LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

low pass filter help

Thank you for the helpful advice. I have incorporated the sampling rate directly from the waveform and corrected the wiring of the cutoff frequency as suggested by Johnsold. I have also finally had a chance to look at the problem with the filter in more depth. The amplitude of the signal coming out of the filter is much smaller than the amplitude of the signal going in. I'm not sure exactly what's causing this, but it seems to be related to the ratio of cutoff frequency to sampling frequency. For example, using a sampling frequency of 360 and a cutoff frequency of 20Hz reduces the signal amplitude by 200x, but using the same sampling frequency and a cutoff of 131Hz doesn't change the amplitude at all (see attached .png files). Unfortunately, a low pass cutoff of 131Hz doesn't filter out enough noise, and I'm not sure why the signal amplitude would be dependent on cutoff frequency. I think I must be using the filter incorrectly, but I'm using it correctly according to the labview help. Any suggestions would be appreciated.

-Brian

0 Kudos
Message 11 of 13
(844 Views)

Brian,

 

Please post some data. It would make it much easier for us to figure out what is going on.

 

The charts may be fooling you. You have the time axis displays removed so it is impossible to tell what the data timing really is. I much prefer graphs when you have an array of data.

 

How many data points are in each array?  You have not told us much about your signal or the noise. What is the nature of the desired signal? Waveshape, frequency range, amplitude range? What is the nature of the noise? Is it random or is it an interfering signal? Frequency range, amplitude range? What will you be doing with the signal after you process it?

 

Other comments: Please do not hide wires and object behind other things. The initialization connections for the shift registers for example.

 

Clean up wiring. Right to left. Minimum number of bends.

 

Do you really need a timed loop? If the hardware DAQ device sets the data rate, a standard while loop should work.

 

Lynn

0 Kudos
Message 12 of 13
(827 Views)

It seems that, in trying to be brief, I’ve been too quick to jump into the details of the program without explaining the big picture. The desired signal is the ground reaction force created by hopping at 2.2Hz or running on an instrumented treadmill (for hopping, the treadmill belt is stationary).  Originally, the program was used just for hopping. I changed the while loop to a timed loop because some of my subjects were producing 2 peaks for each hop – one shortly after the toe hits the ground and another after the heel hits. To avoid confusing subjects, I didn’t want them to see 2 consecutive peaks so quickly, so I recently changed the while loop to a timed loop, which eliminated this problem. The program also works with a while loop, and I will admit that the timed loop may not be the best solution, but it seems to get the job done.

 

I’m trying to add the filter because the treadmill introduces noise that will change peak force values slightly. I have attached jpegs of the force signal and the noise from the treadmill. Other signal characteristics: I am now down-sampling to 360Hz (although my hardware samples at 1080, so my attached figures are sampled at 1080Hz) and using samples to read = 360 in Measurement and Automation Explorer. I added the array with the zero index after the analog function to get only vertical force from one of our force plates., rather than multiple components of force. The noise is roughly sinusoidal with a frequency that depends on the treadmill speed and is much higher than step frequency. The signal will change based on each runner’s stride frequency but only slightly. My goal is to modify my vi to eliminate this interfering signal quickly so that I can still give subjects immediate feedback on the front panel.

 

I also attached data from pre- and post-filter written to a spreadsheet. The data is from me hopping on the treadmill with the belt stationary (2 hops at 160 bpm), the same experimental protocol that produced the charts I attached yesterday. Although the data appear very different, the only thing I changed about the program was adding Write-to-Spreadsheet functions on either side of the filter. The signal amplitude is still reduced for most of the data points, although the ratio between pre-filtered and post-filtered data isn’t as consistent as I thought yesterday. Thank you for your time and advice.

-Brian

0 Kudos
Message 13 of 13
(813 Views)