full text 20
TRANSCRIPT
-
8/11/2019 Full Text 20
1/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 forAutonomous 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. URLhttp://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. PreliminaryDesign of Sliding Mode Controller for Angualr Positional Tracking ofan 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. FlightPID controller design for a UAV quadrotor. 2010.
R. Skjetne, T. I. Fossen, and P. V. Kokotovic. Robust output maneuveringfor 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 vehiclesystem association - advantages, 2012a. URL http://www.uavs.org/advantages.
Unmanned Aerial Vehicle System Association. Unmanned aerial vehiclesystem association - uav or uas, 2012b. URLhttp://www.uavs.org/advantages.
-
8/11/2019 Full Text 20
2/11
BIBLIOGRAPHY 69
V. Utkin. Sliding Modes in Control and Optimization. Com-munications 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. PrenticeHall, 2002. ISBN 9780130415295. URL http://books.google.no/books?id=CgNEAQAAIAAJ.
Wikipedia - PID. Pid controller wikipedia, the free encyclope-dia, 2012. URLhttp://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/.
-
8/11/2019 Full Text 20
3/11
-
8/11/2019 Full Text 20
4/11
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 Earthsreference ellipsoid. Usually it is defined as the tangent plane on the surfaceof the Earth moving with the craft and with the x-axis pointing North, y-axis pointing East and the z-axis pointing down to the center of Earth,vertical position.
Controllability, Chen[1999]
Definition 2. The state equationx=Ax+Buor the pair (A,B) is saidto becontrollable if for any initial statex(0) = x0 and any final statex1,there exist an input that transfersx0 to x1 in a finite time. Otherwise thestate equation or (A,B) is said to beuncontrollable.
Barbalats lemma, Khalil [2002]
Lemma 1. Let: R R be a uniformly continuous function on [0,).Suppose that limt
t
0()dexists and is finite. Then,
(t) 0 as t
71
-
8/11/2019 Full Text 20
5/11
-
8/11/2019 Full Text 20
6/11
Appendix B
Attachment Description and
Matlab Code
B.1 Attachment Description
Attached to this thesis is a folder namedMatlab, where all the Matlab codeand 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 AppendixB.2. To set up your computer forX-Plane simulation, follow the small guide in Appendix C.
The code is structured as in Figure B.1and organized as:
.m-files
SimGNCSystem.m - The main run file, simulates the different casestudies.
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 touse in sliding mode control.
ordlsq.m - Ordinary least square system identification function.
73
-
8/11/2019 Full Text 20
7/11
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 identifica-tion, 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 inter-face with PID control.
GNCSystem PID SI.mdl - The whole GNC system and X-Plane in-terface with PID control and system identification measurements.
GNCSystem SM.mdl - The whole GNC system and X-Plane inter-face with sliding mode control.
Figure B.1: Code Structure
-
8/11/2019 Full Text 20
8/11
B.2. MATLAB CODE 75
B.2 Matlab Code
B.2.1 Simulation of GNC System
1 %% Simulation of simulink model GNCSystem XXX.mdl
2 %
3 %
4 %
5 % Author: Ingrid Hagen Johansen
6 % Master Thesis Spring 2012
7 % Date: 26.05.2012
8 %
9 % Thanks to: Thor I. Fossen10 %
11 %
12
13 clc;
14 clear all;
15 close all;
16
17
18 %% Initialize
19 % Set waypoints [North East Altitude]
20
% The Waypoints are selected for take21 % at Vaernes (ENVA), Norway.
22 %
23 Way points = [0 0 0;
24 0 8000 500;
25 10000 8000 500;
26 10000 32000 500];
27
28
29 % Without payload
30 payload = 0; % [kg]
31
32 % With payload
33 % payload = 378; % [kg]
34
35 % Speed
36 takeoff speed = 80; %[kt]
37 cruise speed = 48; %[kt]
38
39 % If wind, +30 kt
-
8/11/2019 Full Text 20
9/11
76APPENDIX B. ATTACHMENT DESCRIPTION AND MATLAB CODE
40 cruise speed = cruise speed + 30; %[kt]
41
42 % System Identification
43 systemIdentification44 poler = [0.00006 0.00003];
45
46 % Initialize
47
48 initGNC
49
50
51 %% Simulation
52
53 % Simulation with PID control
54 sim('GNCSystem PID')55 %
56 % Simulation with Sliding Mode Control
57 % for pitch and altitude
58 % sim('GNCSystem SM pitch')
59
60 %% Plot
61
62 plots
B.2.2 Initialize GNC System
1 %% Info
2 %
3 % Initialization file for the Guidance,
4 % Navigation and Control System (GNC)
5 %
6 %
7 % Aircraft used in simulation is the Cessna 172SP
8 % Length: 27 ft 2 in (8.28 m)
9 % Height: 8 ft 11 in (2.72 m)
10 % Wingspan: 36 ft 1 in (11.00 m)
11 % Wing area: 174 sq ft (16.20 m2)
12 % Weight: 1,717 lb (779 kg)
13 %
14 % Max Takeoff Weight: 2,550 lb (1 157 kg)
15 % Max Payload Weight: 833 lb (378 kg)
16 %
-
8/11/2019 Full Text 20
10/11
B.2. MATLAB CODE 77
17 %
18 % Author: Ingrid Hagen Johansen
19 % Master Thesis Spring 2012
20 % Date: 26.05.201221 %
22 % Thanks to: Thor I. Fossen
23 %
24 %
25 %% Initialize simulation
26 %
27 %
28
29 % Initialize simulation variables
30
31 sim start = 0.0;32 sim stop = 400;
33
34 % Real time setings
35 realtime.scalingfactor = 0.05;
36
37
38 % Physics
39
40 % Payload
41 init payload = [payload 0 0 0 0 0;
42 0 payload 0 0 0 0;
43 0 0 payload 0 0 0;
44 0 0 0 0 0 0;
45 0 0 0 0 0 0;
46 0 0 0 0 0 0];
47
48 physics.g = 9.81;
49 mass = [743.44 0 0 0 0 0;
50 0 743.44 0 0 0 996.21;
51 0 0 743.44 0 996.21 0;
52 0 0 0 2008.76 0 0;
53 0 0 996.21 0 3827.04 0;
54 0
996.21 0 0 0 5408.32]+ init payload;55
56
57
58 %% Xplane Interface
59
60 x plane interface
61
-
8/11/2019 Full Text 20
11/11
78APPENDIX B. ATTACHMENT DESCRIPTION AND MATLAB CODE
62
63
64 %% Reference Model
65
66 % Commanded Speed [kt]
67 reference.commandedSpeed.time = [0 150 150 sim stop];
68 reference.commandedSpeed.signals.values = [takeoff speed;
69 takeoff speed;
70 cruise speed;
71 cruise speed];
72 reference.commandedSpeed.signals.dimension = 1;
73
74
75 % Commanded Altitude
76 reference.commandedHeight.time = [0 10 10 sim stop];77 reference.commandedHeight.signals.values=[Way points(1,3);
78 Way points(1,3);
79 Way points(2,3);
80 Way points(2,3)];
81 reference.commandedHeight.signals.dimension = 1;
82
83 reference.lp.height.omega = 0.05;
84
85
86 %% Guidance
87
88
89 % Kp Kinematic Control Altitude
90 guidance.altitude.Kp = 1;
91
92 % LOS Guidance
93 % Calculate waypoint matrix for NorthEast
94
95 for i = 1:length(Way points)
96 for j = 1 : 1
97 guidance.waypoints(i,j) = Way points(i,j);
98 guidance.waypoints(i,j+1) = Way points(i,j+1);
99 end100 end
101
102 % Kp = 1 / Lookahead Distance
103 guidance.los.Kp = 1/600;
104
105 % Natural Frequency Altitude LP
106 guidance.alt.lp.omega = 0.05;