06-24-2011 12:10 AM
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
06-24-2011 12:20 AM
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!
06-24-2011 06:40 AM
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 ...
06-24-2011 10:44 AM
Using USB 6008. Recording 1 sample on demand. USB 6008 has rate of 10kS/s. Can you provide some examples? Thanks!
06-24-2011 02:19 PM
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.
06-27-2011 05:48 PM
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?
06-28-2011 07:30 AM
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