Accuracy of pitch estimate

Just put anything that is not directly related to the Gluon-specific implementation here. I will create subforums if required!

Moderator: lukasz

Accuracy of pitch estimate

Postby Tinus » Tue Nov 02, 2010 12:27 pm



I am developing a small IMU system (based on the gluopilot kalman filter).

I'm wondering, how accurate is the pitch estimation made by:
Code: Select all
pitch_rad = gravity_to_pitch(sensor_data.acc_x, sensor_data.acc_z);

If this equation is computed in a loop and the PCB is rotated around the pitch axis, how accurately should this estimate the pitch angle? (That is without running a kalman filter).

I'm trying to get the scaling right for my sensors (I'm using the Freescale MMA7361 3-axis accelerometer and LPR/LP530 from ST for the gyros). Any advice on how I should go about doing this?

Currently I'm doing this:
- When system is first switched on all initialisations are done.
- After the ADC has been configured and turned on 64 samples are taken on each channel and averaged. The average is then taken to be the neutral value for the sensors.
- From then on I average 8 samples from each sensor to obtain the raw sensor value
- I try to scale the sensor by: (Raw value - Neutral value) * Scalefactor
- I am not sure how to compute the scaling factor.

As I understand it, the z-axis accelerometer when still and level should be experiencing a -1g force? Is this correct? If this is correct my z-axis accelerometer output should represent this -1 value?

Thank you
Posts: 5
Joined: Sun Oct 31, 2010 9:40 am
Location: South Africa

Re: Accuracy of pitch estimate

Postby Tom » Tue Nov 02, 2010 8:08 pm

Hi Tinus,

Yes, flat: z=-1g

You need at least:
* 1 reference value. I prefer the value when the module is perfectly flat on the table
* Scaling value. I prefer to take ADC range = 1g

Sensors also depend on temperature, they are never perfectly linear... so this all is just an approximation.

When no externally forces are present. You can calculate the accurace of your method taking into account:
* noise on your ADC & sensor
* real ADC resolution
* the formulas you use

I never calculated it, but 1° accuracy should be no real problem of you have no external forces applied.
User avatar
Site Admin
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest