How to estimate roll position via gyroscope data?

AI Thread Summary
The discussion focuses on estimating roll position using gyroscope data for tilt sensing. It clarifies that integrating gyroscope readings, which measure degrees per second, will yield angle measurements. Participants explore the correct method for numerical integration, specifically questioning whether to multiply gyroscope readings by the inverse of the sampling rate to convert to degrees. They discuss the implications of discretizing values and how to calculate angle estimates based on sampled data points. Overall, the conversation emphasizes the importance of understanding numerical integration techniques to accurately estimate angles from gyroscope data.
usb232
Messages
4
Reaction score
0
im trying to implement a tilt sensing program via accelerometer and gyroscope. part of the input that i will plan on using is gyroscope data. since gyroscopes measure angle/sec, integrating this will give me angle right? i then have three questions:

1. do i multiply the gyroscope's (1/sampling rate) to the deg/sec to get degrees?
2. if i am to do the first one, for lack of a better term am i going to "discretize" the value? that is, any angle measurement i take is multiplied to a constant = (1/sampling rate) OR
3. do i do something like this 1/ (sampling rate*n) where n is the sample number?

thank you!
 
Engineering news on Phys.org
usb232 said:
im trying to implement a tilt sensing program via accelerometer and gyroscope. part of the input that i will plan on using is gyroscope data. since gyroscopes measure angle/sec, integrating this will give me angle right? i then have three questions:

It's right

1. do i multiply the gyroscope's (1/sampling rate) to the deg/sec to get degrees?
2. if i am to do the first one, for lack of a better term am i going to "discretize" the value? that is, any angle measurement i take is multiplied to a constant = (1/sampling rate) OR
3. do i do something like this 1/ (sampling rate*n) where n is the sample number?

thank you!

take a look to this
http://en.wikipedia.org/wiki/Numerical_integration

Remember that numerical integration imply a numerical drift in steady signals

Hope this helps
 
i would like to begin by saying thanks!
ive read through the article but my understanding of it is not that good. I am sorry.

it says in this part that to use
rectangle rule
for integration i am to use this formula:
8ced1e6b168c384faf3a5a850c1503b7.png


however it requires that i evaluate at points a and b. the only data i have is (b-a) which is delta, or the gyroscope's sampling rate. does this mean that i won't be able to estimate the angle?
 
usb232 said:
i would like to begin by saying thanks!
ive read through the article but my understanding of it is not that good. I am sorry.

it says in this part that to use for integration i am to use this formula:
8ced1e6b168c384faf3a5a850c1503b7.png


however it requires that i evaluate at points a and b. the only data i have is (b-a) which is delta, or the gyroscope's sampling rate. does this mean that i won't be able to estimate the angle?

Maybe I'm misunderstanding what you have written, but f(a) and f(b) are the sampled values of angle rate, so you have all data you need
 
sorry about that. i should have given a clear example.

1. suppose at time ta i get a converted gyro reading of 20 deg/sec. i then multiply this to (1/gyro_sampling rate) = 2seconds to get 40 degs ----> this is f(a)?
2. at time tb i get a converted reading of 30 deg/sec. i again multiply this to 2 seconds to get 60 degrees ----> f(b)?
3. what would be my (b-a)?
4. how do i calculate f ( (a+b) / 2)? i don't have the function f T_T
 
usb232 said:
sorry about that. i should have given a clear example.

1. suppose at time ta i get a converted gyro reading of 20 deg/sec. i then multiply this to (1/gyro_sampling rate) = 2seconds to get 40 degs ----> this is f(a)?
2. at time tb i get a converted reading of 30 deg/sec. i again multiply this to 2 seconds to get 60 degrees ----> f(b)?
3. what would be my (b-a)?
4. how do i calculate f ( (a+b) / 2)? i don't have the function f T_T

if at t=ta you read 20 deg/s and at t=tb you read 30 deg/s, a=ta, f(a)=20, b=tb, f(b)=30.

Hope this helps
 
am i right in assuming that since (1/sampling rate) = delta then
ta = a = n * delta and
tb = b = (n+1) *delta
then b-a = delta too?

and f( (a+b) / 2) = (20 + 30) / 2 = 25?
 
usb232 said:
am i right in assuming that since (1/sampling rate) = delta then
ta = a = n * delta and
tb = b = (n+1) *delta
then b-a = delta too?

and f( (a+b) / 2) = (20 + 30) / 2 = 25?

that's true
 
Back
Top