# How do I normalize accelerometer signals values to an relative scale?

Different smartphone devices have accelerometers manufactured by different manufacturers.

Say I want to categorize vibrations recieved from various devices into one of the following scales :

1. LOW_MOVEMENT
2. MEDIUM_MOVEMENT
3. HIGH_MOVEMENT

How can I devise a scale such that -

LOW_MOVEMENT of one device is LOW_MOVEMENT of every other device when subjected to the same vibrations. And so on for MEDIUM_MOVEMENT and HIGH_MOVEMENT? (with a certain degree of possibility ofcourse)

The only data I know about the make of the accelerometer is accelerometer resolution and maximum range of accelerometer.

P.S. I plan on normalizing x^2 + y^2 + z^2 under root.

Next to its resolution and maximum range, you should also consider other effects such as offset. A possibility would be to subject the different smartphones to a known acceleration and check whether they display different values.

• Got your point. But it will not be possible to find offsets for all devices in the market. And should resolution affect my calculations?? I'm not looking at microscopic accuracy, but just categorization (whose accuracy requirement is more than satisfied by all phones) – Shubham Kanodia Dec 23 '15 at 13:42
• OK. What is your context? Do you want to program an app for smartphones? – Karlo Dec 23 '15 at 13:55
• Yeah! indeed. I want the categorization to be as accurate as possible within the limitations. – Shubham Kanodia Dec 23 '15 at 14:44

Assumptions

• There is a no function in (all) target operating systems that gives you the maximum/minimum values of the accelerometer

• You do not want to spend a lot of money and time to build a database of these values on your own

Suggested solutions

I assume there is no way of getting around a kind of calibration procedure. Here are two thoughts:

#1

The simplest one that I can think of is that you let people drop their phone from a certain height, let's say 1 meter. Have them to do this:

• Hit a calibrate switch. This starts a count down that starts some kind of user feedback (e.g. a certain color on the screen, a tone being played) for 5 seconds.

• Within these 5 seconds the phone is to be held still, approximately 1 meter above a soft ground that is safe to let a phone fall onto (e.g. blanket, bed, ...)

• When the 5 seconds are over and the feedback stops (or changes, e.g. different color on the screen, or the tone stops playing), the phone is to be dropped on the soft ground.

Since you know approximately the height of the phone, you can select a part of the accelerometer data where the phone certainly is in free fall, and is therefor free of vibrations from the users hand or from the phone touching the soft surface. All you probably need is to get 10 centimeters of plain, free fall. Rotations are not a problem if you intend to use $\bar{a} = \sqrt{a_x^2 + a_y^2 + a_z^2}$. If needed, you could also let them repeat the process to gain a higher SNR from averaging. For your application, it is certainly sufficient to assume that the measured signal is due to the earth's surface acceleration of $g \approx 9.81\,\frac{m}{s^2}$. If you need slightly higher precision, you could use the geolocation of the device and an theoretical gravity approximation model.

#2

If the app is used in certain contexts and only those values are important, you could simply introduce a learning phase. Let the user wear the device/use it in the intended way, but only for learning. You could:

• let the user rate the acceleration during the training phase and use this as a ground truth for your model

• just collect the data and let the app figure out the levels by itself, assuming that after let's say... 13 training sessions all intensities were measured

Further ideas

In both cases, you could ask the user to share this data with the other users of your app: After a successful training session, ask them if the would share the phone model/accelerometer model (that you probably can retrieve from the OS) and the calibration values. This way, you could have the app look for calibration values online. If they are available, they could be downloaded and used without the inconvenience for the user of doing the calibration. Additionally, with such a database, you could process and thereby refine the calibration data.