Monday, 25 February 2019

Crow-aware adaptive elevator trim

Crow brakes are a fantastic aid for achieving accurate landings. However, they also generate an unwanted pitch change and - just to complicate matters - the effect is non-linear. The traditional remedy is to make adjustments to a mixer curve, and it can take several flights to get it right.

In this post, I describe a smart way to adjust the curve, using the regular elevator trim. This means that the pilot can achieve perfect trim in just a single flight.

Graphic of crow aware adaptive trim system

Quick revision: crow compensation

Crow brakes are at their heart very simple: the flaps go down and the ailerons go up, increasing drag and therefore the rate of descent. 

However, crow brakes also generate a non-linear upward pitching moment. Left uncorrected, the pilot has to juggle the elevator while deploying the brakes, making it difficult to maintain a steady glide path angle during the landing approach. 

The 'compensation' mix

The standard remedy is a crow-to-elevator mix, with a compensation curve to deal with the non linear behaviour. Typically, the compensation curve starts steep and then tails off:

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

Traditionally the curve is adjusted manually. This means landing the model each time, and it can take several flights to get right. Needless to say, it's a tiresome process.

But hey, it's really about pitch trim... wouldn’t it be nice if, intead of adjusting the curve manually, we could bend it in real time, using the regular elevator trimmer? That way, we would be able to achieve perfect trim while flying the model!

It turns out that this is indeed possible.

The Adaptive Trim system - how it works

There are three parts to the adaptive trim system. 

The first part is to repurpose the elevator trim lever as a dumb two-sided momentary switch - easily done by disabling the trim function. Once freed of its normal duties, the trimmer becomes a highly flexible control.

The second element is the trim handler. Its job is to wait for the trim to be clicked. When a click is detected, it fetches the crow value, identifies the nearest point(s) on the compensation curve, and moves the point appropriately. With EdgeTX and OpenTX, a Lua script is needed. With Ethos, this step can be done using logical switches and VAR actions, no Lua required. 

Finally the compensation curve is applied to a regular crow-to-elevator mix. Nothing special here.

With small amounts of crow (up to around 4%) the system emulates a regular trim lever (+/-25% travel) including beeps and repeats. Beyond 4% the limits are relaxed allowing for aggressive compensation.

Telemetry screen

The Lua script solution (for EdgeTX/OpenTX) generates a custom telemetry screen showing the curve and crow value. This is just for pre-flight checks - there is no need to look at it whilst flying. 

Telemetry screen (X9D, X9D+, X9E). Vertical shows the crow value.

OpenTx Widget (X10, X12S)

Optimising the trim

The procedure for optimising the trim is straightforward. The pilot deploys crow incrementally, adjusting the trim as needed. 

Two or three cycles through the full range of crow will normally be required. With slope soarers and F5J models, optimisation can be accomplished in a single flight. Thermal soarers may require a couple of flights due to reduced flight time.

Video 

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 compensation curve was zeroed before the flight.



Download the script

The Lua script for OpenTX and EdgeTX is available here.

For Ethos, no script is needed thanks its powerful curve features. Most of my Ethos templates have adaptive trim built in. The Excel documentation provided with each template explains how it works.

Acknowledgements

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


15 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.

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...

Thanks!

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

Javier ariza said...

Javier Aiza - CVC Barcelona - Spain

This is great! I am already a big fan of your F3F, Ahi and others templates which are a blessing for those not as fluent in OpenTX and Lua, thank you.

I'm thinking about you on each landing.

Your Crow-aware adaptive elevator trim its rally a good solution and help me so much on my landings. I recommend it to several pilots, close friends, and they are so000oo happy with it.

Just to know, maybe a silly idea, if we can have more point in the curve, how to implement it???

great job. Congratulations again

RC Soar said...

@Javier, thanks for the feedback :-) Yes it's possible to add extra points but some Lua experience would be necessary. First increase the number of points in curve adp, and then adjust NPTS in the script. You would also need to adjust the 'regions' array. An easier enhancement would be to adjust the distribution of the 'regions' array without increasing the number of points.

Javier ariza said...

Hi. , thanks very much for your reply. ;)
I'm analysing such LUA and to be hones it's really nice job.
I'll try to change it, just only curiosity.
If work I'll let you know together with alterations to original code for your approval.

Thanks again . Great contribution

regards
Javier Ariza CVC Barcelona - Spain

RobinS said...

I use adaptive trim with crow and also on my spoiler only equipped models too where it works well.

Josh said...

Does this work in Ethos

RC Soar said...

From Ethos 1.5 it can be done natively without a Lua script.
https://rc-soar.com/ethos/templates/f3f/