Heading image

Happiness is... sunshine, a model, and an X20!

Key concepts of Ethos

Introduction

Ethos is a wonderfully flexible operating system, however if you've come from another brand like Futaba or Spektrum it may seem a little strange at first. My aim with this article is to explain how Ethos works, and to give you the knowledge needed to design your own setups from scratch. So let's get started…

The processing loop

Like all RC operating systems, Ethos executes a processing loop — a series of instructions repeated several times a second. It's so quick that your servos appear to respond perfectly smoothly!

During each cycle: Ethos turns your stick movements into channel position commands. The graphic below shows the main processes during each cycle:

Processing loop

The processing loop

Note the main processes: Mixers and Outputs

The ability to consider logic and geometry separately is one of the great strengths of Ethos. Don't worry if this doesn't make much sense yet - it will all start to click when you program your models!

Okay, so now let's dive a little deeper.

Sources

In Ethos, your transmitter controls – the sticks, knobs, sliders etc. – are known as sources. Each source has a name like 'rudder', 'elevator' or 'pot1'. Each source carries a value between −100% and +100% representing the displacement from the centre position.

Sources are used in mixers and logical switches.

Channels

Ethos provides 64 general purpose channels. As far as the programming is concerned, all have equal status. However, depending on the RF configuration, only the lower ones are actually transmitted. So, when you create a new model, Ethos assigns the lower numbered channels to your servos. Higher channels can be programmed for other purposes, with their outputs 'cascaded' to mixers belonging to other channels.

Each channel carries a percentage value, the meaning depending on the processing stage:

Later, we'll see how the conversion from percentage units to servo positions is managed in the Outputs stage.

Mixers

Mixers are the beating heart of your setup. Together, they define how the servos respond to stick movements. Various mixers are available, however they are all have one key factor in common:

One (1) mix represents an interaction between one (1) input, and one or more (>=1) channel outputs.

OpenTX users will note an important difference, in that a mixer in Ethos can output to more than one channel.

A setup may consist of between one and dozens of mixers, depending on its complexity.

Mixer inputs

Every mix has an input. The input source represents the physical control on the transmitter and is typically a stick, slider or knob.

With some mixers, the input source is implicit in the mixer name — for example the source for the Ailerons mix is the aileron stick. For other mixers like Camber and Butterfly, where there is no convention, you choose the source yourself. There's no hard rule here, so you may want to look at the mixers page for information on a particular mix.

The same physical control may drive several mixers simultaneously. For example, on F3X gliders, the aileron stick may be the source of an (1) Ailerons mix, (2) Ailerons=>Flap mix, and (3) an Ail=>Rudder mix. Plugging in extra mixers is a simple way to extend the functionality of your setup.

Mixer outputs

Each mix has one or more channels associated, otherwise known as outputs. The number of outputs will depend on the particular mix, and on the type of control surface.

