WOLFRAM SYSTEM MODELER

GettingStarted

Getting Started

Wolfram Language

In[1]:=
SystemModel["Aircraft.GettingStarted"]
Out[1]:=

Information

The Aircraft library enables the user to model and simulate the flight of an aircraft design. This guide introduces how the properties of an existing aircraft design are entered into the library and how a model is created to simulate the flight of an aircraft controlled by an autopilot. Furthermore, the use of the weight estimation method in aircraft sizing of an early aircraft design is presented.

An introduction to the theory for modeling the flight of an aircraft and the contents of the Aircraft library are presented in Introduction. Basic knowledge of System Modeler is assumed for this guide. We recommend that you have a look at the learning resources at http://www.wolfram.com/system-modeler/resources if you are not familiar with System Modeler.

The Aircraft library contains two modeling environments, in which aircraft and their flight can be modeled and simulated. The following sections introduce how to set up a model for simulating the flight of the linear state space and nonlinear physical aircraft models.

Simulating the Flight of a Nonlinear Physical Aircraft Model

To set up a model for simulating the flight of a nonlinear physical aircraft model, the first thing is to have at least one physical aircraft model. In Figure 1, the diagram view of a top-level model to simulate the flight of a physical model of the Boeing 737-800 is shown. The aircraft may be any aircraft model that extends the Physical.FixedWing.Interfaces.AircraftBase model.

The inputs for the physical aircraft model are the control commands for the control actuators, i.e deflection angles in radians for ailerons (deltaAilCmd), elevator (deltaElvCmd) and rudder (deltaRdrCmd), as well as throttle positions (deltaThrot1Cmd - deltaThrot5Cmd) in a unitless normalized ratio ranging from 0 to 1 in air, and from the set negative thrust fraction to 1 on ground. Each engine has a dedicated connector in the aircraft model, and thus they may be controlled individually. The number of input connectors for throttle positions adapts automatically to the set number of engines in the aircraft model.

The physical model also requires the Modelica.Mechanics.MultiBody.World model for representing the world frame fixed on the Earth and for modeling the gravity field. A non-rotating flat earth model is applied, and thus the origin of the world is an arbitrary point on the surface of the Earth. The parameter for direction of gravity resolved in world frame (n[3]) needs to be declared as "z-axis" ({0,0,1}). The orientation of the coordinate systems is presented further in Introduction. A ground can be animated by setting the animateGround parameter in the world component, and adjusting groundLength_u to a sensible large number. All other parameters of the world model may be kept in their default values.


Figure 1: Diagram view of basic model to simulate the flight of a physical aircraft model by giving control commands directly to the control actuators.

For simulating the flight of a physical aircraft model controlled by an autopilot, a suitable autopilot extending to the Autopilots.Interfaces.AutopilotBase model is to be added to the top-level model together with the physical aircraft model, and the control command connectors are to be connected between the autopilot and aircraft models, as shown in Figure 2. The feedback signals to the autopilot's flightDataIn connector are sent through the flightDataOut connector of the aircraft model.

The inputs for the autopilot model are signals of reference altitude, velocity and track angle in standard SI units (m, m/s, rad), and thus converters from Modelica.Blocks.Math.UnitConversions package may be used to enable entering the flight trajectory commands in other units.


Figure 2: Diagram view of basic model to simulate the flight of a physical aircraft model controlled by an autopilot.

Last, the aircraft model needs to be initialized by entering initial values for at least altitude and total velocity in the Initialization tab. Once simulated, the most interesting variables are found in the flightData record of the aircraft model including, altitude, velocity, orientation and mass properties of the aircraft. Other interesting variables found on the top-level aircraft model include aircraft total net power output (Pnet) and the rate at which energy is dissipated (Pdiss). 

Creating a New Physical Aircraft Model with Known Mass Properties

A new physical aircraft model can be modeled by creating a new model that extends the Physical.FixedWing.Interfaces.AircraftBase aircraft model. All properties except for the propulsion properties of the aircraft design are entered on the top level of this new aircraft model. However, the number of engines is defined on the top level, and all other propulsion parameters are entered into the propulsion component after first redeclaring it for the desired propulsion type (turbofan, turbojet, turboprop, piston or electric).

The engine model to be used in the aircraft is also selected as the Engine parameter in the General tab of the propulsion component from the list of modeled engines. A new engine model can be modeled through creating a new model that extends the engine base models (TurbofanEngine, TurbojetEngine, TurbopropEngine, PistonEngine and ElectricEngine) and filling the required parameters. After doing so, the new engine model appears in the drop-down menu for the Engine parameter.

When an existing aircraft design with known mass properties is to be modeled, the weightEst parameter in the Mass and Inertia tab is set to false. This enables the editing of only the relevant parameters further down. More detailed instructions about how to fill the parameters to the AircraftBase model, and information about the parameters themselves are found in its documentation.

Creating a New Physical Aircraft Model by Using Weight Estimation Method

The physical aircraft model supports the use of the weight estimation method. The weightEst parameter in the Mass and Inertia tab of the newly created aircraft model, which extends the Physical.FixedWing.Interfaces.AircraftBase model, can be used to enable the weight estimation method. The method uses empirical relationships to estimate the mass properties based on the aircraft geometry and a few design variables.

