Checkout our new site at AeroQuad.com! This site is maintained for backup purposes. Please go to our new site for the latest and greatest on the AeroQuad project!
You are here: AeroQuad> Research Web>ComplementaryFilter (2009-06-13, AeroQuad)

Complementary Filter

Be sure to check out the presentation on this filter at the bottom of this page.

Used the following to convert gyro and accel ADC readings to engineering units

Accelerometer Output (G) = (N-512) / 1024 * (double)10.78;
Gyro Output (radians) = (N-512) / 1024 * (double)28.783;

Implemented the complementary filter using the following equations

If filter term = tau / (tau + dt), where tau = time constant, dt = loop update rate:

rollAngle = (0.9615 * (rollAngle + (rollADC / 1024.0 * 28.783 * dt))) + (0.0385 * (rollAccADC / 1024.0 * 10.78)) * 57.2957795;
pitchAngle = (0.9615 * (pitchAngle + (pitchADC / 1024.0 * 28.783 * dt))) + (0.0385 * (pitchAccADC / 1024.0 * 10.78)) * 57.2957795;

Time Constant = 250ms, Control Loop = 10ms

  • filter term = 0.9615
  • when at rest observe noise to be 0.3 degrees
  • very responsive
  • appears to show 0.1 deg resolution

Time Constant = 500ms, Control Loop = 10ms

  • filter term 1 = 0.9804, filter term 2 = 0.0196
  • when at rest observe noise to be 0.2 degrees
Topic attachments
I Attachment Action Size Date Who Comment
pdfpdf filter.pdf manage 553.3 K 2009-06-13 - 07:41 AeroQuad Complementary Filter presentation
Topic revision: r1 - 2009-06-13 - 07:41:06 - AeroQuad


 
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding AeroQuad? Send feedback