flight simulation of an ornithopter - eecs at uc berkeley | · flight simulation of an ornithopter...

27
Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University of California at Berkeley Technical Report No. UCB/EECS-2013-60 http://www.eecs.berkeley.edu/Pubs/TechRpts/2013/EECS-2013-60.html May 14, 2013

Upload: truongnga

Post on 10-Jun-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

Flight Simulation of an Ornithopter

Cameron RoseRonald S. Fearing

Electrical Engineering and Computer SciencesUniversity of California at Berkeley

Technical Report No. UCB/EECS-2013-60

http://www.eecs.berkeley.edu/Pubs/TechRpts/2013/EECS-2013-60.html

May 14, 2013

Page 2: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

Copyright © 2013, by the author(s).All rights reserved.

Permission to make digital or hard copies of all or part of this work forpersonal or classroom use is granted without fee provided that copies arenot made or distributed for profit or commercial advantage and that copiesbear this notice and the full citation on the first page. To copy otherwise, torepublish, to post on servers or to redistribute to lists, requires prior specificpermission.

Page 3: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

ii

Contents

1 Simulation Environments 21.1 Aerodynamic and Dynamic Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Yaw Dynamics Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Sagittal Plane Experimental Data 72.1 Wind Tunnel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2 Free Flight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.3 Comparison of Approaches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3 Simulation Results 153.1 Free Flight Comparisons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

4 Yaw Plane Simulation 194.1 Yaw Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.2 Yaw Model Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5 Conclusions and Analysis 235.1 Sagittal Plane Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.2 Yaw Plane Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245.3 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Bibliography 25

Page 4: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

2

Chapter 1

Simulation Environments

The ornithopter simulation software package includes two modules: a sagittal plane model and ayaw plane model. Each module is implemented separately and models the H2Bird hardware [7].The robot and its control surfaces are shown in Figure 1. The H2Bird is built around the Silverliti-Bird RC flier power train and has clap-fling wings with a wingspan of 26.5 cm. For yaw and pitchcontrol, it uses a tail propeller and a servo-controlled tail elevator. In terms of control and sensing,the H2Bird uses an on-board ImageProc 2.4 controller that includes a 40 MIPS microprocessor,6 DOF IMU, IEEE 802.15.4 radio, and motor drivers, powered by a 90 mAh lithium polymerbattery [1].

Wings

ImageProc

Elevator servo

Tail elevator

Tail prop

Figure 1.1: H2Bird ornithopter MAV.

The sagittal plane ornithopter simulation is modeled using rigid body dynamics with force andmoment information collected from wind tunnel and free flight tests as inputs. The top-level layoutof the simulator is illustrated in Figure 1.2 and is implemented in MATLAB. The duty cycle of themotor wing drive is the input, and the state of the ornithopter is updated at 1 kHz.

The yaw plane simulation is also implemented in MATLAB. The yaw dynamics are determinedusing system identification on the step response of the ornithopter to a 90 degree right turn. Thesimulation computes the yaw motion of the ornithopter with a desired heading as the input.

Page 5: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 1. SIMULATION ENVIRONMENTS 3

Body Dynamics

Body Parameters

∫ 1kHz

Controller

Aerodynamics Forces, Moments

State(∆t)

State(t)

Duty Cycle

Figure 1.2: Simulator block diagram.

1.1 Aerodynamic and Dynamic Models

The aerodynamics of flapping winged flight are nonlinear and complex. The flapping wings disturbthe airflow and create vortices that interact with the wings and tail of the ornithopter to augmentthe thrust forces produced by the flapping of the wings. In some cases, simply the thrust provided bythe wings is not sufficient by itself to keep the robot aloft, although it still flies freely [2]. Severalapproaches to modeling the flight paths of ornithopters have been used, but they often involvevariations of blade element theory or other methods to model the dynamics of the wings in an effortto predict the flight path [3, 5, 10]. In my model, I simplify the process by using averages of measuredforces and moments to predict the motion of the ornithopter. The method of using averaged data hasbeen previously shown to be a valid approximation [8, 11]. This strategy enables a simulation thatis less computationally complex, which is helpful for simulating multiple ornithopters or workingwith more intricate control strategies. The previous control strategies used for earlier iterationsof the ornithopter were based upon Proportional-Integral-Differential (PID) control schemes fortarget tracking or height regulation [1, 2]. Information about the aerodynamic interactions ofthe ornithopter can produce a more robust model that can be used in more sophisticated controlschemes such as Linear-Quadratic Regulator (LQR) or Model Predictive Control (MPC).

