Z-direction acceleration with accelerometer/magnetic-field sensor

  • Context: Undergrad 
  • Thread starter Thread starter ericrijnb
  • Start date Start date
  • Tags Tags
    Acceleration Sensor
Click For Summary

Discussion Overview

The discussion revolves around calculating the distance traveled by a mobile phone thrown vertically using accelerometer and magnetic-field sensor data. Participants explore the challenges of obtaining accurate acceleration measurements while accounting for the phone's orientation and motion dynamics.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes the use of a rotation matrix to derive actual acceleration from accelerometer readings, but expresses confusion over unexpected changes in z-axis values when the phone is rotated.
  • Another participant points out the lack of sufficient information to define the mathematical problem and suggests that the question may be better suited for the Classical Physics section of the forum.
  • Several participants note that once the phone leaves the hand, it enters free fall, leading to accelerometer readings close to zero, and emphasize the importance of initial velocity in determining vertical distance.
  • There is a discussion about the nature of accelerometer measurements, with one participant questioning whether these sensors truly measure acceleration or are primarily used to detect tilt and movement.
  • A simplified model of an accelerometer is presented, explaining how it measures acceleration in an inertial frame and the implications of being in a non-inertial frame due to gravity.
  • One participant inquires whether the magnetic sensor can be used to determine the direction of gravity, indicating a potential method for correcting accelerometer readings.
  • Another participant discusses the use of inertial measurement units for tracking orientation and suggests that without a gyro, the magnetometer could help estimate orientation, though acknowledges limitations in fully tracking motion.

Areas of Agreement / Disagreement

Participants express varying views on the nature of accelerometer measurements and the best approach to account for orientation and gravity. There is no consensus on a definitive solution or method, and multiple competing perspectives remain throughout the discussion.

Contextual Notes

Participants highlight the complexity of the problem, including the need to account for the phone's orientation and the limitations of using only accelerometers and magnetic sensors without gyroscopic data.

Who May Find This Useful

This discussion may be of interest to individuals working on mobile sensor applications, those studying kinematics, or anyone exploring the integration of accelerometer and magnetic-field sensor data for motion tracking.

ericrijnb
Messages
1
Reaction score
0
Hi all,

We're working on a project where we try to calculate the distance traveled by a mobile phone which is thrown in the air (only vertical movement, not horizontal).
We use the accelerometer to get the acceleration in the x-, y-, and z-axis. Now we try to fix the error caused by the flipping and spinning of a phone.

I found out that we can get the actual acceleration by taking the azimuth, pitch and roll of the phone, en by using the rotation matrix like this: http://upload.wikimedia.org/wikipedia/en/math/5/2/5/525d9c773a2ed0d6a41c48d9a3ea4291.png, we should get the real acceleration in the three axes.

But, something's going wrong. If I hold my phone still, everything's ok. If I rotate my phone over, say, the x-axis, the value of the z-axis of the 'real' acceleration also changes, which is wrong.

What should I do to get the actual acceleration of the phone in the three axes, using the accelerometer and magnetic-field sensor? I searched the forum, but couldn't find a solution which fits this situation.
Looking forward to any replies.

Greetz,
Eric
 
Mathematics news on Phys.org
You haven't given enough information to specify a mathematical problem. For example, you didn't say how you used the matrix or what you think it represents.

You might get a quicker answer to your questions in the Classical Physics section of the forum since this is basically a question of kinematics. If you want it moved there, you can use the "report" feature and report your post The interface to the report feature makes it sound like its only to report naughtly things, but I've been told you can also use it to make such simple requests.
 
Once your phone leave hand, it would be in free fall (ignoring air resistance), and the accelerometer measurements should be close to 0. The vertical distance is pretty much determined by the initial velocity of the phone when it leaves your hand. If I understand what you want to do correctly, then you should estimate the initial upward speed. So, which measurement do you think (ideally) can help you determine the yaw, pitch and roll? You don't have much choice here, but at least in theory, you should have sufficient information to determine that. Think a bit about that, what exactly are the coordinate systems you are using, and what rotation matrix are you trying to find, and what measurement is not going to change (at least in theory) no matter how you move and flip your phone?
 
chingkui said:
Once your phone leave hand, it would be in free fall (ignoring air resistance), and the accelerometer measurements should be close to 0.

If so, it looks like this question needs comments from engineers as well as physicists. Taking the problem as a physics problem, one would assume that an accelerometer measures acceleration (in some commonly used intertial frame). However, on the web, I see articles that say the purpose of these accelerometers is to determine if the phone is tilted or moving. So perhaps the "accelerometer" in a cell phone doesn't really output an acceleration measurement.
 
Consider a very simple single axis accelerometer model with a spring-mass inside a box: for simplicity, just consider 2-D space with a square mass and two springs. Connect the upper side of the mass to the inner upper wall of the box with a spring, and do the same thing to the lower side of the mass, now you have a simple single axis accelerometer. If you accelerate this sensor upward in an inertial frame, the mass will compress the lower spring and stretch the upper spring. You can measure the compression and figure out the force and hence the acceleration. So, in an inertial frame, this sensor measure the acceleration. Now, imagine you place this sensor on a table and magically turn gravity on, you no longer are in an inertial frame. But due to gravity, the mass inside the box compress the spring as if it is accelerating in an inertial frame. That's how an accelerometer "measure" gravity and by figuring out the downward direction relative to the sensor coordinate frame of your phone (using three orthogonal accelerometers), it can determine the tilt.
So, in an inertial frame, an accelerometer measure acceleration relative to that frame. But in a non-inertial Earth frame, to determine the acceleration RELATIVE to the Earth frame, the gravity component has to be subtracted from the accelerometer measurement. And you have to somehow know the gravity direction already.
 
chingkui said:
the gravity component has to be subtracted from the accelerometer measurement. And you have to somehow know the gravity direction already.

I understand. So is the magnetic sensor used to determine the direction of gravity?
 
Usually, this is done by keeping track of its own orientation as it moves. For a mobile vehicle/machine to keep track of its orientation relative to some coordinate frame attached to the Earth (e.g. an East, North, Up, ENU frame), inertial measurement units with gyros and accelerometers (and additional sensors such as magnetometers) are usually used. But since gyro is not available, OP has no choice but to use the magnetometer to track the orientation. Mathematically, if the motion is the most general 6 DOF type, fully tracking the orientation would be impossible as there would be at least some ambiguity. But since OP's application is more or less limited to vertical movement, such heuristic might help to get a better estimation. But I will let OP think a bit more about how to use the sensors and come up with a design, and determine if it is really practically possible with the sensors the phone has.
 

Similar threads

Replies
11
Views
24K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 24 ·
Replies
24
Views
3K
Replies
2
Views
1K
Replies
11
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K