Skip to content
Success

Changes

Summary

  1. PID rewrite (commit: cafcaa4) (details)
Commit cafcaa40c1bd3e01283d2970d70e8480267fb48e by lamont
PID rewrite

Adds PIDLoop2 which is written more conventionally.

- exposes pterm, iterm and dterm for inspection
- trapezoidal integration/differentiation
- standard and parallel form setters
- separate out the deadbands for p, i, d and output
- proper tracking anti-windup
- first order reset element behavior (extended clegg integrator)

Also fixes bugs in the B and C options for 2DOF behavior.

Tweaks the BetterController to just be a cascade with a PI instead of
the PID, with a more aggressive integral term and no derivative.  Backed
off the p-term over what matlab recommended, because it made some
engines with too much gimbal way too twitchy still.

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
(commit: cafcaa4)
The file was addedMechJebLib/Control/IPIDLoop.cs
The file was addedMechJebLib/Control/PIDLoop2.cs
The file was modified MechJebLib/Control/PIDLoop.cs (diff)
The file was modified MechJeb2.sln.DotSettings (diff)
The file was modified MechJebLib/ODE/AbstractRungeKutta.cs (diff)
The file was modified MechJeb2/AttitudeControllers/BetterController.cs (diff)
The file was modified MechJebLib/ODE/AbstractIVP.cs (diff)
The file was modified MechJebLib/ODE/BS3.cs (diff)
The file was modified MechJebLib/MechJebLib.csproj (diff)
The file was modified MechJebLibTest/ControlTests/PIDLoopTests.cs (diff)