The aerodynamic forces and moments used in the simulation are collected using a force andtorque sensor affixed to the bottom of the ornithopter in a wind tunnel. The forces and momentswere measured at the center of mass of the entire robot to attempt to capture the interactionsbetween the wings and the rest of the robot without separately modeling each interaction. Thesemeasurements were corrected by free flight data collected using a Vicon motion capture system.The modification of the fixed wind tunnel data is necessary, as the raw fixed data are not sufficientto capture the complex nonlinear dynamics of the ornithopter [4]. The pitching motion that theornithopter exhibits in free flight is important to the flight dynamics, although this could not becaptured in the wind tunnel.

The horizontal and vertical forces and the pitching moment are used as inputs into the body

Page 6: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 1. SIMULATION ENVIRONMENTS 4

dynamics in the simulation. Each force and moment is stored at set data points and interpolationis used to calculate the points in between. The forces and moments are all functions of the set dutycycle, angle of attack, and velocity magnitude of the ornithopter at a given point in time.

The body dynamics of the ornithopter are treated as a rigid body. The kinematic equations ofmotion are as follows [6]:

x = u cos θ + w sin θ

z = u sin θ − w cos θ

u = −wQ+1

m(T −mg sin θ)

w = uQ+1

m(−L+mg cos θ)

θ = Q

Q =M

Iyy− damping

(1.1)

The state vector has six elements: x is the horizontal position in world coordinates, z is the verticalposition in world coordinates, u is the forward velocity in body coordinates, w is the vertical velocityin body coordinates, θ is the pitch, and Q is the angular velocity. Additionally, T is the thrustand L is the lift in body coordinates, and M is the pitch moment. The forces are measured by thesensor in body coordinates, so the velocities are in body coordinates for ease of use. In terms ofthe body parameters, the pitch moment of inertia, Iyy, is 3.0×10−5 kg·m2 and was computed usingSolidWorks, which computes the mass distribution of the model of the ornithopter and returns itin the form of an inertial matrix. The mass of the ornithopter, m, is 13.6 g, and was measuredusing a scale. The body diagram is shown in Figure 1.3.

mg

xb

zb

zw

w

V

xw

u

T

L

𝛂𝚹

Figure 1.3: The rigid body diagram for the model.

Page 7: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 1. SIMULATION ENVIRONMENTS 5

1.2 Yaw Dynamics Model

The turning dynamic model is part of a larger model used to simulate the motion of the ornithopterin the horizontal plane in a cooperative control scenario. This model is used to predict the feasibilityof achieving a goal successfully for a given initial pose. In the scenario, a ground station is used toprovide guidance to the ornithopter by transmitting desired headings to a window calculated fromthe visual input provided by an off-the-shelf USB web camera. The layout of the experiment isdepicted in Figure 1.4. The total cooperative system software layout is shown in Figure 1.5.

0.66 m

0.94 m

3.66 m

Ground Station

H2Bird

Window

Camera

Figure 1.4: Conceptual sketch of experimental setup.

The yaw dynamics of the ornithopter are modeled in the horizontal plane using a one dimensionalmodel to limit the complexity. This format also matches the physical turning implementation onthe actual ornithopter. In terms of control, the ornithopter is sent a desired heading and it controlsto that heading using an on-board PID controller. The turning dynamics and the internal PIDcontroller are modeled with a single one-dimensional model:

θ(s) =K

1 +Rsu(s) (1.2)

where K and R are constants determined through system identification and the input, u(s), is thedesired heading and the output, θ(s), is the physical heading of the ornithopter.

A form of Dubin’s car model is used to model the translational dynamics in the horizontal

Page 8: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 1. SIMULATION ENVIRONMENTS 6

plane [9]:x = us sin θ

y = us cos θ

θ = u

u ∈ U = [− tanφmax, tanφmax]

(1.3)

In the car model, φmax is the maximum steering angle and us is the forward speed of 1.2 m/s.Here, the angular position θ is an input rather than a state. The overall motion of the system canbe modeled as shown in Equation 1.3, where θ is the time-domain output of Equation 1.2, θ(t).

P-D Controller

Pose

Angular position

Desired Heading

PIDController

Camera

Window position

Internal Control Loop – 300Hz

External Control Loop – 10Hz

Pose Estimation

Translational Position

-Attitude

Estimation

OrnithopterDynamics

Figure 1.5: Overall block diagram of the cooperative control system.

Page 9: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

7

Chapter 2

Sagittal Plane Experimental Data

