Proportional controller.
More...
#include <p.h>
|
| | P () |
| | Constructs a proportional controller.
|
| T | get_Kp () |
| | Gets the proportional gain.
|
| T | get_u_max () |
| | Gets the maximum controller output.
|
| void | init (T Kp_, T u_max_) |
| | Initializes the proportional controller.
|
| void | reset () |
| | Resets the controller.
|
| void | set_Kp (T Kp_) |
| | Sets the proportional gain.
|
| void | set_param (T Kp_, T u_max_) |
| | Sets the controller parameters.
|
| void | set_u_max (T u_max_) |
| | Sets the maximum controller output.
|
| T | update (T x_0, T x) |
| | Computes the proportional control output.
|
|
| T | Kp = 0.0 |
| | Proportional gain.
|
| T | u_max = 9999999999 |
| | Maximum controller output.
|
template<typename T>
class control_system::proportional::P< T >
Proportional controller.
The P class implements a proportional controller in which the control output is proportional to the control error.
The controller uses a configurable proportional gain and maximum output limit.
- Template Parameters
-
| T | Numeric data type used for the controller. |
- Example
controller.
init(2.0, 100.0);
double output = controller.
update(reference, measurement);
void init(T Kp_, T u_max_)
Initializes the proportional controller.
T update(T x_0, T x)
Computes the proportional control output.
Definition at line 70 of file p.h.
◆ P()
Constructs a proportional controller.
Constructs the controller with its parameters initialized to their default values.
Definition at line 5 of file p.h.
◆ get_Kp()
Gets the proportional gain.
- Returns
- Proportional gain.
Definition at line 47 of file p.h.
◆ get_u_max()
Gets the maximum controller output.
- Returns
- Maximum allowed controller output.
Definition at line 53 of file p.h.
◆ init()
Initializes the proportional controller.
- Parameters
-
| [in] | Kp_ | Proportional gain. |
| [in] | u_max_ | Maximum allowed controller output. |
Initializes the proportional gain and output limit.
Definition at line 11 of file p.h.
◆ reset()
Resets the controller.
Resets the controller state to its initial condition.
Definition at line 30 of file p.h.
◆ set_Kp()
Sets the proportional gain.
- Parameters
-
| [in] | Kp_ | Proportional gain. |
Definition at line 35 of file p.h.
◆ set_param()
Sets the controller parameters.
- Parameters
-
| [in] | Kp_ | Proportional gain. |
| [in] | u_max_ | Maximum allowed controller output. |
Updates the proportional gain and maximum output limit.
Definition at line 17 of file p.h.
◆ set_u_max()
Sets the maximum controller output.
- Parameters
-
| [in] | u_max_ | Maximum allowed controller output. |
Definition at line 41 of file p.h.
◆ update()
Computes the proportional control output.
- Parameters
-
| [in] | x_0 | Reference or desired value. |
| [in] | x | Current or measured value. |
- Returns
- Proportional control output limited to the configured maximum output.
Definition at line 24 of file p.h.
◆ Kp
Proportional gain.
Definition at line 155 of file p.h.
◆ u_max
Maximum controller output.
Defines the upper magnitude limit applied to the controller output.
Definition at line 164 of file p.h.
The documentation for this class was generated from the following files:
- include/proportional/p.h
- src/proportional/p.tpp