# Compensate centrifugal force in accelerometer measurements

I'm working on a project that includes counting the revolutions of a cylinder connected to an engine. This engine runs at a minimum of 5 revolution per second and a maximum of 9 revolution per second.

A device is fixed and mounted on this cylinder. The device integrates a lis2dh12 accelerometer which is mounted so that the z axis intersects the rotational axis. This video will give you a clearer idea of the situation (the device is the one in red):

Video here

For the calculation of the revolutions, my algorithm takes the data of the accelerometer (set to 100hz) of the weight force and calculates the angle of inclination (pitch) as follows: atan2(y,z)

Then, I convert it to degrees and use 4 flags to understand when the device goes from 0-90, then 90-180, then 180-270 and finally 270-360, so the revolution counter is increased.

This worked for the rotations done with the device in hand, but then I bought a motor to perform the tests and the approach no longer worked: not having taken into account the centrifugal force (which exceeds that weight) the calculation of the pitch no longer works.

This is the engine used for the tests:

Motor picture with dimensions

The engine is blocked by a wooden system that attenuates vibrations as much as possible. With a potentiometer, I adjust the speed of rotation of the motor between 3 rpm and up.

NOTE: In this case the mass of the device is very significant because it is large compared to the complete system, while in the final case (situation of the video) the device has a very small mass compared to the complete system. I do not know if mounting the device on the real roller the calculation of the pitch would be done correctly and at the moment I can not perform the test, but hypothetically I believe that the problem will occur in that case, as the centrifugal force is proportional to the radius (in rotary motion). Am I saying right?

My question then: is it possible to compensate the centrifugal forces, calculating their intensity for each sample of the accelerometer (every 10 ms) and subtracting this force to z, in order to reuse the old approach of pitch calculation?

The data acquired by the accelerometer while the small engine was running at (about) 5 revolutions per second shows that the value of z had assumed a maximum of -0.828 g and a minimum of -2.484 g.

Increasing the speed, however, also exceeds -5 g.

Unfortunately, the device is not equipped with a gyroscope and no hardware can be added to it, so I would like to find a way to calculate the number of revolution made using only data from the accelerometer.

• Form the frame of reference of the sensor, the centripetal acceleration will be constant (at a given speed) and in a constant direction - towards the center of the drum, so should be easy to subtract that. The problem you likely have is not the mass of the sensor, but its distance from the axis - the 'r' term. Can you not mount it nearer the driving shaft? – Phil G Dec 13 '18 at 22:50
• Hi, @PhilG Thanks for asking. Considers that the device mounted on the engine for testing is attached exactly to the driving shaft. I'm attaching the photo for more clarity. As for the real case, no. The device can be mounted (almost) where I want on the surface, but there is no way to decrease the distance from the driving shaft. i.ibb.co/vs3N8G5/photo-2018-12-14-01-04-05.jpg – minimanimo Dec 14 '18 at 0:02