Showing posts with label turn. Show all posts
Showing posts with label turn. Show all posts

Saturday, February 15, 2014

How To Design an Autopilot

An autopilot is a very complex bit of machinery. Ever think about all the stuff it needs to know and how it does it so well? As a pilot, you were taught that you start a turn before you get to a waypoint, so you don't overshoot. As a computer, how do you know to start a turn before, and how much before?

The FAA has an amazing document, AC 8260.58. I recommend getting the whole PDF, and opening it in a true Adobe reader because this document is interactive, and it is large. This document is full of very well explained math. There are tons of definitions and discussions in here, PLUS there are sample calculators right in the document.Depending on the age of your Adobe reader, you might get some weird document navigation indications.

The document is really about how PBN procedures are designed. PBN procedures assume the aircraft will have an autopilot, so it is interesting to see how the procedures are designed for the limitations of the autopilot.

The drawings in the document are amazing. Look in volume 5 page 9 figures 2-4A and 2-4B, to see how turn errors can be calculated using the radius of the required navigation performance, and bisector lines, and the arc that intersects the edges. The page before (page 4) explains step by step how to make the calculation.

The document is full of acronyms, but they are all explained in volume1 chapter 3. Not all the acronyms are what you might think or are used to in other contexts. In this document CG is "Climb Gradient" not "center of gravity", ATT is "Along Track Tolerance" not that big phone company, etc. It is best to have that chapter book marked to allow you to check back.

The book outlines other tolerances as well. Some of the measurements are metric, while others are nautical miles, and the conversions are part of the calculators in the document. Many of the intermediate values need to be kept in 15 significant digits, and stored in 64bits, with no rounding of intermediate results. There are other common standards that this document relies on, including GPS units calculate the diameter and shape of the earth based on WGS-84 standard.

Much of what is in the document is code that could be copied right into some programs. What code isn't there, is mostly easy to figure out, and could be part of a separate function or method. 

There is a good review of many basic algorithms, including intersections of two arcs, locating a point relative to a locus, and calculating arc length, or sub-arc lengths. 8260.58 might be a good workbook for some advanced STEM type program.

With this reference, building an autopilot should be less searching, and easy implementing.


Sunday, December 1, 2013

FMS FMC and how airplanes know where to go.

Flight Management, how does the airplane know where it is, and where it ought to go. The pilot may want to be in charge, but his job is to manage the systems. There are many systems in an aircraft, and many come together in a single computer called the Flight Management Computer (or Flight Management System). The pilot can use the FMS/FMC on the airplane to help manage these systems.

The heart of the navigation system are the gyroscopes and accelerometers. The gyros are known as the Inertial Reference System (IRS). The IRS will be used to measure changes in flight orientation. The IRS will output heading, attitude and change being imparted. Gyroscopes will measure current conditions, accelerometers will measure the change being imparted on the current conditions.

Gyroscopes are great tools for use in aircraft. The horizon gyroscope will hold true through many oscillations of the aircraft, climbs, turns and dives it will usually show the blue side up. The bank gyro will also handle climbs, turns and dives. The directional gyro will maintain heading for hours.



Accelerometers will measure the forces acting on the aircraft in the various directions. As you were taught in instrument training, or perhaps in private pilot ground school, the seat of your pants isn't accurate at measuring change in coordinated flight. Accelerometers are like the seat of your pants, measuring g forces in three directions (forward/rearward, left/right bank and pitch). They will inform the pilot, or flight management system if the aircraft isn't in coordinated flight, or the increase or decrease of thrust is having and effect.

Integrating the accelerometers and the gyros is how the aircraft can measure where it is relative to where it started. When the aircraft is initialized by the pilot, the current latitude and longitude are entered or received from the GPS system. As the aircraft changes position, the accelerometers will measure the forces acting on the aircraft from the TUG as it pushes the aircraft back from the gate. When the aircraft is in flight, turns can be measured by combining the angle of  bank, and the "vertical" acceleration to measure the horizontal component of lift (HCL), and compare it to centripetal force, to measure the rate of a turn.

A couple posts ago, I was going to talk about Kalman filters. This is where the Kalman filter pays dividends. The Kalman filter will take data that isn't perfect, and make some sense out of it. Sometimes gyros or accelerometers will measure unreasonable values, some large, some small. The Kalman filter will make a best effort to use that information in a way that is reasonable (it may throw the data away, or it may smooth it, such that it looks like a normal reading).

The gyros precess. Since bearings and motors are not perfect, the gyro won't always hold the proper heading for the entire trip. A certified IRS should be accurate to about 650 meters in 1 hour. That means that the aircraft know where it is in the world with a 650meter sphere around it. Most modern aircraft will update the FMS with GPS information, allowing the IRS and the GPS to argue about who is more accurate.

The IRS will output all this information, and the FMS will work together to let the pilot know where the aircraft thinks it is. The FMS will talk to the autopilot, and allow it to make corrections to insure the aircraft gets to it's destination.

The FMS will display what it knows to the pilot through various displays. The primary flight display (PFD) will show the pilot the location it thinks it is, along with what is around the aircraft. The control display unit (CDU) will be the user interface where a pilot can enter flight plan, and other information. The ailerons, rudder and elevator will adjust to make the aircraft head to the programmed direction.


When the aircraft is initialized, the pilot will enter a flight plan. The plan will include airports and other waypoints that the aircraft will be flying to. The FMS will also contain the navigation database. The nav database is where all the waypoints are defined, and any important information about them. The nav database is how the FMS uses the IRS data to know if the aircraft is heading to the proper place in space or not.

 About here is where I need to talk about autopilots, and I am running out of space. I'll talk about autopilots in another post.

Keep me up on your thoughts.