MotorWare f2806x Module API Documentation
Modules | Data Structures | Typedefs | Functions
PI

Modules

 PI_OVERVIEW
 

Data Structures

struct  _PI_Obj_
 Defines the PI controller object. More...
 

Typedefs

typedef struct _PI_Obj_ PI_Obj
 Defines the PI controller object. More...
 
typedef struct _PI_Obj_PI_Handle
 Defines the PI handle. More...
 
typedef struct _PI_Obj_ PI_Obj
 Defines the PI controller object. More...
 
typedef struct _PI_Obj_PI_Handle
 Defines the PI handle. More...
 

Functions

static _iq PI_getFbackValue (PI_Handle handle)
 Gets the feedback value in the PI controller. More...
 
static _iq PI_getFfwdValue (PI_Handle handle)
 Gets the feedforward value in the PI controller. More...
 
static void PI_getGains (PI_Handle handle, _iq *pKp, _iq *pKi)
 Gets the gains in the PI controller. More...
 
static _iq PI_getKi (PI_Handle handle)
 Gets the integral gain in the PI controller. More...
 
static _iq PI_getKp (PI_Handle handle)
 Gets the proportional gain in the PI controller. More...
 
static void PI_getMinMax (PI_Handle handle, _iq *pOutMin, _iq *pOutMax)
 Gets the minimum and maximum output value allowed in the PI controller. More...
 
static _iq PI_getOutMax (PI_Handle handle)
 Gets the maximum output value allowed in the PI controller. More...
 
static _iq PI_getOutMin (PI_Handle handle)
 Gets the minimum output value allowed in the PI controller. More...
 
static _iq PI_getRefValue (PI_Handle handle)
 Gets the reference value in the PI controller. More...
 
static _iq PI_getUi (PI_Handle handle)
 Gets the integrator start value in the PI controller. More...
 
PI_Handle PI_init (void *pMemory, const size_t numBytes)
 Initializes the PI controller. More...
 
static void PI_setFbackValue (PI_Handle handle, const _iq fbackValue)
 Sets the feedback value in the PI controller. More...
 
static void PI_setFfwdValue (PI_Handle handle, const _iq ffwdValue)
 Sets the feedforward value in the PI controller. More...
 
static void PI_setGains (PI_Handle handle, const _iq Kp, const _iq Ki)
 Sets the gains in the PI controller. More...
 
static void PI_setKi (PI_Handle handle, const _iq Ki)
 Sets the integral gain in the PI controller. More...
 
static void PI_setKp (PI_Handle handle, const _iq Kp)
 Sets the proportional gain in the PI controller. More...
 
static void PI_setMinMax (PI_Handle handle, const _iq outMin, const _iq outMax)
 Sets the minimum and maximum output value allowed in the PI controller. More...
 
static void PI_setOutMax (PI_Handle handle, const _iq outMax)
 Sets the maximum output value allowed in the PI controller. More...
 
static void PI_setOutMin (PI_Handle handle, const _iq outMin)
 Sets the minimum output value allowed in the PI controller. More...
 
static void PI_setRefValue (PI_Handle handle, const _iq refValue)
 Sets the reference value in the PI controller. More...
 
static void PI_setUi (PI_Handle handle, const _iq Ui)
 Sets the integrator start value in the PI controller. More...
 
static void PI_run_parallel (PI_Handle handle, const _iq refValue, const _iq fbackValue, const _iq ffwdValue, _iq *pOutValue)
 Runs the parallel form of the PI controller. More...
 
static void PI_run_series (PI_Handle handle, const _iq refValue, const _iq fbackValue, const _iq ffwdValue, _iq *pOutValue)
 Runs the series form of the PI controller. More...
 
static void PI_getGains (PI_Handle handle, float_t *pKp, float_t *pKi)
 Gets the gains in the PI controller. More...
 
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. More...
 
static void PI_setFbackValue (PI_Handle handle, const float_t fbackValue)
 Sets the feedback value in the PI controller. More...
 
static void PI_setFfwdValue (PI_Handle handle, const float_t ffwdValue)
 Sets the feedforward value in the PI controller. More...
 
static void PI_setGains (PI_Handle handle, const float_t Kp, const float_t Ki)
 Sets the gains in the PI controller. More...
 
static void PI_setKi (PI_Handle handle, const float_t Ki)
 Sets the integral gain in the PI controller. More...
 
