MODELING AND CONTROL OF A FLAPPING WING MICRO AIR VEHICLE

A Thesis

Presented in Partial Fulfillment of the Requirements for the Degree Master of Science in the Graduate School of The Ohio State University

By

Pratik Vernekar, B.Tech.

Graduate Program in Electrical and Computer Engineering

The Ohio State University

2012

Master’s Examination Committee:

Prof. Andrea Serrani, Advisor Prof. Kevin M. Passino c Copyright by

Pratik Vernekar

2012 Abstract

In this thesis we propose a new wingbeat control strategy with amplitude modu-

lation and time-rescaling for a six-degree-of-freedom flapping-wing micro air vehicle

(MAV) model. Implementation of the amplitude modulation and time-rescaling is dis-

cussed, and modifications to the wingbeat forcing function are made to maintain con-

tinuity of the wing position. Cycle-averaged forces and moments, and cycle-averaged

control derivatives are computed to derive nonlinear and linear control design models

(CDMs) of the MAV. The proposed wingbeat control strategy is capable of generating

non-zero cycle-averaged x-body and z-body axis forces, and non-zero cycle-averaged rolling, pitching, and yawing moments. A thorough analysis of all possible output candidates is done based on the conditions of vector relative degree and internal dy- namics of the linear CDM. Finally for the selected outputs, a controller is designed based on the normal form of the linear CDM. The controller is first tested on the non- linear CDM, and finally on two higher-fidelity instantaneous blade-element models.

One simulation model is based on the actual values of the vehicle parameters, while the other is based on the perturbed values where parametric uncertainties are taken into consideration. Simulation results indicate that the proposed controller is robust to parametric uncertainties and modeling errors introduced by the cycle-averaged control-oriented model.

ii This work is dedicated to my parents

iii Acknowledgments

First of all I would like to thank my advisor Professor Andrea Serrani, for opening his door to me when I first arrived at OSU; for letting me work simultaneously on two different but interesting projects; for always making time to discuss my research; for his invaluable insights, ideas and suggestions; for being such a great teacher; and most importantly for being an excellent guide and mentor.

Then I would like to thank Professor Kevin Passino for his patience and guidance throughout the course development project. Through him I have learned to formulate and solve problems effectively, and have become a better overall thinker. I would also like to thank Zhongkui Wang for being an excellent colleague, for the wonderful discussions on various topics, and for his constant help and support throughout my master’s.

I would like to thank my friends Kishore, Taha, Abhijit, Mubarak, Siddharth, and

Ketan for making the learning experience at OSU fun and enjoyable. I would also like to thank all my roommates past and present for their various helps.

I would like to thank my brother Varad for his guidance, help, and support and for inspiring me to pursue graduate studies in the US. Finally I would like to thank my parents without whom, I would not have come all this way. I am forever indebted to them for everything they have done for me.

iv Vita

April 6, 1987 ...... Born - Pune, India

2009 ...... B.Tech. Electrical Engineering

2011-present ...... Graduate Research and Teaching Asso- ciate, The Ohio State University.

Fields of Study

Major Field: Electrical and Computer Engineering

v Table of Contents

Page

Abstract...... ii

Dedication...... iii

Acknowledgments...... iv

Vita...... v

ListofTables...... ix

ListofFigures ...... x

1. Introduction...... 1

2. VehicleModel...... 5

2.1 VehicleFeatures ...... 6 2.2 Instantaneous Blade-Element Model ...... 8 2.2.1 Instantaneous Aerodynamic Forces and Centers of Pressure inWingPlanformFrames ...... 9 2.2.2 Instantaneous Aerodynamic Forces and Centers of Pressure intheBodyFrame...... 9 2.2.3 Instantaneous Aerodynamic Moments in the Body Frame . 12 2.3 Wingbeat Forcing Function with Amplitude Variation and Time- Rescaling ...... 13

3. Averaging ...... 22

3.1 Cycle-AveragedForcesandMoments ...... 28 3.1.1 X-BodyAxisForce...... 28

vi 3.1.2 Y -BodyAxisForce...... 29 3.1.3 Z-BodyAxisForce...... 30 3.1.4 Rolling Moment ...... 31 3.1.5 PitchingMoment...... 33 3.1.6 YawingMoment ...... 36 3.2 Summary ...... 38

4. ControlDerivatives...... 39

4.1 Aerodynamic Control Derivatives about Hover ...... 40 4.1.1 X-Body Axis Force Control Derivatives about Hover . . . . 40 4.1.2 Y -Body Axis Force Control Derivatives about Hover . . . . 41 4.1.3 Z-Body Axis Force Control Derivatives about Hover . . . . 41 4.1.4 Rolling Moment Control Derivatives about Hover ...... 44 4.1.5 Pitching Moment Control Derivatives about Hover . . . . . 45 4.1.6 Yawing Moment Control Derivatives about Hover ...... 48 4.2 ControlEffectivenessMatrix...... 49

5. ControlDesignModels...... 51

5.1 EquationsofMotion ...... 51 5.2 NonlinearControlDesignModel(CDM)oftheMAV ...... 52 5.3 HoverFrequency ...... 53 5.4 LinearControlDesignModel(CDM)oftheMAV ...... 54

6. ControllerSynthesis ...... 59

6.1 OutputSelection ...... 59 6.2 NormalForm ...... 62 6.3 ControllerDesign...... 67 6.3.1 Linear Quadratic Integral Controller for the (x, u)-Subsystem 68 6.3.2 Linear Quadratic Integral Controller for the (y, v, ψ, r)- Subsystem ...... 70 6.3.3 Linear Quadratic Integral Controller for the (z, w, θ, η)- Subsystem ...... 73 6.3.4 Linear Quadratic Integral Controller for the (φ, p)-Subsystem 75

7. SimulationResults ...... 78

7.1 Simulation 1: Nominal Blade-Element Simulation ...... 79 7.2 Simulation 2: Perturbed Blade-Element Simulation ...... 85

vii 8. Conclusions ...... 90

Bibliography ...... 92

viii List of Tables

Table Page

6.1 FilterParameters ...... 77

7.1 Vehicle Parameters (taken from Doman et al. [1]) ...... 79

ix List of Figures

Figure Page

2.1 General structure and design features of a flapping-wing micro air ve- hicle (taken from Oppenheimer et al. [2])...... 7

2.2 Co-ordinate frames of the body, inertial, root, spar, and planform of right and left wings of the MAV on upstroke (taken from Doman et al. [3])...... 7

2.3 The wingbeat forcing function µ(λ) vs λ, with different amplitudes for theupstrokeanddownstroke...... 16

2.4 The wingbeat forcing function µ(λ) vs λ, with continuous wing position. 18

3.1 Plots of I1(aRW 2), I2(aRW 1), I3(aRW 2), I4(aRW 2), I5(aRW 1), I6(aRW 2), I13(aRW 2), and I46(aRW 2)...... 26

7.1 DesiredtrajectoryoftheMAV...... 81

7.2 Vehicle position for the nominal blade-element simulation...... 81

7.3 Vehicle attitude for the nominal blade-element simulation...... 82

7.4 Tracking errors for the nominal blade-element simulation...... 82

7.5 Translational and angular velocities for the nominal blade-element sim- ulation...... 83

7.6 Control inputs for the nominal blade-element simulation...... 83

7.7 Magnified plots of the control inputs uRW and aRW 1 for the nominal blade-elementsimulation...... 84

x 7.8 Magnified plots of the pitch angle θ and angular velocity q for the nominal blade-element simulation...... 84

7.9 Vehicle position for the perturbed blade-element simulation...... 86

7.10 Vehicle attitude for the perturbed blade-element simulation...... 87

7.11 Tracking errors for the perturbed blade-element simulation...... 87

7.12 Control inputs for the perturbed blade-element simulation...... 88

7.13 Magnified plots of the control inputs uRW and aRW 1 for the perturbed blade-elementsimulation...... 88

xi NOMENCLATURE

CD(·), CD(·) = right and left wing drag coefficients

CL(·), CL(·) = right and left wing lift coefficients

DuRW (t), DuLW (t) = drag forces for right and left wings = during upstroke

DdRW (t), DdLW (t) = drag forces for right and left wings = during downstroke

LuRW (t), LuLW (t) = lift forces for right and left wings = during upstroke

LdRW (t), LdLW (t) = lift forces for right and left wings = during downstroke B B FuRW (t), FdRW (t) = right wing upstroke and downstroke aerodynamic force vectors in the body frame B B FuLW (t), FdLW (t) = left wing upstroke and downstroke aerodynamic force vectors in the body frame B B MuRW (t), MdRW (t) = right wing upstroke and downstroke aerodynamic moment vectors in the body frame B B MuLW (t), MdLW (t) = left wing upstroke and downstroke aerodynamic moment vectors in the body frame B B RRW R, RLW R = rotation matrices from right and left wing root frames to the body frame RW R LW R RRW S , RLWS = rotation matrices from right and left wing spar frames to right and left wing root frames

xii RW S LWS RuRWP , RuLWP = rotation matrices from right and left wing planform upstroke frames to right and left wing spar frames RW S LWS RdRW P , RdLWP = rotation matrices from right and left wing planform downstroke frames to right and left wing spar frames B B rcpuRW , rcpuLW = center of pressure locations during upstroke for right and left wings in the body frame B B rcpdRW , rcpdLW = center of pressure locations during downstroke for right and left wings in the body frame B B ∆rR, ∆rL = position vectors from the origin of the body axis coordinate system to origins of the right and left wing root coordinate systems ¯B ¯B FxRW , FxLW = right and left cycle-averaged x-body axis forces ¯B ¯B FyRW , FyLW = right and left cycle-averaged y-body axis forces ¯B ¯B FzRW , FzLW = right and left cycle-averaged z-body axis forces ¯ B ¯ B MxRW , MxLW = right and left cycle-averaged moments about the x-body axis ¯ B ¯ B MyRW , MyLW = right and left cycle-averaged moments about the y-body axis ¯ B ¯ B MzRW , MzLW = right and left cycle-averaged moments about the z-body axis WP WP T [xcp ,ycp , 0] = location of wing center of pressure in local wing planform frame

IA = area moment of inertia of wing planform about wing root

xiii α = angular displacement of the planform about the passive rotation hinge joint, which is equivalent to wing angle-of-attack in still air ρ = atmospheric density w = vehicle width

ωRW , ωLW = right and left wing fundamental frequencies

ω0 = trim frequency

µuRW , µuLW = wingbeat forcing functions for right and left wings during upstroke

µdRW , µdLW = wingbeat forcing functions for right and left wings during downstroke

δRW , δLW = phase shifts for right and left wings

xiv Chapter 1

INTRODUCTION

Modeling, control, and fabrication of flapping-wing micro air vehicles (MAVs) has received a great deal of interest in the past decade due to their potential to mimic

flight behavior and maneuverability of insects [4, 5, 6, 7, 8, 2, 9]. This ability would enable flapping-wing MAVs to perform missions such as real-time intelligence, surveil- lance, and reconnaissance in indoor and urban environments, that fixed or rotary-wing

MAVs are unable to perform due to their susceptibility to environmental distur- bances. Achieving these kinds of biologically-inspired behaviors on robotic MAVs is a formidable task, which currently faces several significant challenges. Among the most significant are: difficulties in predicting the unsteady aerodynamics, issues related to micro-fabrication, constraints imposed by available micro-technology for actuation and sensing, the necessity of using as few actuators as possible to reduce the weight and volume of existing flapping-wing MAVs while achieving a high level of controlled maneuverability, developing control-oriented models of suitable fidelity and stability analysis of the MAVs [10].

Several of the above challenges have started to be addressed in literature. Dick- inson and G¨otz [11] have studied the unsteady aerodynamics of model wings at low

Reynolds numbers. While flapping-wing aerodynamics are complex [12, 13, 14, 15, 16],

1 researchers have designed and fabricated flapping-wing MAVs that generate lift and

thrust [4, 8, 7, 6, 17, 9]. Some of the challenges involved in the design and fabrication

of MAVs have been overcome to some degree [8, 6, 17]. However critical problems in

control and stability of MAVs remain open.

The goal of this thesis is to derive a control design model of suitable fidelity and thus develop a controller that is robust to parametric uncertainties and unsteady aerodynamic effects. Flapping wing flight requires periodically varying actuation, which gives rise to time-varying models which are complicated from a control point of view. To overcome this problem we develop a control-oriented model based on a cycle-averaged representation of the aerodynamic forces and moments which is similar to those found in literature [5, 18, 19, 2, 7, 20]. Most of the control strategies reported in literature use control appendages to alter the center of gravity of the vehicle, in addition to the use of wing-flip timing and mean angle of attack as control variables

[5, 18, 19, 7, 21], which increases the complexity of the model. The hierarchical

flight control architecture introduced by Deng et al. [7] required four actuators.

Doman et al. [5] used split-cycle constant-period frequency modulation (SCCPFM) along with a bob weight to control the unsteady flapping-wing MAV model using three actuators. To reduce the weight and complexity of the model, Doman et al.

[2, 22, 23] in their more recent work use SCCPFM with wing bias instead of the bob weight, resulting in two physical actuators: one to control the position of each wing. However the wingbeat flapping mechanism used to implement this control strategy is very complex. Also the computations associated with the cycle-averaged aerodynamic forces and moments for this approach are very intricate, resulting in a sophisticated controller. To overcome this problem we propose a new wingbeat

2 control strategy with amplitude modulation and time-rescaling. The wingbeat forcing function that we use has different amplitudes for up and downstrokes of each cycle which are treated as control variables. Also the time period of each cycle is not constant and is regulated by the derivative of the phase shift which is treated as a control variable. Using this approach the computations associated with the cycle- averaged aerodynamic forces and moments are significantly reduced. Also this control strategy is capable of generating non-zero cycle averaged x-body, and z-body axis forces, and non-zero cycle averaged rolling, pitching, and yawing moments, using only two physical actuators, thus eliminating the need for a bobweight or SCCPFM with wing bias.

In the method proposed in this thesis, the derivatives of the cycle-averaged forces and moments with respect to the control variables are computed at hover to form a control effectiveness matrix that can be used for control synthesis, which is similar to the method employed by Doman et al. [2, 5, 23]. The control effectiveness matrix and the 6-DOF rigid body equations of motion of a standard aircraft are used to derive the nonlinear control design model (CDM) of the flapping-wing MAV. The nonlinear CDM of the MAV is linearized about the hover condition to obtain the linear CDM of the MAV. A thorough analysis of all possible outputs that can be used for controller synthesis is done, and finally the three inertial positions (x, y, z) and the roll angle (φ) are selected as outputs, since the linearized model of the system has vector relative degree and the internal dynamics [24] of the system is stabilizable for the chosen outputs. The linear CDM of the MAV is transformed to the normal form [24] for the chosen outputs. The normal form is then decoupled into four subsystems each consisting of one out of the four selected outputs. Four linearly

3 independent inner loop linear quadratic integral (LQI) controllers with appropriate

filters are designed for the four subsystems. A co-ordinate transformation that uses a

pseudo-inverse matrix which is directly related to the control effectiveness matrix is

used to obtain the final outer loop control law. The controller thus designed based on

the linear CDM of the MAV is first tested on the nonlinear CDM. After verifying that

satisfactory performance is attained on the nonlinear CDM, the controller is finally

tested on a higher fidelity instantaneous blade-element model of the MAV developed

by Doman et al. [2, 5, 23]. We consider two simulation models. One simulation model

is based on the actual values of the vehicle parameters, while the other is based on

the perturbed values where uncertainties or variations in the mass, angle of attack,

lift, and drag of the MAV are taken into consideration. Simulation results indicate

that the proposed controller is robust to some degree to parametric uncertainties and

modeling errors introduced by the cycle-averaged control-oriented model.

The thesis is organized as follows: in Chapter II the instantaneous-blade ele- ment model of the MAV is introduced and the new wingbeat control strategy with amplitude modulation and time-rescaling is presented; the cycle-averaged aerody- namic forces and moments are evaluated in Chapter III; the control derivatives and the control effectiveness matrix are computed in Chapter IV; Chapter V presents the nonlinear and linear CDMs of the MAV; the controller synthesis is described in

Chapter VI and the corresponding simulation results are presented in Chapter VII.

Finally, we conclude in Chapter VIII with a brief summary of the results.

4 Chapter 2

VEHICLE MODEL

The vehicle considered in this work is the one given by Oppenheimer, Doman, and

Sigthorsson in [2, 22]. It is similar to the Harvard RoboFly that accomplished the

first takeoff of an insect scale flapping wing aircraft [8]. However, the main difference is that the vehicle considered in [2, 22] is equipped with independently actuated wings and the vehicle center-of-gravity can be manipulated for control purposes. In their earlier work, Doman et al. [3, 5] used a bob weight to manipulate the vehicle center- of-gravity and thus generate pitching moment. Thus, it required three actuators, two actuators to control the position of the right and left wing, and one to control the bob- weight. In their more recent work [2], Oppenheimer et al. present a control strategy that yields controlled 6-DOF flight of the vehicle using two physical actuators: one to drive the position of each wing. This is accomplished by using a wingbeat forcing function based on a split-cycle constant period frequency modulation technique with wing bias. The bias has the effect of shifting the cycle-averaged center-of-pressure location of each wing, relative to the center of gravity, and provides the ability to manipulate the cycle-averaged pitching moment. With this technique, the need for a bobweight and its actuator used in their earlier work [5] is eliminated, resulting in significant weight and complexity savings. In our work, instead of using split-cycle

5 constant period frequency modulation technique with wing bias, we use a wingbeat

forcing function with different amplitudes for up and downstrokes. Using this ap-

proach, the computations and the complexities associated with them are significantly

reduced and the desired cycle-averaged forces and moments are also obtained.

2.1 Vehicle Features

Figure 2.1 shows the general structure of the flapping-wing micro air vehicle

(MAV) used in this work [2, 22]. A detailed information about the vehicle, including the design features and discussions on important parts of the vehicle is given in [3, 5].

Here, we give a summary of the main features of the vehicle dynamics, and provide an analysis of the control forces which are produced by the chosen actuation method.

The dynamic analysis of the vehicle requires the use of several co-ordinate frames.

Figure 2.2 shows all the co-ordinate frames of the MAV used for modeling purpose

[3, 21]. It is important to note here that the x-body axis is pointing upwards, and the z-body axis is pointing towards the ventral side, whereas in the case of a standard aircraft the x-body axis is pointing towards the ventral side, and the z-body axis is pointing downwards. The y-body axis remains the same in both the cases. This is the main difference between the co-ordinate frames used in this work and a standard aircraft used in literature [25]. The co-ordinate frame and angle definitions, and the rotation matrices used in the modeling of the vehicle are given by Doman et al. [3, 21].

6 Figure 2.1: General structure and design features of a flapping-wing micro air vehicle (taken from Oppenheimer et al. [2]).

Figure 2.2: Co-ordinate frames of the body, inertial, root, spar, and planform of right and left wings of the MAV on upstroke (taken from Doman et al. [3]).

7 2.2 Instantaneous Blade-Element Model

In this section we present expressions for the instantaneous aerodynamic forces and moments in the body frame using blade-element theory [2]-[5]. These instan- taneous aerodynamic forces and moments are later used to compute cycle-averaged aerodynamic forces and moments, and thus the development of the control-oriented cycle-averaged blade-element model of the MAV. Our main purpose behind the de- velopment of the control-oriented model is to derive an idealized model of suitable

