|
-
Dec 2nd, 2004, 11:58 PM
#1
Thread Starter
New Member
PID control algorithm
Im currently designing a PID control for a dc motor, but i dont know a lot about programming , and I dont have a clue about how to implement the PID algorithm on C++ or VB specially for the Integral and derivative part.
m(t) = Kp * e(t) + Ki * int[e(t)dt] + Kd * [de/dt]
I found on a page that the integral and derivative part can be put like this:
m(n) = Kp * e(n) + Ki * sum( e(k)*dt, 1, n ) + Kd * [e(k) - e(k-1)] / dt
But im still a bit confused about putting it on code
Hope u can help me
jaem.deviantart.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|