1.3.1 Module description
Controller Functions for CMSIS-DSP MCHP Library (dsPIC33A)
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 group of functions implements (PID) controllers for single-precision floating-point and Q31 fixed-point data types, supporting functionalities which 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 |
The Gains A0, A1, A2 and state variables for a PID controller are stored together in an instance data structure. A separate instance structure must be defined for each PID Controller. There are separate instance structure declarations for each of the 3 supported data types. |
There is also an associated reset function for each data type which clears the state array. |
There is also an associated initialization function for each data type. The initialization function performs the following operations:
|
