Taking Flight

Anyone who has tried to swat a fly knows that their powers of avoidance are impressive. Executing such rapid avoidance requires that the sensory recognition of an approaching threat be translated into evasive movement almost instantaneously. Muijres et al. (p. 172) used high-speed videos and winged robots to show that flies respond to approaching threats by making rapid banked turns initiated through subtle wing changes over just a few wing beats. The rapid nature of the turns suggests the existence of dedicated sensory-motor circuits that allow the flies to respond within a fraction of a second.

Abstract

Avoiding predators is an essential behavior in which animals must quickly transform sensory cues into evasive actions. Sensory reflexes are particularly fast in flying insects such as flies, but the means by which they evade aerial predators is not known. Using high-speed videography and automated tracking of flies in combination with aerodynamic measurements on flapping robots, we show that flying flies react to looming stimuli with directed banked turns. The maneuver consists of a rapid body rotation followed immediately by an active counter-rotation and is enacted by remarkably subtle changes in wing motion. These evasive maneuvers of flies are substantially faster than steering maneuvers measured previously and indicate the existence of sensory-motor circuitry that can reorient the fly’s flight path within a few wingbeats.

Flies are among the most agile flying animals and have served as a model for many features of sensory physiology (1), muscle mechanics (2, 3), and aerodynamics (4–7). Among their most impressive flight behaviors are evasive maneuvers, as witnessed by anyone who has attempted to swat them. The evasive takeoff behaviors of flies have been thoroughly investigated, and evidence suggests that they can quickly determine the direction of a looming threat and bias their jump in the opposite direction (8). Although the escape maneuvers of flying flies have recently been observed (9), they have not been systematically analyzed and it is not known whether, or how, they detect and evade a rapidly approaching object.

Like aircraft, the angular orientation of a flying insect can be specified by its rotation about three orthogonal axes: the yaw, pitch, and roll axes (Fig. 1C). For an insect flying steadily, the yaw axis is vertical, whereas the pitch and roll axes lie in the horizontal plane. Yaw—that is, rotation about the yaw axis—will simply change a fly’s orientation in the horizontal plane. Pitch will cause the head to tilt either up or down, whereas roll will cause the body to rotate to the left or right. A combination of both roll and pitch will bank the body with respect to the horizontal plane. Previous studies suggest that flies change course without banking by creating torque about their yaw axis (10–12). It is not known, however, whether flies or other insects employ this same strategy during fast evasive maneuvers.

(A) When a fly passes through the crossed beams of the two IR lasers at the center of the arena, a looming stimulus is displayed on green LED panels and cameras are triggered. (B) Images of a fly in three camera views superimposed with a wireframe model after automated tracking. (C and D) Drosophila models in steady flight with a horizontal stroke plane. (C) Body dynamics are described by velocity vector [U = (ux,uy,uz)] and angular velocity vector [Ω = (ωx,ωy,ωz)], where ωx, ωy, and ωz correspond to roll, pitch, and yaw rates, respectively. (D) Wingbeat kinematics are defined by stroke angle (ϕ), deviation angle (γ), and rotation angle (α). The orientation of the normalized force vector (F/mg, where mg is fly weight) in the body reference frame is defined by pitch (β) and roll (ξ) angles relative to a vector normal to the stroke plane. (E) Photomontages from the downward-facing camera of six flight sequences. Each image is shown at its correct spatial location but with variable time intervals. Horizontal components of velocity and acceleration vectors are shown in cyan and red, respectively. Looming stimulus direction and onset are indicated by green arrow. Scale bar in (E, part d), 5 mm (image), 1 m s−1 (velocity) and 25 m s−2 (acceleration).

Using three high-speed cameras operating at 7500 frames per second, we captured escape responses of the fruit fly Drosophila hydei, as they flew within a cylindrical arena (Fig. 1A) (13). Flies were backlit in each camera view using custom-built arrays of infrared (IR) light-emitting diodes (LEDs) (850 nm), an essential feature of the set-up because it allowed us to visualize the flies without interfering with their ability to see visual stimuli provided by an LED display (fig. S1). The LED display surrounded the arena and consisted of a 40 by 192 (height by circumference) array of green (565 nm) LEDs (14). Before and after each trail, all the green LEDs were turned on to provide illumination within the arena (70 lux). When triggered, the display was programmed to generate a dark expanding circle, with a Michelson contrast of 93% (14).

