# Center of gravity offset for accelerometer and gyroscope readings

I am working on a 6DOF IMU that contains a 3 Axis Accelerometer and a 3 Axis Gyroscope.

I am building a project to plot the position and orientation of the turret/cabin in a crane in 3D space.

The IMU will be placed in the rear end of the cabin which is away from the centre of gravity of the vehicle.

The turret can move independently from the hull/body of the crane. The crane performs extreme manoeuvres I am trying to plot those on a 3d graph both position and orientation.

I have some questions regarding this

1. Will the gyroscope have errors or uncertainty in its reading as it is placed away from COG? If yes, how do I compensate that.

2. I referred this article, Accelerometer Placement – Where and Why, stating effect on accelerometer if the IMU is placed away from COG. From this article I came to the conclusion that I have to compensate the accelerometer readings if Accelerometer is not placed at centre of gravity of the body, is my conclusion correct? Can someone help me understanding.

3. If the turret is facing backword and crane is moving forward will this change my calculations.

• Welcome to Robotics, Akash Sagar. I'm curious if these are real cranes or if this is hypothetical? I spent 8 years doing crane controls at my previous employer and worked on cranes like you describe in Vancouver.
– Chuck
Jan 5 at 13:11

As mentioned in the comment above, I did work like this professionally for a long time. I'll start by saying that I've tried putting IMUs on cranes in the past, and you're really just better off pulling position information from the crane control system, which should be getting position information directly from the position encoders on the crane. This is the best, most reliable data you can get.

Any IMU will have biases and noise, and you will accumulate those errors over time.

Will the gyroscope have errors or uncertainty in its reading as it is placed away from COG? If yes, how do I compensate that.

Rotation of a rigid body is the same at all positions on the rigid body, so gyroscope readings are unaffected by placement, unless accelerations affect the readings. If this is the case then it should be noted in the datasheet.

I referred the bellow article stating effect on accelerometer if IMU is placed away from COG. From this article I came to the conclusion that I have to compensate the accelerometer readings if Accelerometer is not placed at centre of gravity of the body, is my conclusion correct? Can someone help me understanding.

Yes you will need to compensate, and I don't think I can explain any better than the article you linked explains it. An object that is rotating some distance $$r$$ from the center of rotation is also translating through space. But, since it's rotating, it's not translating in a straight line.

If it's not moving in a straight line then it must be accelerating, because acceleration is the only way to change the direction of the speed vector.

If the turret is facing backwards and crane is moving forward will this change my calculations.

The is a classic point that is drilled into engineering students - you need to create a free-body diagram that captures all of the relevant motions and forces when you create your equations of motion. As long as your equations are all based in the same frame then you shouldn't need to change anything based on orientation because they'll work themselves out with sign changes.

Rail-mounted gantry cranes can conceivably gantry and trolley, translating x- and y-directions, in addition to your slew/yaw motion. Rubber-tire gantry cranes, or any other cranes that aren't fixed to a rail (tracked cranes, etc.) could rotate the gantry frame in addition to rotating the cab/jib, and so you could possibly have two kinds of rotation in addition to two kinds of translation.

But really, I can't stress enough that an IMU will always have position drift, and there is nothing you will ever be able to do that will eliminate that position drift. The Madgwick filter uses gravity/down to fix roll and pitch rotations, but those shouldn't be an issue on a crane. You'd be more concerned with yaw/slew motion, which should be fixed by magnetic North, but any environment where a crane is operating will have a lot of magnetic interference that will prevent you from getting reliable compass readings.

If you "just" pull encoder readings off the crane then you could know the 3D position and orientation (pose) of the cab by forward kinematics. I put "just" in quotes because I know even this can be challenging, but I sincerely believe accessing that data is going to be easier and more effective long-term than trying to build a positioning system built around an IMU.

• Hi Chuck firstly thank you so much for a detailed explanation and thorough answer, However I would require some more clarifications as I am new to this field In the above post as mentioned, Ar’ = A + Ar + <– Inertial Acceleration 2ω X Vr + <– Coriolis Acceleration α X r + <– Euler Acceleration ω X (ω X r)) <– Centripetal Acceleration It is mentioned that "Point P represents the location of our accelerometer within the same device. Since points P and Or are fixed relative to one another (they are part of the same rigid body), Ar and Vr are zero by definition and drop out of the equation" Jan 10 at 12:02
• So according to this If the position of centre of gravity and the position of IMU is fixed in a rigid body that means that the final formula becomes Ar’ = A+ α X r + ω X (ω X r)) ------> Since in my device the position of centre of gravity and position of IMU are fixed, so will this formula work for offsetting IMU accelerometer offset due to its placement away from COG of body is this correct? Jan 10 at 12:02
• Also I found out a response regarding a similar question asked here physics.stackexchange.com/questions/222947/… Actually I need a basic clarification in this instead of α X r here they are using cross product of ω(dot) is it correct to assume ω(dot) = α, which denotes the differentiation of angular velocity with time which give angular acceleration ,Also can I use this formula directly ? Jan 10 at 12:07
• Thank you for your help! BTW I am working on the crane as well as the dirt bike project, but the dirt bike project is my personal project and I thought questions related to it will better be suited in another question since you mentioned that the centre of rotation of a body moving freely through air like the dirt bike should be centre of gravity of the body (Thank you so much for this, it was exactly the clarification I was looking for), If I would have converged both questions it would have been too complicated and I would have received contradicting answers :D Jan 11 at 4:19
• That is why I separated both questions, Anyways Thank you so much for clarifying the doubts, you were very helpful, I think now I am much clear on how to proceed with the program. Jan 11 at 4:21