Developer

Advances in airspeed handling

3689549422?profile=originalWith the release of the 2.74 version of APM:Plane and the introduction of TECS, the ability of APM to take full advantage of an airspeed sensor for fixed wing aircraft was greatly enhanced. A lot more people are now buying and installing airspeed sensors. APM has had support for airspeed sensors for a long time, but tuning for good airspeed control was somewhat difficult and error prone. Now it is much easier.

The next APM:Plane release will be 2.75, and will come out soon. In that release airspeed sensing will be improved even more, with three key changes.

New Digital Airspeed Sensor

The first change is to add support for a new digital airspeed sensor from Measurement Specialities, the MS4525DO. The PX4 dev team announced this sensor recently, and I've been test flying it to ensure it works well with APM. It does! This new sensor is a huge advance over the analog sensors we've been using up to now.

The key difference is how low the thermal drift is in the reported differential pressure. A long standing problem with airspeed sensors has been the drift in the reading as the sensor warms up. This doesn't matter very much if you only need accurate airspeed readings at high speed as the contribution of thermal drift to airspeed drops rapidly with speed (as airspeed is proportional to the square root of the measured differential pressure). At lower speeds, such as when landing, it can matter, and having a sensor with low thermal drift is very nice. The I2C based MS4525D0 has internal temperature calibration to cope with thermal drift, which really helps.

The difference can be seen in the following graph

3689549299?profile=originalthe green line in the graph shows the airspeed from an analog sensor, and the red line shows the airspeed from a MS4525D0 digital sensor. The readings were taken on two Pixhawk boards side by side, started at the same time. You can see that the analog sensor drifted quite quickly to above 2 m/s average, whereas the digital sensor settled at around 0.5 m/s.

Right now we only have a driver for the MS4525D0 on the PX4 and Pixhawk. It would be possible to write a driver for the APM2, and we'd welcome a contributed driver.

Before we settled on the MS4525D0 we also tried the EagleTree I2C airspeed sensor but we found it suffered from thermal drift just as badly (and in some cases more badly) than the analog sensor. We still have the EagleTree driver in the tree, so if you have an ETS airspeed sensor it will work, but we don't recommend it if you can get the MS4525D0.

Automatic Airspeed Calibration

The 2nd big airspeed change in the 2.75 release will be the introduction of automatic airspeed ratio calibration. The airspeed ratio is the ratio between the calibrated airspeed and the square root of the differential pressure measured by the sensor. This ratio is normally around 2, and is controlled with the ARSPD_RATIO parameter in APM:Plane.As is described in the documentation, it is common that this ratio needs to be calibrated for different airframes. There are several reasons why the ratio may be different from 2.0:

  • positional error, caused by how the sensor is installed in the aircraft
  • sensor error, caused by small leaks or differences in sensor construction
  • pressure altitude differences, caused by changes in airspeed measurement with altitude

For previous releases of APM:Plane users wanting the best possible airspeed measurement needed to calibrate the sensor themselves, by flying the aircraft and looking at the logged airspeed compared to groundspeed. That worked, but it was not convenient.

For the 2.75 release Paul Riseborough has contributed a small 3 state Kalman filter which can automatically calibrate the airspeed ratio while flying. To enable it you need to set ARSPD_AUTOCAL to 1 and then just fly normally. The ARSPD_RATIO is automatically updated while you are flying. The following graph shows it working on my AcroWot:

3689549371?profile=originalI had deliberately set ARSPD_RATIO to 1.2 on takeoff to give the autocalibration code something to do. As you can see, the groundspeed and airspeed don't match at all well while the ratio stays low. After a few minutes of flying the autocalibration has raised the ratio to the right value of 2.0, and the airspeed nicely matches the average groundspeed.

Compensation for pressure altitude

The final major change in airspeed handling for the 2.75 release is the introduction of the EAS2TAS ratio throughout the code. The EAS2TAS is the estimated to true airspeed ratio, and reflects the fact that airspeed measured by an airspeed sensor drops relative to the true airspeed as altitude increases. This change is due to the lower air pressure, which means less air molecules hitting the sensor.

We already had compensation for EAS2TAS in the core navigation code in the 2.74 release, but for 2.75 we have propagated this ratio throughout the code. In particular the ratio is now used to adjust tuning parameters in the servo control loops, adjust the navigation code and even adjust the loiter radius with altitude. The idea is to make APM tuning parameters for an airframe be the same at sea level as it is at the top of a mountain, which will make it easier for users to share parameters, and also be a big advantage for anyone who flies at a wide variety of altitudes.

We have tested this code using the excellent JSBSim flight dynamics simulator, which allowed us to take a simulated aircraft up to altitudes far beyond what we could go to with a real R/C model. The EAS2TAS compensation worked well up to altitudes of around 30km.

Overall the upcoming 2.75 release should be a big improvement for anyone using an airspeed sensor. We hope you enjoy flying it!

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • HI Andrew, 

    is the Airspeed MicroSensor V3 the same as the Aidpeed I2C?  or is it a new airspeed sensor?  http://www.eagletreesystems.com/index.php?route=product/product&amp...

    Measures airspeed from 9 MPH to 350 MPH (15KPH to 563KPH), with 1 MPH (1 KPH) Resolution
    · Power input (Standalone Mode)  4V to 16V
    · Circuit Board: Weight 4 grams (0.15 oz), dimensions 28 mm x 16 mm x 10 mm (1.1" x 0.62" x 0.4")
    · Pitot Tube: Weight 3 grams (0.1 oz), length 80mm (3.2"), diameter 4 mm (0.16")
    · Pitot Tube Hose: Silicon, clear, 3 feet (1 meter), 1.5mm ID, 2.5mm OD
    · Precalibrated  no user calibration required
    · Advanced Temperature Compensation
    · Metric or English units

  • I agree with Dyer. If you concern is the dust the digital sensor will no resolve the issue.

  • Moderator

    The pitot tube is a closed system, it does not pass air through it, it just registers the air pressure thus should have no problem in dusty environments. It will only clog if pressed into dirt (or crashed) or obstructed in some way.

  • HI,

    I am working on a fixed wings plane and I want to fly it in a dust and mud area and a friend has told me to nose use the pitot because it may cause problem if dust go inside, but I am not feeling Ok to go without the sensor because the normal wind speed is not stable and it is between 20 to 30km/h where we want to fly the plane.

    I have the APM now? have anyone ever faced this issue before? If we upgrade to pixhawk, will the digital sensor have the same issue? 

    Regards

    Elios

  • Swift, a standard way to evaluate secondary instrument performance is to use a test rig. A  pitot-static test rig. A DIY setup can lead to good results.  I have put online some info on the topic.

  • 300km

    Any news if this is ready yet. 

  • 100KM
    Excellent... Very excited to try!
  • Developer

    I'm hoping 3DR will start selling it soon. I've reminded Craig about it a few times :-)

  • 100KM

    Great news, how do I go about getting my hands on the digital MS4525D0 ??

  • Thanks Paul. Will try it out. Guess I don't need to use KFF_THR2PTCH

     

This reply was deleted.