Declination angle

Hi,

I?m 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 don?t know how. I?ve thought that by double integrating I can get them, but it turns out that it doesn?t 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

formatting link
Community of the Net Web and RSS access to your favorite newsgroup - comp.robotics.misc - 19712 messages and counting! ##-----------------------------------------------##

Reply to
LV
Loading thread data ...

Hi,

I?m 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 don?t know how. I?ve thought that by double integrating I can get them, but it turns out that it doesn?t 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

formatting link
Community of the Net Web and RSS access to your favorite newsgroup - comp.robotics.misc - 19712 messages and counting! ##-----------------------------------------------##

Reply to
LV

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 =3D 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

Reply to
Roy

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

Reply to
Jim Hewitt

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 > 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".

Reply to
Curt Welch

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

Reply to
Roy

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

formatting link
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

Reply to
John Nagle

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.