I've been working on calibrating my CH Robotics UM6-LT IMU for the last
couple days and am continuing to have problems getting rid of continuous
drift in the Euler angles. I heard through the grape vine that others are
successfully using this IMU to balance robots and I'm curious if there are
any tricks or tips to be had.
I've gone through the Magnometer calibration process while the sensor is in
my robot (and being rotated around in a spherical manner) and seem to be
getting about the same calibration constants each time (indicating good
values). I'm also only calibrating the gyro bias each time I power the
robot (as appose to doing a full gyro re-calibration that others on the
forums seem to have trouble with). I've also tried reducing the diagonal
terms of the process noise matrix in order to reduce the influence of
the accelerometers on the angle estimation (from 0.1 down to 0.05).
I'm trying to use this sensor in my balancing robot, the goal of which is
to handle mild off road terrain (my thesis project at CalPoly). The next
step I plan to take is to measure a temperature compensation coefficient to
reduce gyro drift. I'm also working on implementing velocity control in
order to periodically reset my up vector whenever the robot is trying to
remain stationary. Finally I'm going to re-attach the sensor as close as
possible to the center of rotation of the robot, to try and
reduce accelerometer over saturation.
Thank You for any help you can give,
Tyson Messori
Mechanical Engineering Master Student
California Polytechnic University, SLO
Hi tyson, I'm building a similar robot, although it's not meant for off-road terrain. I've successfully used the ch-um6 to balance it, but I'm also noticing what seems like gyro drift influencing the Euler angles in some cases. When I get back to my workbench I'll be implementing sub-routines for UM6_ZERO_GYROS, and UM6_RESET_EKF.
At any rate, I think what is happening in my case has to do with something I read in the UM6 datasheet about the EKF failing when the IMU is at 90 degrees. I'm going to adjust the orientation of the UM6 on my chasis, and I'll respond again once I've ran some tests. Here is what I read in the data sheet: " In Euler Angle estimation mode, there is a singularity in pitch angle at +/- 90 degrees. This means that, at 90 degrees, the orientation of the sensor can be represented in more than one way, and the estimation algorithm fails. This is a fundamental limitation of an Euler Angle attitude representation, and can be corrected only by adopting a different representation. "
Thanks, Fabio Garcia
PS: If you were able to correct this issue, please let me know what you did. Thanks!
We were able to achieve some level of accuracy with the IMU sitting
parallel with the ground in it's balanced state by going through a process
of resetting the EKF upon startup, then waiting for thirty seconds while
the robot sits vertically for the EKF to stabilize It still drifts after
a few minutes, so we still need to work on it. I don't think we're running
into the issue you're talking about regarding Eular angles, as the robot
primarily sits around the 0 degree mark (I believe we're using the X
rotation angle). I hope to hear more about your experiments to achieve
more stable and accurate results.
Sincerely,
Tyson Messori
Senior Mechanical Engineer
Santa Barbara Infrared (SBIR)
On Mon, Nov 26, 2012 at 11:45 AM, Fabio Garcia <fa...@blastpress.com> wrote:
> Hi tyson, I'm building a similar robot, although it's not meant for
> off-road terrain. I've successfully used the ch-um6 to balance it, but I'm
> also noticing what seems like gyro drift influencing the Euler angles in
> some cases. When I get back to my workbench I'll be implementing
> sub-routines for UM6_ZERO_GYROS, and UM6_RESET_EKF.
> At any rate, I think what is happening in my case has to do with something
> I read in the UM6 datasheet about the EKF failing when the IMU is at 90
> degrees. I'm going to adjust the orientation of the UM6 on my chasis, and
> I'll respond again once I've ran some tests. Here is what I read in the
> data sheet:
> " In Euler Angle estimation mode, there is a singularity in pitch angle at
> +/- 90 degrees. This means that, at 90 degrees, the orientation of the
> sensor can be represented in more than one way, and the estimation
> algorithm fails. This is a fundamental limitation of an Euler Angle
> attitude representation, and can be corrected only by adopting a different
> representation. "
> Thanks,
> Fabio Garcia
> PS: If you were able to correct this issue, please let me know what you
> did. Thanks!
> --
> You received this message because you are subscribed to the Google Groups
> "HomeBrew Robotics Club" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hbrobotics/-/xCsXh3emqdMJ.
> To post to this group, send email to hbrobotics@googlegroups.com.
> To unsubscribe from this group, send email to
> hbrobotics+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hbrobotics?hl=en.
Fabio,
First, most of my experience was with the older ch6 IMU from chrobotics.
With this device I was able to balance and track heading without drift. I
recently started a new project with the um6 and I found the yaw drift was
unusable. Working with CHrobotics they Identified the magnatometer axis
was reversed for the new chip they were using. They send me a new firmware
load and my yaw seams to hold well. If you have a relatively new unit you
may wast to contact CHrobotics to see if there is a firmward update
avaialble.
One the ch6 I did implement a reset ekf and zero gyros after a bad fall. It
would often trip the singularity. So I have also implemented them on the
UM6. But the um6 should be less sensitive the to singularity sense it is
recreating the Euler angles from the quarterions and they are
not supposed to be sensitive to the singularity.
I also had to implement some additional magnetic compensation tables. After
running magnetometer calibrations with the unit mounted in the robot I was
still not able to get evenly spaced yaw angles. So I added a table with
corrections every 45 degrees and a linear interpolation in between. I also
added a similar compensation table for vertical position. for each yaw
direction the reported vertical position was slightly off. So again a table
with corrections every 45 degrees and linear interpolation. This error
is pretty small and was only added to make spinning smoother.
On Mon, Nov 26, 2012 at 11:45 AM, Fabio Garcia <fa...@blastpress.com> wrote:
> Hi tyson, I'm building a similar robot, although it's not meant for
> off-road terrain. I've successfully used the ch-um6 to balance it, but I'm
> also noticing what seems like gyro drift influencing the Euler angles in
> some cases. When I get back to my workbench I'll be implementing
> sub-routines for UM6_ZERO_GYROS, and UM6_RESET_EKF.
> At any rate, I think what is happening in my case has to do with something
> I read in the UM6 datasheet about the EKF failing when the IMU is at 90
> degrees. I'm going to adjust the orientation of the UM6 on my chasis, and
> I'll respond again once I've ran some tests. Here is what I read in the
> data sheet:
> " In Euler Angle estimation mode, there is a singularity in pitch angle at
> +/- 90 degrees. This means that, at 90 degrees, the orientation of the
> sensor can be represented in more than one way, and the estimation
> algorithm fails. This is a fundamental limitation of an Euler Angle
> attitude representation, and can be corrected only by adopting a different
> representation. "
> Thanks,
> Fabio Garcia
> PS: If you were able to correct this issue, please let me know what you
> did. Thanks!
> --
> You received this message because you are subscribed to the Google Groups
> "HomeBrew Robotics Club" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hbrobotics/-/xCsXh3emqdMJ.
> To post to this group, send email to hbrobotics@googlegroups.com.
> To unsubscribe from this group, send email to
> hbrobotics+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hbrobotics?hl=en.
Chuck, Tyson, Thank you for your insight. I was able to achieve some measure of stability earlier today by repositioning the sensor within my robot so that it sat at a 45 degree angle along the x axis. I'm pretty sure the problem I am seeing now has to do with tweaking the PID control loop. Adjusting the gains I saw improvement, but soon after I started messing with it I caused some sort of bad feedback loop which in turn caused the motors to stall and fried the motor driver. In hindsight, the entire setup was is way too bulky for the 2A continuous driver I was using. I was able though to take some video before they fried, which I've uploaded (http://fabiogarcia.com/BALIHOO.MOV http://fabiogarcia.com/BALIHOO2.MOV). I'm going to order a new controller next week that comes with a driver that can run up to 30A continuous (pololu VNH2SP30), so I should be in good shape then.
On Tuesday, November 27, 2012 12:52:14 AM UTC-5, Chuck Taylor wrote:
> Fabio, > First, most of my experience was with the older ch6 IMU from chrobotics. > With this device I was able to balance and track heading without drift. I > recently started a new project with the um6 and I found the yaw drift was > unusable. Working with CHrobotics they Identified the magnatometer axis > was reversed for the new chip they were using. They send me a new firmware > load and my yaw seams to hold well. If you have a relatively new unit you > may wast to contact CHrobotics to see if there is a firmward update > avaialble.
> One the ch6 I did implement a reset ekf and zero gyros after a bad fall. > It would often trip the singularity. So I have also implemented them on the > UM6. But the um6 should be less sensitive the to singularity sense it is > recreating the Euler angles from the quarterions and they are > not supposed to be sensitive to the singularity.
> I also had to implement some additional magnetic compensation tables. > After running magnetometer calibrations with the unit mounted in the robot > I was still not able to get evenly spaced yaw angles. So I added a table > with corrections every 45 degrees and a linear interpolation in between. I > also added a similar compensation table for vertical position. for each yaw > direction the reported vertical position was slightly off. So again a table > with corrections every 45 degrees and linear interpolation. This error > is pretty small and was only added to make spinning smoother.
> On Mon, Nov 26, 2012 at 11:45 AM, Fabio Garcia <fa...@blastpress.com<javascript:> > > wrote:
>> Hi tyson, I'm building a similar robot, although it's not meant for >> off-road terrain. I've successfully used the ch-um6 to balance it, but I'm >> also noticing what seems like gyro drift influencing the Euler angles in >> some cases. When I get back to my workbench I'll be implementing >> sub-routines for UM6_ZERO_GYROS, and UM6_RESET_EKF.
>> At any rate, I think what is happening in my case has to do with >> something I read in the UM6 datasheet about the EKF failing when the IMU is >> at 90 degrees. I'm going to adjust the orientation of the UM6 on my chasis, >> and I'll respond again once I've ran some tests. Here is what I read in the >> data sheet: >> " In Euler Angle estimation mode, there is a singularity in pitch angle >> at +/- 90 degrees. This means that, at 90 degrees, the orientation of the >> sensor can be represented in more than one way, and the estimation >> algorithm fails. This is a fundamental limitation of an Euler Angle >> attitude representation, and can be corrected only by adopting a different >> representation. "
>> Thanks, >> Fabio Garcia
>> PS: If you were able to correct this issue, please let me know what you >> did. Thanks!
>> -- >> You received this message because you are subscribed to the Google Groups >> "HomeBrew Robotics Club" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/hbrobotics/-/xCsXh3emqdMJ. >> To post to this group, send email to hbrob...@googlegroups.com<javascript:> >> . >> To unsubscribe from this group, send email to >> hbrobotics+...@googlegroups.com <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/hbrobotics?hl=en.
Also, here is my code. I'm a software developer my trade, and I'm fairly new to all of this low-level stuff, so I'd really much appreciate any tips or pointers on my code.
On Tuesday, November 27, 2012 10:25:30 PM UTC-5, Fabio Garcia wrote:
> Chuck, Tyson, > Thank you for your insight. I was able to achieve some measure of > stability earlier today by repositioning the sensor within my robot so that > it sat at a 45 degree angle along the x axis. I'm pretty sure the problem I > am seeing now has to do with tweaking the PID control loop. Adjusting the > gains I saw improvement, but soon after I started messing with it I caused > some sort of bad feedback loop which in turn caused the motors to stall and > fried the motor driver. In hindsight, the entire setup was is way too bulky > for the 2A continuous driver I was using. I was able though to take some > video before they fried, which I've uploaded ( > http://fabiogarcia.com/BALIHOO.MOVhttp://fabiogarcia.com/BALIHOO2.MOV). > I'm going to order a new controller next week that comes with a driver that > can run up to 30A continuous (pololu VNH2SP30), so I should be in good > shape then.
> Thanks again, > Fabio
> On Tuesday, November 27, 2012 12:52:14 AM UTC-5, Chuck Taylor wrote:
>> Fabio, >> First, most of my experience was with the older ch6 IMU from chrobotics. >> With this device I was able to balance and track heading without drift. I >> recently started a new project with the um6 and I found the yaw drift was >> unusable. Working with CHrobotics they Identified the magnatometer axis >> was reversed for the new chip they were using. They send me a new firmware >> load and my yaw seams to hold well. If you have a relatively new unit you >> may wast to contact CHrobotics to see if there is a firmward update >> avaialble.
>> One the ch6 I did implement a reset ekf and zero gyros after a bad fall. >> It would often trip the singularity. So I have also implemented them on the >> UM6. But the um6 should be less sensitive the to singularity sense it is >> recreating the Euler angles from the quarterions and they are >> not supposed to be sensitive to the singularity.
>> I also had to implement some additional magnetic compensation tables. >> After running magnetometer calibrations with the unit mounted in the robot >> I was still not able to get evenly spaced yaw angles. So I added a table >> with corrections every 45 degrees and a linear interpolation in between. I >> also added a similar compensation table for vertical position. for each yaw >> direction the reported vertical position was slightly off. So again a table >> with corrections every 45 degrees and linear interpolation. This error >> is pretty small and was only added to make spinning smoother.
>> On Mon, Nov 26, 2012 at 11:45 AM, Fabio Garcia <fa...@blastpress.com>wrote:
>>> Hi tyson, I'm building a similar robot, although it's not meant for >>> off-road terrain. I've successfully used the ch-um6 to balance it, but I'm >>> also noticing what seems like gyro drift influencing the Euler angles in >>> some cases. When I get back to my workbench I'll be implementing >>> sub-routines for UM6_ZERO_GYROS, and UM6_RESET_EKF.
>>> At any rate, I think what is happening in my case has to do with >>> something I read in the UM6 datasheet about the EKF failing when the IMU is >>> at 90 degrees. I'm going to adjust the orientation of the UM6 on my chasis, >>> and I'll respond again once I've ran some tests. Here is what I read in the >>> data sheet: >>> " In Euler Angle estimation mode, there is a singularity in pitch angle >>> at +/- 90 degrees. This means that, at 90 degrees, the orientation of the >>> sensor can be represented in more than one way, and the estimation >>> algorithm fails. This is a fundamental limitation of an Euler Angle >>> attitude representation, and can be corrected only by adopting a different >>> representation. "
>>> Thanks, >>> Fabio Garcia
>>> PS: If you were able to correct this issue, please let me know what you >>> did. Thanks!
>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "HomeBrew Robotics Club" group. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msg/hbrobotics/-/xCsXh3emqdMJ. >>> To post to this group, send email to hbrob...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> hbrobotics+...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/hbrobotics?hl=en.