static void PI_setKp (PI_Handle handle, const float_t Kp)
 Sets the proportional gain in the PI controller. More...
 
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. More...
 
static void PI_setOutMax (PI_Handle handle, const float_t outMax)
 Sets the maximum output value allowed in the PI controller. More...
 
static void PI_setOutMin (PI_Handle handle, const float_t outMin)
 Sets the minimum output value allowed in the PI controller. More...
 
static void PI_setRefValue (PI_Handle handle, const float_t refValue)
 Sets the reference value in the PI controller. More...
 
static void PI_setUi (PI_Handle handle, const float_t Ui)
 Sets the integrator start value in the PI controller. More...
 
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. More...
 
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. More...
 

Detailed Description


Data Structure Documentation

struct _PI_Obj_

Defines the PI controller object.

Definition at line 74 of file 32b/pi.h.

Data Fields
_iq fbackValue the feedback input value
float_t fbackValue the feedback input value
_iq ffwdValue the feedforward input value
float_t ffwdValue the feedforward input value
_iq Ki the integral gain for the PI controller
float_t Ki the integral gain for the PI controller
float_t Kp the proportional gain for the PI controller
_iq Kp the proportional gain for the PI controller
float_t outMax the maximum output value allowed for the PI controller
_iq outMax the maximum output value allowed for the PI controller
float_t outMin the minimum output value allowed for the PI controller
_iq outMin the minimum output value allowed for the PI controller
float_t refValue the reference input value
_iq refValue the reference input value
float_t Ui the integrator start value for the PI controller
_iq Ui the integrator start value for the PI controller

Typedef Documentation

typedef struct _PI_Obj_* PI_Handle

Defines the PI handle.

Definition at line 93 of file 32b/pi.h.

typedef struct _PI_Obj_* PI_Handle

Defines the PI handle.

Definition at line 93 of file float/pi.h.

typedef struct _PI_Obj_ PI_Obj

Defines the PI controller object.

typedef struct _PI_Obj_ PI_Obj

Defines the PI controller object.

Function Documentation

static _iq PI_getFbackValue ( PI_Handle  handle)
inlinestatic

Gets the feedback value in the PI controller.

Parameters
[in]handleThe PI controller handle
Returns
The feedback value in the PI controller

Definition at line 102 of file 32b/pi.h.

References _PI_Obj_::fbackValue.

static _iq PI_getFfwdValue ( PI_Handle  handle)
inlinestatic

Gets the feedforward value in the PI controller.

Parameters
[in]handleThe PI controller handle
Returns
The feedforward value in the PI controller

Definition at line 113 of file 32b/pi.h.

References _PI_Obj_::ffwdValue.

static void PI_getGains ( PI_Handle  handle,
_iq pKp,
_iq pKi 
)
inlinestatic

Gets the gains in the PI controller.

Parameters
[in]handleThe PI controller handle
[out]pKpThe pointer to the proportional gain value
[out]pKiThe pointer to the integrator gain value

Definition at line 125 of file 32b/pi.h.

References _PI_Obj_::Ki, and _PI_Obj_::Kp.

static void PI_getGains ( PI_Handle  handle,
float_t pKp,
float_t pKi 
)
inlinestatic

Gets the gains in the PI controller.

Parameters
[in]handleThe PI controller handle
[out]pKpThe pointer to the proportional gain value
[out]pKiThe pointer to the integrator gain value

Definition at line 125 of file float/pi.h.

References _PI_Obj_::Ki, and _PI_Obj_::Kp.

static _iq PI_getKi ( PI_Handle  handle)
inlinestatic

Gets the integral gain in the PI controller.

Parameters
[in]handleThe PI controller handle
Returns
The integral gain in the PI controller

Definition at line 139 of file 32b/pi.h.

References _PI_Obj_::Ki.

Referenced by PI_run_parallel(), and PI_run_series().

static _iq PI_getKp ( PI_Handle  handle)
inlinestatic

Gets the proportional gain in the PI controller.

Parameters
[in]handleThe PI controller handle
Returns
The proportional gain in the PI controller

Definition at line 150 of file 32b/pi.h.

References _PI_Obj_::Kp.

Referenced by PI_run_parallel(), and PI_run_series().

static void PI_getMinMax ( PI_Handle  handle,
_iq pOutMin,
_iq pOutMax 
)
inlinestatic

Gets the minimum and maximum output value allowed in the PI controller.

Parameters
[in]handleThe PI controller handle
[out]pOutMinThe pointer to the minimum output value allowed
[out]pOutMaxThe pointer to the maximum output value allowed

Definition at line 162 of file 32b/pi.h.

References _PI_Obj_::outMax, and _PI_Obj_::outMin.

static void PI_getMinMax ( PI_Handle  handle,
float_t pOutMin,
float_t pOutMax 
)
inlinestatic

Gets the minimum and maximum output value allowed in the PI controller.

Parameters
[in]handleThe PI controller handle
[out]pOutMinThe pointer to the minimum output value allowed
[out]pOutMaxThe pointer to the maximum output value allowed

Definition at line 162 of file float/pi.h.

References _PI_Obj_::outMax, and _PI_Obj_::outMin.

static _iq PI_getOutMax ( PI_Handle  handle)
inlinestatic

Gets the maximum output value allowed in the PI controller.

Parameters
[in]handleThe PI controller handle
Returns
The maximum output value allowed

Definition at line 176 of file 32b/pi.h.

References _PI_Obj_::outMax.

Referenced by PI_run_parallel(), and PI_run_series().

static _iq PI_getOutMin ( PI_Handle  handle)
inlinestatic

Gets the minimum output value allowed in the PI controller.

Parameters
[in]handleThe PI controller handle
Returns
The minimum output value allowed

Definition at line 187 of file 32b/pi.h.

References _PI_Obj_::outMin.

Referenced by PI_run_parallel(), and PI_run_series().

static _iq PI_getRefValue ( PI_Handle  handle)
inlinestatic

Gets the reference value in the PI controller.

Parameters
[in]handleThe PI controller handle
Returns
The reference value in the PI controller

Definition at line 198 of file 32b/pi.h.

References _PI_Obj_::refValue.

Referenced by CTRL_getRefValue().

static _iq PI_getUi ( PI_Handle  handle)
inlinestatic

Gets the integrator start value in the PI controller.

Parameters
[in]handleThe PI controller handle
Returns
The integrator start value for the PI controller

Definition at line 209 of file 32b/pi.h.

References _PI_Obj_::Ui.

Referenced by PI_run_parallel(), and PI_run_series().

PI_Handle PI_init ( void *  pMemory,
const size_t  numBytes 
)

Initializes the PI controller.

Parameters
[in]pMemoryA pointer to the memory for the PI controller object
[in]numBytesThe number of bytes allocated for the PI controller object, bytes
Returns
The PI controller (PI) object handle

Definition at line 56 of file 32b/pi.c.

Referenced by CTRL_init().

static void PI_run_parallel ( PI_Handle  handle,
const float_t  refValue,
const float_t  fbackValue,
const float_t  ffwdValue,
float_t pOutValue 
)
inlinestatic

Runs the parallel form of the PI controller.

Parameters
[in]handleThe PI controller handle
[in]refValueThe reference value to the controller
[in]fbackValueThe feedback value to the controller
[in]ffwdValueThe feedforward value to the controller
[in]pOutValueThe pointer to the controller output value

Definition at line 364 of file float/pi.h.

References _PI_Obj_::fbackValue, _PI_Obj_::Ki, _PI_Obj_::Kp, MATH_sat(), _PI_Obj_::outMax, _PI_Obj_::outMin, PI_getKi(), PI_getKp(), PI_getOutMax(), PI_getOutMin(), PI_getUi(), PI_setFbackValue(), PI_setFfwdValue(), PI_setRefValue(), PI_setUi(), and _PI_Obj_::Ui.

static void PI_run_parallel ( PI_Handle  handle,
const _iq  refValue,
const _iq  fbackValue,
const _iq  ffwdValue,
_iq pOutValue 
)
inlinestatic

Runs the parallel form of the PI controller.

Parameters
[in]handleThe PI controller handle
[in]refValueThe reference value to the controller
[in]fbackValueThe feedback value to the controller
[in]ffwdValueThe feedforward value to the controller
[in]pOutValueThe pointer to the controller output value

Definition at line 364 of file 32b/pi.h.

