Merge branch 'dave-pitman-pid' of https://github.com/dave-pitman/cleanflight into dave-pitman-dave-pitman-pid
Conflicts: docs/PID tuning.md
This commit is contained in:
commit
b4cc7c4cb4
|
@ -16,18 +16,43 @@ Basically, the goal of the PID controller is to bring the craft's rotation rate
|
|||
you're commanding with your sticks. An error is computed which is the difference between your target rotation rate and
|
||||
the actual one measured by the gyroscopes, and the controller tries to bring this error to zero.
|
||||
|
||||
The P term controls the strength of the correction that is applied to bring the craft toward the target angle or
|
||||
##PIDs
|
||||
|
||||
**The P term** controls the strength of the correction that is applied to bring the craft toward the target angle or
|
||||
rotation rate. If the P term is too low, the craft will be difficult to control as it won't respond quickly enough to
|
||||
keep itself stable. If it is set too high, the craft will rapidly oscillate/shake as it continually overshoots its
|
||||
target.
|
||||
|
||||
The I term corrects small, long term errors. If it is set too low, the craft's attitude will slowly drift. If it is
|
||||
**The I term** corrects small, long term errors. If it is set too low, the craft's attitude will slowly drift. If it is
|
||||
set too high, the craft will oscillate (but with slower oscillations than with P being set too high).
|
||||
|
||||
The D term attempts to increase system stability by monitoring the rate of change in the error. If the error is
|
||||
changing slowly (so the P and I terms aren't having enough impact on reaching the target) the D term causes an increase
|
||||
in the correction in order to reach the target sooner. If the error is rapidly converging to zero, the D term causes the
|
||||
strength of the correction to be backed off in order to avoid overshooting the target.
|
||||
**The D term** attempts to increase system stability by monitoring the rate of change in the error. If the error is rapidly converging to zero, the D term causes the strength of the correction to be backed off in order to avoid overshooting the target.
|
||||
|
||||
|
||||
##TPA and TPA Breakpoint
|
||||
|
||||
Note that TPA is set via CLI or on the PID TUNING tab of the GUI. tpa_breakpoint is set via CLI
|
||||
|
||||
Also note that TPA and tpa_breakpoint may not be used in certain PID Contorllers. Check the description on the individual controller.
|
||||
|
||||
TPA applies a PID value reduction in relation to full Throttle. It is used to apply dampening of PID values as full throttle is reached.
|
||||
|
||||
**TPA** = % of dampening that will occur at full throttle.
|
||||
|
||||
**tpa_breakpoint** = the point in the throttle curve at which TPA will begin to be applied.
|
||||
|
||||
An Example: With TPA = 50 (or .5 in the GUI) and tpa_breakpoint = 1500 (assumed throttle range 1000 - 2000)
|
||||
|
||||
* At 1500 on the throttle channel, the PIDs will begin to be dampened.
|
||||
* At 3/4 throttle (1750), PIDs are reduced by approximately 25% (half way between 1500 and 2000 the dampening will be 50% of the total TPA value of 50% in this example)
|
||||
* At full throttle (2000) the full amount of dampening set in TPA is applied. (50% reduction in this example)
|
||||
|
||||
![tpa example chart](https://cloud.githubusercontent.com/assets/1668170/6053290/655255dc-ac92-11e4-9491-1a58d868c131.png "TPA Example Chart")
|
||||
|
||||
|
||||
**How and Why to use this?**
|
||||
|
||||
If you are getting oscillations starting at say 3/4 throttle, set tpa breakpoint = 1750 or lower (remember, this is assuming your throttle range is 1000-2000), and then slowly increase TPA until your oscillations are gone. Usually, you will want tpa breakpoint to start a little sooner then when your oscillations start so you'll want to experiment with the values to reduce/remove the oscillations.
|
||||
|
||||
## PID controllers
|
||||
|
||||
|
@ -71,6 +96,8 @@ need to be increased in order to perform like PID controller 0.
|
|||
|
||||
The LEVEL "D" setting is not used by this controller.
|
||||
|
||||
TPA is not used by this controller.
|
||||
|
||||
### PID controller 2, "LuxFloat"
|
||||
|
||||
PID Controller 2 is Lux's new floating point PID controller. Both controller 0 and 1 use integer arithmetic, which was
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
#Rates & Expo
|
||||
|
||||
RC Rates (on the RECEIVER tab in the GUI) and Pitch & Roll and Yaw Rates (on the PID TUNING tab of the GUI);
|
||||
|
||||
What is the difference?
|
||||
|
||||
* RC Rates affect the entire contorl input range. To decrease sensitivity at the center of the ranges, RC Expo can be used.
|
||||
* Pitch & Roll and Yaw Rates target the endpoints of the inputs while having little or no effect on the center of the input ranges.
|
||||
|
||||
##RC Rate
|
||||
|
||||
RC Rate defines the sensitivity to PITCH and ROLL throughout the entire input range.
|
||||
* A lower # reduces the over all responsiveness.
|
||||
* A Higher # increases the over all responsiveness.
|
||||
|
||||
If you feel your aircraft is too reactive to your inputs, decrease the value. If you feel it is too sluggish, increase the value.
|
||||
|
||||
##RC Expo
|
||||
|
||||
RC Expo defines a smoother, less sensitive, zone at the center of the PITCH and ROLL input range without affecting the ends of the inputs.
|
||||
The higher the value, the less sensitive the Pitch and Roll inputs will be when in the center of their range. The lower the value, the more sensitive the Pitch and Roll inputs will be when at the center of their range.
|
||||
The most sensitive at the center of the inputs is 0 Expo.
|
||||
|
||||
##Pitch & Roll and Yaw Rates
|
||||
|
||||
These values affect mostly the endpoints of the input. For example, If the over all control of the aircraft is good but extreme enpoint controls need to be faster or slower, like for aerobatics, then these rates can be used to increase the response withoug effecting the center of the input ranges as much.
|
||||
|
||||
|
Loading…
Reference in New Issue