Sie sind auf Seite 1von 11

68

BIBLIOGRAPHY

T. Fossen. Handbook of Marine Craft Hydrodynamics and Motion Control.


John Wiley & Sons, 2011b. ISBN 9781119991496.
A. J. Healey and D. Lienard. Multivariable Sliding-Mode Control for
Autonomous Diving and Steering of Unmanned Underwater Vehicles.
1993.
How Stuff Works. A Brief History of UAVs , 2012. URL http://science.
howstuffworks.com/reaper1.htm.
IEEE Global History Network. Biography of Elmer A. Sperry, 2012. URL
http://www.ieeeghn.org/wiki/index.php/Elmer_A._Sperry.
I. H. Johansen. UAV Autopilot Design for Recce D6. 2011.
L. J. N. Jones, C. P. Tan, Z. Man, and R. Akmeliawati. Preliminary
Design of Sliding Mode Controller for Angualr Positional Tracking of
an Aircraft. 2009.
H. Khalil. Nonlinear systems. Prentice Hall, 2002. ISBN 9780130673893.
URL http://books.google.no/books?id=t_d1QgAACAAJ.
A. L. Salih, M. Moghavvemi, H. A. F. Mohamed, and K. S. Gaeid. Flight
PID controller design for a UAV quadrotor. 2010.
R. Skjetne, T. I. Fossen, and P. V. Kokotovic. Robust output maneuvering
for a class of nonlinear systems. 2003.
The Free Dictionary. The Free Dictionary - UAV, 2012. URL http:
//www.thefreedictionary.com/unmanned+aerial+vehicle.
Unmanned Aerial Vehicle System Association. Unmanned aerial vehicle
system association - advantages, 2012a. URL http://www.uavs.org/
advantages.
Unmanned Aerial Vehicle System Association. Unmanned aerial vehicle
system association - uav or uas, 2012b. URL http://www.uavs.org/
advantages.

BIBLIOGRAPHY

69

V. Utkin.
Sliding Modes in Control and Optimization.
Communications and Control Engineering Series. Springer-Verlag, 1992.
ISBN 9783540535164.
URL http://books.google.no/books?id=
uzNmQgAACAAJ.
R. Walpole. Probability and statistics for engineers and scientists. Prentice
Hall, 2002. ISBN 9780130415295. URL http://books.google.no/
books?id=CgNEAQAAIAAJ.
Wikipedia - PID. Pid controller wikipedia, the free encyclopedia, 2012. URL http://en.wikipedia.org/w/index.php?title=PID_
controller&oldid=490210451. [Online; accessed 3-May-2012].
X-Plane 9. X-plane 9 flight simulator, 2012. URL http://www.x-plane.
com/desktop/landing/.

Appendix A

Definitions and Lemmas


North-East-Down (NED) coordinate frame, Fossen [2011b]
Definition 1. NED, North-East-Down (NED) , reference frame {n} =
(xn , yn , zn ) has its origin in on and is defined relative to the Earths
reference ellipsoid. Usually it is defined as the tangent plane on the surface
of the Earth moving with the craft and with the x-axis pointing North, yaxis pointing East and the z-axis pointing down to the center of Earth,
vertical position.
Controllability, Chen [1999]

Definition 2. The state equation x=Ax+Bu


or the pair (A,B) is said
to be controllable if for any initial state x(0) = x0 and any final state x1 ,
there exist an input that transfers x0 to x1 in a finite time. Otherwise the
state equation or (A,B) is said to be uncontrollable.
Barbalats lemma, Khalil [2002]
Lemma 1. Let : RR R be a uniformly continuous function on [0,).
t
Suppose that limt 0 ( )d exists and is finite. Then,
(t) 0

as

71

Appendix B

Attachment Description and


Matlab Code
B.1

Attachment Description

Attached to this thesis is a folder named Matlab, where all the Matlab code
and Simulink models are included, and a folder named X-plane plugin,
where the plugin for simulation with X-Plane is included. Some of the
Matlab code can be found in Appendix B.2. To set up your computer for
X-Plane simulation, follow the small guide in Appendix C.
The code is structured as in Figure B.1 and organized as:
.m-files
SimGNCSystem.m - The main run file, simulates the different case
studies.
initGNC.m - Initializes the aircraft and the GNC system.
x plane interface.m - Initializes the X-Plane communication block.
systemIdentification.m - System identification for finding a model to
use in sliding mode control.
ordlsq.m - Ordinary least square system identification function.

73

74APPENDIX B. ATTACHMENT DESCRIPTION AND MATLAB CODE


SM delta e.m - Sliding mode for pitch and altitude.
plots.m - Plots the simulated case.
.mat-files
measuredSignals.mat - Storage of data for use in system identification, measured from X-Plane.
delta.mat - Storage of data for use in system identification, aileron,
elevator, rudder and thrust measurements.
.mdl-files
GNCSystem PID.mdl - The whole GNC system and X-Plane interface with PID control.
GNCSystem PID SI.mdl - The whole GNC system and X-Plane interface with PID control and system identification measurements.
GNCSystem SM.mdl - The whole GNC system and X-Plane interface with sliding mode control.

