10#ifndef MINIFOC_ALGORITHM_PID_H_
11#define MINIFOC_ALGORITHM_PID_H_
14#define TORQUE_LOOP_CONTROL 1
16#define SPEED_LOOP_CONTROL 2
18#define ANGLE_LOOP_CONTROL 3
volatile unsigned char pid_control_mode_flag
flag variable of PID closed loop mode
unsigned char pid_parameter_available_flag
flag variable for PID parameter availability
void pid_config(unsigned char mode)
configure pid loop parameters
volatile PID_Structure_t angle_pid_handler
algorithm handler of PID angle loop
volatile PID_Structure_t speed_pid_handler
algorithm handler of PID speed loop
float pid_calculate_result(PID_Structure_t *pid_handler, float collect)
calculate result using sampling value
structure of PID algorithm
float ki
integral term coefficient in PID
float kp
proportional term coefficient in PID
float minimum
minimum output in PID
float maximum
maximum output in PID
float sum_maximum
maximum of anti saturation integral in PID
float last_error
error value of previous calculation in PID
float summary
value of integral term in PID
float expect
user expectations in PID
float kd
differential term coefficient in PID