Practical implementation of the I_PARAMETER for PID control

General Robotics Forum - All aspects of robots and their applications. 

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Practical implementation of the I_PARAMETER for PID control Eli 08-13-2010
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by Eli on August 13, 2010, 6:51 am


Hello,
I'm looking for the best choice to implement fast PID controllers
using limited computational resources. The performance of these
controllers need not be the optimal, but reasonable and off course, it
should allow easy tuning to stabllity.

As i understand the I_PARAMETER term is usually created by applying
the P_PARAMETER to a LP filter. In my case this is too costly in terms
of computational power, it is much more easy to apply the P_PARAMETER
into a FIFO buffer and calculate the average value of all the records
inside this FIFO for each PID Control Tick/

Is this approach may supply reasonable result?


The same question about the D_PARAMETER.... if i will just subtract
the current P_PARAMETER value with an older one taken from the same
FIFO buffer?

Posted by D Herring on August 28, 2010, 1:47 am


On 08/13/2010 06:51 AM, Eli wrote:
> Hello,
> I'm looking for the best choice to implement fast PID controllers
> using limited computational resources. The performance of these
> controllers need not be the optimal, but reasonable and off course, it
> should allow easy tuning to stabllity.
> As i understand the I_PARAMETER term is usually created by applying
> the P_PARAMETER to a LP filter. In my case this is too costly in terms
> of computational power, it is much more easy to apply the P_PARAMETER
> into a FIFO buffer and calculate the average value of all the records
> inside this FIFO for each PID Control Tick/
> Is this approach may supply reasonable result?
> The same question about the D_PARAMETER.... if i will just subtract
> the current P_PARAMETER value with an older one taken from the same
> FIFO buffer?


Sorry I've been offline the past couple weeks.

In a PID controller, the control law looks like
u=Kp*P + Kd*D + Ki*I

where
u = control output

Kp = proportional gain
Kd = derivative gain
Ki = integral gain

P = sensor position - desired position
D = time derivative of P
I = time integral of P

As you suggest, a simple approximation of the derivative is
D=(P[t]-P[t-1])/dt. The integral may be calculated by accumulating
I[t]=I[t-1]+P*dt.

where
X[t] = current value of X
X[t-1] = previous value of X
dt = time between the two values

Better values of D may be obtained by using a more sophisticated
derivative filter.

Double-check the above for sanity; it was written rather quickly.

Later,
Daniel


The site map in XML format XML site map
other useful resources:
Official Robosapien Website
Lego Mindstorms Website

Contact Us | Privacy Policy