Skip to main content

Reaction Control System (RCS) Model

The Reaction Control System (RCS) in Moonlander is modeled as a low-order binary thruster system with command delay, first-order actuator dynamics, thrust force generation, and propellant consumption.

The model is intentionally designed as a computationally efficient and numerically stable actuator representation suitable for:

  • Autonomous landing research
  • Guidance and control validation
  • Monte-Carlo simulation campaigns
  • Real-time simulation
  • Telemetry generation and export

Instead of modeling combustion physics or fluid dynamics in detail, the RCS is represented as a binary valve-controlled propulsion actuator with configurable dynamic response behavior.

Binary Thruster Command Model

Each RCS engine is modeled as a binary actuator:

u(t){0,1}u(t) \in \{0,1\}

Where:
u(t)=0u(t)=0 → thruster inactive
u(t)=1u(t)=1 → thruster firing

The current implementation intentionally restricts the RCS model to binary valve logic. This reflects the behavior of many practical spacecraft control thrusters operating in pulse mode.

Command Delay Model

Real RCS systems cannot react instantaneously. Electronic signal propagation, valve motion, and actuator latency introduce a finite command delay between requested and physically executed thrust.

ud(t)=u(ttd)u_d(t)=u(t-t_d)

Where:
u(t)u(t) is the commanded input
ud(t)u_d(t) is the delayed actuator command
tdt_d is the command delay [s]

Internally, the delay is implemented using a FIFO command buffer containing time-stamped command samples.

First-Order Actuator Dynamics

The internal actuator state is represented by a normalized state variable:

s(t)[0,1]s(t) \in [0,1]

The state follows a first-order differential equation:

s˙=udsτ\dot{s}=\frac{u_d-s}{\tau}

Where:
ss is the normalized actuator state
udu_d is the delayed binary command
τ\tau is the actuator time constant

This formulation models the finite valve opening and closing dynamics of the RCS thruster.

Asymmetric Rise and Decay Dynamics

The model supports different dynamic response behavior for thruster activation and deactivation:

τ={τon,ud=1τoff,ud=0 \tau = \begin{cases} \tau_{on}, & u_d = 1 \\ \tau_{off}, & u_d = 0 \end{cases}

This allows more realistic actuator behavior because physical valve opening and valve closing characteristics are often asymmetric in real propulsion systems.

Typical interpretation:
τon\tau_{on} → valve opening dynamics
τoff\tau_{off} → valve closing dynamics

Exact Discrete First-Order Solution

Instead of relying solely on explicit Euler integration, the model additionally supports the exact discrete solution of the first-order system for constant input over one time step.

Starting from:

s˙=usτ\dot{s}=\frac{u-s}{\tau}

the exact discrete update equation becomes:

sk+1=sk+(1eΔt/τ)(uksk) s_{k+1} = s_k + \left(1-e^{-\Delta t / \tau}\right) (u_k-s_k)

This formulation improves numerical stability and avoids timestep- dependent response distortions.

Where:
Δt\Delta t is the simulation timestep
sks_k is the current actuator state
sk+1s_{k+1} is the updated actuator state

Thrust Force Generation

The generated scalar thrust force magnitude is computed from the normalized actuator state:

FT(t)=FT,noms(t)F_T(t)=F_{T,nom}\,s(t)

Where:
FT(t)F_T(t) is the scalar thrust force magnitude [N]
FT,nomF_{T,nom} is the nominal maximum thrust force [N]
s(t)s(t) is the normalized actuator state [-]

The thrust force vector is then generated externally by combining the scalar thrust force magnitude with the configured thrust direction:

Fthr(t)=FT(t)d^\mathbf{F}_{thr}(t)=F_T(t)\hat{\mathbf{d}}

Where:
Fthr(t)\mathbf{F}_{thr}(t) is the generated thrust force vector [N]
FT(t)F_T(t) is the scalar thrust force magnitude [N]
d^\hat{\mathbf{d}} is the normalized thrust direction vector [-]

Torque Generation

Since RCS thrusters are mounted at specific locations relative to the spacecraft center of gravity, they additionally generate torque.

The generated torque is computed using the moment arm and thrust force vector:

Mthr(t)=(rthrrCG)×Fthr(t) \mathbf{M}_{thr}(t) = \left( \mathbf{r}_{thr} - \mathbf{r}_{CG} \right) \times \mathbf{F}_{thr}(t)

Where:
rthr\mathbf{r}_{thr} is the thruster position
rCG\mathbf{r}_{CG} is the spacecraft center of gravity
Fthr\mathbf{F}_{thr} is the generated thrust force vector

This formulation enables direct coupling to spacecraft rigid-body rotational dynamics.

Propellant Consumption

The instantaneous propellant mass flow rate is computed using the specific impulse formulation:

m˙=FTIspg0\dot{m}=\frac{F_T}{I_{sp}g_0}

Where:
m˙\dot{m} is the propellant mass flow rate [kg/s]
FTF_T is the generated scalar thrust force [N]
IspI_{sp} is the specific impulse [s]
g0g_0 is standard gravity [m/s²]

The remaining fuel mass evolves according to:

mf(t+Δt)=mf(t)m˙Δtm_f(t+\Delta t)=m_f(t)-\dot{m}\Delta t

Numerical Integration Methods

The current implementation supports multiple numerical integration strategies:

  • Explicit Euler Integration
  • Exact Discrete First-Order Solution

The exact discrete formulation is currently preferred because it provides improved stability and timestep independence.

Model Assumptions and Simplifications

The current implementation intentionally focuses on low-order actuator realism and computational efficiency.

The following effects are currently neglected:

  • Combustion dynamics
  • Thermal effects
  • Valve hysteresis
  • Minimum impulse bit constraints
  • Plume interaction
  • Flexible-body dynamics
  • Pressure-dependent thrust variation

These simplifications are intentional and support stable real-time simulation as well as reproducible research workflows.

Typical RCS Parameters

ParameterTypical Range
FT,nomF_{T,nom}10 – 500 N
IspI_{sp}200 – 320 s
tdt_d5 – 50 ms
τon\tau_{on}20 – 150 ms
τoff\tau_{off}20 – 150 ms

Key Characteristics

  • Binary valve-controlled RCS actuator model
  • Explicit command-delay simulation
  • Separate rise and decay actuator dynamics
  • Exact discrete first-order integration
  • Physically coupled propellant consumption
  • Vector-based force and torque generation
  • Research-oriented telemetry support
  • Real-time capable low-order implementation