3. Dynamics of closed-loop visuo-motor stabilization under proportional
3.1.2. Proportional controller as a static gain feedback controller
To close the loop for the fly-robot interface, a negative feedback controller was used to minimize the visual motion observed by the fly. Proportional-integral-derivative (PID) controllers are a set of generic linear controllers that are used to minimize the closed-loop error, as calculated by the difference between the system’s desired set point and the process output Figure 3.2. The equation for a generic PID controller is given as:
Turn-table
Grating Pattern
Robot
Figure 3.1.:Optomotor control using the fly-robot interface. The robot was placed on a turn-table within a cylindrical arena whose walls are lined with a vertically
oriented grating (spatial wavelength λsp= 11o, pattern contrast). The motion
of the robot and turn-table were limited to yaw rotations. Relative motion between the robot and turn-table was captured at 200 fps via two high speed cameras mounted on the robot. The robot rotation compensated for the visual motion as a result of the rotation of the turn-table.
Figure 3.2.:Block diagram of a generic PID controller. The controller calculates the input to the process block based on the instantaneous closed-loop error and the constant gains associated with the proportional (Kp), integrative (Ki) and derivative stages (Kd).
PIDout put = Kp· e(t) + Ki· Z
e(τ)dτ + Kd·
d[e(t)]
dt (3.1)
where e(t) = set point - process output is the error signal to the PID controller, and Kp,Ki and Kd are the gains for the proportional, integral and derivative stages
Eq 3.1 shows that the PID output is the sum of the parallel proportional, integral and derivative stages. The proportional stage simply scales in proportional to the error e(t) using a gain Kp. The integral stage contributes to the overall sum by
integrating the error over a fixed time period and scaling the resulting term by the gain Ki. Finally, the derivative stage scales the derivative of the error e(t) by the
gain Kd. The values of all three stages are summed to calculate the PID output. The closed-loop gains Kp, Kiand Kdfor the PID controller are either tuned manually or
by means of automated methods (review: O’Dwyer [2006]).
The simplest form of the generic PID form is the proportional controller. The proportional controller disregards the outputs of the integral and derivate stages (Ki= Kd = 0) and only estimates the controller output based on the proportional
stage with gain Kp. To my knowledge, all behavioural studies so far on fly opto-
motor responses in a closed-loop flight simulator have used proportional feedback control with a manually adjusted gain Kp (e.g. see: using yaw torque [Mayer,
1989, Warzecha and Egelhaaf, 1996, Wolf and Heisenberg, 1990], using wing-beat analysis [Chow and Frye, 2008, Graetzel et al., 2010, 2008, Theobald et al., 2009], using front-legs [Reinhard et al., 1992]).
3.1.3. Closed-loop proportional control
The block diagram for the closed-loop fly-robot interface is shown in Fig 4.2b. As mentioned earlier, the experimental system was setup such that the relative motion (slip speed) between the turn-table and the robot caused spiking activity, F, in the H1 cell being recorded from. These H1 responses were used by the proportional controller to update the angular velocity of the robot, ωr, in order to compensate
for the external visual perturbations as a result of the turn-table’s rotation.
The H1 cell increases its spike rate upon visual motion from back-to-front (pre- ferred direction - PD) and is inhibited by front-to-back motion (null direction - ND). The response of the cell was measured as a spike rate, F, which was a func- tion of the visual slip speed, ωp− ωr. When there was no visual motion (i.e. the
pattern was stationary), the cell responded with a spontaneous spiking rate, Fs.
Fly H1 LPTC Proportional Controller Kp Robot ωp ωr Vr Robot Speed spike rate F slip speed (ωp-ωr) Convertor Sensor Compensation Error E Controller Actuator
Figure 3.3.:Block diagram of closed-loop FRI using a proportional controller. The rela-
tive motion (slip speed) between the turn-table and the robot ωp− ωrcaused
spiking in the H1 cell at an instantaneous rate F. The H1 responses (spike rate F) were used by a real-time controller to compensate for the visual dis- placement by driving the robot in the opposite direction to the turn-table. The converter maps F to a compensation error E based on sigmoid function. E
was then used to update the robot speed Vr.
between the contrast frequency range of 2 − 4 Hz [Warzecha et al., 1999]. Prior to the actual closed-loop experiments, both Fs (Mean ± SE : 19.67 ± 2.3)and Fmax
(Mean ± SE : 78 ± 4.27) were estimated in open-loop for each fly using 3 repeats of 5 second stimulation with no pattern motion and motion in the PD (contrast fre- quency - 3 Hz), respectively. Estimates of the maximum spiking rate Fmax varied
when measured across different flies (N=7) (see Fig 3.4). This inter specific vari- ability is likely to reflect the natural variations as observed across different flies. The H1 spike rate, F, was then mapped onto a compensation error E. Two con- siderations were taken into account at this point. Firstly the spike rate, F, of the cell was the most sensitive around the spontaneous rate, Fs, with any large devi-
ation from Fs causing a rotation of the robot. In order to counter this, a sigmoid
function was used for the mapping of F onto E as shown in Fig. 3.5. A cosine function over the range[−1, 1] was mapped independently on to the ranges [0, Fs)
and(Fs, Fmax) in order to obtain a sigmoid relationship between F and E in the null
and preferred directions respectively. Secondly, the robot speed was controlled by an 8-bit value Vr which set the limits of the overall dynamic range for the actuator.
As a result E was mapped within the 8-bit range described by −Emax≤ E ≤ Emax.
Additionally, since the sensitivity to visual motion for the H1-cell is very low in the null direction, decreasing the error, E, in proportion to the spike rate F in the null direction would lead to prominent oscillations in the robots rotation response.
Fly 1 Fly 2 Fly 3 Fly 4 Fly 5 Fly 6 Fly 7 50 60 70 80 90 100 110 120
Estimates for the maximum spiking rate, Fmax
Fly H1 (N = 7)
Spiking Rate (Hz)
Gaussian smoothing (σsd=50 ms)
Figure 3.4.:Maximum spiking rates Fmaxestimates for the H1 cell (N=7 flies) over a pe-
riod of 5 s with 3 repeats. The measurements of Fmax across different flies
were highly variable.
As a result, the speed of the robot Vr was constrained to only decrease by 25% of
its previous value (25% of value in previous control loop iteration: 14[Vr(t) − ˆVr])
for visual motion in the null direction. Taking all these factors into account, the mapping F → E was defined by:
E = −Emax 2 {cos (2πφ) + 1} 1 4(Vr(t) − ˆVr) for F< Fs, where, φ= −12FFs = 0 for F= Fs, = Emax 2 {cos (2πφ) + 1} for F> Fs, where, φ= −12F−Fmax Fs−Fmax
Here ˆVris the speed offset that defines the value where the robot first starts to rotate
from rest.
0 Fs Fmax −Emax 0 Emax Spike Rate F C o mp e n sa ti o n Erro r E
Figure 3.5.:Sigmoid function used to map F to E for motion in the PD and ND. It has a higher gradient in the range F< Fsto account for the increased sensitivity to visual motion in the ND.
by:
Vr(t + 1) = Kp· E +Vr(t),
where the angular velocity of the robot is determined by:
ωr = G(s) ·Vr,
and where G(s) is the transfer function (cf Section 2.2.3) of the robot and is given as:
G(s) = 1.73 s2+ 1.87s + 0.86