|
Brick
|
#include <feedback.h>
pure virtual class for generic feedback control loops.
| T | the data type for states |
| U | the data type for output |
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_ |
|
pure virtual |
Resets the internal state of the control loop.
Implemented in BangBang, LinearQuadraticRegulator< STATES, INPUTS >, PID< T, U >, PID< units::Angle, units::Voltage >, PID< units::AngularVelocity, units::Voltage >, PID< units::Length, units::Voltage >, and PID< units::Velocity, units::Voltage >.
|
pure virtual |
Updates the control loop output.
| state | the current state the control system is at |
| reference | the target state for the control system |
| dt | the timestep since the last time this method was called |
Implemented in BangBang.