typedef struct
{
//P参数设定:
signed int ProportionalGain;
signed int ProportionalGainScale;
//I参数设定:
signed int IntegralGain;
signed int IntegralGainScale;
//D参数设定:
signed int DerivativeGain;
signed int DerivativeGainScale;
signed int PositivePIDLimit;
signed int NegativePIDLimit;
signed int IntegralPart_K_1;
signed int PIDInput_K_1;
}PID_type;
下面是PID控制程序的一小段 :
ProportionalPart_K=
((pParams -> ProportionalGain) * PIDInput_K) >> (pParams -> ProportionalGainScale + 1)
请问这个">> (pParams -> ProportionalGainScale + 1)"的用处是干什么?为什么要这么用?求大腿~~~·