Functions | |
void | arm_pid_reset_f32 (arm_pid_instance_f32 *S) |
void | arm_pid_init_f32 (arm_pid_instance_f32 *S, int32_t resetStateFlag) |
void | arm_pid_reset_q31 (arm_pid_instance_q31 *S) |
void | arm_pid_init_q31 (arm_pid_instance_q31 *S, int32_t resetStateFlag) |
void | arm_pid_reset_q15 (arm_pid_instance_q15 *S) |
void | arm_pid_init_q15 (arm_pid_instance_q15 *S, int32_t resetStateFlag) |
static INLINE float32_t | arm_pid_f32 (arm_pid_instance_f32 *S, float32_t in) |
static INLINE q31_t | arm_pid_q31 (arm_pid_instance_q31 *S, q31_t in) |
static INLINE q15_t | arm_pid_q15 (arm_pid_instance_q15 *S, q15_t in) |
A Proportional Integral Derivative (PID) controller is a generic feedback control loop mechanism widely used in industrial control systems. A PID controller is the most commonly used type of feedback controller.
This set of functions implements (PID) controllers for Q15, Q31, and floating-point data types. The functions operate on a single sample of data and each call to the function returns a single processed value. S
points to an instance of the PID control data structure. in
is the input sample value. The functions return the output value.
y[n] = y[n-1] + A0 * x[n] + A1 * x[n-1] + A2 * x[n-2] A0 = Kp + Ki + Kd A1 = (-Kp ) - (2 * Kd ) A2 = Kd
Kp
is proportional constant, Ki
is Integral constant and Kd
is Derivative constantProportional Integral Derivative Controller
void arm_pid_reset_f32 | ( | arm_pid_instance_f32 * | S ) |
Reset function for the floating-point PID Control.
[in] | *S | Instance pointer of PID control data structure. |
Definition at line 38 of file arm_pid_reset_f32.c.
void arm_pid_init_f32 | ( | arm_pid_instance_f32 * | S, |
int32_t | resetStateFlag | ||
) |
Initialization function for the floating-point PID Control.
[in,out] | *S | points to an instance of the PID structure. |
[in] | resetStateFlag | flag to reset the state. 0 = no change in state & 1 = reset the state. |
resetStateFlag
specifies whether to set state to zero or not. A0
, A1
A2
using the proportional gain( Kp
), integral gain( Ki
) and derivative gain( Kd
) also sets the state variables to all zeros. Definition at line 44 of file arm_pid_init_f32.c.
void arm_pid_reset_q31 | ( | arm_pid_instance_q31 * | S ) |
Reset function for the Q31 PID Control.
[in] | *S | Instance pointer of PID control data structure. |
Definition at line 38 of file arm_pid_reset_q31.c.
void arm_pid_init_q31 | ( | arm_pid_instance_q31 * | S, |
int32_t | resetStateFlag | ||
) |
Initialization function for the Q31 PID Control.
[in,out] | *S | points to an instance of the Q31 PID structure. |
[in] | resetStateFlag | flag to reset the state. 0 = no change in state 1 = reset the state. |
resetStateFlag
specifies whether to set state to zero or not. A0
, A1
A2
using the proportional gain( Kp
), integral gain( Ki
) and derivative gain( Kd
) also sets the state variables to all zeros. Definition at line 44 of file arm_pid_init_q31.c.
void arm_pid_reset_q15 | ( | arm_pid_instance_q15 * | S ) |
Reset function for the Q15 PID Control.
[in] | *S | Instance pointer of PID control data structure. |
Definition at line 38 of file arm_pid_reset_q15.c.
void arm_pid_init_q15 | ( | arm_pid_instance_q15 * | S, |
int32_t | resetStateFlag | ||
) |
Initialization function for the Q15 PID Control.
[in,out] | *S | points to an instance of the Q15 PID structure. |
[in] | resetStateFlag | flag to reset the state. 0 = no change in state 1 = reset the state. |
resetStateFlag
specifies whether to set state to zero or not. A0
, A1
A2
using the proportional gain( Kp
), integral gain( Ki
) and derivative gain( Kd
) also sets the state variables to all zeros. Definition at line 44 of file arm_pid_init_q15.c.
static INLINE float32_t arm_pid_f32 | ( | arm_pid_instance_f32 * | S, |
float32_t | in | ||
) | [static] |
Process function for the floating-point PID Control.
[in,out] | *S | is an instance of the floating-point PID Control structure |
[in] | in | input sample to process |
Definition at line 4535 of file arm_math.h.
static INLINE q31_t arm_pid_q31 | ( | arm_pid_instance_q31 * | S, |
q31_t | in | ||
) | [static] |
Process function for the Q31 PID Control.
[in,out] | *S | points to an instance of the Q31 PID Control structure |
[in] | in | input sample to process |
Scaling and Overflow Behavior:
Definition at line 4570 of file arm_math.h.
static INLINE q15_t arm_pid_q15 | ( | arm_pid_instance_q15 * | S, |
q15_t | in | ||
) | [static] |
Process function for the Q15 PID Control.
[in,out] | *S | points to an instance of the Q15 PID Control structure |
[in] | in | input sample to process |
Scaling and Overflow Behavior:
Definition at line 4620 of file arm_math.h.