AM263x Digital Power SDK  09.01.00

Introduction

Contains direct form 1 3rd order DF13 compensator with its related structures and functions.

Due to compatibility reason, this file maintains a copy of legacy function DCL_runDF13_C5(), DCL_runDF13_C6(). It is advised to not use these legacy functions for new development.

Previously, C28 version of DCL did not implement a function
to run DF13 with clamp. Instead, user had to implement a routine
similar to the following:
extern DCL_DF13 df;
extern float32_t ek, uk;
float32_t vk = 0;
float32_t uk = DCL_runDF13_C2/C5(df, ek, vk);
bool is_clamped = DCL_runClamp_C1/C2(&uk, Umax, Umin)
if (!is_clamped)
{
vk = DCL_runDF13_C3/C6(df, ek, uk);
}
A new function DCL_runDF13Clamp() was implemented to replace it,
therefore, user may change the aformentioned routine to just:
uk = DCL_runDF13Clamp(df, ek, Umax, Umin);

Go to the source code of this file.

Data Structures

struct  DCL_DF13_SPS
 Defines the DCL_DF13 shadow parameter set used for updating compensator parameter. More...
 
struct  dcl_df13
 DCL_DF13 object for storing df13 specific parameters. More...
 

Macros

#define DF13_SPS_DEFAULTS   { 0.25f, 0.25f, 0.25f, 0.25f, 0.0f, 0.0f, 0.0f, 0.0f }
 
#define DF13_DEFAULTS
 Defines default values to initialize DCL_DF13. More...
 
#define DF13_INT_DEFAULTS
 Macro for internal default values to initialize DCL_DF13 Example: DCL_DF13 df13_ctrl = { .b0 = 0.25f, .b1 = 0.25f, ... .a3 = 0.0f, DF13_INT_DEFAULTS };. More...
 
#define DCL_initDF13()   &(DCL_DF13)DF13_DEFAULTS
 Initialize DCL_DF13 struct with default parameters Example: DCL_DF13* df13_ctrl = DCL_initDF13();. More...
 
#define DCL_initDF13asParam(_b0, _b1, _b2, _b3, _a1, _a2, _a3)
 Initialize DCL_DF13 struct with input compensator parameters Example: DCL_DF13* DF13_ctrl = DCL_initDF13asParam(0.25f,0.25f,0.25f,0.25f,0.0f,0.0f,0.0f); Note: input parameter needs to be in the same order as listed in DF13_SPS struct. More...
 
#define DCL_initDF13asSPS(df_ptr, sps_ptr)
 Initialize DCL_DF13 struct with sps parameters Example: DCL_DF13_SPS df_sps = { .b0 = , .b1 = , ...}; //initial parameter DCL_DF13 df_ctrl; DCL_initDF13asSPS(&df_ctrl,&df_sps);. More...
 

Typedefs

typedef _DCL_VOLATILE struct dcl_df13 DCL_DF13
 
typedef _DCL_VOLATILE struct dcl_df13DF13_Handle
 

Functions

_DCL_CODE_ACCESS void DCL_resetDF13 (DCL_DF13 *df)
 Resets DF13 internal storage data with interrupt protection Implemented as inline C function. More...
 
_DCL_CODE_ACCESS void DCL_forceUpdateDF13 (DCL_DF13 *df)
 Loads DF13 tuning parameter from its SPS parameter without interrupt protection. More...
 
_DCL_CODE_ACCESS _DCL_CODE_SECTION void DCL_updateDF13NoCheck (DCL_DF13 *df)
 Loads DF13 tuning parameter from its SPS parameter with interrupt protection. More...
 
_DCL_CODE_ACCESS _DCL_CODE_SECTION bool DCL_updateDF13 (DCL_DF13 *df)
 A conditional update based on the update flag. If the update status is set, the function will update DF13 parameter from its SPS parameter and clear the status flag on completion.. Note: Use DCL_setUpdateStatus(df) to set the update status. More...
 
_DCL_CODE_ACCESS bool DCL_isStableDF13 (DCL_DF13 *df)
 Determines stability of the shadow compensator. More...
 
_DCL_CODE_ACCESS void DCL_loadDF13asZPK (DCL_DF13 *df, DCL_ZPK3 *zpk)
 Loads the DF13 shadow coefficients from a ZPK3 description. Note: Sampling period df->css->T are used in the calculation. New settings take effect after DCL_updateDF13(). More...
 
_DCL_CODE_ACCESS _DCL_CODE_SECTION float32_t DCL_runDF13 (DCL_DF13 *df, float32_t ek)
 Executes a 3rd order Direct Form 1 controller. More...
 
_DCL_CODE_ACCESS float32_t DCL_runDF13PartialCompute (DCL_DF13 *df, float32_t ek)
 Immediate computation to obtain DF13 servo error without updating the controller. More...
 
_DCL_CODE_ACCESS void DCL_runDF13PartialUpdate (DCL_DF13 *df, float32_t ek, float32_t uk)
 Update DF13 controller based on pre-computed control effort. More...
 
_DCL_CODE_ACCESS _DCL_CODE_SECTION float32_t DCL_runDF13Clamp (DCL_DF13 *df, float32_t ek, float32_t Umax, float32_t Umin)
 Executes a 3rd order Direct Form 1 controller with clamp. More...
 
_DCL_CODE_ACCESS float32_t DCL_runDF13_C5 (DCL_DF13 *p, float32_t ek, float32_t vk)
 Legacy C28 Function for maintaining backwards compatibility. It Executes an immediate 3rd order Direct Form 1 controller. More...
 
_DCL_CODE_ACCESS float32_t DCL_runDF13_C6 (DCL_DF13 *p, float32_t ek, float32_t uk)
 Legacy C28 Function for maintaining backwards compatibility. It executes a partial pre-computed 3rd order Direct Form 1 controller. More...
 
DCL_runDF13Clamp
_DCL_CODE_ACCESS _DCL_CODE_SECTION float32_t DCL_runDF13Clamp(DCL_DF13 *df, float32_t ek, float32_t Umax, float32_t Umin)
Executes a 3rd order Direct Form 1 controller with clamp.
Definition: dcl_df13.h:367
DCL_DF13
_DCL_VOLATILE struct dcl_df13 DCL_DF13
float32_t
float float32_t
Defines single,double precision data type. Note: Assumes ABI to be TI_EABI, does not support legacy T...
Definition: dcl_common.h:54