Showing posts with label Robotics. Show all posts
Showing posts with label Robotics. Show all posts

Thursday, April 2, 2015

Control Terms

System = something changes over time
Control = something that influence this change!

State = what the system is currently doing
Dynamics = how the state changes
Reference = what we want the system to do


System Dynamical Model

System:

  • Something changes (evolves) with time
Control:

  • Something which influences this change

Dynamical Model:

A dynamical Model of a system, is a model which describes how a system evolves with time.

To describe how a system evolves with time, or we can say changes with time:

we can use:
    • Differential Equation
    • Initial condition
Where:
    • It is known that the differentiation is something that describes change over time.
    • And, initial condition describes a specific state of the system.
Thus, with these 2 points, I can describe the system at a certain point of time, and I can describe how this system changes with time
          Hence, that's it, I described the system !

Solving the dynamical model, can be done:

A) Numerically:

By discretizing the time, I can use Taylor expansion:

X((k+1)*δt) = X(k*δt) + δt * X'(k*δt) + .... 

From the initial condition, we know X(k*δt)
From the differential equation, we know X'(k*δt) in terms of X(k*δt)

Hence, we can calculate X of k+1, from which we can get X of K+2, ... etc

B) Analytically (Integration):

To get the mathematical expression from the dynamical model:

    • Integrate the differential equation to get X(t) from X'(t)
    • Use the initial condition to get the integration constant

Equilibrium Point:

  • X'(t) = 0


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