a
CControllerSiso Class Reference
CControllerSiso class. More...
#include <controller.hpp>
Public Member Functions | |
CControllerSiso (encoders::IEncoderGetter &f_encoder, ControllerType< double > &f_pid, controllers::IConverter *f_converter=NULL) | |
Construct a new CControllerSiso::CControllerSiso object. | |
void | setRef (double f_RefRps) |
Set the reference signal value. | |
double | getRef () |
Get the value of reference signal. | |
double | get () |
Get the value of the control signal calculated last time. | |
double | getError () |
Get the value of the error between the measured and reference signal. | |
void | clear () |
Clear the memory of the controller. | |
bool | control () |
It calculates the next value of the control signal, by utilizing the given interfaces. |
Detailed Description
CControllerSiso class.
It implements a controller with a single input and a single output. It needs an encoder getter interface to get the measured values, a controller to calculate the control signal. It can be completed with a converter to convert the measaurment unit of the control signal.
Definition at line 31 of file controller.hpp.
Constructor & Destructor Documentation
CControllerSiso | ( | encoders::IEncoderGetter & | f_encoder, |
ControllerType< double > & | f_pid, | ||
controllers::IConverter * | f_converter = NULL |
||
) |
Construct a new CControllerSiso::CControllerSiso object.
- Parameters:
-
f_encoder Reference to the encoder getter interface. f_pid Reference to the controller interface. f_converter [Optional] Pointer to the converter interface.
Definition at line 22 of file controller.cpp.
Member Function Documentation
void clear | ( | ) |
Clear the memory of the controller.
Definition at line 73 of file controller.cpp.
bool control | ( | ) |
It calculates the next value of the control signal, by utilizing the given interfaces.
- Returns:
- true control works fine
- false appeared an error
Definition at line 85 of file controller.cpp.
double get | ( | ) |
Get the value of the control signal calculated last time.
Definition at line 57 of file controller.cpp.
double getError | ( | ) |
Get the value of the error between the measured and reference signal.
Definition at line 65 of file controller.cpp.
double getRef | ( | ) |
Get the value of reference signal.
Definition at line 49 of file controller.cpp.
void setRef | ( | double | f_RefRps ) |
Set the reference signal value.
- Parameters:
-
f_RefRps The value of the reference signal
Definition at line 41 of file controller.cpp.
Generated on Tue Jul 12 2022 22:40:51 by 1.7.2