Monday, 25 February 2019

Crow-aware adaptive elevator trim

The goal of this project was to simplify the adjustment of crow compensation. The traditional method involves manually editing the compensation curve, which of course means landing the model each time.

With the adaptive trim system, crow compensaton can be optimised in a single flight, without the need for manual adjustment. The secret is to repurpose the elevator trim, so instead of providing a constant trim offset, it bends the compensation curve. The process is transparent for the pilot.

Crow brakes - a quick revision

Crow brakes are great for controlling rate of descent. However they also produce an unwanted side effect, in the form of a crow/pitch coupling. To complicate matters, the coupling is non-linear.

Crow compensation curve on author's Stribog

If left uncorrected, the coupling will cause the model to pitch up by an amount which varies as crow is deployed - hardly conducive to smooth landing approaches!

The traditional approach, and drawbacks

Most radios deal with the issue in a similar way, by offsetting the elevator as crow is deployed. The offset is made up of two components:

  • The base trim, adjusted in the normal way using the elevator trim lever. This provides -25% to +25% adjustment. Must be adjusted with crow off.
  • A crow-dependent mix. There are two adjustments for this: the mixer gain (adjusted manually, or with the throttle trim), and a crow-dependent curve (adjusted manually).
Pitch trim (standard method)

Optimising the trim is a 3-step process
  1. Fly with minimal crow, adjust elevator trim
  2. Fly with maximum crow, adjust throttle trim (or manually)
  3. Fly with intermediate crow. Land the model, alter the curve manually. Repeat as required. 
The procedure is hardly intuitive, and it can take several cycles of (3) to complete. However given the limitations of traditional RC systems, especially with regard to dynamic editing of curves, it's been the only solution available... until OpenTx and Lua came along.

Adaptive trim system

With the adaptive trim system, the only control is the elevator trim lever:

Adaptive trim scheme

When the trim lever is clicked, the appropriate part of the curve is 'bent' up or down automatically. When crow is at idle, the system emulates the default trim behaviour i.e. with a range of +/- 25%, and "trim centre" callouts.

Demonstration of adaptive system

Below is a video showing (a) a bench demo and (b) the result of the first test flight.

    Flight test 

    Before the flight, I set the trim curve to zero. During the flight, I varied the crow, using the elevator trim lever to achieve a slightly nose down attitude. It took two or three iterations but I arrived at a fully compensated setup quite quickly bearing in mind the 40 mph wind. All in all, very happy with the flight testing.

    How to implement the adaptive system (warning: knowledge of OpenTx required)

    Now we've seen what the system does, let's take a look at the implementation. The first task is to modify the elevator channel:

      I2:Ele Weight(+100%) NoTrim
      Thr Weight(+100%) NoTrim Curve(CV2:trim) [EleTrim]
    The first line is the elevator stick. Note that the trim lever is ignored - this leaves us free to re-purpose it, which we'll do in the next section. Instead, the trim value is added in the next line.

    The second line is the new adaptive trim. The source is the crow stick ('Thr'), and as crow is deployed, so the amount of trim varies according to curve CV2. It's similar to a regular compensation mix; however, instead of editing the curve manually, the pilot will 'bend' the curve using the elevator trim.

    Re-purposing the trim lever

    The next task is to alter the behaviour of the elevator trim, so it emulates a 3-position switch. We start by disabling the default behaviour in the Flight Modes menu:

      Ele trim = '--'

    The trim is now a dumb switch.

    Next, we create three special functions to store the state (up/centre/down) in a GVAR:

    SF1  EleTrim Down - Adjust GV1 (Value -1)
    SF2  !EleTrim Down - Adjust GV1 (Value 0)
    SF3  EleTrim Up - Adjust GV1 (Value 1)

    GV1 now stores the state of the trim lever in real time: -1=down, 0=centre, 1=up. The Lua script will use this to detect clicks and repeats.

    Bending the trim curve via a telemetry script

    The third part of the jigsaw is a Lua telemetry script. The script constantly monitors the state of the trim lever via GV1. When a click is detected, it reads the crow value, determines which points on curve CV2 to alter, and updates the curve.

    The script also displays the curve in a custom telemetry screen.

    Download the script

    The test flight has validated the concept, and I have since made some improvements e.g. simpler installation, 5-point curve support, and data validation with error messages. Just waiting for some decent weather for the second test. [edit 24th March: version v 1.6 kindly tested by Lothar T].

    Meanwhile the latest version can be downloaded here. Feel free to use and adapt it - I'd welcome any feedback.


    My thanks to MiamiMike, L Shems and hisroyaldudeness on RC Groups for their invaluable input.

    No comments: