AEROSIM BLOCKSET
Version 1.2
User’s Guide
Unmanned Dynamics, LLC
No.8 Fourth St.
Hood River, OR 97031
(503) 329-3126
http://www.u-dynamics.com
info@u-dynamics.com
Contents
1 Introduction 1
1.1 Software Changes from Version 1.1 to 1.2 . . . . . 1
1.2 Software Changes from Version 1.01 to 1.1 . . . . 1
1.3 Software Changes from Version 1.0 to 1.01 . . . . 2
1.4 New Features for Version 1.01 . . . . . . . . . . . 2
1.5 Keeping up-to-date with the AeroSim Blockset:
The AeroSim Mailing List . . . . . . . . . . . . . 3
1.6 System Requirements . . . . . . . . . . . . . . . . 3
1.7 Contents of the installation CD . . . . . . . . . . . 3
1.8 Install the AeroSim Blockset . . . . . . . . . . . . 4
1.9 Uninstall the AeroSim Blockset . . . . . . . . . . 4
1.10 Library Description . . . . . . . . . . . . . . . . . 5
2 Aircraft Model Demos 7
2.1 Open-loop Flight . . . . . . . . . . . . . . . . . . 8
2.2 Lateral Control . . . . . . . . . . . . . . . . . . . 9
2.3 Airspeed Control . . . . . . . . . . . . . . . . . . 10
2.4 Wind Effects . . . . . . . . . . . . . . . . . . . . 13
2.5 Inertial Navigation . . . . . . . . . . . . . . . . . 15
2.6 Joystick Control . . . . . . . . . . . . . . . . . . . 16
2.7 Interfacing to FlightGear Flight Simulator . . . . . 17
2.8 Interfacing to Microsoft Flight Simulator . . . . . . 19
AeroSim Blockset User’s Guide CONTENTS
2.9 FlightGear Aircraft Demos . . . . . . . . . . . . . 21
2.10 Aircraft Model Trim and Linearization . . . . . . . 22
3 Setting-up and Running an Aircraft Model 27
3.1 Aircraft Model Examples . . . . . . . . . . . . . . 28
3.2 Building an aircraft configuration . . . . . . . . . . 29
3.2.1 Conventions . . . . . . . . . . . . . . . . 29
3.2.2 Section 1: Aerodynamics . . . . . . . . . . 29
3.2.3 Section 2: Propeller . . . . . . . . . . . . 30
3.2.4 Section 3: Engine . . . . . . . . . . . . . . 31
3.2.5 Section 4: Inertia . . . . . . . . . . . . . . 32
3.2.6 Section 5: Other parameters . . . . . . . . 32
3.3 The pre-built Aircraft Models . . . . . . . . . . . . 33
3.4 Using FlightGear Aircraft Configuration Files . . . 36
3.4.1 The JSBSim XML Configuration File . . . 36
3.4.2 The xmlAircraft Parser . . . . . . . . . . . 37
3.4.3 The Matlab Aircraft Structure . . . . . . . 38
3.5 Additional Matlab Utilities . . . . . . . . . . . . . 41
4 Block Reference 42
4.1 Actuators . . . . . . . . . . . . . . . . . . . . . . 43
4.1.1 Simple Actuator (1st-order dynamics) . . . 44
4.1.2 Simple Actuator (2nd-order dynamics) . . 46
4.1.3 D/A Converter . . . . . . . . . . . . . . . 47
4.2 Aerodynamics . . . . . . . . . . . . . . . . . . . . 48
4.2.1 Aerodynamic Force . . . . . . . . . . . . . 49
4.2.2 Aerodynamic Moment . . . . . . . . . . . 50
4.2.3 Wind-axes Velocities . . . . . . . . . . . . 51
4.2.4 Dynamic Pressure . . . . . . . . . . . . . 53
4.2.5 Lift Coefficient . . . . . . . . . . . . . . . 54
4.2.6 Drag Coefficient . . . . . . . . . . . . . . 56
4.2.7 Side Force coefficient . . . . . . . . . . . . 58
4.2.8 Pitch Moment Coefficient . . . . . . . . . 59
4.2.9 Roll Moment Coefficient . . . . . . . . . . 61
4.2.10 Yaw Moment Coefficient . . . . . . . . . . 62
4.3 Atmosphere . . . . . . . . . . . . . . . . . . . . . 63
4.3.1 Standard Atmosphere . . . . . . . . . . . . 64
4.3.2 Background Wind . . . . . . . . . . . . . 65
4.3.3 Turbulence . . . . . . . . . . . . . . . . . 66
4.3.4 Wind Shear . . . . . . . . . . . . . . . . . 67
4.4 Complete Aircraft . . . . . . . . . . . . . . . . . . 68
4.4.1 6-DOF Aircraft Model - body-frame EOM 69
4.4.2 6-DOF Aircraft Model - geodetic-frame EOM 72
4.4.3 6-DOF Aircraft Model - geodetic-frame EOM,
no magnetic field . . . . . . . . . . . . . . 75
4.4.4 Simple Aircraft Model . . . . . . . . . . . 78
4.4.5 Glider Model . . . . . . . . . . . . . . . . 80
4.4.6 Inertial Navigation System . . . . . . . . . 82
4.5 Earth . . . . . . . . . . . . . . . . . . . . . . . . . 83
4.5.1 WGS-84 . . . . . . . . . . . . . . . . . . 84
4.5.2 EGM-96 . . . . . . . . . . . . . . . . . . 85
4.5.3 Ground Detection . . . . . . . . . . . . . . 86
4.5.4 WMM-2000 . . . . . . . . . . . . . . . . 87
4.6 Equations of Motion . . . . . . . . . . . . . . . . 88
4.6.1 Total Acceleration . . . . . . . . . . . . . 89
4.6.2 Total Moment . . . . . . . . . . . . . . . . 90
4.6.3 Body-frame EOM: Forces . . . . . . . . . 91
4.6.4 Body-frame EOM: Moments . . . . . . . . 92
4.6.5 Body-frame EOM: Kinematics (Quaternions) 93
2
CONTENTS AeroSim Blockset User’s Guide
4.6.6 Body-frame EOM: Kinematics (Euler An-
gles) . . . . . . . . . . . . . . . . . . . . . 94
4.6.7 Body-frame EOM: Navigation . . . . . . . 95
4.6.8 Geodetic-frame EOM: Position . . . . . . 97
4.6.9 Geodetic-frame EOM: Velocity . . . . . . 99
4.6.10 Geodetic-frame EOM: Attitude (Quaternions)101
4.6.11 Geodetic-frame EOM: Attitude (Euler An-
gles) . . . . . . . . . . . . . . . . . . . . . 102
4.6.12 Geodetic-frame EOM: Angular Rate . . . . 103
4.7 Inertia . . . . . . . . . . . . . . . . . . . . . . . . 105
4.7.1 Aircraft Inertia . . . . . . . . . . . . . . . 106
4.7.2 Inertia Coefficients . . . . . . . . . . . . . 108
4.8 Math . . . . . . . . . . . . . . . . . . . . . . . . . 109
4.8.1 Cross Product . . . . . . . . . . . . . . . . 110
4.8.2 Normalization . . . . . . . . . . . . . . . 111
4.8.3 Vector Norm . . . . . . . . . . . . . . . . 112
4.8.4 Non-zero Sign . . . . . . . . . . . . . . . 113
4.8.5 Zero Offset . . . . . . . . . . . . . . . . . 114
4.8.6 pi Bound . . . . . . . . . . . . . . . . . . 115
4.8.7 2pi Bound . . . . . . . . . . . . . . . . . . 116
4.9 Pilot Interface . . . . . . . . . . . . . . . . . . . . 117
4.9.1 FS Interface . . . . . . . . . . . . . . . . . 118
4.9.2 FlightGear Interface . . . . . . . . . . . . 120
4.9.3 FlightGear 0.9.4 Interface . . . . . . . . . 122
4.9.4 Joystick Interface . . . . . . . . . . . . . . 124
4.9.5 CH F-16 Combat Stick . . . . . . . . . . . 125
4.9.6 R/C Transmitter Interface . . . . . . . . . 127
4.10 Propulsion . . . . . . . . . . . . . . . . . . . . . . 129
4.10.1 Fixed-Pitch Propeller . . . . . . . . . . . . 130
4.10.2 Piston Engine . . . . . . . . . . . . . . . . 131
4.10.3 GA Propulsion System . . . . . . . . . . . 133
4.11 Sensors . . . . . . . . . . . . . . . . . . . . . . . 135
4.11.1 Noise Correlation: Random Walk . . . . . 136
4.11.2 Noise Correlation: Gauss-Markov Process . 137
4.11.3 Simple Sensor - 1st-order dynamics . . . . 138
4.11.4 Simple Sensor - 2nd-order dynamics . . . . 139
4.11.5 Analog Sensor . . . . . . . . . . . . . . . 140
4.11.6 A/D Converter . . . . . . . . . . . . . . . 141
4.11.7 Single GPS Measurement . . . . . . . . . 142
4.11.8 GPS PV . . . . . . . . . . . . . . . . . . . 143
4.12 Transformations . . . . . . . . . . . . . . . . . . . 144
4.12.1 Body-Inertial DCM From Quaternions . . . 145
4.12.2 Body-Inertial DCM From Euler Angles . . 146
4.12.3 Body-Wind DCM . . . . . . . . . . . . . . 147
4.12.4 Euler Angles From Quaternions . . . . . . 148
4.12.5 Euler Angles from DCM . . . . . . . . . . 149
4.12.6 Quaternions From Euler Angles . . . . . . 150
4.12.7 ECEF Position . . . . . . . . . . . . . . . 151
4.13 Unit Conversion . . . . . . . . . . . . . . . . . . . 152
4.13.1 Angular position: Deg 2 rad and Rad 2 deg 153
4.13.2 Angular velocity: Rad/s 2 RPM and RPM
2 rad/s . . . . . . . . . . . . . . . . . . . . 154
4.13.3 Distance: ft 2 m and m 2 ft . . . . . . . . . 155
4.13.4 Distance: m 2 nm and nm to m . . . . . . . 156
4.13.5 Velocity: m/s 2 km/h and km/h 2 m/s . . . 157
4.13.6 Velocity: m/s 2 mph and mph 2 m/s . . . . 158
4.13.7 Velocity: m/s 2 kts and kts 2 m/s . . . . . . 159
4.13.8 Force: lbf 2 N and N 2 lbf . . . . . . . . . 160
4.13.9 Mass: lb 2 kg and kg 2 lb . . . . . . . . . . 161
4.13.10 Mass: slug 2 kg and kg 2 slug . . . . . . . 162
3
4.13.11 Volume: gal 2 l and l 2 gal . . . . . . . . . 163
4.13.12 Pressure: Pa 2 in.Hg. and in.Hg. 2 Pa . . . 164
4.13.13 Temperature: K 2 F and F 2 K . . . . . . . 165
4.14 FlightGear-Compatible . . . . . . . . . . . . . . . 166
4.14.1 Inertia: Empty Aircraft . . . . . . . . . . . 167
4.14.2 Inertia: Point Mass . . . . . . . . . . . . . 168
4.14.3 Propulsion: FG Piston Engine + Fixed-
Pitch Prop . . . . . . . . . . . . . . . . . . 169
4.14.4 Propulsion: FG Piston Engine + Variable-
Pitch Prop . . . . . . . . . . . . . . . . . . 171
4.14.5 Piston Engine: Intake Model . . . . . . . . 173
4.14.6 Piston Engine: AirFlow Model . . . . . . . 174
4.14.7 Piston Engine: FuelFlow Model . . . . . . 175
4.14.8 Piston Engine: Power Model . . . . . . . . 176
4.14.9 Piston Engine: FG Piston Engine . . . . . 177
4.14.10 Propeller Thruster: FG Fixed-Pitch Propeller178
4.14.11 Propeller Thruster: FG Variable-Pitch Pro-
peller . . . . . . . . . . . . . . . . . . . . 179
4.14.12 Tank: Fuel Tank . . . . . . . . . . . . . . 180
4.14.13 Aerodynamics: Value . . . . . . . . . . . . 181
4.14.14 Aerodynamics: Vector . . . . . . . . . . . 182
4.14.15 Aerodynamics: Table . . . . . . . . . . . . 183
4.14.16 Aerodynamics: Coefficient . . . . . . . . . 184
4.14.17 Complete Aircraft: Cessna-172 . . . . . . 185
4.14.18 Complete Aircraft: Cessna-182 . . . . . . 187
4.14.19 Complete Aircraft: Cessna-310 . . . . . . 189
评论27
最新资源