fidelity, which will allow one to study the dynamic behavior of the MAV, provide a relationship between the controllability and the design parameters of the MAV, and ultimately design a controller which is robust to modeling approximations and other uncertainties which are not taken into consideration while developing the control- oriented model. The key assumptions made in the formulation of this analytical control-oriented model are given in [2, 3, 5]. An important feature of this control- oriented model is the ability to analytically compute the cycle-averaged control deriva- tives for use in the control law, which would be computationally very complex using a higher-fidelity model based on computational fluid dynamics (CFD) or finite element analysis (FEA). It is important to note that the control-oriented cycle-averaged model is solely used for controller design and stability analysis. The controller thus designed for the control-oriented model is then tested on a higher-fidelity model that includes an instantaneous blade-element estimate of the aerodynamic forces and moments due to the flapping wings. The 6-DOF equations of motion, which determine the state of the vehicle during simulation, are driven by the instantaneous forces and moments from the higher-fidelity model.

8 2.2.1 Instantaneous Aerodynamic Forces and Centers of Pres- sure in Wing Planform Frames

The instantaneous aerodynamic forces are derived using blade-element theory, for triangular shaped planform wings that have two degrees of freedom, namely, angular displacement, µ(t), about the wing root in the stroke plane, and angular displacement

of the planform about the passive rotation hinge joint, which is equivalent to wing

angle-of-attack, α, in still air [3]. The lift and drag, produced by each wing can be expressed as a product of time invariant parameters and time varying functions [3]

2 2 L = kLµ˙ (t) D = kDµ˙ (t) (2.1)

where ρ ρ kL , CL(α)IA kD , CD(α)IA (2.2) 2 2

and IA is the area moment of inertia of the planform about the axis of the root-

hinge, ρ is the atmospheric density, and CL(α) and CD(α) are the lift and drag

coefficients. Empirical expressions for lift and drag coefficients, obtained from low-

Reynolds-number experiments [26] are

CL(α)=0.225+1.58 sin(2.13α − 7.2) (2.3) CD(α)=1.92 − 1.55 cos(2.04α − 9.82)

where α is in degrees.

2.2.2 Instantaneous Aerodynamic Forces and Centers of Pres- sure in the Body Frame

The instantaneous values of lift and drag on each wing are transformed into the

body-axis co-ordinate frame. Lift and drag forces expressed in spar coordinate frames,

can be transformed to the body frame by using the relationships between the body,

9 roots, spars, upstroke-planform, and downstroke-planform axis systems defined in

Doman et al. [3]. The aerodynamic force vectors associated with each wing and stroke in the local spar frame [2, 3]

DuRW −DdRW FRW S = 0 FRW S = 0 uRW   dRW   −LuRW −LdRW (2.4) −DuLW   DdLW  FLWS = 0 FLWS = 0 uLW   dLW   −LuLW −LdLW     can be transformed to the body frame by using the following transformation

B B RW R RW S B B RW R RW S FuRW = RRW RRRW S FuRW FdRW = RRW RRRW S FdRW (2.5) B B LW R LWS B B LW R LWS FuLW = RLW RRLWS FuLW FdLW = RLW RRLWS FdLW

B RW R B LW R where RRW R, RRW S , RLW R, and RLWS are rotation matrices used for the above co-ordinate frame transformation [3]. The aerodynamic force vectors associated with each wing in the body frame are [2, 3]

LuRW LdRW B B F = −DuRW sin µuRW (t) F = DdRW sin µdRW (t) uRW   dRW   DuRW cos µuRW (t) −DdRW cos µdRW (t) (2.6)  LuLW   LdLW  FB = D sin µ (t) FB = −D sin µ (t) uLW  uLW uLW  dLW  dLW dLW  DuLW cos µuLW (t) −DdLW cos µdLW (t)     The center of pressure on each wing in the local wing planform frame is transformed to the body frame by three coordinate frame rotations and one translation. One rotation is trivial because the root and body systems are parallel. The translation is associated with the distance between the origin of the body frame and the origin of each wing root frame. The center of pressure locations for each wing and stroke in

10 the body frame can be obtained by using the following transformation [3]

B B RW R RW S uRWP B rcpuRW = RRW RRRW S RuRWP rcpuRW + ∆rR

B B RW R RW S dRW P B rcpdRW = RRW RRRW S RdRW P rcpdRW + ∆rR (2.7) B B LW R LWS uLWP B rcpuLW = RLW RRLWS RuLWP rcpuLW + ∆rL

B B LW R LWS dLWP B rcpdLW = RLW RRLWS RdLWP rcpdLW + ∆rL

B B where ∆rR and ∆rL are position vectors from the origin of the body axis coordinate

system to origins of the right and left wing root coordinate systems, respectively, i.e.

B , B w B ∆rR ∆xR 2 ∆zR (2.8) B ,  B w B ∆rL ∆xL − 2 ∆zL where w is the width of the vehicle, and the origin of the body axis coordinate system

is assumed to be located at the midpoint of the fuselage in the y-body axis direction.

Using Eq.(2.7) and Eq.(2.8), centers of pressure of right and left wings for each stroke,

can be expressed in the body frame as [2, 3]

WP B xcp sin α + ∆xR B WP WP w rcpuRW = xcp sin µuRW cos α + ycp cos µuRW + 2  WP WP B −xcp cos µuRW cos α + ycp sin µuRW + ∆zR  WP B  xcp sin α + ∆xR B WP WP w rcpdRW = −xcp sin µdRW cos α + ycp cos µdRW + 2  WP WP B x cos µdRW cos α + y sin µdRW + ∆z cp cp R (2.9)  WP B  xcp sin α + ∆xL B WP WP w rcpuLW = −xcp sin µuLW cos α − ycp cos µuLW − 2  WP WP B  −xcp cos µuLW cos α + ycp sin µuLW + ∆zL  WP B  xcp sin α + ∆xL B WP WP w rcpdLW = xcp sin µdLW cos α − ycp cos µdLW − 2  WP WP B  xcp cos µdLW cos α + ycp sin µdLW + ∆zL   WP WP In the above equation, xcp and ycp are the center of pressure locations for each

wing in their respective local wing planform co-ordinate frame [3].

11 2.2.3 Instantaneous Aerodynamic Moments in the Body Frame

The instantaneous aerodynamic moments associated with each wing and stroke can be computed by using the following expressions

B B B MuRW = rcpuRW × FuRW

B B B MdRW = rcpdRW × FdRW (2.10) B B B MuLW = rcpuLW × FuLW

B B B MdLW = rcpdLW × FdLW By substituting Eq.(2.9) and Eq.(2.6) in Eq.(2.10) and carrying out the cross product operations the instantaneous aerodynamic moments of right and left wings for each stroke can be written as [2, 3]

WP w B DuRW (ycp + 2 cos µuRW + ∆zR sin µuRW ) WP B B {LuRW (ycp sin µuRW + ∆zR ) − DuRW ∆xR cos µuRW ... B  WP  MuRW = −(LuRW cos α + DuRW sin α)xcp cos µuRW } (2.11) B w WP  {−DuRW ∆x sin µuRW − LuRW ( + y cos µuRW )...   R 2 cp   −(L cos α + D sin α)xWP sin µ }   uRW uRW cp uRW    WP w B −DdRW (ycp + 2 cos µdRW + ∆zR sin µdRW ) WP B B {LdRW (ycp sin µdRW + ∆zR )+ DdRW ∆xR cos µdRW ... B  WP  MdRW = +(LdRW cos α + DdRW sin α)xcp cos µdRW } (2.12) B w WP  {DdRW ∆x sin µdRW − LdRW ( + y cos µdRW )...   R 2 cp   +(L cos α + D sin α)xWP sin µ }   dRW dRW cp dRW   WP w B  DuLW (−ycp − 2 cos µuLW − ∆zL sin µuLW ) WP B B {LuLW (ycp sin µuLW + ∆zL ) − DuLW ∆xL cos µuLW ... B  WP  MuLW = −(LuLW cos α + DuLW sin α)xcp cos µuLW } (2.13) B w WP  {DuLW ∆x sin µuLW + LuLW ( + y cos µuLW )...   L 2 cp   +(L cos α + D sin α)xWP sin µ }   uLW uLW cp uLW   WP w B  DdLW (ycp + 2 cos µdLW + ∆zL sin µdLW ) WP B B {LdLW (ycp sin µdLW + ∆zL )+ DdLW ∆xL cos µdLW ... B  WP  MdLW = +(LdLW cos α + DdLW sin α)xcp cos µdLW } (2.14) B w WP  {−DdLW ∆x sin µdLW + LdLW ( + y cos µdLW )...   L 2 cp   −(L cos α + D sin α)xWP sin µ }   dLW dLW cp dLW   

12 2.3 Wingbeat Forcing Function with Amplitude Variation and Time-Rescaling

In this section a new wingbeat control strategy is presented, that is capable of generating non-zero cycle averaged x-body, and z-body axis forces, and non-zero cycle averaged rolling, pitching, and yawing moments, using only two physical actuators.

The new control strategy that is proposed to produce the desired behavior, uses a wingbeat forcing function with amplitude variation, wherein the wingbeat function has different amplitudes for up and downstrokes of each cycle which are treated as control variables. Also the time period of each cycle is not constant and is regulated by the derivative of the phase shift which is treated as a control variable. The wingbeat forcing function, µu(t), that drives the rotation of each wing on the upstroke is

µu(t)= a1(k) sin(ω0t + ∆(t)) (2.15)

and the wingbeat forcing function, µd(t), that drives the rotation of each wing on the

downstroke is

µd(t)= a2(k) sin(ω0t + ∆(t)) (2.16)

where ω0 > 0 is a constant carrier frequency, a1(k) and a2(k), are amplitudes for the

upstroke and downstroke, where, 0 ≤ a1(k) ≤ 1; 0 ≤ a2(k) ≤ 1. Also k > 0 is the

cycle number which takes integer values, i.e. [k = 1, 2, 3, ....]. ∆(t) is a phase shift

which can also be written as ∆(t)= ω0δ(t). The amplitudes, a1(k) and a2(k), for up

and downstrokes are chosen as control inputs. Also, the derivative of δ(t) and thus

the derivative of ∆(t) can be manipulated by the control system. As a result, the

wingbeat is frequency-controlled about the carrier frequency. To maintain periodicity

of the wingbeat it is required that |∆˙(t)| < ω0, i.e. |δ˙(t)| < 1, ω0 ∈ [ωmin,ωmax] is

13 fixed. With the phase shift ∆(t) scaled by the carrier frequency, the wing beat forcing

function for the upstroke and the downstroke can be written as ∆(t) µu(t)= a1(k) sin(ω0(t + δ(t))), δ(t)= ω0 (2.17)

µd(t)= a2(k) sin(ω0(t + δ(t)))

Since by assumption |δ˙(t)| < 1, the time re-scaling τ = t + δ is well defined. It is also

easy to verify that d dτ d d = = (1+ δ˙) dt dt dτ dτ d dt d dδ d 1 d (2.18) = = 1 − = dτ dτ dt dτ dt δ˙ dt   1+ Differentiating Eq.(2.17), and using Eq.(2.18) the wingbeat frequencies for up and downstrokes are given by

µ˙ u(t)= a1(k)ω0(1 + δ˙) cos(ω0τ) (2.19) µ˙ d(t)= a2(k)ω0(1 + δ˙) cos(ω0τ) Let us define

δ˙ = u (2.20)

Substituting Eq.(2.20) in Eq.(2.19) we get

µ˙ u(t)= a1(k)ω0(1 + u) cos(ω0τ) (2.21) µ˙ d(t)= a2(k)ω0(1 + u) cos(ω0τ)

1 τ Since typically ω0 >> 1, by setting ω0 = ǫ << 1, and ω0τ = ǫ = λ, Eq.(2.21) can be simplified to µ˙ u(t)= a1(k)ω0(1 + u) cos(λ) (2.22) µ˙ d(t)= a2(k)ω0(1 + u) cos(λ) Note that in all the equations even though the wingbeat forcing function µ may be expressed as a function of τ or λ, the time index subscript for µ is written as t in most

of the cases, since t, τ, and λ are related and can be used interchangeably. Using

14 Eq.(2.1), the lift and drag forces for the flapping-wing MAV during the upstroke and

downstroke can be written as

2 Lu = kLµ˙ u(t)

2 2 2 2 = kLa1(k)ω0(1 + u) cos (λ)

2 Ld = kLµ˙ d(t)

2 2 2 2 = kLa2(k)ω0(1 + u) cos (λ) (2.23) 2 Du = kDµ˙ u(t)

2 2 2 2 = kDa1(k)ω0(1 + u) cos (λ)

2 Dd = kDµ˙ d(t)

2 2 2 2 = kDa2(k)ω0(1 + u) cos (λ)

Using Eq.(2.21), the wingbeat forcing functions driving positions of the right and left

wings of the flapping wing MAV can be written as

µuRW (t)= aRW 1(k) sin(ωRW τRW )

µdRW (t)= aRW 2(k) sin(ωRW τRW ) (2.24) µuLW (t)= aLW 1(k) sin(ωLW τLW )

µdLW (t)= aLW 2(k) sin(ωLW τLW ) where, ωRW and ωLW , are right and left wing fundamental frequencies, τRW = t+δRW ,

τLW = t+δLW . Also, δRW and δLW , are right and left wing phase shifts. Differentiating

Eq.(2.24), and choosing the control inputs to be of the form

δ˙RW = uRW (2.25) δ˙LW = uLW

15 1 Apply a (1) Apply a (1) Apply a (1) Apply a (2) Apply a (2) Apply a (2) 2 1 2 2 1 2 0.8

0.6

