Ellipsoid into Sphere Calibration of Acc and Magn
Ellipsoid into Sphere Calibration of Acc and Magn
Hi everyone,
I just released some new code for accelerometer and magnetometer calibration using the Ellipsoid into Sphere technique as described in AN3192 from ST Microsystems.
The code is now on the FreeIMU repository and will become part of the FreeIMU library.
Results are pretty good as you should see from the video.
Code is GPLv3, also available from the link above.
Interested in hearing your opinion and eventually help in including something similar in MultiWii.
Fabio
I just released some new code for accelerometer and magnetometer calibration using the Ellipsoid into Sphere technique as described in AN3192 from ST Microsystems.
The code is now on the FreeIMU repository and will become part of the FreeIMU library.
Results are pretty good as you should see from the video.
Code is GPLv3, also available from the link above.
Interested in hearing your opinion and eventually help in including something similar in MultiWii.
Fabio
Re: Ellipsoid into Sphere Calibration of Acc and Magn
my opinion : "Wahooooooooooooooooooooooooo" looks really great !
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: Ellipsoid into Sphere Calibration of Acc and Magn
Fabio - it looks really good and fast. I hope can beintegrated
Re: Ellipsoid into Sphere Calibration of Acc and Magn
F A N T A S T I C !
Re: Ellipsoid into Sphere Calibration of Acc and Magn
Hey, I worked on porting this calibration approach into an easy to use calibration GUI. Today I completed the alpha version of it, please see http://www.varesano.net/blog/fabio/free ... ersion-out
Re: Ellipsoid into Sphere Calibration of Acc and Magn
This looks very promising. I hope this can bi implemented in mwi code.
Re: Ellipsoid into Sphere Calibration of Acc and Magn
one big drift factor is temperature.... how do you avoid that?
Re: Ellipsoid into Sphere Calibration of Acc and Magn
This is one way of doing it. http://code.google.com/p/itg-3200driver ... etail?id=9
The calibration I released doesn't include temperature compensation, still it's pretty good if you calibrate at the same temperature of usage. I'm doing this work as part of my research on Human-Computer Interaction so I use such sensors in room temperature.. so temp bias are not an huge problem for me.
The calibration I released doesn't include temperature compensation, still it's pretty good if you calibrate at the same temperature of usage. I'm doing this work as part of my research on Human-Computer Interaction so I use such sensors in room temperature.. so temp bias are not an huge problem for me.
Re: Ellipsoid into Sphere Calibration of Acc and Magn
that is true for indoor application....
i just want to point out for multirotor... most of us fly out door in various flight condition... can be as hot as 30~40c in summer.. and also can be as cold as -10~20c in winter...also various humidity level..recalibration each time before flight
(i could be wrong... since i'm not sure if I get the idea right... the biggest problem is the level state in flight is not usually level of state on table... still I could be wrong... cuz im ME and not as familiar with EE and coding)
but.. anyways... it is pretty amazing
i just want to point out for multirotor... most of us fly out door in various flight condition... can be as hot as 30~40c in summer.. and also can be as cold as -10~20c in winter...also various humidity level..recalibration each time before flight
(i could be wrong... since i'm not sure if I get the idea right... the biggest problem is the level state in flight is not usually level of state on table... still I could be wrong... cuz im ME and not as familiar with EE and coding)
but.. anyways... it is pretty amazing
Re: Ellipsoid into Sphere Calibration of Acc and Magn
So this is an external calibration application, correct? You record acc/magnetometer for some time while moving it around (slowly?) and this input combined with some matrix "magic" gives offsets and scale factors? Together with a static calibration over a temperature range it could also get temperature drift and gyro bias/offsets, the only thing missing would be gyro scalefactors which could be derived from slow rotations, too.
Question is: is this more accurate than the factory calibration that the MPU6050 supposedly went through?
P.S.: Cross axis sensitivity and axis alignment shouldn't be much of an issue with the MPU but would be interesting for other sensors. Possible to get this data from the calibration procedure?
Question is: is this more accurate than the factory calibration that the MPU6050 supposedly went through?
P.S.: Cross axis sensitivity and axis alignment shouldn't be much of an issue with the MPU but would be interesting for other sensors. Possible to get this data from the calibration procedure?
Re: Ellipsoid into Sphere Calibration of Acc and Magn
@jy0933 I'm a quadcopter pilot too... I know how different flying conditions can be. Yeah, table level may be different from flying level. This is covered by my calibration approach, as long as you mounted your sensors parallel to the flying level state.
@Sebbi Yeah, that app is to be used on my FreeIMU library, but can be easealy extended with other serial protocols (the gui already has a field for that). Yes, it logs acc and magn values while the users performs a 3D sphere with his sensors. Visual feedback is provided so that the user knows that he is doing the motions correctly. After the process is complete scales and offsets are generated and can be saved to EEPROM or an C header file for later compilation. Yes, temperature is the missing but, as I said, that's not top priority for me. Right, gyro can be scaled using known rotations: I know of researchers doing that on audio turntables with good results.
I'm using MPU6050. These are plots raw uncalibrated data from it.
As you can see, there is no evidence of any factory calibration of these data. See for example the ZX plane. This is supposed to be a pretty perfect circle centered in zero. See how instead it is not centered in zero and looks like an oval.. there isn't any factory calibration, as far as this data shows.
The document from which my calibration has been implemented (google for AN3192) suggests also an approach for sensor misalignment compensation. It didn't look like a major task when I looked into it.
@Sebbi Yeah, that app is to be used on my FreeIMU library, but can be easealy extended with other serial protocols (the gui already has a field for that). Yes, it logs acc and magn values while the users performs a 3D sphere with his sensors. Visual feedback is provided so that the user knows that he is doing the motions correctly. After the process is complete scales and offsets are generated and can be saved to EEPROM or an C header file for later compilation. Yes, temperature is the missing but, as I said, that's not top priority for me. Right, gyro can be scaled using known rotations: I know of researchers doing that on audio turntables with good results.
I'm using MPU6050. These are plots raw uncalibrated data from it.
As you can see, there is no evidence of any factory calibration of these data. See for example the ZX plane. This is supposed to be a pretty perfect circle centered in zero. See how instead it is not centered in zero and looks like an oval.. there isn't any factory calibration, as far as this data shows.
The document from which my calibration has been implemented (google for AN3192) suggests also an approach for sensor misalignment compensation. It didn't look like a major task when I looked into it.
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: Ellipsoid into Sphere Calibration of Acc and Magn
Is it possible the Digital Motion Processor has a calibration routine within it and because we are accessing the Gyro/ACC directly, we are bypassing this firmware?
http://www.invensense.com/mems/gyro/mpu6050.htmlrun-time calibration firmware
Last edited by copterrichie on Wed Oct 31, 2012 1:26 am, edited 1 time in total.
Re: Ellipsoid into Sphere Calibration of Acc and Magn
It could be.. but what can we do about it since there aren't docs about it? (.. that I'm aware of, of course ..)
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: Ellipsoid into Sphere Calibration of Acc and Magn
The developer section of invensense.com has the complete source code they use to access the DMP and the support promised me last week that they are working on written documentation. They would be awefully late for a product that is available for over a year now, but hey ... I wont complain if we don't have to go through their largish codebase anymore. And yes, the DMP has some form of temperature calibration method and you can also set bias/offsets and scalefactors. I don't know if there are factory calibrated values in there somewhere of if you are supposed to set them everytime though
The AN3192 method would be something you do only once for each sensor, right? If a pilot has done this there is only level trim that would need adjustment ... could be interesting.
The AN3192 method would be something you do only once for each sensor, right? If a pilot has done this there is only level trim that would need adjustment ... could be interesting.
Re: Ellipsoid into Sphere Calibration of Acc and Magn
Personally, the more I looked into the DMP the more I understood that it's pretty much marketing vapor words. Too slow, obscure, undocumented, closed to be of any use.
I'm not going to waste time on the DMP anymore.
I'm not going to waste time on the DMP anymore.
Re: Ellipsoid into Sphere Calibration of Acc and Magn
What would improve to a copter this new routine? is it affected by lateral acceleration in angle computation? How fast is it compared with giro-acc CF?