View unanswered posts | View active topics It is currently Sat Jul 12, 2014 12:38 pm






Reply to topic  [ 6 posts ] 
Joystick Accelerometer error ( I don't even... ) 
Author Message
Rookie

Joined: Sun Oct 09, 2011 10:35 pm
Posts: 2
Post Joystick Accelerometer error ( I don't even... )
So lately I have been messing around with the joystick accelerometer to make something with it, but the amount of bizarre noise that I get from it is absolutely ridiculous. You might be thinking "well, all sensors like that pretty much have a bit of random noise," which I know, but the noise I am talking about is a bit different.

I have done tests on the outputs of multiple joysticks, and all seem to have the same exact problem, problem being that they spike from 0 to extremely high values. I've taken data from a run of the accelerometer (with the controller sitting still) and plotted it in excel.

Image

I've plotted both x and y on the same graph.
Frequently, the data from X spikes from 0 to 127 and -127, as well as frequently -81, sometimes -61 as well.
Y spikes from zero to -58 and -61.

Does anyone have a solid explanation for this? I've used the vex three axis accelerometers, which have understandable noise, but the joystick accelerometer values just seem like a mess...

Any ideas or explanation is welcome. Thanks!


Sun Oct 09, 2011 11:03 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post Re: Joystick Accelerometer error ( I don't even... )
We have around 20 joysticks that we use for training. Three or four of them get spikes in data similar to what you're seeing, while others behave pretty well. I don't have much insight regarding why this is the case, but I've heard of some folks applying low and high filters, or a "Kalman" filter to help normalize the data.

Hope this helps with your project:
http://en.wikipedia.org/wiki/Kalman_filter
http://snippets.dzone.com/posts/show/11215

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Mon Oct 10, 2011 8:59 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3155
Location: Rotterdam, The Netherlands
Post Re: Joystick Accelerometer error ( I don't even... )
Could you not apply some kind of median filter to this?

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Mon Oct 10, 2011 9:08 am
Profile WWW
Moderator
Moderator
User avatar

Joined: Tue Sep 14, 2010 9:19 pm
Posts: 496
Post Re: Joystick Accelerometer error ( I don't even... )
Quote:
Could you not apply some kind of median filter to this?

I don't think that would work by itself. Look at the space between 15000 ms to around 17500 ms. The values are all very negative even when the sensor isn't moving.

_________________
sudo rm -rf /


Mon Oct 10, 2011 9:19 am
Profile
Rookie

Joined: Sun Oct 09, 2011 10:35 pm
Posts: 2
Post Re: Joystick Accelerometer error ( I don't even... )
Yeah, I decided to try that simplified Kalman filter,
I'm implementing it now.

I'll take some values and see how stable it is once I do.
Maybe even a graph. I like to graph stuff.


Mon Oct 10, 2011 4:51 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3155
Location: Rotterdam, The Netherlands
Post Re: Joystick Accelerometer error ( I don't even... )
If you do get it working with the Kalman filter, you could help a lot of people by publishing your code. Which is what "Co-opetition and gracious professionalism" is all about :)

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Tue Oct 11, 2011 1:50 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.