Skip to content

About

6-DoF flight dynamics simulation of an engine-out Airbus A380 glide from 13 km, with turbulence modelling, a 100-run Monte Carlo study, and a regression model for glide range.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Airbus A380 Glider – 6-DoF Flight Dynamics and Monte Carlo Simulation

A complete 6-Degrees-of-Freedom (6-DoF) flight dynamics simulation of the Airbus A380 in engine-off glider mode.
This project models aerodynamic, kinematic, and control behaviour, incorporating wind disturbance modelling, Monte Carlo analysis, and machine-learning-based flight prediction.

Developed as part of an advanced aerospace simulation initiative to explore large-aircraft stability, glide performance, and control robustness under uncertainty.


✈️ Key Features

  • Full 6-DoF rigid-body dynamics
    Simulates translational and rotational motion using realistic aircraft mass and inertia parameters.

  • Aerodynamic model (src/glider/aero.py)
    Computes lift, drag, side-force, and moment coefficients as functions of angle of attack, sideslip, and control deflections.

  • Flight dynamics engine (src/glider/dynamics.py)
    Integrates Newton–Euler equations of motion using adaptive time-stepping.

  • Control surface model (src/glider/controls.py)
    Implements elevator, aileron, and rudder control logic for glide stabilisation.

  • Atmospheric & wind modelling (src/glider/wind_model.py)
    Adds stochastic gusts, turbulence, and altitude-dependent wind profiles.

  • Monte Carlo simulation (src/glider/monte_carlo.py)
    Runs 100 randomised flight scenarios, each seeded and reproducible, from 13,000 m to ground impact.

  • Machine-Learning performance predictor (src/glider/ml/model.py)
    Fits a linear regression predicting glide distance from the wind conditions, with a random forest kept as a benchmark.

  • Model evaluation (src/glider/ml/evaluate.py)
    Cross-validation, coefficient inference, regression assumption checks, residual analysis and a learning curve.

  • Automated plotting modules (src/glider/plotting/)
    Generates trajectory plots, attitude histories, energy curves, and statistical summaries.


🧠 Project Architecture

Glider-6-DoF-Simulation/
├── scripts/                       # Entry points, run these
│   ├── run_simulation.py          # Single 6-DoF glide + flight plots
│   ├── run_monte_carlo.py         # Monte Carlo campaign -> CSV
│   ├── plot_monte_carlo.py        # Monte Carlo statistics plots
│   ├── run_ml.py                  # Fit models + ML plots
│   └── evaluate_ml.py             # Evidence behind the model choice
├── src/glider/                    # Library code
│   ├── aero.py                    # Aerodynamic coefficients, ISA atmosphere
│   ├── dynamics.py                # 6-DoF equations, ground-impact event
│   ├── controls.py                # Elevator, aileron, rudder control laws
│   ├── wind_model.py              # Steady wind and turbulence model
│   ├── monte_carlo.py             # Monte Carlo campaign
│   ├── paths.py                   # Project directory locations
│   ├── ml/
│   │   ├── model.py               # Linear model + random forest benchmark
│   │   └── evaluate.py            # Cross-validation and diagnostics
│   └── plotting/
│       ├── flight.py              # Trajectory, attitude, energy, L/D
│       ├── monte_carlo.py         # Distance histogram, altitude envelope
│       └── ml.py                  # Model accuracy and partial dependence
├── data/monte_carlo_results.csv   # Generated dataset (100 runs)
├── plots/
│   ├── main/                      # Figures from run_simulation.py
│   └── additional/                # Monte Carlo and ML figures
├── docs/glider_simulation_project.pdf  # Project report
├── requirements.txt               # Python dependencies
└── README.md                      # Documentation (this file)

No installation step is needed. The scripts add src/ to the import path, so python scripts/run_simulation.py works directly in a fresh clone.


⚙️ Mathematical Model Overview

Translational Dynamics

The translational motion of the aircraft in body axes is governed by:

$$ m , \dot{\mathbf{v}} = \mathbf{F}_{\text{aero}} + \mathbf{F}_{\text{gravity}} + \mathbf{F}_{\text{wind}} $$

Where:

  • $m$ – aircraft mass
  • $\dot{\mathbf{v}}$ – time derivative of velocity (acceleration) in the body frame
  • $\mathbf{F}_{\text{aero}}$ – aerodynamic force vector
  • $\mathbf{F}_{\text{gravity}}$ – gravitational force vector
  • $\mathbf{F}_{\text{wind}}$ – wind disturbance force vector

Rotational Dynamics

The rotational motion of the aircraft about its center of gravity is governed by the Euler rotational equations:

$$ \mathbf{I} , \dot{\boldsymbol{\omega}} + \boldsymbol{\omega} \times (\mathbf{I} , \boldsymbol{\omega}) = \mathbf{M}_{\text{aero}} + \mathbf{M}_{\text{control}} $$

Where:

  • $\mathbf{I}$ – inertia matrix of the aircraft
  • $\boldsymbol{\omega}$ – angular velocity vector in body frame
  • $\dot{\boldsymbol{\omega}}$ – angular acceleration vector
  • $\mathbf{M}_{\text{aero}}$ – aerodynamic moment vector
  • $\mathbf{M}_{\text{control}}$ – control surface moment vector

Integration

Implemented using SciPy's solve_ivp with the adaptive-step RK45 integrator.
Attitude is propagated as Euler angles (roll, pitch, yaw). This carries a singularity at $\theta = \pm 90°$, which a shallow glide never approaches; quaternions would be required for high-pitch or aerobatic attitudes.


🧩 Simulation Capabilities

Module Purpose
scripts/run_simulation.py Sets up simulation, loads parameters, executes 6-DoF loop
glider/monte_carlo.py Randomises base wind, turbulence intensity and correlation time; integrates each case to ground impact
glider/wind_model.py Adds dry and turbulent wind components
glider/ml/model.py Learns mapping between flight inputs and performance
glider/ml/evaluate.py Compares models and tests the regression assumptions
glider/plotting/flight.py Generates trajectory, orientation, and energy plots
glider/plotting/monte_carlo.py Plots statistical distribution of outcomes
glider/plotting/ml.py Visualises model accuracy and predicted performance

📊 Outputs

When executed, the simulation produces:

  • Time-series data (.csv): position, velocity, attitude, angular rates
  • Flight plots:
    • 3D trajectory and attitude evolution
    • Lift/drag coefficient variation
    • Altitude and velocity vs time
  • Monte Carlo summaries (data/monte_carlo_results.csv, one row per run):
    • Logged inputs, flight_time_s, distance_m, and 200 altitude samples spread over that run's own descent
    • Histograms of glide distance and impact time
    • Mean ± σ envelopes for altitude decay
  • Machine learning diagnostics:
    • Predicted vs actual glide performance scatter plots
    • Feature importance rankings

Example visualisations:

  • Glide trajectory (3D)
  • Monte Carlo envelope of altitude decay
  • ML-predicted glide ratio vs true values

📈 Results

From 13,000 m, engines off, over 100 seeded Monte Carlo runs:

Quantity Value
Glide distance 161.5 km (152.4 – 169.0)
Time aloft 1,620 s (27 min)
Glide ratio (L/D) 12.4

The glide ratio sits below the A380's quoted figure of roughly 20 for two reasons, both traceable to the model. The elevator trims to 0° angle of attack, where $C_L = C_{L0} = 0.25$ and the parabolic polar $C_D = 0.016 + 0.05 C_L^2$ gives $L/D \approx 13$; best glide would need $C_L = \sqrt{c_{d0}/k} = 0.57$. Separately, the polar itself caps at $1/(2\sqrt{c_{d0} k}) = 17.7$, so 20 is unreachable without a lower $c_{d0}$.

Glide distance prediction

Predicting glide distance from the logged wind, using 5-fold cross-validation repeated 10 times:

Model CV R² CV MAE
Always predict the mean −0.072 2757 m
Random forest, 4 raw inputs +0.565 ± 0.181 1653 m
Linear, 4 raw inputs +0.290 ± 0.218 2253 m
Linear, wind_u + |wind_v| +0.684 ± 0.200 1182 m

The fitted relationship is

$$ \text{distance} \approx 165595 + 733 \cdot w_u - 1425 \cdot |w_v| \quad \text{metres} $$

Both coefficients are significant ($p < 10^{-16}$) and the inputs do not overlap (VIF 1.00). Taking the magnitude of crosswind matters because sideslip drag shortens the glide whichever way the wind blows, so the effect is symmetric and a signed term cannot represent it.

The linear model beats the forest because the underlying physics is close to a straight line, and a decision tree approximates a slope with flat steps. R² is 0.697 across all runs; the remaining variance comes from the turbulence realisation, which is not recorded in the CSV. The learning curve is flat from 20 training runs onward, so more Monte Carlo runs would not improve this — logging more per run would.

Reproduce with python scripts/evaluate_ml.py.


📄 Differences from the written report

docs/glider_simulation_project.pdf is the report as submitted in April 2025. The code has moved on since, so several numbers in it no longer match the results above. The report has deliberately been left as a dated snapshot rather than edited to agree.

Quantity Report Repository now Why it changed
Glide distance 108 – 118 km, mean 113 km 152.4 – 169.0 km, mean 161.5 km Runs then stopped at a fixed 600 s, with the aircraft still at about 7,600 m — only 41% of the descent. They now integrate to ground impact.
Turbulence intensity 3 – 10 m/s 0.5 – 3.0 m/s The old range exceeded the ±5 m/s base wind, so the turbulence noise swamped the wind signal and the logged parameters could not explain the outcome.
Elevator trim described as 5° angle of attack 0° in controls.py The report describes the intended trim; the code has always used alpha_trim_deg=0.0.
Machine learning not covered linear model plus forest benchmark Added after the report was submitted.

The trim difference is the one that matters physically. At 0° angle of attack $C_L = C_{L0} = 0.25$, giving $L/D \approx 13$; at the 5° the report describes it would be about 16.7. Best glide for this drag polar needs $C_L = \sqrt{c_{d0}/k} = 0.57$, or roughly 2.9°, where $L/D$ peaks at $1/(2\sqrt{c_{d0}k}) = 17.7$. The whole-flight figure of 12.4 reported above sits just below the 13 predicted at trim, the remainder being sideslip and turbulence losses.

For context, published figures for the A380 put the cruise lift-to-drag ratio near 19–20 and the engine-out glide ratio around 15:1, so the report's quoted 15:1 is the right comparison for a glide. This model reaches 12.4 because it holds a fixed trim rather than flying at best glide, and because the drag polar used here caps at 17.7 regardless of trim.


🚀 Running the Simulation

  1. Clone the repository

    git clone https://github.com/Anay2005/Glider-6-DoF-Simulation.git
    cd Glider-6-DoF-Simulation
  2. Install dependencies

    pip install -r requirements.txt
  3. Run a single 6-DoF glide and its plots

    python scripts/run_simulation.py
  4. Regenerate the Monte Carlo dataset (100 runs, roughly 45 minutes)

    python scripts/run_monte_carlo.py
  5. Plot the Monte Carlo statistics

    python scripts/plot_monte_carlo.py
  6. Fit the models and plot their predictions

    python scripts/run_ml.py
  7. Print the evidence behind the model choice

    python scripts/evaluate_ml.py

Steps 1–3 and 5–7 are quick. Step 4 regenerates the committed dataset and is only needed if you change the simulation. Figures for every step are already committed under plots/.

About

6-DoF flight dynamics simulation of an engine-out Airbus A380 glide from 13 km, with turbulence modelling, a 100-run Monte Carlo study, and a regression model for glide range.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages