Hi every body,
I'm going to build a quad copter and right now I'm studying the control alternatives.

I'm going to build the control system (micro controlled) but i have some doubts:
- Is really a difference between a Gyroscope and a 3 axis accelerometer? Due to my ignorance I think that is enough with an accelerometer readings to stabilize and control the motors speeds to do the movement that the controller wants to do.

- I thinking to include a magnetic compass, i have seen magnetic field sensing chips to implement the compass, with this sensor can I calculate as well the position respect the earth? or isn't precise enough

At last but not least, I thinking to mount a little wireless access point (the fonera, that works with an embedded Linux easy to program) to read the telemetry data and send complex orders to the controller (in future stages of the project), what is the best / commonly used solution to link the UAV to a computer? What range provides it?

Thank you very much,
Regards,
Chema

Views: 37

Reply to This

Replies to This Discussion

Firstly you are going to need those gyros I think.
Secondly magnetometer is a great idea, they are actually surprisingly accurate I think you will find.
Lastly look into some TTL based serial modems.
Wifi = TCP/IP = difficult in comparison to analogue serial stream.
FAQ section on front page: gyros vs accelerometers
Thanks for the help (and sorry for not reading the FAQ), and after reading your answer and the FAQ I also think that I must use the gyros...
I'll take a look to the TTL modems, but my idea of use the AP is because I can write a C program in the fonera that uses The serial port or even an I2C bus, and control from my PC with a web browser. I shouldn't deal with the TCP/IP directly...
What range can offer the TTL modems?
Thanks!
Regards!
Gyros give good short term readings but drift over time. Accels give useless short term readings, but can be filtered to give a reading that doesnt drift over time. The accels are used to correct for the gyros. Gyros only is an option, but only if you plan to be flying manually, and compensate for the sensor drift yourself.

Magnetometers can run into problems with all the current going to the motors. As they rev up and down you might see as much as a 15 or 20 degree shift in angle. There may be solutions to this...

Check out Xbee for wireless data. Their modules are pretty cheap and the better ones can go a mile or more.
Note that, near hover, the accelerometer is basically useless for correcting drift in your gyros; this is because changes in angle produce lateral accelerations which cancel out the gravity vector in your x and y axes. Accels will help only when you have reached a steady-state velocity. Near hover, the accelerometer can only be used to measure thrust reliably.

A lot of people have been using accels to cancel drift in rotorcraft state estimation, but if you work through the math you will find that it doesn't work like they think it does. Essentially what they have is a gyro integrator that slowly pulls pitch and roll state estimates to zero (because near hover, the accels always think that pitch and roll are close to zero!) It happens to work well enough because, near hover, pitch and roll are typically not far from zero, and they are zero on average.

SO... in short, if you are just planning on operating near hover, you won't gain anything by using accelerometers.
I'd be interested to see this math of yours. 6 dof IMUs are not something that the DIY community cooked up.

If nothing else, you need to know when you're near level so that you can take the opportunity to pull pitch and roll back towards zero. You're unlikely to find a craft that is always hovering...wouldnt be very useful...
Haha. I am ruffling your feathers in all kinds of ways, Xander. :-) I'm not doing it on purpose, really. Sorry, I may not have been perfectly clear in my post.

I'll put something together over the weekend and post it. It may seem like MY math to you; it certainly isn't mine, but hopefully it can become OUR math. :-)

In the mean-time, note that I said "close to hover," not "hovering." In this context, "close to hover" means anytime the roll and pitch angles are non-zero (they could actually be fairly large), altitude is remaining fairly constant, and the aircraft has not reached a steady-state velocity (ie. drag has not stopped lateral acceleration); effectually, any time you are not moving screaming fast. Given these definitions, a UAV rotorcraft can be expected to be "close to hover" for a fairly large amount of time in many applications; and, as I will show, accels can't be used to correct for drift under those conditions.

As you mentioned in another post, accels are useless in the short-term, but useful in the long-run for correcting drift. Loosely, accels provide good estimates "on average." But if, on average, the UAV is anywhere near hover, then all you are doing is slowly pulling angle estimates to zero, because that's all the accels see under those conditions. You can do the same without accels.

6-DOFs definitely weren't cooked up by the DIY community; but we DIY'ers can choose to use them however we want.
Heh, sorry, perhaps I was a bit overzealous there.

I really am curious. Particularly in quads, the gyro only versions seem to only be suited for R/C flight, as the drift requires manual correction. Perhaps I dismissed your idea too quickly.

