Unacceptable orientation estimation error using accelerometer and gyroscope data with insEKF

1 次查看(过去 30 天)
Hello,
I am using insEKF function for my thesis to estimate orientation and position based on various sensors which I have logged from X-plane plugins. Hence I am using accelerometer data from X-plane dataRef in local OGL frame ("sim/flightmodel/position/local_a:z") and gyroscope dataRef in the flight frame ("sim/flightmodel/position/Q-P-Rrad") which give me linear acceleration in mtr/sec2 and angular rotations in rad/sec respectively .Hence, I am facing high estimation error even though I am using GPS data as well.My question is whether the problem coming from my filter tuning or data reference from coming from X-plane?(I am using tuner option to tune the filter, it helps but even after the tuning by more than 20 iteration the orientation estimation is higher than 10 degree using all accelerometer, gyro and GPS data)
Any help or comments will be highly appreciated.
*Xplane Local OGL frame : OpenGL (or ‘local’) coordinates are cartesian and move with the aircraft. They offer more precision and are used for 3-d OpenGL drawing. The X axis is aligned east-west with positive X meaning east. The Y axis is aligned straight up and down at the point 0,0,0 (but since the Earth is round it is not truly straight up and down at other points). The Z axis is aligned north-south at 0, 0, 0 with positive Z pointing south (but since the Earth is round it isn’t exactly north-south as you move east or west of 0, 0, 0). One unit is one meter and the point 0,0,0 is on the surface of the Earth at sea level for some latitude and longitude picked by the sim such that the user’s aircraft is reasonably nearby.

回答(1 个)

Prateekshya
Prateekshya 2023-12-21
Hi Amir,
It looks like you are dealing with sensor fusion and estimation problems. You can try the following things.
Ensure that all sensor data is transformed into a consistent coordinate frame before being used in the filter. Verify that the sensors are properly calibrated. If the insEKF expects data in a specific frame (e.g., a body frame or an inertial frame), you'll need to apply the necessary rotations and translations to the X-plane data to match this expectation.
The tuning of the filter involves setting the process noise and measurement noise covariance matrices. These matrices should accurately reflect the expected noise levels of your sensors and the dynamic model. The initial state estimate and initial state covariance can also impact the performance of the filter. The dynamic model used in the filter should accurately represent the system's behavior. Any discrepancies between the model and the actual system dynamics can lead to estimation errors.
Check the quality of the sensor data. Preprocessing the sensor data with low-pass filtering may help remove high-frequency noise that could be affecting the estimation. The way GPS data is integrated into the filter can significantly affect the estimation. Different sensors might have different update rates. Make sure the filter can handle asynchronous measurements properly, or resample the data to a common rate if necessary.
To debug properly, test the filter with individual sensors (just accelerometers, just gyroscopes, just GPS) to see if one sensor's data is causing more issues than others. Try running the filter with simulated sensor data where you know the true state. Visualize the raw sensor data, the estimated state, and the true state (if available) to identify any patterns or discrepancies.
I hope this helps!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by