## SUMMARY

Insects produce a variety of exquisitely controlled manoeuvres during natural flight behaviour. Here we show how hawkmoths produce and control one such manoeuvre, an avoidance response consisting of rapid pitching up, rearward flight, pitching down (often past the original pitch angle), and then pitching up slowly to equilibrium. We triggered these manoeuvres *via* a sudden visual stimulus in front of free-flying hawkmoths (*Manduca sexta*) while recording the animals' body and wing movements *via* high-speed stereo videography. We then recreated the wing motions in a dynamically scaled model to: (1) associate wing kinematic changes with pitch torque production and (2) extract the open-loop dynamics of an uncontrolled moth. Next, we characterized the closed-loop manoeuvring dynamics from the observed flight behaviour assuming that hawkmoths use feedback control based on translational velocity, pitch angle and angular velocity, and then compared these with the open-loop dynamics to identify the control strategy used by the moth. Our analysis revealed that hawkmoths produce active pitch torque *via* changes in mean wing spanwise rotation angle. Additionally, body translations produce passive translational damping and pitch torque, both of which are linearly dependent on the translational velocity. Body rotations produce similar passive forces and torques, but of substantially smaller magnitudes. Our comparison of closed-loop and open-loop dynamics showed that hawkmoths rely largely on passive damping to reduce the body translation but use feedback control based on pitch angle and angular velocity to control their orientation. The resulting feedback control system remains stable with sensory delays of more than two wingbeats.

## INTRODUCTION

Insects and other flapping-wing animals are able to perform elaborate flight manoeuvres and rapidly stabilize their body posture following perturbations by controlling their wing kinematics. These flight manoeuvres and their associated wing kinematics have recently been the subject of several studies that used high-speed stereo videography to record free-flying animals (Fry et al., 2003; Hedrick and Biewener, 2007; Hedrick et al., 2009; Bergou et al., 2010; Hedrick and Robinson, 2010). These observed flight behaviours are a result of ‘closed-loop’ flight dynamics, i.e. the combination of the passive ‘open-loop’ dynamics, sensory systems and feedback control responses.

The open-loop or passive flight dynamics of hovering, which describe the body motions produced in response to small disturbances in the absence of feedback control, were recently studied by several groups (Sun and Xiong, 2005; Deng et al., 2006; Gao et al., 2009; Faruque and Sean Humbert, 2010; Cheng and Deng, 2011). These authors measured the aerodynamic forces and torques from dynamically scaled robotic wing experiments (e.g. Dickinson et al., 1999; Cheng et al., 2009; Dickson et al., 2010), or calculated them using computational fluid dynamics (e.g. Wu and Sun, 2004; Ramamurti and Sandberg, 2007; Gao et al., 2009). The forces and torques were then used to predict the flight dynamic response to small perturbations, revealing that the passive open-loop flapping flight dynamics of animals in hover are unstable (e.g. Sun and Xiong, 2005; Cheng and Deng, 2011) or have weak stability (Gao et al., 2009). Thus, active control of wing kinematics based on sensory feedback is critical not only for manoeuvres but also for flight stability.

Insects are equipped with various types of sensors for flight control to enable closed-loop control, which relies on the fast synthesis of these different sensory inputs and encompasses both low-level sensory-motor reflexes and central nervous system processing (Dudley, 2000; Dickinson, 2005; Bender and Dickinson, 2006). How these various types of sensory information are combined and used to generate flight control inputs is an active area of research and much remains unknown (Taylor et al., 2007).

Although the free flight behaviour of animals emerges from their open-loop dynamics, sensory systems and sensory-motor responses, these systems and responses are often studied individually despite their interconnections. Simultaneous examination of several of these research areas may now lead to rapid progress in understanding how flying animals control and stabilize their movements. The goal of this study was to combine recordings of the closed-loop free-flight behaviour of hawkmoths (*Manduca sexta*) with an analysis of their open-loop dynamics to reveal how these animals produce and control flight manoeuvres.

Specifically, the manoeuvres studied here were triggered by providing a sudden looming stimulus to a hovering moth, causing it to pitch up, fly backwards a short distance, and then pitch back down towards its initial orientation (Fig. 1). These actions were recorded *via* high-speed videography and used to: (1) identify the wing kinematics used to perform the manoeuvre and (2) measure the closed-loop dynamics of the animal through the manoeuvre. We then replicated the flapping kinematics of the manoeuvring moth in a dynamically scaled mechanical flapper to: (3) measure forces and torques and (4) characterize the open-loop dynamics of the moth. Finally, we compared the open- and closed-loop dynamics to reveal the moths' control strategy and likely sensory inputs. Hawkmoths are known to use their antennae as mechanosensor-based biological gyroscopes, providing low latency sensing of angular velocity; moths without antennae are reported to fly poorly (Sane et al., 2007). Sensing of angular orientation is likely visual, and thus subject to latencies of one to three wingbeats (Sprayberry, 2009).

Given these earlier studies of the open-loop dynamics of flying insects and the sensory characteristics of moths, we developed the following hypotheses to be examined: (1) the open-loop hovering flight of hawkmoths is unstable, (2) the closed-loop dynamic responses with a controller based on sensing of pitch angle and velocity will closely match the hawkmoth kinematics, (3) the closed-loop dynamics will be stable to small perturbations and (4) the closed-loop dynamics will be stable given sensory delays of less than three wingbeats in pitch and <0.5 wingbeats in pitch velocity.

