PID Controllers

As observed and replicated by Fang et al., the basic control scheme of many stabilised platforms consist of proportional–integral–derivative (PID) controllers forming the heart of its logic. The PID controller is a feedback control loop that, in a nutshell, works in the following way (summarised from Igor Boiko’s Non-parametric Tuning of PID Controllers):

  1. The controller adjusts its output $y(t)$ controls according to the data gathered by the input $x(t)$.
    1. The input is usually a sensor that is related to the factor that we will to be a certain value: in our case, the input will likely be data from gyroscopic sensors that are attached to the camera/platform.
    2. The output is the controller/motors that directly control the factor that we wish to correct. In our case, it will be servo motors that control the tilt (or possibly translation) of the camera/platform.
  2. There is a desired value, called the setpoint $u(t)$, that is defined. This is the value that we wish for the factor to be. The difference between the setpoint and the input – the error $\varepsilon(t) = u(t)-x(t)$ – is calculated.
    1. The setpoint in our case would be the origin point (both the translational and rotational coordinates).
    2. The error would have as its magnitude the absolute distance between the current orientation and position and the origin point. The sign of each component will indicate the direction in which the correction has to be applied.
  3. With the calculated error, a signal is now applied to the output according to the sum of three terms: $y(t)=K_p\cdot\varepsilon(t)+K_i\int_0^t\varepsilon(t’)\,dt’+K_d\cdot\frac{\partial}{\partial t}\varepsilon(t)$, where $K_p$, $K_i$, and $K_d$ are constants that we control.
    1. The proportional term $K_p\cdot\varepsilon(t)$ is, as its name implies, directly proportional to the error term. This corrects the orientation of the stabiliser according to the information in the present.
    2. The integral term $K_i\int_0^t\varepsilon(t’)\,dt’$is proportional to the sum of the error over its history, which therefore prioritises errors that have dominated over a longer time. It corrects the orientation of the stabiliser according to information of the past.
    3. The derivative term $K_d\cdot\frac{\partial}{\partial t}\varepsilon(t)$ is proportional to the derivative of the error. Since the derivative gives the rate of change of the error, this term anticipates the change due to further increase of the output term, and thus corrects the orientation of the stabiliser according to “predictions” of the future.

Feasibility

Since it is an unspoken likelihood that we will be using an Arduino for this project, it is entirely feasible for us to incorporate the PID controller into our camera stabiliser – there is a well-documented PID library by Brett Beauregard (br3ttb) available for our use, which features parameters that are tunable at every tick, allowing for adaptable tuning. Adaptable tuning is particularly useful for preventing accidental resonance, since it reduces the aggressiveness of correction when it is closer to the origin point.