|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: PID Loops
Computing the derivative is easy as it is just change over time. Computing the integral is a bit more involved. You can use Fourth order Runge-Kutta to estimate the integral
http://mathworld.wolfram.com/Runge-KuttaMethod.html http://doswa.com/blog/2009/01/02/fou...l-integration/ If you are using a PID function of some library, you probably don't need to worry about computing derivatives and integrals and will probably just need to pass it the desired set point and the current location/sensor reading (like in Labview) |
|
#2
|
||||
|
||||
|
Re: PID Loops
Quote:
"Euler's Method is the most common integration method for control systems . Control methods such as PID do not need exact integration to work well. This is because the purpose of the integral is usually to force the average error to zero to ensure that the controlled signal matches the command signal over long periods of time. Only rarely is there a need to control the integral of a signal. In those cases you may need a more accurate integration method." Control System Design Guide Second Edition George Ellis Page 82 |
|
#3
|
|||
|
|||
|
Re: PID Loops
I'm not a mathematician, but couldn't
Quote:
|
|
#4
|
||||
|
||||
|
Re: PID Loops
Quote:
If you are trying to move your car at 50 mph and currently, the error from this target is +10 mph, does it make sense to push the pedal down at 10 mph? A correlation does not mean an equivalent 1 to 1 relation. Another example is if you are trying to drive your robot 5 feet forward and the current error is 4 inches. Does it make sense to tell the motors to drive at 4 inches? Built into the k value is unit conversion among other things. Last edited by Chris27 : 13-03-2011 at 15:48. |
|
#5
|
||||
|
||||
|
Re: PID Loops
Quote:
On the other hand, suppose you are trying to control motor speed. You want to go 2000 rpm and you are presently going 1900 rpm. So the error is 100 rpm. Would it make sense to give the motor a voltage command which is roughly equal to 100 rpm? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|