AM243x Motor Control SDK  09.02.00

Introduction

Here is the list of PI controller APIs

Files

file  pi.h
 PI (Proportional and Integral) controller library.
 

Data Structures

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

Functions

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

Typedefs

typedef struct _PI_Obj_ * PI_Handle
 Defines the PI handle. More...
 

Typedef Documentation

◆ PI_Handle

typedef struct _PI_Obj_* PI_Handle

Defines the PI handle.

Function Documentation

◆ PI_getFbackValue()

static float32_t 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

◆ PI_getFfwdValue()

static float32_t 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

◆ PI_getGains()

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

Gets the gains in the PI controller.

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

◆ PI_getKi()

static float32_t 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

◆ PI_getKp()

static float32_t 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

◆ PI_getMinMax()

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

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

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

◆ PI_getOutMax()

static float32_t 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

◆ PI_getOutMin()

static float32_t 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

◆ PI_getRefValue()

static float32_t 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

◆ PI_getUi()

static float32_t 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

◆ PI_init()

PI_Obj* 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

◆ PI_setFbackValue()

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

Sets the feedback value in the PI controller.

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

◆ PI_setFfwdValue()

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

Sets the feedforward value in the PI controller.

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

◆ PI_setGains()

static void PI_setGains ( PI_Handle  handle,
const float32_t  Kp,
const float32_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

◆ PI_setKi()

static void PI_setKi ( PI_Handle  handle,
const float32_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

◆ PI_setKp()

static void PI_setKp ( PI_Handle  handle,
const float32_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

◆ PI_setMinMax()

static void PI_setMinMax ( PI_Handle  handle,
const float32_t  outMin,
const float32_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

◆ PI_setOutMax()

static void PI_setOutMax ( PI_Handle  handle,
const float32_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

◆ PI_setOutMin()

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

Sets the minimum output value allowed in the PI controller.

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

◆ PI_setRefValue()

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

Sets the reference value in the PI controller.

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

◆ PI_setUi()

static void PI_setUi ( PI_Handle  handle,
const float32_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

◆ PI_run_parallel()

static void PI_run_parallel ( PI_Handle  handle,
const float32_t  refValue,
const float32_t  fbackValue,
const float32_t  ffwdValue,
float32_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

◆ PI_run_series()

static void PI_run_series ( PI_Handle  handle,
const float32_t  refValue,
const float32_t  fbackValue,
const float32_t  ffwdValue,
float32_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 feedforward value to the controller
[in]pOutValueThe pointer to the controller output value

◆ PI_run()

static void PI_run ( PI_Handle  handle,
const float32_t  refValue,
const float32_t  fbackValue,
float32_t pOutValue 
)
inlinestatic

Runs the series form of the PI controller without updating the data strcture.

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