## MATERIALS AND METHODS

### Experiment design and videography

We recorded flight manoeuvres from four male hawkmoths [*Manduca sexta* (Linnaeus 1763)] from the domestic colony maintained at the University of North Carolina at Chapel Hill; morphological characteristics and basic flapping kinematics for the animals are given in Table 1. The moths were maintained on a 22 h:2 h light:dark cycle to minimize accumulation of wing damage during caged activity. Beginning on the third day post eclosure, the moths were trained to feed from an artificial flower containing a 4:1 water:honey solution. We recorded manoeuvres on the third to fifth day post eclosure.

Manoeuvres were elicited by waiting for the moth to approach the artificial flower, and then providing a visual looming stimulus coming from just above the artificial flower towards the moth, moving in the horizontal plane, applied just before the moth began to feed. The stimulus was provided by the researcher's hand, thrust from a distance of ∼30 cm to a distance of ∼5 cm from the moth in ∼0.2 s. Over time, the moths became accustomed to the stimulus and ceased responding to it, allowing only a limited number of manoeuvring trials per moth. Following recording, we selected a single trial from each individual for further analysis. These were selected based on the rapidity of the manoeuvre and the degree to which it was confined to a single plane and lacked a yaw rotation component.

The manoeuvres were performed in a 0.7×0.7×0.7 m glass-walled flight chamber dimly lit in the visible spectrum and brightly illuminated in the near-infrared (760 nm), below the moth's visual threshold, by eight infrared LEDs (Roithner LaserTechnik GmBH, Vienna, Austria). The manoeuvres were recorded at 1000 frames s^{–1} using three high-speed cameras (two Phantom 7.1 and one Phantom 5.1, Vision Research, Wayne, NJ, USA). These cameras were calibrated using a direct linear transformation for three-dimensional kinematic reconstruction (Hedrick, 2008).

### Kinematics extraction and parameterization

*x*

_{b}axis parallel to the vector connecting the head to the tip of the abdomen and the

*y*

_{b}axis parallel to the vector connecting the left to right wing bases (Fig. 2). The

*z*

_{b}axis is then the cross product of

*x*

_{b}and

*y*

_{b}. Body roll, pitch and yaw angles were calculated based on the rotation matrix from the global frame to the body frame. The angular velocities about each principal axis were calculated based on the derivative of the matrix (Murray et al., 1994). Body kinematics were then low-pass filtered with a cut-off frequency of 10 Hz. Wing kinematics were quantified by representing the wing as a two-dimensional plate with position and orientation determined by three points located at the base, leading and trailing edges of the forewings (Fig. 2A). Wing kinematics are specified by stroke position φ, stroke deviation θ and wing rotation ψ (Fig. 2B), Euler angles corresponding to the rotation from the

*y*

_{b}–

*z*

_{b}plane to the wing plane. The recorded Euler angles were parameterized using a third-order Fourier series prior to further analysis: where

*t*is dimensionless time (from 0 to 1 during a single wing stroke), and ψ

_{0}, θ

_{si}, ψ

_{si}, etc. are coefficients for the harmonics, which were selected to yield the best least-squares fits to the measured wing angles (Table 2).

*t*) is the wing rotation angle with variation,

*H*(

*t*) is the Heaviside function, ψ

_{add1}corresponds to a variation of ψ during (both ventral and dorsal) stroke reversals, ψ

_{add2}corresponds to a variation during upstrokes, and ψ

_{add}is a measure of the magnitude of variation. A positive value for ψ

_{add}generally corresponds to an increase of rotation angle during upstroke and a decrease during downstroke; a negative value produces the opposite effect. The functions in Eqns 4–6 were selected to best replicate the observed biological changes of wing rotation angle; typical values of ψ

_{add}ranged from –12 to 8 deg during the recorded manoeuvres.

We also used the high-speed video images to quantify the location of the COM and pitch moment of inertia (*I _{yy}*) of the moths. We used the three calibrated camera views to construct a set of uniform size voxels encompassing the head, abdomen and thorax of the moth. We then assumed a uniform voxel density based on the total voxel volume and the moth's mass, and used mean voxel location to calculate the COM and the voxel distribution to calculate

*I*about that point.

_{yy}### Dynamically scaled robotic wing experiments

*EI*) for each section can be approximated as: where

*E*is Young's modulus,

*t*

_{w}is wing thickness and

*c*is local wing chord length. The

*E*of the polymer (PETG, polyethylene terephthalate) used to construct the wing is close to 3 GPa. Thus, the EI from wing base to wing tip section, calculated at the section midpoint, is (70.2, 12.6, 4.0, 1.5)×10

^{–3}N m

^{2}. This distribution of

*EI*decays according to: where

*r*

_{1}and

*r*

_{2}are non-dimensional wingspan locations. Therefore, the ratio of

*EI*at the root to

*EI*at the tip was 10

^{–3}, which is close to that previously measured from male

*M. sexta*(Combes and Daniel, 2003). The hindwing was attached to the forewing and had a thickness of 0.13 mm. Note that although we used the same exponential decay of

*EI*, it does not guarantee the same aeroelastic flexural response. Conservation of additional dimensionless numbers (e.g. the density ratio between the air and the wing) (Ishihara et al., 2009) and wing inertia properties (i.e. wing deformation due to wing inertia force) are required to replicate the fluid–structure interaction, which is impossible to achieve in dynamically scaled robotic-wing experiments while also matching Reynolds number (

*Re*). Nevertheless, the flexible wing used here underwent deformation comparable to that observed in the real flight during most of the stroke cycles expect during stroke reversals (especially ventral stroke reversals, where substantial deformation occurred in moth flight). Because the aerodynamic forces and torques are generally small during stroke reversals (see ‘Results’), we considered the flexibility to have negligible effect on the average forces and torques, and therefore a negligible effect on the analyses in the present study. Finally, the net upward force generated by the mechanical model (14 mN, scaled to the moth) was almost equal to the average body weight of the animals used in the study.

^{3}) and they were able to move along the tank on a linear stage (Fig. 3), controlled by a stepper motor system (Applied Motion Products, Watsonville, CA, USA).

*Re*in this study was calculated using: where

*AR*is aspect ratio,

*n*and Φ are wingbeat frequency and amplitude, respectively,

*R*is wing length and υ is the kinematic viscosity of the fluid. The flapping frequency (0.3 Hz) and wing length (24 cm) in the dynamically scaled model were selected to yield a

*Re*close to that calculated for the moths used in the study, approximately 5500. The force (

*F*

_{robot}) and torque (τ

_{robot}) measured using the robotic wing were then scaled back to those of an actual hawkmoth (

*F*

_{moth}, τ

_{moth}) using: where ρ is fluid/air density,

*S*is wing area and

*r*

_{2}(

*S*) is the non-dimensional radius of the second moment of wing area.

In the first set of dynamically scaled wing experiments, we investigated the aerodynamic effect of changing wing rotation angle on force and torque production. Specifically, we re-played the hovering wing kinematics (Eqns 1–3, Table 2) with modified wing rotation angle (Eqns 4–6, with stroke position and deviation angles unchanged) and recorded the results. Wing rotation deviations ψ_{add} were –12, –8, –4, 0, 4, 8 and 12 deg, which includes the range of those observed from the flight data.

After characterizing the effects of wing rotation on torque production, we produced an open-loop flight dynamics model appropriate for the measured manoeuvres. As described above, these were characterized by a fast body rotation around the pitch axis with simultaneous rapid backward body translations (Fig. 4). As body movement substantially changes the aerodynamic force and torque produced by flapping wings (e.g. Zhang and Sun, 2009; Cheng and Deng, 2011), we incorporated the effects of these two specific types of body motion in the open-loop model.

*v*

_{b}is body translational velocity and is mean wing flapping velocity (calculated as 2Φ

*nR*). The advance ratios in this experiment are –0.3, –0.2, –0.1, 0, 0.1, 0.2 and 0.3. The largest magnitude advance ratio observed in the moths was approximately –0.15.

In the third set of dynamically scaled flapper experiments, we measured the open-loop effects of pitch rotation by re-playing the hovering wing kinematics while rotating the stroke plane about the wing base (Fig. 3). The angular velocities used were –30, –20, –10, 0, 10, 20 and 30 deg stroke^{–1} (–15 to 30 deg stroke^{–1} were observed in the manoeuvres).

In all dynamically scaled flapper experiments, only steady-state data after five wing strokes were used in the analyses to exclude the transient effects of a developing wake. Wing inertial and gravitational force and torque were measured by playing the wing kinematics in air, and subtracting the results from the force and torque measured in the oil, thereby extracting the fluid dynamic components.

