Using high-speed videography, we investigated how fruit flies compensate for unilateral wing damage, in which loss of area on one wing compromises both weight support and roll torque equilibrium. Our results show that flies control for unilateral damage by rolling their body towards the damaged wing and by adjusting the kinematics of both the intact and damaged wings. To compensate for the reduction in vertical lift force due to damage, flies elevate wingbeat frequency. Because this rise in frequency increases the flapping velocity of both wings, it has the undesired consequence of further increasing roll torque. To compensate for this effect, flies increase the stroke amplitude and advance the timing of pronation and supination of the damaged wing, while making the opposite adjustments on the intact wing. The resulting increase in force on the damaged wing and decrease in force on the intact wing function to maintain zero net roll torque. However, the bilaterally asymmetrical pattern of wing motion generates a finite lateral force, which flies balance by maintaining a constant body roll angle. Based on these results and additional experiments using a dynamically scaled robotic fly, we propose a simple bioinspired control algorithm for asymmetric wing damage.
The wings of animals are susceptible to damage either by general wear  or specific events such as predator attacks . Damage alters the shape, size and structural integrity of wings and can have significant detrimental effects on flight performance . Such events are likely to lower overall fitness, although experimental tests have been inconclusive so far [4–8]. Vertebrates can exploit general mechanisms of tissue repair to mend certain types of wing damage. For example, birds have the capacity to replace damaged feathers by moulting , and bats can repair torn skin membrane . Because they acquire their wings during their terminal moult, insects cannot repair wings and must rely exclusively on behavioural mechanisms for damage compensation.
The most direct consequence of wing damage is the alteration of forces and moments due to the loss of aerodynamic surface. Many previous studies focused on cases in which the damage to the two wings is identical [3,6,11]. In these cases, it is relatively simple to compensate for the commensurate loss in lift by increasing wingbeat amplitude, flapping frequency or the angle-of-attack of both wings. The situation is more complicated when either a single wing is damaged or the damage to two wings is asymmetrical—cases that are probably more common under natural conditions. In addition to a loss in total upward force, asymmetric damage creates torques that, if not compensated for, would spin the animal out of control. To control for unilateral wing damage, animals must adjust body orientation and wing kinematics to maintain both weight support and roll balance , but how they achieved this equilibrium is not known.
In contrast with compensation for wing damage, the aerodynamics of steering manoeuvres has been studied extensively, particularly in fruit flies [13–18]. To test whether flies use these same strategies to compensate for wing damage, we performed three-dimensional high-speed videography  on animals with experimentally damaged wings, simulated forces and torques using a quasi-steady aerodynamic model , and made direct measurements on a dynamically scaled model of a flapping fly . Flies regulate roll torque to compensate for damage using similar changes in wing motion as they use during free flight manoeuvres, albeit with more extreme adjustments. The kinematics required to balance roll torque result in a lateral force that flies negate by maintaining a constant body roll angle toward the damaged wing. Vertical force control is qualitatively different from that exhibited by undamaged flies, because stroke amplitude is de-coupled from the control of stroke frequency. The control of vertical force and roll torque is thus modular, in that changes in stroke frequency produce the requisite upward force for weight support, whereas adjustments of the kinematic pattern of both wings maintain the balance of roll torque and lateral forces.
2. Material and methods
2.1. Free flight experiments
We studied the free flight dynamics of flies (Drosophila hydei) with unilateral wing damage in an enclosed arena (figure 1a) . At the start of each of the 26 experimental days, we anaesthetized approximately 20 flies at 4°C and used iris scissors (Fine Science Tools) to clip either the left or right wing, creating either spanwise or chordwise damage, respectively (figure 2e,h). We deliberately varied the amount of wing damage. After recovery, we placed the flies within the arena equipped with three orthogonally arranged high-speed cameras (Photron SA5) with infrared backlighting (figure 1a) . The camera system ran continuously in a buffer loop; when a single fly flew through the exact middle of the arena, an IR laser trigger system sent a signal to the cameras to save the image stream to a computer (electronic supplementary material, movies S1–S4). We calibrated the system using a standard direct linear transformation (DLT) method .
2.2. High-speed video data analysis
Each multiview video was analysed using a model-based automatic tracking algorithm , enabling us to capture body and wing movements at 7500 frames per second. For each wingbeat, the extracted kinematics consisted of the stroke-averaged flight speed, |U|, body acceleration, |a|, body orientation, the stroke frequency, f and the wing movement pattern of the damaged and intact wing. As defined formally elsewhere , body orientation and wingbeat pattern are described as Euler angles in the stroke plane references frame, which lies at an angle of 47.5° with respect to the long axis of the body (figure 1b). Body orientation consists of the side-slip angle, ψ, (angle between yaw angle and flight direction), body pitch angle, θ and body roll angle, φ. Wing movement pattern consisted of the time history of the three Euler angles, stroke angle, ϕ, deviation angle, γ and rotation angle, α (figure 1b). Using an expectation maximization clustering algorithm on body acceleration (|a|), we classified wingbeats as either steady or manoeuvring . Only steady wingbeats during which |a| < 2 m s−2 were used for further analysis. This excluded sequences in which the animals were performing any obvious manoeuvres.
To quantify wing damage, we selected a top-view video frame in each sequence for which the wings were positioned as horizontally as possible (figure 2e,h), and manually traced their outlines using a custom Matlab program (MathWorks Inc., Natick, MA, USA). As shown previously, aerodynamic forces on a flapping wing scale with the second moment of area of the wing (S2) and torque scales with the third moment (S3) . Therefore, from the outlines we calculated wing area, the second moment of area (S2), the third moment of area (S3) and their respective radii defined as and (figures 1e and 2a). Note that we use these terms instead of the non-dimensional radii ( and ) defined by Ellington , because normalized radii do not incorporate the effect of surface area loss as a result of wing damage.
2.3. Dynamically scaled model
The dynamically scaled physical model has been described previously in more detail . The robot consists of a pair of wings actuated at the root about the same three Euler angles used to describe the wing motion of real flies (figure 1c). For dynamic scaling, the model with a total wing span of 50 cm was submerged in a 1.0 × 2.4 × 1.2 m tank of mineral oil (Chevron Superla white oil; density 880 kg m−3, kinematic viscosity 115 cSt at 25°C). The frame holding the two flapping wings was connected to a six degrees-of-freedom force balance, enabling us to measure fluid dynamical forces and torques about all body axes .
To study the effect of damage, we systematically replaced the right wing of the robotic model with different planforms (figure 1e). Wing damage ranged from 0% to 50% surface area reduction in 10% steps, for both the chordwise and spanwise cases. We expected a priori that altering stroke amplitude would be an important means by which flies adjust forces and moments in response to wing damage . For this reason, we created a set of nine wing stroke patterns in which the normal kinematics of intact flies (figure 1d)  were systematically distorted such that the stroke amplitude ranged from a 25% reduction to a 25% increase in 6.25% increments (figure 1d). We played the set of nine experimental stroke patterns on the damaged (right) wing of the robot, while using the normal pattern for the intact (left) wing (figure 1d). For all 99 flight conditions (11 configurations with nine stroke angle patterns), we played the kinematics for 10 consecutive wing strokes and measured aerodynamic force and torque dynamics. To prevent start-up effects, we excluded results from the first wingbeat from the analysis.
2.4. Statistical analysis of damage-controlling wingbeat kinematics
To quantify how actual flies adjust body and wingbeat kinematics to compensate for wing damage, we used a statistical analysis similar to a previous approach for studying flight manoeuvres [16,17]. The effect of wing damage on morphology was quantified as the ratio of the moments of area of the damaged and intact wings: 2.1where S2,damaged and S3,damaged are the second and third moments of area of the damaged wing; S2,intact and S3,intact are the comparable values for the intact wing. To perform our statistical analysis, we must convert this set of parameters into a single metric. As explained below, our robotic fly experiments provide us with a useful candidate, A+, defined as the ratio of the stroke amplitude of the damaged and intact wings that a fly would need to produce to compensate for wing damage given S2* and S3*: 2.2where Adamaged and Aintact are the wingbeat amplitude of the damaged and intact wing, respectively. Here, hA+ is a function that describes the relationship between A+ and the combination of S2* and S3*. We provide a full derivation of hA+ in the section on the robotic fly.
For each fly, we determined A+ from S2* and S3* using equation (2.2). The three wingbeat angles (ϕ, γ, α) of the damaged and intact wings were then correlated with A+ using a linear model . Changes in the wingbeat angles with respect to those of flies with intact wings were linearly correlated by 2.3where mod(κdamaged)i and mod(κintact)i are the modification metrics for the damaged and intact wing, respectively, of the kinematics angle κ (representing ϕ, γ or α), for each wingbeat i. κnormal represents the normal kinematics of steady flying flies with intact wings (figure 1d). These were determined in a previous study based on 1603 steady wingbeats of 83 undamaged flies . The corresponding wing damage metric, A+normal,for these undamaged flies is equal to one.
We repeated this analysis for all wingbeats of all measured flight sequences, and fitted 8th-order Fourier series through each resulting distribution of mod(κ). This resulted in a set of six Fourier series: MOD(ϕdamaged), MOD(γdamaged), MOD(αdamaged), MOD(ϕintact), MOD(γintact) and MOD(αintact). We could then use this set to reconstruct the kinematics that a generic fly with an arbitrary set of S2* and S3* would produce to compensate for wing damage: 2.4Although wingbeat frequency and body roll varies strongly among flies, in response to even the smallest amount of wing damage, flies increase wingbeat frequency and roll their body approximately 10o towards the side of the damaged wing (figure 2c,d). To best incorporate these nonlinear responses into our model, we correlated sequence-averaged wingbeat frequency and roll angle with A+ by fitting a cubic smoothing spline (smoothing parameter = 0.999). For the wingbeat frequency case, we added all undamaged wing flies to the dataset (fnormal = 188 ± 10 Hz, mean ± s.d., n = 83), while for the roll case we enforced the smoothing spline to return zero body roll for an intact fly. In contrast with body roll and frequency, damaged flies did not systematically alter body pitch or side-slip angle (figure 2k,m), and so we did not add these parameters to our wing damage response model.
From here on, we will use the term WDR kinematics (for wing damage response) to indicate kinematics of a damaged fly, consisting of body roll, φWDR(A+), wingbeat frequency, fWDR(A+) and the wingbeat kinematics angles of the damaged and intact wing (κdamaged and κintact, respectively). We will refer to the flight kinematics of an intact fly as normal kinematics (φnormal = 0°, fnormal = 188 Hz, κnormal as in figure 1d).
2.5. Quasi-steady aerodynamic model of flight with damaged wings
We used a quasi-steady blade-element aerodynamic model to study the effect of unilateral wing damage on the aerodynamics of flapping flight . We constructed a set of hypothetical flies with a left wing that was intact and a right wing subjected to either chordwise or spanwise damage (figure 3b). The intact wing consisted of 20 blade elements equally spaced along the span with the natural cord length distribution. For spanwise damage, the chord lengths of the blade element were limited to 100%, 95%, 90%, 85% and 80% of the maximum cord length of the undamaged wing. For chordwise damage, we constructed a set of five hypothetical wings, and for each consecutive wing an incremental amount of the most distal blade elements was removed, resulting in span reduction ranging from 0% to 20% in 5% increments. For both cases (chordwise and spanwise damage), this resulted in a set of five models, with the condition of the right wing ranging from no damage S2* = S3* = 1 to S2* ≈ S3* ≈ 0.5.
For each case, we reconstructed the corresponding WDR kinematics from its (S2*, S3*) combination using equation (2.4) and the smoothing splines (φWDR(A+) and fWDR(A+)). We then used the resulting combination of wing morphology and kinematics to estimate the forces and torques produced by the damaged and intact wing using the quasi-steady aerodynamic model . The computational model estimates both translational and rotational forces at 200 equally spaced time steps throughout a single wingbeat . Translational lift and drag forces on each wing element were calculated based on their angle-of-attack and translational velocity . The rotational lift force on each element depends on both the translational velocity and the spanwise rotation rate. Here, we assumed that the rotational force was oriented normal to the surface of the blade element, and that the rotational axis was positioned 25% cord length behind the leading edge, resulting in a rotational lift coefficient of 1.55 . Thus, we ignored any variations in cordwise positioning of the rotation axis that might have resulted from damaging the wing. Numerical integration of the rotational and translational forces across all blade elements of each wing allowed us to determine the three-dimensional forces and torques produced by that wing in the fly-based reference frame (figure 1b). Forces and torques in the world reference frame were determined by multiplying each force and torque vector with the rotation matrix for body roll: 2.5Using this computational model, we examined the effects of both wing damage and kinematic modification on force and torque production using three complementary tests. First, we simulated force and torque production for each damaged wing case using both the WDR kinematics and the normal kinematics. This enabled us to compare the effect of wing damage and kinematics modulations. Second, we systematically replaced various parameters from the normal kinematics with the corresponding parameters from the WDR kinematics. Because replacement order could influence the results, we used two different replacement sequences: (i) stroke angle, deviation angle, wing rotation angle, body roll angle, wingbeat frequency, and (ii) the exact opposite order. By calculating force and torque production for each incremental replacement, we were able to test to what extend the different kinematic parameters are responsible for damage compensation. In our third test, we investigated the relative importance of translational and rotational aerodynamic mechanisms in damage compensation by separately calculating these components in the quasi-steady model using both the WDR kinematics and normal kinematics.
2.6. Modelling wing damage control using the robotic fruit fly analysis
Based on the robotic fly experiments, we developed an analytical model that describes how a fly should adjust the stroke amplitude of its damaged and intact wings, without changing any other wing or body kinematics parameter. To control for damage, a fly needs to adjust its wing motion to balance forces and torques about all three body axes (figure 1b). Because unilateral wing damage primarily affects vertical force production and roll torque, we focus on maintaining just these two equilibria: 2.6where Fz*damaged and Fz*intact are the vertical force normalized by fly weight (F* = F/mg) of the damaged and intact wing, respectively; Tx*damaged and Tx*intact are the equivalent roll torques normalized by weight and the span of an intact wing (T* = T/mgl). Because forces and torques vary with stroke amplitude, a fly should be able to maintain these equilibria by adjusting the stroke amplitudes of both the damaged and intact wings.
As discussed above, unilateral wing damage affects forces and torques according to S2* and S3*, respectively. Therefore, we may express the terms in equation (2.6) as functions hFz and hTx, respectively: 2.7where A* is the stroke amplitude normalized to that of an intact fly (A* = A/Anormal). Substituting equation (2.7) into equation (2.6) yields the expressions for the stroke amplitudes required to compensate for wing damage: 2.8where and are functions of S2* and S3* that describe the relationship between wing damage and the required stroke amplitude of the intact and damaged wing, respectively. The ratio of A*damaged and A*intact is equal to A+ (equation (2.2)); this parameter was used as the normalized wing damage metric for our statistical analysis of free flight kinematics.
Our analysis assumes that flies with damaged wings operate at a frequency similar to that of an intact fly (fnormal); however, the free flight experiments showed that damaged flies flap at a higher frequency (figure 2c). Therefore, we repeated the analytical model analysis (equations (2.6)–(2.8)) for a robotic fly with a flapping frequency equal to the average of all our flies with damaged wings (fdamaged, figure 2c). Because all the robotic fly experiments were performed at fnormal, forces and torques at fdamaged were estimated using the linear relationship between wingbeat frequency and force determined in a previous study on escape manoeuvres .
3.1. Damage compensation by flying flies
We tracked a total of 44 flies with wing damage, but only 38 flight tracks with a total of 1252 wingbeats satisfied our criterion for steady flight (|a| < 2 m s−2); see electronic supplementary material, dataset S1. For the flies with spanwise ablations, the values for the normalized second and third moments of wing area were S2* = 0.80 ± 0.11 and S3* = 0.74 ± 0.13 (mean ± s.d., n = 15); for chordwise ablations the values were S2* = 0.70 ± 0.07 and S3* = 0.74 ± 0.08 (n = 23) (figure 2a,b). In response to wing damage, fruit flies significantly decrease flight speed with respect to non-damaged flies, while they increase both wingbeat frequency and body pitch (flight speed: Udamaged = 0.11 ± 0.08 m s−1 (n = 38), Unormal = 0.15 ± 0.05 m s−1 (n = 83), Kruskal–Wallis test, p < 0.001, d.f. = 1, χ2 = 18.5; frequency: fdamaged = 211 ± 16 Hz (n = 38), fnormal = 188.1 ± 10 Hz (n = 83), Kruskal–Wallis test, p < 0.001, d.f. = 1, χ2 = 43.3; body pitch: θdamaged = 49.5° (48.6°–50.5°) (mean (95% confidence interval)), n = 38, θnormal = 47.6° (46.7°–48.5°), n = 83, circular non-parametric multi-sample test for equal medians, p = 0.002, figure 2k). According to circular one-sampled tests for mean angles, the body roll angle for damaged flies differs significantly from zero (φdamaged = 9.6° (7.5°–11.8°), n = 38, figure 2l), but the side-slip angle does not (φdamaged = 2.5° (−5.4°–10.5°), n = 38, figure 2m). Side-slip, the angle between the longitudinal body axis and the velocity vector, was non-zero in most of our sequences, indicating that the flies' longitudinal body axis was typically not aligned with the direction of motion. However, we found no trend suggesting that the flies led with either their damaged or undamaged wing. Whatever factors influenced the propensity for side-slip, they did not appear to be influenced by our ablations. We suspect that the side-slip we measured was due to the fact that most of our sequences came from flies that had recently completed body saccades—a consequence of recording sequences in a small chamber. Because side-slip was not correlated with wing damage, we did not incorporate it into our response model. We also did not include the effect of body pitch, because although it differs between damaged and intact flies, the effect on force production is quite small (the mean difference in pitch angle of less than 2° reduces vertical forces production by less than 0.1%). Note that because flight speed in D. hydei is controlled by body pitch , the higher body pitch angle in damaged flies might be because the damaged flies flew at a slightly lower speed.
To derive a statistical model of damage compensation based on free flight kinematics, we calculated Fourier series for modulations of the three wing angles using the method described in equation (2.3), and calculated splines for frequency, fWDR(A+) and roll, φWDR(A+) (figure 2c,d; electronic supplementary material, dataset S3). To verify that the statistical model did indeed capture the kinematics of real flies, we compared the predictions with the results of individual sequences for both spanwise (figure 2e–g) and chordwise damage (figure 2h–j). In addition to elevating wingbeat frequency and roll angle, flies alter the time course of all three wing angles when compensating for damage. The close match between the raw data and model suggests that flies respond to wing damage in a stereotyped manner and justifies our use of the statistical model to examine compensation across a continuous range of damage.
The quasi-steady predictions of wingbeat-averaged forces and torques are plotted in figure 3a,b, respectively. If flies flapped their wings as in normal hovering flight, increasing wing damage would cause a linear drop in the vertical force with increasing S2* and a linear rise in roll torque with increasing S3*. However, the WDR kinematics derived from our statistical model are sufficient to maintain weight support and reduce roll torque across the range of damage we investigated. The quasi-steady model predicts that wing damage will not notably affect mean forward force, lateral force and pitch torque generated by either the normal or WDR kinematics. By contrast, the model predicts that yaw torque will rise significantly with increasing damage when the wings flap with the WDR kinematics. Thus, comparing results based on the normal wing kinematics with those constructed using equations (2.4) and (2.5) shows that the statistical model captures compensation for weight support and roll torque, but introduces a significant yaw torque when assessed using our quasi-steady aerodynamic model (figure 3a,b; electronic supplementary material, table S1).
By systematically morphing from normal to WDR kinematics, we investigated the influence of different parameters on the compensation for force and torque equilibria (figure 4; electronic supplementary material, figure S1 and table S1). Increasing flapping frequency fully compensates for weight support, whereas the modulation of all other kinematics parameters have almost no effect (figure 4b; electronic supplementary material, table S1). However, because the two wings must flap synchronously, this frequency increase has a detrimental effect on roll equilibrium (figure 4c; electronic supplementary material, table S1). The fly reduces this undesired effect on roll torque by adjusting the time history of the three wing angles. Changes in wing stroke angle plays the largest role in reducing roll torque, followed by the contributions from changes in deviation and wing rotation angle (figure 4c; electronic supplementary material, table S1). However, the wingbeat pattern adjustments required for roll torque compensation have a secondary effect of increasing the sideways aerodynamic force (figure 4a; electronic supplementary material, table S1). Changes in deviation angle—whereby the damaged wing is elevated relative to the intact wing (figure 4a)—have the largest detrimental effect on sideways force production, followed by changes in wing rotation angle. To balance out these sideways forces, damaged flies roll their body towards the damaged wing. This body roll has a negligible effect on weight support and does not affect torques or forward force (electronic supplementary material, figure S1 and table S1).
Figure 5 shows the kinematics of the damaged and intact wing and the resulting aerodynamic forces and roll torque throughout the wingbeat in the fly reference frame for our simulated animal with the largest wing damage (50% area reduction), comparable with that of the most damaged fly in our dataset (figure 2h; electronic supplementary material, movies S3–S4). Although the fly maintains a stroke-averaged equilibrium of both force and torque, the time histories of lift and roll torque vary greatly between the intact and damaged wing. For example, the intact wing generates negative lift and roll torque at the start of each stroke (figure 5c,e,f). Thus, flies do not maintain a moment equilibrium through a perfect time-locked balance of force on the intact and damaged wings, but rather by matching the average over the stroke.
To gain further insight into the underlying aerodynamic mechanisms of wing damage control, we calculated the translational and rotational forces produced by the WDR kinematics using a quasi-steady aerodynamic model (figure 6). The simulations show that the fly augments force production on the damaged wing by increasing both translational forces and rotational forces (figure 6c). The fly enhances translational forces on the damaged wing by increasing stroke amplitude and wingbeat frequency—thus greatly increasing wing tip velocity—and by adjusting the wing deviation angle to generate a stronger vertical plunge at the start of the upstroke (figure 6a). It also generates higher rotational forces by advancing wing rotation with respect to stroke reversal (figure 6a,c). For the intact wing, changes in translational forces and rotational forces are roughly equal in magnitude but opposite in sign (figure 6d). The increase in wingbeat frequency elevates the translational forces on the intact wing, despite a reduction of both the stroke amplitude and the downward plunge (figure 6b,d). This increase in upward force is fully negated, however, by producing downward rotational forces on the intact wing, caused by a substantial delay in wing rotation with respect to stroke reversal (figure 6b,d). As a result, the average vertical force generated by the intact wing is slightly lower than that produced by a wing on an intact fly, despite the elevated stroke frequency. By contrast, the force on the damaged wing is increased compared with the normal case. Because the moment arm of the damaged wing is reduced with respect to that of an intact wing, this force imbalance has the beneficial effect of trimming out roll torque (figures 5 and 6).
Note that the fly modulates rotational forces by adjusting the relative timing of pronation and supination with respect to stroke reversal. This effect is not due solely to a change in the time history of the wing rotation angle (α), but also involves changes in the stroke (ϕ) and deviation (θ) angles (figure 5a–d). Contrary to a recent model in which the axial rotation of the wing results from passive effects , these data suggest that flies can actively modulate wing rotation relative to stroke reversal [24,26].
3.2. Wing damage control model based on measurements from a dynamically scaled robot
The experiments with the robotic fly show that, as expected, damaging a single wing decreases vertical force production (Fz) and increases roll torque (Tx) (figure 7a,b). The reduction in vertical force and the production of roll torque correlate linearly with S2* and S3*, respectively, whereas the influence of the type of wing damage (spanwise versus chordwise) is remarkably subtle. Changes in wingstroke amplitude also influence vertical force and roll torque (figure 7c,d); indeed, the effect of wingstroke amplitude is very similar to the effect of wing damage (cf. figure 7a–d, respectively). These results confirm the validity of our approach of focusing on stroke amplitude as the primary means of compensating for wing damage (equation (2.7)).
To determine exactly how a fly needs to adjust the stroke amplitude of the intact and damaged wing for a given amount of wing damage, we systematically varied A* within a range of different S2* and S3* values (electronic supplementary material, dataset S2). Figure 7e,f shows how vertical force and roll torque change for different combinations of A*, S2* and S3*. Based on these results, we modelled lift and roll torque as: 3.1where a and b are linear coefficients for force and torque, respectively (electronic supplementary material, dataset S3). After estimating these free parameters via a least-squares fit, we used the equations to interpolate values between the actual measured data within the parameter space (figure 7e,f). For a fly with intact wings (S2* = S3* = 1), equation (3.1) reduces to: 3.2Substituting equations (3.1) and (3.2) into equation (2.6) leads to two equations with two dependent variables (A*intact and A*damaged) and two independent variables (S2* and S3*). Solving this set of equations allows us to determine how a fly could adjust the stroke amplitudes to compensate for wing damage, thus providing explicit expression for and in equation (2.8) (figure 8a,c). Although we calculated A* within a large parameter space, (0 < S2* < 1, 0 < S3* < 1), the shape of the wing and the nature of wing damage restricts the region of physically possible values to a narrow region around the diagonal where S2* ∼ S3*, as illustrated by the distribution of the data points from our actual wing ablations.
Repeating this analysis using fdamaged instead of fnormal (electronic supplementary material, figures S2–S3), allows us to examine the effect of the increase in frequency on the damage control response (figure 8a,c versus b,d) (see electronic supplementary material, dataset S3 for the expressions of hA+, hAintact and hAdamaged in equation (2.2) and equation (2.8), at both fdamaged and fnormal). The results indicate that if a fly did not increase frequency in response to wing damage, the wingstroke amplitude of the damaged wing would need to be larger than 180° for S2*+S3* < 1 (figure 8a), which is morphologically impossible . However, by increasing frequency (figure 2c), flies reduce the required increase in A* necessary for damage compensation (figure 8b). As a result, at fdamaged the stroke amplitude remains below the critical value 180° for S2*+S3* < 0.7. Thus, for the parametric space depicted in figure 8 (0 < S2* < 1, 0 < S3* < 1), flying at fdamaged instead of fnormal leads to a 50% increase of the viable operational area in the (S2*, S3*) parametric space. This explains the functional importance of the jump in stroke frequency in response to wing damage that we observed.
Using a combined experimental and modelling approach, we analysed how fruit flies control forces and torques in response to unilateral wing damage. The free flight experiments showed that flies are capable of compensating for large damage to one wing, which they achieve by rolling their body towards the damaged wing and adjusting wing motion (figure 2; electronic supplementary material, movies S1–S4, see Muijres et al.  for a video of an undamaged fly for comparison). Flies maintain weight support by increasing wingbeat frequency, whereas changes in the time history of the wing kinematics angles have a remarkably small effect on the production of vertical force (figure 4b). However, because wingbeat frequency must be the same for both wings, this increase in frequency worsens the imbalance of roll torque (figure 4c). To balance roll torque, flies adjust the wingbeat pattern of both the intact and damaged wings (figure 5), altering both translation- and rotation-based aerodynamic mechanisms (figure 6). Increasing the stroke angle amplitude of the damaged wing relative to the intact wing results in a higher relative wing velocity for the damaged wing, thereby lowering roll torque (figure 5a). Also, the damaged wing undergoes a stronger plunging movement at the start of the upstroke, which creates more upward-directed drag relative to the intact wing, causing a further reduction in roll torque (figure 6a,b). In addition to these two translation-based mechanisms, the fly also reduces the roll moment by advancing wing rotation relative to stroke reversal for the damaged wing and delaying it for the intact wing (figure 6c,d). The asymmetric adjustments in wingbeat pattern required for roll torque control has the undesired effect of producing a detrimental sideways force, but the flies compensate for this by maintaining a constant body roll towards the damaged wing, effectively rotating the wingbeat-average aerodynamic force vector from a banked orientation back towards the vertical.
When we apply a quasi-steady model to the wing kinematics derived from our free flight data, we predict significant yaw torque (figure 3b). We expect that this might be an artefact caused by using hovering conditions in our model. On average, our flies flew at a flight speed of 0.1 m s−1 at a body roll angle of 10°. Such a configuration might produce a compensatory yaw torque resulting from the drag force produced by the sideways protruding abdomen and hind legs (electronic supplementary material, movie S4). Experiments with the robotic fly might allow us to test this notion , but these were outside the scope of our current study.
Comparing the control of vertical force and roll torque during damage compensation with the control of the same parameters during active manoeuvres identifies informative principles. For both cases, roll torque is modulated by changing the time history of all kinematics angles of both wings, resulting in similar patterns of wingbeat distortion (figure 5) . During both damage compensation and evasive manoeuvres, the modifications in stroke angle have the largest effect on roll torque, followed by wing deviation and rotation angle (electronic supplementary material, table S1) . Although qualitatively similar, the changes in the wingbeat pattern exhibited by damaged flies to balance roll torque are significantly larger than those they require for rapid evasive manoeuvres . The situation is somewhat different for weight support. Intact flies increase both stroke amplitude and frequency to modulate force during active manoeuvres , whereas damaged flies increase frequency to adjust vertical force but generate the asymmetrical changes in stroke amplitude to reduce the bilateral force imbalance while maintaining weight support (figure 4).
The motor system responsible for adjusting wingbeat motion consists of the small set of direct flight muscles that insert at the base of the wing . Through a complex process that is not yet fully understood, these muscles adjust the configuration of the hinge to alter the motion of the wing [29,30]. Flies possess several sensory systems that might be used to regulate this motor system including the halteres, the ocelli and the vertical system (VS) cells in the lobula plate. The halteres, however, are poorly suited to detect the low angular velocity required to trim roll torque , and it is more likely that the feedback loop that compensates for roll torque caused by wing damage relies on vision . Furthermore, to achieve adequate steady-state performance with zero error, the circuit that controls roll probably implements a form of proportional-integral (PI) feedback [32,33]. The fact that the changes in wing kinematics required for damage compensation are much larger than those of the most extreme free flight manoeuvres on intact flies [16,17] is also suggestive of PI control. Indeed, the extreme adjustments in wing motion we measured for damage compensation are more comparable with the large changes observed in tethered flies that are exposed to open-loop rotatory visual stimuli . This suggests that the classic open-loop optomotor response is better interpreted as an adaptation to wing damage rather than a manifestation of steering responses .
The control system for maintaining weight support in damaged flies also requires sensory measures of vertical displacement. Again, the VS cells within the lobula plate are the most likely source of this feedback . Acting individually, these cells are thought to operate as matched filters to detect rotation in the azimuthal plane . However, their summed output provides a means of measuring changes in vertical self-motion. The motor system must have the ability of increasing the stroke frequency, while allowing for independent control of stroke amplitude on the two wings. Some of the increase in frequency following wing damage might arise passively, as the loss in wing mass will increase the resonance of the oscillatory neuro-mechanical system . Just such a mechanism appears to operate in hawk moths with up to a certain amount of asymmetrical wing damage (S2* < 0.12), above which active control is required . It is likely that flies also use active mechanisms to regulate stroke frequency more precisely, which might be achieved by adjusting the firing rate of indirect flight muscle motor neurons , or via changes to the pleurosternal or tergopleural control muscles [38,39].
The simple analytical model we developed provides further insight into why flies with damaged wings increase wingbeat frequency to maintain weight support. The model results show that the frequency increase allows insects to broaden the parametric space within which they can compensate for wing damage (figure 8). Comparing the output from the analytical model with our experimental animals shows that the flies with the most damage would have to operate at stroke amplitudes very close to their morphological limit of 180° if they did not increase wingbeat frequency (figure 8a). Flies that increase frequency, on the other hand, attain a significant safety margin in stroke amplitude (figure 8b), which may allow them to perform critical manoeuvres such as take-off , saccadic turns , and predator evasion . Additionally, the analytical model requires regulation of only three kinematics parameters (stroke amplitude of the damaged and intact wings and a stepwise increase in wingbeat frequency). Such a system might be used to develop a simple bioinspired wing damage control algorithm for flapping robots. Real flies, however, adopt a more modular strategy for damage compensation in which they increase stroke frequency to maintain upward force, adjust the pattern of wing motion for balancing roll torque and regulate body roll to cancel lateral forces.
M.H.D. and F.T.M. designed the experiment and wrote the paper; N.A.I. performed the fruit fly experiments; M.J.E. performed the robotic fly experiments; J.M.M. developed the quasi-steady aerodynamic model. F.T.M. performed the data analysis.
We declare we have no competing interests.
This work was supported by grants (to F.T.M.) from the Netherlands Organization for Scientific Research, NWO-VENI-863-14-007 (to M.H.D.), the Air Force Office of Scientific Research (FA9550-10-1-0368) and the Paul G. Allen Family Foundation.
One contribution of 19 to a theme issue ‘Coevolving advances in animal flight and aerial robotics’.
Electronic supplementary material is available online at https://dx.doi.org/10.6084/m9.figshare.c.3575747.
- © 2016 The Author(s)
Published by the Royal Society. All rights reserved.