Definition in file pid.h.
#include "stdint.h"
Include dependency graph for pid.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | PID_DATA |
PID Status. More... | |
Defines | |
#define | FALSE 0 |
#define | MAX_I_TERM (MAX_LONG / 2) |
#define | MAX_INT INT16_MAX |
Maximum values. | |
#define | MAX_LONG INT32_MAX |
#define | SCALING_FACTOR 128 |
#define | TRUE 1 |
Typedefs | |
typedef PID_DATA | pidData_t |
PID Status. | |
Functions | |
int16_t | pid_Controller (int16_t setPoint, int16_t processValue, struct PID_DATA *pid_st) |
PID control algorithm. | |
void | pid_Init (int16_t p_factor, int16_t i_factor, int16_t d_factor, struct PID_DATA *pid) |
Initialisation of PID controller parameters. | |
void | pid_Reset_Integrator (pidData_t *pid_st) |
Resets the integrator. |
|
Definition at line 58 of file pid.h. Referenced by main(). |
|
Definition at line 55 of file pid.h. Referenced by pid_Controller(), and pid_Init(). |
|
Maximum values. Needed to avoid sign/overflow problems Definition at line 53 of file pid.h. Referenced by pid_Controller(), and pid_Init(). |
|
|
|
Definition at line 25 of file pid.h. Referenced by Init(), and pid_Controller(). |
|
Definition at line 59 of file pid.h. Referenced by TIMER0_OVF_ISR(). |
|
PID Status. Setpoints and data used by the PID control algorithm Referenced by pid_Reset_Integrator(). |
|
PID control algorithm. Calculates output from setpoint, process value and PID status.
Definition at line 59 of file pid.c. References PID_DATA::D_Factor, PID_DATA::I_Factor, int16_t, int32_t, PID_DATA::lastProcessValue, MAX_I_TERM, MAX_INT, PID_DATA::maxError, PID_DATA::maxSumError, PID_DATA::P_Factor, SCALING_FACTOR, and PID_DATA::sumError. Referenced by main().
|
|
Initialisation of PID controller parameters. Initialise the variables used by the PID algorithm.
Definition at line 35 of file pid.c. References PID_DATA::D_Factor, PID_DATA::I_Factor, PID_DATA::lastProcessValue, MAX_I_TERM, MAX_INT, PID_DATA::maxError, PID_DATA::maxSumError, PID_DATA::P_Factor, and PID_DATA::sumError. Referenced by Init().
|
|
Resets the integrator. Calling this function will reset the integrator in the PID regulator. Definition at line 112 of file pid.c. References pidData_t, and PID_DATA::sumError.
|