1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-21 07:15:18 +03:00
Commit graph

14 commits

Author SHA1 Message Date
KarateBrot
48f14686d5 Add biquad crossfading
+ RPM filter fix (oscillations on throttle chops)
2021-06-27 23:46:45 +02:00
ctzsnooze
3b62b2e5d4 add PT2 and PT3 lowpass filter options 2021-05-18 09:59:27 +10:00
ctzsnooze
636d563abe major rc changes ctzsnooze 2021 2021-05-07 14:40:43 +10:00
Michael Keller
a53f2a60a5
Merge pull request #10711 from mikeller/remove_powerf
Remove unneeded library function 'powerf()'.
2021-04-28 01:28:43 +12:00
ctzsnooze
d4f0ec2d0a feed forward jitter improvements 2021-04-27 12:47:06 +10:00
mikeller
6b87b3685c Remove unneeded library function 'powerf()'. 2021-04-26 16:50:54 +12:00
ctzsnooze
a096c99664 PT2 and PT3 filter maths PT3 for RC smoothing 2021-04-26 14:12:54 +12:00
ctzsnooze
8050ecd1e7 Mixer update: dynamic idle and throttle logging improvements
- all CLI parameters related to dynamic idle alone re-named with the `dyn_idle_` prefix
- when linear throttle scaling is active, the user's set idle value is now correct whether dynamic idle is on or off. Previously, the idle value fell when dynamic idle was activated at the same time as linear throttle scaling.
- enabling dynamic idle no longer causes a deadband at full throttle
- the setpoint throttle value sent to Blackbox does not include the dynamic idle offset
- the throttle value sent to the antigravity and dynamic lowpass code includes throttle scaling, but no other modifiers, to avoid false elevation of the apparent throttle position from dynamic idle and unnecessary transient changes in their filter cutoffs
- Dynamic Idle now uses a modified PI controller during active rpm control phase
- the D factor provides early detection of rapid falls in rpm, e.g. in hard chops. It is filtered heavily. Inadequate `dyn_idle_d_gain` may lead to a transient drop in rpm immediately after cutting throttle. Default is 50.
- the P factor provides fast control over rpm during the active control phase. Too much `dyn_idle_p_gain` may cause oscillation in that phase. Note enough and a slow drop in rpm will be inadequately corrected. Default is 50. Needs to be higher with heavier larger props.
- An integral element does most of the work.  It prevents enduring offsets from the set rpm. The I gain is high when increasing responding to low rpm, and slow to release.  The slow release makes a huge difference and avoids I oscillation. Not enough `dyn_idle_i_gain` and there may be wobble in rpm during the control phase, or the idle value may rise too slowly; too much may cause wobble. Default is 50. Needs to be higher with heavier larger props.
- The DYN_IDLE debug shows idle P, I and D in debugs 0, 1 and 2. minRps stays in debug 3.
- Interactions between throttle and thrust linear, dynamic idle, throttle scaling and throttle boost have been checked and work as they should.
2020-11-09 09:09:17 +11:00
ctzsnooze
d1bf5d0d11 Add late P boost to antigravity 2020-09-20 12:42:09 +10:00
ctzsnooze
73663f7fae FF update including second order fitlering of boost, tidying up etc
Include default to no averaging
2020-09-12 17:08:14 +10:00
ctzsnooze
1fbf0ba816 Further refactoring
Thanks, Mike!
2020-07-07 22:59:58 +10:00
ctzsnooze
9a65b766a2 refactor Thrust Linear to initialise throttleCompensateAmount in pid_init.c
Maybe this could avoid recaculating throttleCompensateAmount every PID loop?
2020-07-07 15:11:17 +10:00
ctzsnooze
7cd83464d6 Power 2 thrust compensation with 50% throttle compensation
^2 gain curve after discussions with Markus
Variable throttle compensation, more with higher TL for whoops
Calculator https://www.desmos.com/calculator/1rhq0pqoug
2020-07-05 14:01:42 +12:00
Bruce Luckcuck
c06106e2d1 Split initialization from pid.c for flash savings
Move low performance requirements initialization code into pid_init.c and optimize that for size.

Saves 2688 bytes for target STM32F7X2.
2020-05-03 13:58:55 -04:00