Fixed Wing TECS controller disconnect with documentation

Howdy,

I’ve been digging through the the Px4 fixed wing TECS.cpp file in conjunction with the documentation for the fixed wing controller on the dev guide and I have come across some disconnects between the two.

In the documentation the the Specific Energy Rate is defined as:
E_dot = (ET_dot)/(mgVT) = (VT_dot)/g + sin(gamma)

The code defines the Specific Energy Rate as the following:
E_dot = (ET_dot)/(m) = VT * VT_DOT + g*h

I was hoping to learn which one is actually intended to be used for the TECS, and why one was chosen over the other. Also, on line 253 of the TECS.cpp file the specific kinetic energy setpoint is determined by multiplying the current airspeed of the aircraft and the airspeed rate setpoint and I was curious if that was correct, and reasons for not using the setpoint for both.

I would appreciate any insight on this.

1 Like

Hello, @virgil.

I’m also curious about specific kinetic energy rate setpoint.
(_SKE_rate_setpoint = _tas_state * _TAS_rate_setpoint)

Have you known anything since then?

Hello, there are much more discrepancies between documentation and the TECS code.
The one I am curious about is the “Total Energy Control Loop” which takes integrator input from the “Specific Total Energy error” in the diagram. Unfortunately in the code, the integrator input is _STE_rate_error which corresponds to “Specific Total Energy RATE error”. A very similar issue is relevant to the “Total energy balance control loop”.

I would be glad if someone who had wrote the TECS code (@RomanBapst, @CarlOlsson, @dagar, @bresch ) could clarify that.

Unfortunately, the source files of the controller diagrams on the documentation page are unknown for me. Therefore is complicated to repair diagrams to reflect the code.

1 Like

I found that pull-request, which seems to be a point, where the TECS controller diagrams start to diverge from the documentation.

1 Like