DSPRelated.com
Forums

Gravity Vector Tracking

Started by Randy Yates May 1, 2013
On Thu, 02 May 2013 09:08:10 -0400, Randy Yates wrote:

> Tim Wescott <tim@seemywebsite.please> writes: > >> On Thu, 02 May 2013 09:23:54 +0200, Christian Gollwitzer wrote: >> >>> Hi Randy, >>> >>> Am 01.05.13 22:22, schrieb Randy Yates: >>>> Vladimir Vassilevsky <nospam@nowhere.com> writes: >>>> >>>>> On 5/1/2013 2:54 PM, Randy Yates wrote: >>>>>> Looking for suggestions or pointers on how to track the gravity >>>>>> vector in 6D data. >>>>>> >>>>>> >>>>> http://en.wikipedia.org/wiki/Equivalence_principle >>>> >>>> Hi Vlad, >>>> >>>> Thanks for that. Are you saying it's impossible? How does a >>>> navigational system account for gravity, e.g.? >>> >>> AFAIK real systems use the Kalman filter to integrate the equations of >>> motion (EOM). Googling for "kalman filter inertia" turns up lots of >>> papers. A friend of mine once tried to integrate the EOM simply by >>> discrete summing of the gravitational vector from his MacBook shock >>> sensor. There was a large drift even only from walking down the >>> hallway and back. >> >> "Kalman" != "magic". Thus, a Kalman filter is not a magic filter, and >> is bound by the laws of physics. >> >> If all you have is inertial sensors, then the whole "Kalman filter" >> design exercise boils down to integrating the outputs of the inertial >> sensors in the obvious way. It does work, over a time span determined >> by the sensor accuracy. Sensors accurate enough to work on trips >> between continents are orders of magnitude more accurate (and more >> expensive) than anything you'll find inside an Apple product. >> >> Given inertial sensors _and_ some sort of external position fixes, such >> as GPS or other radio navigational aids, sightings of landmarks, or >> astronomical sightings, one can usefully develop a Kalman filter that >> is more than just a simple exercise in basic physical modeling. > > Right. As I read, it seems the main use of Kalman filters is in Aided > INS, in which there is some other information input to the filter > besides the usual 6.
Exactly. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
On Thu, 02 May 2013 09:08:38 -0400, Randy Yates wrote:

> Tim Wescott <tim@seemywebsite.please> writes: > >> On Wed, 01 May 2013 16:22:31 -0400, Randy Yates wrote: >> >>> Vladimir Vassilevsky <nospam@nowhere.com> writes: >>> >>>> On 5/1/2013 2:54 PM, Randy Yates wrote: >>>>> Looking for suggestions or pointers on how to track the gravity >>>>> vector in 6D data. >>>>> >>>>> >>>> http://en.wikipedia.org/wiki/Equivalence_principle >>> >>> Hi Vlad, >>> >>> Thanks for that. Are you saying it's impossible? How does a >>> navigational system account for gravity, e.g.? >> >> Track how, and how accurately? If the motion you're dealing with isn't >> too severe you can get a pretty good estimate of "down" with a >> gyroscopically-stabilized average acceleration vector. Folks have been >> doing it since WW-II with mechanical gyros being servoed around by >> input from mercury tilt switches. > > Is 200G too severe?
That depends on the capabilities of your sensors, how much rotation you're trying to ignore, whether that 200G is from vibration, and if so what the vibrational frequencies are compared to your sampling rate and sensor bandwidths. And, of course, your accuracy requirements. If you are experiencing strong vibration then you're almost certainly going to have rotation as well as linear vibration going on (not to mention relative motion between your sensors -- hoo boy!). Simultaneous rotation and acceleration opens the door to an effect called "sculling" that causes apparent bias in accelerometer readings. Rotational vibration opens the door to an effect called "coning" ("cone-ing") which causes apparent bias in gyro readings. This apparent bias, in turn, causes inaccuracies. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
On Thu, 02 May 2013 10:46:18 -0500, Tim Wescott
<tim@seemywebsite.please> wrote:

>On Thu, 02 May 2013 09:08:38 -0400, Randy Yates wrote: > >> Tim Wescott <tim@seemywebsite.please> writes: >> >>> On Wed, 01 May 2013 16:22:31 -0400, Randy Yates wrote: >>> >>>> Vladimir Vassilevsky <nospam@nowhere.com> writes: >>>> >>>>> On 5/1/2013 2:54 PM, Randy Yates wrote: >>>>>> Looking for suggestions or pointers on how to track the gravity >>>>>> vector in 6D data. >>>>>> >>>>>> >>>>> http://en.wikipedia.org/wiki/Equivalence_principle >>>> >>>> Hi Vlad, >>>> >>>> Thanks for that. Are you saying it's impossible? How does a >>>> navigational system account for gravity, e.g.? >>> >>> Track how, and how accurately? If the motion you're dealing with isn't >>> too severe you can get a pretty good estimate of "down" with a >>> gyroscopically-stabilized average acceleration vector. Folks have been >>> doing it since WW-II with mechanical gyros being servoed around by >>> input from mercury tilt switches. >> >> Is 200G too severe? > >That depends on the capabilities of your sensors, how much rotation >you're trying to ignore, whether that 200G is from vibration, and if so >what the vibrational frequencies are compared to your sampling rate and >sensor bandwidths. > >And, of course, your accuracy requirements. > >If you are experiencing strong vibration then you're almost certainly >going to have rotation as well as linear vibration going on (not to >mention relative motion between your sensors -- hoo boy!). Simultaneous >rotation and acceleration opens the door to an effect called "sculling" >that causes apparent bias in accelerometer readings. Rotational >vibration opens the door to an effect called "coning" ("cone-ing") which >causes apparent bias in gyro readings. This apparent bias, in turn, >causes inaccuracies.
Just shaking an accelerometer will cause a bias shift. This is called "vibration rectification".
On 5/2/2013 11:54 AM, Spehro Pefhany wrote:
> On Thu, 02 May 2013 10:46:18 -0500, Tim Wescott > <tim@seemywebsite.please> wrote: > >> On Thu, 02 May 2013 09:08:38 -0400, Randy Yates wrote: >> >>> Tim Wescott <tim@seemywebsite.please> writes: >>> >>>> On Wed, 01 May 2013 16:22:31 -0400, Randy Yates wrote: >>>> >>>>> Vladimir Vassilevsky <nospam@nowhere.com> writes: >>>>> >>>>>> On 5/1/2013 2:54 PM, Randy Yates wrote: >>>>>>> Looking for suggestions or pointers on how to track the gravity >>>>>>> vector in 6D data. >>>>>>> >>>>>>> >>>>>> http://en.wikipedia.org/wiki/Equivalence_principle >>>>> >>>>> Hi Vlad, >>>>> >>>>> Thanks for that. Are you saying it's impossible? How does a >>>>> navigational system account for gravity, e.g.? >>>> >>>> Track how, and how accurately? If the motion you're dealing with isn't >>>> too severe you can get a pretty good estimate of "down" with a >>>> gyroscopically-stabilized average acceleration vector. Folks have been >>>> doing it since WW-II with mechanical gyros being servoed around by >>>> input from mercury tilt switches. >>> >>> Is 200G too severe? >> >> That depends on the capabilities of your sensors, how much rotation >> you're trying to ignore, whether that 200G is from vibration, and if so >> what the vibrational frequencies are compared to your sampling rate and >> sensor bandwidths. >> >> And, of course, your accuracy requirements. >> >> If you are experiencing strong vibration then you're almost certainly >> going to have rotation as well as linear vibration going on (not to >> mention relative motion between your sensors -- hoo boy!). Simultaneous >> rotation and acceleration opens the door to an effect called "sculling" >> that causes apparent bias in accelerometer readings. Rotational >> vibration opens the door to an effect called "coning" ("cone-ing") which >> causes apparent bias in gyro readings. This apparent bias, in turn, >> causes inaccuracies. > > Just shaking an accelerometer will cause a bias shift. This is called > "vibration rectification".
Precision accelerometers use feedback that keeps them at zero state. The output is compensation signal from the feedback loop. That cancels non-linear effects such as mechanical rectification. Vladimir Vassilevsky DSP and Mixed Signal Designs www.abvolt.com
Am 01.05.2013 21:54, schrieb Randy Yates:
> Looking for suggestions or pointers on how to track the gravity vector > in 6D data.
I'm assuming you mean 6 degrees of freedom, 3 rotation rate sensors and 3 accelerometers. Yes, measuring the gravity vector is simple in this case unless your sensors are in a free fall for a longer time. ;-) These days the sensor chips can do this themselves. It's called "sensor fusion". The result of sensor fusion is a separation of "linear acceleration" and "gravity". Without rotation rate sensors you can only lowpass filter the accelerometer outputs. This will make your gravity vector thingy respond very slowly. This is where the rotation rate sensors become interesting. They allow you to map object coordinates to a more or less stable world coordinate system (there is a bit of drift but it does not matter for this application). You just track the orientation using the gyroscopes (check out Rodrigues' rotation formular for this). Then, you map the accelerometer data into this "more stable world coordinate system", do the lowpass filtering there and transform it back again. What you get is a vector in object coordinates that always points straight to the sky. If you want a vector that points towards the ground you just have to negate it. Done. HTH
Am 01.05.2013 22:22, schrieb Randy Yates:
> Thanks for that. Are you saying it's impossible? How does a navigational > system account for gravity, e.g.?
You mean how a cheap-inertial-sensor system tracks the position? It does not. It's very unreliable. There are a lot of error sources. IF you don't account for the orientation drift the error in position will grow cubically with time. If you account for the orientation's drift in the up/down direction but are still off to a tiny angle (which is possible to some extent) then, the best you can do is an error in position that grows only quadratically with time. If you get your orientation perfectly (no bias, which is really hard), the error in position will grow like O(t^1.5) which is what you would expect if you integrate a random walk one more time. I tried this and was not that happy with the results I got. See https://www.youtube.com/watch?v=0mxQ0c1AvMI Note: I did some "cheating" there of the following kind; speed = speed*0.999; position = position*0.999; about 600 times in a second so that the cube is still visible most of the time. Otherwise it would run away pretty quickly. There is something you can do if you are willing to mount these kinds of sensors onto your shoe. It's called ZUPT: zero update. The idea is that it's pretty easy to detect the steps and you can rely on the fact that right before a step starts and right after it ends the velocity is known to be zero. This will avoid the drift in speed. Cheers! SG
Am 02.05.2013 19:17, schrieb SG:
> Am 01.05.2013 22:22, schrieb Randy Yates: >> Thanks for that. Are you saying it's impossible? How does a navigational >> system account for gravity, e.g.? > > You mean how a cheap-inertial-sensor system tracks the position? It does > not. It's very unreliable. There are a lot of error sources.
And of course, calibration has to be very accurate. Unfortunately rotation rate sensors tend to be very temperature sensitive as far as I can tell. The chip I used (MPU6050) also includes a temperature sensor. So, one could try to calibrate the rotation rate sensors at different temperatures, and interpolate between different "calibrations" based on the actual temperature. The kind of calibration I did tries to estimate a bias and a scale factor. So, I'm assuming that there is a affine linear relationship between the actual rotation speed / acceleration and what the sensors tell me. HTH
On 5/2/2013 12:29 PM, SG wrote:
> Am 02.05.2013 19:17, schrieb SG: >> Am 01.05.2013 22:22, schrieb Randy Yates: >>> Thanks for that. Are you saying it's impossible? How does a navigational >>> system account for gravity, e.g.? >> >> You mean how a cheap-inertial-sensor system tracks the position? It does >> not. It's very unreliable. There are a lot of error sources. > > And of course, calibration has to be very accurate. Unfortunately > rotation rate sensors tend to be very temperature sensitive as far as I > can tell. The chip I used (MPU6050) also includes a temperature sensor.
More and more simpletons are trying to use MEMS accelerometers for INU purpose. Especially the most crappy ones like MPU6050. Before entering into worseless venture, think if you will be able to make a trivial gyrocompas with MEMS.
> So, one could try to calibrate the rotation rate sensors at different > temperatures, and interpolate between different "calibrations" based on > the actual temperature. The kind of calibration I did tries to estimate > a bias and a scale factor. So, I'm assuming that there is a affine > linear relationship between the actual rotation speed / acceleration and > what the sensors tell me.
JFYI: Earth is not inertial system as it is rolling, and g is also not a constant. It is no possible to distinguish between linear acceleration and tilt without side knowledge. As side knowledge, one could use the direction of the Earth magnetic field. This is also prone to errors, however this reference is easy to get. Q: Why it is impossible to have sex in Red Square in Moscow ? A: Because every bystander idiot would be trying to give his invaluable advice. Vladimir Vassilevsky DSP and Mixed Signal Designs www.abvolt.com
On Thu, 02 May 2013 12:54:48 -0400, Spehro Pefhany wrote:

> On Thu, 02 May 2013 10:46:18 -0500, Tim Wescott > <tim@seemywebsite.please> wrote: > >>On Thu, 02 May 2013 09:08:38 -0400, Randy Yates wrote: >> >>> Tim Wescott <tim@seemywebsite.please> writes: >>> >>>> On Wed, 01 May 2013 16:22:31 -0400, Randy Yates wrote: >>>> >>>>> Vladimir Vassilevsky <nospam@nowhere.com> writes: >>>>> >>>>>> On 5/1/2013 2:54 PM, Randy Yates wrote: >>>>>>> Looking for suggestions or pointers on how to track the gravity >>>>>>> vector in 6D data. >>>>>>> >>>>>>> >>>>>> http://en.wikipedia.org/wiki/Equivalence_principle >>>>> >>>>> Hi Vlad, >>>>> >>>>> Thanks for that. Are you saying it's impossible? How does a >>>>> navigational system account for gravity, e.g.? >>>> >>>> Track how, and how accurately? If the motion you're dealing with >>>> isn't too severe you can get a pretty good estimate of "down" with a >>>> gyroscopically-stabilized average acceleration vector. Folks have >>>> been doing it since WW-II with mechanical gyros being servoed around >>>> by input from mercury tilt switches. >>> >>> Is 200G too severe? >> >>That depends on the capabilities of your sensors, how much rotation >>you're trying to ignore, whether that 200G is from vibration, and if so >>what the vibrational frequencies are compared to your sampling rate and >>sensor bandwidths. >> >>And, of course, your accuracy requirements. >> >>If you are experiencing strong vibration then you're almost certainly >>going to have rotation as well as linear vibration going on (not to >>mention relative motion between your sensors -- hoo boy!). Simultaneous >>rotation and acceleration opens the door to an effect called "sculling" >>that causes apparent bias in accelerometer readings. Rotational >>vibration opens the door to an effect called "coning" ("cone-ing") which >>causes apparent bias in gyro readings. This apparent bias, in turn, >>causes inaccuracies. > > Just shaking an accelerometer will cause a bias shift. This is called > "vibration rectification".
That too. And gyros are sensitive to vibration, and, and, and. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
On Thu, 02 May 2013 12:06:28 -0500, Vladimir Vassilevsky wrote:

> On 5/2/2013 11:54 AM, Spehro Pefhany wrote: >> On Thu, 02 May 2013 10:46:18 -0500, Tim Wescott >> <tim@seemywebsite.please> wrote: >> >>> On Thu, 02 May 2013 09:08:38 -0400, Randy Yates wrote: >>> >>>> Tim Wescott <tim@seemywebsite.please> writes: >>>> >>>>> On Wed, 01 May 2013 16:22:31 -0400, Randy Yates wrote: >>>>> >>>>>> Vladimir Vassilevsky <nospam@nowhere.com> writes: >>>>>> >>>>>>> On 5/1/2013 2:54 PM, Randy Yates wrote: >>>>>>>> Looking for suggestions or pointers on how to track the gravity >>>>>>>> vector in 6D data. >>>>>>>> >>>>>>>> >>>>>>> http://en.wikipedia.org/wiki/Equivalence_principle >>>>>> >>>>>> Hi Vlad, >>>>>> >>>>>> Thanks for that. Are you saying it's impossible? How does a >>>>>> navigational system account for gravity, e.g.? >>>>> >>>>> Track how, and how accurately? If the motion you're dealing with >>>>> isn't too severe you can get a pretty good estimate of "down" with a >>>>> gyroscopically-stabilized average acceleration vector. Folks have >>>>> been doing it since WW-II with mechanical gyros being servoed around >>>>> by input from mercury tilt switches. >>>> >>>> Is 200G too severe? >>> >>> That depends on the capabilities of your sensors, how much rotation >>> you're trying to ignore, whether that 200G is from vibration, and if >>> so what the vibrational frequencies are compared to your sampling rate >>> and sensor bandwidths. >>> >>> And, of course, your accuracy requirements. >>> >>> If you are experiencing strong vibration then you're almost certainly >>> going to have rotation as well as linear vibration going on (not to >>> mention relative motion between your sensors -- hoo boy!). >>> Simultaneous rotation and acceleration opens the door to an effect >>> called "sculling" that causes apparent bias in accelerometer readings. >>> Rotational vibration opens the door to an effect called "coning" >>> ("cone-ing") which causes apparent bias in gyro readings. This >>> apparent bias, in turn, causes inaccuracies. >> >> Just shaking an accelerometer will cause a bias shift. This is called >> "vibration rectification". > > Precision accelerometers use feedback that keeps them at zero state. The > output is compensation signal from the feedback loop. That cancels > non-linear effects such as mechanical rectification.
What I failed to point out, and what Spehro is alluding to, is that any inertial sensor you get is going to have problems. There's a wide range of sensors out there, with ever-increasing cost and ever-increasing accuracy (and ever-increasing scrutiny from the authorities, once you get up to ones good enough to use in tactical missiles). iPhone accelerometers are toys compared to the force-balance ones that Vladimir is describing. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com