## SUMMARY

Recent studies suggest that fruit flies use subtle changes to their wing motion to actively generate forces during aerial maneuvers. In addition, it has been estimated that the passive rotational damping caused by the flapping wings of an insect is around two orders of magnitude greater than that for the body alone. At present, however, the relationships between the active regulation of wing kinematics, passive damping produced by the flapping wings and the overall trajectory of the animal are still poorly understood. In this study, we use a dynamically scaled robotic model equipped with a torque feedback mechanism to study the dynamics of yaw turns in the fruit fly *Drosophila melanogaster*. Four plausible mechanisms for the active generation of yaw torque are examined. The mechanisms deform the wing kinematics of hovering in order to introduce asymmetry that results in the active production of yaw torque by the flapping wings. The results demonstrate that the stroke-averaged yaw torque is well approximated by a model that is linear with respect to both the yaw velocity and the magnitude of the kinematic deformations. Dynamic measurements, in which the yaw torque produced by the flapping wings was used in real-time to determine the rotation of the robot, suggest that a first-order linear model with stroke-average coefficients accurately captures the yaw dynamics of the system. Finally, an analysis of the stroke-average dynamics suggests that both damping and inertia will be important factors during rapid body saccades of a fruit fly.

## INTRODUCTION

Flying insects use a variety of mechanisms (Sane, 2003) in order to control forces and moments during flight, many of which are likely to involve subtle changes in wing kinematics. While our understanding of the basic mechanisms behind aerodynamic force production has increased considerably in recent years (Weis-Fogh, 1973; Ellington et al., 1996; Dickinson and Götz, 1996; Dickinson et al., 1999; Sane and Dickinson, 2001), there still exists a substantial gap in our understanding of how changes in wing kinematics translate into changes in forces and moments. In addition, understanding the relationship between wing kinematics and the production of forces and moments is only a first step, as ideally we would like to know how animals actively regulate wing motion in order to control their overall trajectory through space. This problem is complicated by the fact that the forces and moments produced by flapping wings in turn depend upon the motion of the animal, i.e. upon its rotational and translational velocities. Thus, in order to tackle this problem, we require a detailed understanding of how forces and moments depend upon changes in both wing kinematics and body motion.

Dynamically scaled robotic models have been a useful tool in the investigation of flapping flight aerodynamics (Usherwood and Ellington, 2002a; Usherwood and Ellington, 2002b; Dickinson et al., 1999; Sane and Dickinson, 2001). They have allowed researchers to examine many of the aerodynamic mechanisms involved in force production such as the leading edge vortex, wake-capture and clap-and-fling (Maxworthy, 1979; Ellington et al., 1996; Birch and Dickinson, 2003). In addition, robotic models have enabled researchers to systematically examine the effects of kinematic variables such as the timing of wing rotation, stroke amplitude or wing–wing interactions (Sane and Dickinson, 2001; Sane and Dickinson, 2002; Lehmann et al., 2005). In all these prior examples, the robot is used as a simple feed-forward device, in which kinematics are prescribed and the resulting forces and flows are measured. Another class of robotic systems, called ‘captive trajectory systems’, is used by aerodynamics researchers to investigate the free-flight dynamics of vehicles and to determine the trajectory of objects separated from a vehicle during flight (Woods et al., 2001; Ahmadi et al., 2005; Guigue et al., 2006; Guigue et al., 2007). A captive trajectory system consists of a robotic mechanism for moving the model, sensors for measuring aerodynamic forces and moments acting on the model, and a feedback mechanism for moving the model *via* the robotic mechanism. The motion of the model is determined in real-time, based on its mass and moments of inertia, using the measured forces and moments.

The wing and body kinematics of free-flying fruit flies performing rapid stereotyped turns called body saccades – during which flies change orientation by 90 deg in less than 50 ms – have been measured using high-speed videography (Fry et al., 2003; Fry et al., 2005). These prior studies suggest that changes in yaw torque were produced mainly by subtle changes in wing stroke amplitude and adjustments of the stroke plane. Recently, automated methods of extracting wing and body kinematics from multi-camera high-speed video sequences have been developed (Fontaine et al., 2009; Ristroph et al., 2009), which should enable researchers to process much larger data sets and provide further insight into exactly how fruit flies modulate their wing kinematics to control forces and moments. Such methods have recently been used to study how flies modulate the pitch of their wings in order to induce sharp turns (Bergou et al., 2009). However, at present, the complete repertoire of kinematic changes used to control forces and moments during body saccades or other maneuvers is not known.

Early studies of yaw turns in *Drosophila* (Reichardt and Poggio, 1976) suggested that dynamics of the turns were dominated by friction. However, a subsequent study of free-flight saccadic turns in *Drosophila* (Fry et al., 2003) came to a different conclusion, suggesting that inertia played a dominant role during rapid flight maneuvers. This conclusion was based on an analysis using a yaw damping coefficient estimated by integration of Stoke's law for the fly body only. Also, the additional damping caused by the flapping wings themselves was ignored due to the fact that the aerodynamic forces were measured using wing motion in body-centered coordinates. Recently, studies using computational fluid dynamics to examine the time course of torque production during free-flight saccades (Ramamurti and Sandberg, 2007) have raised questions in regard to this conclusion. An estimate of the yaw damping due to the flapping wings, based on a quasi-steady analysis (Hesselberg and Lehmann, 2007), suggested that the damping due to the flapping wings was approximately two orders of magnitude larger than that for the body, implying that yaw turn dynamics are dominated by damping rather than inertia. A later, but similar, quasi-steady estimate (Hedrick et al., 2009) also suggested that the yaw damping due to the flapping wings is significantly larger than that for the body. In both these quasi-steady estimates, it was shown that the yaw damping due to the flapping wings should be proportional to the yaw velocity, rather than being proportional to the square of the yaw velocity as might be expected by a simpler model. The rotational damping due to the flapping wings was recently investigated experimentally (Cheng et al., 2009) using a dynamically scaled robotic wing. The authors found a substantial difference in the yaw torque produced by the flapping wing in the presence and absence of body rotation. In addition, these authors used a quasi-steady model to estimate the damping coefficients about the roll, pitch and yaw axes as well as cross coupling between the axes. The results suggested that the damping torque is most prominent about the turning axis upon which the angular velocity is specified and that the damping coefficients for the roll and yaw axes are roughly twice as large as that for the pitch axis.

In the present study, we examine the dynamics of yaw turns during hovering conditions using a dynamically scaled robotic model that utilizes active feedback linking torque production to body motion. We consider four biologically plausible mechanisms for actively generating yaw torque that take the form of deformation modes that introduce kinematic asymmetry into a set of baseline wing kinematics. The magnitude of the kinematic asymmetry for each mode is controllable *via* a single deformation parameter. The yaw torque, for each mode, is measured as a function of yaw velocity and the magnitude of the deformation parameter. In addition, the robotic model is equipped with a torque feedback mechanism that is essentially a single degree-of-freedom captive trajectory system for motion about the yaw axis. The torque feedback mechanism enables the yaw torque produced by the robotic model to be measured and used in real time to set the yaw velocity of the model by simulating the inertial dynamics of the fly. Using the torque feedback system, the yaw turn dynamics of a fruit fly were estimated by examining input–output behavior of the system in response to sinusoidal and square-wave inputs.

Our measurements show that the stroke-averaged yaw torque produced by the flapping wings is about 68 times larger than that for the body, in agreement with the quasi-steady estimates in previous studies (Hesselberg and Lehmann, 2007; Hedrick et al., 2009; Cheng et al., 2009). The stroke-averaged torque is found to be linear with respect to yaw velocity, and the slope of this dependence is found to be independent of the choice of mechanism for active torque generation. In addition, the active stroke-averaged yaw torque generated by the four deformation modes is found to depend linearly on both the deformation parameters and the yaw velocity. The dynamic measurements, using the torque feedback mechanism, demonstrate that a first-order linear stroke-averaged model captures the yaw turn dynamics of a fruit fly with reasonable accuracy. Finally, the dynamic tests suggest that, despite the relatively higher damping coefficient due to the flapping wings, both inertia and damping play a significant role in the dynamics of saccadic turns.

## MATERIALS AND METHODS

### Robotic fly apparatus

We designed a flapping two-winged robotic apparatus, similar to that described previously (Dickinson et al., 1999), in which the entire wing assembly was capable of rotation about the yaw axis (Fig. 1). The mechanism was designed to enable quantitative measurements of the yaw torque produced by wings that were simultaneously flapping and rotating about the yaw axis. In addition, the robotic mechanism provided real-time feedback capability in which the torque produced by the wings was used to actuate the robot *via* a torque-feedback mechanism. When operated in this mode, the torque produced by the wings, measured using a torque sensor, was used to specify the yaw rotation rate in real time using a dynamic model. The torque-feedback mechanism provides several key advantages over allowing the system to freely rotate about the yaw axis on bearings. First, it enables us to match the dimensionless yaw moment of inertia of the fly without resorting to a large external mass. Second, it allows the yaw moment of inertia to be easily changed in software. Third, it makes it possible to emulate a truly frictionless bearing for motions about the yaw axis. Finally, it enables the use of the same mechanism for both prescribed yaw motions and for torque feedback.

The robotic mechanism consisted of a wing assembly connected to a yaw rotation stage by a 0.21 m shaft. The shaft was mounted in a pillow block bearing on the yaw rotation stage and connected to the wing assembly through a torque sensor mounted on the base plate of the assembly. The motion of the yaw rotation stage was controlled by a stepper motor (M-2218-3.0S; Schneider Electric Motion, Marlborough, CT, USA) that was connected to the shaft *via* a timing belt. The wing assembly contained two wing mechanisms, each of which consisted of an array of three motors mounted on the base plate of the assembly. The degrees of freedom for each wing were controlled independently by one motor of the array and are illustrated in Fig. 1. The stroke position of each wing was controlled by a stepper motor (M-1715-1.5D; Schneider Electric Motion) whereas the rotation and deviation of each wing were controlled by RC servo motors (HSC-5996TG; Hitec RCD, Poway, CA, USA).

The wings were immersed in a 1 m×2.4 m×1.2 m tank filled with mineral oil (Cheveron Superla white oil; Chevron Texaco Corp., San Ramon, CA, USA) of density 880 kg m^{–3} and kinematic viscosity 115 cSt at room temperature. Custom software written in Python and C enabled control of the robot from a PC. A torque sensor (TQ202-25Z; Omega Engineering, Stamford, CT, USA) mounted on the base plate of the wing assembly measured the yaw torque produced by the rotating and flapping wings. The torque sensor had a full scale range of 0.175 Nm and an accuracy of 0.2% full-scale output. The isometrically enlarged wings of the robotic model were based on the planform of a *Drosophila melanogaster* wing. The wings of the robotic model were cut from an acrylic sheet and had the following dimensions: length (*R*)=0.23 m, mean chord , width=0.0023 m. The rotation axes of the two wings were parallel and separated by 0.11 m.

### Baseline wing kinematics

*D. melanogaster*. The stroke position (ϕ

_{b}), deviation (θ

_{b}) and rotation angle (α

_{b}) for the baseline kinematics are given as follows: where

*f*is the flapping frequency, ϕ

_{0}is the stroke amplitude, α

_{0}is the rotation amplitude, and the parameters

*k*

_{ϕ}and

*k*

_{α}control the shape of the kinematics. The parameter

*k*

_{ϕ}provides an experimental variable that can distort the shape of the stroke position waveform from a sinusoid to a triangle waveform as

*k*

_{ϕ}varies from 0 to 1. Similarly, the parameter

*k*

_{α}provides an experimental variable that can distort the rotation waveform from a sinusoid to a step function as

*k*

_{α}varies from 0 to ∞. Values of

*k*

_{ϕ}=0.01 and

*k*

_{α}=1.5 were selected to produce waveforms that resemble an idealized version of the wing kinematics of

*D. melanogaster*. Similarly, a value of ϕ

_{0}=70 deg was used to give a peak-to-peak stroke amplitude of 140 deg, and a value of α

_{0}=45 deg was used to give a 45 deg angle of attack at midstroke.

### Kinematic deformation modes

The kinematic deformation modes modify the baseline wing kinematics by introducing asymmetry between the left and right wings. The deformation modes were selected as plausible mechanisms for generating yaw torque during flapping flight. Four deformation modes were considered: differential angle of attack, differential deviation, differential stroke plane rotation and differential stroke velocity.

*p*

_{a}is the deformation parameter. When

*p*

_{a}is equal to zero, the wing kinematics are symmetric; a non-zero value for

*p*

_{a}introduces asymmetry into the wing kinematics. Example left and right wing tip trajectories for kinematics deformed

*via*the differential angle of attack deformation mode are shown in Fig. 2A.

*p*

_{d}is the deformation parameter. Example left and right wing tip trajectories for kinematics deformed by the differential deviation deformation mode are shown in Fig. 2B.

*p*

_{r}is the deformation parameter. Example left and right wing tip trajectories for kinematics deformed by the differential rotation deformation mode are shown in Fig. 2C. The exact expressions for the modified kinematic angles are fairly complicated (see Appendix A). The approximations given in Eqns 6, 7 and 8 are accurate to within a degree for

*p*

_{r}within ±π/12 (±15 deg).

*p*

_{v}is the deformation parameter. Example left and right wing tip trajectories for kinematics deformed by the differential velocity deformation mode are shown in Fig. 2D. When

*p*

_{v}is equal to zero, the wing kinematics are symmetric. When

*p*

_{v}is greater(less) than zero, the left wing moves faster(slower) on the downstroke and slower(faster) on the upstroke whereas the right wing moves slower(faster) on the downstroke and faster(slower) on the upstroke.

In experiments in which the four kinematics deformation modes were combined, the differential angle of attack, deviation and velocity modes were applied first, followed by the differential rotation mode. Complete expressions for the wing kinematics deformed using the combinations of the deformation modes are given in Appendix B.

### Measurements of stroke-averaged yaw torque

Measurements of the stroke-averaged yaw torque for each kinematic deformation mode were made as a function of the yaw velocity and deformation parameter. During these measurements, the robotic mechanism was set to rotate at a constant yaw velocity, and the value of the deformation parameter was held constant throughout the trial. Each trial consisted of five flapping cycles, and the yaw torque was averaged over the middle three cycles, as shown in Fig. 3. The trials were conducted at yaw velocities of –7 to 7 deg s^{–1} in steps of 1 deg s^{–1} for the values of deformation parameters summarized in Table 1.

*via*the robotic model: the Reynolds number (

*Re*) and the dimensionless yaw velocity (ω*). The Reynolds number is given by: and the dimensionless yaw velocity is given by: where

*R*is the wing length, Φ is the (peak-to-peak) stroke amplitude,

*f*is the flapping frequency, is the mean wing chord, and ω is the yaw velocity. A flapping frequency of 0.167 Hz was selected for the wing kinematics to give a

