Commit Graph
70 Commits
Author SHA1 Message Date
Roman ae7f61b0bf tecs: added method to handle ekf height resets
Signed-off-by: Roman <bapstroman@gmail.com>
2016-11-21 07:29:21 +01:00
Roman 896118281c 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 <bapstroman@gmail.com>
2016-11-14 22:43:33 +11:00
Paul Riseborough 9221c74e46 tecs: improvements to pitch integration limiting
Constrain the specific energy balance integrator input to prevent increasing saturation of pitch demand.
Decay the specific energy balance integrator state if the pitch demand is saturated to reduce saturation to zero and do so at the same tome constant as the control loop
Relax the clipping threshold on the specific energy balance integrator to allow the input constraint and decay functions to do more of the work
Improve variable naming and commenting
2016-11-14 22:43:33 +11:00
Roman 7106881cbc tecs: fix limiting of pitch integrator input, better comments and structure
- when limiting the pitch integrator input the value was related to
a quantity with different units (specific energy error rate vs delta pitch)
- once the unconstrained pitch demand is larger / smaller than the max/min
allowed pitch angle the integrator input should only be allowed to drag
the integrator into the direction leading to less pitch demand violation

Signed-off-by: Roman <bapstroman@gmail.com>
2016-11-14 22:43:33 +11:00
Roman 12ddf9d25e TECS: better handling of the constraint for the pitch integrator
- if the specific energy balance correction term produced a demanded
pitch value which exceeded the aircraft pitch limits then the pitch
integrator was shifted such that the pitch demand violation was prevented.
However, this meant that the exceeding pitch was just unloaded into the
integrator and caused unexpected behavior of the pitch loop.
In an underspeed condition e.g. this has lead to the plane pulling up it's
nose very quickly shorty after the underspeed condition kicked in.

Signed-off-by: Roman <bapstroman@gmail.com>
2016-11-14 22:43:33 +11:00
Roman eec55a0918 TECS: run underspeed detection method before calculating speed demand
- the method in TECS for detecting an underspeed condition was run after
the method which calculated the airspeed demand. As a result the specific
engergy balance error signal showed a spike when TECS detected an underspeed
condition.

