STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
control Directory Reference
Directory dependency graph for control:

Detailed Description

Robust DDP Controller Documentation

This directory contains documentation for the robust Differential Dynamic Programming (DDP) controller for engine thrust regulation.

Overview

The robust DDP controller is a complete closed-loop control system that:

  • Regulates engine thrust via pressure regulation
  • Maintains mixture ratio constraints
  • Handles model uncertainty and disturbances
  • Provides safety filtering and robustness guarantees

Documentation Structure

Quick Start

See the main controller class: engine.control.robust_ddp.controller.RobustDDPController

from engine.control.robust_ddp import RobustDDPController, ControllerConfig
from engine.pipeline.config_schemas import PintleEngineConfig
# Initialize
cfg = ControllerConfig(...)
engine_config = PintleEngineConfig(...)
controller = RobustDDPController(cfg, engine_config)
# Control loop
for step in range(num_steps):
actuation_cmd, diagnostics = controller.step(meas, nav, cmd)
# Apply actuation_cmd to hardware

Integration

The controller integrates with:

  • Engine Physics: Uses PintleEngineRunner via EngineWrapper
  • Dynamics Model: Discrete-time state-space model
  • Safety Systems: Constraint checking and safety filtering
  • Logging: Structured logging for analysis

Frontend Integration

The controller is integrated into the web UI with flight-simulation coupling:

  • Backend (backend/routers/control.py): POST /api/control/init, /step, /simulate, /reset, and GET /api/control/status.
  • Frontend (frontend/src/components/ControllerMode.tsx): command-mode selection (target thrust or altitude goal), initial-condition entry, and real-time visualization of thrust tracking, pressures, actuation duty cycles, mixture ratio, value function, control effort, ullage volumes, and mass flow rates.

Each controller step calls engine_wrapper.estimate_from_pressures(...) → PintleEngineRunner.evaluate(...) for full engine physics, propagates the dynamics state, and (in /simulate) uses the resulting thrust to update altitude/velocity for closed-loop flight coupling.

See Also