imuSensor - why is the acceleration negated, when calculating the total acceleration?
12 views (last 30 days)
Show older comments
The IMU-Sensor simulates an acclerometer, magnetometer and gyroscope. As inputs the sensor needs acceleration, angular velocity and orientation. I don´t
understand why the input acceleration is negated.

4 Comments
Jan Kappen
on 9 Jul 2025
Thanks Paul, this really drives me crazy. So is the solution to just negate all acc readings to compare it with other sensor conventions, or do we need to do special stuff like only negating the first two elements of the body acceleration and similar?
Why in hell has MathWorks chosen that convention? I was hoping, given such a relatively new product, that everything fits well to common standards :(
Edit, here are some great threads:
- Wrong gravitational acceleration in IMU model (imuSemsor) in sensor fusion toolbox. - MATLAB Answers - MATLAB Central
- How should I modify my real-time IMU data for usage in insfilterAsync/insfilterMARG object(s)? - MATLAB Answers - MATLAB Central
Thanks!
Paul
on 10 Jul 2025
From my comment in the first thread you linked, I think you'd negate all three components of accelReadings to make them match what with other sensor conventions (including Mathworks own Aerospace Blockset).
From that first thread, and a few others, I agree that the imusensor model is .... confusing.
Answers (1)
Adam Danz
on 3 Apr 2020
Edited: Adam Danz
on 3 Apr 2020
Acceleration due to gravity is always negative. For example, if a falling object is affected only by gravity, its acceleration is -9.81m/s^2.
The sign of acceleration indicates the direction of acceleration for some reference frame. For example, if you're driving forward and you define forward as positive, then negative acceleration is the same as deceleration. The acceleration is being applied to the backward direction.
See Also
Categories
Find more on Sensor Models in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!