Acceleration detection accounting for rotation

Click For Summary

Discussion Overview

The discussion revolves around the challenge of detecting vehicle acceleration and braking using smartphone sensors, specifically accelerometers and gyroscopes. Participants explore methods to differentiate between acceleration and braking while accounting for changes in the phone's orientation during measurements.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant describes their current approach using an accelerometer to measure linear acceleration while attempting to isolate gravitational effects and noise.
  • Another participant suggests that using rotation data from the gyroscope could help track the phone's orientation and maintain a 3D velocity vector, but notes that this method may become imprecise over time without noise correction.
  • A participant indicates their intention to use accelerometer readings as a plausibility check for GPS data, especially in scenarios where GPS may be unreliable, such as in tunnels.
  • There is a request for clarification on the mathematical and physical principles behind tracking orientation changes and how to determine the direction of acceleration (positive or negative) when the orientation has changed.
  • One participant proposes a method of storing orientation data that involves relating the phone's axes to the surrounding space, suggesting it could simplify the adjustment of accelerations based on orientation changes.

Areas of Agreement / Disagreement

Participants express various approaches and concerns regarding the accuracy and methodology of detecting acceleration and braking, indicating that multiple competing views remain without a consensus on the best solution.

Contextual Notes

There are limitations regarding the precision of orientation tracking over time and the potential for accumulated errors in velocity estimation without corrective measures. The discussion also highlights the dependency on the initial conditions and definitions of acceleration and braking.

Syn
Messages
2
Reaction score
0
Hello everyone!

I am trying to write an app that needs to be able to tell if a vehicle is accelerating or breaking. In this sense I used the accelerometer in the phone. At the moment I managed to isolate and subtract the gravitational pull of the Earth from my readings and I am using a noise variable to ignore minor changes (smaller than 10^-2).

In order to compute the acceleration relative to the ground I am using the following formula sqrt(Lx^2+Ly^2+Lz^2), where Lx represents the linear acceleration along the x-Axis in m/s^2.

My problem is: How do I differentiate between braking and accelerating, as my final acceleration value will always be greater than 0 and the phone can change it's rotation in between measurements (i.e. X and Y axes changing places or anything inbetween). Also I need this to work even if the vehicle accelerates -> maintains speed -> brakes/accelerates some more.

I am guessing this can be solved by using the gyroscope in the phone, which reads the rotation along the 3 axes in rad/s. However I do not know the math and physics behind it and therefor find myself unable to implement it. Is my reasoning wrong? Have I made some false assumptions? Would another way be better?
 
Physics news on Phys.org
If you have access to rotation data, you can track the orientation of the phone in space just based on that (relative to some starting orientation). If you also know the initial velocity, you can keep track of the velocity (as 3D vector).
This method will be very imprecise if you want to use it longer than a few seconds, as you have no way to correct the noise so errors build up over time. To get accurate speed estimates, you probably want to use the GPS data as well, ideally combined with position detection based on nearby cell phone towers.
 
I will be using these readings as a plausibility test for the gps data in order to account for possible inaccuracies, as well as in tunnels and other scenarios where the gps is unavailable. Also I will be using the gps data in order to eliminate the errors that build up over time. Could you please explain the math and physics behind tracking the orientation relative to the starting orientation? How should I account for the orientation changes, given the rotation along the 3 axes in rad/s? Ideally I would like to be able to compare 2 sets of values, with different orientations and be able to tell if the acceleration is positive or negative (braking) along the 3 axes.
I know that braking is just acceleration in the opposite direction, but don't know how to tell the direction once the orientation has changed.
 
There are many ways to store orientation. I guess the most convenient one would be to store the orientation of one phone axis (let's call it z') in the surrounding space (with x,y,z), together with the rotation angle in the x'/y' plane. Those are easy to adjust based on rotation sensors, and it is not too hard to relate the x', y', z' accelerations to accelerations in x,y,z.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 47 ·
2
Replies
47
Views
5K
  • · Replies 0 ·
Replies
0
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 10 ·
Replies
10
Views
5K
  • · Replies 1 ·
Replies
1
Views
13K
Replies
1
Views
1K