References _IQmpy, _IQsat, _PI_Obj_::fbackValue, _PI_Obj_::Ki, _PI_Obj_::Kp, _PI_Obj_::outMax, _PI_Obj_::outMin, PI_getKi(), PI_getKp(), PI_getOutMax(), PI_getOutMin(), PI_getUi(), PI_setFbackValue(), PI_setFfwdValue(), PI_setRefValue(), PI_setUi(), and _PI_Obj_::Ui.

static void PI_run_series ( PI_Handle  handle,
const float_t  refValue,
const float_t  fbackValue,
const float_t  ffwdValue,
float_t pOutValue 
)
inlinestatic

Runs the series form of the PI controller.

Parameters
[in]handleThe PI controller handle
[in]refValueThe reference value to the controller
[in]fbackValueThe feedback value to the controller
[in]ffwdValueThe feedback value to the controller
[in]pOutValueThe pointer to the controller output value

Definition at line 397 of file float/pi.h.

References _PI_Obj_::fbackValue, _PI_Obj_::Ki, _PI_Obj_::Kp, MATH_sat(), _PI_Obj_::outMax, _PI_Obj_::outMin, PI_getKi(), PI_getKp(), PI_getOutMax(), PI_getOutMin(), PI_getUi(), PI_setFbackValue(), PI_setFfwdValue(), PI_setRefValue(), PI_setUi(), and _PI_Obj_::Ui.

static void PI_run_series ( PI_Handle  handle,
const _iq  refValue,
const _iq  fbackValue,
const _iq  ffwdValue,
_iq pOutValue 
)
inlinestatic

Runs the series form of the PI controller.

Parameters
[in]handleThe PI controller handle
[in]refValueThe reference value to the controller
[in]fbackValueThe feedback value to the controller
[in]ffwdValueThe feedback value to the controller
[in]pOutValueThe pointer to the controller output value

Definition at line 397 of file 32b/pi.h.

References _IQmpy, _IQsat, _PI_Obj_::fbackValue, _PI_Obj_::Ki, _PI_Obj_::Kp, _PI_Obj_::outMax, _PI_Obj_::outMin, PI_getKi(), PI_getKp(), PI_getOutMax(), PI_getOutMin(), PI_getUi(), PI_setFbackValue(), PI_setFfwdValue(), PI_setRefValue(), PI_setUi(), and _PI_Obj_::Ui.

Referenced by CTRL_run().

static void PI_setFbackValue ( PI_Handle  handle,
const _iq  fbackValue 
)
inlinestatic

Sets the feedback value in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]fbackValueThe feedback value

Definition at line 227 of file 32b/pi.h.

References _PI_Obj_::fbackValue.

Referenced by PI_run_parallel(), and PI_run_series().

static void PI_setFbackValue ( PI_Handle  handle,
const float_t  fbackValue 
)
inlinestatic

Sets the feedback value in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]fbackValueThe feedback value

Definition at line 227 of file float/pi.h.

References _PI_Obj_::fbackValue.

Referenced by PI_run_parallel(), and PI_run_series().

static void PI_setFfwdValue ( PI_Handle  handle,
const float_t  ffwdValue 
)
inlinestatic

Sets the feedforward value in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]ffwdValueThe feedforward value

Definition at line 240 of file float/pi.h.

References _PI_Obj_::ffwdValue.

Referenced by PI_run_parallel(), and PI_run_series().

static void PI_setFfwdValue ( PI_Handle  handle,
const _iq  ffwdValue 
)
inlinestatic

Sets the feedforward value in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]ffwdValueThe feedforward value

Definition at line 240 of file 32b/pi.h.

References _PI_Obj_::ffwdValue.

Referenced by PI_run_parallel(), and PI_run_series().

static void PI_setGains ( PI_Handle  handle,
const _iq  Kp,
const _iq  Ki 
)
inlinestatic

Sets the gains in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]KpThe proportional gain for the PI controller
[in]KiThe integrator gain for the PI controller

Definition at line 254 of file 32b/pi.h.

References _PI_Obj_::Ki, and _PI_Obj_::Kp.

static void PI_setGains ( PI_Handle  handle,
const float_t  Kp,
const float_t  Ki 
)
inlinestatic

Sets the gains in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]KpThe proportional gain for the PI controller
[in]KiThe integrator gain for the PI controller

Definition at line 254 of file float/pi.h.

References _PI_Obj_::Ki, and _PI_Obj_::Kp.