In each trial, both the looming stimulus and image capture were triggered automatically when a fly flew directly through the focus region of the three cameras at the center of the arena (7). The captured images during escape reactions were analyzed using a custom machine vision tracking system that was designed for analyzing Drosophila flight kinematics (15). In this system, the body and wings are tracked separately by projecting a fly body model and two wing models onto the three camera images using a direct linear transformation method for calibration (Fig. 1B) (13). We captured and digitized a total of 92 trials consisting of 3566 wingbeats, from which we determined heading, flight speed, and acceleration in both laboratory and fly frames of reference, as well as three angular measurements defining body position (pitch, roll, and yaw) (Fig. 1C) and three angular measurements for each of the two wings (stroke angle, deviation, and rotation) (Fig. 1D) (13).

Once they detected the looming threat, flies altered their flight path in a remarkably fast and accurate manner. Figure 1E shows a set of undersampled photomontages of several trials taken by the downward-facing camera (see also movies S1 to S6). Visual inspection of the sixth image in each sequence immediately illustrates a major finding of our study; flies direct themselves away from the stimulus by quickly banking, and not yawing, their bodies. In addition, after changing their flight course, the animals quickly rotate back to attain a horizontal attitude and accelerate away from the looming threat. An animation of one example trial demonstrating the salient features of an evasive maneuver is shown in movie S7.

To examine the directional tuning and aerodynamics of the evasive maneuvers in more detail, we mirrored all sequences in which the flies performed a left-directed turn in response to the stimulus and aligned them with all the right-directed turns. Because the primary goal of our analysis was to elucidate the biomechanical basis of evasive maneuvers rather than the psychophysics of looming detection (16–19), we aligned all of our sequences to the start of the motor response rather than to the stimulus onset. The visual-motor delay during the escape response was on average 61 ± 21 ms (mean ± SD, n = 92 trials) (13), which is consistent with previous measurements in D. melanogaster (8, 17).

The escape sequences consisted of two components: a rapid change in flight direction, Δσ, and an increase in flight speed, ΔU (Fig. 2, A and B), both of which depended strongly on the initial angular position of the looming stimulus in the fly’s frame of reference, λ. Flies approached from the rear accelerated quickly, whereas animals approached from the front first slowed down while changing direction before speeding up (Fig. 2B). The directional tuning was most accurate when the stimulus loomed from the side (λ ~ –90°) (Fig. 2, G and H) and less accurate when the flies experienced looming directly in front or behind (λ ~ –180° or 0°). Nevertheless, 80% of the flies were able to direct their escapes within a 90° sector directly opposite the azimuthal position of the stimulus (Fig. 2, G and H).

(A to F) Temporal dynamics of parameters throughout the maneuver: (A) σ, heading in the stimulus reference frame; (B) ΔV, change in flight speed; (C) σF, direction of horizontal aerodynamic force in stimulus reference frame; (D) F/mg, total normalized aerodynamic force. (E) Roll angle ξ and (F) pitch angle β of F/mg in the fly body frame (median and quartile range). In (A) to (D), thin gray lines indicate separate flight sequences; colored lines and shaded areas are average and 95% confidence intervals for four subsets of data in which the flies were approached from different 45°-wide azimuthal sectors [see upper left inset in (G)]. (G) Polar plots showing the flies’ initial velocity and heading, σpre, and escape velocity and heading, σescape. Vectors are scaled to the black vector in lower right (0.2 m s−1). The color of the vector encodes the initial azimuthal position of the stimulus in the fly’s field of view (see inset at upper left). (H) Escape heading versus initial stimulus direction. Data for fast (black), moderate (gray), and slow (white) expanding stimuli are combined. Solid line and gray area indicate average and 95% confidence intervals, respectively; histogram shows distribution of σescape.

The total stroke-averaged aerodynamic force created by a flying animal may be estimated from its instantaneous acceleration, body mass, and gravity. To change heading and escape, a fly must direct the horizontal component of this force, σF, away from the threat, and a surprising feature of these maneuvers was the rapidity with which flies performed this task (Fig. 2C). Flies adjusted σF to within 95% of its final value within 7 ms (~1.3 wingbeats); this resulted in a peak turn rate, , of 5300° s−1 (median, n = 92 trials, interquartile range = 3800 to 9000° s−1). Flies also increased the magnitude of the aerodynamic force (Fig. 2D), but this change occurred more slowly than the change in direction.

Previous models of fly flight have assumed that the aerodynamic flight force vector created by the flapping wings is positioned roughly normal to the mean stroke plane at an orientation that remains relatively constant with respect to the body axes (20–22). According to this so-called “helicopter model,” flies change direction by rotating their whole body so that the total force vector points in the intended direction of motion. To test this assumption, we tracked the angular orientation of the aerodynamic force vector and found that it changed very little relative to the body throughout the maneuvers (Fig. 2, E and F). Thus, the helicopter model is largely valid, even during the rapid turns when the body undergoes large rotations. This analysis confirms the intuitive impression given by the raw image sequences presented in Fig. 1E and indicates that flies must alter direction primarily by banking their bodies.

Given the constraints of a force vector fixed to body coordinates, flies could employ two basic strategies for changing course. First, as suggested in some previous studies (12, 23), flies might generate yaw torque to rotate their bodies around the vertical axis until they are aligned in the direction of intended motion. This yaw-based method is roughly equivalent to how airplanes make small course corrections in cruising flight using the tail rudder. Rather than using their legs or abdomen as a rudder, previous experiments suggest that flies generate yaw turns by differentially regulating the angle of attack of the wings during the upstroke and downstroke (12, 23). Alternatively, flies might simultaneously pitch and roll their bodies until the aerodynamic force vector tilts in the direction of desired motion, analogous to a banked turn of an aircraft.

To differentiate between these two possibilities, we determined body orientation throughout the evasive maneuvers (Fig. 3 and fig. S2). As suggested in the raw images plotted in Fig. 1E, the early phase of the maneuvers is dominated by a coordinated change in roll and pitch, with only a modest change in yaw (although yaw increases later in the maneuver). The amount of roll and pitch generated by the flies varied significantly (linear regression, P < 0.0001) with the azimuthal position of the stimulus in a systematic way (Fig. 3, G to I), indicating that a fly actively controls these parameters to direct its motion away from the stimulus. The correlation between yaw and stimulus angle was also significant (P = 0.0088), but the regression slope was much weaker than those for roll and pitch.

The roll and pitch rotation at maximum force production can be combined into a single rotational vector with a direction, μ, in the horizontal plane (Fig. 3J). As shown in Fig. 3K, the orientation of this rotation axis varies linearly with the azimuthal position of the stimulus. If the fly rotated so as to direct its mean force vector directly away from the stimulus (σF = 0°) (Fig. 2C), the rotation axis would be related to the stimulus angle by the equation μ= −(λ + 90°). The flies’ performance differs systematically from this prediction (Fig. 3K). Some authors have argued that bias or trial-by-trial stochasticity within escape headings might serve a functional role in evading the capture strategies of predators (24). In this case, however, we cannot exclude the alternative possibilities that flies are simply limited by biomechanical constraints or tolerate directional imprecision for the benefit of response speed.

Compared to a pure yaw maneuver, in which a fly could generate yaw torque in one direction and then coast to a stop via a combination of passive (11, 12) and active (25) damping, a banked turn requires that an animal rotate first in one direction and then rotate back. Because passive damping can only asymptotically reduce roll and pitch rates and not reverse them, a banked turn thus requires active production of countertorque. Evidence for both phases of the maneuver (rotation and counter-rotation) is evident in the time histories of acceleration about the roll and pitch axes that exhibit a biphasic shape (Fig. 3, D to F). These plots underscore the brevity of the escape maneuvers, in which the production of peak torque and peak counter-torque is separated by only 3 to 4 wingbeats (Fig. 3, D to F). The rapidity with which a fly must alter stroke kinematics to bank in one direction and then rotate back is illustrated by movie S8. Both phases of the maneuver might be driven by a single feedforward program triggered by the visual stimulus or, alternatively, the counterturn might be elicited by reafferent feedback triggered by the initial rotation (26–28).

Immediately after a fly completes the counter-rotation portion of the maneuver, its body is misaligned with its direction of motion. This sideslip is readily apparent in the final frames of the photomontages in Fig. 1E (see also movies S1 to S6). To correct for this misalignment, flies must rotate about the yaw axis in the same direction as the previous change in heading. Due to the spatial limitations of our image capture volume, most flies were still in the process of this correction at the end of our recorded sequences (Fig. 3C). It is possible that this late correction in yaw (performed while maintaining a constant heading) is also part of the same feedforward program that generated the banked turn. However, the slower time course suggests that this late component might be triggered by visual cues, such as an offset in the pole of expansion of optic flow (18).

