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

A trapezoidal integrator. More...

#include <BlockIntegralTrap.hpp>

Inheritance diagram for control::BlockIntegralTrap:
Collaboration diagram for control::BlockIntegralTrap:

Public Member Functions

 BlockIntegralTrap (SuperBlock *parent, const char *name)
 
virtual ~BlockIntegralTrap ()=default
 
float update (float input)
 
float getU ()
 
float getY ()
 
float getMax ()
 
void setU (float u)
 
void setY (float y)
 
- 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
 

Protected Attributes

float _u
 previous input More...
 
float _y
 previous output More...
 
BlockLimitSym _limit
 limiter More...
 
- 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
 

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 ()
 

Detailed Description

A trapezoidal integrator.

http://en.wikipedia.org/wiki/Trapezoidal_rule A limiter is built into the class to bound the integral's internal state. This is important for windup protection.

See also
Limit

Definition at line 66 of file BlockIntegralTrap.hpp.

Constructor & Destructor Documentation

◆ BlockIntegralTrap()

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

Definition at line 70 of file BlockIntegralTrap.hpp.

◆ ~BlockIntegralTrap()

virtual control::BlockIntegralTrap::~BlockIntegralTrap ( )
virtualdefault

Member Function Documentation

◆ getMax()

float control::BlockIntegralTrap::getMax ( )
inline

Definition at line 80 of file BlockIntegralTrap.hpp.

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

Here is the caller graph for this function:

◆ getU()

float control::BlockIntegralTrap::getU ( )
inline

Definition at line 78 of file BlockIntegralTrap.hpp.

Referenced by control::blockIntegralTrapTest(), blockIntegralTrapTest(), and update().

Here is the caller graph for this function:

◆ getY()

float control::BlockIntegralTrap::getY ( )
inline

Definition at line 79 of file BlockIntegralTrap.hpp.

Referenced by control::blockIntegralTrapTest(), blockIntegralTrapTest(), and update().

Here is the caller graph for this function:

◆ setU()

void control::BlockIntegralTrap::setU ( float  u)
inline

Definition at line 81 of file BlockIntegralTrap.hpp.

Referenced by control::blockIntegralTrapTest(), blockIntegralTrapTest(), and update().

Here is the caller graph for this function:

◆ setY()

void control::BlockIntegralTrap::setY ( float  y)
inline

Definition at line 82 of file BlockIntegralTrap.hpp.

Referenced by control::blockIntegralTrapTest(), blockIntegralTrapTest(), and update().

Here is the caller graph for this function:

◆ update()

float control::BlockIntegralTrap::update ( float  input)

Definition at line 48 of file BlockIntegralTrap.cpp.

References _limit, f(), control::Block::getDt(), getU(), getY(), setU(), setY(), and control::BlockLimitSym::update().

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

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _limit

BlockLimitSym control::BlockIntegralTrap::_limit
protected

limiter

Definition at line 87 of file BlockIntegralTrap.hpp.

Referenced by update().

◆ _u

float control::BlockIntegralTrap::_u
protected

previous input

Definition at line 85 of file BlockIntegralTrap.hpp.

◆ _y

float control::BlockIntegralTrap::_y
protected

previous output

Definition at line 86 of file BlockIntegralTrap.hpp.


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