From 896118281cacd1f2e48b7494fe25e751909d95b4 Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 3 Nov 2016 09:55:18 +0100 Subject: [PATCH] TECS: remove logic which shifts or limits integrator during large transients - during large transients in pitch demand the pitch integrator value was shifted such that the final demanded pitch did not violate given limits. Since this strategy can cause large knock-backs of the pitch integrator we remove this logic completely. We already have logic in place which reduces the integrator at the pitch time constant in case the pitch limits are exceeded so we don't need to limit it further. This has the advantage that spikes in the specific energy balance error signal does not lead to integrator knock-back. Signed-off-by: Roman --- src/lib/external_lgpl/tecs/tecs.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/lib/external_lgpl/tecs/tecs.cpp b/src/lib/external_lgpl/tecs/tecs.cpp index 22135cd2c1..1fff4472c0 100644 --- a/src/lib/external_lgpl/tecs/tecs.cpp +++ b/src/lib/external_lgpl/tecs/tecs.cpp @@ -475,20 +475,6 @@ void TECS::_update_pitch(void) SEB_correction += _PITCHminf * gainInv; } - // Apply max and min values for integrator state that will allow for no more than - // 10deg of saturation. This allows for some pitch variation due to gusts before the - // integrator is clipped. Otherwise the effectiveness of the integrator will be reduced in turbulence - float integ7_err_min = (gainInv * (_PITCHminf - math::radians(10.0f))) - SEB_correction; - float integ7_err_max = (gainInv * (_PITCHmaxf + math::radians(10.0f))) - SEB_correction; - _integ7_state = constrain(_integ7_state, integ7_err_min, integ7_err_max); - - // if the specific engergy balance correction term produces a demanded pitch value which exceeds the aircraft pitch limits - // then zero the integrator. Not doing so can lead to the integrator value being shifted to large unwanted values due to the - // constraint right above this comment - if (SEB_correction / gainInv > (_PITCHmaxf + math::radians(10.0f)) || SEB_correction / gainInv < (_PITCHminf - math::radians(10.0f))) { - _integ7_state = 0.0f; - } - // Calculate pitch demand from specific energy balance signals _pitch_dem_unc = (SEB_correction + _integ7_state) / gainInv;