Figure B.1: Code Structure

B.2. MATLAB CODE

B.2
B.2.1

1
2
3
4
5
6
7
8
9
10
11

Matlab Code
Simulation of GNC System

%% Simulation of simulink model GNCSystem XXX.mdl


%
%
%
%
Author: Ingrid Hagen Johansen
%
Master Thesis Spring 2012
%
Date: 26.05.2012
%
%
Thanks to: Thor I. Fossen
%
%

12
13
14
15

clc;
clear all;
close all;

16
17
18
19
20
21
22
23
24
25
26

%% Initialize
%
Set waypoints [North East Altitude]
%
The Waypoints are selected for take
%
at Vaernes (ENVA), Norway.
%
Way points = [0 0 0;
0 8000 500;
10000 8000 500;
10000 32000 500];

27
28
29
30

% Without payload
payload = 0; % [kg]

31
32
33

% With payload
% payload = 378; % [kg]

34
35
36
37

% Speed
takeoff speed = 80; %[kt]
cruise speed = 48; %[kt]

38
39

% If wind, +30 kt

75

76APPENDIX B. ATTACHMENT DESCRIPTION AND MATLAB CODE


cruise speed = cruise speed + 30; %[kt]

40
41

% System Identification
systemIdentification
poler = [0 .00006 0.00003];

42
43
44
45
46

Initialize

47

initGNC

48
49
50
51

%% Simulation

52
53

54
55
56
57
58

Simulation with PID control


sim('GNCSystem PID')

%
%
Simulation with Sliding Mode Control
%
for pitch and altitude
% sim('GNCSystem SM pitch')

59
60

%% Plot

61

plots

62

B.2.2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Initialize GNC System

%% Info
%
%
Initialization file for the Guidance,
%
Navigation and Control System (GNC)
%
%
%
Aircraft used in simulation is the Cessna 172SP
%
Length:
27 ft 2 in
(8.28 m)
%
Height:
8 ft 11 in
(2.72 m)
%
Wingspan:
36 ft 1 in
(11.00 m)
%
Wing area: 174 sq ft
(16.20 m2)
%
Weight:
1,717 lb
(779 kg)
%
%
Max Takeoff Weight: 2,550 lb
(1 157 kg)
%
Max Payload Weight:
833 lb
(378 kg)
%

B.2. MATLAB CODE

17
18
19
20
21
22
23
24
25
26
27

%
%
%
%
%
%
%
%
%%
%
%

Author: Ingrid Hagen Johansen


Master Thesis Spring 2012
Date: 26.05.2012
Thanks to: Thor I. Fossen

Initialize simulation

28
29

% Initialize simulation variables

30
31
32

sim start = 0.0;


sim stop = 400;

33
34
35

% Real time setings


realtime.scalingfactor = 0.05;

36
37
38

% Physics

39
40
41
42
43
44
45
46

% Payload
init payload = [payload 0 0 0 0 0;
0 payload 0 0 0 0;
0 0 payload 0 0 0;
0 0 0 0 0 0;
0 0 0 0 0 0;
0 0 0 0 0 0];

47
48
49
50
51
52
53
54

physics.g = 9.81;
mass = [743.44 0 0 0 0 0;
0 743.44 0 0 0 996.21;
0 0 743.44 0 996.21 0;
0 0 0 2008.76 0 0;
0 0 996.21 0 3827.04 0;
0 996.21 0 0 0 5408.32]+ init payload;

55
56
57
58

%% Xplane Interface

59
60
61

x plane interface

77

78APPENDIX B. ATTACHMENT DESCRIPTION AND MATLAB CODE

62
63
64

%% Reference Model

65
66
67
68
69
70
71
72

% Commanded Speed [kt]


reference.commandedSpeed.time = [0 150 150 sim stop];
reference.commandedSpeed.signals.values = [takeoff speed;
takeoff speed;
cruise speed;
cruise speed];
reference.commandedSpeed.signals.dimension = 1;

73
74
75
76
77
78
79
80
81

% Commanded Altitude
reference.commandedHeight.time = [0 10 10 sim stop];
reference.commandedHeight.signals.values=[Way points(1,3);
Way points(1,3);
Way points(2,3);
Way points(2,3)];
reference.commandedHeight.signals.dimension = 1;

82
83

reference.lp.height.omega = 0.05;

84
85
86

%% Guidance

87
88
89
90

% Kp Kinematic Control Altitude


guidance.altitude.Kp = 1;

91
92
93

% LOS Guidance
% Calculate waypoint matrix for NorthEast

94
95
96
97
98
99
100

for i = 1:length(Way points)


for j = 1:1
guidance.waypoints(i,j) = Way points(i,j);
guidance.waypoints(i,j+1) = Way points(i,j+1);
end
end

101
102
103

% Kp = 1 / Lookahead Distance
guidance.los.Kp = 1/600;

104
105
106

% Natural Frequency Altitude LP


guidance.alt.lp.omega = 0.05;

Das könnte Ihnen auch gefallen