In this paper, we non-dimensionalize some of our results for comparison with previous studies. The non-dimensionalization factors are: length by mean chord length (), time by a stroke period (1/*n*), translational velocity by wing velocity at the radius of the second moment of wing area (), angular velocity by flapping frequency (*n*), and force and torque by and , respectively. The dimensionless quantities are denoted by a superscript ‘+’.

### Flight stabilization and control model

Here we develop a dynamic model with feedback control from the observed body motions. All the pitch manoeuvres investigated in the present study show similar body motions in the four stages of sequences (Figs 1, 4, 5), which suggests that these dynamic responses resulted from similar flight control strategies among the four individuals. We will focus in particular on the stabilization phases of the manoeuvre (Phases 3 and 4), assuming that the controller is acting to bring the disturbed body posture back to the hovering orientation. Control of the initial phase of the manoeuvre, which depends on the visual looming startle response, was not modelled in this study.

We initially developed the model assuming that a moth has the following sensory inputs acquired at negligible time delay with respect to the stroke cycle: body forward and backward velocity, pitch angle and pitch velocity. We later investigated the effect of different sensory delays on the form and stability of the controller.

The stabilization of the pitch manoeuvre was hypothesized to result from proportional-plus-derivative (PD) feedback control, which has also been used to explain locomotion activities including cockroach walking and rapid turning in the fruit fly (Cowan et al., 2006; Ristroph et al., 2010). Specifically, based on the sensory system described above, we proposed a proportional feedback of pitch angle and derivative feedbacks of fore/aft and pitch velocities. This assumption implies that achieving a certain pitch angle with zero velocity (i.e. hovering) is the desired output in the stabilization phase, regardless of the body location in space. However, during the experiments, the moth was attracted to an artificial flower and therefore was controlling its body location, so the above assumption is only valid during the fast stabilization phase when recovering from the drastic and unstable body motion associated with the manoeuvre is the primary control task.

*m*

_{b}

*, where*

**g***m*

_{b}is body mass and

*is gravitational acceleration). Second, because pitching and backward motions dominate the flight dynamics in these recordings, other components of body velocities were considered to be negligible. Therefore, starting from the complete equations of motion of a rigid body (e.g. Etkin and Reid, 1996), one can show that the equations of motion can be simplified to: where*

**g***x*is the body position along the global

*x*-axis (Fig. 2), θ

_{b}is the body pitch angle, is the pitch angle at hover equilibrium, ) represents the components of lift force along the positive

*x*(backward) direction, X is the total force along the

*x*direction and M is total pitch torque. X is approximated by: where represents the passive damping due to body translation ( is also known as a stability derivative), and represents the force due to derivative (velocity) feedback control of body translation, i.e. the result of active changes (indicated by the superscript ‘a’) of wing kinematics. The passive and active terms are lumped together as ; the negative sign indicates that the total force acts against the direction of translation. M is approximated by: where represents the passive damping due to pitch rotation (again, is a stability derivative), ) represents the torque due to proportional feedback control of pitch orientation from active changes of wing kinematics, represents the torque due to derivative (velocity) feedback of pitch rotation and represents the pitch torque created by body translation, which has been shown in previous studies (Sun and Xiong, 2005; Cheng and Deng, 2011) to be non-negligible. Again, velocity coefficients and are lumped together as . Finally, incorporating the force and torque approximations into Eqns. 12 and 13, the equations of motion are written as:

We then used the nlinfit function in MATLAB (MathWorks, Natick, MA, USA) to find the coefficients , and K_{θ} that yielded the best fits to the measured and for the averaged and individual body kinematics of the four trials (Fig. 5). The MATLAB function nlparci was used to find 95% confidence intervals for the coefficients.

_{θ}, allowing easy investigation of flight stability using linearization around hover equilibrium. By applying small-disturbance theory (e.g. Taylor and Thomas, 2003), one can show that: where δ denotes a small disturbance. Eqn 20 represents a linear system approximating the closed-loop dynamics at hover; its stability and modes of motion can be analyzed by examination of the eigenvalues and the corresponding eigenvectors in the system matrix A.

*M. sexta*. To investigate this possibility, we applied delays to the active feedback components in the model. Here we consider the delay in pitch angle and velocity feedback, termed τ

_{θ}and , respectively. The modified equations of motion given these delays are written as: We used values of τ

_{θ}ranging from 0 to 2 wingbeats and ranging from 0 to 0.5 wingbeats, assuming low latencies in the mechanosensor-based angular velocity sensing (Sane et al., 2007) and the larger latencies of typical of visual sensing (Sprayberry, 2009) for pitch angle detection. Similar to the no-delay case, , and K

_{θ}can be obtained from fits to measured ) and with θ

_{b}and offset by the specified delays. Open-loop or passive coefficients are not affected by sensory delay were not re-estimated.

Using the fitted coefficients, the dynamic model (Eqns 21 and 22) was simulated using the dde23 function in MATLAB, which solves differential equations with delays. The responses of the system [i.e. θ_{b}(*t*), and ] were obtained from the simulation and compared with those measured.

_{θ}and . Three sets of , and K

_{θ}were used, corresponding to fitted coefficients assuming (τ

_{θ}, ) equal to (0, 0), (1, 0.25) and (2, 0.5), respectively. We considered the system unstable if the pitch angle exceeded 90 deg in the simulated response. The degree of stability was evaluated by the root mean square (RMS) error of pitch angle relative to at hover equilibrium: where

*T*is the simulation time (70 wingbeats).

## RESULTS

### Body and wing kinematics

To better interpret the characteristics of body and wing kinematics, we divided the manoeuvres into four phases according to the pitching velocity (Fig. 1). Fig. 4 shows the time series of body and wing kinematics for one of the manoeuvres analyzed. The moth was first at hovering (phase 1). After being startled, it began to pitch up and to accelerate backwards simultaneously (phase 2); the backward velocity was close to maximum when the moth reached the largest pitch angle. Next, the moth began to pitch down while it was still moving backwards (phase 3), and typically over-pitched down to approximately 15 deg below the initial hovering pitch angle. Lastly, the moth began to pitch up again but at a slower rate (phase 4). Recordings from all individuals demonstrate these four stages, as shown in Fig. 5 (phase 1 not shown). This similarity suggests that the body motions result from similar underlying open-loop dynamics and closed-loop control strategy.

Fig. 5 shows the averaged kinematics among different manoeuvres, each from a different moth (*N*=4). Stroke-by-stroke hovering wing kinematics were fitted and plotted in Fig. 6A–C. In general, the stroke plane was tilted forwards relative to the horizontal plane (Fig. 6E) and the average wing position was dorsal and caudal to the wing root (Fig. 6E,F).

Two kinematic changes were consistently observed during the pitch manoeuvres. The most prominent of these were changes in the mean wing rotation angle . Fig. 6D shows the rotation angle at different phases of a manoeuvre. According to the definition, an increase in corresponds to a decrease in the geometric angle of attack (AOA) during upstroke and an increase in AOA during downstroke, reflecting an asymmetry between upstrokes and downstrokes. We found that the observed has a strong correlation with the pitching velocity (Fig. 7). When pitching up, was increased (compared with hovering) and when pitching down, it was decreased. Eqns 4–6 were then used to generate functions that best fit the observed rotation angles, where the results for ψ_{add}=8 and –12 deg () were plotted for comparison (Fig. 6D).

The wingbeat frequency also changed substantially during the manoeuvres, as indicated by the duration of upstrokes and downstrokes (Fig. 4C, Fig. 7). The moths increased their flapping frequency during the initial pitch up following the stimulus. However, the moths reduced their flapping frequency when pitching down, especially at small pitch angles. The reason for these changes was not clear and may relate to the moth's initial urgency in responding to the stimulus followed by a slow return to feeding.

The overall wing kinematic patterns, as described by wing tip trajectories (Fig. 8), changed during different phases of manoeuvre. However, compared with the changes in , other aspects of wing kinematics varied more widely among moths and among left and right wings. As can be seen in Fig. 8, wing deviations during ventral reversals were generally higher during pitching up than during pitching down; during dorsal reversals, they were lower during pitching up than during pitching down. Collectively, the stroke plane was slightly tilted backward when pitching down and forward when pitching up. There was no clear indication of changes in mean wing stroke position, which were observed previously in the pitching manoeuvres of some species (Taylor, 2001).

Note that in addition to the body frame wing kinematic changes described above, the wing kinematics relative to the global frame were significantly altered by body translational and pitch velocities.

### Aerodynamic force and torque

Instantaneous pitch torque and fore/aft and lift forces for each set of the experiments are shown in Fig. 9. The results using hovering wing kinematics are shown in blue. We find that during the second half of downstroke and the first half of upstroke, pitching up torques are created and the pitching down torque are mostly created during the first half of downstroke and second half of upstroke. The downstrokes are responsible for most of the lift generation, as expected (Willmott and Ellington, 1997).

In the first set of robotic wing experiments, the magnitude of variation in mean rotation angle (ψ_{add}) was varied from –12 to 12 deg; the instantaneous and stroke-averaged results are shown in Fig. 9A and Fig. 10A, respectively. For positive ψ_{add}, the AOA is increased during downstroke and decreased during upstroke. The force measurements are consistent with the changes in AOA in that both lift and forward force are enhanced during downstroke and reduced during upstroke. The pitch torque is greatly enhanced during the second half of the upstroke and reduced during the second half of downstroke, resulting in a net pitch-up torque. Similarly, negative ψ_{add} results in a net pitch down torque, as expected. Fig. 10Ai shows that the stroke-averaged pitch torque increases linearly with ψ_{add} except for ψ_{add} greater than 8 deg, where further increases in ψ_{add} do not result in increases in pitch torque. This saturation point (ψ_{add}=8 deg) is also the best fit to the observed wing motion in the moths' pitching up phase (Fig. 6D). Additionally, the net force in fore/aft direction varies with ψ_{add} because of asymmetry in drag between upstrokes and downstrokes (Fig. 10Aii). For example, positive ψ_{add} results in a backward force as well as a pitch-up torque. This is consistent with the observed coupling between pitching up and backward motion during the initial phases of the manoeuvre.

We can estimate how much acceleration is produced by the observed variation of wing rotation using the results above. For instance, the mean acceleration for moth 1 during pitching up is approximately 8×10^{–3} deg ms^{–2}. Assuming that ψ_{add} ranges from 4 to 8 deg during pitching up and wingbeat frequency increased by 10% (compared with that in hover), we estimated that the acceleration produced ranges from 3.5 to 6.1×10^{–3} deg ms^{–2}, which is lower than the observed acceleration, but can provide more than 50% of the total. Therefore, this suggests that moths may rely on some other kinematic changes to produce the additional pitch torque (see ‘Discussion’).

In the second set of robotic-wing experiments, we investigated the effect of body translation on aerodynamic forces and torques. The instantaneous and stroke-averaged results are summarized in Fig. 9B and Fig. 10B, respectively. We found that translational velocity alters force and torque production in a manner similar to that resulting from changes to wing rotation angle, but with greater magnitude. For example, backward translation reduces the forces during downstroke and enhances those during upstroke, whereas the pitching up torques in the second half of downstrokes and upstrokes are greatly reduced and enhanced, respectively. Therefore, backward translation creates a large pitch down torque, which prevents further pitching up motion during phase II and adds to the pitching down motion during phase III. The stroke-averaged torque increases linearly with the translational velocity over the range investigated (Fig. 10B). Notably, this is independent of the stroke plane orientations, all of which produce similar results. This property is critical in the assumption that (the slope of the line in Fig. 10Bi) is constant for all pitch angles, because during the manoeuvres, the pitch angle (thus, the stroke plane orientation) varies continuously. Finally, was found to be 69.0 mN ms; this value was used in the dynamic model. Note that in other studies (e.g. Taylor and Thomas, 2003; Sun and Xiong, 2005), is often referred to as the stability derivative M_{u}, the dimensionless value of which is 1.3 based on the above measurement of . Body translation also causes significant counter-force in the opposite direction of translation, termed flapping counter-force (FCF) (Cheng and Deng, 2011). It results from the asymmetric drag or thrust production between upstrokes and downstrokes, depends linearly on the translational velocity and helps to slow down the rapid backward body movement of the moth. This counter-force (described by ) can be estimated based on the slope of the line in Fig. 10Bii, which is equal to 5.3 mN ms mm^{–1}; the dimensionless value is 1.9.

Finally, in the third set of robotic-wing experiments, the effect of pitch rotation about the wing base was investigated (Fig. 9C, Fig. 10C). Notably, because pitch rotations at the rates observed in the manoeuvres change force and torque production much less than do the observed body translations, the counter-torque in the pitch direction, , is very small. The additional portion of pitch torque , which is caused by translation of the stroke plane due to different positions of wing base and COM, can be estimated using Eqn 19. Using an value of 1.3, is calculated to be 0.22, and the dimensional value is 983 mm mN ms rad^{–1}. The pitch counter-torque calculated above is still small compared with those in the yaw and roll directions (Zhang and Sun, 2009; Cheng and Deng, 2011), and therefore may have a limited effect on the overall flight dynamics.

### Flight stabilization

Body motions during pitch manoeuvres were quite similar among these four sequences analyzed (Fig. 5). The averaged body kinematics (*N*=4) predicted by the dynamic model using fitted coefficients are shown in Fig. 11. In general, the dynamic model output closely fit the experimental recordings at an approximate , and K_{θ} of 7.2 mN ms mm^{–1}, 7490.4 mm mN ms rad^{–1} and 113.4 mm mN rad^{–1}, respectively; the dimensionless values (, and K^{+}_{θ}) are 2.5, 1.7 and 0.9, respectively. The fitted coefficients for individuals are listed in Table 3, revealing some among-individual variation but close fits between the data and the model in each case.

We then compared these values from the closed-loop PD controller analysis to the open-loop coefficients recovered from the dynamically scaled flapper. For example, the open-loop was 1.9 whereas the equivalent closed-loop term, , was 2.5, indicating that the moths relied largely on the passive FCF to slow down their body translation. However, the closed-loop (1.7) was much larger than the open-loop , which was almost negligible; therefore, is approximately equal to . This suggests that active modulation of wing kinematics to reduce the pitching velocity is critical in flight stabilization.

Next, we examined the moths' closed-loop flight stability by calculating the eigenvalues and the corresponding eigenvectors of the linear system (Eqn 20) (Table 4). We found that the closed-loop moth has three modes of motion. Mode 1 is marginally stable with respective to the position δ*x*. This is expected because we did not assume any control of the *x* position. Mode 2 is exponentially stable, and it is characterized by an in-phase coupling of and . Therefore, in this mode, the moth moves backwards when it is pitching up and forwards while pitching down. As has been shown, a backward motion creates a pitch-down torque, which acts to slow down the existing pitch-up velocity while a forward motion creates a pitch-up torque; this leads to a stable subsident motion. This mode also has an out-of-phase coupling of and δθ_{b}, which means that the angular velocity is always in the correct direction to return the pitch angle to its hover equilibrium. This is also mostly true for Mode 3, which has a near out-of-phase coupling of and δθ_{b}. However, Mode 3 is oscillatory and less stable than Mode 2. Also, Mode 3 has a near (but not completely) out-of-phase coupling of and ; therefore, the translational velocity mostly acts to increase the existing pitching velocity.

The passive (open-loop) dynamics, i.e. dynamics with , and K_{θ} equal to zero, were similar to those derived earlier (Sun and Xiong, 2005; Cheng and Deng, 2011). Without active control, Mode 2 is still exponentially stable, but Mode 3, which is stable and oscillatory in closed-loop dynamics, becomes unstable and oscillatory where the phase difference between and θ_{b} is smaller than 90 deg. This indicates that during most of the oscillation cycle, pitching velocity tends to pull the pitch angle away from its hover equilibrium.

To better demonstrate the effect of PD feedback control, we calculated the eigenvalues of the system for different combinations of and K^{+}_{θ}, and generated stability contours (Fig. 12). These show that Mode 2 is always stable, and its stability is greatly enhanced by increasing pitching velocity feedback (derivative feedback, ; Fig. 12A). Interestingly, the unstable oscillatory Mode 3 can be made stable without any proportional feedback (K^{+}_{θ}) by providing velocity feedback () >1.5 (Fig. 12B). However, stability is weak in this case, even with very large . The addition of pitch angle feedback allows Mode 3 to have relatively strong stability in the presence of velocity feedback. In addition, maximum stability is achieved for at approximately 2.5; further increases in will reduce stability.

### Effect of sensory latencies

Here we investigate the effect of sensory feedback delays on flight. The passive pitch damping is assumed to be 0.3 (dimensional value at 1329 mm mN ms rad^{–1}). The results are shown in Fig. 13. In particular, the predictions by the dynamic model using fitted coefficients for (τ_{θ}, ) of (1, 0.25) and (2, 0.5) are plotted in Fig. 11 together with the results for no sensory delays. From Fig. 13A,B, we can see that, in general, increasing pitch angle delay causes both pitch angle and velocity feedback to be stronger, as indicated by increasing K^{+}_{θ} and ; however, increasing pitch velocity delay reduces both angle and velocity feedbacks. In general, for pitch angle sensory delays of less than one wingbeat, the fitted coefficients were similar to those from the no-delay case.

Finally, we investigated system stability given sensory delays by using the coefficients obtained from the no-delay, medium-delay and large-delay cases. The RMS error of pitch angle was calculated for each case (Fig. 14). We found that, in general, the system can tolerate more sensory delay in pitch angle than in pitch velocity. This is especially apparent in coefficients obtained from the medium-delay and large-delay cases (Fig. 14B,C), where tolerance to angle delay is substantially increased but tolerance to velocity delay is reduced. The stability is generally greater with shorter delays. However, interestingly, a small amount of velocity delay can enhance the stability (e.g. when τ_{θ}<2 and Fig. 14B).

## DISCUSSION

In this study we combined measurement of free-flight recordings of startled hawkmoths (i.e. closed-loop, actively controlled flight behaviour) with open-loop or passive control coefficients measured in a dynamically scaled flapper to reveal how these animals produce and control a flight manoeuvre.

### Source of manoeuvring pitch torque

We found that the hawkmoths produced pitch torques *via* bilateral changes to the mean spanwise rotation angle of the wing, a mechanism similar to the unilateral changes to the mean wing angle of attack reported for fruit flies performing yaw turns (Bergou et al., 2010). This is a somewhat unexpected mechanism, as changes to the mean wing position with respect to the COM have previously been implicated in the pitch manoeuvres of insects (e.g. Ellington, 1984). One possible explanation is that, as discussed in Taylor (Taylor, 2001), while creating pitch torque, this method may shift the total force vector in the opposite direction of pitching (e.g. pitch-up torque coupled with a forward tilt of force). In contrast, bilateral changes to the mean rotation angle shift of force to the same direction of pitching (e.g. pitch-up torque coupled with a backward tilt of force; Figs 9, 10). In the current flight scenario, in which the moths were executing a rearward evasion manoeuvre, a pitch-up torque and backward tilt of force is more effective than a pitch-up torque and forward tilt of force on producing such manoeuvres.

As indicated earlier, the variation in mean rotation angle alone was not enough to produce the pitch torque required to manoeuvre. The additional torque was likely provided by a mix of additional mechanisms. For instance, moths also changed the wing stroke/deviation angles at stroke reversals and stroke plane inclination angles relative to the body. These changes might create both pitch and linear accelerations. However, those changes were more varied among moths than those in mean rotation angle and were sometimes inconsistent between the left and right wings of the same individual. Therefore, they are difficult to quantify and analyze systematically. Another possible source of pitch torque is abdominal flexion, which could result in net torque by changing the location of the animal's average COM with respect to the centre of pressure on the wings (below).

### Closed-loop control inputs and stability

We revealed that, in the manoeuvres recorded here, the moths largely relied on passive damping to control their rearward velocity, demonstrated by the similarity of the open-loop coefficient and closed-loop coefficient . In contrast, similar comparisons of open- and closed-loop coefficients demonstrated that the moths actively control their pitch orientation *via* proportional feedback based on pitch angle and derivative feedback based on pitch angular velocity, with derivative feedback predominating. These results generally match our initial hypotheses developed from previous studies, which report that hovering insect flight is unstable in open-loop conditions (e.g. Sun and Xiong, 2005) and that angular velocity sensors likely operate with lower latency than visual angular position sensing (e.g. Sane et al., 2007; Sprayberry, 2009).

Our stability analysis also revealed that, given sufficient derivative feedback, the moth could stabilize its pitch without use of proportional feedback, but that incorporating both modes substantially increased stability. Thus, although a D-only controller might be sufficient in this case, the PD controller supported by the data provides additional stability. PD controllers have also been described for other animal locomotion tasks, including wall-following in cockroaches (Cowan et al., 2006). However, P-only controllers have been identified for some flight tasks, including *Drosophila* forward flight speed control (Rohrseitz and Fry, 2011) and locust pitch control (Taylor and Thomas, 2003). Our analysis shows that a P-only controller would not be stable without substantially greater open-loop pitch velocity damping () than was found in the dynamically scaled flapper.

### Effects of latency on control coefficient estimates and stability

In re-computing the closed-loop flight dynamics coefficients with different assumed sensory delays, we found that increasing the sensory delay parameters increased the magnitude of the coefficients required for the best fit to the observed data (Fig. 13). Plausible sensory delays of one to two wingbeats in sensing pitch angle increased the estimated linear velocity closed-loop coefficient , pushing it beyond what would be provided by the open-loop response, potentially changing our conclusion as to the necessity of active control of linear velocity. However, we also found that increasing the sensory delays above 1.5 wingbeats reduced the quality of the fit to the experimental data (Fig. 13D), suggesting that actual sensory delays may be less than this.

The second part of our latency investigation – assessing the stability of the closed-loop dynamics (using three different sets of fitted coefficients) in the presence of sensory delay – showed that the moth PD controller is rather insensitive to sensory delay, particularly delay in the proportional component. When stronger feedback control is used (corresponding to the coefficients fitted with larger delays; Fig. 14C), the PD controller becomes less sensitive to the delay in proportional components but more sensitive to the delay in derivative components. In this case, sensory delays of up to 2.7 wingbeats in the proportional control input and 0.65 wingbeats in the derivative input still resulted in stable flight behaviour, as might be expected for the flight control responses of an animal that experiences varying visual sensory delays based on light levels (Theobald, 2004).

The effects of sensory latency are also influenced by the strength of open-loop damping. Different studies have reported varying magnitudes for the open-loop pitch velocity damping coefficient . Using Eqn 19, we found to be equal to –0.22, larger than the –0.03 reported by Sun and Wang (Sun and Wang, 2007) for *Drosophila* but smaller than the –0.62 reported by Gao et al. (Gao et al., 2009) for hawkmoths. Note that because of the varying non-dimensionalization schemes, we first re-dimensionalized the values from these other studies and then non-dimensionalized them in the scheme used here. The source of these differences in is unclear, but even the larger coefficients are still less than the closed-loop of 1.7 reported here, so the conclusion that the moths employ active control based on pitch velocity remains unchanged. However, larger values for do further enhance the robustness of the PD controller to sensory delay.

### Abdominal flexion and pitch control

Our analysis treats the moth as a rigid body, but flying insects, including *M. sexta*, are widely known to change their body configuration in flight (e.g. Kammer, 1971). In these experiments, the hawkmoths were observed to flex their abdomen in the body's longitudinal (*x*_{b}–*z*_{b}) plane. Specifically, abdominal flexion was closely correlated with pitch angle (at a lag of approximately 20 ms or 0.5 wingbeats), with the abdomen flexed upwards when the moth was pitched upwards and downwards when the moth was pitched downwards. Thus, it is likely that abdominal flexion plays a role in producing the K_{θ} closed-loop response, in conjunction with the previously discussed changes in wing kinematics. However, the exact effects of abdominal flexion on flight dynamics are less clear and likely include both static and dynamic components. Statically, the flexion may change the location of the COM in the longitudinal plane; dynamically, the flexion causes relative motion between the thorax and the abdomen, potentially helping to change the orientation of the thorax and attached wings. The exact effects of abdominal flexion and the contribution of static and dynamic effects on flight control bear further investigation.

### Future work

The general approach used here – the combination of open-loop aerodynamic derivatives derived from mechanical or computational fluid simulation and closed-loop flight behaviour recorded from freely flying animals in a single study – will be extended to other, more complicated manoeuvres and control problems. This may require the application of non-linear control models to account for within-wingbeat dynamics and coupling between yaw, pitch and roll modes. It would also be interesting to examine cases where animals fail to control their flight. For instance, hawkmoths without antennae are observed to pitch backwards while hovering and then fail to pitch forwards again in time to avoid crashing (Sane et al., 2007). Extracting closed-loop coefficients from these events could validate the open-loop models by showing that the dynamics of uncontrolled flyers match those predicted by open-loop coefficients. Experiments manipulating sensory latencies should also prove informative by showing whether the moths alter their control strategy to maintain a similar stability margin in different circumstances.

## LIST OF SYMBOLS AND ABBREVIATIONS

- AR
wing aspect ratio

- c
local wing chord length

mean wing chord length

- E
Young's modulus

- EI
flexural stiffness

- F
force

- g
gravitational acceleration

- H()
Heaviside function

- I
_{yy}body moment of inertia about the pitch axis

- J
advance ratio

- K
_{θ}coefficient of proportional feedback of pitch angle

combined coefficient of passive damping and derivative feedback of pitch angular velocity

coefficient of derivative feedback of pitch angular velocity

combined coefficient of passive damping and derivative feedback of translational velocity

coefficient of derivative feedback of translational velocity

coefficient of pitching torque resulted from body translation

distance between wing base and centre of mass

- M
pitch torque

*m*_{b}body mass

damping coefficient (stability derivative) due to pitch angular velocity

- n
wing flapping frequency

- R
wing length

*r*_{1}and*r*_{2}non-dimensional wingspan locations

non-dimensional radius of the second moment of wing area

- Re
Reynolds number

- S
wing area

- t
dimensional time

dimensionless time

- T
simulation time

*t*_{w}wing thickness

*v*_{b}body translational velocity

mean wing flapping velocity

- x
body position in fore/aft direction

body velocity in fore/aft direction

body acceleration in fore/aft direction

- X
fore/aft force

damping coefficient (stability derivative) due to translational velocity

- θ
wing stroke deviation

- θb
body pitch angle

body pitch velocity

body pitch acceleration

body pitch angle at hover

- ρ
fluid/air density

- τ
torque

pitch velocity delay

- τθ
pitch angle delay

- υ
kinematic viscosity of the fluid

- φ
wing stroke position

- Φ
wing flapping amplitude

- ψ
wing rotation angle

- ψadd
magnitude of variation in mean rotation angle

## FOOTNOTES

FUNDING

Funding was provided by the National Science Foundationc [NSF CMMI-1100764 to X.D. and NSF IOS-0920358 to T.L.H.].

## Acknowledgements

We thank Alice Robinson for assistance with the moth recordings, Michael Gardner for digitizing some of the moth kinematics and Ellis Driver for help with the figures.