The experimental data necessary to determine the aerodynamic properties of the ornithopter arecomprised of both wind tunnel force-torque data and free flight data collected from a Vicon motioncapture system.

2.1 Wind Tunnel

The wind tunnel data were collected over a series of trials using an ATI Nano17 force-torque sensor.The ornithopter was affixed to an acrylic mount attached to the sensor and facing into the wind, asshown in Figure 2.1. The ornithopter was attached at approximately its center of mass, althoughthis point fluctuates as the wings open and close. This fluctuation is minimal, however, so it wasdiscounted. Each trial consisted of 3 seconds of data collected for wind speeds between 0 and 3m/s in 0.5 m/s increments and longitudinal body axis angles relative to the horizontal, or angles ofattack, between -70 and +90 degrees in 10 degree increments. Each of these trials was conductedwith the wings of the robot closed and stationary. Each trial was averaged over the 3 secondsof collection, and only the thrust and lift forces in body coordinates and the pitch moment werestored. The results of the experiments are in Figures 2.2 through 2.4. Each force is expressed inthe world reference frame with the weight of the robot absent from the measurements.

In addition to the stationary wing experiments, data were collected in still air for duty cyclesbetween 50 percent and 100 percent in 10 percent increments using the same wind tunnel setupas the previous experiments. This range corresponds to wing flap speeds between 12 Hz and 20Hz. These experiments required some damping around the connection of the robot to the acrylicmount with 4 mm of foam, as the oscillations from the wings moving created significant noise inthe pitch moment signal. The data collected from the experiments were averaged over 5 seconds,and the thrust and lift forces in body coordinates and the pitch moment were stored. The resultsof the experiments are in Figures 2.5 and 2.6.

Both of these results were combined to form a 4 dimensional data set dependent upon dutycycle, angle of attack, and wind speed that outputs the forward and vertical body frame forces andpitch moment. This data set is used as a look-up table for the instantaneous forces and momentsfor a given pose in the simulation.

Page 10: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 2. SAGITTAL PLANE EXPERIMENTAL DATA 8

L

T

Figure 2.1: H2Bird mounted to sensor

2.2 Free Flight

The free flight data was captured over variable amounts of time for circular paths in an emptyroom for duty cycles between 70 and 100 percent in 5 percent increments. For each trial, theinitial launch transient was cut from the data, because only the behavior around equilibrium wasof interest. For each trial, the position, orientation, angle of attack, and velocity magnitude anddirection of the ornithopter were computed. Data from a typical trial are shown in Figures 2.7and 2.8. The relationship between duty cycle and velocity, angle of attack, and pitch angle aredepicted in Figures 2.9 through 2.11. The trends and locations of the equilibrium points in termsof the angle of attack and velocity are used in conjunction with the wind tunnel data to determinean accurate picture of the flight characteristics for simulation.

2.3 Comparison of Approaches

The two approaches to determining the flight forces of the ornithopter both have their merits andlimitations. The wind tunnel data give a picture of the aerodynamics of the ornithopter overa broad range of wind conditions. Although all of the motions that contribute to the flight ofthe ornithopter are not present in this fixed measurement, the wind tunnel data still provides anindication of the relationship of the forces and moments to changes in wind speed and angle ofattack. While these relationships can be used, the values of the individual data points may diverge,as some of the aerodynamic interactions are not present.

The free flight data provide information about the exact values of the angle of attack and flightspeed at equilibrium for given duty cycles. This information can be used to correct the values ofthe forces and moments produced by the wind tunnel experiments, but the relationships of thewind tunnel data can still be used. One limitation of the free flight data is that it only gives anindication of the flight behaviors at equilibrium, which is a narrow snapshot of the flight dynamics.

Page 11: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 2. SAGITTAL PLANE EXPERIMENTAL DATA 9

01

23 −50

050

−0.2

−0.1

0

0.1

0.2

AoA [Degrees]Wind Speed [m/s]

Hori

zonta

l F

orc

e [N

]

Figure 2.2: Aerodynamic horizontal forcesurface in world coordinates.

01

23 −50

050

−0.2

−0.1

0

0.1

0.2

AoA [Degrees]Wind Speed [m/s]

Ver

tica

l F

orc

e [N

]

Figure 2.3: Aerodynamic vertical force sur-face in world coordinates.

01

23 −50

050

−10

−5

0

5

AoA [Degrees]Wind Speed [m/s]

Pit

ch M

om

ent

[N*

mm

]

Figure 2.4: Aerodynamic pitch moment surface.

Additionally, the flapping wings produce noise in the Vicon tracking system, so it is difficult tocapture valid data.

To combine the two sets of data into one composite data set to use with the simulator, severaladjustments were made to the wind tunnel data that were inspired by the free flight data. Oneof these adjustments was to the equilibrium points indicated by the wind tunnel data, which didnot match with the values of the equilibrium points indicated by the free flight data. This issuewas expected, since the ornithopter is fixed in the wind tunnel. To account for the difference, thezero force and moment point of the wind tunnel data was shifted to the point supplied by the freeflight data. This change was implemented by subtracting, from the entire wind tunnel data set, thevalues provided by the wind tunnel at the free flight provided equilibrium point: 85 percent dutycycle, 1.3 m/s wind speed, and 53 degrees angle of attack. Therefore, the values of the data wereshifted, but all of the relationships remain the same.

Another discrepancy between the wind tunnel data set and the free flight data, is that in thewind tunnel data, the relationship between the pitch moment and the wind speed was incorrect.As shown in Figure 2.12, the measured pitch moment decreases as the wind speed increases. Ifthis were the case, the robot would pitch down as the speed increases, which would cause a furtherspeed increase. This is counterintuitive, and also contradictory of the actual flight behavior. This

Page 12: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 2. SAGITTAL PLANE EXPERIMENTAL DATA 10

50 60 70 80 90 100−0.02

0

0.02

0.04

0.06

0.08

0.1

0.12

Duty Cycle [Percent]

Forc

es [

N]

Thrust Force

Lift Force

Figure 2.5: Thrust (blue) and lift (green)forces as a function of the duty cycle.

50 60 70 80 90 100−1.5

−1.4

−1.3

−1.2

−1.1

−1

Duty Cycle [Percent]

Pit

ch M

om

ent

[N*

mm

]

Figure 2.6: Pitch moment as a function ofthe duty cycle.

deficiency could be caused by some aerodynamic interaction that is not captured in the wind tunnelthat causes the robot to pitch up in free flight. To fix this problem, a further additive term wasadded to the pitch moment dependent on the wind speed: 7 ∗ windspeed

3.0 . This term is meant tobehave like an elevator would on the end of the tail. This approximation is overly simplistic, as,in actuality, the moment provided by an elevator would also be dependent on angle of attack.However, this term fixes the relationship between wind speed and pitch moment, while preservingthe pre-existing correct relationship between angle of attack and pitch moment. The progressiveeffects of these changes to the pitch moment surface are illustrated in Figures 2.14 through 2.16.The shift illustrated in Figure 2.15 is analogous to a similar shift in the forward and vertical forcesbased upon the equilibrium points determined in the free flight experiments. Figure 2.13 gives acloser look at the adjusted relationship between wind speed and the pitch moment for a particularangle of attack.

Page 13: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 2. SAGITTAL PLANE EXPERIMENTAL DATA 11

−2

−1

0

1 −1

0

1

20

0.5

1

1.5

2

Y [m]X [m]

Z [

m]

Figure 2.7: The Vicon tracked path for 80percent duty cycle with velocity vector (blue)and angular orientation vector (green) indi-cated.

0 1 2 3 4 50

2

4

Time [s]Vel

oci

ty [

m/s

ec]

0 1 2 3 4 50

50

100

Time [s]P

itch

[D

eg]

0 1 2 3 4 50

50

100

Time [s]

AoA

[D

eg]

Figure 2.8: The Vicon tracked pitch angle,angle of attack, and velocity magnitude for80 percent duty cycle.

Page 14: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 2. SAGITTAL PLANE EXPERIMENTAL DATA 12

60 70 80 90 100 11042

44

46

48

50

52

54

Duty Cycle [Percent]

Pit

ch [

Deg

rees

]

Figure 2.9: Free flight pitch angle as a func-tion of the duty cycle.

60 70 80 90 100 11030

35

40

45

50

55

60

65

70

Duty Cycle [Percent]

Angle

of

Att

ack [

Deg

rees

]

Figure 2.10: Free flight angle of attack as afunction of the duty cycle.

60 70 80 90 100 1101

1.5

2

2.5

Duty Cycle [Percent]

Vel

oci

ty [

m/s

]

Figure 2.11: Free flight velocity magnitude as a function of the duty cycle.

Page 15: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 2. SAGITTAL PLANE EXPERIMENTAL DATA 13

0 0.5 1 1.5 2 2.5 3−2.5

−2

−1.5

−1

−0.5

0

0.5

1

Wind Speed [m/s]