0.4 ) λ ( µ 0.2

0

−0.2

Wingbeat Function Compute a (1), a (1), Compute a (2), a (2), 1 2 1 2 −0.4

−0.6 Upstroke Upstroke −0.8 Downstroke Downstroke Downstroke −1 πpi piπ 3piπ 2piπ 5piπ 3piπ 7piπ 4piπ 2 2 λ 2 2

Figure 2.3: The wingbeat forcing function µ(λ) vs λ, with different amplitudes for the upstroke and downstroke.

we get µ˙ uRW (t)= aRW 1(k)ωRW (1 + uRW ) cos(ωRW τRW )

µ˙ dRW (t)= aRW 2(k)ωRW (1 + uRW ) cos(ωRW τRW ) (2.26) µ˙ uLW (t)= aLW 1(k)ωLW (1 + uLW ) cos(ωLW τLW )

µ˙ dLW (t)= aLW 2(k)ωLW (1 + uLW ) cos(ωLW τLW )

Using Eq.(2.23), the instantaneous lift and drag forces on the upstroke and downstroke

for right and left wings of the flapping wing MAV can be written in a similar fashion

2 2 2 2 LuRW = kL[aRW 1(k)ωRW (1 + uRW ) cos (ωRW τRW )]

2 2 2 2 LdRW = kL[aRW 2(k)ωRW (1 + uRW ) cos (ωRW τRW )]

2 2 2 2 DuRW = kD[aRW 1(k)ωRW (1 + uRW ) cos (ωRW τRW )]

16 2 2 2 2 DdRW = kD[aRW 2(k)ωRW (1 + uRW ) cos (ωRW τRW )]

2 2 2 2 LuLW = kL[aLW 1(k)ωLW (1 + uLW ) cos (ωLW τLW )]

2 2 2 2 LdLW = kL[aLW 2(k)ωLW (1 + uLW ) cos (ωLW τLW )] (2.27)

2 2 2 2 DuLW = kD[aLW 1(k)ωLW (1 + uLW ) cos (ωLW τLW )]

2 2 2 2 DdLW = kD[aLW 2(k)ωLW (1 + uLW ) cos (ωLW τLW )] Figure 2.3 shows plot of the wingbeat forcing function, µ(λ) vs λ, for the first two cy- cles or periods i.e. k = 1 and k = 2, with different amplitudes for up and downstrokes.

It shows the effects of changing the amplitude on the wingbeat forcing function. The amplitudes a1(k) and a2(k) are constrained to be constant during up and downstrokes of each cycle, so that the general sine waveform shape is maintained. The advantage of using a sinusoidal wingbeat forcing function is that it allows closed-form solutions for the control derivatives. If the amplitudes a1(k) and a2(k) were allowed to vary within each upstroke and downstroke, closed-form cycle-averaged control derivatives would be difficult to compute. Thus, the amplitudes are adjusted only at the end of each stroke. In general, since a2(k) =6 a1(k), discontinuities exist in the wing position, as shown in Figure 2.3. This situation cannot be physically realized. To overcome this difficulty, we use a modified wingbeat forcing function as shown in Figure 2.4.

From Figure 2.4, the wingbeat forcing function for the first full cycle, i.e. λ ∈ [0, 2π) can be written as

17 1 Apply a (1) Apply a (1) Apply a (1) Apply a (2) Apply a (2) Apply a (2) 2 1 2 2 1 2 ε ε ε ε 0.8

Apply ∆ a(1) Apply ∆ a(2) 0.6

) 0.4 λ ( µ 0.2

0

−0.2

Compute a (1), a (1), Compute a (2), a (2),

Wingbeat Function 1 2 −0.4 1 2 ∆ a(1) ∆ a(2)

−0.6 Upstroke Upstroke −0.8 Downstroke Downstroke Downstroke −1 T πpi piπ 3piπ T 2piπ T 5piπ 3piπ 7piπ T 4piπ 1 2 3 4 2 2 λ 2 2

Figure 2.4: The wingbeat forcing function µ(λ) vs λ, with continuous wing position.

µd(λ)= a2(1) sin(λ) 0 <λ

µd(λ)= a2(1) sin(λ) T2 <λ< 2π π 3π where T1 = 2 −ε, and T2 = 2 +ε =2π−T1. Also for the wingbeat forcing function, ε, is a fixed constant and ∆a(1) is adjusted to maintain a continuous wingbeat position

forcing function. The amplitude adjustment term ∆a(1) is computed by checking the

π 3π π continuity of the wingbeat position forcing function at λ = 2 , and λ = 2 . At λ = 2 ,

18 for the wingbeat position forcing function to be continuous

π a (1) sin(T ) + ∆a(1) sin − T = a (1) (2.29) 2 1 2 1 1   Thus

a1(1) − a2(1) sin(T1) ∆a(1) = π (2.30) sin( 2 − T1)

3π At λ = 2 , for the wingbeat position forcing function to be continuous

3π 3π a (1) sin = −a (1) = a (1) sin(T ) + ∆a(1) sin − T (2.31) 1 2 1 2 2 2 2    

Substituting T2 =2π − T1 in Eq.(2.31) and solving for ∆a(1)

−a1(1) − a2(1) sin(2π − T1) ∆a(1) = π sin(− + T1) 2 (2.32) a1(1) − a2(1) sin(T1) = π sin( 2 − T1) From Eq.(2.30) and Eq.(2.32), we can see that ∆a(1) is the same in both the time

π 3π intervals T1 <λ< 2 , and 2 <λ

In Eq.(2.33), T1 is a fixed constant since ε is fixed. Thus, in order to compute and

apply ∆a(k) for the kth cycle, the system only needs information about the upstroke and downstroke amplitudes, a1(k), and a2(k) respectively, for that cycle. Note that

the amplitudes, a1(k), and a2(k) and ∆a(k) are computed at the beginning of the

th k cycle. Figure 2.4 shows the points in the wingbeat cycle where a1(k), a2(k), and

∆a(k) are computed and applied. Using Eq.(2.28) the wingbeat forcing functions

19 driving the positions of right and left wings can be summarized as

µdRW (t)= aRW 2(k) sin(λRW ) 0 <λRW < T1 π µ (t)= a (k) sin(T ) + ∆a (k) sin(λ − T ) T <λ < dRW RW 2 1 RW RW 1 1 RW 2 π 3π µ (t)= a (k) sin(λ ) <λ < (2.34) uRW RW 1 RW 2 RW 2 3π µ (t)= a (k) sin(T ) + ∆a (k) sin(λ − T ) <λ < T dRW RW 2 2 RW RW 2 2 RW 2

µdRW (t)= aRW 2(k) sin(λRW ) T2 <λRW < 2π

µdLW (t)= aLW 2(k) sin(λLW ) 0 <λLW < T1 π µ (t)= a (k) sin(T ) + ∆a (k) sin(λ − T ) T <λ < dLW LW 2 1 LW LW 1 1 LW 2 π 3π µ (t)= a (k) sin(λ ) <λ < (2.35) uLW LW 1 LW 2 LW 2 3π µ (t)= a (k) sin(T ) + ∆a (k) sin(λ − T ) <λ < T dLW LW 2 2 LW LW 2 2 LW 2

µdLW (t)= aLW 2(k) sin(λLW ) T2 <λLW < 2π

where λRW = ωRW τRW = ωRW (t + δRW ), λLW = ωLW τLW = ωLW (t + δLW ), and without loss of generality, the time at the beginning of each wingbeat cycle is taken to be zero. Differentiating Eq.(2.34) and Eq.(2.35), the wingbeat frequencies for right and left wings can be summarized as

µ˙ dRW (t)= aRW 2(k)ωRW (1 + uRW ) cos(λRW ) 0 <λRW < T1 π µ˙ (t) = ∆a (k)ω (1 + u ) cos(λ − T ) T <λ < dRW RW RW RW RW 1 1 RW 2 π 3π µ˙ (t)= a (k)ω (1 + u ) cos(λ ) <λ < (2.36) uRW RW 1 RW RW RW 2 RW 2 3π µ˙ (t) = ∆a (k)ω (1 + u ) cos(λ − T ) <λ < T dRW RW RW RW RW 2 2 RW 2

µ˙ dRW (t)= aRW 2(k)ωRW (1 + uRW ) cos(λRW ) T2 <λRW < 2π

20 µ˙ dLW (t)= aLW 2(k)ωLW (1 + uLW ) cos(λLW ) 0 <λLW < T1 π µ˙ (t) = ∆a (k)ω (1 + u ) cos(λ − T ) T <λ < dLW LW LW LW LW 1 1 LW 2 π 3π µ˙ (t)= a (k)ω (1 + u ) cos(λ ) <λ < (2.37) uLW LW 1 LW LW LW 2 LW 2 3π µ˙ (t) = ∆a (k)ω (1 + u ) cos(λ − T ) <λ < T dLW LW LW LW LW 2 2 LW 2

µ˙ dLW (t)= aLW 2(k)ωLW (1 + uLW ) cos(λLW ) T2 <λLW < 2π

21 Chapter 3

AVERAGING

In this chapter, expressions for the cycle-averaged aerodynamic forces and mo- ments are derived. Averaging techniques constitute a powerful tool for analysis of periodically-forced systems, especially applicable to systems that exhibit the struc- ture of a weakly-coupled oscillator [27]. Averaging analysis require that a certain time-scale separation occurs between a slow system and a fast system. Since typi-

1 cally ω0 >> 1, it makes sense in our case to consider ω0 = ǫ = O(ǫ) and rescale the

τ time as τ = t + δ, and ω0τ = ǫ = λ. This simple observation, combined with the in- trinsically periodic nature of the systems, has prompted the use of averaging methods

for analysis and design of controllers for flapping-wing MAVs [28]. However, resorting

to averaging techniques must be exercised with caution: First of all, the conditions

for the applicability of averaging must be satisfied [27]. Second, the results that can

be inferred on the trajectories of the original dynamics from the analysis on the aver-

aged system are generally valid only on compact intervals of the form [0; O(ǫ)], unless additional local conditions (such as exponential stability) hold. The control strategy is based on the assumption that the bandwidth of the fuselage controller is much less than the trim flapping frequency required for hover which is given by 8mg ω⋆ = (3.1) sρIACL(α)

22 Here, time varying high frequency oscillatory control inputs must be used; therefore,

the relationship between the cycle-averaged forces and moments and the control in-

put parameters, namely uRW , uLW , aRW 1(k), aRW 2(k), aLW 1(k), and aLW 2(k) must

be computed. Feedback control laws based on cycle-averaged forces and moments

will allow a vehicle to track desired angular and spatial positions in a mean sense;

however, because of the true periodic nature of the aerodynamic forces, the vehicle

will exhibit limit cycle behavior in a neighborhood about the mean position. The gen-

eral method used to compute the cycle-averaged aerodynamic forces and moments is

now explained. Let G(t) be a generalized force or moment either in the x, y, or z body-axis direction. The cycle-averaged generalized force or moment for each wing is computed, by solving a definite integral of the form

2π ω ω G¯ = G(µ(τ))dτ (3.2) 2π Z0 For simplification of the above equation we substitute, λ = ωτ in Eq.(3.2). Thus, we

have dλ = ωdτ, and τ → 0; λ → 0 2π (3.3) τ → ; λ → 2π ω Thus Eq.(3.2) can be written as

1 2π G¯ = G(µ(λ))dλ (3.4) 2π Z0 Since the wingbeat forcing function has different amplitudes for up and downstrokes,

as seen from Figure 2.4 and Eq.(2.28), we can split the integral in Eq.(3.4) as

π 3π 1 T1 2 2 G¯ = Gd(µd(λ))dλ + Gd(µd(λ))dλ + Gu(µu(λ))dλ π 2π 0 T1  Z Z Z 2 (3.5) T2 2π + Gd(µd(λ))dλ + Gd(µd(λ))dλ 3π Z 2 ZT2  23 To simplify the computations associated with the cycle-averaged forces and moments,

we approximate G¯ by

G¯ ≈ lim G¯ (3.6) ε→0

π 3π As ε → 0, T1 → 2 , and T2 → 2 . Thus, Eq.(3.5) can be approximated as

π 3π 1 2 2 G¯ ≈ lim G¯ = G (µ (λ))dλ + G (µ (λ))dλ → d d u u ε 0 2π 0 π  Z Z 2 (3.7) 2π + Gd(µd(λ))dλ 3π Z 2  In order to calculate the cycle-averaged forces and moments, it will be necessary to evaluate numerous integrals. Many have no indefinite integral solutions. These terms arise because of the co-ordinate transformations of forces from local frames to the body frame and because of the fact that the wingbeat function chosen to drive the position of the wing is sinusoidal. It is possible to analytically compute these definite integrals [2]-[3]. Solutions of some of these definite integrals involve a Bessel function of the first kind, J1(·). The definite integrals, which are required to compute the cycle-

averaged forces and moments for the wingbeat function with amplitude variation for

the right wing are given below

π 2 2 I1(aRW 2) , cos (λRW ) sin(aRW 2 sin(λRW ))dλRW 0 Z 3π 2 2 I2(aRW 1) , cos (λRW ) sin(aRW 1 sin(λRW ))dλRW π Z 2 2π 2 I3(aRW 2) , cos (λRW ) sin(aRW 2 sin(λRW ))dλRW 3π 2 Z π 2 2 I4(aRW 2) , cos (λRW ) cos(aRW 2 sin(λRW ))dλRW 0 Z 3π 2 2 I5(aRW 1) , cos (λRW ) cos(aRW 1 sin(λRW ))dλRW π Z 2

24 2π 2 I6(aRW 2) , cos (λRW ) cos(aRW 2 sin(λRW ))dλRW 3π Z 2 (3.8) I13(aRW 2)= I1(aRW 2)+ I3(aRW 2)

I46(aRW 2)= I4(aRW 2)+ I6(aRW 2)

Definite integrals for the left wing can be written in a similar fashion. Figure 3.1 shows

plots of I1(aRW 2), I2(aRW 1), I3(aRW 2), I4(aRW 2), I5(aRW 1), I6(aRW 2), I13(aRW 2), and

I46(aRW 2). From these plots we can see that I2(aRW 1) = 0, and I13(aRW 2) = 0.

Also I1(aRW 2), and I3(aRW 2) are linear functions of aRW 2. Thus we can approximate

I1(aRW 2), and I3(aRW 2) as I1(aRW 2) ≈ k1aRW 2 (3.9) I3(aRW 2) ≈ −k1aRW 2

where k1 =0.3201 is obtained by using least squares approximation. Also we can see

that I5(aRW 1), and I46(aRW 2) are nonlinear functions of aRW 1, and aRW 2 respectively.

I5(aRW 1), and I46(aRW 2) can be analytically computed by using Bessel functions of the first kind. A Bessel function of the first kind is given by the following expression

[29] 1 π J (a )= cos(2nλ ) cos(a sin(λ ))dλ (3.10) 2n RW π RW RW RW RW Z0 I5(aRW 1) can be written as π 2 I5(aRW 1)= cos (λRW ) cos(aRW 1 sin(λRW ))dλRW π Z 2 3π (3.11) 2 2 + cos (λRW ) cos(aRW 1 sin(λRW ))dλRW Zπ Substituting s = λRW − π, and dλRW = ds in the second integral of Eq.(3.11) we get

3π π 2 2 2 2 cos (λRW ) cos(aRW 1 sin(λRW ))dλRW = cos (s + π) cos(aRW 1 sin(s + π))ds π 0 Z Z π 2 2 = cos (s) cos(aRW 1 sin(s))ds 0 Z (3.12)

25 0.4 1 ) )

RW2 0.2 RW1 0 (a (a 1 2 I I 0 −1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 a a RW2 RW1 0 0.8 ) )

RW2 −0.2 RW2 0.7 (a (a 3 4 I I −0.4 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 a a RW2 RW2 1.6 0.8 ) )

RW1 1.4 RW2 0.7 (a (a 5 6 I I

0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 a a RW1 RW2 1 1.6 ) )

