Class FuzzyPD
Defined in File fuzzy_pd.hpp
Inheritance Relationships
Base Type
public tap::algorithms::SmoothPid
(Class SmoothPid)
Class Documentation
-
class FuzzyPD : public tap::algorithms::SmoothPid
Fuzzy PD controller. A controller that is built on top of the SmoothPid object.
Fuzzy logic is used to adaptively change the proportional and derivative gains at runtime, whereas they are hard-coded in the SmoothPid object. This allows the controller to adapt to more complex situations (such as overcoming sticktion, varying loads, etc.). Aside from adaptively changing the gains, this controller behaves the same was as the SmoothPid object.
For more general information about fuzzy PID, refer to this paper: https://ieeexplore.ieee.org/document/937407. You can also find others online. For a more generic look at fuzzy logic, you can refer to this paper: https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=488475.
Note
While it is not explicitly disallowed, the integral gain is not intended to be used in this implementation. The FuzzyPDRuleTable is used in this controller, which does not have any fuzzy logic for the integral term.
Public Functions
-
FuzzyPD(const FuzzyPDConfig &pdConfig, const SmoothPidConfig &smoothPidConfig)
- Parameters:
pdConfig – [in] Fuzzy-specific configuration.
smoothPidConfig – [in] PID-specific configuration.
-
virtual float runController(float error, float errorDerivative, float dt) override
See also
SmoothPID::runController. Identical except that before the PID update step, new parameters are computed.
-
FuzzyPD(const FuzzyPDConfig &pdConfig, const SmoothPidConfig &smoothPidConfig)