Brick
Loading...
Searching...
No Matches
Feedback< T, U > Class Template Referenceabstract

#include <feedback.h>

Description

template<typename T, typename U>
class Feedback< T, U >

pure virtual class for generic feedback control loops.

Parameters
Tthe data type for states
Uthe data type for output
Inheritance diagram for Feedback< T, U >:

Public Member Functions

virtual void reset ()=0
 Resets the internal state of the control loop.
virtual U update (const T &state, const T &reference, const units::Time &dt)=0
 Updates the control loop output.
U get_output ()
 Gets the last saved output value.
U get_last_error ()
 Gets the last saved error.
T get_reference ()
 Gets the currently stored reference state.
T get_state ()
 Gets the currently stored state.

Public Attributes

U output_min_
U output_max_

Protected Attributes

T reference_
T state_
T last_error_
U output_

Member Function Documentation

◆ reset()

template<typename T, typename U>
virtual void Feedback< T, U >::reset ( )
pure virtual

◆ update()

template<typename T, typename U>
virtual U Feedback< T, U >::update ( const T & state,
const T & reference,
const units::Time & dt )
pure virtual

Updates the control loop output.

Parameters
statethe current state the control system is at
referencethe target state for the control system
dtthe timestep since the last time this method was called
Returns
the controller output

Implemented in BangBang.


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