static void PI_setKi ( PI_Handle  handle,
const float_t  Ki 
)
inlinestatic

Sets the integral gain in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]KiThe integral gain for the PI controller

Definition at line 268 of file float/pi.h.

References _PI_Obj_::Ki.

static void PI_setKi ( PI_Handle  handle,
const _iq  Ki 
)
inlinestatic

Sets the integral gain in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]KiThe integral gain for the PI controller

Definition at line 268 of file 32b/pi.h.

References _PI_Obj_::Ki.

Referenced by CTRL_setup().

static void PI_setKp ( PI_Handle  handle,
const float_t  Kp 
)
inlinestatic

Sets the proportional gain in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]KpThe proportional gain for the PI controller

Definition at line 281 of file float/pi.h.

References _PI_Obj_::Kp.

static void PI_setKp ( PI_Handle  handle,
const _iq  Kp 
)
inlinestatic

Sets the proportional gain in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]KpThe proportional gain for the PI controller

Definition at line 281 of file 32b/pi.h.

References _PI_Obj_::Kp.

Referenced by CTRL_setup().

static void PI_setMinMax ( PI_Handle  handle,
const float_t  outMin,
const float_t  outMax 
)
inlinestatic

Sets the minimum and maximum output value allowed in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]outMinThe minimum output value allowed
[in]outMaxThe maximum output value allowed

Definition at line 295 of file float/pi.h.

References _PI_Obj_::outMax, and _PI_Obj_::outMin.

static void PI_setMinMax ( PI_Handle  handle,
const _iq  outMin,
const _iq  outMax 
)
inlinestatic

Sets the minimum and maximum output value allowed in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]outMinThe minimum output value allowed
[in]outMaxThe maximum output value allowed

Definition at line 295 of file 32b/pi.h.

References _PI_Obj_::outMax, and _PI_Obj_::outMin.

Referenced by CTRL_run(), and CTRL_setParams().

static void PI_setOutMax ( PI_Handle  handle,
const _iq  outMax 
)
inlinestatic

Sets the maximum output value allowed in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]outMaxThe maximum output value allowed

Definition at line 309 of file 32b/pi.h.

References _PI_Obj_::outMax.

static void PI_setOutMax ( PI_Handle  handle,
const float_t  outMax 
)
inlinestatic

Sets the maximum output value allowed in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]outMaxThe maximum output value allowed

Definition at line 309 of file float/pi.h.

References _PI_Obj_::outMax.

static void PI_setOutMin ( PI_Handle  handle,
const float_t  outMin 
)
inlinestatic

Sets the minimum output value allowed in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]outMaxThe minimum output value allowed

Definition at line 322 of file float/pi.h.

References _PI_Obj_::outMin.

static void PI_setOutMin ( PI_Handle  handle,
const _iq  outMin 
)
inlinestatic

Sets the minimum output value allowed in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]outMaxThe minimum output value allowed

Definition at line 322 of file 32b/pi.h.

References _PI_Obj_::outMin.

static void PI_setRefValue ( PI_Handle  handle,
const _iq  refValue 
)
inlinestatic

Sets the reference value in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]refValueThe reference value

Definition at line 335 of file 32b/pi.h.

References _PI_Obj_::refValue.

Referenced by PI_run_parallel(), and PI_run_series().

static void PI_setRefValue ( PI_Handle  handle,
const float_t  refValue 
)
inlinestatic

Sets the reference value in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]refValueThe reference value

Definition at line 335 of file float/pi.h.

References _PI_Obj_::refValue.

Referenced by PI_run_parallel(), and PI_run_series().

static void PI_setUi ( PI_Handle  handle,
const float_t  Ui 
)
inlinestatic

Sets the integrator start value in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]UiThe integral start value for the PI controller

Definition at line 348 of file float/pi.h.

References _PI_Obj_::Ui.

Referenced by PI_run_parallel(), and PI_run_series().

static void PI_setUi ( PI_Handle  handle,
const _iq  Ui 
)
inlinestatic

Sets the integrator start value in the PI controller.

Parameters
[in]handleThe PI controller handle
[in]UiThe integral start value for the PI controller

Definition at line 348 of file 32b/pi.h.

References _PI_Obj_::Ui.

Referenced by CTRL_reset(), CTRL_setup(), PI_run_parallel(), and PI_run_series().