19BUS 发表于 2011-11-16 10:32:21

T1 有个PID原本程序 PID是不是直接指给占空比CMPR

T1有个PID原本程序
void pid_reg3_calc(PIDREG3 *v)
{      
    // Compute the error
    v->Err = v->Ref - v->Fdb;

    // Compute the proportional output




    // Compute the pre-saturated output
    v->OutPreSat = v->Up + v->Ui + v->Ud;

    // Saturate the output
    if (v->OutPreSat > v->OutMax)
      v->Out =v->OutMax;
    else if (v->OutPreSat < v->OutMin)
      v->Out =v->OutMin;
    else
      v->Out = v->OutPreSat;

    // Compute the saturate difference
    v->SatErr = v->Out - v->OutPreSat;

    // Update the previous proportional output
    v->Up1 = v->Up;

}

这个PID的输出v->OutPreSat 是不是直接指给占空比CMPR?   还是有什么其他技巧??或者我说的有错误,,哪个回答下

19BUS 发表于 2011-11-16 10:33:08

这个PID的输出v->OutPreSat 是不是直接指给占空比CMPR?   还是有什么其他技巧??或者我说的有错误,,哪个回答下

19BUS 发表于 2011-11-16 14:58:09

DDDDDDDDDDDD

toofen 发表于 2011-11-16 19:29:25

回复【楼主位】19BUS
-----------------------------------------------------------------------

在这段程序里,v->Out才是此PID控制器的输出
v->Out一般还需要进行处理来转换成占空比

19BUS 发表于 2011-11-17 12:35:21

赌东道   赌东道赌东道赌东道的

19BUS 发表于 2011-11-21 08:48:31

DDDDDDDDDDDDDDDDDDDDDD

19BUS 发表于 2011-11-24 11:38:30

赌东道赌东道赌东道的

kljun007 发表于 2011-12-5 17:04:17

->这个运算符比较纠结,不明白什么意思,麻烦3楼大侠给指点指点。
页: [1]
查看完整版本: T1 有个PID原本程序 PID是不是直接指给占空比CMPR