As an example, consider the Elevators mix. For a model with a cross-tail, the mix will have one output (since there's just one control surface). For a V-tailer or flying wing, there will be two control surfaces, each with one servo, so the mix will have two outputs. Most of the time Ethos will configure the outputs appropriately when you create the model using the wizard. However you can change them later, by going into the mixer editor.

A particular channel may be specified in multiple mixers simultaneously. For example, a flap channel might be driven by: (1) an Aileron=>Flap mix, (2) a Camber mix and, (3) a Butterfly mix. Each mix makes an additive contribution to the flap channel.

Creating mixers

When you add a model using the new model wizard, Ethos automatically creates the appropriate mixers and outputs. Often, however, you'll want to extend the functionality by adding extra mixes.

When adding a mixer, the first step is to identify the input source, and the destination channels. Then look for a suitable pre-built mixer which already uses those elements; if none is available, you can fall back on a free mix.

As an example, consider a knife edge mix. The purpose of such a mix is to counteract the roll effect generated by the rudder. So, the input is the rudder stick, and the outputs are the aileron channels. You can either use the predefined Rud=>Ail mix, or you could create a free mix as follows:

Freemix:"KnifeEdge" Input=rudder_stick Outputs=CH:LeftAil, CH:RtAil

Mixer parameters

Each mix has a number of parameters which determine how the outputs are calculated. The key parameters are weight, curve, and offset (for a full list, see the mixers page).

Ethos calculates the outputs as follows:

  1. Gets the input value (−100% to +100%)
  2. Applies curve (if specified)
  3. Multiplies by weight
  4. Adds offset
  5. Adds trim (if applicable)

It's worth bearing in mind the order, especially when using a curve (the curve is applied first). Finally, if the output value were to exceed +/−100%, it is clipped to those limits.

Mixer filters

Filters are options which determine whether a mixer is active or inactive. Mixers which are inactive are shown dimmed, and do not contribute to any outputs.

There are two filter options: active condition, and flight modes:

screenshot of filter fields

Mixer filters

Active condition is typically a switch (physical or logical). For the mix to be active, the active condition must be satisfied. The default is 'always on'.

The Flight modes filter is simply a list of flight modes. The currently active flight mode must be in the list for the mix to be active. By default, all flight modes are included in the list.

Both the active condition and flight modes filters must be satisfied for the mix to be active.

That concludes our introduction to mixers. For details about the individual mixers, please see the Mixers Reference page.

How channel values are calculated

In this section, I'll explain how channel values are calculated. Central to this process is the mixer list:

shows mixer list

The mixer list. Each line shows the name, source, and one or more output channels

At the start of each processing cycle, Ethos resets all 64 channel values to zero. It then steps through the mixer list, top down. For each mix, the outputs are calculated and added to the corresponding channel values. When all the mixers have been processed, each channel value will be the aggregate of all its contributing mixes.

If a channel has no contributing mixers, it will have a value of zero corresponding to the centre position.

Outputs

Once the mixer values have been aggregated, the result is passed to the Outputs layer. The Outputs performs two tasks: first it clips the incoming aggregated mixer values so they lie between +/-100%. Finally, it converts the results to PWM values representing servo deflections, ESC setting etc. Let's look at each process.

Channel clipping

If a channel is driven by more than one mixer, it's possible that aggressive stick movements would cause the aggregated mixer value to exceed nominal limits of +/-100%. A common example is a V-tail setup, where each V-tail channel is driven by both rudder and elevator controls.

To prevent channel values exceeding safe limits, Ethos clips (limits) them so that they lie between −100% and +100%. If one or other limit is reached, the servo will stop dead leading to deadband at the stick. You can avoid this condition by reducing the weight of the constituent mixers. For example, with a V-tail setup, reduce the weight of the elevator and rudder mixes so that their sum is ≤100%.

By now, you're probably asking: what do these % channel values actually mean? You can think of them as percentage of available movement on that channel.

Mapping of channel values to PWM commands

Next, the (clipped) channel values are mapped (converted) to PWM values representing actual servo deflections. This is where your mixer logic hits the real world of servos and linkages!

The mapping is defined by Min, Max, Subtrim and Direction. Together these define a three-point curve.

Since the channel values have been clipped to +/−100%, Min and Max also represent servo limits.

PWM units

Although PWM values are normally shown in μs (microseconds), they are entered as percentages of standard servo travel. The relationship between the units is as follows:

In practice, you don't need to worry too much about their values, as you'll make the adjustments visually.

The Outputs monitor

The outputs monitor screen is a useful debugging aid. All 64 outputs are displayed, eight to a page. Each output shows:

outputs menu

The outputs menu, showing the aggregated mixer values (green bars) and the final output/PWM values(orange). Note PWM value in μs above channel bar.

Mixer functions (advanced topic!)

That's all the main items covered... but here's a little extra before we finish. It's about mixer functions and it's quite advanced; you only need to read this if you intend using free mixes. Here goes …

Each mix has a function associated, for updating the channel values during the main processing loop. For all mixers except Freemix, the only function available is add, and cannot be changed (in fact the option is hidden). Since addition is not order-sensitive, you can position your mixers at any convenient position in the mixer list.

Things are more interesting with mixers of type 'FreeMix'. In addition to the add function, these mixers also offer replace, multiply and lock — and the mixer order is significant for these. Here's how the functions work:

Here's a rather artificial example for illustration only: a setup with four free mixes and various functions. The inputs are not important in this example, we're only interested in the outputs:

Mix_1: Function=Add, Out_1=>(CH1, CH2)

Mix_2: Function=Multiply, Out_2=>(CH2, CH3)

Mix_3: Function=Replace, Out_3=>(CH3)

Mix_4: Function=Add, Out_4=>(CH3)

Let's see what happens to the channel totals as Ethos steps through the mixer list:

Step CH1 CH2 CH3 Notes
[Initial] 0 0 0 Ethos initialises channels to zero
Mix_1 Out_1 Out_1 0 Mix_1 output is added to CH1, CH2.
Mix_2 Out_1 Out_1*Out_2 0*Out_2 = 0 Mix_2 output multiplies previous CH2, CH3
Mix_3 Out_1 Out_1*Out_2 Out_3 Mix_3 output replaces previous CH3
Mix_4 Out_1 Out_1*Out_2 Out_3+Out_4 Mix_4 output is added to previous CH3

Uses for Multiply and Replace

A full treatment is beyond the scope of this article, but in a nutshell:

Summary

Okay, so let's summarise the main points, in terms of a processing timeline:

  1. Channel values are initialised to zero.
  2. The values of the inputs (sticks, knobs, sliders etc.) are determined
  3. Ethos steps down the mixer list starting from the top. For each active mix, the outputs are calculated and the corresponding channels are updated.
  4. When all the mixers have been processed, the channel values are clipped to +/-100%
  5. The clipped values are passed to the Outputs stage where they are mapped to PWM values representing actual control surface deflections.
  6. The PWM values are passed to the RF module for transmission.