*Re*of approximately 100, matching the value appropriate for

*D. melanogaster*(Lehmann and Dickinson, 1997). The range of yaw velocities of the trials corresponds to yaw velocities of –8400 to 8400 deg s

^{–1}for a fruit fly and spans the average yaw velocity for a saccade of approximately 2000 deg s

^{–1}(Tammero and Dickinson, 2002; Fry et al., 2003).

^{–7}. Note, the torque relationship given in Eqn 14 does not rely on any assumptions regarding the magnitude of

*Re*.

### Dynamic measurements using torque-feedback

*via*asymmetry in the wing kinematics. When in torque-feedback mode, the robotic model uses the instantaneous measured yaw torque to determine the heading and yaw velocity in real time by integrating a dynamic model of the fly's inertial dynamics. The model of the fly's inertial dynamics is given by: where ψ is the heading angle,

*I*is the moment of inertia about the yaw axis, ω is the yaw velocity, τ

_{meas}is the yaw torque measured by the sensor, and

*b*is an optional damping term. This equation was integrated using the classical Runge-Kutta method (Butcher, 2003) to set the yaw velocity and heading angle of the system at each time step of the real-time loop, which was updated at 3 kHz. For all of the experiments described in this manuscript, the optional damping term,

*b*, was set to zero, so that all of the damping came from the aerodynamic forces acting on the wings and body of the robotic model.

*Re*, as defined in Eqn 11, and the dimensionless moment of inertia about the yaw axis,

*I**. The dimensionless moment of inertia is given by: where ρ is the density of the fluid.

As with the stroke-averaged torque measurements, all experiments were performed with a flapping frequency of 0.167 Hz to give a *Re* of 100. Similar to Fry et al. (Fry et al., 2003), the moment of inertia of a fly about the yaw axis was modeled as a cylinder with length 2.44×10^{–3} m, radius 4.28×10^{–4} m, and a mass of 1.1×10^{–6} kg (Lehmann and Dickinson, 1997). The body posture of a *Drosophila* in hovering flight was mimicked by orienting the axis of the cylinder at an angle of 35 degrees with respect to vertical. The moment of inertia about a vertical axis running through the center of mass of the cylinder was calculated to be 2.77×10^{–13} kg m^{–2}, and the dimensionless moment of inertia is given by 1.97×10^{3}.

*f*

_{robo}/

*f*

_{fly}) is equal to 1200.

*x*indicates the deformation mode,

*s*is the scaling factor for deformation mode

_{x}*x*, and

*u*

_{cos}(

*t*) is the sinusoidal variation. The function

*u*(

*t*) is given by: where

*u*

_{0}is the amplitude of the waveform, and

*f*is the frequency of the waveform. The appropriate values for the scaling factors were determined from the results of the stroke-averaged torque measurements using a linear regression and are summarized in Table 2.

_{u}*u*

_{0}=0.12 at 25 frequencies, ranging from

*f*=

_{u}*f*/2 to

*f*=

_{u}*f*/60 with logarithmic spacing. Thus, in dimensionless form: where the frequencies ranged from 1/2 to 1/60. Trials consisted of five cycles of the sinusoidal waveform. Example data for a single cycle of a representative trial are shown in Fig. 4.

*u*

_{sqr}) were scaled so that each deformation mode produced approximately the same stroke-averaged torque as a function of time and yaw velocity: where

*s*represents the scaling factors given in Table 2, and

_{x}*u*

_{sqr}(

*t*) is the square-wave function. In order to avoid discontinuities in the wing kinematics, an approximation of a square-wave, which transitions linearly from high-to-low and low-to-high over a short time period, was used. A complete expression of the approximate square-wave function is given in Appendix C. Square-wave amplitudes of 0.05 and 0.1 were selected to produce turns with approximately 1 and 2 times the average velocity of a saccade, i.e. the first amplitude produces a roughly 90 deg turn in 10 wing strokes whereas the second produces a roughly 180 deg turn in 10 wing strokes. By the same reasoning, the frequency of the square-wave was set to 120 s or 20 wing strokes. Thus, the robotic model produced positive torque for 10 wing strokes and negative torque for another 10 wing strokes. Trials consisted of five cycles of the square-wave. Example data for a single cycle of a representative trial are shown in Fig. 5.

### Measurement of body damping

In order to determine the relative magnitude of the rotational damping (counter-torque) due to the fly's body compared to that produced by the flapping wings, measurements were made of the rotational damping on a model fly body (Fig. 6) and on the robotic model with the wings removed. The body model was constructed using SolidWorks (Dassault Systèmes SolidWorks Corp., Concord, MA, USA), from images of female *Drosophila melanogaster*, and was fabricated in ABS plastic using fused deposition modelling. The length of the model, measured along the long body axis, was 0.27 m.