Pit

ch M

om

ent

[N*m

m]

Figure 2.12: Original pitch moment for 85percent duty cycle and 53 degrees angle ofattack as a function of wind speed.

0 0.5 1 1.5 2 2.5 3−3

−2

−1

0

1

2

Wind Speed [m/s]

Pit

ch M

om

ent

[N*m

m]

Figure 2.13: Adjusted pitch moment for 85percent duty cycle and 53 degrees angle ofattack as a function of wind speed.

Page 16: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 2. SAGITTAL PLANE EXPERIMENTAL DATA 14

01

23 −50

050

−5

0

5

AoA [Degrees]Wind Speed [m/s]

Pit

ch M

om

ent

[N*

mm

]

Figure 2.14: Initial total pitch moment surface.

01

23 −50

050

−5

0

5

AoA [Degrees]Wind Speed [m/s]

Pit

ch M

om

ent

[N*

mm

]

Figure 2.15: Equilibrium shifted total pitch mo-ment surface.

01

23 −50

050

−5

0

5

AoA [Degrees]Wind Speed [m/s]

Pit

ch M

om

ent

[N*

mm

]

Figure 2.16: Final adjusted total pitch moment surface.

Page 17: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

15

Chapter 3

Simulation Results

To determine the accuracy of the simulation, open loop flight tests of the sagittal plane model wereconducted. The simulation results were compared to analogous free flight tests.

3.1 Free Flight Comparisons

For the wind tunnel inspired model, the motion of the ornithopter was simulated for duty cyclesbetween 70 and 100 percent in 5 percent increments. The initial conditions chosen were 0.85 m/sforward velocity in the horizontal plane and a 40 degree pitch angle. For each trajectory, the pathof the flight and also the angle of attack, velocity magnitude, and pitch angle were plotted, asshown in Figures 3.1 through 3.4.

To determine the overall steady-state accuracy of the simulation in comparison to the real flightdata, the simulation results were compared to the previously collected flight data. As mentioned inthe previous chapter, this flight data was collected for duty cycles between 70 and 100 percent in 5percent increments for circular paths. The paths are circular because the room was not big enoughto collect multiple seconds of data after the initial launch transient before equilibrium flight isreached. Because of this difference, the steady state values are not exact for straight forward flight.Since the flapping wings are not modeled in the simulation, the oscillatory behavior of the true flightpath is not captured. However, the steady state average angle of attack, pitch, and velocity can becompared in the free flight and simulation data. The results are shown in Figures 3.5 through 3.7.

There is a marked difference in the trend for the steady state velocity between the Vicon andsimulation data. Figures 3.8 through 3.10 compare the force and moment values from the look-uptable for the equilibrium points reached at steady state by the ornithopter in true flight and insimulation. As shown in the plots, the pitch moment is close to zero for the equilibrium points insimulation, as expected, but nonzero for the equilibrium points above 85 percent duty cycle in trueflight. A zero pitch moment is important for passive stability, both in reality and simulation, soit is clear from the plots that some interaction is missing in the wind tunnel collected data that ispresent in reality and contributes to the steady increase in velocity at higher duty cycles.

Page 18: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 3. SIMULATION RESULTS 16

0 5 10 15 20−1

0

1

2

3

4

5

6

x [m]

z [

m]

70

75

80

85

90

95

100

Figure 3.1: Simulated paths of the or-nithopter for various duty cycles.

0 5 10 1535

40

45

50

55

60

65

Time [s]

Pit

ch [

Deg

]

70

75

80

85

90

95

100

Figure 3.2: Simulated pitch angle of the or-nithopter.

0 5 10 150.5

1

1.5

2

2.5

Time [s]

Vel

oci

ty [

m/s

]

70

75

80

85

90

95

100

Figure 3.3: Simulated velocity of the or-nithopter.

0 5 10 1530

40

50

60

70

80

Time [s]

An

gle

of

Att

ack

[D

eg]

70

75

80

85

90

95

100

Figure 3.4: Simulated angle of attack of theornithopter.

Page 19: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 3. SIMULATION RESULTS 17

70 75 80 85 90 95 10035

40

45

50

55

60

65

70

75

Duty Cycle [Percent]

An

gle

of

Att

ack [

Deg

rees

]

Vicon

Simulation

Figure 3.5: Comparison between Vicon (red)and simulation (blue) angle of attack.

70 75 80 85 90 95 1001

1.5

2

2.5

Duty Cycle [Percent]

Vel

oci

ty [

m/s

]

Vicon

Simulation

