PX4 Firmware
PX4 Autopilot Software http://px4.io
control::BlockPID Class Reference

A proportional-integral-derivative controller. More...

#include <BlockPID.hpp>

Inheritance diagram for control::BlockPID:
Collaboration diagram for control::BlockPID:

Public Member Functions

 BlockPID (SuperBlock *parent, const char *name)
 
virtual ~BlockPID ()=default
 
float update (float input)
 
float getKP ()
 
float getKI ()
 
float getKD ()
 
BlockIntegralgetIntegral ()
 
BlockDerivativegetDerivative ()
 
- Public Member Functions inherited from control::SuperBlock
 SuperBlock (SuperBlock *parent, const char *name)
 
 ~SuperBlock ()=default
 
 SuperBlock (const SuperBlock &)=delete
 
SuperBlockoperator= (const SuperBlock &)=delete
 
 SuperBlock (SuperBlock &&)=delete
 
SuperBlockoperator= (SuperBlock &&)=delete
 
void setDt (float dt) override
 
void updateParams () override
 
- Public Member Functions inherited from control::Block
 Block (SuperBlock *parent, const char *name)
 
virtual ~Block ()=default
 
 Block (const Block &)=delete
 
Blockoperator= (const Block &)=delete
 
 Block (Block &&)=delete
 
Blockoperator= (Block &&)=delete
 
void getName (char *name, size_t n)
 
float getDt ()
 
- Public Member Functions inherited from ListNode< Block *>
void setSibling (Block * sibling)
 
const Block * getSibling () const
 

Private Attributes

BlockIntegral _integral
 
BlockDerivative _derivative
 
control::BlockParamFloat _kP
 
control::BlockParamFloat _kI
 
control::BlockParamFloat _kD
 

Additional Inherited Members

- Protected Member Functions inherited from control::SuperBlock
List< Block * > & getChildren ()
 
void updateChildParams ()
 
- Protected Member Functions inherited from control::Block
virtual void updateParamsSubclass ()
 
SuperBlockgetParent ()
 
List< BlockParamBase * > & getParams ()
 
- Protected Attributes inherited from control::SuperBlock
List< Block * > _children
 
- Protected Attributes inherited from control::Block
const char * _name
 
SuperBlock_parent
 
float _dt {0.0f}
 
List< BlockParamBase * > _params
 
- Protected Attributes inherited from ListNode< Block *>
Block * _list_node_sibling
 

Detailed Description

A proportional-integral-derivative controller.

http://en.wikipedia.org/wiki/PID_controller

Definition at line 62 of file BlockPID.hpp.

Constructor & Destructor Documentation

◆ BlockPID()

control::BlockPID::BlockPID ( SuperBlock parent,
const char *  name 
)
inline

Definition at line 66 of file BlockPID.hpp.

◆ ~BlockPID()

virtual control::BlockPID::~BlockPID ( )
virtualdefault

Member Function Documentation

◆ getDerivative()

BlockDerivative& control::BlockPID::getDerivative ( )
inline

Definition at line 86 of file BlockPID.hpp.

Referenced by control::blockPIDTest(), and blockPIDTest().

Here is the caller graph for this function:

◆ getIntegral()

BlockIntegral& control::BlockPID::getIntegral ( )
inline

Definition at line 85 of file BlockPID.hpp.

Referenced by control::blockPIDTest(), and blockPIDTest().

Here is the caller graph for this function:

◆ getKD()

float control::BlockPID::getKD ( )
inline

Definition at line 84 of file BlockPID.hpp.

Referenced by control::blockPIDTest(), and blockPIDTest().

Here is the caller graph for this function:

◆ getKI()

float control::BlockPID::getKI ( )
inline

Definition at line 83 of file BlockPID.hpp.

Referenced by control::blockPIDTest(), and blockPIDTest().

Here is the caller graph for this function:

◆ getKP()

float control::BlockPID::getKP ( )
inline

Definition at line 82 of file BlockPID.hpp.

Referenced by control::blockPIDTest(), and blockPIDTest().

Here is the caller graph for this function:

◆ update()

float control::BlockPID::update ( float  input)
inline

Definition at line 75 of file BlockPID.hpp.

Referenced by control::blockPIDTest(), and blockPIDTest().

Here is the caller graph for this function:

Member Data Documentation

◆ _derivative

BlockDerivative control::BlockPID::_derivative
private

Definition at line 90 of file BlockPID.hpp.

◆ _integral

BlockIntegral control::BlockPID::_integral
private

Definition at line 89 of file BlockPID.hpp.

◆ _kD

control::BlockParamFloat control::BlockPID::_kD
private

Definition at line 93 of file BlockPID.hpp.

◆ _kI

control::BlockParamFloat control::BlockPID::_kI
private

Definition at line 92 of file BlockPID.hpp.

◆ _kP

control::BlockParamFloat control::BlockPID::_kP
private

Definition at line 91 of file BlockPID.hpp.


The documentation for this class was generated from the following file: