Thursday, April 2, 2015

PID Controller

Consider a car, that we control its speed to reach a reference speed = 70 km/hr

then, the error is:
e(t) = s(t) - 70
     , where s(t) is the speed of the car at time t

We will use gas/brakes to accelerate/decelerate the car according to this error.

u(t) = Proportional Part + Integral Part + Differential part
where if u(t) = +ve --> press gas to accelerate
and  if u(t) = -ve --> press brakes to decelerate

  • Proportional part = constant * e(t)
    • As long as there is an error, we will accelerate/decelerate the car the car
    • But, this term does not guarantee to reach Vref, yes, it guarantees to press the gas as long as there is error, but may be this gas consumed by friction of something like this.
  • Integral part = constant * Integration of e(t) over time
    • This part, depends on the accumulation of error, as long as the error accumulates, the gas will be pressed harder.
    • Alone, this term will not be sufficient, because it does not care about the current value of e(t)
      • ex: if e(t) = 0, at an instance of time, but the integration of error in the period (0 --> t) != 0, then the gas will still be pressed
Proportional part and Integral part shall be added together to reach and maintain Vref
  • Differential part  = constant * derivative (rate of change) of e(t)
    • If e(t) is increasing --> gas/brakes will be pressed harder
    • If e(t) is decreasing --> gas/brakes will be pressed softer
    • Alone, this part is not sufficient, because if e(t) is constant, this part will be Zero!

As far as I have seen:

  • The proportional part coefficient shall be the largest.
  • Then the Integral part coefficient
  • Then the differential part coefficient

No comments:

Post a Comment