|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#4
|
||||
|
||||
|
Re: PID Control
Wikipedia has a rather helpful article on the subject. Even has some pseudo-code to look over:
Code:
previous_error = 0 integral = 0 start: error = setpoint - actual_position integral = integral + (error*dt) derivative = (error - previous_error)/dt output = (Kp*error) + (Ki*integral) + (Kd*derivative) previous_error = error wait(dt) goto start |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PID traction Control | dpeterson3 | C/C++ | 5 | 26-01-2009 21:11 |
| PID Control | John Gutmann | Programming | 12 | 15-04-2007 18:52 |
| Generic PID control code | Uberbots | Programming | 3 | 26-02-2007 16:59 |
| PID Control | Chris Bright | Programming | 9 | 26-03-2005 19:44 |
| PID Control Loops | ttedrow | Programming | 7 | 05-12-2002 12:03 |