A Six Degrees-of-Freedom Flight Dynamics Simulation Tool of Launch Vehicles

ABSTRACT: The use of digital simulation has become an essential activity during the development and operation of launch vehicles, due to the complexity of such systems. Of particular interest is the flight dynamics simulation, which investigates the behavior of the vehicle in flight subjected to forces and moments. This work presents a simulation tool suited to perform six degrees-of-freedom flight dynamics investigations of launch vehicles. Developed at the Instituto Nacional de Pesquisas Espaciais (INPE) and the Instituto de Aeronáutica e Espaço (IAE) in Brazil, the tool was implemented following the requirement for flexibility, so that it can be used to simulate different types of launch vehicles. The assessment of the vehicle performance and the vehicle payload capacity are some examples of analysis that can be performed with the tool. A modular programming strategy was employed to assure the tool flexibility. Therefore, the models presented in the tool were implemented as separate modules. The combination of these models can originate flight models of different launch vehicles. Two flight scenarios of Brazilian rockets were simulated and the results were verified against simulation tools already employed by aerospace community. The developed tool showed good agreement with respect to the simulators used to perform the comparison.


INTRODUCTION
With the ever-increasing power of computers, digital simulation has become an essential tool in today's engineering development.The use of digital simulation allows the reduction of both risks and costs associated with a project, as well as the assessment of different configurations of the product in a relative easy way (Steele et al., 2002).Once the simulation tool is validated, several activities can be performed, such as: definition of performance requirements; assessment of different configurations; test support; reduction of testing costs; investigation of inaccessible environments and analysis of subsystems interactions (Zipfel, 2007).
Launch vehicles are objects designed to launch into space instruments like probes and satellites.Due to their great complexity, the use of digital simulation during the design and operation of these systems is essential.A very important subject associated with launch vehicles and generally addressed with digital simulation is the so-called flight dynamics, which studies the motion of the vehicle in space.Flight dynamics investigations are present during all the life cycle of a launch vehicle, assisting actions from the vehicle design until the analysis of actual flight data (Sarma et al., 1978).
The simulation tool used to perform flight dynamics analysis should be able to predict the way the vehicle moves in space as a function of the forces and moments acting on it.This objective is achieved with the use of an adequate dynamic model (a set of equations of motion capable of evaluating the vehicle's position and velocity) and suitable techniques to predict the efforts acting on the vehicle during the flight.The dynamic model is generally described by a set of differential equations and, due to their complexity, these equations are normally solved numerically.
The flight dynamics investigations may have different levels of sophistication, depending on the vehicle's characteristics that are taken into consideration when deriving the dynamic model and the amount of information available about the vehicle's design and properties, like mass, inertia, drag coefficients and so on.As an example, the vehicle can be considered a point mass, where only the translational dynamics is included; a rigid body, where the relative motion of its parts are neglected; a body with a rigid structure and variable mass; and a body with flexible structure and variable mass.
Another aspect that influences the choice of the model is related to the type of analysis it is suited for.Generally, the flight dynamics investigations can be divided into two related major groups (Greensite, 1967;Sarma et al., 1978).The long-period dynamics is concerned with factors such as vehicle's capability to accomplish a specific mission, payload capacity and trajectory dispersions.In this case, effects of non-spherical rotating Earth and variable mass of vehicle should be included.The shortperiod dynamics, in turn, is concerned with phenomena with relatively small occurrence interval, like the separation process between stages or the vehicle's oscillation about the center of mass considering fuel sloshing and bending.
The development of a computational tool for flight dynamics simulation usually requires a substantial amount of time.In order to reduce time and cost associated with this activity, it has become a common practice to implement generic and flexible simulators, which could be used during the design and operation of different launch vehicles (Ippolito and Pritchett, 2000;Steele et al., 2002).
There are several examples of launch vehicle simulators developed in space agencies, like NASA and ESA, and also in companies around the world.The Program to Optimize Simulated Trajectories (POST) and the Optimization of Trajectories by Implicit Simulation (OTIS) are examples of powerful and flexible tools used by NASA to optimize and simulate the flight trajectory of launchers, and some of its applications can be found in the works of Albertson et al. (2012) and Falck and Gefert (2007).The Marshall Aerospace Vehicle Representation in C II (MAVERIC II), also developed by NASA, is a modularized high-fidelity simulation software and appears in the work of Lu and Rao (2004).ESA, in turn, has developed a generic multibody flight simulator, capable of performing extensive launcher dynamics analysis (Baldesi and Toso, 2012).As an example of a commercial simulation tool, the company Astos Solutions has been developing the AeroSpace Trajectory Optimization Software (ASTOS®), a modularized software capable of performing trajectory simulation and optimization of launch vehicles (Cremaschi et al., 2010).Finally, in the work of Betts et al. (2007), it can be found an example of a simulator constructed using the modularized characteristic of Simulink®, which facilitates modifications of the vehicle model as necessary.
This work presents a launch vehicle simulation tool developed at INPE and IAE, two active space research institutes in Brazil.The tool was developed in order to enhance Brazilian capability and autonomy in launch vehicles simulation.The requirement for developing a flexible tool capable of simulating different vehicles and different missions was adopted.The tool is referred to as Rocket Trajectory Simulator (RTS).The results obtained with RTS were verified against other simulation tools already used by aerospace community.

RTS FEATURES
RTS was implemented using MATLAB®.It simulates the launch vehicle flight in six degrees-of-freedom, from launch to reentry or orbit insertion.The vehicle is considered a body with rigid structure and variable mass.Several phenomena that affect the vehicle's long-period dynamics can be considered in the simulation, such as the variation of mass and inertia, the aerodynamic and propulsive efforts that act on the vehicle, the control systems dynamics, the Earth's geometry and rotational motion, the presence of wind etc.
The RTS simulated trajectory is divided in phases.The definition of the phases is arbitrary, and phase changing is generally related to some abrupt alteration in vehicle properties, such as a change in vehicle mass due to jettisoning of part of its structure, or a change in propulsion thrust due to the ignition of a motor, as well as some change in environment, for example, during the vehicle exiting from the atmosphere.The different events that define the end of the phases are called "sequence of events".In RTS, the sequence of events corresponds to a set of time instants (all the events must have a known instant of occurrence).
RTS was implemented to be a generic and flexible flight simulation tool, allowing the simulation of different types of launch vehicles.This flexibility is ensured by a modular programming strategy, where each model is implemented as a separate module.The choice of different models can originate flight models for different launch vehicles.
Basically, RTS comprises a library of models, with all the available models that can be used to compose the vehicle flight model to be simulated and the main module, responsible for performing the trajectory integration.Figure 1 shows these components.A graphical user interface was also implemented to allow the creation of the whole vehicle flight model in an easy way.
where: V rel : vehicle velocity with respect to Earth; R ec : vehicle position with respect to the center of the Earth; Ω: Earth's angular velocity; ω : vehicle angular velocity with respect to an inertial frame; M: vehicle mass; F total : total force that acts on the vehicle; | B : denotes the derivative as viewed by an observer in the rotating system attached to the vehicle.
The total force results from gravitational, aerodynamic and propulsive effects, and its value depends on the models considered in the simulation.
The vehicle position is specified in polar coordinates: its distance from the center of the Earth, its longitude and its geocentric latitude.The kinematic equations for the variation of these parameters, presented in Mooij (1997), are:

Library
Flight model

Main module Results
Figure 1.RTS library and main module.

LIBRARY OF MODELS
RTS library comprises adequate models to simulate the flight dynamics of launch vehicles.Several aspects of this dynamics, mainly those related to the long-period dynamics, can be investigated using these models.The library is divided into four categories: Dynamics, Vehicle Subsystems, Auxiliary Tools and Environment Models.

DYNAMICS
This category comprises mathematical models of the vehicle dynamics, which corresponds to sets of differential equations that describe the motion of the vehicle in space.Its objective is to determine the derivatives of the state variables which will be numerically integrated, resulting in the position and velocity of the vehicle along the trajectory.There are three mathematical models of the dynamics implemented in RTS: one for the simulation of the vehicle motion in space, and two for the launch phase.
The motion of the vehicle in space is described by 12 state variables.The translational motion is described by the vehicle velocity vector and position with respect to the surface of the Earth.The rotational motion is described by the vehicle angular velocity vector with respect to an inertial frame and by the vehicle orientation, or attitude, with respect to the local vertical reference frame (to be defined shortly).
The dynamic equation of the translational motion with respect to a non-inertial reference system fixed on Earth, stated in Cornelisse et al. (1979) and Mooij (1997), is: where: R ec : magnitude of R ec ; μ: vehicle longitude on Earth; λ ec : geocentric latitude; V relx , V rely and V relz : components of the relative velocity V rel written in the local vertical coordinate system F V .
This system, shown in Fig. 2, has its origin at the vehicle's center of mass.The X V axis is located at the local horizontal plane, pointing north, the Y V axis is located at the local horizontal plane, pointing east, and Z V axis points to the center of the Earth. (1) The dynamic equation for the rotational motion is stated in Cornelisse et al. (1979) and Mooij (1997) as: The mass properties models simulate the way the mass properties of the vehicle vary during the trajectory, including the determination of the mass, the inertia tensor, the position of the center of mass, the mass flow and the vehicle inertia variation rate.RTS has a model for constant mass properties, which can be used when there are no active propulsion system and no jettisoning of structural mass, and one model for variable mass properties, for the phases of the trajectory when the vehicle loses mass due to an active propulsion system.Usually, the jettisoning of some structural part of the vehicle is considered an event that separates two consecutive phases of the trajectory.
The propulsive models have the objective of simulating the vehicle propulsion systems, by computing the forces and moments generated by these systems.RTS has models for rocket motors with fixed and gimbaled thrust, spin-up motors for inducing a roll velocity to the vehicle, and a generic model which determines the propulsive force and moment directly from user table interpolation as a function of time.
The aerodynamic models have the objective of calculating the aerodynamic force and moment that act on the vehicle.A mathematical model which computes these efforts using aerodynamic coefficients was implemented in RTS, a common approach used in several simulators.The model is linear (therefore valid only for low angles of attack) and the longitudinal axis of the vehicle is considered a symmetry axis.
Finally, the control system models are responsible for simulating the behavior of the vehicle control systems, by calculating signals or efforts produced by these systems.RTS has control models for pitch, yaw and roll attitude controls using a PID control architecture.Both continuous and discrete control models can be used.

AUXILIARY TOOLS
Auxiliary Tools have no specific objective and can be used to determine parameters not covered by any existing model, such as the position of the vehicle with respect to a radar, or the impact point of a jettisoned part of the vehicle's structure.
RTS has auxiliary models to predict the impact point of a jettisoned part of the vehicle's structure, to calculate the orbital elements of the vehicle or the payload after orbit injection, and to simulate the behavior of a roll velocity dumper system, known as yo-yo.
where: I: vehicle inertia; M total : total moment that acts on the vehicle, resulting from aerodynamic and propulsive effects, depending on the models considered in the simulation.
Finally, the vehicle attitude is described by three Euler angles, and their kinematic equations, presented in Hughes (2004), are: where: θ, ψ and ϕ: angles that relate the body frame F B to the local vertical frame F V .These angles are defined by a sequence of rotation 2-3-1, where θ is the first rotation angle, ψ is the second and ϕ is the third angle; p 1 , q 1 and r 1 : components of the angular velocity of the vehicle with respect to the local frame F V which are obtained from the subtraction of the inertial angular velocity of frame F V , which depends on the velocity of the vehicle with respect to the Earth, from the inertial angular velocity of the vehicle.
Besides the model for the motion in space, RTS has two additional dynamic models: one for rail launching simulation, in which the vehicle has one degree-of-freedom while in contact with the rail, and the other for launching simulation from launch pad, in which the relative velocity remains zero while the vehicle is in contact with the pad.

VEHICLE SUBSYSTEMS
The Vehicle Subsystems models describe the vehicle properties during the flight.This category is subdivided into mass properties, propulsive, aerodynamic and control system models.

ENVIRONMENT MODELS
The objective of the Environment Models is to calculate the environment properties that affect the flight.This category is subdivided into Earth, atmospheric and wind models.
The Earth models describe the geometry of the Earth's surface and calculate the gravitational field strength at the vehicle location.RTS has a model for a spherical Earth with homogenous mass distribution and a model for a spheroidal Earth with axisymmetric mass distribution.
The atmospheric models calculate the atmosphere properties that affect the flight, including air temperature, pressure and density, the sound speed etc.The U.S. Standard Atmosphere, 1976, was implemented in RTS.
Finally, the wind models have the objective of simulating the behavior of the wind as the vehicle moves through the atmosphere.The model implemented in RTS considers a horizontal wind with varying strength and direction as a function of vehicle altitude.

RTS ARCHITECTURE
The creation of a flight model in RTS comprises basically the selection of each model to be used, the definition of a sequence of events, which establishes the several phases of the trajectory, and the definition of the models that will be active in each phase.This process is illustrated in Fig. 3. Once the flight model is ready, the integration of the trajectory equations can be performed by the main module, as shown in Fig. 4. The output results are the several flight parameters like position, velocity and acceleration of the vehicle, the forces and moments from propulsion and aerodynamics etc.
The architecture of RTS was defined to fulfill the requirement for flexibility.During the integration of the trajectory, the successive calls to the models comprised in the flight model obey a predefined sequential order, as shown in Fig. 5.This order follows a logical calculation sequence of the several flight parameters of the simulation, in a way that the information needed by a model has already been calculated by the models executed previously.
The first executed models belong to the environment category and compute the gravitational, atmospheric and wind properties at the vehicle position.Next, the subsystems   models are called, and several vehicle properties are calculated, including control actions and efforts, like nozzle deflection, mass properties, and also aerodynamic and propulsion parameters and efforts.Next, the auxiliary tools can be used to calculate the parameters not comprised by the previous models, like the vehicle position with respect to a radar, for instance.Finally, with all efforts that act on the vehicle, the dynamic model is executed, and the state variables that describe the vehicle motion are integrated.If a discrete control model is included, it is executed outside the integration loop.Except for the dynamic model, more than one model of a specific category can be executed.This is useful when, for example, two kinds of controllers or propulsive systems are active at the same time.
The integration process of the state variables is performed by a MATLAB® build-in function, the ode45.This is an initial value problem solver based on an explicit Runge-Kutta (4,5) formula.It is a one-step solver, meaning that the solution at a time instant depends only on the solution at the immediately preceding instant.The time step, represented by δt in Fig. 5, varies according to the solver capability to find a solution that satisfies the error tolerance criteria, and, for the present application, it generally lies between 10 -3 and 10 0 .
The architecture of RTS enables the flight simulation of a variety of launch vehicles, since the appropriate models are present in the library.This flexibility is enhanced with the possibility of the user to add models to the library in a relatively easy way.A key-characteristic of RTS that enables the addition of new models is that all parameters computed during a time step of the integration are stored in a common structure where the access to the contents of the variables is made by their name.By using this structure as input and output arguments to all models, including those added by the user, it permits the models to access all the needed variables and also to store the information calculated so far, making this information available to all other models executed later.This characteristic is illustrated in Fig. 6, where a nozzle deflection signal, β pitch , is calculated as a function of the vehicle attitude, θ, and angular speed, q, and is stored in the same structure containing these parameters.In the figure, k θ and k q are constants of the controller.

RESULTS AND DISCUSSION
In order to verify the results of RTS, two different flight scenarios were simulated.The results were compared with two different simulation tools available at IAE.The simulations were performed in an Intel® Core 2 Quad 2.66 GHz, with 1.94 GB of RAM.
The first scenario was the simulation of VSB-30, an unguided and aerodynamically stabilized Brazilian sounding rocket composed by two solid propellant stages and a payload.The vehicle is shown in Fig. 7. Launched from rail, it has the capacity of boosting a payload of around 350 kg to an altitude of 300 km (Garcia et al., 2011).The results of RTS were compared with those obtained with the tool Rocket Simulation (ROSI), a six degrees-of-freedom simulator used for flight simulation of Brazilian rockets and already validated by actual flight data.For this scenario, ROSI runtime was about 1 s and RTS runtime was about 59 s.
Figure 8 shows the altitude of the vehicle as a function of ground range.It can be seen the good agreement between the two simulators.The increasing difference that appears after approximately 80 s of flight is the result of a minor difference in the thrust correction method with altitude used in the two simulations.The results of flight speed have also a good agreement, as it can be seen in Fig. 9.In this case, the difference that appears at the end of the trajectory is due to the fact that ROSI simulates the payload reentry considering the drag force, while RTS considers a free flight during reentry.The difference in the results of altitude and speed can be better observed in Fig. 10, that shows this difference in relative terms.
One last result about VSB-30 concerns the roll speed.by changes in the vehicle inertia.However, for rockets that reach high roll speed, like VSB-30, this moment cannot be neglected, as confirmed by the actual flight data presented in the figure.Is this case, this moment has the same order of magnitude than the aerodynamic moment, shown in Fig. 12.
The second scenario consisted of the VLM-1 simulation, the Brazilian microsatellite launcher, shown in Fig 13 .VLM-1 is composed by three solid propellant stages (Agência Espacial Brasileira, 2012).The first and second stages are controlled by gimbaled nozzles, while the third one has no control system.The results of RTS are compared with those obtained with ASTOS®, a commercial simulation and optimization tool.ASTOS® performs a simulation considering three degrees-offreedom of translation, while the vehicle rotation is considered to happen ideally.For this scenario, ASTOS® runtime was about 9 s and RTS runtime was about 180 s.
The trajectory of the mission SHEFEX III, a German suborbital mission, was simulated here.Figures 14 and 15 show the vehicle position and speed.It can be seen that the results of RTS and ASTOS® are in good agreement.Figure 16 shows the relative difference between the two simulations.
Despite the good agreement of the results just presented, the difference between a three and a six degrees-of-freedom simulation can be better observed when the parameters analyzed are directly related to the vehicle rotation dynamics.
For the VLM-1 trajectory simulation, it is necessary to provide the reference attitude that is expected for the vehicle to follow.Since the simulation performed with ASTOS® considers    an ideal rotation dynamics, the vehicle attitude at each instant will be exactly equal to the provided reference attitude.In RTS, on the other hand, the vehicle control system is responsible to drive the attitude to the reference trajectory.Figure 17 shows the pitch angle of the vehicle during the flight.Overall, both ASTOS® and RTS pitch attitude are in good agreement, meaning that the control system model used in RTS is adequate to follow the reference for the pitch angle.However, some differences can be seen in specific portions of the trajectory.Figure 18 shows the pitch angle at the beginning of flight.Due to its ideal rotation dynamics when simulated with ASTOS®, the vehicle is capable of instantaneous attitude changes, as indicated by the corners at the pitch curve provided by this tool.In RTS, since the control system is not ideal, the pitch angle slightly deviates from the pitch reference, mainly when the provided reference angle changes abruptly.

CONCLUSION
This paper presented the development of RTS, a simulation tool suited to investigate the flight dynamics of launch vehicles.The tool was implemented considering requirements of flexibility, following a trend observed in research institutes and companies around the world.To fulfil this requirement, a modular programming strategy was used successfully.The models present in the library of RTS and also the tool's architecture have shown to be adequate to simulate the flight of different types of launch vehicles.
The test cases presented have shown a good agreement of RTS with other tools already used to simulate the flight dynamics of launch vehicles.The differences observed in the results of RTS with respect to ROSI and ASTOS® were explained by the differences in the used models.Notably, results concerning the roll speed indicated that the simplification adopted in ROSI, where the moment caused by the inertia variation is neglected, could compromise the simulation results.

Figure 3 .
Figure 3. Flight model creation in RTS.

Figure 10 .
Figure 10.Altitude and flight speed relative error between RTS and ROSI.

Figure 12 .
Figure12.Comparison of roll moment due to aerodynamic and inertia variation effects.

Figure 16 .
Figure 16.Altitude and flight speed relative error between RTS and ASTOS®.

Figure 18 .
Figure 18.Pitch angle of VLM-1 at the beginning of flight.