Author Topic: MPU-9150 data quality  (Read 4552 times)

0 Members and 1 Guest are viewing this topic.

Offline jrandjTopic starter

  • Newbie
  • Posts: 3
MPU-9150 data quality
« on: May 18, 2014, 08:20:34 am »
Hi all,

I'm trying to use Madgwick’s IMU algorithm to obtain roll, pitch and yaw from my MPU-9150. The data I've gathered was rotating the sensor +- 90 degrees about each axis, but I can't seem to get any usable output from this algorithm. I've attached a picture which contains the example Euler angles, which look what I'm expecting, compared to the ones I get for my data. I've ensured that the units are the same across the two sets of data, and all I've done to my raw data is low pass filtering.

My gyroscope/magnetometer data definitely doesn't look as clean as the example data. Has anyone had similar experiences with this IMU?

Thanks
 

Offline cyr

  • Frequent Contributor
  • **
  • Posts: 252
  • Country: se
Re: MPU-9150 data quality
« Reply #1 on: May 18, 2014, 08:42:44 am »
How have you calibrated the sensors?
 

Offline jrandjTopic starter

  • Newbie
  • Posts: 3
Re: MPU-9150 data quality
« Reply #2 on: May 18, 2014, 09:07:40 am »
I'm not 100% sure on the details (I didn't write the firmware), as far as I know it's the standard 'don't move the device during calibration' and it just zeros all the measurements. There is a calibration procedure though which I did before recording the data. Would this be a useful avenue to look into?
 

Offline cyr

  • Frequent Contributor
  • **
  • Posts: 252
  • Country: se
Re: MPU-9150 data quality
« Reply #3 on: May 18, 2014, 10:08:06 am »
Well I don't know anything about the specific IMU you are using, but a single point calibration doesn't seem like enough to get useful data from a magnetometer. It can only zero out the gyro bias and provide a level reference.
I would have thought at least there would be a procedure like point the sensor up/down/left/right/forward/back, to calculate both a bias and scale for each axis.

I may be talking out of my arse though...
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: MPU-9150 data quality
« Reply #4 on: May 18, 2014, 10:22:42 am »
you are correct there cyr, with just about every other imu you have to correct for offset and scale on all 3 accelerometer axis's first, then rotate in a random direction to build up a point map to correct the mag, then with both of those correct you can test for scale errors on the gyro (high pass filtering in the algorithms used generally mean there is no zero issue,

There calibration would be the zero correction for the accelerometer and gyros, which for a basic imu (only controlling roll and pitch) you could likely get away with,

When you dig deeper into the subject and tack on gps sources, barometers and optical flow meters, the equations become things that you will need to teach yourself university level math to start to crack :/.. (quaternions! and rotation matrices! )
 

Offline jrandjTopic starter

  • Newbie
  • Posts: 3
Re: MPU-9150 data quality
« Reply #5 on: May 18, 2014, 11:06:54 am »
Thanks guys, I will look into the calibration firmware and post an update.
 

Offline FreddyVictor

  • Regular Contributor
  • *
  • Posts: 164
  • Country: gb
Re: MPU-9150 data quality
« Reply #6 on: May 18, 2014, 03:59:49 pm »
seem to remember there are 2 versions of Madgwick code: one with, one without magnetometer

if you're using the mag, then it must be calibrated so it might be easier to get the version w/o the mag working 1st - small steps n all that  ;)
calibration of gyro must also be done but is straightforward.

The main issue with trying to use 3rd party code is that you must have the sensor orientation (ie rotate causes values to say rise instead of fall) matching what the code expects
but I'm guessing you probably already know this !
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3871
  • Country: de
Re: MPU-9150 data quality
« Reply #7 on: May 18, 2014, 04:02:59 pm »
One comment about the Madgwick's filter - if you are using his original code from the internet, beware - there is a major bug and if you are using it on 64bit machine compiled as a 64bit application, it will fail! If I remember correctly, it was a problem in his hand-optimized square root function replacement or something to that effect which doesn't work in 64bits.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf