Monday, 25 February 2019

Crow-aware adaptive elevator trim

In this post I describe an adaptive trim system which makes it easy to achieve perfect pitch trim at all crow settings.

Using the adaptive trim, the trim lever is repurposed so that it bends the crow compensation curve. The process is completely transparent - no special action is required by the pilot.

I'm now using this system across all my F3F models. It allow me to optimise the trim on a new model, even before the first landing.

Quick revision: crow compensation

Crow brakes are at their heart very simple: the flaps go down and the ailerons go up, increasing the model’s rate of descent. However crow brakes have an unwelcome secondary effect, in the form of a non-linear pitching moment.

The standard remedy is a crow-to-elevator mix, plus a compensation curve to handle the non-linear behaviour.  Typically the curve starts steep, tailing off at mid-crow and maybe increasing again at full crow.

Crow/elevator 'compensation' curve on author's Stribog

The problem is that curves are normally adjusted manually. These means landing the model each time, and it can take several flights to get right.

But hey, it's really just about pitch trim... wouldn’t it be nice if we could simply use the elevator trimmer to bend the curve whilst flying the model?  Turns out it is indeed possible.

Adaptive trim system - how it works

There are three elements to the adaptive system. The first is to repurpose the elevator trim lever as a dumb two-sided momentary switch - easily done in OpenTX. Once freed from its normal duties, the trim becomes a highly flexible tool!

The second element is the Lua script. It's job is to monitor the trim lever. When a 'click' is detected, the script determines the amount of crow, identifies the nearest point(s) on the compensation curve, and moves that part of the curve up or down.

Finally, the elevator correction is obtained via a crow-to-elevator mix, with the compensation curve applied.

With minimal crow (up to around 4%) the system emulates a regular trim lever (limits = +/-25% of full travel). Beyond that, the limits are relaxed allowing for aggressive compensation. Beeps and repeats are handled in the script.

Info screen

Changes to the compensation curve are reflected in the OpenTX 'Curves' menu. In addition, a custom screen displays the curve along with crow value and active points. The screen is just for info - there is no need to look at it whilst flying.

Telemetry screen (X9D, X9D+, X9E). Vertical bar is crow value.

OpenTx Widget (X10, X12S)

In use

To optimise the curve, the pilot makes a couple of passes through the crow range, adjusting the trim as needed.

With slope soarers and F5J models, optimisation can be completed in a single flight. Thermal soarers may require a couple of flights due to reduced flight time.


Below is a video showing how the system works, and the result of a flight test in a 40 mph wind. Just to make things difficult, the curve was zeroed before the flight.

Download the script

The Lua script can be downloaded here. [23 Sept 2020 - version 3 supports all transmitters from the X9-Lite to the X12S, and clones].


My thanks to Lothar Thole for porting my original script to the X10 and X12S. Also to MiamiMike, L Shems, and hisroyaldudeness on RC Groups for their invaluable input.


pernstig said...

Implemented the This Lua to my TopModel Astra V-tail and it´s working perfect, at least on my workshop desk. Modified to be activated by TrmT as I am used to have both motor comp and spoiler comp on this trim. When (if!) wheather improves in Sweden I will try a test flight soon. Thanks a lot!

Philippe said...

This is great! I am already a big fan of your F3F, Wingy, Ahi and F5x templates which are a blessing for those not as fluent in OpenTX and Lua than you, Mike. Thinking about it, your OpenTX F3F template was my reason to move from Graupner to FrSky some years ago.

Your Crow-aware adaptive elevator trim will find its way to your F3F template soon.

Small thing: On the blog page above you mention a different set of compatible radios compared to the script page (X10 and X12 not mentioned).

Many thanks for your continued contributions to the OpenTX community.

RvD said...

Have 2.1 and incorporated into the eSoar Template on my older Horus X10 - works well.
Tried installing it on my new Horus X10S Express and comes back with an "unsupported radio" error message on the widget screen. Is the Express supported, and does the lua script need to be modified?

RC Soar said...

Hi @RvD: it'll work fine with the Express (and other X10 clones) if you comment out the radio checks by inserting two dashes at the start of line 200. It should look like this:

-- if not supported[radio] then AdpError = "Unsupported radio" return end

The published scripts will be updated in due course.

RC Soar said...

Version 2.4 of the widget version (for colour screen tx's) is now available. The radio checks have been removed so it'll work with any such transmitter, including X10 Express etc.

RvD said...


UlfH said...

I have added and changed a few lines of code to make this script work with low resolution radios as well, e.g. QX7 or Xlite (version 2.2.1). I will send it to Mike and he can use it as he wants.

RC Soar said...

@UlfH: received - thank you!

RC Soar said...

Version 3 is now available, adds support for transmitters with 128x64 mono screens e.g. Q X7, X9 Lite etc. More info and download