Monday, 25 February 2019

Crow-aware adaptive elevator trim

If you fly advanced sailplanes, you'll almost certainly be using crow brakes. And you'll also know of the difficulty of achieving perfect pitch trim, due to the non-linear crow/pitch coupling.

In this post I describe an adaptive trim system which makes it easy. The pilot simply uses the elevator trim to correct pitch deviations regardless of crow. The system is based on a Lua script.


Landing approach with full crow

Quick revision: crow compensation


The idea behind crow brakes is simple: the flaps go down and the ailerons go up, increasing drag and the model’s rate of descent..

However crow brakes also generate an unwanted side effect in the form of an upward pitching moment; moreover, the effect is non-linear. The standard way to deal with this is using a crow-to-elevator mix, plus a 'compensation' curve. As crow is deployed, so a variable compensatory offset is applied to the elevator:

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

This is all very well, but curves can only be adjusted manually. This means landing the model, then guessing which points to adjust, then diving in to the curves menu. Consequently, it can take several flights to get it right - if the pilot can be bothered.

But hey, it's really 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!


A better mousetrap


With the crow-aware adaptive trim system, the elevator trim lever is radically repurposed. Instead of applying an offset, it bends the compensation curve. The system knows which points to adjust, as well as the limits of adjustment, so no special action is required from the pilot.

The heart of the system is a Lua script. Its sits in the background, monitoring the elevator trim. When a click is detected it reads the crow value and moves the corresponding point(s) on the curve up or down. The script also handles repeats and beeps, emulating normal trim behaviour.

Changes to the compensation curve are reflected in the curves menu. In addition, a custom screen shows the active curve points and crow value.


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

OpenTx Widget (X10, X12S)


For this to work, the behaviour of the trim lever must changed so it acts as a dumb on/off/on momentary switch. Fortunately this can be done within OpenTx (no hardware changes required).


In use


Using the adaptive trim is straightforward. The idea is to apply varying amounts of crow, trimming the elevator at each setting. A couple of passes through the crow settings may be required to fully optimise the curve. With most models, the trimming can be done in a single flight (thermal soarers may require a couple of flights due to reduced flight time).

Around zero crow, the trim lever emulates the system default behaviour, in other words +/-25% range with min/max/centre audio callouts. As crow is deployed the min/max limits are relaxed allowing aggressive compensation to be applied if required.

Below is a video showing the aftermath of the test flight with my Stribog F3F model. It shows (a) the script running on my X9D+ and (b) the compensation mix in action. To make it a proper test, the compensation zeroed before the flight - in practice, one would pre-configure the curve according to the manufacturers suggested compensation.

The test was concluded successfully despite a 40 mph wind. Note that an early version of the script was used, with 4 points instead of 5.





Download the script


The Lua script and a demo setup can be downloaded here. At the time of writing, the script supports the X9D, X9D+, X9E, X10, X12S and Jumper T16.

A good working knowledge of OpenTx is required in order to modify your setups. If you're using my F3X templates, then please familiarise first by reading the Excel reference.


Acknowledgements


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

3 comments:

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.

RC Soar said...

@Philippe: thanks for your feedback. List of supported tx's now corrected.

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

Agree would be nice but... one of the main goals with the OTX templates is ease of migration across OTX versions and tx hardware. Unfortunately the scripts are tx dependent, and the Lua API is still evolving with each OTX version. Keeping these scripts optional makes it all much easier to manage.