The mass properties are estimated component by component, including the engines. However, if an engine model with a known mass is used, its mass is not estimated; the known value is used instead. The Engine parameter in the propulsion component may be set to one of the unparameterized models according to the chosen propulsion type to let the weight estimation method also estimate the engine mass properties based on the given static thrust (Tstatic) or power at sea level (Psealevel) parameter value.

The design variable parameters to be entered when using the weight estimation method include design maximum takeoff mass (mmto,des, MTOMdes), number of passengers (nPax), design payload mass (mPLdes), design Mach number (machDes) and a parameter for indicating whether composite materials are used in the structures or not (compMat). Additionally, constraints for maximum dynamic pressure (qMax) and maximum load factor (nMax) are required.

Figure 3 shows the proposed workflow to be followed when using the weight estimation method in aircraft sizing. As the aircraft library currently does not guide the user in creating an aircraft geometry from scratch, it is advised to be generated by using other tools, or by entering and later adjusting the geometry of an existing aircraft with similar characteristics to the aircraft design to be modeled. After the design variables, constraints and geometry parameters are entered into the model, a flight mission for the desired maximum range should be generated. To enter a flight mission for the Autopilots models, timetables of altitudes, flight speeds and track angles are required, for which, for example, the historic flight data of real flights found in different flight tracking services may be used. Creating a model to simulate a flight controlled by an autopilot is described in the next section.

The results from the simulation are used in an iterative process to adjust the parameters such that the four conditions shown in Figure 3 are satisfied. An example of using the weight estimation method in the Aircraft library for aircraft sizing is presented in section 3.7 in Reference [1]. Additionally, in the WeightEstimation example, the effect of adjusting the design variables and constraints to aircraft mass can be explored.


Figure 3: Proposed workflow to be followed when using weight estimation method in aircraft sizing. [1]

Simulating the Flight of a Linear State Space Aircraft Model

To set up a model for simulating the flight of a linear state space aircraft model, the first thing is to have at least one state space aircraft model. In Figure 4, the diagram view of a top-level model to simulate the flight of a state space model of the Boeing 737-800 is shown. The aircraft may be any aircraft model which extends the StateSpace.FixedWing.DefaultAircraft model.

The inputs for the state space aircraft model are perturbations of the control actuators from their values at the trimmed flight conditions for steady flight. This includes inputs for elevator deflection (DdeltaeIn), throttle position (DdeltaTIn), ailerons deflection (DdeltaaIn) and rudder deflection (DdeltarIn). The unit of the inputs for deflection angle perturbations is radian. For the throttle position perturbation, the input is a unitless normalized ratio, which corresponds to the produced thrust divided by the thrust available at the reference flight conditions. Thus, the absolute value of the throttle position has its maximum at 1 and minimum at the set negative thrust fraction (negThrust).


Figure 4: Diagram view of basic model to simulate the flight of a state space aircraft model by giving control commands directly to the control actuators.

If an autopilot is to be used to control the aircraft, the Autopilots.AutopilotStateSpace model is to be added to the top-level model to translate its input signals describing the desired flight trajectory, i.e altitude (altCmd), velocity (vtotCmd) and track angle (trackCmd) into control actuator perturbations. The units for the autopilot inputs are the standard SI units (m, m/s, rad). Figure 5 shows a simple model simulating a flight of a state space aircraft model controlled by an autopilot, where converters from the Modelica.Blocks.Math.UnitConversions package are used to enable entering the velocity and track angle in km/h and degrees, respectively.


Figure 5: Diagram view of basic model to simulate the flight of a state space aircraft model controlled by an autopilot.

To send feedback from the aircraft position and orientation to the autopilot, the position connector of the aircraft model needs to be connected with the positionSignalBus connector of the autopilot model. The Autopilots.AutopilotStateSpace model is by default tuned for Boeing 737-800 and Douglas DC-8 models and may thus require retuning if used with aircraft of largely different characteristics.

Last, the aircraft model needs to be initialized by entering altitude, total velocity and flight path angle in the Initialization tab for declaring the flight conditions for which the aircraft is trimmed and around which the linearization is done. Once simulated, the most interesting variables are found in the position connector of the aircraft model, including altitude, velocity and orientation of the aircraft.

Creating a New State Space Aircraft Model

A new state space aircraft model can be modeled by creating a new model that extends the StateSpace.FixedWing.DefaultAircraft aircraft model. All properties of the aircraft design are entered on the top level of this new aircraft model into the Aerodynamic Coefficients, Physical Properties, Propulsion and Controls tabs. By default, many properties are derived from the parameters set into the above-mentioned categories, and they are shown in the Derived Properties tab where the equations for estimating the property values are shown. They may be overwritten with known values.

References

[1]  Erä-Esko, N. (2022). "Development and Use of System Modeler 6DOF Flight Mechanics Model in Aircraft Conceptual Design."
      Available atmodelica://Aircraft/Resources/Documents/EraeEskoThesis.pdf.