📄 pid_reg3.h
字号:
/* =================================================================================
File name: PID_REG3.H
Description: 头文件包括常量,数据类型定义和PIDREG3的函数模型
====================================================================================*/
typedef struct { float32 Ref; // Input: Reference input
float32 Fdb; // Input: Feedback input
float32 Err; // Variable: Error
float32 Kp; // Parameter: Proportional gain
float32 Up; // Variable: Proportional output
float32 Ui; // Variable: Integral output
float32 Ud; // Variable: Derivative output
float32 OutPreSat; // Variable: Pre-saturated output
float32 OutMax; // Parameter: Maximum output
float32 OutMin; // Parameter: Minimum output
float32 Out; // Output: PID output
float32 SatErr; // Variable: Saturated difference
float32 Ki; // Parameter: Integral gain
float32 Kc; // Parameter: Integral correction gain
float32 Kd; // Parameter: Derivative gain
float32 Up1; // History: Previous proportional output
void (*calc)(); // Pointer to calculation function
} PIDREG3;
typedef PIDREG3 *PIDREG3_handle;
/*-----------------------------------------------------------------------------
PIDREG3 初始化为默认值
-----------------------------------------------------------------------------*/
#define PIDREG3_DEFAULTS { 0, \
0, \
0, \
56, \
0, \
0, \
0, \
0, \
1, \
-1, \
0, \
0, \
0.02, \
0.5, \
1.05, \
0, \
(void (*)(Uint32))pid_reg3_calc }
/*------------------------------------------------------------------------------
PIDREG3.C函数原型
------------------------------------------------------------------------------*/
void pid_reg3_calc(PIDREG3_handle);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -