文件名称:经典的电机的速度PID控制程序(运用了TI的DMC)
文件大小:71KB
文件格式:RAR
更新时间:2013-01-18 03:14:17
速度 PID
TI的经典速度PID int PostionPid(POSTIONPID *postion) { long PostionE; int k0,k1,k2; int PostionE0; k0=postion->PostionKp*10+postion->PostionKi+postion->PostionKd; k1=postion->PostionKp*10+2*postion->PostionKd; k2=postion->PostionKd; PostionE=postion->PostionR-postion->PostionF; if (PostionE>32767) PostionE0=32767; else if (PostionE<-32768)PostionE0=-32768; else PostionE0=PostionE; postion->PostionU+=k0*PostionE0-k1*postion->PostionE1+k2*postion->PostionE2; postion->PostionE2=postion->PostionE1; postion->PostionE1=PostionE0; postion->PostionU/=1000; postion->speed_reg->Speed=postion->PostionU; if (postion->speed_reg->Speed>postion->Speed) postion->speed_reg->Speed=postion->Speed; else if (postion->speed_reg->Speed<(0-postion->Speed)) postion->speed_reg->Speed=0-postion->Speed; postion->speed_reg->updata(postion->speed_reg); }
【文件预览】:
经典的电机的速度PID控制程序(运用了TI的DMC)
----VelocityPid()
--------2407bit.h(3KB)
--------Speed_Reg.h(320B)
--------main.c(5KB)
--------VelocityPid.cmd(2KB)
--------display.c(651B)
--------display.h(60B)
--------pid_reg1.h(2KB)
--------Debug.lkv(526B)
--------Postion_Reg.h(463B)
--------VelocityPid.paf(4KB)
--------Debug()
--------cc_build_Debug.log(1KB)
--------Speed_Reg.c(2KB)
--------2407c.h(21KB)
--------rts2xx.lib(163KB)
--------VelocityPid.pjt(896B)
--------Timer.c(637B)
--------Debug.lkf(526B)
--------dmc24xx.lib(58KB)
--------vector.asm(1KB)
--------Postion_Reg.c(907B)
--------VECTOR.H(5KB)
--------2407e.h(15KB)