The counter-torque produced by the body model and the robotic model (without wings) was much smaller than that due to the flapping wings, and a higher viscosity oil was required in order to obtain large enough torques for accurate measurements. The experiments were performed in mineral oil (Cheveron Superla white oil; Chevron Texaco Corp.) with a kinematic viscosity of 1.87 St and a density of 860 kg m^{–3}. For the experiments using the body model, the wing assembly was removed from the rotation stage and replaced with the body model. In each trial, the body or robotic model (without wings) was set to rotate at a constant yaw velocity from a heading of 0 to 360 deg. The yaw torque was then averaged from the segment of data from 180 deg to 325 deg. Trials were conducted at yaw velocities of 0 to 40.7 deg s^{–1} in steps of 4.07 deg s^{–1}.

*Re*

_{b}, is required in order to obtain an accurate dynamic scaling of the torques obtained

*via*the model fly body and the robotic model (without wings) in the higher viscosity oil.

*Re*

_{b}is the Reynolds number of the body for rotations about the yaw axis and is given by: where

*R*

_{b}is the length of the body, and

*v*is the kinematic velocity. The relationship between the yaw velocities for experiments performed at two different length scales and kinematic viscosities is given by: where the subscripts 1 and 2 refer to experimental setup 1 and 2, respectively. The scaling factor in Eqn 29 relating the yaw velocities performed in the high viscosity oil to those in the low viscosity oil, is 0.073. Thus, yaw velocities for the body damping experiments, performed in the high viscosity oil, correspond with yaw velocities of 0–3 deg s

^{–1}in the low viscosity oil with a step size of 0.3 deg s

^{–1}. The scaling factor in Eqn 29 relating the yaw velocities performed in the high viscosity oil to those of a fruit fly is 100. Thus, the yaw velocities for the body damping experiments, performed in the high viscosity oil, correspond with yaw velocities of 0–4070 deg s

^{–1}with a step-size of 407 deg s

^{–1}for a fruit fly.

^{–10}. Note, the torque relationship given in Eqn 30 does not rely on any assumptions regarding the magnitude of

*Re*.

## RESULTS

### Stroke-averaged yaw torque

^{2}, and the maximum variation in the slope over all trials was less than 5%. Thus, it is clear that stroke-averaged yaw torque, for a given deformation mode

*x*, may be approximated as a linear function of the yaw velocity, ω*, plus an unknown function,

*F*, of the deformation parameter,

_{x}*p*, as follows:

_{x}*x*, such that the dimensionless torque produced by that mode at yaw velocity equal to zero is given by . The mean values of the slopes for each deformation mode are summarized in Table 3. Note, the maximum variation of the slope for each mode over all trials was less than 5%. From this, it is clear that the approximate expressions for the stroke-averaged yaw torque given in Eqn 31 may be simplified to:

*x*and

*y*, is given by:

### Body damping

The expression for the stroke-averaged yaw torque given in Eqn 34 includes the yaw torque produced by the body of the robotic mechanism, which may be different from that produced by a fly body. In addition, it is of interest to be able to separate and compare the torques produced by the flapping wings from those produced by the body of a fly. For these reasons, measurements were made of the yaw torque produced by the body of the robotic mechanism and of a scale model fly body. Fig. 10 shows the dimensionless yaw torque produced by both the body of the robotic mechanism (without wings) and the model fly body as a function of yaw velocity. The yaw torque produced by both the model fly body and the body of the robotic mechanism shows a clear linear dependence upon yaw velocity. The slope of this relationship gives the damping coefficient for the body. The dimensionless damping coefficients, estimated *via* least-squares fit, for the model fly body and the body of the robotic mechanism are –9.3 and –4.6, respectively. Thus, we see that the yaw torque produced by the model fly body is approximately twice that produced by the body of the robotic model. However, the yaw torque produced by both the model fly body and the body of the robotic mechanism is nearly two orders of magnitude smaller than that produced by the flapping wings. The inclusion or exclusion of the yaw torque produced by either body model represents a change of less than two percent in the value of the stroke-averaged damping coefficient, . Thus, it is clear that the torque produced by the body damping is quite small compared to that produced by the flapping wings and that the effect of the body can be safely ignored in Eqn 34.

### Sine-wave response

Fig. 11 shows the resulting yaw velocity for all four deformation modes for a single cycle of the deformation parameter. The resulting yaw velocities show a clear sinusoidal response at the same frequency as the sinusoidal variation of the deformation parameters, which is characteristic of a linear system. The amplitude and phase of this sinusoidal component of the resulting yaw velocities depends upon the frequency of the deformation parameter sinusoid. As would be expected for a damped linear system, the amplitude decreases with increasing input frequency. Similarly, the phase shift is small for low-frequency inputs and increases to around 90 deg as the frequency of the input is increased. The changes in amplitude as a function of frequency are summarized in Fig. 12, which shows the gain of the system in dB, calculated using Eqn 24, as a function of frequency for each deformation mode. Also shown are the predicted gains for the linear system given by Eqn 35, with coefficients determined from the stroke-averaged measurement.

For all four deformation modes, the measured gains agree quite closely with the gains predicted by the stroke-averaged linear model when the input frequency is below approximately one-fifth of the flapping frequency. At higher input frequencies, the differential deviation and differential stroke-plane rotation modes show slightly higher and lower gains, respectively, than predicted by the linear model. The changes in phase as a function of frequency are summarized in Fig. 13, which shows the relative phase of the output (yaw velocity) to the input (deformation parameter) signals. Also shown are the predicted phases of the linear system, given by Eqn 35, with coefficients determined from the stroke-averaged measurements. Again, the agreement of the measurements with the linear model is quite good. However, there are some differences in the behavior of the systems as compared with the linear model at higher frequencies. When using the differential angle of attack and differential rotation deformation modes, the system shows slightly less phase shift than predicted by the stroke-averaged linear model at higher frequencies. By contrast, when using the differential rotation and differential velocity deformation modes, the system shows slightly greater phase shift than predicted by the stroke-averaged linear model at higher frequencies. Overall, the results suggest that the stroke-averaged linear model provides a very reasonable approximation for the yaw turning dynamics of a fruit fly.

*g*(

*t**) is a function that is periodic with respect to the dimensionless flapping frequency

*f**. The periodic function

*g*(

*t**) may be written as a Fourier series: where

*a*and

_{n}*b*are unknown coefficients. If is a stroke-averaged actuation coefficient then we must have

_{n}*a*

_{0}=2 to recover the stroke-averaged yaw torques. When the input function is a sinusoid,

*u*(

*t**)=

*u*

_{cos}(

*t**), then: The products of sinusoids in Eqn 38 may be written as the sum of sinusoids as follows: and

Thus, we see that the frequencies of the sinusoids in our modulated input signal are and , where *n*=1,2,...,∞. If the underlying yaw turning dynamics are linear, we would expect these frequency components to be present in our output signal, the yaw velocities. Fig. 14 shows the power spectral density (PSD) of the yaw velocities for a representative trial with the differential velocity deformation mode. Clear peaks are seen in the PSD at the frequencies , and . The higher frequencies, , are not shown, but the PSD also shows clear peaks at these values. The PSDs for the other deformation modes show similar peaks at these frequencies. Thus, it is clear that the additional frequencies seen in the yaw velocities are due to the modulation of the yaw torque by the flapping wings. Also, as the actuation frequency () is increased, the frequency is decreased and becomes more prominent in the output, a result that is expected for first-order damped linear system as the gain of the system increases with decreasing frequency. Therefore, we expect the effect of the torque modulation on the output to be more pronounced for higher input frequencies, .

### Square-wave response

As a second test of the yaw turning dynamics we performed an input/output analysis using square waves. During these tests, the deformation parameter or input for each deformation mode was an approximate square-wave and the output was again the yaw velocity of the system. The trials were performed with square-wave amplitudes that produced turns of approximately 1 and 2 times the average velocity of a saccade. Note that both the amplitude and frequency of the square-wave affect the average turn velocity. As with the sinusoidal input/output analysis, the deformation parameters were scaled, according to Eqn 20, so that each mode produced the same stroke-averaged torque. Fig. 15 shows the yaw velocities for all four deformation modes for a single cycle of the square-wave input in the trials that produced turns at approximately twice the average velocity of a saccade.

We also show the predictions of the square-wave response made using the stroke-averaged model given by Eqn 35. The time course of yaw velocities is characteristic of a first-order damped linear system, and the linear stroke-averaged model with coefficients derived from the stroke-averaged measurements predicts the time course of the yaw velocities quite closely. Higher frequency oscillations, at frequencies near the flapping frequency, are apparent on the yaw velocities for all four deformation modes, reflecting the underlying modulation of the yaw torque by the flapping wings. Again, these oscillations are more prominent for the differential velocity deformation, reflecting the greater amplitude of torque modulation for this mode.

## DISCUSSION

There are several possible strategies for studying how insects might modulate their wing kinematics in order to actively control forces and moments and ultimately their flight dynamics. One approach (Willmott and Ellington, 1997; Fry et al., 2003; Card and Dickinson, 2008; Liu and Sun, 2008) is to carefully record and measure the wing and body kinematics of free-flying animals. The forces and moments produced can then be analysed using simulations or dynamically scaled models. This approach yields valuable direct insight into what the animals actually do in flight to modulate the forces and moments produced. A second approach (Sane and Dickinson, 2001; Usherwood and Ellington, 2002a; Usherwood and Ellington, 2002b; Dickson and Dickinson, 2004), and the one taken in this paper, is to consider more broadly the possible changes in wing kinematics that might be used to produce a particular combination of forces or moments. This latter approach makes it possible to study the relationship between kinematics, forces and moments in a systematic manner. In the present study, we have explored four possible mechanisms for active yaw torque generation. These mechanisms, called deformation modes, function by introducing kinematic asymmetry between the left and right wings. One relatively surprising finding of this study is that, with respect to stroke-averaged yaw torque production, all of the mechanisms examined could be modeled as simple linear functions of the deformation parameters. We found that it is possible to combine the deformations, i.e. apply more than one deformation to the baseline wing kinematics, and very accurately predict the yaw torque of the combined deformation given the measurements of the yaw torque for each deformation mode in isolation. In addition, the stroke-averaged dynamics of the system, up to a scaling of the actuation coefficient, did not depend upon our choice of mechanism for yaw torque generation. Scaling the actuation coefficient will scale the gain but will not affect the phase lag of the system. These two results imply that, at least with respect to yaw torque production, all of the actuation modes are essentially equivalent and, when scaled appropriately, result in equivalent stroke-averaged yaw dynamics. These findings offer insight into the control strategies used by hovering birds and insects as well as potential design principles for the control of flapping micro air vehicles.

