Simulink IMU's accelerometer is different with MPU6050 acclerometer
조회 수: 4 (최근 30일)
이전 댓글 표시
I am using Simulink IMU box to simulate my dynamic model, but its accelerometer values seem to have opposite sign. If we lay MPU6050 on flat desk and sensor's Z axis upward, MPU6050 senses [0, 0, 9.81] because of inertial force. but Simulink IMU (ENU frame) outputs [0, 0, -9.81]. Do I just multiply by -1?
댓글 수: 0
답변 (2개)
Sanskar
2023년 6월 26일
Hi!
What I understand from your question is that you are expecting positive value for Z-axis upward, but simulink IMU output returns it in negative.
In Simulink, the IMU block follows the right-hand rule convention for the coordinate frames. According to the convention, the Z-axis points upward, which is opposite to the gravity vector direction.
So, if you are expecting a positive value for the accelerometer readings along the Z-axis when the sensor is placed on a flat desk , and Simulink IMU is giving you a negative value, you can indeed multiply the output by -1 to obtain the expected positive value.
Hope it helps!
Sanskar
댓글 수: 0
Brian Fanous
2023년 6월 26일
I'm not sure which IMU block you mean, but the ones in the Navigation Toolbox and Sensor Fusion and Tracking Toolbox, when in the ENU convention, have the Z-axis pointing up. So gravity will exert a negative acceleration.
You likely cannot only negate the z-axis because then you won't end up with a right-handed coordinate system. You might also need to swap the X and Y axes.
shows how to swap and negate the MPU-9250s axes to match the NED convention. The process is similar for the ENU convention.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Tracking and Sensor Fusion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!