1.3.2.2 mchp_pid_init_f32()

void mchp_pid_init_f32 (mchp_pid_instance_f32 * S, int32_t resetStateFlag)

Initialization function for the single-precision floating-point PID controller.

Computes internal filter coefficients from the PID gains (Kp, Ki, Kd). If requested, the function clears the controller state variables, including history terms and output.

Parameters:
in,out S

Pointer to the PID instance structure

in resetStateFlag
State reset control:
  • 0 : Do not reset internal state

  • 1 : Reset state history and output