### Stroke-averaged models

The results of this study suggest that, at least when restricted to motion about the yaw axis, a stroke-averaged model is sufficient to accurately capture the yaw turn dynamics of a fruit fly. In addition, the stroke-averaged model provides a framework for determining how much the instantaneous yaw velocity might be expected to deviate from the stroke-averaged prediction due to the fact that actively generated yaw torque is not constant but rather modulated by the flapping frequency. Differences between the prediction of the linear stroke-averaged model and the system response start to increase for control inputs with frequency greater than approximately one-tenth of the flapping frequency. These differences may be important during extreme maneuvers, such as escape take-off, where the wing kinematics change on a stroke-by-stroke basis (Fontaine et al., 2009). It is not known whether such an approach can be extended to less restrictive motion that includes roll, pitch or translation. However, if a stroke-averaged model can be applied with sufficient accuracy to a reasonable portion of the flight envelope then this will greatly simplify the mathematical description of the motion and make questions concerning flight dynamics and control more tractable. Recent results (Bergou et al., 2009) suggest that linear stroke-averaged models can successfully capture the trends seen during turning maneuvers of free-flying insects. For flapping flight in general, the conditions under which it is reasonable to assume that a stroke-averaged model will provide an acceptable model of the flight dynamics are still unclear. Further study will be required to determine when this is the case; however, the results of the present study suggest that, at least under some conditions, the stroke-averaged approach may prove successful.

### Inertia and damping

Recent studies (Hesselberg and Lehmann, 2007; Hedrick et al., 2009; Cheng et al., 2009) have suggested that the counter torque produced by the flapping wings of a fruit fly in response to rotation about the yaw axis is approximately two orders of magnitude greater than the torque produced by the body of the fly. The stroke-averaged measurements of the yaw torque produced by wings and body in the present study provide further evidence that this is indeed the case; the damping coefficient due to flapping was found to be about 68 times greater than that for the body of the fly. It has been further suggested (Hesselberg and Lehmann, 2007) that damping (or friction) is the dominant factor in the dynamics of rapid yaw turns in fruit flies. As we have shown that the turning dynamics, when restricted to motions about the yaw axis, are well modeled by a first-order linear system, we can re-examine the roles of damping and inertia with respect to the yaw dynamics of fruit flies.

The free-flight trajectories of fruit flies are characterized by straight flight segments interspersed with rapid changes in heading called body saccades (Tammero and Dickinson, 2002). During a saccade, a fruit fly rotates by approximately 90 deg in approximately 10 wing strokes (Fry et al., 2003). As an idealized representation of a saccade, we consider a sinusoid with an amplitude of 45 deg and a period of approximately 20 wing strokes. Such a sinusoid represents a continuous sequence of saccades, in which the fly turns 90 deg in one direction for 10 wing strokes and then 90 deg in the other direction for 10 wing strokes and so on. An estimate of the phase lag for a representative fruit fly in response to an input sinusoid with dimensionless frequency of 1/20 can be made using values of 1.97×10^{3} for the dimensionless moment of inertia, *I**, and –6.4×10^{2} for the dimensionless damping coefficient, . The phase lag, calculated using Eqn 42, is found to approximately 44 deg. Thus, the phase lag of the system is almost exactly midway between a system dominated by damping and one dominated by inertia. In addition, the gain of the system is reduced by 3 dB from that for a system that is dominated by damping. Note, a 3 dB reduction in the gain implies that the ratio of output amplitude to input amplitude is reduced to 71% of the value it would be for a system that is dominated by damping. From this, we can conclude that neither damping nor inertia dominate the dynamic response of the system to a sinusoid representative of a saccade but rather that both inertia and damping play an important role in the response.

