Class Controller
template <typename refs_T, typename meas_T, typename outputs_T, typename params_T>
Controller interface for various inherited class like pid, rst, pr,...More...
#include <controller.h>
Public Functions
Type | Name |
---|---|
virtual void | calculate (void) = 0 calculate a new command value according to a reference fixed using setReference method and a measuremnt fixed usingsetMeasurement . |
virtual outputs_T | calculateWithReturn (refs_T yref, meas_T y) calculate a new command value according the argument values |
virtual outputs_T | getOutput () retrieve the last command value calculated. |
virtual int8_t | init (params_T parameters) = 0 initialize the controller. |
virtual void | reset (void) = 0 reset internal states and the last command of the controller. |
virtual outputs_T | saturate (outputs_T u) limit the argument u betweenupper_bound andlower_bound it is called by thecalculate method. |
virtual void | setMeasurement (meas_T measure) capture a new measurement. |
virtual void | setReference (refs_T reference) capture a new reference. |
Protected Attributes
Type | Name |
---|---|
float32_t | _Ts |
outputs_T | _lower_bound |
meas_T | _measure |
outputs_T | _output |
refs_T | _reference |
outputs_T | _upper_bound |
Detailed Description
Date:
2024
Author:
RĂ©gis Ruelland [email protected]
Author:
Luiz Villa [email protected]
Author:
Guillaume Arthaud.
Template parameters:
refs_T
type of the referencemeas_T
type of the measureoutputs_T
type of the outputparams_T
type of the parameter
Parameters:
parameters
structure including all parameters needs to make calculations.
we assume that outputs_T has already an order relation implemented.
Public Functions Documentation
function calculate
calculate a new command value according to a reference fixed using setReference
method and a measuremnt fixed usingsetMeasurement
.
The new command value can be captured using the get_output
method.
function calculateWithReturn
calculate a new command value according the argument values
Parameters:
yrefs
referencey
measure
Returns:
new command value.
function getOutput
retrieve the last command value calculated.
Returns:
function init
initialize the controller.
Parameters:
parameters
Returns:
0 if ok -EINVAL else.
function reset
function saturate
limit the argument u
betweenupper_bound
andlower_bound
it is called by thecalculate
method.
Parameters:
u
should be a command value.
Returns:
function setMeasurement
capture a new measurement.
Parameters:
measure
function setReference
capture a new reference.
Parameters:
reference
Protected Attributes Documentation
variable _Ts
variable _lower_bound
variable _measure
variable _output
variable _reference
variable _upper_bound
The documentation for this class was generated from the following file docs/controlLibrary/src/controller.h