Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 57
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
All today's birthdays', congrats!
dan (37)
rchydro (64)
CapRack (30)


Next birthdays
11/06 dan (37)
11/06 rchydro (64)
11/06 CapRack (30)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: General Science and Electronics
« Previous topic | Next topic »   

have questions on MEMS gyros + magnetometers...

1 2 3 
Move Thread LAN_403
Patrick
Mon Jun 25 2012, 06:49AM Print
Patrick Registered Member #2431 Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
Please ive researched this first in other places and i have some physics knowledge and formal education, but some of these questions i have, are a real punch to my brain.

Question: how is a magnetometer (3 axis) used to minimise/mitagate the drift rate of a gyro ( 3 axis too) of course i have a 3 axis accelerometer too...

is the magnetometer used to re-origin the gyro every so often to prevent cumulative errors due to the drift rate?
If so, how is this done?

the rate of drift is measured in degree second per second (d/s/s) right?

my brain hurts from all IMU/INU math and psyhics.
Back to top
Steve Conner
Mon Jun 25 2012, 10:24AM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
The way I understand it, a gyro measures angular acceleration, and an inertial navigation system integrates twice to get the angular position. The double integration is very susceptible to drift. (An old-fashioned gyrocompass essentially did the double integration mechanically in the gyro itself, but the same drift issues apply.)

In the yaw axis, the angular position is the same thing as a compass bearing. A magnetometer is a compass, so it also gives a compass bearing that can be used to cross-check the one from the gyro. If they disagree, the integrators in the gyro can be reset to make them agree.

I don't know how this works in the other two axes, since the Earth's magnetic field isn't normally used for navigation in those axes. That's where the 3 axis accelerometer helps, it can sense the Earth's gravitational field and tell you which way is down. That can be used to reset the pitch and roll integrators.

You can think of the gyro and accelerometer working together to give you 6 axes of acceleration data: 3 translational and 3 rotational. This data can then be used for both stability control and navigation.
Back to top
Patrick
Mon Jun 25 2012, 05:28PM
Patrick Registered Member #2431 Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
Steve Conner wrote ...

A magnetometer is a compass, so it also gives a compass bearing that can be used to cross-check the one from the gyro. If they disagree, the integrators in the gyro can be reset to make them agree.
ok im going to investigate this further with C code, any other oppinons and explanations are still appreciated...

Back to top
Patrick
Tue Jun 26 2012, 05:49PM
Patrick Registered Member #2431 Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
ok, im going to consider strobing the gyro back to a zero rate value since my machine wont be continuosly in rotation in any single axis, therefore the magnometer can be used to reset the error out of the gyro on a timed baisis... I think.

any thoughts on how to do this in C?


Back to top
Electroholic
Wed Jun 27 2012, 12:40PM
Electroholic Registered Member #191 Joined: Fri Feb 17 2006, 02:01AM
Location: Esbjerg Denmark
Posts: 720
The standard way is to use a kalman filter, it will tie all the 9dof readings together. You should be able to find imu falman filter codes on the net.
Back to top
Steve Conner
Wed Jun 27 2012, 01:29PM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
Sure enough, a quick google search for "imu kalman filter" found this: Link2

Back to top
Patrick
Wed Jun 27 2012, 05:45PM
Patrick Registered Member #2431 Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
You guys save me once again, i wasnt even going to look at the kalman types until i had the pid + imu partially complete.

that source was exactly what i needed!!! i should probably startposting on the diydrones forum too. though 4hv is my favorite and i feel like im cheating on a girlfriend>>
Back to top
Carbon_Rod
Sat Jun 30 2012, 01:35AM
Carbon_Rod Registered Member #65 Joined: Thu Feb 09 2006, 06:43AM
Location:
Posts: 1155
@Patrick
Make sure to audit an advanced linear algebra, and inverse kinematics course if these programs are not part of your curriculum. These are key to solving numerous problems, and will clearly explain how PID is related to Kalman filters.

Remember that the filter has an initial "learning" moment when state is first initiated, and actuators should be "inhibited" during this brief time (do not constantly "reset" your gyro, as "angular rate" data does not work that way). Additionally, you will need to "tune" the filters to match the moment-of-inertia for your craft.

Tip: separate your navigational and guidance sub-systems, and things will get a little easier.

Good luck at the competition,
Rod
Back to top
Patrick
Sat Jun 30 2012, 03:42AM
Patrick Registered Member #2431 Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
Carbon_Rod wrote ...

@Patrick
Make sure to audit an advanced linear algebra, and inverse kinematics course if these programs are not part of your curriculum. These are key to solving numerous problems, and will clearly explain how PID is related to Kalman filters.
I was afraid someone would say this!


Carbon_Rod wrote ...

Remember that the filter has an initial "learning" moment when state is first initiated, and actuators should be "inhibited" during this brief time (do not constantly "reset" your gyro, as "angular rate" data does not work that way). Additionally, you will need to "tune" the filters to match the moment-of-inertia for your craft.
Yes im following the advice from a expert in PIDs at the moment...and i wont strobe the gyro as i previously conjuectured.


Carbon_Rod wrote ...

Tip: separate your navigational and guidance sub-systems, and things will get a little easier.
Yes, i had already made this realization...


Ok so my question remains: how do i prevent the gyros from accummulating the drift error?
Obviously it can be done, my tilt-rotor from KKmulticopter does it...


1341029308 2431 FT1630 Blackboard 1
tilt-rotor (twin-rotor) single board, uses only a 3 DOF gyro, no accelerometers no mags.


EDIT:

1341030858 2431 FT1630 Sensor Fusion

Source: Link2
This article may explain things well, not sure yet.


1341033791 2431 FT1630 Sf1

1341033791 2431 FT1630 Sf2


Im making two assumptions:
first: rotational saturation is not a problem with solid state gyros.
second: the gyro drift isnt linear over dozens of seconds, (becuase i cant be that lucky)

Thought: when dealing with angular rates, absolute/instantaneous values are not stable. And therefore only fast changing rates are of value. steep slopes on the graph are useful, shallow slopes are closer to drift...

Back to top
Carbon_Rod
Sat Jun 30 2012, 05:44AM
Carbon_Rod Registered Member #65 Joined: Thu Feb 09 2006, 06:43AM
Location:
Posts: 1155
As Steve stated...
there are many links for 9DOF IMU Kalman filters:
Link2
Link2
Link2
Link2

I would wager one of your chips is not part of the gyro, and is an accelerometer for a 5 or 6 DOF unit... Who knows, it may indeed be polling multiple gyros like a sync joke or something... wink

Essentially the predicted-error increases as the gyro drifts.

Back to top
1 2 3 

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.