LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

continuous analog input read averaging

How do I overcome mechanical compliance that results in oscillating analog input values obtained by my position sensor? I know one way is to stiffen the mechanical structure, but that cant be done. The beam acts as a cantilever and oscillates when load is on it. The value is around a target desired. Would using a mean point by point function help here? Please advice. Thanks!


V

I may not be perfect, but I'm all I got!
0 Kudos
Message 1 of 7
(2,878 Views)

Also, Is there a way to scale an input range? My sensor has a small range of 2.5V and I would prefer 5-10V...Thanks!

I may not be perfect, but I'm all I got!
0 Kudos
Message 2 of 7
(2,873 Views)

Don't know your sample rate 😉  but you can use the 'Mean PtByPt' (hit Ctrl-space and enter mean in the search field )

 

Faster systems use a Model of  the cantilever 😉

 

Or measure the frequency and calc the load 😉

 

The input range of your analog input depends on the capabilities and the setup of your input device. Which one are you using?

 

Another way is a x4 amplifier for your sensor, to scale your 2.5V senor output to the 10V input of your input, but that will add another source of noise and uncertaincy ...

 

 

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 3 of 7
(2,865 Views)

Using USB 6008. Recording 1 sample on demand. USB 6008 has rate of 10kS/s. Can you provide some examples? Thanks!

I may not be perfect, but I'm all I got!
0 Kudos
Message 4 of 7
(2,850 Views)

Yes you can use the mean to average your data to remove oscillation.  You can also create a scale in MAX to range your analog input from 0-2.5v to 0-5v.

0 Kudos
Message 5 of 7
(2,840 Views)

When using 1 channel and 1 sample read, would the Mean point by point function help? I have it set at 25 samples and using the mean ptbypt. Some examples show Median ptbypt as a better option. Would this help eliminating rapid value changing on analog inpouts? Any other filtering method suggestions?

I may not be perfect, but I'm all I got!
0 Kudos
Message 6 of 7
(2,804 Views)

I'm no pro but I just tried the mean ptbypt and fail to see how it works.  I also have never tried teh Median ptbypt.  I always use the mean.vi which averages an array of values.  So what you want to do is build an array of values with a for loop and you can play with the number of loops (size of array) to see how it reacts.  Also, I should warn you that in Max you can specify how many samples to grab at once.  With the 6008, there are issues with the onboard buffer freezing the hardware.  The solution seems to be to use on demand samples which basically gets one sample every time your program requests one.  This way there is no buffer filling.  I will attach a small project I did a few months ago which reads in a load cell signal.  It displays how I used the mean.  It is also set up to start recording to a excel file starting at time 00:00:000.  This is why you see subtraction on the timestamps (also a pause function).  Maybe this will help but maybe you are far more advanced then me.

 

Regards

Matt

0 Kudos
Message 7 of 7
(2,789 Views)