TECS Sink and Throttle Troubleshooting

Hey all, during some sink/descent tests we were observing some weird throttle and dh demanded behaviour. TECS parameters were tuned following instructions from Paul Riseborough’s TECS presentation during the conference alongside documentation on ArduPilot. During verification of TECS sink parameters we noticed the demanded height was not lining up with the actual height. Spdweight was set to 2 but we were still not reaching our trim airspeed of 1300 cm/s. TECS_SINK_MIN was 1.5, which we never appear to hit. The throttle and dhdem behave in an unexpected way, at one point the throttle flares to 20% and then drops, despite not reaching our set height. This seems like a TECS issue but I am a little lost on which parameters to tune to correct this. The flight data is uploaded here, any insight or recommendations would be greatly appreciated! Thanks!

The throttle drop at around 950sec coincides with the timie when BARO.Alt exceeds TECS.hdem, so there appears to be no problem. the drop to around 20% is probably to provide the thrust needed for level flight. The throttle is then lowered to near idle at the time of descent. I see no problem with the TECS behavior up to this point.

Regarding the low sink rate, I found the following statements in the code. Please note the comment at the end.

ArduPlane\altitude.cpp: line 93

  setup for a gradual glide slope to the next waypoint, if appropriate
void Plane::setup_glide_slope(void)
    // establish the distance we are travelling to the next waypoint,
    // for calculating out rate of change of altitude
    auto_state.wp_distance = current_loc.get_distance(next_WP_loc);
    auto_state.wp_proportion = current_loc.line_path_proportion(prev_WP_loc, next_WP_loc);

      work out if we will gradually change altitude, or try to get to
      the new altitude as quickly as possible.
    switch (control_mode->mode_number()) {
    case Mode::Number::RTL:
    case Mode::Number::AVOID_ADSB:
    case Mode::Number::GUIDED:
        /* glide down slowly if above target altitude, but ascend more
           rapidly if below it. See
        if (above_location_current(next_WP_loc)) {
            set_offset_altitude_location(prev_WP_loc, next_WP_loc);
        } else {

Ten years ago, there was a discussion about the danger of steep descents, and it seems that a code fix was made. In the discussion, only RTL was covered, but for some reason GUIDED is now included as well. It’s strange behavior for those who don’t know the story.

I have not checked the code further down, so I’m not sure if it is really the cause.

Why don’t you try AUTO mode instead of GUIDED mode? I think it is possible to verify the TECS sink rate by using two Loiter pioint with same latitude and longitude but different altitude.

1 Like

Thank you for the well-worded response! I’ll dig a little deeper into the code here and see what I can find. Much appreciated!