To investigate the aerodynamic basis of the escape maneuvers, we examined detailed changes in wing motion throughout each sequence. Ignoring deformations of the wing blade, which were small in our images, the position of a wing in each time step may be defined by three orthogonal rotational vectors (Fig. 1D). Of the 3566 wingbeats recorded in the 92 trials, we classified 1603 as steady, based on thresholds for low linear and angular acceleration of the body (13). The wing kinematics during steady flight exhibited remarkably low variability both in terms of stroke frequency (188.7 ± 0.5 Hz, mean ± SD) and the time course of the three wing angles (Fig. 4, A to C). The wing motion during steady flight was also consistent with previous free-flight measurements of D. melanogaster (7, 23).

Averaged time series changes in wing kinematics during the maneuvers are plotted in figs. S3 to S6, where the sequences are parsed into four groups according to initial stimulus angle. The biphasic pattern of changes in wing kinematics is consistent with the production of torque and countertorque derived from body kinematics. To determine more quantitatively how flies modulate wing motion to control forces and moments during the escape maneuvers, we analyzed the 1963 wingbeats that did not fulfill the steady flight criteria (hereafter called unsteady wingbeats). The mean and interquartile ranges for the three wing angles for all unsteady wingbeats are compared to the steady wingbeats in Fig. 4, A to C. The differences between steady and unsteady wingbeats are remarkably small, indicating that the changes in wing motion required to generate the rapid escape maneuvers are subtle, which underscores the remarkable precision of the fly’s motor-control system despite the small number of motor neurons involved (2, 3).

To determine which parameters of wing motion flies use to regulate flight force, roll, and pitch, we used a Fourier series to parameterize the time history of all three wing angles for each wingbeat (eq. S1). We then independently correlated (in three separate analyses) the amount of kinematic distortion in each stroke to the average linear acceleration, roll acceleration, or pitch acceleration generated during that stroke based on body motion (eq. S2). Based on these correlations, we could then reconstruct a prediction for the pattern of wing motion that would generate any arbitrary value of linear acceleration, roll acceleration, or pitch acceleration (eq. S3) (13).

In Fig. 4, D to F, we plot the time history for the three wing angles for steady flight superimposed with the pattern of wing motion that corresponds to the generation of peak flight force, peak roll acceleration, and peak pitch acceleration, where the peak value was defined as approximately 3 standard deviations from the mean value over all wingbeats (F/mg =1.6, , , respectively). To estimate the aerodynamic forces and moments generated by these different patterns of wing motion, we played them through a dynamically scaled robot (25, 29). As a first test of the feasibility of our methods, we measured the forces and moments generated by the steady pattern of wing motion. The averaged aerodynamic force closely matched (102%) the average body weight of the flies (Fig. 4G). Next, we measured the forces and moments generated by the kinematic patterns corresponding to peak linear and angular accelerations. In all cases, the alterations in wing kinematics generate the expected qualitative change in the forces and moments, illustrating how flies regulate flight force, roll torque, and pitch torque through small coordinated changes in all three components of wing motion (Fig. 4, G to I; Fig. 5; and movies S9 to S11).

To provide a more quantitative test of whether the kinematic changes we measured were actually sufficient to produce the forces and moments generated by the flies, we used the results of our Fourier parameterization to construct a set of time series for the three wing angles that represented a graded sequence from the steady flight pattern to the patterns that generated peak accelerations. Because these kinematic patterns were originally derived from correlations with body accelerations (eqs. S1 and S2), the resulting stroke-averaged forces and moments for each pattern generated by the robot could be explicitly compared to the measured free-flight values derived from body kinematics. For our analysis of flight force, we also included wingbeat frequency as an independent control parameter. Because modulating frequency alone (which is the same for both wings) cannot alter roll or pitch acceleration, it was excluded from these analyses through normalization of angular accelerations with stroke frequency squared.