Signed-off-by: Roman <bapstroman@gmail.com>
2016-11-14 22:43:33 +11:00
Julian Oes 8ff237c69f Remove size optimization for individual modules
It makes more sense to set the optimization flags on a platform basis
instead of individually for each module. This allows for different
optimization options for SITL, NuttX, Snapdragon, etc.
2016-09-30 08:11:51 +02:00
Daniel Agar fb75240ee9 FW init TECS with PSP_OFF and constrain TAS error 2016-09-27 08:49:45 +02:00
Daniel Agar de14418e93 fw_pos_ctrl_l1 var naming consistency and effc++ 2016-07-12 23:40:39 +02:00
Beat Küng 7055d3c929 fix tecs.cpp: use UINT64_C for uint64_t constant instead of UUL 2016-05-14 11:27:07 +02:00
Daniel Agar 4d82cf7224 fix TECS comment typo 2016-03-04 17:30:50 -05:00
Daniel Agar 9ab0674107 TECS fix typo 2016-03-03 10:13:47 +01:00
Andreas Antener 0ccf0ce747 only run FW posctl in FW mode and ramp up desired airspeed for tecs after transition 2016-02-18 18:55:56 +01:00
Roman 59a571d22f TECS:
- do not run TECS for VTO which are in rotary wing mode
- reinitialise TECS the first time we start using it again
2016-02-18 18:55:56 +01:00
Andreas Antener 967b404de8 only run FW posctl in FW mode and ramp up desired airspeed for tecs after transition 2016-02-18 18:55:56 +01:00
Roman 1da686b125 TECS:
- do not run TECS for VTO which are in rotary wing mode
- reinitialise TECS the first time we start using it again
2016-02-18 18:55:56 +01:00
tumbili b7919e0039 initialise all tecs class members 2016-02-18 17:07:09 +01:00
tumbili c1e1d0b031 put TECS init bug to rest:
the uncostrained demanded pitch was never initialized which
could lead to large initial pitch integral values
2016-02-18 16:29:04 +01:00
Roman fdc0ef00b3 fix TECS logging 2016-02-05 17:14:10 +01:00
Lorenz Meier 5050da0ba0 TECS: Add function to reset system 2015-11-01 18:26:30 +01:00
Lorenz Meier fa5071b3c5 Remove module.mk files to prevent confusion of adopters upgrading 2015-10-06 11:23:20 +02:00
James Goppert 1d6b31d196 Switch to cmake build system. 2015-09-07 20:37:45 -04:00
Lorenz Meier ec84ee817f Merge branch 'beta' 2015-08-30 14:27:39 +02:00
Lorenz Meier 22864a3e32 TECS: Initialize all integrals in one place when not active 2015-08-28 22:57:38 +02:00
devbharat 20d71870ec Minor changes to get fixed wing control apps running for posix 2015-08-23 14:39:25 +02:00
tumbili 3ccb35f338 fix 2015-08-23 14:06:25 +02:00
Lorenz Meier 47aedba691 TECS: Fix altitude reset logic 2015-08-23 14:06:16 +02:00
tumbili 6cdceb1829 fix tecs status logging 2015-08-22 14:08:58 +02:00
Lorenz Meier b066a79ca6 TECS lib: Low-pass height demand to avoid using the motor as a mechanical low-pass filter 2015-08-02 16:07:32 +02:00
Lorenz Meier 0d9d5d1fa5 TECS: Limit rate demands 2015-08-02 16:07:31 +02:00
Lorenz Meier 09da389558 TECS: Add in-air state and trigger filter state resets when not flying to ensure correct filter state initialization 2015-07-27 10:10:15 +02:00
Lorenz Meier 97e9f44d35 TECS: Reset integrator states on first run or when DT is large 2015-07-22 22:40:26 +02:00
Lorenz Meier 55ed9e9612 ECL: Run TECS filter faster, adjust gains accordingly 2015-06-12 16:10:20 +02:00
philipoe f414eef042 TECS: Modify absolute-value limiting of throttle demand 2014-11-06 11:00:14 +01:00
philipoe 02e35991d5 TECS: Also deleted the _throttle_dem_unc variable from TECS.h 2014-10-30 09:54:27 +01:00
philipoe 47367aeed5 TECS: Fix bug (underspeed-condition did not have any effect on throttle) 2014-10-29 23:13:51 +01:00
Thomas Gubler cc05f0f185 Merge remote-tracking branch 'upstream/obcfailsafe' into swissfang
Conflicts:
	src/lib/external_lgpl/tecs/tecs.cpp
	src/modules/commander/commander_params.c
	src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp
	src/modules/navigator/navigator_main.cpp
2014-09-30 15:38:27 +02:00
Thomas Gubler e056fbb703 add heightrate ff for tecs 2014-09-06 15:15:30 +02:00
Thomas Gubler 4e9a52fe45 heightrate ff: fix order of calculations 2014-09-04 12:32:10 +02:00
Thomas Gubler dd1945bb76 add heightrate ff for tecs 2014-09-04 10:59:35 +02:00
Thomas Gubler ab022d5133 disable underspeed protection when landing also in tecs 2014-08-31 16:23:37 +02:00
Lorenz Meier 43ef622725 Reinstate TECS logging 2014-08-03 13:18:22 +02:00
Lorenz Meier 491c6c29ac Init values 2014-08-01 14:43:56 +02:00
Lorenz Meier 8e33278c4c Move the last throttle demand setting to a better position 2014-08-01 13:04:28 +02:00
philipoe fc2e0fad47 TECS: Added separate gain / time constant for the throttle loop to allow independent tuning 2014-07-31 15:23:30 +02:00
Lorenz Meier c1d3f592b4 Make ext libs more flash efficient 2014-07-29 11:36:59 +02:00
philipoe 534c377ec6 TECS: Small fix to throttle feed-forward 2014-07-01 10:49:59 +02:00
Julian Oes 84df8ee78d TECS: warning fixes 2014-02-19 10:48:46 +01:00
Julian Oes 79d2e5de6c TECS: use constant from geo 2014-02-19 10:48:31 +01:00
Anton Babushkin 7b7539fbbd Merge branch 'navigator_new' into navigator_new_vector, WIP 2013-12-28 10:04:13 +04:00