AM263x Motor Control SDK  09.00.00
dcl_pi2.h File Reference

Introduction

Contains PI2 (double integrator) controller with its related structures and functions.

Go to the source code of this file.

Data Structures

struct  DCL_PI2_SPS
 Defines DCL_PI2 shadow parameter set used for updating controller parameter. More...
 
struct  dcl_pi2
 DCL_PI2 object for storing PI2 specific parameters PI2 - PI controller with double integrators. More...
 

Macros

#define PI2_SPS_DEFAULTS   { 1.0f, 0.0f, 1.0f, -1.0f }
 Defines default values to initialize DCL_PI2_SPS. More...
 
#define PI2_DEFAULTS
 Defines default values to initialize DCL_PI2. More...
 
#define PI2_INT_DEFAULTS
 Macro for internal default values to initialize DCL_PI2 Example: DCL_PI2 pi2_ctrl = { .Kp = 1.0f, .Ki = 0.0f, .Umax = 1.0f, .Umin = -1.0f, PI2_INT_DEFAULTS };. More...
 
#define DCL_initPI2()   &(DCL_PI2)PI2_DEFAULTS
 Initialize DCL_PI2 struct with default parameters Example: DCL_PI2 pi2_ctrl = DCL_initPI2();. More...
 
#define DCL_initPI2asParam(kp, ki, umax, umin)
 Initialize DCL_PI2 struct with input controller parameters Example: DCL_PI2* pi2_ctrl = DCL_initPI2asParam(1.0f,0.0f,1.0f,-1.0f); Note: input parameter needs to be in the same order as listed in PI2_SPS struct. More...
 
#define DCL_initPI2asSPS(pi2_ptr, sps_ptr)
 Initialize DCL_PI2 struct with sps parameters Example: DCL_PI2_SPS pi2_sps = { .Kp = , .Ki = , ...}; DCL_PI2 pi2_ctrl; DCL_initPI2asSPS(&pi2_ctrl,&pi2_sps);. More...
 

Typedefs

typedef _DCL_VOLATILE struct dcl_pi2 DCL_PI2
 
typedef _DCL_VOLATILE struct dcl_pi2PI2_Handle
 

Functions

_DCL_CODE_ACCESS void DCL_resetPI2 (DCL_PI2 *pi2)
 Resets PI2 internal storage data with interrupt protection. More...
 
_DCL_CODE_ACCESS void DCL_fupdatePI2 (DCL_PI2 *pi2)
 Loads PI2 tuning parameter from its SPS parameter. More...
 
_DCL_CODE_ACCESS _DCL_CODE_SECTION bool DCL_updatePI2 (DCL_PI2 *pi2)
 Updates PI2 parameter from its SPS parameter with interrupt protection. More...
 
_DCL_CODE_ACCESS _DCL_CODE_SECTION bool DCL_pendingUpdatePI2 (DCL_PI2 *pi2)
 A conditional update based on the pending-for-update flag. If the pending status is set, the function will update PI2 parameter from its SPS parameter and clear the status flag on completion. Note: Use DCL_setPendingStatus(pi2) to set the pending status. More...
 
_DCL_CODE_ACCESS void DCL_updatePI2SPS (DCL_PI2 *pi2)
 Update SPS parameter with active param, userful when needing to update only few active param from SPS and keep rest the same
More...
 
_DCL_CODE_ACCESS _DCL_CODE_SECTION float32_t DCL_runPI2Series (DCL_PI2 *pi2, float32_t rk, float32_t yk)
 Executes an inline series form PI2 controller on the FPU32. More...