3D Robotics

### Measuring airspeed without an airspeed sensor

Interesting post from the FlightGear blog via Curtis Olson:

## Motivation

Air France #447

On June 1, 2009 Air France flight #447 disappeared over the Atlantic Ocean.  The subsequent investigation concluded “that the aircraft crashed after temporary inconsistencies between the airspeedmeasurements – likely due to the aircraft’s pitot tubes being obstructed by ice crystals – caused the autopilot to disconnect, after which the crew reacted incorrectly and ultimately caused the aircraft to enter an aerodynamic stall from which it did not recover.”  https://en.wikipedia.org/wiki/Air_France_Flight_447

This incident along with a wide variety of in-flight pitot tube problems across the aviation world have led the industry to be interested in so called “synthetic airspeed” sensors.  In other words, is it possible to estimate the aircraft’s airspeed by using a combination of other sensors and techniques when we are unable to directly measure airspeed with a pitot tube?

## Basic Aerodynamics

Next, I need to say a quick word about basic aerodynamics with much hand waving.  If we fix the elevator position of an aircraft, fix the throttle position, and hold a level (or fixed) bank angle, the aircraft will typically respond with a slowly damped phugoid and eventually settle out at some ‘trimmed’ airspeed.

If the current airspeed is faster than the trimmed airspeed, the aircraft will have a positive pitch up rate which will lead to a reduction in airspeed.  If the airspeed is slower than the trimmed airspeed, the aircraft will have a negative pitch rate which will lead to an acceleration.  https://en.wikipedia.org/wiki/Phugoid

The important point is that these variables are somehow all interrelated.  If you hold everything else fixed, there is a distinct relationship between airspeed and pitch rate, but this relationship is highly dependent on the current position of elevator, possibly throttle, and bank angle.

## Measurement Variables and Sensors

In a small UAS under normal operating conditions, we can measure a variety of variables with fairly good accuracy.  The variables that I wish to consider for this synthetic airspeed experiment are: bank angle, throttle position, elevator position, pitch rate, and indicated airspeed.

We can conduct a flight and record a time history of all these variables.  We presume that they have some fixed relationship based on the physics and flight qualities of the specific aircraft in it’s current configuration.

It would be possible to imagine some well crafted physics based equation that expressed the true relationship between these variables …. but this is a quick afternoon hack and that would require too much time and too much thinking!

## Radial Basis Functions

From a practical perspective, I don’t really need to understand how radial basis functions work.  I can simply write a python script that imports the scipy.interpolate.Rbf module and just use it like a black box.  After that, I might be tempted to write a blog post, reference radial basis functions, link to wikipedia, and try to sound really smart!

## Training the Interpolater

Step one is to dump the time history of these 5 selected variables into the Rbf module so it can do it’s magic.  There is a slight catch, however.  Internally the rbf module creates an x by x matrix where x is the number of samples you provide.   With just a few minutes of data you can quickly blow up all the memory on your PC.  As a work around I split the entire range of all the variables into bins of size n.  In this case I have 4 independent variables (bank angle, throttle position, elevator position, and pitch rate) which leads to an n x n x n x n matrix.  For dimensions in the range of 10-25 this is quite manageable.

Each element of the 4 dimensional matrix becomes a bin that holds he average airspeed for all the measurements that fall within that bin.  This matrix is sparse, so I can extract just the non-zero bins (where we have measurement data) and pass that to the Rbf module.  This accomplishes two nice results: (1) reduces the memory requirements to something that is manageable, and (2) averages out the individual noisy airspeed measurements.

## Testing the Interpolater

Now comes the big moment!  In flight we can still sense bank angle, throttle position, elevator position, and pitch rate.  Can we feed these into the Rbf interpolater and get back out an accurate estimate of the airspeed?

Here is an example of one flight that shows this technique actually can produce some sensible results.  Would this be close enough (with some smoothing) to safely navigate an aircraft through the sky in the event of a pitot tube failure?  Could this be used to detect pitot tube failures?  Would this allow the pitot tube to be completely removed (after the interpolater is trained of course)?

Synthetic airspeed estimate versus measured airspeed. Zoom on one portion of the flight. Zoom in on another portion of the flight.

## Source Code

The source code for this experimental afternoon hack can be found here (along with quite a bit of companion code to estimate aircraft attitude and winds via a variety of algorithms.)

## Conclusions