I can see how over the course of minutes a quad's attitude probably averages rather close to zero. I believe the accel data becomes useful over the "long run" of a few seconds. That should give you much more accurate drift correction.

I'll admit I dont really understand this thing about accels being useless unless you're at stead-state velocity. Accels seem quite functional in any number of applications (wiimotes, my cell phone) that arent moving screaming fast (I hope!) Making the assumption that the object is stationary, the accel values are turned into a single force vector denoting gravity. This value can be given less weight (discarded entirely?) when the magnitude of the vector is not close to that of gravity or its direction wildly disagrees with the gyros. Dont mean to be patronizing, just explaining why I think they should be effective in a fairly stationary object.

But one less sensor would be a nice thing. Have you tested this? Or are there papers on the topic? Unfortunately my quad isnt operational at the moment, but I might poke at this next time it is.
Your fine, Xander; I wasn't offended. Although, reading over my old post, I may have sounded a little preachy, or at least entirely too overconfident. :-) If so, I am sorry.

The reason a rotorcraft is different than, say, a fixed wing UAV or a wiimote is that on a rotorcraft the attitude of the aircraft is closely coupled to the body accelerations it experiences ("body" accelerations as opposed to accelerations from gravity); so, when the attitude changes, you get some extra accelerations on the body that cancel out the acceleration from gravity on both the X and Y axes. You can't make the assumption that the aircraft is stationary, because any slight change in attitude will result in just enough acceleration to mask gravity. I had to scratch my head over this for a long time before it finally made sense.

I actually HOPE that someone can show me why accels can actually be used; I am working on my MS, doing indoor autonomous quadrotor navigation (SLAM stuff), and one of the biggest problems is state estimation; we are always close to hover since we are indoors moving slowly, and GPS doesn't work reliably inside. In the academic world, autonomous indoor mapping and navigation is still an unsolved problem, in part because we can't use accels.

There are some papers that talk about this; I don't have them handy, but I'll look them up and post them. I'll also post a little write-up on how, exactly, the accelerations get canceled out. Some basic trig stuff is all.
Ah, I've got it now. Hmm... interesting. I would think that (especially indoors) your acceleration would be less than gravity, and that you'd reach steady state fairly quickly. Not because you're going so fast, but simply because you dont want to be moving super fast so only a small amount of your thrust is being used for movement.

That's really just speculation though. If most of your movement time is actually spent accelerating, then yeah, I can see how this would throw off or negate accel data.

Perhaps there would be some value in pulling the gyro towards zero only when the vertical accel reads close to 9.8m/s^2 and the other two are near zero? At least that way you'd know you arent significantly tilted in some direction. No, I suppose that could fail if you were tilted and accelerating upwards.

Hmm, this is a tricky one...
Unfortunately, nature plays a dirty trick and body acceleration always equals the acceleration due to gravity (or, more specifically, the component of gravity projected onto the accel axis). I attached a PPT with a picture; you can work through the trig to convince yourself if you want (writing the equations without LaTex is a huge pain, or I would stick them in there).

The velocity "steady-state" refers to the time at which the pitch and roll angles of the aircraft no longer cause additional acceleration because drag is pushing back on the airframe with equal and opposite force. Suppose that the pitch angle is -45 degrees - then half of the force from your rotors is pushing you forward. You will be in steady state when there is enough drag on the airframe so that you have a constant velocity.

So, you never really "reach" steady-state, because you are always changing angles, and the quadrotor doesn't have time to get going fast enough to experience appreciable drag.
Attachments:
Well. I partially disagree. The problem is that if you use only the accelerometers to estimate the attitude of the quad, then you have not enough information to estimate also linear accelerations, and, if the body accelerates, then the estimated gravity vector experiences a tilting in the direction opposite to the body acceleration (due to the linear inertial component which adds to gravity). Conversely, if you use gyro's, accels, a magnetometer, you can fuse all the data to get a reliable estimate of both attitude and linear acceleration. There are various techniques to do that. In order to reduce the disturbing effects of dynamics (i.e. body accelerations) on the IMU performances, I'm actually developing a sensor fusion algorithm which is based on projecting the gravity vector on an admissible hyperplane, which preserves the relative angle between the magnetic field vector and the gravity, thus elimintating the inertial tilting of the estimated gravity vector.

RSS

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The third round was a reliablilty/aerial photography round for both planes and copters, which is now closed. Stay tuned for the next round, beginning soon.

A list of all T3 contests is here

 

© 2012   Created by Chris Anderson.

Badges  |  Report an Issue  |  Terms of Service