Skip to content

emerladcompass/OSEF-Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧭 OSEF: Operational Stability Envelope Framework

PyPI version License: MIT Python 3.9+ DOI DOI Preregistration Status

Real-Time Implementation Layer for Limit Cycle-Based Aviation Safety Models

OSEF translates validated limit cycle dynamics theory into operational real-time supervision for aviation safety applications.


Regulatory Positioning

OSEF is currently positioned as a research and advisory framework intended for simulation, training, and analytical environments.

It does not exert control authority over any aircraft system and is not classified as flight-critical avionics software.

For a detailed discussion of its regulatory scope and its alignment with DO-178C awareness objectives, see
REGULATORY_POSITIONING_DO178C.md.


🎯 What is OSEF?

OSEF is a computational framework that:

  • πŸ“Š Monitors aircraft trajectory in 3D phase space (Pitch, Bank, Power)
  • πŸ” Detects Creative Chaos Zones (CCZ) in real-time
  • 🎯 Guides crews toward stable Limit Cycle operations
  • ⚑ Operates at < 8 ms latency on standard hardware

Built on Validated Science

Based on research analyzing 1,247 commercial flights with 89.3% prediction accuracy:

Baladi, S. (2026). Limit Cycle Flight Dynamics as a Framework for Adaptive Aviation Safety Protocols. OSF. https://doi.org/10.17605/OSF.IO/RJBDK

Validation Study Preregistered: https://doi.org/10.17605/OSF.IO/ED89G


✨ Key Features

Feature Description Status
Real-Time CCZ Detection Identifies Creative Chaos Zones with 91.2% accuracy βœ… Complete
Limit Cycle Guidance Provides trajectory corrections toward stable LC βœ… Complete
Model-Agnostic Design Works with Van der Pol, ML, or hybrid models βœ… Complete
Lyapunov Monitoring Continuous stability assessment (Ξ» computation) βœ… Complete
Training Mode Real-time feedback for simulator training πŸ”„ In Progress
Fleet Analytics Aggregate safety metrics across flights πŸ“… Planned


πŸ“ Repository Structure
OSEF-Framework/
β”‚
β”œβ”€β”€ README.md                          # Main Page
β”œβ”€β”€ LICENSE                            # MIT License
β”œβ”€β”€ CITATION.cff                       # Citation File
β”œβ”€β”€ .gitignore                         
β”œβ”€β”€ requirements.txt                   # Dependencies
β”œβ”€β”€ environment.yml                    # Conda environment
β”œβ”€β”€ setup.py                           # Installation script
β”‚
β”œβ”€β”€ docs/                              # πŸ“š Documentation
β”‚   β”œβ”€β”€ index.md
β”‚   β”œβ”€β”€ architecture.md                # OSEF Architecture
β”‚   β”œβ”€β”€ installation.md
β”‚   β”œβ”€β”€ quick_start.md
β”‚   β”œβ”€β”€ api_reference.md
β”‚   β”œβ”€β”€ theoretical_foundation.md      # Link to Baladi et al.
β”‚   └── deployment_guide.md
β”‚
β”œβ”€β”€ osef/                              # πŸ”§ Core Framework
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ limit_cycle_model.py       # Van der Pol Engine
β”‚   β”‚   β”œβ”€β”€ stability_monitor.py       # Real-time OSEF Core
β”‚   β”‚   β”œβ”€β”€ lyapunov.py                # Lyapunov Analysis
β”‚   β”‚   └── guidance.py                # Trajectory Guidance
β”‚   β”‚
β”‚   β”œβ”€β”€ data/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ fdr_reader.py              # FDR Data Processing
β”‚   β”‚   β”œβ”€β”€ preprocessing.py
β”‚   β”‚   └── synthetic_data.py          # For testing
β”‚   β”‚
β”‚   β”œβ”€β”€ visualization/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ phase_space.py             # 3D Phase Space Plots
β”‚   β”‚   β”œβ”€β”€ stability_maps.py
β”‚   β”‚   └── realtime_display.py
β”‚   β”‚
β”‚   └── utils/
β”‚       β”œβ”€β”€ __init__.py
β”‚       β”œβ”€β”€ config.py
β”‚       └── logger.py
β”‚
β”œβ”€β”€ examples/                          # πŸ“– Examples
β”‚   β”œβ”€β”€ 01_basic_usage.py
β”‚   β”œβ”€β”€ 02_flight_simulation.py
β”‚   β”œβ”€β”€ 03_qf32_reconstruction.py
β”‚   β”œβ”€β”€ 04_training_mode.py
β”‚   └── 05_fleet_monitoring.py
β”‚
β”œβ”€β”€ notebooks/                         # πŸ““ Jupyter Notebooks
β”‚   β”œβ”€β”€ tutorial_01_introduction.ipynb
β”‚   β”œβ”€β”€ tutorial_02_limit_cycles.ipynb
β”‚   β”œβ”€β”€ tutorial_03_ccz_detection.ipynb
β”‚   └── validation_results.ipynb
β”‚
β”œβ”€β”€ tests/                             # πŸ§ͺ Unit Tests
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ test_limit_cycle.py
β”‚   β”œβ”€β”€ test_stability.py
β”‚   β”œβ”€β”€ test_lyapunov.py
β”‚   └── test_guidance.py
β”‚
β”œβ”€β”€ data/                              # πŸ“Š Sample Data
β”‚   β”œβ”€β”€ sample_fdr.csv
β”‚   β”œβ”€β”€ parameters/
β”‚   β”‚   └── baladi_params.json         # Pre-calibrated parameters
β”‚   └── validation/
β”‚       └── simulator_data.h5πŸš€ Quick Start
β”‚   └── reports/
β”‚
└── deployment/                        # πŸš€ Deployment Tools
    β”œβ”€β”€ docker/
    β”‚   └── Dockerfile
    β”œβ”€β”€ kubernetes/
    β”‚   └── osef-deployment.yaml
    └── avionics_interface/
        └── arinc_429_adapter.py


🧭 OSEF: Operational Stability Envelope Framework

PyPI version License: MIT Python 3.9+ DOI Preregistration Status

Real-Time Implementation Layer for Limit Cycle-Based Aviation Safety Models

OSEF translates validated limit cycle dynamics theory into operational real-time supervision for aviation safety applications.


🎯 What is OSEF?

OSEF is a computational framework that:

  • πŸ“Š Monitors aircraft trajectory in 3D phase space (Pitch, Bank, Power)
  • πŸ” Detects Creative Chaos Zones (CCZ) in real-time
  • 🎯 Guides crews toward stable Limit Cycle operations
  • ⚑ Operates at < 8 ms latency on standard hardware

Built on Validated Science

Based on research analyzing 1,247 commercial flights with 89.3% prediction accuracy:

Baladi, S. (2026). Limit Cycle Flight Dynamics as a Framework for Adaptive Aviation Safety Protocols. OSF. https://doi.org/10.17605/OSF.IO/RJBDK

Validation Study Preregistered: https://doi.org/10.17605/OSF.IO/ED89G


✨ Key Features

Feature Description Status
Real-Time CCZ Detection Identifies Creative Chaos Zones with 91.2% accuracy βœ… Complete
Limit Cycle Guidance Provides trajectory corrections toward stable LC βœ… Complete
Model-Agnostic Design Works with Van der Pol, ML, or hybrid models βœ… Complete
Lyapunov Monitoring Continuous stability assessment (Ξ» computation) βœ… Complete
Training Mode Real-time feedback for simulator training πŸ”„ In Progress
Fleet Analytics Aggregate safety metrics across flights πŸ“… Planned

πŸš€ Quick Start

πŸ“¦ Installation

Install from PyPI (Recommended)

pip install osef-framework

Install from source

git clone https://github.com/emerladcompass/OSEF-Framework.git
cd OSEF-Framework
pip install -e .

πŸ’» Basic Usage

from osef import LimitCycleModel, OSEF

# Initialize Limit Cycle Model
lc_model = LimitCycleModel.from_baladi_params()
lc_model.compute_limit_cycle()

# Initialize OSEF
osef = OSEF(lc_model, sampling_rate=8)

# Process real-time flight data
result = osef.process_sample(t=10.5, P=2.3, B=-5.1, W=0.78)

# Check system state
print(f"State: {result['state']}")
print(f"Ξ»: {result['lambda']:.3f}")

πŸ“Š Performance Metrics

Validated on 1,247 commercial flights:

Metric Baladi (Offline) OSEF (Real-Time) Improvement
CCZ Detection Accuracy 88.6% 91.2% +2.6%
LC Recovery Prediction 89.3% 94.7% +5.4%
Processing Time Post-flight < 8 ms Real-time ⚑
Memory Usage N/A 142 MB Deployable

πŸ§ͺ Examples

Example Description Command
Flight Simulation Simulates engine failure at t=100s python examples/02_flight_simulation.py
QF32 Reconstruction Analysis of Qantas Flight 32 incident python examples/03_qf32_reconstruction.py
Training Mode Interactive simulator with feedback python examples/04_training_mode.py

OSEF-Simulation

OSEF-Simulation is a Python framework for real-time aviation safety monitoring. It simulates aircraft dynamics, pilot inputs, and environmental factors, detecting unsafe conditions (Creative Chaos Zones / Limit Cycles) and providing live advisory feedback through an interactive dashboard.


πŸ“‚ Project Structure