Fruit flies exhibit considerable variation in body mass, wing size, wing shape and other morphological parameters. In addition, the mass of an individual fruit fly might vary to a large extent depending on age, hunger status, gravidity and other factors. For this reason, it is interesting to consider how sensitive our assessment of the relative importance of inertia and damping is to changes in the moment of inertia and damping coefficient, which we can do by examining how the phase lag varies in response to changes in these parameters. The phase lag depends upon the ratio of the dimensionless moment of inertia and the dimensionless damping coefficient. This ratio is equivalent to the dimensionless time constant of the linear system. Lowering the time constant will decrease the phase lag for a given input frequency, and increasing the time constant will increase the phase lag. When the dimensionless moment of inertia and damping coefficient are as given in the previous paragraph, then the time constant is equal to 3. This can be interpreted to mean that in response to a step change in the control input *u*, the fly will require 3.0 wing strokes in order to reach 63% of its new terminal velocity. Varying the time constant by a factor of two in either direction gives phase lags equal to 26 deg and 63 deg, respectively, in response to a sinusoid of dimensionless frequency equal to 1/20. Both of these values for phase lag clearly fall in the intermediate regime where neither damping nor inertia dominate. We might ask at what value of time constant will the phase lag for this frequency be within 5% of the value expected of a damping or inertia dominated system, i.e. within 5% of 0 deg or 90 deg, respectively. For the phase lag to be within 5% of 0 deg, the time constant must be less than 0.25, which is approximately 8% of the value of our estimate for the time constant for a representative fruit fly. For the phase lag to be within 5% of 90 deg, the time constant must be greater than 40, which is about 1350% greater than our representative time constant. Again, it seems clear that both damping and inertia will be important factors with regard to yaw turn dynamics over a fairly wide variation in both the moment of inertia and damping coefficient.

### Roll and pitch

In the present study, we measured the yaw torque produced by each deformation mode as a function of deformation parameter and yaw velocity. We did not measure the roll or pitch moments produced by the different modes and how they changed with yaw velocity. While these measurements were beyond the scope of this study, it would be very interesting to compare the roll and pitch moments for the different deformation modes. In particular, one might try and identify deformation modes that produce essentially equivalent yaw torque but different roll and/or pitch moments. Given that, with regard to yaw torque, the deformation modes could be linearly combined, modes that produce different roll/pitch moments might be combined to give independent control of yaw and roll/pitch. We are currently conducting experiments to examine this important issue of coupling.

### APPENDIX A. EXACT EXPRESSION FOR THE DIFFERENTIAL ROTATION DEFORMATION MODE

### APPENDIX B. WING ANGLES FOR COMBINED DEFORMATION MODES

### APPENDIX C. APPROXIMATE SQUARE-WAVE

*u*

_{sqr}, was used in the dynamic measurements. The approximate square-wave avoids discontinuities by transitioning linearly from low-to-high and from high-to-low. The approximate square-wave function is given by: where

*u*

_{0}is the amplitude,

*f*is the frequency and δ is the fraction of the period (1/

_{u}*f*) spent in a given low-to-high or high-to-low transition.

_{u}## Acknowledgements

We thank Sawyer B. Fuller and Martin Y. Peek for technical advice and assistance.

Research was supported by the Army Research Office (ARO) DAAD 19-003-D-0004, the National Science Foundation (NSF) FIBR 0623527, and The U.S. Army Research Laboratory Micro Autonomous Systems and Technology (MAST) Collaborative Technology Alliance.

## LIST OF SYMBOLS AND ABBREVIATIONS

*b*optional damping term

mean chord

dimensionless stroke-averaged actuation coefficient for the differential angle of attack deformation mode

dimensionless stroke-averaged actuation coefficient for the differential deviation deformation mode

dimensionless stroke-averaged actuation coefficient for the differential rotation deformation mode

dimensionless stroke-averaged actuation coefficient for the differential velocity deformation mode

dimensionless stroke-averaged actuation coefficient for deformation mode

*x*stroke-averaged dimensionless damping coefficient

*f*flapping frequency

*f**dimensionless flapping frequency

*f*_{u}waveform frequency

dimensionless waveform frequency

*F*_{x}unknown function of the deformation mode parameter

*p*_{x}*g*periodic function

*G*gain

*I*moment of inertia about the yaw axis

*I**dimensionless moment of inertia about the yaw axis

*k*_{α}rotation angle shape parameter

*k*_{ϕ}stroke position shape parameter

*p*_{a}deformation parameter for the differential angle of attack deformation mode

*p*_{d}deformation parameter for the differential deviation deformation mode

*p*_{r}deformation parameter for the differential rotation deformation mode

*p*_{v}deformation parameter for the differential velocity deformation mode

- PSD
power spectral density

*R*wing length

*R*_{b}body length

*Re*Reynolds number

*Re*_{b}Reynolds number of the body for rotations about the yaw axis

*s*_{x}scaling factor for deformation mode

*x**t*time

*T*wing beat period 1/

*f**u*_{0}waveform amplitude

*u*_{sqr}square-wave amplitude

*v*kinematic velocity

- α
rotation angle

- α
_{0}rotation amplitude

- α
_{b}rotation angle of baseline kinematics

- α
_{L,R}modified rotation angle for the left and right wings

- θ
_{b}stroke deviation of baseline kinematics

- θ
_{L,R}modified stroke deviation for the left and right wings

- ρ
fluid density

- τ
yaw torque

- τ*
dimensionless yaw torque

- τ
_{meas}yaw torque measured by the sensor

- ϕ
_{0}stroke amplitude

- ϕ
_{b}stroke position of baseline kinematics

- ϕ
_{L,R}modified stroke position angle for the left and right wings

- Φ
(peak-to-peak) stroke amplitude

- ψ
heading angle

- ω
yaw velocity

- ω*
dimensionless yaw velocity

amplitude of dimensionless yaw velocity