| New Reply |
Z-direction acceleration with accelerometer/magnetic-field sensor |
Share Thread | Thread Tools |
| Apr19-12, 09:08 AM | #1 |
|
|
Z-direction acceleration with accelerometer/magnetic-field sensor
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/wikipedi...d9a3ea4291.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 |
| Apr20-12, 02:55 AM | #2 |
|
Recognitions:
|
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. |
| Apr20-12, 03:03 AM | #3 |
|
|
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?
|
| Apr20-12, 09:56 AM | #4 |
|
Recognitions:
|
Z-direction acceleration with accelerometer/magnetic-field sensor |
| Apr21-12, 12:36 AM | #5 |
|
|
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. |
| Apr21-12, 12:52 AM | #6 |
|
Recognitions:
|
|
| Apr22-12, 01:27 AM | #7 |
|
|
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.
|
| New Reply |
| Thread Tools | |
Similar Threads for: Z-direction acceleration with accelerometer/magnetic-field sensor
|
||||
| Thread | Forum | Replies | ||
| Difference between accelerometer and vibration sensor | Mechanical Engineering | 3 | ||
| Magnetic field problem: What are the magnitude and direction of the electric field.. | Introductory Physics Homework | 1 | ||
| using accelerometer sensor to determine speed of person | Classical Physics | 5 | ||
| direction of magnetic field and direction of current | General Physics | 16 | ||
| Using JFET as magnetic field sensor | Electrical Engineering | 3 | ||