NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Benji woosh
Posts: 1
0 Kudos

Continous signal filtering?

Hello,

 

Im trying to implement a low pass filter to filter data Im acquiring from gyroscope and accelerometer real-time, 100 samples/minute (cut into 25 packages containing 4 measurement points)

Ive tried looking in help, but didnt find anything that would filter signal real-time, just filtering previously acquired data with lets say Bw_LPF - yet it requires array of already sampled data.

 

What should I use for real time filtering? Operation isnt time-critical, but filtering it with FIR filter of lets say 50th or 100th order would cause the signal (which Im using later to generate a 3d preview of the sensor board) to 'lag' by entire second, thats why I thought using IIR would be better...

 

Regards, Ben

Member
dcl9000
Posts: 120
0 Kudos

Re: Continous signal filtering?

Benji,

 

How did you acquire the data? 100 samples/min should be very easy to achieve with any NI USB DAQ device.  The sample project "ContAcq-IntClk.prj" shipped with your LabWindows/CVI can provide you with very "real-time" performance for your timing requirement.  The sampled data is then transferred into an array that you can process with any filtering functions easily. 

 

Are you saying the filtering function that you used takes too much time to process the data array?  Or do you simply have a slow DAQ problem?  What DAQ device did you use?  What filter function did you use?  Can you post your code so that people can help you solve your problem?

 

 

Member
ValkoA
Posts: 94
0 Kudos

Re: Continous signal filtering?

Hi Benji!

 

 If I understand correctly, you want to receive filtered output with every new package, but the filter requires at least 50 or 100 inputs. If this is the case, all you have to do is to use a shift register that is big enough (say a 100 samples). Then, if new data arrives (4 samples in your case) you shift them into the register (thereby throwing away the 4 oldest values) and then filtering can be done with this new dataset. Of course, this will cause a delay in the filtering at the start (until the register fills up), but then you'll get the filtered output with every new package.

 

I hope this answers your question, pease get back to me if anything is left unclear.

 

Kind regards:

 

Andrew Valko

National Instruments

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page