View Full Version : Discussion How to measure attitude
m1tch37
May 26, 2007, 05:36 AM
Greetings,
I am in early stages of planning a UAV i want to build. Right now im trying to work out how to measure attitude. I have seen alot of different things, and alot of different price ranges, and it has all gotten me confused. :(
I original thought a IMU was necessary, except they cost thousands (although sparkfun was one for $300? :confused: ) but then i found this tilt compensated compass, that as a byproduct also outputs attitude from its onboard accelerometer, that costs $200:
http://www.ocean-server.com/download/Compass_OS1000.pdf
So if attitude can be calculated by a accelerometer, what are gyroscopes used for in other products and why do these Inertia Measurement Units cost $1000+? I came to the conclusion that gyros and IMUs allow you to also measure distance (the other 3 'degrees of freedom') fast and accurately too, but i think a gps receiver is fast and accurate enough for what i need.
Is this correct, or will i end up needing position data at a faster rate for navigation (i haven't thought that far ahead yet)?
Ta,
Mitch
chopperdave
May 28, 2007, 12:59 AM
Hi,
I am also looking for a way to sense attitude. Here is what I (think I) know so far.
Pitch:
I imagine it is possible to calculate your pitch if you know your airspeed and the first derivative of speed (i.e. if you are accelerating, then presumably the nose is pointed down.). Do you know if this is correct?
I guess I don't really care about the absolute pitch, all I really want is to be able to control the elevator for constant airspeed.
Roll:
Controlling roll is easy. Since yaw rate is proportional to bank angle, use a gyro to sense yaw, and feed the signal into your ailerons. Adjust gyro gain so that the plane levels itself but doesn't oscillate.
Heading:
I know this is a little bit outside the realm of attitude, but I am very curious about it. What is the cheapest way to determine your heading? Presuming you need GPS anyway, can you just calculate your heading from the last 2 (or more) positions? Is the frame rate high enough for this method to work? Is there some other cheap way to determine heading?
Thanks in advance for the feedback.
-David
Terry S
May 28, 2007, 05:00 AM
If you are talking about a plane then yes, airspeed and yaw is all you need to keep it from crashing.
Terry
macboffin
May 28, 2007, 08:15 PM
Woffo you need to know attitude? If it's for angle of attack, a blow-back vane with potentiometer on it will do the job ( mounted clear of prop-wash, preferably on a probe half a wing chord ahead of wing to get in clear air.
They are commercially available in small sizes.
macboffin
May 28, 2007, 08:40 PM
Heading is one thing;track over the ground is something else! Dependant on wind direction/speed of course. The easiest way to go,GPS for steering, via a set of way points.Height hold modifies throttle setting to maintain constant height.(Check the map for high ground on chosen course!).
chopperdave
May 29, 2007, 12:59 AM
I see what you mean. I should have realized that there will usually be some cross wind, and so the nose will not be pointed in the direction the airplane is traveling. As long as the wind is quite a bit less than the airspeed of the plane, I think you don't have to know which way the nose is pointing, just fly so that the track over the ground is toward your next waypoint. Does that make any sense?
I think you need to know attitude to control airspeed. Like you said, throttle can be used to control altitude. The control system just has to be able to adjust the elevator to keep the speed constant, or at least within certain bounds. Can you just feed the airspeed into the elevator control, so that higher speed raises the elevator more, or is more advanced processing required? I imagine damping this system could be a problem, and it would be easy to get oscillations that grow and grow.
The blow back vane sounds interesting. How much do they cost? Do they work in the 10-50mph range?
Bulma
May 29, 2007, 01:42 AM
So if attitude can be calculated by a accelerometer, what are gyroscopes used for in other products and why do these Inertia Measurement Units cost $1000+? I came to the conclusion that gyros and IMUs allow you to also measure distance (the other 3 'degrees of freedom') fast and accurately too, but i think a gps receiver is fast and accurate enough for what i need.
You can't get attitude from accelerometer because it detect acceleration together with gravity, so unless your plane is accelerating very slowly, you`ll get incorrect values. On the other hand, gyros are not affected by acceleration, but (at least those cheap MEMs gyros) have enormous drift (you`ll get totally wrong values in 20-30 seconds). That is why you need additional sensors to compensate and some processing power (CPU) to process those sensors. And it all cost money, so you end up with 1000$+ units ;)
You could get distance with accelerometers, and I believe commercial IMUs used on real planes and balistic missiles ;), use it. However, you need very accurate gyros and accelerometers for that, and not some cheap (30$-40$) ones used on those sparfun and similar IMUs.
macboffin
May 29, 2007, 10:28 PM
I see what you mean. I should have realized that there will usually be some cross wind, and so the nose will not be pointed in the direction the airplane is traveling. As long as the wind is quite a bit less than the airspeed of the plane, I think you don't have to know which way the nose is pointing, just fly so that the track over the ground is toward your next waypoint. Does that make any sense?
I think you need to know attitude to control airspeed. Like you said, throttle can be used to control altitude. The control system just has to be able to adjust the elevator to keep the speed constant, or at least within certain bounds. Can you just feed the airspeed into the elevator control, so that higher speed raises the elevator more, or is more advanced processing required? I imagine damping this system could be a problem, and it would be easy to get oscillations that grow and grow.
The blow back vane sounds interesting. How much do they cost? Do they work in the 10-50mph range? You don't control airspeed by attitude, you control by throttle. Which in practise you set to maintain cruise speed and altitude.Losing altitude? Throttle up a shade.Climbing? Throttle back a shade. There are a great variety of vanes on the market, Thorn-EMI do a very neat one that weighs about three ounces complete, has a little Delta-shaped vane about two inch span on the end of an aluminum tube about fourteen inches long. GPS can steer the plane on a straight track between way-points, the plane may be pointing it's nose a good way off straight at the next waypoint if there is significant wind but the plane will fly a straight track. Note that if there is a thirty knot wind at, say, three thousand feet,(quite common) at ninety degrees to your course your flight time will be considerably longer; better have enough fuel! (Of course you will have allowed for this in your flight planning).If you plan to fly two hundred miles, have a tank big enough for three hundred miles worth.
macboffin
May 29, 2007, 10:37 PM
Further to above to be quite clear; the planes heading is irrelevant, the track is the important thing,and the speed between waypoints.Which will vary as the wind does. Height is also important, especially if you have to clear high ground enroute.Particularly if it's steep high ground. You could clear a mountain top by a thousand feet flying down wind, and have the rotor effect bash you into the downwind slope, or break the airplane due to turbulence. Go take a few light plane rides and get a feel for some of the effects.
chopperdave
May 30, 2007, 01:33 AM
You don't control airspeed by attitude, you control by throttle.
As an RC pilot, I am able to control airspeed by throttle, attitude (pitch), or both.
As a UAV designer, I am in the very beginning stages of figuring things out. I want to break down the problem of controlling an airplane into pieces that are easier to handle, and so I thought it would make sense to control speed using the elevator and altitude using throttle.
I am pretty sure, though I haven't tried yet, that it is possible to design one control system that knows nothing but speed, and controls nothing but elevator. The job of this system is to keep the speed constant. If speed is too low, lower the elevator to pick up speed, and if speed is high raise the elevator.
A second, separate system knows nothing but altitude, and controls nothing but throttle. If the altitude is too low, advance the throttle. If altitude is high, then reduce the throttle setting.
I know this is crude, but I am trying to figure out the simplest and cheapest way to make a UAV. To those who know: is this plan workable, or is there some major problem with my approach?
chopperdave
May 30, 2007, 01:43 AM
There are a great variety of vanes on the market, Thorn-EMI do a very neat one that weighs about three ounces complete, has a little Delta-shaped vane about two inch span on the end of an aluminum tube about fourteen inches long.
Three ounces is an awful lot to me. I think it can be done for about $30 dollars and at a lighter weight with a pitot tube, if you buy only the pressure sensor and source the other parts from your junk drawer. A hot-wire anemometer might be even lighter and cheaper (for a DIY junkie).
When I looked up the blow back vane anemometers, I found mostly designs for inside a duct to measure airflow into an engine. Are they sometimes used for airspeed indicators on airplanes, or would I be the first to try that?
Thanks for all the info.
-David
m1tch37
May 30, 2007, 03:01 AM
Thanks for all your replies.
I have since done more research and learnt quite a bit. This is from the compasses datasheet i was looking at:
Aircraft Note: Most electronic compasses use accelerometers to measure tilt (including OceanServer compasses). The tilt angles are determined by measuring the earth’s static gravitational vector. Since, dynamic and static acceleration are indistinguishable when used in aircrafts with high acceleration and banking turns, the dynamic acceleration will introduce an error in both roll and pitch angle reported by the compass as well as heading errors. Only level headings will be accurate when aboard a plane and vibration needs to be considered. Strong vibration also applies acceleration to the compass and can cause errors if the amplitude of the acceleration is significant as compared to the earth’s 1G acceleration due to gravity
So thats where the gyros come into play, i understand now. Thanks.
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.