Brick
Loading...
Searching...
No Matches
BangBang Class Reference

#include <bang_bang.h>

Description

Feedback child class to create pulse-width-modulation loops.

Inheritance diagram for BangBang:

Public Member Functions

void reset () override
 Resets the internal state of the BangBang controller.
virtual bool update (const double &state, const double &reference, const units::Time &dt=10_ms) override
 Updates the BangBang controller output.
Public Member Functions inherited from Feedback< double, bool >
bool get_output ()
 Gets the last saved output value.
bool get_last_error ()
 Gets the last saved error.
double get_reference ()
 Gets the currently stored reference state.
double get_state ()
 Gets the currently stored state.

Additional Inherited Members

Public Attributes inherited from Feedback< double, bool >
bool output_min_
bool output_max_
Protected Attributes inherited from Feedback< double, bool >
double reference_
double state_
double last_error_
bool output_

Member Function Documentation

◆ reset()

void BangBang::reset ( )
overridevirtual

Resets the internal state of the BangBang controller.

Implements Feedback< double, bool >.

◆ update()

virtual bool BangBang::update ( const double & state,
const double & reference,
const units::Time & dt = 10_ms )
overridevirtual

Updates the BangBang controller output.

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

Implements Feedback< double, bool >.


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