Contains direct form 1 1st order DF11 compensator with its related structures and functions.
Go to the source code of this file.
Data Structures | |
struct | DCL_DF11_SPS |
Defines DCL_DF11 shadow parameter set used for updating compensator parameter. More... | |
struct | dcl_df11 |
DCL_DF11 object for storing df11 specific parameters. More... | |
Macros | |
#define | DF11_SPS_DEFAULTS { 0.5f, 0.5f, 1.0f } |
#define | DF11_DEFAULTS |
Defines default values to initialize DCL_DF11. More... | |
#define | DF11_INT_DEFAULTS .d1=0.0f, .d2=0.0f, .sps=&(DCL_DF11_SPS)DF11_SPS_DEFAULTS, .css=&(DCL_CSS)DCL_CSS_DEFAULTS |
Macro for internal default values to initialize DCL_DF11 Example: DCL_DF11 df11_ctrl = { .b0 = 0.5f, .b1 = 0.5f, .a1 = 1.0f, DF11_INT_DEFAULTS };. More... | |
#define | DCL_initDF11() &(DCL_DF11)DF11_DEFAULTS |
Initialize DCL_DF11 struct with default parameters Example: DCL_DF11* df11_ctrl = DCL_initDF11();. More... | |
#define | DCL_initDF11asParam(_b0, _b1, _a1) |
Initialize DCL_DF11 struct with input compensator parameters Example: DCL_DF11* DF11_ctrl = DCL_initDF11asParam(0.5f,0.5f,1.0f); Note: input parameter needs to be in the same order as listed in DF11_SPS struct. More... | |
#define | DCL_initDF11asSPS(df_ptr, sps_ptr) |
Initialize DCL_DF11 struct with sps parameters Example: DCL_DF11_SPS df_sps = { .b0 = , .b1 = , ...}; //initial parameter DCL_DF11 df_ctrl; DCL_initDF11asSPS(&df_ctrl,&df_sps);. More... | |
Typedefs | |
typedef _DCL_VOLATILE struct dcl_df11 | DCL_DF11 |
typedef _DCL_VOLATILE struct dcl_df11 * | DF11_Handle |
Functions | |
_DCL_CODE_ACCESS void | DCL_resetDF11 (DCL_DF11 *df) |
Resets DF11 internal storage data with interrupt protection. More... | |
_DCL_CODE_ACCESS void | DCL_forceUpdateDF11 (DCL_DF11 *df) |
Loads DF11 tuning parameter from its SPS parameter without interrupt protection. More... | |
_DCL_CODE_ACCESS _DCL_CODE_SECTION void | DCL_updateDF11NoCheck (DCL_DF11 *df) |
Loads DF11 tuning parameter from its SPS parameter with interrupt protection. More... | |
_DCL_CODE_ACCESS _DCL_CODE_SECTION bool | DCL_updateDF11 (DCL_DF11 *df) |
A conditional update based on the update flag. If the update status is set, the function will update DF11 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_isStableDF11 (DCL_DF11 *df) |
Determines stability of the shadow DF11 compensator. More... | |
_DCL_CODE_ACCESS void | DCL_loadDF11asZPK (DCL_DF11 *df, DCL_ZPK3 *zpk) |
Loads the DF11 shadow coefficients from a ZPK3 description Note: Sampling period df->css->T are used in the calculation. New settings take effect after DCL_updateDF11(). Only real z1 & p1 considered, all other roots ignored. More... | |
_DCL_CODE_ACCESS void | DCL_loadDF11asPI (DCL_DF11 *df, float32_t Kp, float32_t Ki) |
Loads compensator coefficients to emulate series form PI Note: Sampling period df->css->T are used in the calculation. New settings take effect after DCL_updateDF11(). More... | |
_DCL_CODE_ACCESS _DCL_CODE_SECTION float32_t | DCL_runDF11 (DCL_DF11 *df, float32_t ek) |
Executes a 1st order Direct Form 1 controller. More... | |