Key concepts of Ethos
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 data flows and processes:
Note the two main processes ('layers'): Mixers and Outputs
- The Mixers layer determines the control logic. It takes your stick movements and converts them into % channel values. You control this process in the Mixers menu.
- The Outputs stage converts the % channel values to PWM values representing actual servo deflections. You control this process via the Outputs menu, where you calibrate the end points and centres of your servos. This layer is concerned only with linkage geometry.
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.
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.
Ethos provides 64 general purpose channels. When you create a new model, Ethos reserves the lower numbered channels for your servos. Higher channels can be programmed for other purposes, and linked to lower channels.
Each channel carries a percentage value. The exact interpretation depends on the processing stage:
- At the end of the mixers stage, the channel value represents a percentage of available travel on that channel.
- After the outputs stage, the channel value represents an actual servo position/PWM value.
Later, we'll see how the conversion from percentage units to servo positions is managed in the Outputs stage.
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.
A setup may consist of between one and dozens of mixers, depending on its complexity.
Note: OpenTX users will note an important difference, in that a mixer in Ethos can output to more than one channel.
Let's look now in more detail at the inputs and outputs.
The mixer input represents the 'thing' that you move with your finger. The source of the input is typically a control stick, slider or knob.
With some mixers, the input source is implicit in the name — for example the source for the Ailerons mix is the aileron stick. For other mixers like Camber and Butterfly, 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.
It may sound obvious, but it's worth stating anyway: a source may be used in several mixes simultaneously. For example, on F3X gliders, the aileron stick may drive 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.
A mix will have one or more destination channels, otherwise known as outputs. The number of outputs will depend on the model's configuration.
As an example, consider the Elevators mix. For a model with a regular cross-tail, the mix will have a single output. For a V-tailer or flying wing, two outputs are required, for the left and right surfaces. Most of the time you don't need to worry, as Ethos will configure the outputs appropriately when you create the model. However you can over-ride the number of outputs, and channel numbers.
A channel may be driven by several mixes simultaneously. On a sailplane, 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.
When you create a new model, Ethos analyses your configuration and creates the appropriate mixers with the appropriate outputs. This saves us a lot of trouble! 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. The input to mix is therefore the rudder stick, and the outputs are the aileron channels. There's no ready made mix for this so you would create a free mix:
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:
- Gets the input value (−100% to +100%)
- Applies curve (if specified)
- Multiplies by weight
- Adds offset
- 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.
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:
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:
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.
A couple of things should be apparent if you've been following. First, if a channel has no contributing mixers, it will have a value of zero corresponding to the centre position. Secondly, if a channel has multiple contributing mixers, its value could exceed valid bounds. To prevent this, Ethos limits (clips) each channel value to +/-100%. This is an important thing to remember when designing your setups, and we'll look at the impact in more detail in the next section.
Once a channel reaches its clipping limit of +/-100%, moving the stick will cease to have any further effect on that channel. It's quite common for this to happen on V-tail setups - you may find that one surface stops dead before the elevator or rudder stick has reached it's commanded position. To avoid this 'deadband' condition, you can reduce the weight of the elevator and/or rudder mixes so that the total weight ≤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. In the next section, we'll define 'available movement' in terms of servo deflections.
The Outputs layer is just a simple mapping layer — it takes the (clipped) channel values and maps them to PWM values representing actual servo deflections. (Another way of thinking about the outputs: it's where your mixer logic hits the real world of servos and linkages!)
The mapping is defined in the Outputs menu. The key parameters are Min, Max, Subtrim and Direction. Together these define a three-point curve.
- Min defines the PWM value corresponding to an incoming channel value of −100%.
- Max defines the PWM value corresponding to an incoming channel value of +100%.
- Subtrim defines the PWM value corresponding to an incoming channel value of zero.
- Direction sets normal/reversed output.
Since the incoming channel values are clipped to +/−100%, Min and Max also represent servo limits.
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:
- −150% = 732 μs
- −100% = 988 μs
- 0% = 1500 μs
- 100% = 2012 μs
- 150% = 2268 μs
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 is an essential debugging tool. All 64 outputs are displayed, eight to a page. Each output shows:
- Mixer value (green bar). This is the aggregated mixer value from the Mixers layer, after clipping. Useful for checking the mixer logic.
- Channel value (orange bar). This represents the final PWM value after Outputs processing. The microseconds are shown above and right of the bar. Use it to check how far your servos are being driven.
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:
- Add: the mixer outputs are added to the channel values.
- Multiply: the channel values are multiplied by the mixer outputs, and the results becomes the new channel values.
- Replace: the channel values are replaced by the mixer outputs.
- Lock: same as 'replace, except that subsequent mixes affecting the outputs are ignored.
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:
|[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:
- Multiply may be used to implement adjustable mixes, where the target mix is multiplied by the adjuster mix.
- Replace is handy for the motor channel, where you may have an idle mix (source = MIN), overridden by a throttle mix when the motor is armed.
Okay, so let's summarise the main points, in terms of a processing timeline:
- Channel values are initialised to zero.
- The values of the inputs (sticks, knobs, sliders etc.) are determined
- Ethos steps down the mixer list starting from the top. For each active mix, the outputs are calculated and the corresponding channels are updated.
- When all the mixers have been processed, the channel values are clipped to +/-100%
- The clipped values are passed to the Outputs stage where they are mapped to PWM values representing actual control surface deflections.
- The PWM values are passed to the RF module for transmission.