The stroke-averaged flight forces generated by the dynamically scaled robot matched those derived from body acceleration almost exactly throughout the entire range of kinematic distortion (Fig. 6A), providing a strong quantitative validation of our analysis method, despite several simplifying assumptions (such as the fact that the wing kinematics were replayed on a stationary robot). The pitch and roll moments generated by the robot could not be explicitly compared to corresponding free-flight values without knowledge of the moment of inertia around these two axes. As an alternative method for testing the reliability of our method, we used the ratio of measured normalized torque (from the robot) to measured normalized angular acceleration (from the flight sequences) to derive estimates of the normalized moments of inertia. The empirically derived radian-based estimates (Iroll f2/mgl = 1.43 and Ipitch f2/mgl = 2.06) are roughly twice the values expected from a simple rigid body model (29, 30), suggesting that the beating wings and associated added fluid mass contribute to rotational inertia.

Fig. 6Wingbeat average forces and torques responsible for linear and angular body accelerations, measured by replaying on the robotic fly a graded series of kinematic patterns that represent the measured distortion in wing motion from steady flight to peak values of linear and angular acceleration.

After verifying that the coordinated distortions of the three wing angles generated the expected changes in flight forces and torques, we then used our approach to characterize the influence of each wing kinematic parameter in isolation. In these experiments, we played a set of kinematic sequences through our dynamically scaled robot in which only one of the four kinematic parameters was varied, while the other variables were held constant at the steady flight pattern. This exercise allowed us to explicitly examine the relative importance of each kinematic parameter on flight control, as well as determine whether the parameters interact in a nonlinear manner. We found that all kinematic parameters contribute substantially to the modulation of flight force, roll, and pitch control. Increases in stroke amplitude and frequency exerted the strongest influence on total flight force, with stroke deviation playing a more minor role (Fig. 6A). Together, these three kinematic changes act to increase wing velocity as well as create a stronger plunging motion at the start of each stroke (Fig. 5A). Curiously, the modulation of wing rotation alone causes a decrease in force production rather than an increase. The modulation of stroke amplitude and wing rotation contribute nearly equally in the regulation of roll, with wing deviation having a minor effect (Fig. 6B). Stroke amplitude also played the largest role in regulation of pitch, followed by wing deviation and wing rotation (Fig. 6C). For all cases (force, roll, and pitch), summing the forces or moments created by modulating the independent kinematic parameters in isolation accurately predicted values generated when all parameters were modulated simultaneously, indicating a remarkable degree of linearity (Fig. 6, A to C).

Previous studies on free-flying flies suggested that yaw torque is generated by a regulation of wing rotation (12), effectively changing the relative aerodynamic angle of attack during the upstroke and downstroke. In our study of banked turns, we also found that wing rotation was an important control parameter, although its contribution was relatively minor. In addition, the primary changes we measured in wing rotation were associated with shifts in timing, possibly modulating rotational lift (5) rather than angle of attack during upstroke and downstroke (12). This discrepancy with previous studies might reflect an interesting difference in the control of pitch and roll compared with yaw. It is also noteworthy that stroke angle exerts a stronger influence over forces and moments than either wing rotation or stroke deviation. This finding is consistent with many previous studies in tethered flight which show that flies robustly modulate stroke amplitude in response to sensory signals that elicit changes in flight force (31), as well as roll, pitch, and yaw (28, 32).

Our results indicate that flies escape from looming objects by exhibiting a rapid banked turn. The motor basis of these rapid maneuvers are quite distinct from those previously described in that the change in direction is generated by a combination of pitch and roll, requiring active torque and countertorque generated by a fine-scaled, coordinated change in all aspects of wing motion. The changes in heading during these maneuvers are roughly 5 times as fast (5300° s−1) as those measured during voluntary saccadic turns (1000° s−1) (33, 34), suggesting that this strategy provides the animals with the fastest possible means for altering direction. Using the genetic and physiological approaches available in the closely related species D. melanogaster, it should be possible to elucidate the neural circuitry and muscle physiology that underlies these rapid behaviors.

Acknowledgments: This work was supported by grants from the Air Force Office of Scientific Research (FA9550-10-1-0368) to M.H.D., the Paul G. Allen Family Foundation to M.H.D., Army Research Laboratory (DAAD 19-03-D-0004) to M.H.D., Swedish Research Council to F.T.M., and the Royal Physiographical Society in Lund to F.T.M. We thank S. Safarik, X. Zabala, and J. Liu for their technical support, and B. van Oudheusden for co-supervising J.M.M. The data reported in this paper are tabulated in the supplementary materials: The body and wing kinematics data for all reported flight sequences, as well as forces and torques from the robotic fly experiments, are stored in Database S1, and the Fourier series coefficients required to reconstruct the here analyzed wingbeat kinematics (using eq. S1) are available in table S1.