Motor Evaluation Kit NEVC-MCTRL-100-t01-1.0.0
Firmware for NEVB-MCTRL-100-01 for trapezoidal control of BLDC motors using Hall-effect sensors
|
PID controller source file. More...
#include "pid.h"
Go to the source code of this file.
Functions | |
void | PIDInit (int16_t p_factor, int16_t i_factor, int16_t d_factor, pidData_t *pid) |
Initialisation of PID controller parameters. | |
uint16_t | PIDController (int16_t setPoint, int16_t processValue, pidData_t *pid_st) |
PID control algorithm. | |
void | PIDResetIntegrator (pidData_t *pid_st) |
Resets the integrator in the PID regulator. | |
PID controller source file.
This file contains the implementation of the PID controller.
Definition in file pid.cpp.
uint16_t PIDController | ( | int16_t | setPoint, |
int16_t | processValue, | ||
pidData_t * | pid_st ) |
PID control algorithm.
Calculates output from set point, process value, and PID status.
setPoint | Desired value. |
processValue | Measured value. |
pid_st | PID status struct. |
Definition at line 54 of file pid.cpp.
void PIDInit | ( | int16_t | p_factor, |
int16_t | i_factor, | ||
int16_t | d_factor, | ||
pidData_t * | pid ) |
Initialisation of PID controller parameters.
Initialise the variables used by the PID algorithm.
p_factor | Proportional term. |
i_factor | Integral term. |
d_factor | Derivate term. |
pid | Struct with PID status. |
Definition at line 31 of file pid.cpp.
void PIDResetIntegrator | ( | pidData_t * | pid_st | ) |
Resets the integrator in the PID regulator.
Calling this function will reset the integrator in the PID regulator.
pid_st | Pointer to the PID status struct for which the integrator will be reset. |
Definition at line 130 of file pid.cpp.