标题: 参考程序看不懂,求解答 [打印本页] 作者: Crown_Clown 时间: 2013-2-10 09:52 标题: 参考程序看不懂,求解答 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)"的用处是干什么?为什么要这么用?求大腿~~~· 作者: dlyt03 时间: 2013-2-10 21:19
:lol我来看答案的