Declination angle

Hi,
Im doing a project for determining the position (declination angle) of a vehicle using Kalman Filter. I have one 3D Accelerator and 3 Gyros on
board. With the help of Kalman Filter I must find the exact position of a working machine(declination of the machine). Therefore I need the initial declination angles. I know that I can get them from the 3D Accelerometer measurements, but I dont know how. Ive thought that by double integrating I can get them, but it turns out that it doesnt work. Is there another way to find them I mean is there some special kind of transformation matrix I can use? After all what I need is just the matrix with the initial declination angles of the machine.
10x
-------------------------------------
##-----------------------------------------------## Delivered via http://www.zonerocket.com / Robotics Community of the Net Web and RSS access to your favorite newsgroup - comp.robotics.misc - 19712 messages and counting! ##-----------------------------------------------##
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Hi,
Im doing a project for determining the position (declination angle) of a vehicle using Kalman Filter. I have one 3D Accelerator and 3 Gyros on board. With the help of Kalman Filter I must find the exact position of a working machine(declination of the machine). Therefore I need the initial declination angles. I know that I can get them from the 3D Accelerometer measurements, but I dont know how. Ive thought that by double integrating I can get them, but it turns out that it doesnt work. Is there another way to find them I mean is there some special kind of transformation matrix I can use? After all what I need is just the matrix with the initial declination angles of the machine.
10x
-------------------------------------
##-----------------------------------------------## Delivered via http://www.zonerocket.com / Robotics Community of the Net Web and RSS access to your favorite newsgroup - comp.robotics.misc - 19712 messages and counting! ##-----------------------------------------------##
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Jun 17, 2:24pm, l_els2002_at_yahoo_dot snipped-for-privacy@foo.com (LV) wrote:

How many angles to you need to measure? Just one? The accelerometer (assuming the sensor is not physically accelerating) gives you the components of the gravity vector w.r.t. the sensor. So if zero degrees is when the z axis reads 1 g and x reads zero gs, and 90 degrees is when z reads 0 and x reads 1 g, then angle = atan2(x,z). If you have more than one angle to measure, if may get trickier depending what you want to do with those angles.
- Roy
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Not possible without a calibration step.
In that double integration, you end up with two constants, one for initial rotation, one for initial position. The gyros can help with the first, but the stating position can't be determined. You can figure out what way is 'down' (net -1g) but the other two axes are not fixed unless you manually orient the machine and then start.
At least, this is what I have figured out in my similar application. I'd love to hear if someone else has figured out a workable solution.
Jim

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Yes, you certainly need something to create the initial calibration.
But as the other post indicated, gravity gives you a calibration if you know the machine is not moving relative to the earth. So if you know at some point that the machine is not in motion, you can set velocity and position to zero and you read the inclination from the accelerometer.
The problem with integrating is that errors accumulates over time so the accuracy of the calculation degrades with time. The longer you run the integration, the less certainly you have with the numbers until at some point, the error dominates and the results become effectively worthless. How fast that happens is just a function of how much error is in your measurements.
Because of that, you must have some way to recalibrate from time to time. It can be as simple as a button which is pushed by a human to indicate the vehicle is not in motion.
More complex solutions can be created by the addition of more sensors - such as GPS if we are talking about a vehicle moving outside. Putting two or three GPS receivers on the same vehicle gives you even more useful data. A arm on a robot can have a home position with a sensor to detect when it's placed back in the starting home position so that once it returns to that location you recalibrate it's location. A train that was traveling on fixed tracks could have a sensor read the current track angle from the ground with a bar code sensors to recalibrate the system every time it passed over that calibration point. Vehicles that have wheels in contact with the ground often include sensors to measure the motion of the wheels. That gives you a direct measure of velocity to work with.
There are many ways to calibrate the system - just depends on what you have to work with in your application. But if all you have is an accelerometer and gyros, you will have to add something else to calibrate the system if you want to know the position or velocity since neither of those sensors directly read either of those values.
If inclination is all you need to know, then you simply need to calibrate for that one measurement - which is possible if you can also sense when the velocity of the vehicle is zero and if you can calibrate the alignment of the sensor itself to the vehicle when it's first built - or if you have some sensor to tell you when the inclination is at some known position like zero.
Below, LV writes:
> I must find the exact position of > a working machine ...
You can NEVER find the exact position. You can only find an approximate position. The addition of more, and better sensors, just makes the approximate answer you have more accurate. The point of the Kalman Filter is to get as much accuracy out of the data you have to work with as possible - not to find the "exact position".

--
Curt Welch http://CurtWelch.Com /
snipped-for-privacy@kcwc.com http://NewsReader.Com /
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Google "accelerometer based inclinometer". and "complementary filter" (the latter may be a solution if you really don't have to use a Kalman filter. Even if you need the KF, what you find will help you understand what you're trying to do without the mathematical complexities of the KF)
- Roy
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
LV wrote:

You have enough sensors there to get attitude. It's a pain to write the code yourself, though. This is hard to do right, but it's been coded successfully many times. It's built into most attitude and heading reference systems (AHRS).
There are open source projects for this, but I have no idea if they're any good. Try
    http://code.google.com/p/openahrs /
Approximately the right stuff is in there.
The general idea is that the accelerometers provide low-frequency "down direction" data with high-frequency error, while the rate gyros provide high-frequency data with low-frequency error. You integrate the gyro data and combine with the accelerometer data, with a filter matched to the properties of both sensors.
This usually has to be done with quaternions, because you can integrate those in 3D.
I used to do this stuff, but it's been years.
                    John Nagle
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.