1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 11:29:58 +03:00
Commit graph

738 commits

Author SHA1 Message Date
Michael Keller
6bb7dbbba9
Merge pull request #9485 from jflyper/bfdev-white-space-tidy
White space tidy
2020-02-18 00:24:24 +13:00
Michael Keller
17e620f997
Merge pull request #9486 from IllusionFpv/updated-dlpf-curve
Updated DLPF curve
2020-02-17 23:57:49 +13:00
jflyper
ff16686893 White space tidy 2020-02-17 23:54:57 +13:00
Michael Keller
c984107291
Merge pull request #9482 from ctzsnooze/Revert-iTerm-Relax
Restore proper behaviour of iterm_relax_cutoff in setpoint mode
2020-02-17 08:11:26 +13:00
Michael Keller
b96649ef76
Merge pull request #9481 from phobos-/nfe-racemode
NFE Race Mode
2020-02-17 08:08:59 +13:00
phobos-
8ce268d5f1 Implemented NFE Race Mode 2020-02-16 13:46:08 +01:00
Nicola De Pasquale
2e9516bb63 updated dlpf curve math, now it goes from straight to positive 2020-02-15 23:49:16 +01:00
mikeller
bc4701aebf Simplified the calculations, fixed tests. 2020-02-16 10:34:31 +13:00
ctzsnooze
2bbe525853 Fix iterm_relax at low cutoff values
Doesn't adjust threshold upwards when cutoff is reduced below default.
This reverts to original setpoint code behaviour.

Probably better to go back entirely to the original code.

Add changed max on iterm_relax_cutoff to CMS