Figure 3.6: Comparison between Vicon (red)and simulation (blue) velocity magnitude.

70 75 80 85 90 95 10045

50

55

Duty Cycle [Percent]

Pit

ch [

Deg

rees

]

Vicon

Simulation

Figure 3.7: Comparison between Vicon (red) and simulation (blue) pitch angle.

Page 20: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 3. SIMULATION RESULTS 18

70 75 80 85 90 95 100−0.06

−0.04

−0.02

0

0.02

0.04

Duty Cycle [Percent]

Forw

ard F

orc

e [N

]

Vicon

Simulation

Figure 3.8: Comparison between Vicon (red)and simulation (blue) horizontal force atequilibrium.

70 75 80 85 90 95 100−0.015

−0.01

−0.005

0

0.005

0.01

0.015

Duty Cycle [Percent]

Ver

tica

l F

orc

e [N

]

Vicon

Simulation

Figure 3.9: Comparison between Vicon (red)and simulation (blue) vertical force at equi-librium.

70 75 80 85 90 95 100−0.5

0

0.5

1

1.5

2

Duty Cycle [Percent]

Pit

ch M

om

ent

[N*m

m]

Vicon

Simulation

Figure 3.10: Comparison between Vicon (red) and simulation (blue) pitch moment at equilibrium.

Page 21: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

19

Chapter 4

Yaw Plane Simulation

The yaw plane dynamics of the ornithopter are modeled using a one-dimensional model to reducecomputational complexity. The model is used in a simulation framework that is used to determinethe feasibility of the cooperative control experiment described in Section 1.2.

4.1 Yaw Dynamics

The turning dynamics of the ornithopter in the ”Internal Control Loop” block in Figure 1.5 aremodeled using a one-dimensional model (Equation 1.2). To determine the constants K and R in theturning model, the step response of the ornithopter for an input of a clockwise 90 degree turn wasdetermined. The response of the system was recorded using the attitude estimates calculated on-board the ornithopter using its gyroscope. The results of the experiment are shown in Figure 4.1.Using MATLAB, the low order model in Equation 1.2 was fitted to the step response. The resultingmodel is:

θ(s) =0.95

1 + 0.62su(s) (4.1)

Additionally, the step response rise time was 1.4 seconds and the ornithopter flies at an averageforward velocity of 1.2 m/s for these experiments, thus the estimated minimum turning radius ofthe robot is 1.07 m.

The remainder of the parameters, such as the camera and transmission latencies and the externalPID constants, are determined through methods detailed in [7]. This system layout is used topredict the success of the single-view tracking and guidance of the ornithopter to the window.

4.2 Yaw Model Validation

The turning model in conjunction with the total cooperative system model, is meant to simulatethe cooperative control problem of guiding the ornithopter through a window of 0.66 m by 0.94 mdimensions. To validate the turning model defined in Section 4.1, several experiments were con-ducted to determine the feasible and infeasible initial condition locations for successful navigationto the window.

To determine the success rates in various locations of the view plane, 80 experimental trialswere conducted in which the ground station tracks the location of the ornithopter with the camera

Page 22: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 4. YAW PLANE SIMULATION 20

−2 0 2−0.2

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

Time [sec]

Yaw

Ro

tati

on [

rad

]

Reference YawMeasured YawFitted Model

Figure 4.1: The step response of the ornithopter to a clockwise 90 degree turn.

and attempts to guide it to the window by transmitting a desired heading to the ornithopter. Foreach trial, the ornithopter was launched by hand and oriented perpendicular to the window plane,although human error and the initial launch transient added some variation to this heading. Of the80 trials, 20 were initiated from 0.8 m directly in front of the camera, and 60 were initiated in 5 cmincrements from the window plane on the edges of the view space. The results of the experimentsare in Figures 4.2 and 4.3. The success rate in front of the camera was 80 percent, and the successrate around the edges of the view plane was 50 percent.

To validate the model, two experiments were conducted in simulation. The first simulationexperiment was to calculate the geometrically infeasible region in which it is impossible for theornithopter to reach the window due to constraints on the minimum turning radius of 1.07 m. Thisregion is overlayed with the infeasible region calculated by the simulation. For each scenario, theornithopter is assumed to begin with an initial heading facing the window plane. The results areshown in Figure 4.4, with each marker representing a starting location in a 5 cm grid in the cameraview space. Although this result provides some information about the regions in which successfulcontrol is possible, it does not provide any explanation about why a higher success rate in themiddle of the view space opposed to the edges of the view space was observed, even though bothlocations are technically feasible. To explain this result, a Monte Carlo simulation of the systemwas performed.