RW2 0 RW2 1.4 (a (a 13 46 I I −1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 a a RW2 RW2

Figure 3.1: Plots of I1(aRW 2), I2(aRW 1), I3(aRW 2), I4(aRW 2), I5(aRW 1), I6(aRW 2), I13(aRW 2), and I46(aRW 2) .

Changing the variable of integration from s back to λRW we have

π 2 2 I5(aRW 1)= cos (λRW ) cos(aRW 1 sin(λRW ))dλRW 0 Z π 2 + cos (λRW ) cos(aRW 1 sin(λRW ))dλRW π 2 Z π 2 = cos (λRW ) cos(aRW 1 sin(λRW ))dλRW Z0 (3.13) π 1 + cos(2λ ) = RW cos(a sin(λ ))dλ 2 RW 1 RW RW Z0   1 π = cos(a sin(λ ))dλ 2 RW 1 RW RW Z0 1 π + cos(2λ ) cos(a sin(λ ))dλ 2 RW RW 1 RW RW Z0

26 For n = 0, and n = 1, Eq.(3.10) can be written as 1 π J (a )= cos(a sin(λ ))dλ 0 RW π RW RW RW Z0 (3.14) 1 π J (a )= cos(2λ ) cos(a sin(λ ))dλ 2 RW π RW RW RW RW Z0

Using Eq.(3.14), I5(aRW 1) in Eq.(3.13) can be simplified to

π I (aRW )= (J (aRW )+ J (aRW )) (3.15) 5 1 2 0 1 2 1

Similarly for the left wing we have

π I (aLW )= (J (aLW )+ J (aLW )) (3.16) 5 1 2 0 1 2 1

I46(aRW 2) can be written as

I46(aRW 2)= I4(aRW 2)+ I6(aRW 2) π 2 2 = cos (λRW ) cos(aRW 2 sin(λRW ))dλRW 0 (3.17) Z 2π 2 + cos (λRW ) cos(aRW 2 sin(λRW ))dλRW 3π Z 2

Substituting s = λRW − π, and dλRW = ds in the second integral of Eq.(3.11) we get

2π 2 I6(aRW 2)= cos (λRW ) cos(aRW 2 sin(λRW ))dλRW 3π 2 Z π 2 = cos (s + π) cos(aRW 2 sin(s + π))ds (3.18) π 2 Z π 2 = cos (s) cos(aRW 2 sin(s))ds π Z 2

Changing the variable of integration from s back to λRW we have

π 2 2 I46(aRW 2)= cos (λRW ) cos(aRW 2 sin(λRW ))dλRW 0 Z π 2 + cos (λRW ) cos(aRW 2 sin(λRW ))dλRW (3.19) π 2 Z π 2 = cos (λRW ) cos(aRW 2 sin(λRW ))dλRW Z0 27 Using Eq.(3.14), I46(aRW 2) in Eq.(3.19) can be simplified to π I (aRW )= (J (aRW )+ J (aRW )) (3.20) 46 2 2 0 2 2 2

Similarly for the left wing we have

π I (aLW )= (J (aLW )+ J (aLW )) (3.21) 46 2 2 0 2 2 2

In all the above equations J0(·), and J2(·) are Bessel functions of the first kind.

3.1 Cycle-Averaged Forces and Moments

In this section, cycle-averaged aerodynamic forces and moments in the body frame

are computed. Eventually, these cycle-averaged aerodynamic forces and moments are

used in the development of a control law by evaluating the change in the cycle-

averaged aerodynamic forces and moments with respect to a change in the control

input variables. The procedure found in Doman et al. [2]-[3] is repeated here and

adapted to the specific wingbeat function developed in this study.

3.1.1 X-Body Axis Force

Substituting the expression for the instantaneous x-body axis force for the right

wing from Eq.(2.6) into Eq.(3.7) we get

π 3π 2 2 2π ¯B 1 FxRW = LdRW dλRW + LuRW dλRW + LdRW dλRW (3.22) 2π π 3π  Z0 Z 2 Z 2 

Substituting the expression for LuRW and LdRW from Eq.(2.27) in Eq.(3.22)

π 2 ¯B 1 2 2 2 2 FxRW = kL[aRW 2(k)ωRW (1 + uRW ) cos (λRW )]dλRW 2π 0  Z 3π 2 2 2 2 2 + kL[aRW 1(k)ωRW (1 + uRW ) cos (λRW )]dλRW (3.23) π Z 2 2π 2 2 2 2 + kL[aRW 2(k)ωRW (1 + uRW ) cos (λRW )]dλRW 3π Z 2  28 On computing the above equation we get

k F¯B = L ω2 (1 + u )2(a2 (k)+ a2 (k)) (3.24) xRW 4 RW RW RW 1 RW 2

Following a similar procedure for the left wing, it can be shown that

k F¯B = L ω2 (1 + u )2(a2 (k)+ a2 (k)) (3.25) xLW 4 LW LW LW 1 LW 2

¯B ¯B From Eq.(3.24) and Eq.(3.25) we can see that both FxRW and FxLW are positive

quantities. At a hover condition, where the x-body axis is normal to the surface of

the earth, the forces produced by the wings act to counter the vehicle weight.

3.1.2 Y -Body Axis Force

Substituting the expression for the instantaneous y-body axis force for the right

wing from Eq.(2.6) into Eq.(3.7) we get

π 3π 2 2 ¯B 1 FyRW = DdRW sin(µdRW )dλRW + −DuRW sin(µuRW )dλRW 2π 0 π  Z Z 2 (3.26) 2π + DdRW sin(µdRW )dλRW 3π Z 2 

Substituting expressions for DuRW and DdRW from Eq.(2.27), and µuRW and µdRW from Eq.(2.24), into Eq.(3.26), we get

π k 2 ¯B D 2 2 2 2 FyRW = aRW 2(k)ωRW (1 + uRW ) cos (λRW ) sin(aRW 2(k) sin(λRW ))dλRW 2π 0 Z 3π 2 kD 2 2 2 2 − aRW 1(k)ωRW (1 + uRW ) cos (λRW ) sin(aRW 1(k) sin(λRW ))dλRW 2π π Z 2 2π kD 2 2 2 2 + aRW 2(k)ωRW (1 + uRW ) cos (λRW ) sin(aRW 2(k) sin(λRW ))dλRW 2π 3π Z 2 (3.27)

Each of the definite integrals in Eq.(3.27) belong to either one of the definite integrals given in Eq.(3.8). Thus, using the definite integrals given in Eq.(3.8), Eq.(3.27) can

29 be simplified to get k F¯B = D ω2 (1 + u )2(−I a2 (k)+ I a2 (k)) (3.28) yRW 2π RW RW 2 RW 1 13 RW 2

Since, I2(aRW 1)= 0, and I13(aRW 2)=0

¯B FyRW = 0 (3.29)

Following a similar procedure for the left wing, it can be shown that

¯B FyLW = 0 (3.30)

The cycle-averaged y-body axis forces for both wings are zero. This is because the component of drag pointing in the y-body direction points the same amount of time

and at the same magnitude in the positive direction as it points in the negative y-body

direction.

3.1.3 Z-Body Axis Force

Substituting the expression for the instantaneous z-body axis force for the right

wing from Eq.(2.6) into Eq.(3.7) we get

π 3π 2 2 ¯B 1 FzRW = −DdRW cos(µdRW )dλRW + DuRW cos(µuRW )dλRW 2π 0 π  Z Z 2 (3.31) 2π + −DdRW cos(µdRW )dλRW 3π Z 2  Substituting expressions for DuRW and DdRW from Eq.(2.27), and µuRW and µdRW

from Eq.(2.24), into Eq.(3.31), we get π k 2 ¯B D 2 2 2 2 FzRW = − aRW 2(k)ωRW (1 + uRW ) cos (λRW ) cos(aRW 2(k) sin(λRW ))dλRW 2π 0 Z 3π 2 kD 2 2 2 2 + aRW 1(k)ωRW (1 + uRW ) cos (λRW ) cos(aRW 1(k) sin(λRW ))dλRW 2π π Z 2 2π kD 2 2 2 2 − aRW 2(k)ωRW (1 + uRW ) cos (λRW ) cos(aRW 2(k) sin(λRW ))dλRW 2π 3π Z 2 (3.32)

30 Each of the definite integrals in Eq.(3.32) belong to either one of the definite integrals given in Eq.(3.8). Thus, using the definite integrals given in Eq.(3.8), Eq.(3.32) can be simplified to get

k F¯B = D ω2 (1 + u )2(I a2 (k) − I a2 (k)) (3.33) zRW 2π RW RW 5 RW 1 46 RW 2

Following a similar procedure for the left wing, it can be shown that

k F¯B = D ω2 (1 + u )2(I a2 (k) − I a2 (k)) (3.34) zLW 2π LW LW 5 LW 1 46 LW 2

Thus, non-zero cycle-averaged z-body axis forces can be generated, which can be used to produce fore and aft linear accelerations by either varying, uRW and uLW , or the amplitudes aRW 1(k), aRW 2(k), aLW 1(k), and aLW 2(k). It can also be used to generate rolling moments by asymmetrically (right to left) varying, uRW (k) and uLW (k), or the amplitudes, aRW 1(k), aRW 2(k), aLW 1(k), and aLW 2(k). When aRW 1(k) = aRW 2(k),

¯B ¯B and aLW 1(k) = aLW 2(k), the cycle-averaged z-body axis forces, FzRW and FzLW , vanish.

3.1.4 Rolling Moment

Substituting expressions for the instantaneous x-body moment for the right wing for each stroke, from Equations (2.11) and (2.12) into Eq.(3.7) we get

π 2 ¯ B 1 WP w B MxRW = −DdRW ycp + cos(µdRW ) + ∆zR sin(µdRW ) dλRW 2π 0 2  Z 3π   2 WP w B + DuRW ycp + cos(µuRW ) + ∆zR sin(µuRW ) dλRW π 2 Z 2   2π WP w B + −DdRW ycp + cos(µdRW ) + ∆zR sin(µdRW ) dλRW 3π 2 Z 2    (3.35)

31 Substituting expressions for DuRW and DdRW from Eq.(2.27), and µuRW and µdRW

from Eq.(2.24), into Eq.(3.35) and expanding Eq.(3.35) we get π k 2 ¯ B D WP 2 2 2 2 MxRW = − ycp aRW 2(k)ωRW (1 + uRW ) cos (λRW )dλRW 2π 0 Zπ 2 kD w 2 2 2 2 − aRW 2(k)ωRW (1 + uRW ) cos (λRW ) cos(aRW 2 sin(λRW ))dλRW 2π 2 0 Z π 2 kD B 2 2 2 2 − ∆zR aRW 2(k)ωRW (1 + uRW ) cos (λRW ) sin(aRW 2 sin(λRW ))dλRW 2π 0 Z 3π 2 kD WP 2 2 2 2 + ycp aRW 1(k)ωRW (1 + uRW ) cos (λRW )dλRW 2π π Z 2 3π 2 kD w 2 2 2 2 + aRW 1(k)ωRW (1 + uRW ) cos (λRW ) cos(aRW 1 sin(λRW ))dλRW 2π 2 π Z 2 3π 2 kD B 2 2 2 2 + ∆zR aRW 1(k)ωRW (1 + uRW ) cos (λRW ) sin(aRW 1 sin(λRW ))dλRW 2π π Z 2 2π kD WP 2 2 2 2 − ycp aRW 2(k)ωRW (1 + uRW ) cos (λRW )dλRW 2π 3π Z 2 2π kD w 2 2 2 2 − aRW 2(k)ωRW (1 + uRW ) cos (λRW ) cos(aRW 2 sin(λRW ))dλRW 2π 2 3π Z 2 2π kD B 2 2 2 2 − ∆zR aRW 2(k)ωRW (1 + uRW ) cos (λRW ) sin(aRW 2 sin(λRW ))dλRW 2π 3π Z 2 (3.36)

Each of the definite integrals in Eq.(3.36) belong to either one of the definite in- tegrals given in Eq.(3.8). Thus, using the definite integrals given in Eq.(3.8), and

π 3π 2 2 2π 2 π 2 2 π cos (λRW )dλRW = 3π cos (λRW )dλRW = , and π cos (λRW )dλRW = , 0 2 4 2 2 REq.(3.36) can be simplifiedR to get R k ¯ B D WP 2 2 2 2 MxRW = ycp ωRW (1 + uRW ) (aRW 1(k) − aRW 2(k)) 4 (3.37) k w + D ω2 (1 + u )2(I a2 (k) − I a2 (k)) 4π RW RW 5 RW 1 46 RW 2 Following a similar procedure for the left wing, we have k ¯ B D WP 2 2 2 2 MxLW = − ycp ωLW (1 + uLW ) (aLW 1(k) − aLW 2(k)) 4 (3.38) k w − D ω2 (1 + u )2(I a2 (k) − I a2 (k)) 4π LW LW 5 LW 1 46 LW 2 32 Thus, non-zero cycle-averaged rolling moments can be generated by either varying, uRW and uLW , or the amplitudes aRW 1(k), aRW 2(k), aLW 1(k), and aLW 2(k). When

B B aRW 1(k) = aRW 2(k), aLW 1(k) = aLW 2(k), and ∆zR = ∆zL = 0, the cycle-averaged ¯ B ¯ B x-body moments, MxRW and MxLW , vanish.

3.1.5 Pitching Moment

Substituting expressions for the instantaneous y-body moment for the right wing for each stroke, from Equations (2.11) and (2.12) into Eq.(3.7) we get

π 1 2 M¯ B = L [yWP sin(µ ) + ∆zB ]+ D ∆xB cos(µ ) yRW 2π dRW cp dRW R dRW R dRW  Z0 WP + [LdRW cos(α)+ DdRW sin(α)]xcp cos(µdRW )dλRW 3π 2 WP B B + LuRW [ycp sin(µuRW ) + ∆zR ] − DuRW ∆xR cos(µuRW ) π Z 2 (3.39) WP − [LuRW cos(α)+ DuRW sin(α)]xcp cos(µuRW )dλRW 2π WP B B + LdRW [ycp sin(µdRW ) + ∆zR ]+ DdRW ∆xR cos(µdRW ) 3π Z 2 WP + [LdRW cos(α)+ DdRW sin(α)]xcp cos(µdRW )dλRW 

Substituting expressions for DuRW and DdRW from Eq.(2.27), and µuRW and µdRW from Eq.(2.24), into Eq.(3.39), and expanding Eq.(3.39) we get

π k 2 ¯ B L WP 2 2 2 2 MyRW = ycp aRW 2ωRW (1 + uRW ) cos (λRW ) sin(aRW 2 sin(λRW ))dλRW 2π 0 Z π 2 kL B 2 2 2 2 + ∆zR aRW 2ωRW (1 + uRW ) cos (λRW )dλRW 2π 0 Z π 2 kD B 2 2 2 2 + ∆xR aRW 2ωRW (1 + uRW ) cos (λRW ) cos(aRW 2 sin(λRW ))dλRW 2π 0 Z π 2 kL WP 2 2 2 2 + xcp cos(α)aRW 2ωRW (1 + uRW ) cos (λRW ) cos(aRW 2 sin(λRW ))dλRW 2π 0 Z π k 2 + D xWP sin(α)a2 ω2 (1 + u )2 cos2(λ ) cos(a sin(λ ))dλ 2π cp RW 2 RW RW RW RW 2 RW RW Z0

33 3π 2 kL WP 2 2 2 2 + ycp aRW 1ωRW (1 + uRW ) cos (λRW ) sin(aRW 1 sin(λRW ))dλRW 2π π Z 2 3π 2 kL B 2 2 2 2 + ∆zR aRW 1ωRW (1 + uRW ) cos (λRW )dλRW 2π π Z 2 3π 2 kD B 2 2 2 2 − ∆xRaRW 1ωRW (1 + uRW ) cos (λRW ) cos(aRW 1 sin(λRW ))dλRW 2π π Z 2 3π 2 kL WP 2 2 2 2 − xcp cos(α)aRW 1ωRW (1 + uRW ) cos (λ) cos(aRW 1 sin(λRW ))dλRW 2π π Z 2 3π 2 kD WP 2 2 2 2 − xcp sin(α)aRW 1ωRW (1 + uRW ) cos (λRW ) cos(aRW 1 sin(λRW ))dλRW 2π π Z 2 2π kL WP 2 2 2 2 + ycp aRW 2ωRW (1 + uRW ) cos (λRW ) sin(aRW 2 sin(λRW ))dλRW 2π 3π Z 2 2π kL B 2 2 2 2 + ∆zR aRW 2ωRW (1 + uRW ) cos (λRW )dλRW 2π 3π Z 2 2π kD B 2 2 2 2 + ∆xR aRW 2ωRW (1 + uRW ) cos (λRW ) cos(aRW 2 sin(λRW ))dλRW 2π 3π Z 2 2π kL WP 2 2 2 2 + xcp cos(α)aRW 2ωRW (1 + uRW ) cos (λRW ) cos(aRW 2 sin(λRW ))dλRW 2π 3π Z 2 2π kD WP 2 2 2 2 + xcp sin(α)aRW 2ωRW (1 + uRW ) cos (λRW ) cos(aRW 2 sin(λRW ))dλRW 2π 3π Z 2 (3.40)

Each of the definite integrals in Eq.(3.40) belong to either one of the definite in- tegrals given in Eq.(3.8). Thus, using the definite integrals given in Eq.(3.8), and

π 3π 2 2 2π 2 π 2 2 π cos (λRW )dλRW = 3π cos (λRW )dλRW = , and π cos (λRW )dλRW = , 0 2 4 2 2 REq.(3.40) can be simplifiedR to get R k M¯ B = L ∆zBω2 (1 + u )2(a2 (k)+ a2 (k)) yRW 4 R RW RW RW 1 RW 2 kD B 2 2 2 2 + ∆xRωRW (1 + uRW ) (−I5aRW 1(k)+ I46aRW 2(k)) 2π (3.41) k + L cos(α)xWP ω2 (1 + u )2(−I a2 (k)+ I a2 (k)) 2π cp RW RW 5 RW 1 46 RW 2 k + D sin(α)xWP ω2 (1 + u )2(−I a2 (k)+ I a2 (k)) 2π cp RW RW 5 RW 1 46 RW 2

34 Following a similar procedure for the left wing, we have k M¯ B = L ∆zB ω2 (1 + u )2(a2 (k)+ a2 (k)) yLW 4 L LW LW LW 1 LW 2 kD B 2 2 2 2 + ∆xL ωLW (1 + uLW ) (−I5aLW 1(k)+ I46aLW 2(k)) 2π (3.42) k + L cos(α)xWP ω2 (1 + u )2(−I a2 (k)+ I a2 (k)) 2π cp LW LW 5 LW 1 46 LW 2 k + D sin(α)xWP ω2 (1 + u )2(−I a2 (k)+ I a2 (k)) 2π cp LW LW 5 LW 1 46 LW 2 Thus, non-zero cycle-averaged pitching moments can be generated by either varying,

uRW and uLW , or the amplitudes aRW 1(k), aRW 2(k), aLW 1(k), and aLW 2(k). When

B B aRW 1(k) = aRW 2(k), aLW 1(k) = aLW 2(k), and if ∆zR =6 0, and ∆zL =6 0, the cycle-

averaged y-body moments for right and left wings are nonzero, and are given by k ¯ B L B 2 2 2 MyRW = ∆zR ωRW (1 + uRW ) aRW 1(k) 2 (3.43) k M¯ B = L ∆zB ω2 (1 + u )2a2 (k) yLW 2 L LW LW LW 1

B B Setting ∆zR = 0, and ∆zL = 0 will yield zero cycle-averaged pitching moments, ¯ B ¯ B MyRW and MyLW , for right and left wings, which is a desirable feature for maintaining hover. This suggests that the wing root hinge point should be placed such that it’s z-

B body location is coincident with the nominal vehicle center-of-gravity, i.e., ∆zR = 0,

B and ∆zL = 0.

35 3.1.6 Yawing Moment

Substituting expressions for the instantaneous z-body moment for the right wing for each stroke, from Equations (2.11) and (2.12) into Eq.(3.7) we get

π 1 2 w M¯ B = D ∆xB sin(µ ) − L + yWP cos(µ ) zRW 2π dRW R dRW dRW 2 cp dRW  Z0   WP + [LdRW cos(α)+ DdRW sin(α)]xcp sin(µdRW )dλRW 3π 2 B w WP − DuRW ∆xR sin(µuRW ) − LuRW + ycp cos(µuRW ) π 2 Z 2   (3.44) WP − [LuRW cos(α)+ DuRW sin(α)]xcp sin(µuRW )dλRW 2π B w WP + DdRW ∆xR sin(µdRW ) − LdRW + ycp cos(µdRW ) 3π 2 Z 2   WP + [LdRW cos(α)+ DdRW sin(α)]xcp sin(µdRW )dλRW 

Substituting expressions for DuRW and DdRW from Eq.(2.27), and µuRW and µdRW

from Eq.(2.24), into Eq.(3.44), and expanding Eq.(3.44) we get

π k 2 ¯ B D B 2 2 2 2 MzRW = ∆xRaRW 2ωRW (1 + uRW ) cos (λRW ) sin(aRW 2 sin(λRW ))dλRW 2π 0 πZ 2 kL w 2 2 2 2 − aRW 2ωRW (1 + uRW ) cos (λRW )dλRW 2π 2 0 Z π 2 kL WP 2 2 2 2 − ycp aRW 2ωRW (1 + uRW ) cos (λRW ) cos(aRW 2 sin(λRW ))dλRW 2π 0 Z π 2 kL WP 2 2 2 2 + xcp cos(α)aRW 2ωRW (1 + uRW ) cos (λRW ) sin(aRW 2 sin(λRW ))dλRW 2π 0 Z π 2 kD WP 2 2 2 2 + xcp sin(α)aRW 2ωRW (1 + uRW ) cos (λRW ) sin(aRW 2 sin(λRW ))dλRW 2π 0 3π Z 2 kD B 2 2 2 2 − ∆xR aRW 1ωRW (1 + uRW ) cos (λRW ) sin(aRW 1 sin(λRW ))dλRW 2π π Z 2 3π 2 kL w 2 2 2 2 − aRW 1ωRW (1 + uRW ) cos (λRW )dλRW 2π 2 π Z 2 3π 2 kL WP 2 2 2 2 − ycp aRW 1ωRW (1 + uRW ) cos (λRW ) cos(aRW 1 sin(λRW ))dλRW 2π π Z 2

36 3π 2 kL WP 2 2 2 2 − xcp cos(α)aRW 1ωRW (1 + uRW ) cos (λRW ) sin(aRW 1 sin(λRW ))dλRW 2π π Z 2 3π 2 kD WP 2 2 2 2 − xcp sin(α)aRW 1ωRW (1 + uRW ) cos (λRW ) sin(aRW 1 sin(λRW ))dλRW 2π π Z 2 2π kD B 2 2 2 2 + ∆xRaRW 2ωRW (1 + uRW ) cos (λRW ) sin(aRW 2 sin(λRW ))dλRW 2π 3π Z 2 2π kL w 2 2 2 2 − aRW 2ωRW (1 + uRW ) cos (λRW )dλRW 2π 2 3π Z 2 2π kL WP 2 2 2 2 − ycp aRW 2ωRW (1 + uRW ) cos (λRW ) cos(aRW 2 sin(λRW ))dλRW 2π 3π Z 2 2π kL WP 2 2 2 2 + xcp cos(α)aRW 2ωRW (1 + uRW ) cos (λRW ) sin(aRW 2 sin(λRW ))dλRW 2π 3π Z 2 2π kD WP 2 2 2 2 + xcp sin(α)aRW 2ωRW (1 + uRW ) cos (λRW ) sin(aRW 2 sin(λRW ))dλRW 2π 3π Z 2 (3.45)

Each of the definite integrals in Eq.(3.45) belong to either one of the definite in- tegrals given in Eq.(3.8). Thus, using the definite integrals given in Eq.(3.8), and

π 3π 2 2 2π 2 π 2 2 π cos (λRW )dλRW = 3π cos (λRW )dλRW = , and π cos (λRW )dλRW = , 0 2 4 2 2 REq.(3.45) can be simplifiedR to get R k w ¯ B L 2 2 2 2 MzRW = − ωRW (1 + uRW ) (aRW 1(k)+ aRW 2(k)) 8 (3.46) k − L yWP ω2 (1 + u )2(I a2 (k)+ I a2 (k)) 2π cp RW RW 5 RW 1 46 RW 2 Following a similar procedure for the left wing, we have k w ¯ B L 2 2 2 2 MzLW = ωLW (1 + uLW ) (aLW 1(k)+ aLW 2(k)) 8 (3.47) k + L yWP ω2 (1 + u )2(I a2 (k)+ I a2 (k)) 2π cp LW LW 5 LW 1 46 LW 2 Thus, non-zero cycle-averaged yawing moments can be generated by either varying,

uRW and uLW , or the amplitudes aRW 1(k), aRW 2(k), aLW 1(k), and aLW 2(k). When

aRW 1(k)= aRW 2(k), and aLW 1(k)= aLW 2(k), the cycle-averaged z-body moments for

WP right and left wings are nonzero, since ycp =6 0, and w =6 0. Also, when ωRW = ωLW ,

37 uRW = uLW , aRW 1 = aLW 1, and aRW 2 = aLW 2, the cycle-averaged z-body moments

for right and left wings are equal in magnitude and have opposite directions. In this

case the net z-body moment acting on the vehicle is zero.

3.2 Summary

Use of averaging technique along with a wingbeat forcing function with amplitude

variation, with independently actuated wings, allows one to manipulate x-body and

z-body axis forces. The y-body axis force is not directly controllable using amplitude variation. Manipulation of the y-body force would require the use of wing bias, where the bias changes every wingbeat cycle or changing the amplitudes more than once per stroke, which would result in a very complicated cycle-averaged control-oriented model. Desired rolling, pitching, and yawing moments can also be generated using this technique. Given the ability to manipulate five out of six cycle-averaged body- axis forces and moments, untethered controlled flight with insect-like maneuverability appears to be feasible.

38 Chapter 4

CONTROL DERIVATIVES

In the previous chapter expressions for the cycle-averaged aerodynamic forces and moments of a flapping-wing micro air vehicle were derived. The cycle-averaged aerodynamic forces and moments are used to evaluate the cycle-averaged control derivatives with respect to the control variables. The control variables used to control the aerodynamic forces and moments are the derivatives of the phase shifts, δ˙RW =

uRW , and δ˙LW = uLW , and the amplitudes of the wingbeat forcing function, aRW 1,

aRW 2, aLW 1, and aLW 2. For controllability analysis and control synthesis i.e. to

determine if sufficient control authority can be achieved to regulate the vehicle’s six

degrees of freedom (position and altitude), the sensitivity of each cycle-averaged force

and moment to each control input parameter must be determined [1, 23]. Therefore

expressions for the cycle-averaged control derivatives with respect to variations in the

input parameters are derived. The expressions for the cycle-averaged aerodynamic

forces and moments are linearized about the hover condition. Letting G¯ to be a

generalized cycle-averaged force or moment

G¯ = G¯0 + ∆G¯ (4.1)

39 where G¯0 is evaluated at the hover condition, and the total increment ∆G¯ is ∂G¯ ∂G¯ ∂G¯ ∆G¯ = ∆u + ∆u + ∆a ∂u RW ∂u LW ∂a RW 1 RW LW RW 1 (4.2) ∂G¯ ∂G¯ ∂G¯ + ∆aLW 1 + ∆aRW 2 + ∆aLW 2 ∂aLW 1 ∂aRW 2 ∂aLW 2 The control derivatives in Eq.(4.2) are evaluated about the hover condition. Also

the increments ∆uRW , and ∆uLW , are replaced by uRW , and uLW , since at hover,

uRW = uLW = 0. Thus Eq.(4.2) can be written as ∂G¯ ∂G¯ ∂G¯ ∆G¯ = uRW + uLW + ∆aRW 1 ∂uRW ∂uLW ∂aRW hover hover 1 hover (4.3) ∂G¯ ∂G ¯ ∂G¯ + ∆a + ∆a + ∆a ∂a LW 1 ∂a RW 2 ∂a LW 2 LW 1 hover RW 2 hover LW 2 hover

4.1 Aerodynamic Control Derivatives about Hover

We consider the control of the MAV in the vicinity of the hover condition. At the hover condition, uRW = uLW = 0, aRW 1(k) = aRW 2(k) = aLW 1(k) = aLW 2(k)=0.5,

4mg and ωRW = ωLW = ω , where the hover frequency, ω = , is computed on the 0 0 kL q basis of the nominal values of the plant parameters. The effect of model uncertainty

will be addressed in Chapter 7. The hover condition also assumes that the nominal

B center-of-gravity of the vehicle and wing root hinges are aligned such that ∆zR =

B ∆zL = 0.

4.1.1 X-Body Axis Force Control Derivatives about Hover

X-body axis force control derivatives for the right wing are ¯B ∂FxRW kL 2 2 2 = ωRW (1 + uRW )(aRW 1(k)+ aRW 2(k)) ∂uRW 2 ¯B ∂FxRW kL 2 2 = ωRW (1 + uRW ) aRW 1(k) (4.4) ∂aRW 1 2 ¯B ∂FxRW kL 2 2 = ωRW (1 + uRW ) aRW 2(k) ∂aRW 2 2 40 Similarly x-body axis force control derivatives for the left wing can be written as

¯B ∂FxLW kL 2 2 2 = ωLW (1 + uLW )(aLW 1(k)+ aLW 2(k)) ∂uLW 2 ¯B ∂FxLW kL 2 2 = ωLW (1 + uLW ) aLW 1(k) (4.5) ∂aLW 1 2 ¯B ∂FxLW kL 2 2 = ωLW (1 + uLW ) aLW 2(k) ∂aLW 2 2 X-body axis force control derivatives for right and left wings of the MAV, about the hover condition are evaluated by substituting uRW = uLW = 0, aRW 1(k)= aRW 2(k)= aLW 1(k)= aLW 2(k)=0.5, and ωRW = ωLW = ω0, in Eq.(4.4) and Eq.(4.5). Thus we have ∂F¯B k xRW = L ω2 ∂u 4 0 RW hover ∂F¯B k xRW = L ω2 ∂a 4 0 RW 1 hover ¯B ∂FxRW kL 2 = ω0 ∂aRW 4 2 hover (4.6) ∂F¯B k xLW = L ω2 ∂u 4 0 LW hover ∂F¯B k xLW = L ω2 ∂a 4 0 LW 1 hover ∂F¯B k xLW = L ω2 ∂a 4 0 LW 2 hover

4.1.2 Y -Body Axis Force Control Derivatives about Hover

Y -body axis force control derivatives for right and left wings of the MAV are

∂F¯B ∂F¯B ∂F¯B yRW = yRW = yRW =0 ∂u ∂a ∂a RW RW 1 RW 2 (4.7) ∂F¯B ∂F¯B ∂F¯B yLW = yLW = yLW =0 ∂uLW ∂aLW 1 ∂aLW 2

4.1.3 Z-Body Axis Force Control Derivatives about Hover

Z-body axis force control derivatives for the right wing are

41 ¯B ∂FzRW kD 2 2 2 = ωRW (1 + uRW )(I5(aRW 1)aRW 1(k) − I46(aRW 2)aRW 2(k)) ∂uRW π B ∂F¯ kD ∂I (aRW ) zRW = ω2 (1 + u )2 5 1 a2 (k)+2I (a )a (k) (4.8) ∂a 2π RW RW ∂a RW 1 5 RW 1 RW 1 RW 1  RW 1  ∂F¯B k ∂I (a ) zRW = − D ω2 (1 + u )2 46 RW 2 a2 (k)+2I (a )a (k) ∂a 2π RW RW ∂a RW 2 46 RW 2 RW 2 RW 2  RW 2  Using Leibniz’s rule for differentiation under the integral sign we have

3π 2 ∂I5(aRW 1) ∂ 2 = cos (λRW ) cos(aRW 1(k) sin(λRW )) dλRW ∂aRW π ∂aRW 1 Z 2 1   3π (4.9) 2 2 = − cos (λRW ) sin(λRW ) sin(aRW 1(k) sin(λRW ))dλRW π Z 2 Similarly,

∂I (a ) ∂I (a ) ∂I (a ) 46 RW 2 = 4 RW 2 + 6 RW 2 ∂aRW 2 ∂aRW 2 ∂aRW 2 π 2 ∂ 2 = cos (λRW ) cos(aRW 2(k) sin(λRW )) dλRW + 0 ∂aRW 2 Z 2π   ∂ 2 cos (λRW ) cos(aRW 2(k) sin(λRW )) dλRW (4.10) 3π ∂aRW 2 2   Z π 2 2 = − cos (λRW ) sin(λRW ) sin(aRW 2(k) sin(λRW ))dλRW 0 Z 2π 2 − cos (λRW ) sin(λRW ) sin(aRW 2(k) sin(λRW ))dλRW 3π Z 2 Since we are interested in the hover condition, Eq.(4.8) and the integrals in Eq.(4.9)

and Eq.(4.10) are evaluated at hover, where ωRW = ω0, uRW = 0, aRW 1(k) =

42 aRW 2(k)=0.5. Thus

I5(aRW 1)|hover =I46(aRW 2)|hover

= d1 =1.5222 3π 2 ∂I5(aRW 1) 2 = − cos (λRW ) sin(λRW ) sin(0.5 sin(λRW ))dλRW ∂aRW π 1 hover Z 2

= f = −0.1923 1 (4.11) π ∂I (a ) 2 46 RW 2 = − cos2(λ ) sin(λ ) sin(0.5 sin(λ ))dλ ∂a RW RW RW RW RW 2 hover Z0 2π 2 − cos (λRW ) sin(λRW ) sin(0.5 sin(λRW ))dλRW 3π Z 2 =f1 = −0.1923

Evaluating Eq.(4.8) at the hover condition by using Eq.(4.9), Eq.(4.10), and Eq.(4.11) and ωRW = ω0, uRW = 0, aRW 1(k) = aRW 2(k)=0.5, z-body axis force control

derivatives for the right wing about the hover condition are

∂F¯B zRW =0 ∂u RW hover ∂F¯B g k zRW = 1 D ω2 (4.12) ∂a 2π 0 RW 1 hover ∂F¯B g k zRW = − 1 D ω2 ∂a 2π 0 RW 2 hover

f1 In the above equation, g1 = 4 + d1 =1 .4741. Z-body axis force control derivatives for the left wing are

¯B ∂FzLW kD 2 2 2 = ωLW (1 + uLW )(I5(aLW 1)aLW 1(k) − I46(aLW 2)aLW 2(k)) ∂uLW π ¯B ∂FzLW kD 2 2 ∂I5(aLW 1) 2 = ω (1 + uLW ) a (k)+2I (aLW )aLW (k) (4.13) ∂a 2π LW ∂a LW 1 5 1 1 LW 1  LW 1  ∂F¯B k ∂I (a ) zLW = − D ω2 (1 + u )2 46 LW 2 a2 (k)+2I (a )a (k) ∂a 2π LW LW ∂a LW 2 46 LW 2 LW 2 LW 2  LW 2 

43 Following a similar procedure as the right wing, z-body axis force control derivatives

for the left wing about the hover condition are computed as

∂F¯B zLW =0 ∂u LW hover ∂F¯B g k zLW = 1 D ω2 (4.14) ∂a 2π 0 LW 1 hover ∂F¯B g k zLW = − 1 D ω2 ∂a 2π 0 LW 2 hover

4.1.4 Rolling Moment Control Derivatives about Hover

For the right wing, rolling moment control derivatives are

¯ B ∂MxRW kD WP 2 2 2 = ycp ωRW (1 + uRW )(aRW 1(k) − aRW 2(k)) ∂uRW 2 (4.15) k w + D ω2 (1 + u )(I (a )a2 (k) − I (a )a2 (k)) 2π RW RW 5 RW 1 RW 1 46 RW 2 RW 2 ∂M¯ B k xRW = D yWP ω2 (1 + u )2a (k) ∂a 2 cp RW RW RW 1 RW 1 (4.16) k w ∂I (a ) + D ω2 (1 + u )2 5 RW 1 a2 (k)+2I (a )a (k) 4π RW RW ∂a RW 1 5 RW 1 RW 1  RW 1  ¯ B ∂MxRW kD WP 2 2 = − ycp ωRW (1 + uRW ) aRW 2(k) ∂aRW 2 2

kDw 2 2 ∂I46(aRW 2) 2 − ωRW (1 + uRW ) aRW 2(k)+2I46(aRW 2)aRW 2(k) 4π ∂aRW 2  (4.17)

Similarly, rolling moment control derivatives for the left wing are

¯ B ∂MxLW kD WP 2 2 2 = − ycp ωLW (1 + uLW )(aLW 1(k) − aLW 2(k)) ∂uLW 2 (4.18) k w − D ω2 (1 + u )(I (a )a2 (k) − I (a )a2 (k)) 2π LW LW 5 LW 1 LW 1 46 LW 2 LW 2 ¯ B ∂MxLW kD WP 2 2 = − ycp ωLW (1 + uLW ) aLW 1(k) ∂aLW 1 2

kDw 2 2 ∂I5(aLW 1) 2 − ωLW (1 + uLW ) aLW 1(k)+2I5(aLW 1)aLW 1(k) 4π ∂aLW 1  (4.19)

44 ∂M¯ B k xLW = D yWP ω2 (1 + u )2a (k) ∂a 2 cp LW LW LW 2 LW 2 (4.20) k w ∂I (a ) + D ω2 (1 + u )2 46 LW 2 a2 (k)+2I (a )a (k) 4π LW LW ∂a LW 2 46 LW 2 LW 2  LW 2  Evaluating Equations (4.15)-(4.20) at the hover condition, where uRW = uLW = 0,

B aRW 1(k) = aRW 2(k) = aLW 1(k) = aLW 2(k)=0.5, ωRW = ωLW = ω0, and ∆zR =

B ∆zL = 0, and using Eq.(4.11), rolling moment control derivatives about hover are ∂M¯ B xRW =0 ∂u RW hover ∂M¯ B k g k xRW = D yWP ω2 + 1 D wω2 ∂a 4 cp 0 4π 0 RW 1 hover ¯ B ∂MxRW kD WP 2 g1kD 2 = − ycp ω0 − wω0 ∂aRW 4 4π 2 hover (4.21) ∂M¯ B xLW =0 ∂u LW hover ∂M¯ B k g k xLW = − D yWP ω2 − 1 D wω2 ∂a 4 cp 0 4π 0 LW 1 hover ∂M¯ B k g k xLW = D yWP ω2 + 1 D wω2 ∂a 4 cp 0 4π 0 LW 2 hover

4.1.5 Pitching Moment Control Derivatives about Hover

For the right wing, pitching moment control derivatives are

¯ B ∂MyRW kL B 2 2 2 = ∆zR ωRW (1 + uRW )(aRW 1(k)+ aRW 2(k)) ∂uRW 2 k + D ∆xBω2 (1 + u )(−I (a )a2 (k)+ I (a )a2 (k)) π R RW RW 5 RW 1 RW 1 46 RW 2 RW 2 k + L xWP cos(α)ω2 (1 + u )(−I (a )a2 (k)+ I (a )a2 (k)) π cp RW RW 5 RW 1 RW 1 46 RW 2 RW 2 k + D xWP sin(α)ω2 (1 + u )(−I (a )a2 (k)+ I (a )a2 (k)) π cp RW RW 5 RW 1 RW 1 46 RW 2 RW 2 (4.22)

45 ¯ B ∂MyRW kL B 2 2 = ∆zR ωRW (1 + uRW ) aRW 1(k) ∂aRW 1 2 k ∂I (a ) − D ∆xBω2 (1 + u )2 5 RW 1 a2 (k)+2I (a )a (k) 2π R RW RW ∂a RW 1 5 RW 1 RW 1  RW 1  k ∂I (a ) − L xWP cos(α)ω2 (1 + u )2 5 RW 1 a2 (k)+2I (a )a (k) 2π cp RW RW ∂a RW 1 5 RW 1 RW 1  RW 1  kD WP 2 2 ∂I5(aRW 1) 2 − xcp sin(α)ωRW (1 + uRW ) aRW 1(k)+2I5(aRW 1)aRW 1(k) 2π ∂aRW 1  (4.23) ¯ B ∂MyRW kL B 2 2 = ∆zR ωRW (1 + uRW ) aRW 2(k) ∂aRW 2 2 k ∂I (a ) + D ∆xBω2 (1 + u )2 46 RW 2 a2 (k)+2I (a )a (k) 2π R RW RW ∂a RW 2 46 RW 2 RW 2  RW 2  k ∂I (a ) + L xWP cos(α)ω2 (1 + u )2 46 RW 2 a2 (k)+2I (a )a (k) 2π cp RW RW ∂a RW 2 46 RW 2 RW 2  RW 2  kD WP 2 2 ∂I46(aRW 2) 2 + xcp sin(α)ωRW (1 + uRW ) aRW 2(k)+2I46(aRW 2)aRW 2(k) 2π ∂aRW 2  (4.24)

Similarly, pitching moment control derivatives for the left wing are

¯ B ∂MyLW kL B 2 2 2 = ∆zL ωLW (1 + uLW )(aLW 1(k)+ aLW 2(k)) ∂uLW 2 k + D ∆xBω2 (1 + u )(−I (a )a2 (k)+ I (a )a2 (k)) π L LW LW 5 LW 1 LW 1 46 LW 2 LW 2 k + L xWP cos(α)ω2 (1 + u )(−I (a )a2 (k)+ I (a )a2 (k)) π cp LW LW 5 LW 1 LW 1 46 LW 2 LW 2 k + D xWP sin(α)ω2 (1 + u )(−I (a )a2 (k)+ I (a )a2 (k)) π cp LW LW 5 LW 1 LW 1 46 LW 2 LW 2 (4.25) ¯ B ∂MyLW kL B 2 2 = ∆zL ωLW (1 + uLW ) aLW 1(k) ∂aLW 1 2 k ∂I (a ) − D ∆xBω2 (1 + u )2 5 LW 1 a2 (k)+2I (a )a (k) 2π L LW LW ∂a LW 1 5 LW 1 LW 1  LW 1  k ∂I (a ) − L xWP cos(α)ω2 (1 + u )2 5 LW 1 a2 (k)+2I (a )a (k) 2π cp LW LW ∂a LW 1 5 LW 1 LW 1  LW 1  kD WP 2 2 ∂I5(aLW 1) 2 − xcp sin(α)ωLW (1 + uLW ) aLW 1(k)+2I5(aLW 1)aLW 1(k) 2π ∂aLW 1  (4.26)

46 ¯ B ∂MyLW kL B 2 2 = ∆zL ωLW (1 + uLW ) aLW 2(k) ∂aLW 2 2 k ∂I (a ) + D ∆xB ω2 (1 + u )2 46 LW 2 a2 (k)+2I (a )a (k) 2π L LW LW ∂a LW 2 46 LW 2 LW 2  LW 2  k ∂I (a ) + L xWP cos(α)ω2 (1 + u )2 46 LW 2 a2 (k)+2I (a )a (k) 2π cp LW LW ∂a LW 2 46 LW 2 LW 2  LW 2  kD WP 2 2 ∂I46(aLW 2) 2 + xcp sin(α)ωLW (1 + uLW ) aLW 2(k)+2I46(aLW 2)aLW 2(k) 2π ∂aLW 2  (4.27)

Evaluating Equations (4.22)-(4.27) at the hover condition, where uRW = uLW = 0,

B aRW 1(k) = aRW 2(k) = aLW 1(k) = aLW 2(k)=0.5, ωRW = ωLW = ω0, and ∆zR =

B ∆zL = 0, and using Eq.(4.11), pitching moment control derivatives about hover are ∂M¯ B yRW =0 ∂u RW hover ∂M¯ B yRW g1kD B 2 g1kL WP 2 = − ∆xR ω − xcp cos(α)ω ∂a 2π 0 2π 0 RW 1 hover g k − 1 D xWP sin(α)ω2 2π cp 0 ∂M¯ B g k g k yRW = 1 D ∆xBω2 + 1 L xWP cos(α)ω2 ∂a 2π R 0 2π cp 0 RW 2 hover g k 1 D WP 2 + xcp sin(α)ω0 2π (4.28) ∂M¯ B yLW =0 ∂u LW hover ∂M¯ B yLW g1kD B 2 g1kL WP 2 = − ∆xL ω − xcp cos(α)ω ∂a 2π 0 2π 0 LW 1 hover g k − 1 D xWP sin(α)ω2 2π cp 0 ∂M¯ B g k g k yLW = 1 D ∆xB ω2 + 1 L xWP cos(α)ω2 ∂a 2π L 0 2π cp 0 LW 2 hover g k + 1 D xWP sin(α)ω2 2π cp 0

47 4.1.6 Yawing Moment Control Derivatives about Hover

For the right wing, yawing moment control derivatives are

¯ B ∂MzRW kLw 2 2 2 = − ωRW (1 + uRW )(aRW 1(k)+ aRW 2(k)) ∂uRW 4 (4.29) k − L yWP ω2 (1 + u )(I (a )a2 (k)+ I (a )a2 (k)) π cp RW RW 5 RW 1 RW 1 46 RW 2 RW 2 ¯ B ∂MzRW kLw 2 2 = − ωRW (1 + uRW ) aRW 1(k) ∂aRW 1 4

kL WP 2 2 ∂I5(aRW 1) 2 − ycp ωRW (1 + uRW ) aRW 1(k)+2I5(aRW 1)aRW 1(k) 2π ∂aRW 1  (4.30) ¯ B ∂MzRW kLw 2 2 = − ωRW (1 + uRW ) aRW 2(k) ∂aRW 2 4

kL WP 2 2 ∂I46(aRW 2) 2 − ycp ωRW (1 + uRW ) aRW 2(k)+2I46(aRW 2)aRW 2(k) 2π ∂aRW 2  (4.31)

Similarly, yawing moment control derivatives for the left wing are

¯ B ∂MzLW kLw 2 2 2 = ωLW (1 + uLW )(aLW 1(k)+ aLW 2(k)) ∂uLW 4 (4.32) k + L yWP ω2 (1 + u )(I (a )a2 (k)+ I (a )a2 (k)) π cp LW LW 5 LW 1 LW 1 46 LW 2 LW 2 ¯ B ∂MzLW kLw 2 2 = ωLW (1 + uLW ) aLW 1(k) ∂aLW 1 4

kL WP 2 2 ∂I5(aLW 1) 2 + ycp ωLW (1 + uLW ) aLW 1(k)+2I5(aLW 1)aLW 1(k) 2π ∂aLW 1  (4.33) ¯ B ∂MzLW kLw 2 2 = ωLW (1 + uLW ) aLW 2(k) ∂aLW 2 4

kL WP 2 2 ∂I46(aLW 2) 2 + ycp ωLW (1 + uLW ) aLW 2(k)+2I46(aLW 2)aLW 2(k) 2π ∂aLW 2  (4.34)

Evaluating Equations (4.29)-(4.34) at the hover condition, where uRW = uLW = 0, aRW 1(k) = aRW 2(k) = aLW 1(k) = aLW 2(k)=0.5, ωRW = ωLW = ω0, and using

48 Eq.(4.11), yawing moment control derivatives about hover are

∂M¯ B k w d k zRW = − L ω2 − 1 L yWP ω2 ∂u 8 0 2π cp 0 RW hover ∂M¯ B k w g k zRW = − L ω2 − 1 L yWP ω2 ∂a 8 0 2π cp 0 RW 1 hover ¯ B ∂MzRW kLw 2 g1kL WP 2 = − ω0 − ycp ω0 ∂aRW 8 2π 2 hover (4.35) ∂M¯ B k w d k zLW = L ω2 + 1 L yWP ω2 ∂u 8 0 2π cp 0 LW hover ∂M¯ B k w g k zLW = L ω2 + 1 L yWP ω2 ∂a 8 0 2π cp 0 LW 1 hover ∂M¯ B k w g k zLW = L ω2 + 1 L yWP ω2 ∂a 8 0 2π cp 0 LW 2 hover

4.2 Control Effectiveness Matrix

Expressing all aerodynamic forces and moments as per the generalized force G¯

given in Eq.(4.3), and writing them in matrix form we get

¯B ∆Fx uRW ¯B ∆Fy uLW  ¯B    ∆Fz ∆aRW 1 ¯ B = BA (4.36) ∆Mx  ∆aLW 1  ¯ B    ∆My  ∆aRW 2  B    ∆M¯  ∆aLW   z   2     In the above equation BA is the control effectiveness matrix that contains the aero- dynamic control derivatives evaluated at hover, and the vector on the left side of the equation is a desired set of forces and moments, which are generated by a cycle- averaged control law. The control effectiveness matrix BA is given by

kL 2 kL 2 kL 2 kL 2 kL 2 kL 2 4 ω0 4 ω0 4 ω0 4 ω0 4 ω0 4 ω0 0000 0 0  g1k g1k g1k g1k  0 0 D ω2 D ω2 − D ω2 − D ω2 B = 2π 0 2π 0 2π 0 2π 0 (4.37) A  0 0 B −B −B B   43 43 43 43   0 0 B B −B −B   53 53 53 53   B −B B −B B −B   61 61 63 63 63 63    49 where k g k B = D yWP ω2 + 1 D wω2 43 4 cp 0 4π 0 g k g k B = − 1 D ∆xBω2 − 1 L xWP cos(α)ω2 53 2π R 0 2π cp 0 g k − 1 D xWP sin(α)ω2 (4.38) 2π cp 0 k w d k B = − L ω2 − 1 L yWP ω2 61 8 0 2π cp 0 k w g k B = − L ω2 − 1 L yWP ω2 63 8 0 2π cp 0

The rank of the control effectiveness matrix BA is four.

50 Chapter 5

CONTROL DESIGN MODELS

In this chapter we first present a nonlinear control design model (CDM) of the

flapping-wing MAV, which is based on a standard set of 6 degree-of-freedom (DOF) rigid body equations of motion of an aircraft. The nonlinear CDM is then linearized about the hover condition, to obtain the linear CDM of the MAV. The linear CDM is solely used for controller design. The controller thus designed for the linear CDM is first tested on the nonlinear CDM, and later tested on a higher-fidelity model that includes an instantaneous blade-element estimate of the aerodynamic forces and moments due to the flapping wings.

5.1 Equations of Motion

A standard set of 6-DOF rigid body equations of motion of a rigid body aircraft are used in this work [25, 30]. The equations of motion are

B p˙ Mx ω −1 B ω ω −1 B ω ω ˙ = q˙ = J (M (t) − × J )= J My − × J    B  ! r˙ Mz     1 v˙ = −ω × v + FB(t)+ RBg m I B u˙ qw − rv Fx −g 1 B B ∴ v˙ = − ru − pw + Fy + RI 0     m  B   w˙ pv − qu Fz 0         51 x˙ u y˙ = RI v (5.1)   B   z˙ w     In the above equations J is the inertia matrix; ω = [pqr]T is the angular rate vector in the body frame; MB(t) is the sum of the left and right wing instantaneous

B B aerodynamic moment vectors consisting of the rolling (Mx ), pitching (My ), and

B T yawing (Mz ) moments in the body frame; v = [uvw] is the translational velocity vector; FB(t) is the sum of the left and right wing instantaneous aerodynamic force

B B B vectors in the body frame, where Fx , Fy , and Fz are the x, y, and z body axis forces; m is the vehicle mass; g is the acceleration due to gravity; x, y, and z are

B IT the vehicle positions with respect to an inertial frame. Also RI = RB are rotation matrices that transform from inertial to body axes and back. The rotation matrix

B RI that transforms quantities from the inertial frame to the body frame is

B RI = cos(ψ) cos(θ) sin(ψ) cos(φ) + cos(ψ) sin(θ) sin(φ) sin(ψ) sin(φ) − cos(ψ) sin(θ) cos(φ) − sin(ψ) cos(θ) cos(ψ) cos(φ) − sin(ψ) sin(θ) sin(φ) cos(ψ) sin(φ) + sin(ψ) sin(θ) cos(φ)   sin(θ) − cos(θ) sin(φ) cos(θ) cos(φ)  (5.2) 

5.2 Nonlinear Control Design Model (CDM) of the MAV

The 6-DOF equations of motion and the cycle-averaged forces and moments are used to obtain the nonlinear control design model (CDM) of the flapping-wing MAV.

It is worth noting that in the case of the nonlinear CDM, the 6-DOF equations of motion are driven by the cycle-averaged aerodynamic forces and moments, where as in the case of the higher-fidelity instantaneous blade-element model the 6-DOF equations of motion are driven by the instantaneous aerodynamic forces and moments. This is

52 the main difference between the nonlinear CDM and the higher-fidelity instantaneous blade-element model. The nonlinear CDM of the flapping-wing MAV is

x˙ u p˙ = y˙ = RI v   B   z˙ w     φ˙ cos(ψ) sec(θ) − sin(ψ) sec(θ) 0 p Φ˙ = θ˙ = sin(ψ) cos(ψ) 0 q = E(Φ)ω       ψ˙ − tan(θ) cos(ψ) tan(θ) sin(ψ) 1 r       (5.3) ¯B ¯B u˙ qw − rv FxRW + FxLW −g 1 ¯B ¯B B v˙ = v˙ = − ru − pw + FyRW + FyLW + RI 0 = Fv     m  ¯B ¯B    w˙ pv − qu FzRW + FzLW 0         ¯ B ¯ B p˙ MxRW + MxLW p p ω −1 ¯ B ¯ B ˙ = q˙ = J MyRW + MyLW − q × J q = Fω    ¯ B ¯ B      ! r˙ MzRW + MzLW r r

  T       where Φ = φ θ ψ is a vector of Euler angles; E(Φ) is the matrix that relates the derivatives of the roll (φ), pitch (θ), and yaw (ψ) angles to the angular velocity

¯B ¯B ¯B ¯B ¯B ¯B ¯ B ¯ B ¯ B components; and (FxRW , FxLW , FyRW , FyLW , FzRW , FzLW , MxRW , MxLW , MyRW , ¯ B ¯ B ¯ B MyLW , MzRW , and MzLW ) are the cycle-averaged aerodynamic forces and moments of right and left wings the MAV in the body frame. The state vector for the nonlinear

CDM is

xT = xyzφθψuvwpqr (5.4)   5.3 Hover Frequency

Before proceeding to the linearization of the nonlinear CDM about the hover con- dition, we derive the expression for the hover or trim frequency. The trim frequency is obtained by solving the differential equation, v˙ = 0 at the hover condition. At the

53 hover condition we have φ 0 u 0 Φ = θ = 0 v = v = 0 hover     hover     ψ 0 w 0 hover hover (5.5) p  0   1 0 0   ω B hover = q = 0 RIhover = 0 1 0 r     hover 0 0 0 1 Therefore       u˙ qw − rv F¯B + F¯B −g 1 xRW xLW v˙ = v˙ = − ru − pw + F¯B + F¯B + RB 0 = 0 m yRW yLW Ihover w˙  pv − qu F¯B F¯B   0  hover hover zRW + zLW hover         F¯B + F¯B 1 0 0 −g 1 xRW xLW ∴ F¯B + F¯B + 0 1 0 0 = 0 m yRW yLW F¯B F¯B  0 0 1  0  zRW + zLW hover       (5.6)

Evaluating the cycle-averaged x-body axis forces for right and left wings of the MAV given in Eq.(3.24) and Eq.(3.25) at the hover condition, and substituting them in

Eq.(5.6) we get 1 ¯B ¯B (FxRW + FxLW )hover − g =0 m (5.7) k ω2 L 0 − g =0 4m Thus, the hover or trim frequency is computed as

4mg 8mg ω = = (5.8) 0 k ρI C (α) r L s A L

5.4 Linear Control Design Model (CDM) of the MAV

The nonlinear CDM of the MAV given in Eq.(5.3) is linearized about the hover condition to obtain the linear CDM. Linearization of the navigation equations p˙ =

I ˙ ω RBv, and the kinematic equations Φ = E(Φ) , about the hover condition results in p˙ = v (5.9) Φ˙ = ω

54 I R3 since at the hover condition, RB = E(Φ) = I, where I ∈ is the identity matrix.

The force equations given in Eq.(5.3) can be simplified to 1 u˙ = rv − qw + (F¯B + F¯B ) − g cos(ψ) cos(θ)= f m xRW xLW u 1 v˙ = pw − ru + (F¯B + F¯B )+ g sin(ψ) cos(θ)= f (5.10) m yRW yLW v 1 w˙ = qu − pv + (F¯B + F¯B ) − g sin(θ)= f m zRW zLW w

Linearizingu ˙ = fu about the hover condition, w.r.t. to the states x ∂f ∂f ∂f ∂f ∂f ∂f u = u = u = u = u = u =0 ∂x ∂y ∂z ∂u ∂v ∂w hover hover hover hover hover hover ∂f ∂f ∂f ∂f u = u = u = u =0 (5.11) ∂p ∂q ∂r ∂φ hover hover hover hover ∂f ∂f u = g cos( ψ) sin(θ)| = 0 ; u = g sin(ψ) cos(θ)| =0 ∂θ hover ∂ψ hover hover hover

Linearizing v ˙ = fv about the hover condition, w.r.t. to the states x ∂f ∂f ∂f ∂f ∂f ∂f v = v = v = v = v = v =0 ∂x ∂y ∂z ∂u ∂v ∂w hover hover hover hover hover hover ∂f ∂f ∂f ∂f v = v = v = v =0 ∂p ∂q ∂r ∂φ hover hover hover hover ∂f ∂f v = −g sin( ψ) sin(θ) | = 0 ; v = g cos(ψ) cos(θ)| = g ∂θ hover ∂ψ hover hover hover (5.12)

Linearizingw ˙ = fw about the hover condition, w.r.t. to the states x ∂f ∂f ∂f ∂f ∂f ∂f w = w = w = w = w = w =0 ∂x ∂y ∂z ∂u ∂v ∂w hover hover hover hover hover hover ∂f ∂f ∂f ∂f ∂f w = w = w = w = w =0 (5.13) ∂p ∂q ∂r ∂φ ∂ψ hover hover hover hover hover ∂f w = −g cos( θ)| = −g ∂θ hover hover

Linearizing Eq.(5.10) about the hover condition, w.r.t. to the control input u

∂F 1 v = B (5.14) ∂u m A1 hover

55 where

kL 2 kL 2 kL 2 kL 2 kL 2 kL 2 fu 4 ω0 4 ω0 4 ω0 4 ω0 4 ω0 4 ω0 Fv = fv ; BA1 = 000 0 0 0    g1k g1k g1k g1k  f D 2 D 2 D 2 D 2 w 0 0 2π ω0 2π ω0 − 2π ω0 − 2π ω0    (5.15)

Thus, the force equations given in Eq.(5.10) linearized about the hover condition can be written as

∂Fv ∂Fv 1 v˙ = x + u = S(Φ)g + B u (5.16) ∂x ∂u m A1 hover hover

where 0 ψ −θ −g S(Φ)= −ψ 0 φ ; g = 0 (5.17)     θ −φ 0 0 Linearizing the moment equations given in Eq.(5.3), w.r.t.  to the states x and the

control input u ∂Fω = 0 ∂x hover (5.18) ∂Fω = J−1B ∂u A2 hover

where

uRW uLW 0 0 B43 −B43 −B43 B43   ∆aRW 1 BA2 = 0 0 B53 B53 −B53 −B53 ; u =   ∆aLW 1 B61 −B61 B63 −B63 B63 −B63   ∆aRW 2 (5.19)     ∆aLW   2 Jxx 0 0   J = 0 J 0  yy  0 0 Jzz   Thus, the moment equations given in Eq.(5.3) linearized about the hover condition

can be written as

∂Fω ∂Fω − ω˙ = x + u = J 1B u (5.20) ∂x ∂u A2 hover hover

56 Combining Eq.(5.9), Eq.(5.16), and Eq.(5.20), the linear CDM of the flapping-wing

MAV can be written as p˙ = v

Φ˙ = ω (5.21) 1 v˙ = S(Φ)g + B u m A1 −1 ω˙ = J BA2u 3 3 3 3 3 3×6 In the above equation p ∈ R , v ∈ R , Φ ∈ R , ω ∈ R , g ∈ R , BA1 ∈ R ,

3×6 3×3 3×3 6 BA2 ∈ R , J ∈ R , S(Φ) ∈ R , and u ∈ R . The linear CDM given in

Eq.(5.21) can be expanded as

x˙ = u

y˙ = v

z˙ = w

φ˙ = p

θ˙ = q

ψ˙ = r (5.22) 1 u˙ = kL ω2 kL ω2 kL ω2 kL ω2 kL ω2 kL ω2 u m 4 0 4 0 4 0 4 0 4 0 4 0   v˙ = gψ 1 w˙ = −gθ + 0 0 g1kD ω2 g1kD ω2 − g1kD ω2 − g1kD ω2 u m 2π 0 2π 0 2π 0 2π 0 −1   p˙ = Jxx 0 0 B43 −B43 −B43 B43 u

−1   q˙ = Jyy 0 0 B53 B53 −B53 −B53 u

−1   r˙ = Jzz B61 −B61 B63 −B63 B63 −B63 u

Eq.(5.22) can be written in state space form as 

x˙ = Ax + Bu (5.23)

57 where x ∈ R12, and the matrices A ∈ R12×12, and B ∈ R12×6 are

0000 0 0100000 0000 0 0010000  0000 0 0001000   0000 0 0000100     0000 0 0000010     0000 0 0000001  A =   (5.24)  0000 0 0000000     0000 0 g 000000     0000 −g 0000000     0000 0 0000000     0000 0 0000000     0000 0 0000000      0000 0 0 0000 0 0   0000 0 0  0000 0 0     0000 0 0     0000 0 0    B =  kL ω2 kL ω2 kL ω2 kL ω2 kL ω2 kL ω2  (5.25)  4m 0 4m 0 4m 0 4m 0 4m 0 4m 0   0000 0 0     0 0 g1kD ω2 g1kD ω2 − g1kD ω2 − g1kD ω2  2πm 0 2πm 0 2πm 0 2πm 0  0 0 B43 − B43 − B43 B43   Jxx Jxx Jxx Jxx   0 0 B53 B53 − B53 − B53   Jyy Jyy Jyy Jyy   B61 B61 B63 B63 B63 B63   − − −   Jzz Jzz Jzz Jzz Jzz Jzz   

58 Chapter 6

CONTROLLER SYNTHESIS

In this chapter we present the design of a controller based on the linear CDM of the flapping-wing MAV.

6.1 Output Selection

From our derivation of the control effectiveness matrix BA in Chapter 4, we know that the rank of the control effectiveness matrix BA is four. Thus, for controller synthesis we can choose only four out of all the states of the linear CDM, as ouputs.

An important criteria for selecting the outputs is that the system should have vector relative degree [24] for the chosen outputs. To check whether the system satisfies this condition for the chosen outputs, we perform the following test:

Let the output y ∈ R4 be given by

y1 C1x y C2x y =  2 =   (6.1) y3 C3x y  C4x  4       The relative degree (ri) for each of the outputs, yi = Cix, where (i =1, 2, 3, 4), and

1×12 Ci ∈ R is the smallest possible integer ri such that the following condition holds

ri−2 CiB = 0,... CiA B = 0, and (6.2) ri−1 CiA B =6 0

59 where A and B are the state space matrices of the system given in Eq.(5.24) and

Eq.(5.25). The decoupling matrix D for the chosen outputs is

r1−1 C1A B r2−1 C2A B D =  r3−1  (6.3) C3A B r4−1 C4A B   In the above equation D ∈ R4×6. The system has vector relative degree for the chosen outputs if the decoupling matrix D is invertible or the rank of D is equal to the number of outputs, which in our case is equal to four. If rank D < 4, then the system does not have vector relative degree. If rank D = 4, the system has vector relative degree r = r1 r2 r3 r4 for the chosen outputs. Also let   4 ri = k (6.4) i=1 X If k = n the system has full relative degree, else if k < n the system has n − k dimen- sional internal dynamics. We check the following six cases or output combinations for vector relative degree.

• Case 1: yT = xyzφ   Relative degrees of the outputs for case 1 are: r1 = 2, r2 = 4, r3 = 2, and r4 = 2.

Since, rank of the decoupling matrix D = 4, the system has vector relative degree for the chosen outputs. Also 4

ri = 10 < 12 (6.5) i=1 X System has 12 − 10 = 2 dimensional internal dynamics.

• Case 2: yT = xyzθ   Relative degrees of the outputs for case 2 are: r1 = 2, r2 = 4, r3 = 2, and r4 = 2.

Since, rank of the decoupling matrix D = 3 < 4, the system does not have vector relative degree for the chosen outputs.

60 • Case 3: yT = xyzψ   Relative degrees of the outputs for case 3 are: r1 = 2, r2 = 4, r3 = 2, and r4 = 2.

Since, rank of the decoupling matrix D = 3 < 4, the system does not have vector relative degree for the chosen outputs.

• Case 4: yT = xφθψ   Relative degrees of the outputs for case 4 are: r1 = 2, r2 = 2, r3 = 2, and r4 = 2.

Since, rank of the decoupling matrix D = 4, the system has vector relative degree for the chosen outputs. Also 4

ri =8 < 12 (6.6) i=1 X System has 12 − 8 = 4 dimensional internal dynamics.

• Case 5: yT = yφθψ   Relative degrees of the outputs for case 5 are: r1 = 4, r2 = 2, r3 = 2, and r4 = 2.

Since, rank of the decoupling matrix D = 3 < 4, the system does not have vector relative degree for the chosen outputs.

• Case 6: yT = zφθψ   Relative degrees of the outputs for case 6 are: r1 = 2, r2 = 2, r3 = 2, and r4 = 2.

Since, rank of the decoupling matrix D = 3 < 4, the system does not have vector relative degree for the chosen outputs.

If we choose two outputs from (x, y, z), and two outputs from (φ, θ, ψ), there are nine additional output combinations. But those are not of interest to us, since from a control point of view it is better to have all (x, y, z) and one out of (φ, θ, ψ) as the outputs or vice versa, which results in the six output combinations given above.

61 When z and θ are part of the outputs in Case 2 and Case 6, the system does not have vector relative degree. Thus, it is not possible to generate z-force and pitching moment independent of each other. Also when y and ψ are part of the outputs in Case

3 and Case 5, the system does not have vector relative degree. Thus, it is not possible to generate y-force and yawing moment independent of each other. The system has vector relative degree for Case 1: yT = xyzφ , and Case 4: yT = xφθψ .

However, Case 1 has two dimensional internal dynamics, where as Case 4 has four dimensional internal dynamics. Stabilization of the internal dynamics would be more difficult for Case 4. Therefore, we select Case 1: yT = xyzφ as the outputs.   6.2 Normal Form

In this section we derive the normal form [24] for the linear CDM of the flapping- wing MAV. With the outputs chosen as yT = xyzφ , on differentiating

Eq.(5.22) we have   1 x(2) =u ˙ = kL ω2 kL ω2 kL ω2 kL ω2 kL ω2 kL ω2 u = B u m 4 0 4 0 4 0 4 0 4 0 4 0 1 (4) −1  y = gr˙ = gJzz B61 −B61 B63 −B63 B63 −B63 u = gB6u

 1 g1k g1k g1k  g1k z(2) =w ˙ = −gθ + 0 0 D ω2 D ω2 − D ω2 − D ω2 u (6.7) m 2π 0 2π 0 2π 0 2π 0   = −gθ + B3u

(2) −1 φ =p ˙ = Jxx 0 0 B43 −B43 −B43 B43 u = B4u

Also  

(2) −1 θ =q ˙ = Jyy 0 0 B53 B53 −B53 −B53 u = B5u (6.8)   Eq.(6.7) can be written in matrix form as

˙v1 = f(θ)+ G1u (6.9)

62 where u˙ 0 r˙ 0 ˙v1 =   f(θ)=   w˙ −gθ  p˙   0          (6.10) kL 2 kL 2 kL 2 kL 2 kL 2 kL 2 B1 4m ω0 4m ω0 4m ω0 4m ω0 4m ω0 4m ω0 B61 − B61 B63 − B63 B63 − B63 B6 Jzz Jzz Jzz Jzz Jzz Jzz G1 =   =  g1kD 2 g1kD 2 g1kD 2 g1kD 2 B3 0 0 2πm ω0 2πm ω0 − 2πm ω0 − 2πm ω0 B43 B43 B43 B43 B4  0 0 − −     Jxx Jxx Jxx Jxx      4 4 4×6 1×6 1×6 In the above equation v1 ∈ R , f(θ) ∈ R , G1 ∈ R , B1 ∈ R , B6 ∈ R ,

1×6 1×6 1×6 B3 ∈ R , B4 ∈ R , and B5 ∈ R . Let us denote u as

+ u = G1 [−f(θ)+ u1]+ G2u2 (6.11)

4 2 6×2 In the above equation u1 ∈ R , u2 ∈ R , and G2 ∈ R . Also G1G2 = 0, i.e. the

+ columns of G2 lie in the null space of G1, and G1 is the pseudo-inverse of G1. The

purpose of this co-ordinate transformation is to decouple the control input u into four linearly independent control inputs u1, and two remaining control inputs u2 which are redundant. Substituting u in Eq.(6.9)

+ ˙v1 = f(θ)+ G1(G1 [−f(θ)+ u1]+ G2u2)

+ + = f(θ) − G1G1 f(θ)+ G1G1 u1 + G1G2u2 (6.12)

= u1

Substituting u in Eq.(6.7) and Eq.(6.8) we get

x˙ = u

+ + u˙ = −B1G1 f(θ)+ B1G1 u1 + B1G2u2

y˙ = v

v˙ = gψ

63 ψ˙ = r

+ + r˙ = −B6G1 f(θ)+ B6G1 u1 + B6G2u2

z˙ = w

+ + w˙ = −gθ − B3G1 f(θ)+ B3G1 u1 + B3G2u2 (6.13) φ˙ = p

+ + p˙ = −B4G1 f(θ)+ B4G1 u1 + B4G2u2

θ˙ = q

+ + q˙ = −B5G1 f(θ)+ B5G1 u1 + B5G2u2 where B1G2 = B6G2 = B3G2 = B4G2 = B5G2 =0

+ + B1G1 = 1000 ; B1G1 f(θ)=0

+   + B6G1 = 0100 ; B6G1 f(θ)=0 (6.14) +   + B3G1 = 0010 ; B3G1 f(θ)= −gθ

+   + B4G1 = 0001 ; B4G1 f(θ)=0

+   + B5G1 = 0 0 b5 0 ; B5G1 f(θ)= −b5gθ where b5 = 77.3034. Using the relations given in Eq.(6.14), Eq.(6.13) can be simplified to x˙ = u

+ u˙ = B1G1 u1

y˙ = v

v˙ = gψ

ψ˙ = r

+ r˙ = B6G1 u1

z˙ = w

64 + w˙ = B3G1 u1

φ˙ = p

+ p˙ = B4G1 u1 (6.15)

θ˙ = q

+ q˙ = b5gθ + B5G1 u1 Let us define a new co-ordinate transformation

+ η = q − B5B3 w (6.16)

so as to decouple the internal dynamicsq ˙ and the control input u1. Thus, the internal dynamics in the new co-ordinates is ˙ + θ = η + B5B3 w

+ + + η˙ = b5gθ + B5G1 u1 − B5B3 B3G1 u1 (6.17)

= b5gθ

+ It is verified that B5B3 = b5. The zero dynamics [27] is the dynamics of the system when the output yT = xyzφ is set to zero and thus w is set to zero in Eq.(6.17).

So the zero dynamics is  θ˙ = η (6.18) η˙ = b5gθ Writing Eq.(6.18) in state space form

z˙ = Azeroz (6.19)

2 2×2 where z ∈ R , and Azero ∈ R are given by

θ 0 1 z = A = (6.20) η zero b g 0    5 

Since b5 > 0 the zero dynamics is unstable and the system is non-minimum phase.

The eigenvalues of Azero are located at ±27.5521. For simplification of Eq.(6.15) let

65 + + + + us denote B1G1 u1 = Λ1, B6G1 u1 = Λ2, B3G1 u1 = Λ3, and B4G1 u1 = Λ4, as the four linearly independent control inputs in the new co-ordinate system. The equations of the flapping-wing MAV in the normal form can be written as x˙ = u

u˙ = Λ1

y˙ = v

v˙ = gψ

ψ˙ = r

r˙ = Λ2 (6.21) z˙ = w

w˙ = Λ3

φ˙ = p

p˙ = Λ4

˙ θ = η + b5w

η˙ = b5gθ

The normal form of the MAV can be decoupled into four subsystems, that are con- trolled individually by the four linearly independent control inputs Λ1, Λ2, Λ3, and

Λ4. The four subsystems are

• (x, u)-Subsystem

The differential equations describing this subsystem are x˙ = u (6.22) u˙ = Λ1

66 • (y, v, ψ, r)-Subsystem

The differential equations describing this subsystem are y˙ = v

v˙ = gψ (6.23) ψ˙ = r

r˙ = Λ2 • (z, w, θ, η)-Subsystem

The differential equations describing this subsystem are z˙ = w

w˙ = Λ3 (6.24) θ˙ = η + b5w

η˙ = b5gθ

This subsystem contains the second order internal dynamics described by θ˙ andη ˙ in

Eq.(6.24).

• (φ, p)-Subsystem

The differential equations describing this subsystem are

φ˙ = p (6.25) p˙ = Λ4

6.3 Controller Design

In this section we present the design of the four linearly independent control inputs

Λ1, Λ2, Λ3, and Λ4, for the four decoupled subsystems described in the previous section.

67 6.3.1 Linear Quadratic Integral Controller for the (x, u)- Subsystem

The differential equations describing the (x, u)-subsystem are x˙ = u (6.26) u˙ = Λ1 Let the reference signals for this subsystem be

xref = ξ1 (6.27) x˙ ref = ξ2 and a second order filter for the (x, u)-subsystem, be given by the following equations ˙ x˙ ref = ξ1 = ξ2 (6.28) ˙ 2 2 x¨ref = ξ2 = −ωxξ1 − 2ζxωxξ2 + ωxxd

where xd is the desired signal for the (x, u)-subsystem, ωx is the natural frequency,

and ζx is the damping ratio of the second order filter. The filter parameters are given

in Table 6.1. The (x, u)-subsystem is transformed to the error co-ordinates by the

following co-ordinate transformation

e1 = x − xref = x − ξ1 (6.29) e2 = u − x˙ ref = u − ξ2

To reduce the steady state error, a new state, e3 = e1dt, is augmented to the

subsystem to provide integrator effect. The (x, u)-subsystemR expressed in the error

co-ordinates is e˙1 = e2

e˙2 = Λ1 − x¨ref (6.30)

e˙3 = e1 Writing Eq.(6.30) in the state space form

e˙x = Axex + BxΛ1 + Mx (6.31)

68 3 3×3 3×1 3×1 where ex ∈ R , Ax ∈ R , Bx ∈ R , and Mx ∈ R are given by

e1 0 1 0 e = e A = 0 0 0 x  2 x   e3 1 0 0  0  0  (6.32) Bx = 1 Mx = −x¨ref 0  0 

Λ1 =x ¨ref− Kxex  

The (x, u)-subsystem given in Eq.(6.31-6.32) is controllable. The controller, Λ1 = x¨ref − Kxex, for the (x, u)-subsystem is designed by using the linear-quadratic (LQ) algorithm. For this, letting

∞ T T Jx = (ex Qxex + Λ1 RxΛ1) dt (6.33) Z0 we seek to find the gain vector Kx to minimize the cost function Jx. Finding

T the gain Kx to minimize Jx involves solving the Riccati equation Ax Px + PxAx −

−1 T −1 T PxBxRx Bx Px + Qx = 0, where Kx = Rx Bx Px. Thus, by using the weighting matrices 50 0 0 Qx = 0 1 0 (6.34)  0 0 20 and  

Rx =0.001 (6.35)

and the state space matrices (Ax, Bx) as given in Eq.(6.32) the control gain Kx is found to be

Kx = 246.8428 38.6482 141.4214 (6.36)  

69 6.3.2 Linear Quadratic Integral Controller for the (y, v, ψ, r)-Subsystem

The differential equations describing the (y, v, ψ, r)-subsystem are

y˙ = v

v˙ = gψ (6.37) ψ˙ = r

r˙ = Λ2

For simplification of Eq.(6.37), we do a simple gain scaling as follows

v˙ = gψ = ψ¯

ψ¯˙ = gψ˙ = gr =r ¯ (6.38)

r¯˙ = gr˙ = gΛ2

Thus, the differential equations describing the (y, v, ψ, r)-subsystem can be simplified to y˙ = v

v˙ = ψ¯ (6.39) ψ¯˙ =r ¯

r¯˙ = gΛ2 Let the reference signals for this subsystem be

yref = σ1

y˙ref = σ2 (6.40) y¨ref = σ3

(3) yref = σ4

70 and a fourth order filter for the (y, v, ψ, r)-subsystem, be given by the following

equations y˙ref =σ ˙ 1 = σ2

y¨ref =σ ˙ 2 = σ3 (6.41) (3) yref =σ ˙ 3 = σ4

(4) yref =σ ˙ 4 = −c1σ1 − c2σ2 − c3σ3 − c4σ4 + c5yd

where yd is the desired signal for the (y, v, ψ, r)-subsystem, and c1, c2, c3, c4, c5 are coefficients of the fourth order filter. The filter parameters are given in Table 6.1.

The (y, v, ψ, r)-subsystem is transformed to the error co-ordinates by the following co-ordinate transformation

e4 = y − yref = y − σ1

e5 = v − y˙ref = v − σ2 (6.42) e6 = ψ¯ − y¨ref = ψ¯ − σ3

(3) e7 =r ¯ − yref =r ¯ − σ4

To reduce the steady state error, a new state, e8 = e4dt, is augmented to the

subsystem to provide integrator effect. The (y, v, ψ, r)-subsystemR expressed in the

error co-ordinates is e˙4 = e5

e˙5 = e6

e˙6 = e7 (6.43)

(4) e˙7 = gΛ2 − yref

e˙8 = e4 Writing Eq.(6.43) in the state space form

e˙y = Ayey + ByΛ2 + My (6.44)

71 5 5×5 5×1 5×1 where ey ∈ R , Ay ∈ R , By ∈ R , and My ∈ R are given by

e4 01000 e 00100  5   ey = e6 Ay = 00010 e  00000  7   e  10000  8    0  0  (6.45) 0 0     By = 0 My = 0 g −y(4)    ref  0  0      1    Λ = (y(4) − K e ) 2 g ref y y The (y, v, ψ, r)-subsystem given in Eq.(6.44-6.45) is controllable. The controller,

1 (4) Λ2 = g (yref − Kyey), for the (y, v, ψ, r)-subsystem is designed by using the linear- quadratic (LQ) algorithm. For this, letting

∞ T T Jy = (ey Qyey + Λ2 RyΛ2) dt (6.46) Z0 we seek to find the gain vector Ky to minimize the cost function Jy. Finding

T the gain Ky to minimize Jy involves solving the Riccati equation Ay Py + PyAy −

−1 T −1 T PyByRy By Py + Qy = 0, where Ky = Ry By Py. Thus, by using the weighting matrices 30 0 0 0 0 0 100 0   Qy = 0 010 0 (6.47)  0 001 0     0 0 0 0 10   and  

Ry =0.001 (6.48) and the state space matrices (Ay, By) as given in Eq.(6.45) the control gain Ky is found to be

Ky = 289.8246 269.9916 135.0928 32.0549 100.0000 (6.49)   72 6.3.3 Linear Quadratic Integral Controller for the (z, w, θ, η)-Subsystem

The differential equations describing the (z, w, θ, η)-subsystem are

z˙ = w

w˙ = Λ3 (6.50) θ˙ = η + b5w

η˙ = b5gθ

Let the reference signals for this subsystem be

zref = β1 (6.51) z˙ref = β2

and a second order filter for the (z, w, θ, η)-subsystem, be given by the following

equations z˙ref = β˙1 = β2 (6.52) ˙ 2 2 z¨ref = β2 = −ωz β1 − 2ζzωzβ2 + ωz zd

where zd is the desired signal for the (z, w, θ, η)-subsystem, ωz is the natural fre-

quency, and ζz is the damping ratio of the second order filter. The filter parameters

are given in Table 6.1. The (z, w, θ, η)-subsystem is transformed to the error co-

ordinates by the following co-ordinate transformation

e9 = z − zref = z − β1 (6.53) e10 = w − z˙ref = w − β2

To reduce the steady state error, a new state, e11 = e9dt, is augmented to the subsystem to provide integrator effect. The (z, w, θ, η)-subsystemR expressed in the

73 error co-ordinates is e˙9 = e10

e˙10 = Λ3 − z¨ref

e˙11 = e9 (6.54)

θ˙ = η + b5e10 + b5z˙ref

η˙ = b5gθ Writing Eq.(6.54) in the state space form

e˙z = Azez + BzΛ3 + Mz (6.55)

5 5×5 5×1 5×1 where ez ∈ R , Az ∈ R , Bz ∈ R , and Mz ∈ R are given by

e9 010 0 0 e 000 0 0  10   ez = e11 Az = 100 0 0  θ  0 b 0 0 1    5   η  0 0 0 b g 0    5   0   0  (6.56) 1 −z¨    ref  Bz = 0 Mz = 0 0 b z˙     5 ref  0  0      Λ3 =z ¨ref− Kzez  

The (z, w, θ, η)-subsystem (which contains the second order internal dynamics ˙ described by θ,η ˙) given in Eq.(6.55-6.56) is controllable. The controller, Λ3 = z¨ref − Kzez, for the (z, w, θ, η)-subsystem is designed by using the linear-quadratic

(LQ) algorithm. For this, letting

∞ T T Jz = (ez Qzez + Λ3 RzΛ3) dt (6.57) Z0 we seek to find the gain vector Kz to minimize the cost function Jz. Finding

T the gain Kz to minimize Jz involves solving the Riccati equation Az Pz + PzAz −

74 −1 T −1 T PzBzRz Bz Pz + Qz = 0, where Kz = Rz Bz Pz. Thus, by using the weighting matrices 5000 0 0 0 0 0 1 0 00   Qz = 0 0 500 0 0 (6.58)  0 0 0 10    0 0 0 01   and  

Rz =0.1 (6.59)

and the state space matrices (Az, Bz) as given in Eq.(6.56) the control gain Kz is found to be

Kz = −293.4974 124.3060 −70.7107 103.6758 4.9139 (6.60)   6.3.4 Linear Quadratic Integral Controller for the (φ, p)- Subsystem

The differential equations describing the (φ, p)-subsystem are

φ˙ = p (6.61) p˙ = Λ4

Let the reference signals for this subsystem be

φref = ρ1 (6.62) φ˙ref = ρ2 and a second order filter for the (φ, p)-subsystem, be given by the following equations

φ˙ref =ρ ˙1 = ρ2 (6.63) ¨ 2 2 φref =ρ ˙2 = −ωφρ1 − 2ζφωφρ2 + ωφφd where φd is the desired signal for the (φ, p)-subsystem, ωφ is the natural frequency, and ζφ is the damping ratio of the second order filter. The filter parameters are given

75 in Table 6.1. The (φ, p)-subsystem is transformed to the error co-ordinates by the following co-ordinate transformation

e12 = φ − φref = φ − ρ1 (6.64) e13 = p − φ˙ref = p − ρ2

To reduce the steady state error, a new state, e14 = e12dt, is augmented to the subsystem to provide integrator effect. The (φ, p)-subsystemR expressed in the error co-ordinates is e˙12 = e13

¨ e˙13 = Λ4 − φref (6.65)

e˙14 = e12 Writing Eq.(6.65) in the state space form

e˙φ = Aφeφ + BφΛ4 + Mφ (6.66)

3 3×3 3×1 3×1 where eφ ∈ R , Aφ ∈ R , Bφ ∈ R , and Mφ ∈ R are given by

e12 0 1 0 e = e A = 0 0 0 φ  13 φ   e14 1 0 0  0   0  (6.67) Bφ = 1 Mφ = −φ¨    ref  0 0     Λ4 = φ¨ref − Kφeφ

The (φ, p)-subsystem given in Eq.(6.66-6.67) is controllable. The controller, Λ4 = ¨ φref − Kφeφ, for the (φ, p)-subsystem is designed by using the linear-quadratic (LQ) algorithm. For this, letting

∞ T T Jφ = (eφ Qφeφ + Λ4 RφΛ4) dt (6.68) Z0 we seek to find the gain vector Kφ to minimize the cost function Jφ. Finding

T the gain Kφ to minimize Jφ involves solving the Riccati equation Aφ Pφ + PφAφ −

76 −1 T −1 T PφBφRφ Bφ Pφ + Qφ = 0, where Kφ = Rφ Bφ Pφ. Thus, by using the weighting matrices 1 0 0 Q = 0 1 0 (6.69) φ   0 0 1 and  

Rφ =0.01 (6.70)

and the state space matrices (Aφ, Bφ) as given in Eq.(6.67) the control gain Kφ is found to be

Kφ = 18.2674 11.6848 10.0000 (6.71)  

Tuning Parameter Value ωx 1 ζx 1 c1 10 c2 27 c3 25 c4 9 c5 10 ωz 1 ζz 1 ωφ 2 ζφ 1

Table 6.1: Filter Parameters

77 Chapter 7

SIMULATION RESULTS

The controller synthesis described in the previous chapter is based on the linear

CDM of the flapping-wing MAV. The controller thus designed is first tested on the nonlinear CDM. It is important to note here that the linear and nonlinear CDMs are solely used for controller design and tuning. To validate the performance of the controller, it is tested on a higher fidelity instantaneous blade-element model which is treated as the truth model. Two representative case studies will be presented here:

• Simulations on the nominal instantaneous blade-element model.

• Simulations on the perturbed instantaneous blade-element model.

The reference command xref has been generated by a second order pre-filter, yref by a fourth order pre-filter, zref by a second order pre-filter, and φref by a second order pre-filter, respectively. The filter parameters are appropriately chosen so as to avoid saturation of the control inputs during tracking of aggressive maneuvers. The vehicle parameters used in our simulations are given in Table 7.1. Table 7.1 gives the actual values for the parameters of the instantaneous blade-element model. Figure

7.1 shows the desired three-dimensional trajectory that the vehicle is commanded to follow. The MAV starts at the origin i.e. waypoint-1 in inertial space. The

78 Variable Value Units Mass, m 90 mg Height, width, depth 14, 8, 3 mm c, b , R 4, 3, 15 mm B ∆rR 2 4 0 mm ∆rB 2 − 4 0 mm L   α 45 deg   Trim frequency, ω⋆ 240.9937 Hz Center of gravity location 7 0 0 mm I 1395 mm4 A  

Table 7.1: Vehicle Parameters (taken from Doman et al. [1])

vehicle first executes a roll to align its heading towards waypoint-2. The vehicle then performs a translation along the positive x-direction from waypoint-1 to waypoint-2.

After arriving at waypoint-2, the vehicle aligns its heading towards waypoint-3 as it performs a translation along the positive y-direction from waypoint-2 to waypoint-3.

After arriving at waypoint-3, the vehicle aligns its heading towards waypoint-4 as it translates in both the y-axis and z-axis directions. After arriving at waypoint-4, the vehicle performs a roll to align its heading towards waypoint-5, after which it translates along the x-direction towards the final waypoint-5.

7.1 Simulation 1: Nominal Blade-Element Simulation

The controller is first tested on the nominal instantaneous blade-element model, where we assume that the trim frequency ω⋆ is accurately known and is equal to the carrier frequency ω0 supplied by the controller. Also the vehicle parameters including the mass m, angle of attack α, and hence the lift CL(α) and drag CD(α) coefficients of the vehicle are accurately known. The control effectiveness matrix BA, and hence

79 + the pseudo-inverse G1 that is used in the implementation of the control law given in

Eq.(6.11), is based on the actual vehicle parameters given in Table 7.1. Figure 7.2

shows the desired and actual x, y, and z positions, while Figure 7.3 shows the desired and actual roll, pitch, and yaw angles of the MAV. Figure 7.4 shows the position and attitude tracking errors which are e1, e4, e9, and e12, respectively. Figure 7.5

shows the translational and angular velocities of the MAV. Spikes or sudden changes

are observed in the errors and velocities at time instants where there is a change in

the positions or attitudes. The errors are small and the MAV is capable of tracking

the desired trajectory. Figure 7.6 shows time histories of the six control inputs, and

Figure 7.7 shows magnified plots of uRW and aRW 1 about time t = 20 seconds, where

there is a change in the x position of the MAV. Plots of the remaining control inputs

uLW , aLW 1, aRW 2, and aLW 2 have a similar pattern as uRW and aRW 1, respectively.

From these plots it is observed that uRW , and uLW fluctuate between 0.41 and 0.43, whereas aRW 1, aLW 1, aRW 2, and aLW 2 vary between 0.32 and 0.52. Figure 7.8 shows magnified plots of the pitch angle θ and the angular velocity q about time t = 20 seconds. An oscillation is seen in the pitch angle θ, but it is not very large since it mostly averages out. However the oscillation in the pitch rate q is quite interesting since it fluctuates between −0.8 and 0.8 rad/sec.

80 4

0.5 5 0.4 FINISH 0.3

0.2 z−axis (m) 0.1 3 0 1.5 2 1 1 0.8 1 0.6 0.5 0.4 0.2 0 0 y−axis (m) START x−axis (m)

Figure 7.1: Desired trajectory of the MAV.

1.5

1

0.5 x (Desired) d 0 x Inertial (m) x (Actual) −0.5 0 20 40 60 80 100 120 2

1 y (Desired) 0 d

y Inertial (m) y (Actual) −1 0 20 40 60 80 100 120 0.6 0.4 z (Desired) 0.2 d z (Actual) 0 z Inertial (m) −0.2 0 20 40 60 80 100 120 Time (sec)

Figure 7.2: Vehicle position for the nominal blade-element simulation.

81

0.2 φ 0 d φ Roll (rad) −0.2 −0.4 0 20 40 60 80 100 120 0.04

0.02

0 Pitch (rad) −0.02 0 20 40 60 80 100 120 0.03 0.02 0.01

Yaw (rad) 0 −0.01 0 20 40 60 80 100 120 Time (sec)

Figure 7.3: Vehicle attitude for the nominal blade-element simulation.

0.1 0.05

0.05

0 0

−0.05 x Position Tracking Error y Position Tracking Error −0.1 −0.05 0 20 40 60 80 100 120 0 20 40 60 80 100 120

0.01 0.05 0.005 0 0 −0.05

−0.1 −0.005 Attitude Tracking Error z Position Tracking Error φ −0.15 −0.01 0 20 40 60 80 100 120 0 20 40 60 80 100 120 Time (sec) Time (sec)

Figure 7.4: Tracking errors for the nominal blade-element simulation.

82 0.4 0.2

0.2 0.1

0 0 u (m/sec) −0.2 p (rad/sec) −0.1

−0.4 −0.2 0 20 40 60 80 100 120 0 20 40 60 80 100 120 0.4 2

1 0.2 0 0 v (m/sec)

q (rad/sec) −1

−0.2 −2 0 20 40 60 80 100 120 0 20 40 60 80 100 120 0.2 0.1

0.1 0.05

0 0 w (m/sec) −0.1 r (rad/sec) −0.05

−0.2 −0.1 0 20 40 60 80 100 120 0 20 40 60 80 100 120 Time (sec) Time (sec)

Figure 7.5: Translational and angular velocities for the nominal blade-element simu- lation.

1 1 RW 0.5 LW 0.5 u u

0 0 0 20 40 60 80 100 120 0 20 40 60 80 100 120 1 1

0.5 LW1 0.5 RW1 a a

0 0 0 20 40 60 80 100 120 0 20 40 60 80 100 120 1 1

0.5 LW2 0.5 RW2 a a

0 0 0 20 40 60 80 100 120 0 20 40 60 80 100 120 Time (sec) Time (sec)

Figure 7.6: Control inputs for the nominal blade-element simulation.

83 0.44 0.7

0.435 0.6 0.43

0.425 0.5

RW 0.42 RW1 u a 0.415 0.4

0.41 0.3 0.405

0.4 0.2 19.99 19.995 20 20.005 20.01 19.99 19.995 20 20.005 20.01 Time (sec) Time (sec)

Figure 7.7: Magnified plots of the control inputs uRW and aRW 1 for the nominal blade-element simulation.

−3 x 10 1

0.5

0 Pitch (rad) −0.5

−1 19.98 20 20.02 20.04 20.06 20.08 20.1 Time (sec) 1

0.5

0 q (rad/sec) −0.5

−1 19.98 19.985 19.99 19.995 20 20.005 20.01 20.015 20.02 Time (sec)

Figure 7.8: Magnified plots of the pitch angle θ and angular velocity q for the nominal blade-element simulation.

84 7.2 Simulation 2: Perturbed Blade-Element Simulation

In Simulation 1: Nominal Blade-Element Simulation, it was assumed that the trim frequency ω⋆, and the vehicle parameters including the mass m, angle of attack

α, and hence the lift CL(α) and drag CD(α) coefficients of the vehicle are accurately

known. However, the vehicle parameters are affected by model uncertainty, and are

subject to variations. Also the true hovering frequency ω⋆ is not exactly known

since it depends on the parameters of the vehicle. In the perturbed blade-element

simulation we assume that the actual vehicle parameters given in Table 7.1 are not

exactly known. The mass m and the angle of attack α which are subject to the largest

uncertainty among all the vehicle parameters, are given by

m0 = m + ∆m (7.1) α0 = α + ∆α where m and α are the actual values given in Table 7.1; ∆m and ∆α are the respective perturbations; and m0 and α0 are the nominal values known to us and hence used for the controller design. Since m and α are not accurately known, CL(α) and CD(α), and thus kL, kD, and ω⋆ are not exactly known. The relation between the actual values and the values used for the controller design is

kL0 = kL + ∆kL

kD0 = kD + ∆kD (7.2)

ω0 = ω⋆ + ∆ω

where kL, kD, and ω⋆ are the actual values which are computed based on the actual

values m and α; ∆kL, ∆kD, and ∆ω are the respective perturbations; and kL0 , kD0 ,

and ω0 are the nominal values used for the controller design. For the perturbed blade-

element simulation, the control effectiveness and the pseudo-inverse matrices used in

85 1.5

1

0.5 x (Desired) d 0

x Inertial (m) x (Actual) −0.5 0 20 40 60 80 100 120 2

1 y (Desired) 0 d

y Inertial (m) y (Actual) −1 0 20 40 60 80 100 120 0.6 0.4 z (Desired) 0.2 d z (Actual) 0 z Inertial (m) −0.2 0 20 40 60 80 100 120 Time (sec)

Figure 7.9: Vehicle position for the perturbed blade-element simulation.

the implementation of the control law given in Eq.(6.11), are given by

BA0 = BA + ∆BA (7.3) + + + G10 = G1 + ∆G1

+ where BA and G1 are computed based on the actual values of the vehicle parameters;

+ + ∆BA and ∆G1 are the respective perturbations; and BA0 and G10 are used for

the controller design. For the perturbed blade-element simulation we consider one

example where the perturbation ∆m = −0.3 m, and ∆α = −0.2 α. The perturbations

+ ∆kL, ∆kD, ∆ω, ∆BA, and ∆G1 for this example can be computed by using the

relations given in Eq.(2.2), Eq.(2.3), Eq.(5.8), Eq.(4.37), and Eq.(6.10), respectively.

Figure 7.9 shows the desired and actual x, y, and z positions, while Figure 7.10

shows the desired and actual roll, pitch, and yaw angles of the MAV for the perturbed

86

0.2 0.1 φ 0 d −0.1 φ Roll (rad) −0.2

0 20 40 60 80 100 120 0.04

0.02

0 Pitch (rad)

−0.02 0 20 40 60 80 100 120 0.03

0.02

0.01

Yaw (rad) 0

−0.01 0 20 40 60 80 100 120 Time (sec)

Figure 7.10: Vehicle attitude for the perturbed blade-element simulation.

0.1 0.05

0.05

0 0

−0.05 y Position Tracking Error x Position Tracking Error

−0.1 −0.05 0 20 40 60 80 100 120 0 20 40 60 80 100 120

0.01 0.05 0.005 0

0 −0.05

−0.1 −0.005 Attitude Tracking Error z Position Tracking Error φ

−0.15 −0.01 0 20 40 60 80 100 120 0 20 40 60 80 100 120 Time (sec) Time (sec)

Figure 7.11: Tracking errors for the perturbed blade-element simulation.

87 1 1 LW RW 0.5 0.5 u u

0 0 0 20 40 60 80 100 120 0 20 40 60 80 100 120 1 1

0.5 RW1

LW1 0.5 a a

0 0 0 20 40 60 80 100 120 0 20 40 60 80 100 120 1 1

0.5 LW2 0.5 RW2 a a

0 0 0 20 40 60 80 100 120 0 20 40 60 80 100 120 Time (sec) Time (sec)

Figure 7.12: Control inputs for the perturbed blade-element simulation.

0.52

0.515 0.65

0.51 0.6

0.505 0.55

RW 0.5 0.5 RW1 u a 0.495 0.45

0.49 0.4

0.485 0.35

0.48 0.3 19.98 20 20.02 20.04 20.06 19.99 19.995 20 20.005 20.01 Time (sec) Time (sec)

Figure 7.13: Magnified plots of the control inputs uRW and aRW 1 for the perturbed blade-element simulation.

88 blade-element simulation. Figure 7.11 shows the position and attitude tracking errors

for the perturbed blade-element simulation. The errors are small and the MAV is

capable of tracking the desired trajectory, even in the presence of an uncertainty or

+ perturbation in the control effectiveness matrix BA and thus the pseudo-inverse G1

used in the implementation of the controller. Figure 7.12 shows time histories of the

six control inputs, and Figure 7.13 shows magnified plots of uRW and aRW 1 about time t = 20 seconds, for the perturbed blade-element simulation. Plots of the remaining control inputs uLW , aLW 1, aRW 2, and aLW 2 have a similar pattern as uRW and aRW 1, respectively. From these plots it is observed that uRW and uLW fluctuate between

0.49 and 0.515, whereas aRW 1, aLW 1, aRW 2, and aLW 2 vary between 0.35 and 0.66, which is different from the results obtained for the nominal blade-element simulation where uRW and uLW fluctuate between 0.41 and 0.43, whereas aRW 1, aLW 1, aRW 2, and aLW 2 vary between 0.32 and 0.52. The reason for this is explained below:

For ∆m = −0.3 m, and ∆α = −0.2 α, kL0 < kL, and kD0 < kD. However the

change in kL is not as drastic as the changes in kD and m for the given perturbation.

4mg From Eq.(5.8) we know that the hover frequency which is given by ω⋆ = , is kL q proportional to the square root of m and inversely proportional to the square root of kL. However for the given perturbation since the decrease in kL is negligible compared to the decrease in m, the carrier frequency supplied by the controller ω0 = 207.4485

Hz is less than the actual trim frequency ω⋆ = 240.9937 Hz. Therefore we observe an increase in the values about which the control inputs fluctuate. In general if ∆m> 0, and ∆α > 0, then kD0 > kD, and ω0 > ω⋆, and the values about which the control inputs fluctuate decrease.

89 Chapter 8

CONCLUSIONS

In this thesis we have presented a new wingbeat control strategy for flapping-wing

MAVs with amplitude modulation and time-rescaling which allows manipulation of the x-body, and z-body axis forces as well as the rolling, pitching, and yawing mo- ments, when the amplitudes for up and downstrokes are different, using only two physical actuators. The y-body axis force is not directly controllable using ampli- tude variation. Manipulation of the y-body force would require the use of wing bias,

where the bias changes every wingbeat cycle or changing the amplitudes more than

once per stroke, which would result in a very complicated cycle-averaged control-

oriented model. The computation of the cycle-averaged control derivatives and the

control effectiveness matrix which has a rank of four, allows the use of four linearly

independent inner-loop LQI controllers along with a pseudo-inverse based outer-loop

controller with a total of six inputs to control the 6-DOF model of a flapping-wing

MAV. Simulation results for the higher-fidelity instantaneous blade-element models

indicate that the controller is able to track the reference trajectory with minimum

tracking error in spite of uncertainties in the mass, angle of attack, lift, and drag

90 of the flapping-wing MAV. Thus we can conclude that the proposed controller pos- sesses a certain degree of robustness to parametric uncertainties and modeling errors introduced by the cycle-averaged control-oriented model.

91 Bibliography

[1] D. B. Doman, M. W. Oppenheimer, and D. O. Sigthorsson. Dynamics and control of a biomimetic vehicle using biased wingbeat forcing functions: Part 2: Controller. In 48th AIAA Aerospace Sciences Meeting, Jan 2010.

[2] M. W. Oppenheimer, D. B. Doman, and D. O. Sigthorsson. Dynamics and control of a biomimetic vehicle using biased wingbeat forcing functions. Journal of Guidance, Control, and Dynamics, 34(1):204–217, Jan-Feb 2011.

[3] D. B. Doman, M. W. Oppenheimer, and D. O. Sigthorsson. Dynamics and control of a minimally actuated biomimetic vehicle: Part 1 - aerodynamic model. In AIAA Guidance, Navigation, and Control Conference, Aug 2009.

[4] X. Deng, L. Schenato, W. C. Wu, and S. S. Sastry. Flapping flight for biomimetic robotic insects: Part i-system modeling. IEEE Transactions on Robotics, 22(4):776–788, 2006.

[5] D. B. Doman, M. W. Oppenheimer, and D. O. Sigthorsson. Wingbeat shape modulation for flapping-wing micro-air-vehicle control during hover. Journal of Guidance, Control, and Dynamics, 33(3):724–739, May-June 2010.

[6] R. J. Wood. Design, fabrication, and analysis of a 3-dof, 3 cm flapping-wing mav. In Proceedings of the 2007 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 1576–1581, 2007.

[7] X. Deng, L. Schenato, and S. S. Sastry. Flapping flight for biomimetic robotic insects: Part ii-flight control design. IEEE Transactions on Robotics, 22(4):789– 803, 2006.

[8] R. J. Wood. The first takeoff of a biologically inspired at-scale robotic insect. IEEE Transactions on Robotics, 24(2):341–347, April 2008.

[9] D. L. Raney. Mechanization and control concepts for biologically inspired micro air vehicles. Journal of aircraft, 2004.

[10] M. L. Anderson and R. G. Cobb. Toward flapping wing control of micro air vehicles. Journal of Guidance, Control, and Dynamics, 35(1), 2012.

92 [11] M. H. Dickinson and K. G. G¨otz. Unsteady aerodynamic performance of model wings at low reynolds numbers. Journal of Experimental Biology, 174(1):45–64, 1993.

[12] S. P. Sane. The aerodynamics of insect flight. Journal of Experimental Biology, 206(23):4191–4208, 2003.

[13] R. Zbikowski. On aerodynamic modelling of an insect-like flapping wing in hover for micro air vehicles. Philosophical Transactions of the Royal Society of London: Series A, 360(1791):273–290, 2002.

[14] Z. A. Khan and Sunil K. Agrawal. Study of biologically inspired flapping mech- anism for micro air vehicles. AIAA Journal, 49(7), 2011.

[15] Z.A. Khan and S. K. Agrawal. Force and moment characterization of flapping wings for micro air vehicle application. In Proceedings of the 2005 American Control Conference, 2005.

[16] H. H. Hilton A. Chakravarthy A. A. Paranjape, S.J. Chung. Dynamics and performance of tailless micro aerial vehicle with flexible articulated wings. AIAA Journal, 50(5), 2012.

[17] C. Hsu, J. Evans, S. Vytla, and P. G. Huang. Development of flapping wing micro air vehicles-design, cfd, experiment and actual flight. In Proceedings of the 48th AIAA Aerospace Sciences Meeting, 2010.

[18] D. O. Sigthorsson, M. W. Oppenheimer, and D. B. Doman. Flapping wing micro- air-vehicle control, employing triangular wave strokes and cycle-averaging. In AIAA Guidance, Navigation, and Control Conference, 2010.

[19] D. O. Sigthorsson, M. W. Oppenheimer, and D. B. Doman. Flapping wing micro-air-vehicle 4-dof controller applied to a 6-dof model. In AIAA Guidance, Navigation, and Control Conference, 2010.

[20] Z. A. Khan and Sunil K. Agrawal. Control of longitudinal flight dynamics of a flapping-wing micro air vehicle using time-averaged model and differential flat- ness based controller. In Proceedings of the 2007 American Control Conference, pages 5284–5289, New York City, USA, 2007.

[21] D. B. Doman, M. W. Oppenheimer, M. A. Bolender, and D. O. Sigthorsson. Altitude control of a single degree of freedom flapping wing micro air vehicle. In AIAA Guidance, Navigation, and Control Conference, Aug 2009.

[22] M. W. Oppenheimer, D. B. Doman, and D. O. Sigthorsson. Dynamics and control of a biomimetic vehicle using biased wingbeat forcing functions: Part 1 - aerodynamic model. In 48th AIAA Aerospace Sciences Meeting, Jan 2010.

93 [23] M. W. Oppenheimer, D. B. Doman, and D. O. Sigthorsson. Dynamics and control of a minimally actuated biomimetic vehicle part 2 - control. In AIAA Guidance, Navigation, and Control Conference, Aug 2009.

[24] A. Isidori. Nonlinear Control Systems: An Introduction. Springer-Verlag, 1989.

[25] B. L. Stevens and F. L. Lewis. Aircraft Control and Simulation. John Wiley and Sons, Inc., 1992.

[26] S. P. Sane and M.H. Dickenson. The control of flight force by a flapping wing: Lift and drag force production. Journal of Experimental Biology, 204(15):2607–2626, 2001.

[27] H.K. Khalil. Nonlinear Systems. Prentice Hall, Upper Saddle River, NJ, third edition, 2002.

[28] A. Serrani. Robust hovering control of a single-dof flapping wing mav. In Pro- ceedings of the 2010 American Control Conference, pages 1302–1307, July 2010.

[29] I.S. Gradshteyn and I.M. Ryzhik. Table of Integrals, Series and Products, 6 ed. Academic Press, 2000.

[30] M. V. Cook. Flight Dynamics Principles. Elsevier, second edition, 2007.

94