Restore ITERM_RELAX_SETPOINT_THRESHOLD to float to fix Travis error
2020-02-16 10:17:06 +13:00
ctzsnooze
2922f06f40 ff_interpolated should default to AVERAGED_2
Identified by OCrap
2020-02-12 18:24:44 +11:00
Bruce Luckcuck
f584780944 Gyro native rate sampling, filtering, and scheduler restructuring 2020-02-04 18:19:35 -05:00
mikeller
ab025b76a8 Fixed missing spaces after 'if'. 2020-01-26 13:16:01 +13:00
Nicola De Pasquale
dd81e49b75 simplify iterm calculation 2020-01-19 15:47:53 +01:00
Nicola De Pasquale
31d08f1515 fix fast ram variables 2020-01-19 14:59:18 +01:00
Nicola De Pasquale
54f46c9327 antigravity gain decoupled from Iterm 2020-01-19 13:28:06 +01:00
Michael Keller
69a3a4ac08
Merge pull request #9315 from hydra/bf-log-disarm-reason
Log disarm reason.
2020-01-17 19:30:37 +13:00
Dominic Clifton
2fead0aedf Log disarm reason. 2020-01-16 20:16:11 +01:00
Nicola De Pasquale
3ae5830eb0 added dterm lpf configurable curve 2020-01-14 20:24:56 +01:00
Michael Keller
359ab46037
reduce antigravity gain default to 3.5 (#9128)
reduce antigravity gain default to 3.5
2019-12-11 09:35:36 +13:00
ctzsnooze
328b42b673 Defaults changed to no averaging, higher limit threshold 2019-11-20 11:37:27 +11:00
ctzsnooze
3c91da0e59 Interpolated feed forward smoothing 2019-11-20 11:29:37 +11:00
ctzsnooze
22434fe0f3 reduce antigravity gain default to 3.5
In recent releases we have been increasing PID I.

We haven't reduced the antigravity gain value in the same proportion.

Low authority / low P quads can get I wobbles  that are apparent on throttling up.

A lower default anti-gravity gain is likely to work alright and be a fraction less likely to cause I wobbles.
2019-10-29 10:20:29 +11:00
ctzsnooze
e1a8a80584 fixes for ff_boost
1.  Excludes yaw from ff_boost.
2.  Removes suppression for 3x greater up-steps in FF to reduce boost glitching around zero sticks
3.  Spike detection gets cleaner passband and tighter rejection above threshold; higher threshold is now possible with better suppression of large spikes.
2019-09-10 19:11:04 +10:00
ctzsnooze
e381b27b9c Small modification to ff boost spike suppression
The feed forward boost concept improves stick response by adding a stick acceleration factor to feed forward. Generating spikes when there are steps in the RC signal is the main problem.
This PR makes one small change to how the spike suppression method is determined.
It no longer uses the 'jerk' signal to generate the spike suppression 'clip' value.  Instead it just uses the magnitude of the boost signal itself.
We originally used jerk because it is more sensitive to spikes. Detailed testing shows that jerk is that it has an unwanted impact one full RC step after the spike.
If we use the boost (acceleration) signal as the attenuator, that delayed impact does not occur, making the boost component more precise.
The threshold value for suppression needs to be a bit higher to achieve equivalence.
I've re-named the function to reflect it being related to spike suppression and removed 'jerk' since we aren't using that any more.
2019-09-07 11:22:06 +10:00
Michael Keller
75447ef2b8
Merge pull request #8736 from joelucid/ff2_1
various ff2_0 improvements
2019-09-05 02:14:23 +12:00
Thorsten Laux
5855b275f4 various ff2_0 improvements
simplify

double period averaging

fix calc

ff changes

in between

fixes

clip * clip and cleanup

address review feedback

more review feedback

10 to 100
2019-09-04 23:08:02 +12:00
Thorsten Laux
1a4c42aabc change transient throttle limit to 0 2019-09-03 12:38:12 +02:00
ctzsnooze
445122a997 FF defaults increased to 90's
Higher feed forward improves stick responsiveness and reduces bounce back on lower authority quads.

Feed forward defaults in 4.0 were slightly conservative even for typical quads.

In association with ff_boost and ff_max_rate_limit, overshoot with even higher feed forward is less of a problem than before.

I think these values should be about right for 4.1
2019-09-01 20:06:06 +12:00
ctzsnooze
b5ec9cd5bf Increase iTerm defaults slightly for 4.1
The feed forward changes in 4.1 will bring, to all quads of reasonable control authority, reduced setpoint to gyro delay and less error.  iTerm will tend to accumulate less during fast inputs so there will be less of a problem with iTerm-windup and iTerm related bounce-back.

Higher I values lead to better control during tight turns and greater stability in wind.  Higher I doesn't increase the absolute amount of iTerm accumulating in the PID loop, but does allow it to change more quickly and to more quickly zero out the residual errors that are strong in tight turns.

I think this modest increase will optimise performance of the default 4.1 PIDs for most quads.

Lower authority quads will need to either reduce their I setting, or, preferably, lower the iterm_relax value to 10 or even 5, to avoid wind-up.
2019-08-31 12:59:51 +10:00
Michael Keller
c40f6b15ca
Change lowpass 1 on D from biquad to pt1 (#8688)
Change lowpass 1 on D from biquad to pt1
2019-08-10 17:27:45 +12:00
ctzsnooze
977f14a4f5 make dynamic lowpass on D a PT1, not a biquad 2019-08-08 23:46:07 +10:00
Bruce Luckcuck
2b97763002 Fix unused variable warning when USE_ABSOLUTE_CONTROL is not defined 2019-08-08 08:10:39 -04:00
Thorsten Laux
25c6919051 better camels and order 2019-08-08 09:52:25 +02:00
Thorsten Laux
91ad2498ff ff from interpolated setpoint 2019-08-08 09:50:18 +02:00
Thorsten Laux
d033a8dc76 address code review 2019-08-02 14:20:37 +02:00
Thorsten Laux
293dc42710 address feedback 2019-08-02 13:51:44 +02:00
Thorsten Laux
bca9f8a587 better idle defaults and don't set idle_throttle if not enabled 2019-08-02 13:51:44 +02:00
Thorsten Laux
ba2c1e9264 IDLE updates 2019-08-02 13:51:44 +02:00
Thorsten Laux
d474df3149 idle 2019-08-02 13:51:44 +02:00
jflyper
542146c702 Motor code refactor (Phase 1) 2019-07-17 01:33:39 +09:00
Michael Keller
f36eda16c5
Add FF to yaw, reduce yaw P and I (#8515)
Add FF to yaw, reduce yaw P and I
2019-07-02 23:47:23 +12:00
ctzsnooze
49a37e9f5c Add FF to yaw, reduce yaw P and I
FF improves yaw performance
2019-07-01 13:42:14 +10:00
ctzsnooze
0b17191b8b Revert #7907 to return abs control default to zero
Abs control accidentally was defaulted up from 0 to 5 in #7907.  It is still experimental and still can cause oscillations even with these changes.  Should be off by default until fully tested.
2019-07-01 12:43:45 +10:00
Thorsten Laux
f0bf7a2955 adjust Ki to keep total i action the same and reduce abs control default to 5 2019-05-27 23:13:06 +12:00
Miguel Angel Mulero Martinez
7801b848d4 Fix copy of profiles with last index 2019-05-22 13:56:37 +02:00
ctzsnooze
5b1c3749c3 Update 4.0x filters
Evolutionary changes to the original 4.0 defaults.
Intended to reduce chance of D-mediated flyaways on arming.
Also seems to fly better due to less gyro delay.
CHanges:
- Gyro filtering dynamic reverts back to PT1, to provide less delay, and in recognition that gyro filtering was more than adequate with the biquad.  Setpoints are higher due to lower reach of PT1.  The static gyro biquad at 150 was lower than really needed.  Markedly less gyro delay.
- Stronger D term filtering, especially at low throttle, to greatly reduce risk arming flyaways. The Dynamic D biquad is now set almost twice as low, with strong cut at 100hz where D resonance flyaways seemed to be driven from.  This filter array results in a D noise contribution that is typically not much greater than the P contribution, keeping very cool motors despite the lesser gyro filters.  This has been well tested using PID Toolbox.
Although there is more delay in D, this is offset by the reduced gyro delay.
2019-05-15 11:01:06 +10:00
Bruce Luckcuck
f5bc673ada Revise PID/Rate profile names to use get/set and eliminate extra PG's
Removes the custom CLI commands to update or display the PID and Rate profile names. Moves the storage into the pidProfile and controlRateProfile PG's.

Names can now be set with:
set profile_name = NAME
set rate_profile_name = NAME

Also added profile name display to the profile and rate CMS menus.
2019-05-08 09:03:31 -04:00
mikeller
5141bbfa94 Moved 'rpm_filter' into 'flight'. 2019-05-06 00:10:31 +12:00
ctzsnooze
80f5fa2c6d For Discussion: modify filter defaults to reduce risk of flyaways
Some users have reported flyaways on arming/throttling up with betaflight 4.0, in quads that fiy alright on 3.5.
This PR changes the default filtering so that D transmission more closely approximates that of 3.5.
With these defaults, quads that fly OK on 3.5 should not take-off vertically due to uncontrolled D oscillation.
2019-04-19 11:48:44 +10:00
Michael Keller
b4286c6ac9
Merge pull request #7935 from etracer65/dshot_command_packet_sequence
Refactor dshot command output scheduling logic
2019-04-14 23:25:33 +12:00