The trajectory of the ornithopter was simulated using initial translational positions in a 10 cmgrid in the view space, and the initial heading was randomly sampled from a uniform distributionof headings between -90 degrees (left, parallel to window plane) and +90 degrees (right, parallel

Page 23: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 4. YAW PLANE SIMULATION 21

−2 −1 0 1 2

0

1

2

3

4

x [meters]

y [

met

ers]

Success

Failure

Figure 4.2: Plot of camera field of view andexperimental trials within the feasible region.

−2 −1 0 1 2

0

1

2

3

4

x [meters]

y [

met

ers]

Success

Failure

Figure 4.3: Plot of camera field-of-view andperimeter experimental trials overlayed.

to window plane). Forty trials were conducted in each location within the grid. The results of theexperiments are illustrated in Figure 4.5. The circled region represents the initial location of theexperimental trials shown in Figure 4.2.

Page 24: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 4. YAW PLANE SIMULATION 22

−2 −1 0 1 2

0

1

2

3

4

5

x [meters]

y [

met

ers]

Feasible Region

Geometric and Simulation Infeasible Region

Simulation Infeasible Region

Figure 4.4: Plot of backwards reachable setfor successful window traversal.

Figure 4.5: Probability of success, resultingfrom a Monte Carlo simulation of the reach-able set model, for all starting locations.

Page 25: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

23

Chapter 5

Conclusions and Analysis

This report has presented two software tools implemented in MATLAB to simulate a 13.6 g or-nithopter in the sagittal plane and horizontal plane. Each of these simulations were compared totrue flight data collected using a Vicon motion capture system to determine their accuracy.

5.1 Sagittal Plane Simulation

The sagittal plane simulation computes the steady-state motion of the ornithopter with the dutycycle of the motor wing drive as an input. The motion is computed based upon wind tunnelaerodynamics adjusted using known true flight equilibrium points.

The results of the simulation are shown in Figures 3.1 through 3.4, and the steady-state com-parison between the simulation and true flight is shown in Figures 3.5 through 3.7. As indicated inthe angle of attack comparison between the true flight and simulation data, the simulation closelyfollows the trend exhibited by the true flight of the ornithopter. The same cannot be said for therelationship between the velocities. The steady-state velocity follows the same trend for both thetrue and simulation flight within 0.3 m/s for duty cycles up to 85 percent. For duty cycles above85 percent, however, the steady-state velocity decreases in simulation but increases in reality forincreasing duty cycle.

The limitation in the accuracy of the velocity of the ornithopter in simulation could be causedby several factors. The equilibrium shift used for the wind tunnel data only exactly defines theequilibrium point at 85 percent duty cycle. This fact is illustrated in Figures 3.8 through 3.10.The two points are very close for the forward and vertical forces and pitch moment for 85 percentduty cycle. For the duty cycles above 85 percent, the pitch moment is very close to zero in steadystate for the simulation, but greater than 0.8 N·mm for the equilibrium points collected from theVicon. A zero pitch moment is important for the passive stability in the simulation and the pitchmoment is dependent on the angle of attack, duty cycle, and velocity. Since the duty cycles atthese equilibrium points are equal for the Vicon and simulation and the angles of attack are close,the velocity measured using the Vicon does not correspond to a stable equilibrium point in thewind tunnel surfaces. This variation is expected, since the aerodynamic interactions caused by thepitching motion of the ornithopter in true flight are absent from the data used for the simulation.Additionally, the flapping forces and moments in still air and the aerodynamic forces and momentsfor still wings in moving air were measured separately and added together. This method causes

Page 26: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

CHAPTER 5. CONCLUSIONS AND ANALYSIS 24

some error in estimating the affects of the forces and moments caused by the airflow when it isdisturbed by the flapping wings.

5.2 Yaw Plane Simulation

The yaw model simulation computes the motion of the ornithopter in the horizontal plane witha desired heading as an input. The model encompasses both the internal PID controller thatcomputes the necessary yaw motor input as well as the yaw dynamics of the ornithopter.

The true flight results of the ornithopter in the cooperative control system corroborates themodel for the turning dynamics. As shown in Figures 4.2 and 4.3, the true flight tests yielded an80 percent success rate in front of the camera and a 50 percent success rate along the edges ofthe view space. While these locations in the view space are technically feasible, as supported bythe geometric and simulation backwards reachable sets in Figure 4.3, the Monte Carlo experimentsprovide more insight about the reduced success rate along the edges of the view space.

There are several factors that contribute to the lower success rate experienced on the edgesof the view space. The monocular vision control scheme has no notion of depth, so the controlalgorithm provides the same desired heading to the ornithopter whether it is close to the camera,where small changes in heading are adequate, or far away from the camera, where larger changesin heading are necessary to navigate to the window. Another factor that contributes to the lowersuccess rate is noise in the launch by hand of the ornithopter at the beginning of the experiment.Small changes in initial heading, or disturbances caused by a hand can cause the ornithopter to flyout of the view plane or begin flight in an erratic manner making it impossible to reach the windowsuccessfully. Both of these causes of error are captured in the Monte Carlo experiment with therandomly selected initial headings and the lack of depth considerations in the calculation of thecontrol inputs.

5.3 Future Work

In the future, the sagittal plane and horizontal plane simulations will be combined into a threedimensional simulation for the ornithopter. In terms of possible uses, the simulation could be usedto determine what sorts of flight maneuvers are possible for the ornithopter. This informationcould lead to model-inspired redesigns of the platform to increase maneuverability. Additionally,the development of this model allows for more sophisticated control schemes to be implemented onthe ornithopter such as LQR and MPC to generate optimal control paths to a goal.

Although the simulator is an accurate predictor of the flight path of the ornithopter, there aresome differences between the true flight and simulated flight, especially in terms of steady statevelocity. In the future, it would be useful to examine the airflow around the ornithopter with thewings flapping and without using Particle Image Velocimetry (PIV) to determine exactly how theair moves over the control surfaces. This experiment could provide some insight as to what typesof interactions are missing in the wind tunnel data collection.

Page 27: Flight Simulation of an Ornithopter - EECS at UC Berkeley | · Flight Simulation of an Ornithopter Cameron Rose Ronald S. Fearing Electrical Engineering and Computer Sciences University

25

Bibliography

[1] S.S. Baek, F.L. Garcia Bermudez, and R.S. Fearing. “Flight Control for Target Seeking by 13gram Ornithopter.” In: IEEE Int.l Conf. on Intelligent Robots and Systems. 2011, pp. 2674–2681.

[2] S.S. Baek and R.S. Fearing. “Flight forces and altitude regulation of 12 gram I-Bird”. In:IEEE Int.l Conf. on Biomedical Robotics and Biomechatronics. 2010, pp. 454–460.

[3] B. Cheng and X. Deng. “Translational and Rotational Damping of Flapping Flight and ItsDynamics and Stability at Hovering”. In: IEEE Transactions on Robotics Vol. 27.5 (2011),pp. 849–864.

[4] G. C. H. E. de Croon, K. M. E. de Clercq, R. Ruijsink, B. Remes, and C. de Wagter. “Design,aerodynamics, and vision-based control of the DelFly”. In: International Journal of Micro AirVehicles Vol. 1.2 (June 2009), pp. 71–97.

[5] JH Han, JY Lee, and DK Kim. “Ornithopter Modeling for Flight Simulation”. In: Intl. Conf.on Control, Automation and Systems. 2008, pp. 1773–1777.

[6] D.G. Hull. Fundamentals of Airplane Flight Mechanics. 1st. Springer Publishing Company,Inc., 2007.

[7] R. Julian, C. Rose, H. Hu, and R.S. Fearing. “Cooperative Control for Window Traversal withan Ornithopter MAV and Lightweight Ground Station”. In: 12th Intl. Conf. on AutonomousAgents and Multiagent Systems, 2013. Proceedings. 2013.

[8] Z.A. Khan and S.K. Agrawal. “Control of Longitudinal Flight Dynamics of a Flapping-WingMicro Air Vehicle Using Time-Averaged Model and Differential Flatness Based Controller”.In: American Control Conference. 2007, pp. 5284–5289.

[9] S. M. LaValle. Planning Algorithms. Available at http://planning.cs.uiuc.edu/. Cambridge,U.K.: Cambridge University Press, 2006.

[10] A. T. Pfeiffer, JS Lee, JH Han, and H. Baier. “Ornithopter Flight Simulation Based onFlexible Multi-Body Dynamics”. In: Journal of Bionic Engineering Vol. 7.1 (2010), pp. 102–111.

[11] L. Schenato, D. Campolo, and S. Sastry. “Controllability issues in flapping flight for biomimeticmicro aerial vehicles (MAVs)”. In: 42nd IEEE Conf. on Decision and Control. Vol. 6. 2003,pp. 6441–6447.