This is the results of a quick afternoon experiment.  Hopefully I have showed that creating a useful synthetic airspeed sensor is possible.  There are many other (probably better) ways a synthetic air speed sensor could be derived and implemented.  Are there other important flight variables that should be considered?  How would you create an equation that models the physical relationship between these sensor variables?  What are your thoughts?

• Moderator

Great as ever Curt

• No Bojan, this has nothing to do with INS.

• Curt said:

If you could condense your suggestion down to a sample formula, maybe I could test it out now that I have the code and infrastructure in place to run this on sample flight data.

Curt, If you could try re-running the RBF training with only three independent variables of vertical acceleration (perpendicular to thrust vector, if possible), pitch rate and elevator position it would be very interesting to see how well that correlates.

As far as the high-speed fidelity, it may be a limitation because the difference in angle of attack becomes very small as speed rises - i.e. your signal will shrink rapidly as a 1/x^2 function.

• Developer

This is essentially MIMO sys ID of airspeed.  Creating a S-domain equivalent would likely be mathematically simpler. Cool idea.  The EKF airspeed  estimator on APM is also an out of the box solution that is working pretty well.  We have used the synthetic airspeed measurement for some time now on a dropped glider that doesn't have room for the sensor.  It might be interesting to do a MIMO model in matlab for airspeed.  If I get time I might try it and see how much cleaner it might be.  Cool part would be that it could be implemented in like 10 lines of code on APM.  Down side is that it's still got to be post processed in matlab for every vehicle.  The EKF estimator does it online real time without having the need for truth data.

• Hi Paul, I'm definitely playing with (mostly fixed wing) drone stuff and using commodity sensors like mpu6000, ublox6 (or 8), eagletree pitot probe, etc.  And you are right that all the aircraft flight logs I've pushed through this process are electric powered.

• Just got the hint you are not playing with drone stuff. So please ignore my quess you are using an electrical powered plane.

• Damned that is f*ckn genious! Honestly, a big applause from me.

In terms of safety, redundancy and hardware simplicity this is a quite a step forward.

As you speaking from more reasonable input parameter in your "black box" (so cool) I like to propose some. Not claiming these are better, just different.

I guess you use are using an electrical engine with current and voltage sensor, so:
1. Power consumption from the motor, and 2. prop revs. (What actually matters is the torque, but the power consumption should discribe that value reasonable)

If I have understand your black box principle correct I think this two parameters should also work. A limit is probably a propeller with a not to high pitch/diameter value (everything with smaller or equal one is smooth), otherwise the power consumtion is changing less at low speeds.

Again great work!

• Hi Andrew, you are probably right in your analysis.  My background is computer science so I'm just pretending to be an aerospace engineer here.  You don't have to dive deep to start finding the gaps in my knowledge base.  If you could condense your suggestion down to a sample formula, maybe I could test it out now that I have the code and infrastructure in place to run this on sample flight data.

For what it's worth, I observe that my rbf estimator seems to track much better at low speeds and loses fidelity at high speeds ... maybe that's in part to not properly considering that lift is proportional to the square of IAS?

• Martin: yes of course, basic pitch and power management should always keep you out of trouble.  When I setup my UAV's I will often set strict limits on max pitch angle and max elevator deflection so that it becomes almost impossible for the flight controller to enter the stall region.  But that said, there are use cases for synthetic airspeed.  The obvious one is when your pitot tube becomes obstructed with ice or rain or dirt or whatever.  Another use case (that I personally encountered) is a marine uav designed to be launched from a small boat and land in the water.  It would have been so nice if we didn't need to worry about making the pitot system water proof.

• Why not do it the way real pilots do (the way the AF447 pilots failed to accomplish)?

Boeing instructs the following actions for a safe recovery from the "unreliable airspeed"-condition:

Maintain control of the airplane with basic pitch and power skills.

• Establish a pitch attitude and power setting that are appropriate to the situation

From here: click!

Setting correct power and pitch will always put an aircraft within the safe flight envelope. Of course flying like that is much less precise and the flight performance is much less predictable. Flying according to flight plans is strongly impacted and requires higher safety buffers.

Aero 23 - Erroneous Flight Instrument Information-Situations and Guidance
AERO is a quarterly magazine published by Boeing Commercial Airplane Group providing operators of Boeing and Douglas commercial airplane products wit…
This reply was deleted.