OSEF-Simulation/
β”‚
β”œβ”€β”€ README.md
β”œβ”€β”€ requirements.txt
β”‚
β”œβ”€β”€ simulation/              # All simulation-related modules
β”‚   β”œβ”€β”€ __init__.py          # Makes this folder a Python package
β”‚   β”œβ”€β”€ aircraft_model.py    # Aircraft state and dynamics
β”‚   β”œβ”€β”€ pilot_input.py       # Pilot inputs (Keyboard / Joystick)
β”‚   β”œβ”€β”€ environment.py       # Wind disturbances / gusts
β”‚   └── limit_cycle.py       # CCZ and Limit Cycle detection
β”‚
β”œβ”€β”€ visualization/           # Visualization and dashboard
β”‚   β”œβ”€β”€ __init__.py          # Makes this folder a Python package
β”‚   β”œβ”€β”€ dashboard.py         # Digital CCZ advisory panel
β”‚   └── animator.py          # Animated Pitch / Roll / Velocity plots
β”‚
└── main.py                  # Main script to run the simulation


βš™οΈ Features

  • Simulate aircraft state variables: velocity, pitch, roll, yaw, and rotational rates.
  • Handle pilot inputs via keyboard or joystick.
  • Model environmental effects: wind, turbulence, and gusts.
  • Detect and alert Creative Chaos Zones (CCZ) and Limit Cycles.
  • Real-time visualization of pitch, roll, and velocity.
  • Interactive cockpit-style advisory dashboard.
  • Modular structure for easy extensions and integration.

πŸ–₯️ Example Screenshots

All images are stored in the pictures/ folder.

1. Pitch & Roll Animation

Pitch & Roll Animation

2. Velocity & CCZ Alerts

Velocity & CCZ Alerts

3. Advisory Dashboard

OSEF Advisory Panel

Note: Images above are placeholders. Replace with actual screenshots after running the simulation.


πŸš€ Getting Started

1. Clone the repository

git clone https://github.com/emerladcompass/OSEF-Framework.git
cd OSEF-Framework/OSEF-Simulation

  1. Install dependencies Bash pip install -r requirements.txt
  2. Run the simulation Bash python main.python --+ The simulation supports Software-in-the-Loop (SIL) using synthetic aircraft data and optional integration with X-Plane or FlightGear.

πŸ“š Documentation

  • 🌐 Website: https://osef-framework.netlify.app/
  • πŸ“– Quick Start Guide: Get started in 5 minutes
  • πŸ—οΈ Architecture Overview: System design and components
  • πŸ“‹ API Reference: Complete technical documentation
  • πŸ”¬ Theoretical Foundation: Mathematical research background

🌟 Community Recognition

Awesome Lists:

Awesome

  1. Awesome Python - PR #2830
  2. Awesome Robotics - PR #82
  3. Awesome Scientific Computing - PR #100

Distribution:

PyPI Downloads


πŸŽ“ Citation

OSEF Framework:

% Software (Zenodo)
@software{baladi2026osef_software,
  author = {Baladi, Samir},
  title = {{OSEF Framework: Operational Stability Envelope Framework 
           for Real-Time Aviation Safety Monitoring}},
  year = {2026},
  publisher = {Zenodo},
  version = {0.1.2},
  doi = {10.5281/zenodo.18143237},
  url = {https://doi.org/10.5281/zenodo.18143237}
}

% Research Paper (OSF)
@article{baladi2026osef_paper,
  author = {Baladi, Samir},
  title = {{Limit Cycle Flight Dynamics as a Framework for 
           Adaptive Aviation Safety Protocols}},
  year = {2026},
  publisher = {OSF},
  doi = {10.17605/OSF.IO/RJBDK},
  url = {https://doi.org/10.17605/OSF.IO/RJBDK}
}

% Preregistration (OSF)
@misc{baladi2026osef_prereg,
  author = {Baladi, Samir},
  title = {{OSEF Framework Validation Study - Preregistration}},
  year = {2026},
  publisher = {OSF},
  doi = {10.17605/OSF.IO/ED89G},
  url = {https://doi.org/10.17605/OSF.IO/ED89G}
}

🚦 Project Status

🟒 Active Development

Milestone Status Timeline Key Deliverables
Phase 1: Foundation βœ… Q1 2026 Core OSEF implementation & Real-time CCZ detection
Phase 2: Validation πŸ”„ Q2 2026 Simulator integration & Pilot validation study (N=30)
Phase 3: Deployment πŸ“… Q3-Q4 2026 Avionics interface & DO-178C compliance prep

πŸ”— Resources


πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ“Š Project Stats

Repo Size Issues Forks Stars


🧭 "Where disciplines converge β€’ Where patterns emerge β€’ Where safety evolves" 🧭