Discrete-time integral controller.
More...
#include <i.h>
|
| | I () |
| | Constructs an integral controller.
|
| T | get_dt () |
| | Gets the controller sampling time.
|
| T | get_Ki () |
| | Gets the integral gain.
|
| T | get_u_k_1 () |
| | Gets the previous controller output.
|
| T | get_u_max () |
| | Gets the maximum controller output.
|
| void | init (T dt_, T Ki_, T u_k_1_, T u_max_) |
| | Initializes the integral controller.
|
| void | merge (T u_k_1_) |
| | Merges an external controller output into the integral state.
|
| void | reset () |
| | Resets the integral controller state.
|
| void | set_dt (T dt_) |
| | Sets the controller sampling time.
|
| void | set_Ki (T Ki_) |
| | Sets the integral gain.
|
| void | set_param (T dt_, T Ki_, T u_k_1_, T u_max_) |
| | Sets the integral controller parameters.
|
| void | set_u_0 (T u_k_1_) |
| | Sets the previous controller output.
|
| void | set_u_max (T u_max_) |
| | Sets the maximum controller output.
|
| T | update (T x_0, T x) |
| | Computes the integral control output.
|
|
| T | dt = 0.0 |
| | Controller sampling time.
|
| T | Ki = 0.0 |
| | Integral gain.
|
| T | u_k_1 = 0.0 |
| | Previous controller output.
|
| T | u_max = 9999999999 |
| | Maximum controller output.
|
template<typename T>
class control_system::integral::I< T >
Discrete-time integral controller.
The I class implements a discrete-time integral controller using a configurable integral gain and sampling time.
The controller maintains its previous output as internal state and applies a configurable maximum output limit.
- Template Parameters
-
| T | Numeric data type used for the controller. |
- Example
0.001,
0.0,
100.0
);
double output = controller.
update(reference, measurement);
Discrete-time integral controller.
void init(T dt_, T Ki_, T u_k_1_, T u_max_)
Initializes the integral controller.
T update(T x_0, T x)
Computes the integral control output.
Definition at line 73 of file i.h.
◆ I()
Constructs an integral controller.
Constructs the controller with its parameters and internal state initialized to their default values.
Definition at line 5 of file i.h.
◆ get_dt()
Gets the controller sampling time.
- Returns
- Sampling time in seconds.
Definition at line 74 of file i.h.
◆ get_Ki()
Gets the integral gain.
- Returns
- Integral gain.
Definition at line 80 of file i.h.
◆ get_u_k_1()
Gets the previous controller output.
- Returns
- Previous controller output.
Definition at line 86 of file i.h.
◆ get_u_max()
Gets the maximum controller output.
- Returns
- Maximum allowed controller output.
Definition at line 92 of file i.h.
◆ init()
Initializes the integral controller.
- Parameters
-
| [in] | dt_ | Controller sampling time in seconds. |
| [in] | Ki_ | Integral gain. |
| [in] | u_k_1_ | Previous controller output. |
| [in] | u_max_ | Maximum allowed controller output. |
Initializes the controller sampling time, integral gain, previous controller output, and output limit.
Definition at line 13 of file i.h.
◆ merge()
Merges an external controller output into the integral state.
- Parameters
-
| [in] | u_k_1_ | Previous or externally provided controller output. |
Updates the internal previous-output state using the specified controller output.
Definition at line 44 of file i.h.
◆ reset()
Resets the integral controller state.
Resets the stored controller output to its initial state.
Definition at line 38 of file i.h.
◆ set_dt()
Sets the controller sampling time.
- Parameters
-
| [in] | dt_ | Sampling time in seconds. |
Definition at line 50 of file i.h.
◆ set_Ki()
Sets the integral gain.
- Parameters
-
Definition at line 56 of file i.h.
◆ set_param()
Sets the integral controller parameters.
- Parameters
-
| [in] | dt_ | Controller sampling time in seconds. |
| [in] | Ki_ | Integral gain. |
| [in] | u_k_1_ | Previous controller output. |
| [in] | u_max_ | Maximum allowed controller output. |
Updates the controller sampling time, integral gain, previous controller output, and maximum output limit.
Definition at line 19 of file i.h.
◆ set_u_0()
Sets the previous controller output.
- Parameters
-
| [in] | u_k_1_ | Previous controller output. |
Definition at line 62 of file i.h.
◆ set_u_max()
Sets the maximum controller output.
- Parameters
-
| [in] | u_max_ | Maximum allowed controller output. |
Definition at line 68 of file i.h.
◆ update()
Computes the integral control output.
- Parameters
-
| [in] | x_0 | Reference or desired value. |
| [in] | x | Current or measured value. |
- Returns
- Integral controller output limited by the configured maximum output.
Calculates the integral contribution using the current control error, sampling time, integral gain, and stored controller state.
Definition at line 28 of file i.h.
◆ dt
Controller sampling time.
Sampling period of the discrete-time integral controller in seconds.
Definition at line 213 of file i.h.
◆ Ki
Integral gain.
Definition at line 226 of file i.h.
◆ u_k_1
Previous controller output.
Stores the controller output from the previous iteration.
Definition at line 221 of file i.h.
◆ u_max
Maximum controller output.
Defines the maximum allowed magnitude of the controller output.
Definition at line 235 of file i.h.
The documentation for this class was generated from the following files: