Rayen Sansa
ENFR
All projects
Personal2026

AeroGuard

Can we see an aircraft engine failure coming before it happens?

Ask about AeroGuard

An assistant answers from this page only, and shows which section each answer comes from.

    My own RAG: LangGraph, LangChain, ChromaDB and an open-weight model on Groq.

    A predictive maintenance system for aircraft engines, built end to end on NASA's N-CMAPSS data: GPU features, an XGBoost + autoencoder pair that also spots never-seen failures, a decision engine (OK, WATCH, URGENT), a live API and the MLOps chain. On 39 test engines never seen before: all 39 failures warned, about 40 flights ahead.

    My role
    Personal project, end to end: data, models, API, deployment and MLOps
    Platforms
    AI, Web
    Stack
    • Python
    • XGBoost
    • TensorFlow
    • Deep learning
    • RAPIDS cuDF
    • Scikit-learn
    • SHAP
    • Optuna
    • MLflow
    • ONNX
    • NVIDIA Triton
    • FastAPI
    • Streamlit
    • Docker
    • GitHub Actions
    • pytest
    • Hugging Face
    • pandas
    • NumPy
    • Matplotlib
    • Machine learning
    1:10 000

    Situation

    39 / 39test engines, never seen before, warned about 40 flights before failure

    An aircraft engine wears out slowly, flight after flight, and an unexpected failure grounds the aircraft: it costs far more than a planned repair. AeroGuard watches each engine after every flight through 14 sensors (temperatures, pressures, shaft speeds, fuel flow) and compares what it sees with how a healthy engine behaves.

    Diagram of a turbofan engine and its sensor stations: P2, P21, P15, P24, T24, T30, Ps30, Wf, P40, T48, T50, P50, with the fan, compressors, combustor and turbines Sensors along the engine (P = pressure, T = temperature, N = shaft speed, Wf = fuel flow). P21, P15, T48 and T50 carry most of the wear signal.

    The data: NASA’s N-CMAPSS dataset, 99 simulated turbofan engines flying real flight profiles: 9 files, 7 failure families, 7,473 flights, reduced to 126 features per flight.

    T48 temperature of several engines versus flights remaining before failure: flat, then rising sharply at the end Each line is one engine: T48 stays flat, then takes off in the last 30 to 40 flights. The whole point: spot that take-off as early as possible.

    Three goals: detect the onset of a failure as early as possible, identify the affected component, and spot failures never seen in training.

    Personal project, built end to end and documented version by version, from a simple statistical detector (v0) to the deployed application (v7).

    1:1 000

    Product

    After every flight, AeroGuard answers a single question: what should the maintenance team do?

    • OK: nothing to report.
    • WATCH: an early or isolated sign, the engine should be watched.
    • URGENT: wear confirmed, plan an inspection, with the sensors to check first (for instance T48 and T50).

    What it offers:

    • A live API (FastAPI): send a flight, get the decision. The fleet is sorted by urgency and each engine keeps its history.
    • A dashboard (Streamlit): the state of the whole fleet, each engine’s history and the system’s health (version, inference mode, data drift).
    • Try it yourself: the Colab notebook sends a real NASA test engine, never seen in training, flight by flight to the live API. The decision moves from OK to WATCH to URGENT: on this engine, the alert is confirmed 46 flights before failure, with T48, T50 and P24 as the sensors to inspect.
    1:100

    System

    • GPU-accelerated data (NVIDIA RAPIDS cuDF): reading the NASA files, residuals against a healthy engine, then 126 features per flight and per phase (climb, cruise). Up to ×19.5 faster than pandas.
    • Two complementary models: XGBoost on GPU for known wear (training ×4.3 faster than on CPU), and a TensorFlow autoencoder trained on healthy flights only, for anything out of the ordinary.
    • A decision engine that turns both signals into OK, WATCH or URGENT, with the sensors involved.
    • A FastAPI API with three interchangeable inference modes: ONNX Runtime (about 5 ms median), NVIDIA Triton (×5 throughput under load) or local Keras. The API’s decisions match the notebook’s exactly (76 / 76).
    • MLOps: MLflow model registry (the production model is loaded by its @champion alias), GitHub Actions CI/CD (Ruff, 361 tests, Docker image scanned with Trivy, published then deployed on Render), JSON logs and data-drift monitoring (PSI) with an automatic weekly report.
    NASA N-CMAPSS (99 moteurs · 7 473 vols), Features (RAPIDS) (126 par vol · GPU), XGBoost (usure connue), Autoencodeur (référence par moteur), Moteur de décision (OK · WATCH · URGENT), FastAPI (ONNX · Triton), Streamlit (flotte · santé), Monitoring (logs JSON · dérive PSI).data → features : cuDF; features → xgb : proba; features → ae : erreur; xgb → decision; ae → decision; decision → api : niveau + capteurs; api → dash : REST; api → monitor : PSIcuDFprobaerreurniveau + capteursRESTPSINASA N-CMAPSS99 moteurs · 7 473 volsFeatures (RAPIDS)126 par vol · GPUXGBoostusure connueAutoencodeurréférence par moteurMoteur de décisionOK · WATCH · URGENTFastAPIONNX · TritonStreamlitflotte · santéMonitoringlogs JSON · dérive PSI

    One request, end to end

    1:10

    Model & data

    From simplest to strongest

    Every model is judged on engines never seen before, with a leak-free split by engine: 49 for training, 11 for validation, 39 for the final test, opened only once.

    Version Model On the 39 test engines
    v2 Logistic regression 39 / 39 warned, 54 false alarms
    v3 XGBoost on GPU 39 / 39, about 40 flights ahead, 28 false alarms; component identified for 37 / 39
    v4 Dense network, 1D CNN behind XGBoost (F1 0.823 and 0.743 versus 0.852)
    v5 XGBoost + autoencoder hybrid 39 / 39, 40.8 flights ahead, and it spots never-seen failures

    The never-seen failure

    A supervised model only recognises what it has learned: without any “fan” engine in training, XGBoost warns only 2 out of 4. The autoencoder, trained on healthy flights and compared with the first 10 flights of each engine, warns them all: 4 / 4.

    For each failure family removed from training: share of engines warned and false alarms, XGBoost alone versus the hybrid system One failure family is removed from training each time: left, engines warned (higher is better); right, false alarms. Blue: XGBoost alone, orange: the hybrid. Figure labels are in French.

    Explaining every alert

    Each XGBoost decision is broken down sensor by sensor with SHAP, computed on GPU (×11.7). The temperatures around the turbines, T50 and T48 during climb, trigger the alert: the physical signature of a worn turbine.

    The decision engine

    Three test engines flight by flight: wear probability and the decided level, moving from OK to URGENT before failure Three test engines, flight after flight: wear probability and the decided level (green OK, orange WATCH, red URGENT). Time moves to the right, 0 = failure.

    What didn’t work, and why it helps

    • A GAN to create rare-failure flights: it reproduces each feature but breaks physics, and a simple classifier spots 100% of its fake flights. Neither the GAN nor SMOTE brings a proven gain: the production model stays in place.
    • The 1D CNN on raw signals matches XGBoost on turbines but misses the fan. With 49 training engines, good physical features beat deep learning.

    Limitations

    • The component diagnosis is probably optimistic: SHAP showed part of it relies on P2, a sensor that reveals the NASA file rather than the failure.
    • Engine history lives in the API’s memory: it is lost when the free server restarts.

    Hiring? Compare with your offer

    Paste your internship offer. You will see which of the technologies you ask for are backed by one of my projects or internships, and which are not.

    The text stays in your browser; nothing is sent.