This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMD28035 位置式pid问题,问 v.Ui= v.Ui + _IQmpy(v.Ki,v.Up) + _IQmpy(v.Kc,v.SatErr);?不理解,是不是应该是 v.Ui= v.Ui + _IQmpy(v.Ki,v.Err)

#define PID_MACRO(v)                     \
 v.Err = v.Ref - v.Fdb;          /* 计算误差Compute the error */      \
 v.Up= _IQmpy(v.Kp,v.Err);        /* 比例环节Compute the proportional output */  \
 v.Ui= v.Ui + _IQmpy(v.Ki,v.Up) + _IQmpy(v.Kc,v.SatErr); /* 积分环节Compute the integral output */   \
 v.OutPreSat= v.Up + v.Ui;        /* Compute the pre-saturated output */  \
 v.Out = _IQsat(v.OutPreSat, v.OutMax, v.OutMin);  /* Saturate the output */     \
 v.SatErr = v.Out - v.OutPreSat;       /* Compute the saturate difference */  \
 v.Up1 = v.Up;           /* Update the previous proportional output */

#endif // __PIDREG3_H__