Go to the source code of this file.
◆ K_i
◆ K_p
◆ SCALING_FACTOR
#define SCALING_FACTOR 30 |
◆ pi_controller()
int16_t pi_controller |
( |
int16_t |
set_point, |
|
|
int16_t |
measurement, |
|
|
struct pi_t * |
regulator_p |
|
) |
| |
PID control algorithm.
Calculates output from setpoint, process value and PID status.
- Parameters
-
set_point | Desired value. |
measurement | Measured value. |
pi_st | PI status struct. |
◆ pi_init()
void pi_init |
( |
int16_t |
Kp_set, |
|
|
int16_t |
Ki_set, |
|
|
struct pi_t * |
regulator_p |
|
) |
| |
Initialization of PID controller parameters.
Initialize the variables used by the PID algorithm.
- Parameters
-
Kp | Proportional term. |
Ki | Integral term. |
regulator_p | Struct with PI status. |
◆ pi_reset_integrator()
void pi_reset_integrator |
( |
struct pi_t * |
regulator_p | ) |
|
Resets the integrator.
Calling this function will reset the integrator in the PID regulator.