Behavioural control in many animals involves complex mechanisms with intricate sensory-motor feedback loops. Modelling allows functional aspects to be captured without relying on a description of the underlying complex, and often unknown, mechanisms. A wide range of engineering techniques are available for modelling, but their ability to describe time-continuous processes is rarely exploited to describe sensory-motor control mechanisms in biological systems. We performed a system identification of visual flight speed control in the fruitfly Drosophila, based on an extensive dataset of open-loop responses previously measured under free flight conditions. We identified a second-order under-damped control model with just six free parameters that well describes both the transient and steady-state characteristics of the open-loop data. We then used the identified control model to predict flight speed responses after a visual perturbation under closed-loop conditions and validated the model with behavioural measurements performed in free-flying flies under the same closed-loop conditions. Our system identification of the fruitfly's flight speed response uncovers the high-level control strategy of a fundamental flight control reflex without depending on assumptions about the underlying physiological mechanisms. The results are relevant for future investigations of the underlying neuromotor processing mechanisms, as well as for the design of biomimetic robots, such as micro-air vehicles.
Animal behaviour depends on the processing of complex multi-modal sensory stimuli from intricate neuromotor control pathways, whose physiological mechanisms often remain elusive. A powerful approach involves capturing system level control principles in models, which provide an abstraction of the underlying physiological mechanisms.
To this end, control theory represents a common conceptual framework to describe behaviour in both animals and robotic systems, as recognized in cybernetics research early on (Rosenblueth et al. 1943). Reflexive control pathways are particularly amenable to system identification approaches due to the stereotypy with which behavioural output follows a sensory stimulation. In this context, a control model is able to describe how the dynamical system represented by the neuromotor control pathways manipulates its inputs—i.e. the sensory feedback—to obtain the desired effect on its output—i.e. the motor control (Rosenblueth et al. 1943; Nise 2004; Gibson & Russell 2006). The feedback control represented in many reflexive behaviours in animals is directly analogous to negative feedback loops commonly applied in control engineering, in which a measurement of the output of a system is compared with its input to generate an error signal for the controller. Cruise control in automobiles, for example, reduces the complexity of the automobile (representing the so-called ‘plant’) to a physical representation of its relationship with speed. A suitable controller is then applied to dynamically adjust the output of the motor using the actual speed of the car to match the desired speed set by the driver. This effective control system is based on an abstraction of the car into a few mathematical operations that does not require a description of low-level features, such as engine type or moment of inertia tensor.
Consequently, similar approaches as those applied in engineering applications are suitable also to describe and explore control systems in biology (Poggio & Reichardt 1973; Wang et al. 2006). In this case, the goal is not to design a suitable controller for a process and actuator (the plant; e.g. the muscles and wings), but to identify the entire biological control loop by manipulating the sensory input. This is done by applying an experimental disturbance to the environment of a biological system, whose input–output characteristics represent its transfer function (cf. figure 1a). This approach is particularly useful in neuroethology, because a control model can provide a functional explanation of an observed behaviour in the form of an abstract representation of the neural and biomechanical processes responding to biologically relevant stimuli (pioneered in insects by Hassenstein & Reichardt 1956).
Classic behavioural studies in insects have applied a so-called black-box approach to characterize reflexive visuomotor control loops based on the measurement of the visual inputs and resulting motor outputs (Kennedy 1939; Reichardt 1961; Götz 1964). To deliver precisely defined visual stimuli, insects were tethered and the fictive manoeuvres measured from changes in the motor output during walking (e.g. Clorophanus: Hassenstein 1951; Drosophila: Schuster et al. 2002) or flight (e.g. Drosophila: Götz 1964; Locusta: Robert & Rowell 1992). In this experimental paradigm, the visual stimulus is delivered in open loop, i.e. the visual reafference that normally would result from the insect's movements in the environment (i.e. under natural closed-loop conditions; Schuster et al. 2002; Fry et al. 2008; Taylor et al. 2008) is artificially interrupted owing to the tether.
The input–output characteristics of a black-box approach can be measured under steady-state, but also under transient conditions. Much of the present understanding of insect behaviour is based on seminal studies based on steady-state measurements only (e.g. Reichardt 1961; Heisenberg & Wolf 1993, but see Borst 1986). While these measurements can provide insights into the extraction of sensory cues relevant to the task (e.g. flight speed-dependence on pattern speed in fruitflies by David (1979)), they are principally unable to address the dynamics of a control process. A model based on steady-state measurements (Reichardt 1987) might not be able to correctly predict the time course of the response, masking the dynamic features of the underlying neural system. The transient response, on the other hand, is necessary to identify and create time-continuous models of dynamical behaviours that allow understanding the underlying control principles.
System identification is a method widely applied in engineering to build dynamical models from measured, time-continuous data (Ljung 1999). This set of mathematical tools and algorithms has already been applied in biology to obtain the transfer functions of the lift response from tethered animals (Bombus terrestris: Tanaka & Kawachi 2006).
As expected from engineering, these studies led to a model of the behaviour that is able to predict the response in every point of time, thus including transients and steady state.
While easy to apply, tethered paradigms have their limitations. First, tethering disrupts additional control loops, which may affect the behaviour in unforeseen ways. In flies, for example, flight stabilization depends on mechano-sensory feedback from the halteres (Pringle 1948; Nalbach 1994; Dickinson 2005). In tethered flight, the halteres no longer provide realistic feedback, which is a likely reason for significant behavioural artefacts observed from the wing kinematics (Fry et al. 2005). Second, calculating a virtual body motion from wing kinematics or forces, instead of observing it directly limits the explanatory power of tethered approaches with respect to realistic flight control, whose underlying dynamics and biomechanics are quite complex (Deng et al. 2006; Dickson et al. 2008; reviews: Dickinson 2006; Taylor et al. 2008).
Both these problems are avoided in a complementary approach, in which the insect is allowed to move freely, while artificially controlling particular aspects of the sensory stimulus in real time (Müller & Robert 2001, 2002; Schuster et al. 2002; Fry et al. 2004, 2008). Schuster and Strauss (Strauss et al. 1997) implemented such ‘virtual reality’ stimulus conditions for freely walking fruitflies that allowed particular visual features to be arbitrarily de-coupled from the fly's movements.
Visual flight speed control offers itself as a a powerful model behaviour for system identification because of its reflexive nature, which allows it to be considered from an engineering point of view as a time-invariant system. Furthermore, flight speed is controlled directly by the optic flow, while being invariant to wind speed (Drosophila: David 1982; Fry et al. 2009; apis: Srinivasan et al. 1991), allowing it to be treated as a single-input single-output system (SISO). In a previous study, we applied an engineering approach in free-flying fruitflies to explore visual flight speed control under free-flight conditions. To characterize the open-loop transfer properties of visual flight speed control, we equipped a wind tunnel with three-dimensional position tracking and virtual reality display technology. By continually adjusting the pattern phase to the fly's momentary position, we held the retinal speed constant with respect to the fly and measured its response from the resulting acceleration profile (Fry et al. 2008). In this way, we provided a one-parameter open-loop condition selectively for pattern speed, while the remaining visual, as well as other multi-modal sensory stimulation (in particular haltere feedback) remained under natural closed-loop conditions (Taylor et al. 2008). We systematically measured flight speed responses in the presence of a step change in retinal pattern temporal frequency (TF) and spatial frequency (SF), allowing us to identify a proportional dependence of the speed response on retinal pattern velocity (V = TF/SF), and hypothesize the structure of the flight speed control loop (cf. figure 1b). Through its wires and transformation blocks, the loop carries the speed value, generated with the sine gratings projected on the walls of the wind tunnel. The fruitfly computes the speed of the sine gratings, and generates a flight speed command using the transfer function. The command is then directly transformed into actual ground speed, unless it is above a threshold, in which case the ground speed is set to an upper limit. In closed-loop conditions (symbolized by a closed switch), the ground speed of the fly is subtracted from the speed of the sine gratings, reducing the visual speed perceived by the fly. In open loop, the fly's reactions do not affect its speed measurement, which remains that experimentally applied.
In this paper, we used previously acquired open-loop response data (Fry et al. 2009) to reverse-engineer a controller that is able to reproduce the time course of the observed flight speed responses to a step input of retinal optic flow. We found that fruitflies follow a second-order under-damped speed control scheme with a linear dependence on pattern velocity below a saturation limit that depends on windspeed.
We then used our model to predict speed responses under closed-loop conditions after a visual perturbation, and verified the predictions with speed responses measured from free-flying flies under the same stimulus conditions. Our model correctly predicted an overshoot in the closed-loop dynamic response, which is characteristic of second-order under-damped controllers. Hence, our results provide insight into the control rules underlying visual flight speed control, which are relevant for the understanding of underlying neuromotor control mechanisms. Furthermore, the identified control model offers itself for the transfer into technological applications, including vision-based flight speed control in autonomous micro-air vehicles (MAVs).
2. Materials and methods
2.1. Modelling speed control using open-loop behavioural data
2.1.1. System identification procedure and selection of model type
System identification is a trial-and-error process with the following main steps: (i) choice of a model type, and of a specific model structure; (ii) estimation of the parameters from raw data using a search algorithm consistent with the model type; and (iii) model simulation with the identified parameters. If the performance of the model does not match the measured data, the procedure is repeated from the first step.
Because vision-based translational speed control is a SISO-system, we chose process models with transfer functions (proportional and/or integrative and/or derivative) of first- to third-order. This type of model offers an explicit, algebraic representation of the transfer functions in the frequency domain. This has the advantage of using the simpler linear algebra, instead of solving the corresponding differential equations in the time domain. Each transfer function is thus the ratio between the input and the output signals: 2.1 where F(s) is the transfer function in the frequency domain.
To pass from one domain to the other, the Laplace operator transforms time-dependent inputs and outputs into homologous signals that are functions of complex angular frequency, or radians per unit time (Shubin 2001). The notation for the complex angular frequency is the Laplacian variable s: 2.2 where is the complex identity, and ω is the pulsation in radians per second (rad s−1).
The choice of an adequate model structure provides the basis for a meaningful estimation of the model parameters (Sjöberg et al. 1995; Ljung 1999). The structure is formulated as a transfer function with any number of differential and integral operators, poles, zeros and constants. To reduce this large parameter space, we included the known components (i.e. the adjustable parameters with physical interpretation, see §3.1) into the model, applying a so-called ‘grey box’ approach (as defined, for example, in Douglas & Martin 1991). Besides possibly simplifying the identification, this approach also increases the explanatory power of the model. Also in this case, we applied a trial-and-error strategy, in which we chose a combination of parameters, and repeated the procedure until we found the minimal model with a correlation coefficient between model output and the data of greater than 0.9. To reach the final choice, we followed the reduction principle (also known as Occam's Razor), preferring, at parity of performance, the simpler model. The structure of the final model is described in the results.
2.1.2. Parameter estimation of the open-loop transfer function
In the second step, an iterative search algorithm fitted the parameters of the chosen model to the measured data. The algorithm is standard in Matlab's System Identification Toolbox (v. 2007a, The Mathworks; command pem), and it minimized a robustified quadratic prediction error criterion. Subsequently, we applied the above-mentioned correlation-coefficient criterion of 90 per cent to validate the parameter identification with respect to each measured flight trajectory.
The parameters of the model were estimated based on a large dataset of flight speed responses (n = 5732 flight sequences) measured under visual open-loop conditions (Fry et al. 2009). In these experiments, free-flying flies were visually stimulated with single step inputs of pattern TF and SF with respect to the fly's frame of reference. Using this virtual reality open-loop paradigm (Fry et al. 2008), it was found that the flies' responses depended only on the ratio of TF (relative to the fly) and SF, which corresponds to the linear retinal slip speed (V = TF/SF), which was identified as the relevant control parameter for flight speed control.
Step inputs in open loop are commonly used in engineering to characterize the transfer properties of a system, such as an electrical motor (Nise 2004). This is because in control theory step functions can be considered fundamental ‘building blocks’ by which other time-continuous functions can be synthesized. Hence, we provided the automated parameter estimation algorithm with single speed steps in the range of −0.1 to 2.0 m s−1 as input signal, and the corresponding flight (ground) speed time courses of the flies as output. With increasing stimulus strength, the flies accelerated faster and consequently flew out of the cameras' tracking range sooner. Typical durations of measured open-loop flight sequences were in the order of 0.3–1 s.
2.1.3. Simulation of open-loop responses
In the third step of the system identification procedure, we recreated the model with all the fitted and the known properties (grey-box approach, see §3.1) in Simulink (v. 6.6, The Mathworks). In this simulation environment, diagrams of the models and their transfer functions can be represented using a large library of functional blocks. Integrated with Matlab, it allows seamless analysis of simulation results.
We simulated flight speed responses to step inputs in retinal pattern velocity of varying magnitudes, and compared them with the flight speed responses previously measured under the same stimulus conditions. In analogy to the previous analysis of the behavioural data (Fry et al. 2009), we quantified the response strength from the initial acceleration, which we extracted from a linear fit to the simulated velocity data.
2.1.4. Simulation and analysis of the model's closed-loop response
The power of a model that reproduces the measured data is to generate predictions to novel stimuli. Although our control model was identified solely based on open-loop input–output relationships, it correctly predicted how the flies recovered from a brief visual perturbation under visual closed-loop conditions. For this, we implemented closed-loop visual feedback in the Simulink model, such that the retinal pattern velocity also depended on the fly's flight speed. Specifically, the model output representing the fly's flight speed was subtracted from the step input to reflect the pattern speed under realistic closed-loop conditions (cf. figure 1b). Under closed-loop conditions, the model quickly reaches a steady-state flight speed, which we quantified from the mean speed of the last 80 ms of each measurement.
2.1.5. Analysis of the frequency response
Besides the analysis of the closed-loop trajectories, the transfer function of the model allowed us to characterize the steady-state response to oscillating patterns for a broad range of frequencies. The result of this analysis is summarized in Bode plots, in which the gain and phase delay of the transfer function are represented as a function of the oscillation frequency (Nise 2004). We calculated this frequency response in Matlab using the analytical form of the transfer function, and this allowed us to predict the bandwidth and stability of flight speed control in the fruitfly. The bandwidth is the width of constant gain, while the system is stable if at the phase crossover frequency (−180°) the gain is less than 0 dB.
2.2. Model validation with closed-loop experiments
2.2.1. Behavioural analysis of closed-loop flight speed control
We validated the model by comparing its performance under closed-loop conditions with that of fruitflies flying freely in the same wind tunnel previously used for the open-loop experiments (cf. figure 2; Fry et al. 2008, 2009). The wind tunnel is equipped with three-dimensional tracking (Trackit 3D, Biobserve GmbH, Bonn, Germany) and virtual reality technology, allowing for a behaviour-dependent stimulation. We used these features to automatically stabilize the flies in the centre of the wind tunnel by providing optic flow corresponding to their preferred speed (as described in Fry et al. (2008)) after voluntary take-off towards an upwind odour source. Then, the flies were subjected to a step increase in pattern velocity of sine gratings in the inertial frame of reference. The flies were thus able to reduce the discrepancy between the preferred and perceived retinal slip speed by accelerating forward (closed-loop condition, also see electronic supplementary material, video). In this study, we tested a total of 45 different combinations of TF (wind tunnel frame of reference) and SF. In our previous work (Fry et al. 2009), in contrast, we stimulated the flies with a constant retinal slip speed (i.e. in a body-centred frame of reference) by artificially de-coupling the stimulus from the flies' speed responses.
2.2.2. Analysis of the closed-loop response
We chose the final speed reached by the flies as a measure of response strength, measured by the first derivative of a first-order polynomial fitted through the last 80 ms of each test: 2.3 where x(t) represents the fly's position in the wind tunnel, and p1,2 are the parameters of the polynomial. The mean terminal speed during the trial was then determined from the first derivative, as 2.4
In rare cases, the correct tracking of a fly failed, for instance because of the presence of a second fly in the wind tunnel. Such erroneous flight tracks could easily be identified by large discontinuities in the position data. As an objective criterion, we rejected flight tracks that fitted a linear polynomial with an r2-value less than 0.9 (the r2 of correct flight tracks was 1.0). This procedure resulted in the exclusion of fewer than 2 per cent of the behavioural data (also see Fry et al. 2009).
3.1. System identification
Based on our earlier measurements, we know that speed responses depend linearly on the retinal pattern velocity below a saturation limit, which likely results from biophysical constraints (Fry et al. 2009). The linear and the saturating components can be suitably modelled as separate transfer functions in the frequency domain (see §2.1), under the assumption that the system is time-invariant. A recent analysis showed that this is the case in the closely related behavioural context of compensatory lift reactions (Graetzel et al. 2010). This notion is also consistent with the recent finding that linear filters predict quite closely the optomotor responses of Drosophila to arbitrary optic flow fields (Theobald et al. 2010).
3.1.1. Structure of the linear part of the model
To find the structure of the linear part of the controller, we applied the grey-box approach, by including three known features of visual flight speed responses (cf. figure 3a,b). First, the speed responses reveal a roughly constant latency of about 100 ms (see results in Fry et al. 2009), which is explained from the processing of optic flow in the visual system. Second, as previously shown (David 1982, for D. virilis), and recently confirmed in our open-loop paradigm (Fry et al. 2009), the flies attempt to maintain a particular ‘preferred’ flight speed, which corresponds to the visual flight speed eventually reached under steady-state conditions. Third, a mismatch of the perceived and desired retinal pattern slip velocity will result in a proportional compensatory speed response, subject to the particular response dynamics.
More specifically (cf. figure 3b), we implemented the delay as a decaying exponential transfer function acting on the input signal: 3.1 where Td = 100 ms. This time delay is somewhat longer than the delays previously measured for chasing (free-flying Fannia: 30 ms; Land & Collett 1974.) or object avoidance responses (magnetically tethered Drosophila: 49 ms; Bender & Dickinson 2006), but quite similar to a recent measurement in the more similar context of vertical flight speed (lift) control in the tethered Drosophila (75 ms; Graetzel et al. 2010). The preferred speed is the desired condition to which the controller tends. We implemented this as a constant transfer function that is subtracted from the input signal: 3.2 where Vp is the preferred speed in (m s−1; see table 2 for values).
Characteristic of feedback control systems, the difference between the input signal and the desired condition generates an error signal that feeds the control transfer function.
3.1.2. Identification of the linear transfer function
Having inserted the known components of the model, we then identified the transfer function of the controller using 5732 trajectories previously measured using patterns below the saturation speed (−0.1 to 0.6 m s−1) and spatial aliasing limit (SF < 25 m−1; Fry et al. 2009). For each trajectory, we systematically ran the identification algorithm on 16 models composed of all possible combinations of differential and integral operators, constants, zeros and up to three poles.
Already a simple proportional controller with a linear gain (KP) and two poles (Tp1, Tp2; model P2 in table 1) reproduced the open-loop steady-state (acceleration versus pattern speed) data with a correlation coefficient of 0.9959. Of the remaining models, only the proportional–integrative model with zero poles (P0I) performed similarly well in steady state, but it failed to reproduce the characteristic oscillations observed in closed loop (data not shown). In consequence, we focused our analysis on model P2, for which the complete open-loop transfer function, including the delay, is shown in equation (3.3). The preferred speed (Vp) is not present in this equation because it is a constant offset to the input, and therefore it is not represented in the frequency domain. 3.3 The numerical values of the fitted parameters are shown in table 2. Because the parameters have an interdependent effect on the accuracy of the model in reproducing the data, we chose balanced values for achieving a good fit of the open-loop data. In the case of Vp and Kp, the model choice was based on an intermediate value of two estimates obtained using different methods. For the remaining parameters, we chose a value within the measured variance of the single estimates.
The identified open-loop transfer function is close to critically damped, meaning that the responses to single step inputs reaches steady state the fastest without overshooting. The analytical reason for this is that the damping coefficient is close to 1 (ζ = 1.026), with similar values for the two poles (Tp1,2). In the example shown in figure 3c, the time course of the model's response is shown alongside that of flies. In response to a step input, the speed increases and tends to a constant value. The effect of the poles in the transfer function is visible in how the response increases more rapidly than it levels off to steady state. The inverse Laplace transform of the transfer function Fopen-loop(s) (equation (3.3)) allowed us to calculate the value of the steady-state response to open-loop step inputs (cf. equation (3.4)). 3.4
This analysis of the time-dependent transfer function, fopen-loop(t) shows that the steady-state response is proportional to the error signal driving the controller. For instance, for an input speed of 0.2 m s−1, the model eventually reaches a steady speed of 0.9 m s−1 (cf. figure 3c). The steady state is however reached after more than 1 s of stimulation, which we could not verify experimentally under open-loop conditions because of the limited size of the wind tunnel. Nonetheless, below 1 s, we could analyse the acceleration of the response of the model using the same criteria and procedure as for the behavioural data (parabolic fit between 0 and 1 s. For details, see Fry et al. (2008, 2009): we obtained a correlation coefficient with the behavioural data of 99.6% (cf. figure 3d up to 0.6 m s−1). Our analysis method is therefore sufficient to explore the response dynamics even though steady-state conditions were not reached within the constraints of the experimental set-up.
3.1.3. Modelling the saturation
Closing the loop of our linear model by subtracting the output from the input, however, would not have been sufficient to explain the behaviour. What we observed in our open-loop measurements was that, for pattern speeds above 0.6 m s−1 (grey-shaded area in figure 3b), the acceleration of the flies saturated depending on the wind speed (Fry et al. 2009).
To reconcile the fly-centred ground speed (GS) and the world-centred wind speed (WS), we combined them in the form of the airspeed (AS), as is common in aeronautics (cf. equation (3.5)): 3.5
In our experiments these three speeds are collinear because the flies moved along the longitudinal axis of the wind tunnel. Airspeed thus allowed us to saturate the flies' response at a limit that depended on the wind speed. Hence, we added this airspeed saturation in series to the control transfer function, as shown in figure 4. The complete control model contains the transfer functions (equations (3.1, 3.2, 3.3) and figure 3b), the saturation stage and feeds back to the input.
The addition of this saturation stage extended the quality of the model beyond the linear range. The correlation coefficient between the steady state of the fruitflies and that of the output of the model was 99.51 per cent (cf. figure 5b). Moreover, the model was capable of accurately reproducing the transient conditions (see examples in figure 5a).
None of the other tested transfer functions performed substantially better than the identified model. Notably, the addition of integrative and derivative terms did not yield an improved performance of the model. On the one hand, integrating the constant input vin leads to vin · t, i.e. a signal continuously increasing in time. On the other hand, deriving the constant input vin would result in zero except for the stimulus onset, where dvin/dt → ∞, meaning that the transient response would tend towards infinity. In our behavioural data, none of these characteristics could be observed. Moreover, effects of integrative and derivative mechanisms would be expected to appear in the closed-loop data: integration would tend to eliminate the steady-state error, while derivation would reduce the overshoot of the transient response. These characteristics did not appear in the closed-loop data, as described below.
3.2. Closed-loop predictions and verification
The identification of the linear control model and its parameters was based on dynamic open-loop stimulation, i.e. a condition in which the excitation (i.e. the retinal slip speed) remained persistent and independent of the fly's reactions. Under natural closed-loop conditions, in contrast, a fly is able to attain its preferred retinal slip speed with an appropriate change in flight speed, which feeds back onto the input.
A modification of the model allowed us to simulate the effect of reafferent visual feedback on the control of flight speed after a visual perturbation. For this, we defined a step change in pattern speed in the fixed frame of reference, which mimics the effect of a step change in wind speed on a free-flying fly. The retinal slip speed is then calculated by subtracting the fly's ground speed (cf. figure 4).
Using step changes in pattern speed ranging from −0.1 to 2 m s−1, we simulated flight-speed responses under closed-loop conditions. The pattern speed represents a perturbation in the ground speed (GSperturbation), which is acquired by the fly with a latency of Td. The perceived speed signal is compared with the preferred speed (vpreferred) to generate the error signal (verror) that drives the controller. The output of the linear part is the ground speed command (GScommand), which is transformed into the frame of reference of the packet of air in which the fly is moving, i.e. the airspeed command (AScommand). This command undergoes saturation and is transformed back into the inertial frame of reference to produce the fly's ground speed (GSfly). Under closed-loop conditions, this actual speed is subtracted from the perturbation in ground speed, moving it closer to the preferred speed.
The closed-loop transfer function (equation (3.6)), analytically calculated from Fopen-loop (equation (3.4)) using standard control theory procedures (Nise 2004) predicts that the ground speed of the flies first overshoots and finally settles at a value that is proportional to the input (continuous lines on figure 5c). This response overshoot, which would have been reduced by a derivative term in the transfer function, is a typical characteristic of under-damped second-order systems. 3.6
Owing to the feedback, the critically damped transfer function found under open-loop stimulation becomes thus under-damped under closed-loop conditions (damping coefficient ζ = 0.5735). Owing to the increased transient acceleration, the flies reach steady state sooner in closed loop, but the response takes longer to settle. The final constant ground speed is the steady-state response of the model (thick lines in figure 5c) in closed loop. As under open-loop conditions, the closed-loop response strength below saturation is proportional to the input speed. On the other hand, however, the model predicts a saturation at a higher input speed (approx. 0.8 m s−1; see figure 5d) when compared with the open-loop situation (approx. 0.6 m s−1; Fry et al. 2009; see figure 5b). If the saturation was visual, the fly would not be able measure the speed beyond this limit. Therefore, a change in the saturation pattern speed could indicate that saturation does not occur at the early stages of visuomotor processing.
3.2.2. Behavioural verification
To verify the predictions of the model, we measured 428 trajectories of fruitflies responding to closed-loop stimuli between −0.1 and 2.0 m s−1 (steps of 0.1 m s−1). The trajectories closely followed the predictions of the model. The flies' responses contained a higher oscillation frequency, whose phase we considered as part of the behavioural variability. The flies initially overshot the target speed (GSperturbation − vpreferred), then they undershot it before finally settling at a constant ground speed (thin lines in figure 5c). Though the trajectories appear to oscillate at a higher frequency, less than 2 per cent of the linear fits had a r2-value below 0.9. The flies reached 95 per cent of their final speed after the approximately 0.7 s irrespective of the stimulus strength, in accordance with the predictions of the open-loop measurements (Fry et al. 2009). The relevance of this feature remains unknown.
As for the open-loop case, the steady-state response, below a saturation limit, was proportional to the closed-loop pattern velocity (figure 5d). The correlation coefficient between the steady-state conditions was 98.22 per cent. From the biological perspective, it is relevant that the slope in the linear regime is below 1 (approx. 0.83): under closed loop, the flies were thus unable to fully compensate for the change in speed. In other words, the higher we set the pattern speed in closed loop, the slower the flies' preferred speed. On the other hand, from an engineering perspective, this provides a clear support for the lack of an integrative term in the transfer function, which would eliminate the steady-state error. The incomplete compensation of the change in speed is thus an intrinsic feature of the control scheme.
3.2.3. The open- and closed-loop saturation depends on the fly's airspeed
To verify the saturation limit, we repeated the closed-loop experiments at two different wind speeds. The flies flew 102 trajectories at a wind speed of –0.726 m s−1, and 69 at –0.423 m s−1, responding to pattern speeds between −0.1 and 2.0 m s−1. Comparable to our previous measurements in open loop (Fry et al. 2009), the higher the wind speed, the lower the saturation limit. When adding the wind speed to the fly's terminal speed, and therefore calculating their airspeed, the saturation limit remained roughly constant at a mean of 1.1577 ± 0.2055 m s−1 (cf. figure 6).
This saturation in the terminal speed of the flies under closed-loop stimulation appeared as saturation in acceleration under open-loop conditions. Without explicitly defining it, the open-loop saturation of the control model closely matched what we measured in the fruitflies (cf. figure 5b).
3.3. Frequency response predictions
Even though the identification procedure we applied is based on step inputs, we could predict the response of the system to pattern oscillations using the transfer functions of the model. The Bode plots show these frequency responses as amplitude gain of the response (figure 7a) and its phase shift (figure 7b). When stimulated with speed oscillations below the gain cut-off frequency, ωG = 5 rad s−1, the output of the model has a constant gain of 2.4 ≈ 7.6 dB, equal to KP in Fopen-loop (equation (3.3)). Approaching ωG, the model predicts that the fruitfly's response will be reduced (dampened). On the phase plot (figure 7b), the output signal increasingly lags behind the input. Moreover, the Bode plots show that the bandwidth of the speed controller is 3.05 rad s−1, and that it is a stable system because at the phase-crossover frequency (−180°), the gain is negative (approx. −6 dB). While the Bode plots predict the system dynamics up to very high frequencies, experimental measures of system responses are limited to a range that extends little beyond the cut-off frequency. At higher frequencies, the response gain becomes too low and the measured signals soon become buried in the measurement noise (also see Graetzel et al. 2010).
The dramatic increase in response lag is because of the long delay. Without delay, the phase-response of the control loop has the same cut-off frequency as the gain, and it plateaus at −180° (see inset of figure 7). Despite the delay, the translational ground speed closed-loop control of fruitflies is inherently stable (i.e. it approaches a steady-state value in the presence of an arbitrary input). The analytical reason for this crucial aspect in flight control is that the denominator of the closed-loop transfer function is a second-order polynomial with positive coefficients (equation (3.6)). This aspect of the model suggests that the fruitfly makes use of a robust strategy for controlling its translational flight speed.
We applied rigorous system identification techniques to reverse-engineer the fruitfly's visual flight speed control system based on the previously measured free-flight data measured using a one-parameter open-loop paradigm. A second-order under-damped feedback control scheme was able to closely reproduce the transient open-loop flight-speed responses. We then predicted the closed-loop response of fruitflies flying freely in a wind tunnel and verified the model with behavioural data likewise measured under closed-loop conditions. The verified transfer functions constitute an SISO system based on linear speed with an internal delay of 100 ms without integrative or derivative terms. The model provides direct insight into relevant high-level control aspects, such as stability, and provides a functional context for the previous finding that flies extract linear pattern velocity from the optic flow to control their flight speed.
4.1. Time-continuous versus steady-state
With our work, the phenomenological model outlined by Poggio & Reichardt (1973) is brought to the level of a quantitative, time-continuous control model that is able to predict transient responses and frequency-response characteristics. As such, our work goes beyond the earlier modelling efforts of insect optomotor responses, which were typically based on responses measured under steady-state conditions (e.g. Reichardt 1961; Götz 1968; Collett 1980; Wolf & Heisenberg 1990; Heisenberg & Wolf 1993). While steady-state responses obtained in classic input–output analyses may provide useful cues to infer underlying control mechanisms (e.g. Franceschini et al. 2007), a system identification based on behavioural response transients is required to identify the involved control principles directly and unambiguously.
4.2. Open versus closed loop
Our system identification approach is based on transient responses of free-flying flies to brief (1 s) open-loop stimuli, which we measured using a wind tunnel equipped with virtual reality display technology. Under this condition, only the visual stimulus was artificially decoupled from the flies' reaction, while non-visual sensors remained in the closed loop. At least for our paradigm, a behavioural system identification using open-loop measurements allows rigorous engineering concepts to be applied without imposing highly unnatural constraints on the animal. Our experimental approach also facilitated the validation of the open-loop model against data acquired under more conventional closed-loop conditions, where the flies received uninterrupted visual feedback as they adapted their flight speed to a change in optic flow. The applied perturbation in the presence of closed-loop feedback is an abrupt change in the landscape above which or through which the animal is flying, analogous—from a purely visual perspective—to the natural situation in which a wind gust causes a sudden change in flight (and hence retinal slip) speed.
The ability to identify the controller based on open-loop data and verify it under closed-loop conditions show that the transfer function remained unchanged under these two conditions. In contrast, previous measurements of tethered yaw responses showed inconsistent responses under open-loop and closed-loop conditions (Heisenberg & Wolf 1988). A possible cause for this incongruence is the different time scales at which our experiments were performed (less than 1 s) compared with classic input–output analyses, which were typically at considerably longer time scales. Prolonged open-loop stimulation may modify certain control parameters and therefore lead to different response characteristics under open-loop and closed-loop conditions. The short time scales of our tests are more likely to reflect realistic dynamics of free flight, considering the extremely short durations of typical free-flight responses of free-flying Drosophila (e.g. saccades lasting about 50 ms; Fry et al. 2003).
A further possibility could relate to the tethered flight paradigm, which has previously been shown to lead to substantial behavioural artefacts (Fry et al. 2005). Tethered flying flies are no longer able to sense realistic mechanosensory feedback from the halteres, which in free flight sense the angular velocity of the body. How tethering affects the highly complex and multimodal control system of the fly is so far unknown. In contrast, the ‘one-parameter open-loop’ free-flight paradigm on which our system identification is based provided selective control over horizontal optic flow as the single input to the controller, while allowing other sensory modalities to be under natural closed-loop conditions.
4.3. Overcoming experimental limitations through open- and closed-loop testing
Applying two abstract experimental conditions—open- and closed-loop—allowed us to test our hypotheses and validate our conclusions about flight speed control. For instance, we had previously found that the flies reacted to open-loop stimulation with a constant acceleration (Fry et al. 2009). The predictive power of the model allowed us to find that this was valid specifically in our experimental apparatus. Under open-loop conditions, the response of the flies was so slow that they flew out of the working section of the wind tunnel before they reached their steady state, which is a constant ground speed. The model thus allowed us to review and extend our knowledge. Hence, independent of the field of research, the influence of the set-up can be assessed by a feedback modelling process: measurement, modelling and verification through variation of the experimental stimulus.
Behaviour-dependent experimentation in free flight is very demanding because of the real-time requirements for tracking, process and display. Although the latency of the tracking and display loop is relatively long (38 ms; see Fry et al. 2008) when compared with the previously measured visual behaviours (e.g. 30 ms in chasing houseflies; see Land & Collett 1974), it did not hinder the identification of the behavioural control loop. This is because the error induced on the retinal slip speed is constant at only about 10 per cent of its set value (Fry et al. 2008). If the system lag had been longer than the controller's internal delay (Td = 100 ms), the open-loop experiments would not have been possible: the stimulus would only have been loosely decoupled from the reaction of the fly, possibly making its ground speed oscillate. Despite the explanatory power of the identified model, it does not reproduce all aspects of the fly's responses. For instance, in the closed-loop verification, the identified controller reproduces the initial delay, the overshoot and the terminal speed, but it does not capture a higher frequency oscillation with variable phases.
4.4. Experimental limitations
There exist practical limits to the identification of high-frequency system dynamics based on behaviourally measured data, which are subject to stimulus artefacts, measurement noise and other experimental limitations. First, our approach assumes that the dynamics of the measurement system is high when compared with the relevant frequencies to be identified in the speed control system. Previous work has considered both the methods (Fry et al. 2008) and the resulting behavioural data (Fry et al. 2009) in detail, showing that the procedures are well-suited to capture the speed response dynamics of fruitflies. A further limitation lies in the measurement duration, which owing to the limited length of the wind tunnel was in the order of 0.3–1 s, depending on the test parameters and hence the flies' flight speed (cf. figure 5; also see Fry et al. 2008, 2009). Nevertheless, this short time-frame appears sufficient to capture the dynamics of a complete speed correction manoeuvre, which according to figure 5 occurs within less than a second. It is possible, if not likely, that additional control components are present that operate over considerably longer time scales and cannot be detected in our experiments. For example, it is conceivable that a slow integrative component could be present to reduce the steady-state error over the duration of several seconds, which to detect would require a different approach.
4.5. Relevance of the frequency-response characteristics for speed control
Behavioural system identification depends on the ability to repeatedly elicit a robust response. In Drosophila, various paradigms have previously been applied, including, e.g., vertically oscillating patterns to explore lift-control dynamics (free flight: David 1984; tethered flight: Graetzel et al. 2010) or white noise motion stimuli to study translational and rotational responses under tethered flight conditions (Theobald et al. 2010). To study free-flight speed responses, we chose step inputs of retinal slip speed, because they provided the ability to measure a large number of stereotyped responses (5732 flight sequences were analysed for the present work) and analyse them in a straightforward manner (Fry et al. 2008, 2009). A potential problem is related to the limited precision with which step inputs can be delivered and responses measured, in particular, under free-flight conditions. Because step inputs are more suited to analyse the low-frequency dynamics of a system (Levine 1999), the relevance of our analysis for higher frequencies is limited. The speed responses of fruitflies are clearly dominated by low-frequency components (e.g. fig. 2 in Fry et al. (2009), and electronic supplementary material, video), however, which we explained with the comparatively long time-delay resulting from visual processing. The ability of the fruitfly to achieve stable speed control despite a comparatively long system delay (probably owing to visual processing) may at first seem surprising, but it becomes clear when considering that speed control is damped from the effects of body inertia and passive aerodynamic wing damping (V. Medici & S. N. Fry 2009, unpublished data). This damping allows the visual system considerable time for motion processing, without the risk of causing instability. A recent analysis of lift responses similarly reveals a quite low cut-off at around 6 Hz, which is quantitatively explained with the effect of body inertia (Graetzel et al. 2010). The delays we measure in translational flight responses are long when compared with previous measurements (see above), which is either owing to the different species considered, or instead the involvement of different pathways for the different tasks in question (see below). Comparative studies in different fly species could resolve this important question.
4.6. Speed as a control variable for high-level flight control
In a recent paper (Fry et al. 2009), we postulated that visual speed is the relevant control variable for flight speed control, based on a detailed analysis of the visual response tuning properties measured in the open-loop, free-flight paradigm. In the present work, we identified the visual speed-based control scheme quantitatively and furthermore validated it under closed-loop conditions. The finding that the visual system provides a speed signal for flight speed control is expected from the perspective of control system engineering, in which a feedback scheme uses the same measure both as the input and the output parameter. The computation of pattern velocity, however, conflicts with the current understanding of the fly's motion processing pathways. The well-described lobula plate tangential cells are known to integrate input from elementary motion detectors of the correlation-type (Reichardt 1961; Borst & Egelhaaf 1989). As such, they are tuned to a particular TF and SF, and are therefore unable to encode pattern velocity (V = TF/SF) unambiguously, in contrast to the experimental data previously obtained on free-flight speed control (see Fry et al. 2009, for extensive measurements, confirmed in this study by additional measurements based on 45 TF–SF combinations). It is possible therefore, that the speed response and possibly other translational optomotor responses are mediated by a separate pathway, as was recently suggested based on a forward genetic approach (Katsov & Clandinin 2008).
From an engineering design point of view, the initial delay and the observed response overshoot exhibited by the fly are suboptimal features for a flight speed controller. Instead, a classic proportional–integrative–derivative controller would actually be a better solution to the generic problem of speed control, as in closed loop it could reduce the transient overshoot response and the steady-state error. While integrative and derivative mechanisms have been proposed in previous models of insect visual control (Netter & Franceschini 2003; Taylor et al. 2008), our behaviourally identified control model requires only the proportional component. Besides simplicity, the possible advantages of a proportional control law may lie in its robustness toward noise resonation (Nise 2004). Note that the behaviourally identified control scheme cannot—and indeed does not attempt to—identify the properties of internal control systems for regulating speed, which must involve, e.g. the control of the pitch angle. These embedded control systems may be highly nonlinear and moreover contain integrative and derivative components of any order.
The insights gained into a high-level control strategy of the fruitfly are of direct relevance to the design of biomimetic controllers that capture the functionally relevant aspects of the biological model system. The identified transfer functions provide objective and unambiguous evidence for the crucial aspects of flight speed control. First, the control variable is linear (as opposed to angular) pattern velocity and therefore a vision sensor capable of extracting this measure would seem appropriate. Previous approaches have instead attempted to implement classic correlation type motion detection processes, which instead result in a tuning to a particular SF and TF (e.g. Harrison & Koch 1999). Second, using linear speed as input, the control scheme can be comparatively simple. Biological principles have often motivated robotic applications (Webb 2002), which in turn have provided new insights into the behaviours that motivated them (Franceschini et al. 2007). While useful to explore in practical terms the interface between nature and technology, most of these studies apply low-level models to robots, and complement the biological unknowns with layers of mechanics, electronics and software. The risk is that the overlaid layers drown the biological meaning of the low-level system. Using quantitative measurements, we characterized a high-level controller, and therefore a robotic implementation can be directly used to study various aspects of high-level control in biology. Examples of interesting problems are the effects of mechanical noise on a bio-inspired vision chip encoding linear speed or the relevance of the identified control scheme for other degrees of freedom.
4.7. Requirements of underlying neural mechanisms
In conclusion, we have reverse-engineered the fruitfly's flight speed control reflex, which revealed a surprisingly straightforward high-level control strategy. The knowledge gained into the control scheme reveals the functional role of the involved visual processing pathways, which is to extract the linear speed of the objects perceived in relative motion and execute the resulting motor commands precisely to adapt the flight speed as required. Despite nonlinear neuromotor processes, the high-level control strategy is linear and can be described with just a few parameters. This is advantageous both for the overlying neural control mechanisms, as well as from an evolutionary point of view because such a system is easier to control and modify in adaptation mechanisms.
This paper shows a so-far unexploited behavioural system identification approach that allows biological complexity to be reduced to a simple control model. On the one hand, the quantitative characterization of an optomotor reflex provides the basis to dissect the involved neuromotor pathways, for which advanced genetic tools are becoming increasingly available, most notably functional GAL4 knock-outs of specific neurons in the visual system (Rohrseitz 2009). On the other hand, the understanding gained about high-level control processes allows a meaningful transfer of biomimetic control strategies into robotic systems (e.g. MAVs) while avoiding the complexity of low-level mechanisms, whose functional role often remains elusive.
We wish to thank Vasco Medici, Chauncey Graetzel and Jan Bartussek for stimulating whiteboard discussions. Michael Dickinson provided us with useful feedback and support. We also thank Daniel Kiper for useful comments on an early draft, as well as three reviewers for their insightful comments. N.R. was supported by an ETH grant (TH-0-20338-06 LZ 03454) and S.N.F. was supported by the Human Frontier Science Programme. Additional financial support was provided by the Volkswagen Foundation.
- Received April 15, 2010.
- Accepted May 12, 2010.
- © 2010 The Royal Society