221 extern PI_Handle
PI_init(
void *pMemory,
const size_t numBytes);
378 Ui =
MATH_sat(Ui + (Ki * Error),outMax,outMin);
385 *pOutValue =
MATH_sat(Up + Ui + ffwdValue,outMax,outMin);
413 Ui =
MATH_sat(Ui + (Ki * Up),outMax,outMin);
420 *pOutValue =
MATH_sat(Up + Ui + ffwdValue,outMax,outMin);
431 #endif //end of _PI_H_ definition
_iq ffwdValue
the feedforward input value
static float_t PI_getKi(PI_Handle handle)
Gets the integral gain in the PI controller.
Contains the public interface to the types definitions.
static float_t PI_getOutMax(PI_Handle handle)
Gets the maximum output value allowed in the PI controller.
Defines the PI controller object.
static void PI_run_parallel(PI_Handle handle, const float_t refValue, const float_t fbackValue, const float_t ffwdValue, float_t *pOutValue)
Runs the parallel form of the PI controller.
float_t refValue
the reference input value
Contains the public interface to the math (MATH) module routines.
static void PI_setOutMin(PI_Handle handle, const float_t outMin)
Sets the minimum output value allowed in the PI controller.
float_t outMax
the maximum output value allowed for the PI controller
static void PI_getMinMax(PI_Handle handle, float_t *pOutMin, float_t *pOutMax)
Gets the minimum and maximum output value allowed in the PI controller.
_iq Ui
the integrator start value for the PI controller
_iq Ki
the integral gain for the PI controller
static float_t PI_getRefValue(PI_Handle handle)
Gets the reference value in the PI controller.
static void PI_run_series(PI_Handle handle, const float_t refValue, const float_t fbackValue, const float_t ffwdValue, float_t *pOutValue)
Runs the series form of the PI controller.
float_t ffwdValue
the feedforward input value
static void PI_setKp(PI_Handle handle, const float_t Kp)
Sets the proportional gain in the PI controller.
static float_t MATH_sat(const float_t in, const float_t max, const float_t min)
Saturates the input value between the minimum and maximum values.
static void PI_setKi(PI_Handle handle, const float_t Ki)
Sets the integral gain in the PI controller.
static float_t PI_getKp(PI_Handle handle)
Gets the proportional gain in the PI controller.
PI_Handle PI_init(void *pMemory, const size_t numBytes)
Initializes the PI controller.
static void PI_setMinMax(PI_Handle handle, const float_t outMin, const float_t outMax)
Sets the minimum and maximum output value allowed in the PI controller.
float_t Kp
the proportional gain for the PI controller
_iq Kp
the proportional gain for the PI controller
static float_t PI_getFfwdValue(PI_Handle handle)
Gets the feedforward value in the PI controller.
struct _PI_Obj_ PI_Obj
Defines the PI controller object.
static void PI_setRefValue(PI_Handle handle, const float_t refValue)
Sets the reference value in the PI controller.
_iq fbackValue
the feedback input value
static void PI_setFbackValue(PI_Handle handle, const float_t fbackValue)
Sets the feedback value in the PI controller.
static void PI_setGains(PI_Handle handle, const float_t Kp, const float_t Ki)
Sets the gains in the PI controller.
static void PI_setFfwdValue(PI_Handle handle, const float_t ffwdValue)
Sets the feedforward value in the PI controller.
_iq outMax
the maximum output value allowed for the PI controller
float_t Ui
the integrator start value for the PI controller
_iq refValue
the reference input value
float_t fbackValue
the feedback input value
static float_t PI_getFbackValue(PI_Handle handle)
Gets the feedback value in the PI controller.
struct _PI_Obj_ * PI_Handle
Defines the PI handle.
static void PI_setOutMax(PI_Handle handle, const float_t outMax)
Sets the maximum output value allowed in the PI controller.
float_t outMin
the minimum output value allowed for the PI controller
static void PI_setUi(PI_Handle handle, const float_t Ui)
Sets the integrator start value in the PI controller.
static float_t PI_getOutMin(PI_Handle handle)
Gets the minimum output value allowed in the PI controller.
float_t Ki
the integral gain for the PI controller
static void PI_getGains(PI_Handle handle, float_t *pKp, float_t *pKi)
Gets the gains in the PI controller.
static float_t PI_getUi(PI_Handle handle)
Gets the integrator start value in the PI controller.
_iq outMin
the minimum output value allowed for the PI controller
float float_t
Defines the portable data type for 32 bit, signed floating-point data.