IMU orientation using AHRS filter

조회 수: 20 (최근 30일)
Adam Levschuk
Adam Levschuk 2020년 8월 22일
댓글: Yanke Sun 2022년 12월 6일
Hello, I am having IMU orientation troubles I am using the AHRS Filter to output Angular Velocity and Quaternions relative to the NED reference frame.
To do this i use the code:
[quaternions, angularVelocity] = ahrsfilter(acc,gyr,mag);
Where acc, gyr, and mag are accelerometer, gyroscope, and magnetometer readings, respectively. Each acc, gyr, and mag are 3xN.
I want to then rotate the sensor signals so they are aligend the the NED refernce frame. I am trying to do this with the following code
for i = length(1:end(acc))
acc(i,:) = rotateframe(quaternions(i),acc(i,:))
gyr(i,:) = rotateframe(quaternions(i),gyr(i,:))
end
after i rotate the accelerometer and gyroscope readings, the rotated signals are not correct. However, the angularVelocity output from the ahrsfilter is correct. Does anyone have any ideas why this may be?
Thank you
  댓글 수: 2
xinyu wang
xinyu wang 2021년 9월 29일
hey, do you slove this problem? I got the same problem, I let the sensor frame completely coinside to the NED or the ENU frame, but the result stil has a rotatetion angle.
Yanke Sun
Yanke Sun 2022년 12월 6일
Hi, Exactly the same questions! have you solve this?

댓글을 달려면 로그인하십시오.

답변 (1개)

James Tursa
James Tursa 2020년 8월 23일
I haven't used either of those functions, but from reading the doc maybe you need to use the conjugate of the quaternions in your rotateframe call. I.e., if the sensor signals are in the BODY frame and the quaternions are NED->BODY, then maybe you need the conjugate of the quaternions to do the BODY->NED conversion.
  댓글 수: 8
James Tursa
James Tursa 2020년 8월 24일
So then I don't understand why you are comparing a rotated gyr signal against the angularVelocity filter result. The original gyr signal is in BODY frame and that already matches the angularVelocity result in BODY frame, so why the rotated gyr data comparison? I am still not following.
Adam Levschuk
Adam Levschuk 2020년 8월 24일
Ok, Perhaps i am not uindertsanding my own problem. Im am going to work on this myslef more adn hopefully ill figure it out. I may post abck here in the future if i cna better explain it.
Thanks for your help James.
Adam

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by