MEKAWIRE
ExpertarXiv

FlapSim: A Composable MuJoCo Simulation Platform and Reduced-Order Aerodynamic Model Hierarchy for Flapping-Wing Robotics

Mingshan He
From the abstract

Flapping-wing simulation must reconcile high-frequency wingbeat aerodynamics with the slower dynamics relevant to flight control and reinforcement learning. We present FlapSim, a modular open-source MuJoCo simulation platform that combines robot descriptions, wing geometry, and composable aerodynamic models in a deterministic simulation pipeline.

From the abstract. Our summary is in progress.

Full paper

FlapSim: A Composable MuJoCo Simulation Platform and Reduced-Order Aerodynamic Model Hierarchy for Flapping-Wing Robotics

Mingshan He

Published under CC BY 4.0. Reproduced with attribution; original at arXiv:2610.40902 (PDF).

Abstract

Flapping-wing simulation must reconcile high-frequency wingbeat aerodynamics with the slower dynamics relevant to flight control and reinforcement learning. We present FlapSim, a modular open-source MuJoCo simulation platform that combines robot descriptions, wing geometry, and composable aerodynamic models in a deterministic simulation pipeline. Across 48 held-out scenarios spanning frequency, gimbal, wind, frequency-step, gust, and cross-robot flat-plate regimes, we compare five reduced-order configurations operating at 1\,\text{ms} with a 50\,\mu\text{s} quasi-steady blade-element reference. The built-in hover cycle-averaged baseline achieves a 67.51\times CPU speedup but only 0.6593 mean wrench fidelity. Combining multirate 21-substep clock synchronization, three-dimensional linear/quadratic inflow and gust coupling, analytical blade-element geometry scaling, and phase-locked 1f\text{--}6f harmonics raises mean fidelity to 0.9646 at a 65.19\times speedup in a five-block model. A streamlined four-block model without explicit step-transient lag states achieves 0.9662 fidelity at a 67.98\times speedup. Controlled ablations show that stroke harmonics are particularly important during frequency transitions, improving held-out frequency-step fidelity by +0.3176. Transfer-function analysis explains this effect: fixed-window cycle averaging retains harmonic contributions when the wingbeat frequency changes, so within-cycle reconstruction also improves the filtered wrench. Once phase alignment and harmonic synthesis are included, explicit transient lag states provide no additional benefit in this benchmark. These results characterize the accuracy–computation tradeoff of the aerodynamic hierarchy and identify timing, inflow, geometry, and harmonic representation as central considerations for reduced-order flapping-wing simulation.

†

I Introduction

Flapping-wing micro air vehicles (FWMAVs) and bio-inspired aerial robots generate lift, thrust, and control moments through rapid, large-amplitude wing reciprocation coupled with passive or active feathering rotation [1, 2, 3, 4]. Unlike fixed-wing aircraft or rotary-wing quadrotors whose aerodynamic loads vary smoothly at the rigid-body attitude control rate, flapping wings operate in an unsteady low-to-moderate Reynolds number regime (Re\in[10^{2},10^{4}]) characterized by leading-edge vortex (LEV) attachment [5, 6], rotational circulation during stroke reversal [7, 8], wing–wake interaction [9, 10, 11], and aeroelastic pitch recoil [12, 13, 14]. While direct Navier–Stokes computational fluid dynamics (CFD) captures these three-dimensional vortex structures [15, 16], its computational cost of hours per wingbeat precludes closed-loop flight controller synthesis, system identification, or reinforcement learning.

Quasi-steady blade-element models—evaluating spanwise wing-section kinematics with empirical RoboFly translational and rotational force coefficient fits [9, 10, 7, 14]—provide a tractable middle ground whose accuracy depends on the kinematics and aerodynamic effects included [17, 16, 18]. However, because the wing’s instantaneous velocity, angle of attack, and pitching rate oscillate at 20\text{--}50\,\text{Hz} (with higher harmonics up to 300\,\text{Hz}), resolving blade-element loads alongside multibody dynamics motivates small integration steps; this study uses \Delta t_{\text{ref}}=50\,\mu\text{s} (20\,\text{kHz}) [19, 20]. At 50\,\mu\text{s}, simulating 1\,\text{s} of flight requires 20{,}000 multibody and aerodynamic evaluations, making simulation cost relevant to model-predictive control [21, 22] and large-scale policy optimization [23]. Conversely, rigid-body cycle-averaged models step at \Delta t=1\,\text{ms} (1\,\text{kHz}) by replacing within-stroke blade-element integration with stroke-averaged thrust and moment maps, with model-dependent speed and accuracy tradeoffs; simple hover formulations can omit 3D ambient wind drag, unsteady gust transients, cross-robot planform scaling, and within-cycle harmonic forces [24, 25, 26, 27].

To investigate and bridge this fidelity-versus-compute gap systematically, we present FlapSim, a modular simulation platform for flapping-wing robotics built on MuJoCo 3.8 [28, 29]. FlapSim treats aerodynamic models, environmental wind/gust fields, wing kinematics, sensors, and controllers as composable plugins communicating over a deterministic signal bus. FlapSim provides a hierarchy of aerodynamic plugins ranging from a regression-tested 50\,\mu\text{s} per-step quasi-steady blade-element simulator down to a 1\,\text{ms} cycle-averaged rigid-body model equipped with automated virtual-wind-tunnel identification.

This paper makes two contributions:

  1. Platform Architecture and Software Characterization: We document FlapSim’s software architecture, robot manifest and CAD/MJCF/URDF import pipeline, first-class wing planform integral engine, phase-ordered plugin execution loop, Gymnasium learning interfaces, and identification tooling, grounded in a deterministic codebase inventory (69 Python modules, 9{,}177 lines of code across 13 subpackages, 17 registered plugins, 117 unit and regression tests).
  2. Quantitative Characterization of the Reduced-Order Aerodynamic Hierarchy: Across 48 held-out test scenarios spanning six operating regimes (frequency, gimbal, wind, frequency-step, gust, and parametric flat-plate robots), we benchmark five 1\,\text{ms} reduced-order aerodynamic configurations against the 50\,\mu\text{s} per-step blade-element reference. We demonstrate that combining multirate 21-substep clock synchronization, 3D linear/quadratic wind and multi-rate gust coupling, analytical blade-element planform scaling, and 1f\text{--}6f stroke-harmonic synthesis raises 48-scenario mean wrench fidelity from 0.6593 (built-in hover baseline) and 0.8280 (first-principles wind-lag baseline) to 0.9646 (65.19\times speedup) in a five-block surrogate and 0.9662 (67.98\times speedup) in a streamlined four-block surrogate. Through controlled ablations and transfer-function analysis, we explain why within-cycle 1f\text{--}6f harmonics govern mid-flight frequency-step fidelity (+0.3176 held-out step lift) and show no additional benefit from explicit step-transient lag states in this benchmark.

Figure provides a visual overview of the platform. The central view connects the robot’s gimbaled mounting, stroke kinematics, passive feathering, and blade-element force application. The insets relate this physical model to the stroke trajectory, drivetrain, parametric robot construction, and illustrative free-flight and wind/gust configurations. These views place the aerodynamic hierarchy in its broader simulation context; the quantitative comparisons in this report use the fixed-base protocol described in the experimental section.

The source code is available at https://github.com/MingshanHe/FlapSim; the project website is https://mingshanhe.github.io/FlapSim/.

II Related Work

II-A Related Simulators and Flapping-Wing Aerodynamic Models

General-purpose robotics simulators—including MuJoCo [28, 29, 21, 22], Drake, NVIDIA Isaac/Orbit, Gazebo, and PyBullet—provide fast rigid-body contact and articulated multibody solvers, and recent differentiable or graph-network physics engines extend these capabilities to gradient-based system identification [23]. However, flapping-wing applications require specialized aerodynamic models beyond generic rigid-body and drag formulations to capture chordwise blade-element velocity gradients, rotational circulation, Wagner circulation lag, and stroke-plane inflow coupling required for flapping flight [1, 2].

The flapping-wing simulators compared here were developed around specific organisms or robot platforms and aerodynamic formulations. Table I summarizes the four open projects we compare against, using only facts stated in their repositories and papers. (i) flybody is an anatomically detailed MuJoCo body model of the fruit fly Drosophila melanogaster with reinforcement-learning tasks for walking imitation, flight and vision-guided flight, exposed through a Python action–step environment API with optional Acme/TensorFlow and Ray training extras [30]. (ii) Flappy Hummingbird is an open-source dynamic simulation of a dual-motor flapping-wing micro air vehicle based on the Purdue Hummingbird robot, built on the DART physics engine through the Python DART binding; it exposes Gym-style hover environments (fwmav_hover-v0/v1) used with Stable Baselines and ships PID and adaptive robust controller baselines [31]. (iii) SJTU flapping-wing simulator is a C++ (CMake) re-implementation of Flappy Hummingbird on DART for the SJTU flapping wing, with ROS-based debugging and visualization (URDF, rviz and launch files) and no associated publication. (iv) FlappingwingSimu is a flapping-wing simulation in the Webots robot simulator, mainly Python with MATLAB scripts, whose blade-element aerodynamics comprise translational lift, translational drag, rotational lift and added mass; its version 2.0 targets trajectory tracking and was validated experimentally [32]. FlapSim differs from these in being robot-agnostic by construction: robot models supplied as URDF, MJCF, or programmatic MuJoCo specifications acquire flapping-wing functionality through a compact manifest, and the aerodynamics, actuators, sensors and controllers are plugins from one registry. Its per-step quasi-steady model reproduces the formulation of the FlapX simulator (Whitney & Wood 2010 with the Dickinson et al. coefficient fits), as its documentation states [9, 10, 7], and its regression tests pin the resulting fixed-base lift sweep.

TABLE I: Open flapping-wing simulators compared in this report, described only with facts stated in their repositories or cited papers. QS: quasi-steady blade-element aerodynamics.
  • flybody [30]
    Physics core
    MuJoCo
    Language
    Python
    Subject
    Anatomical Drosophila body
    Aerodynamics
    Not described in repository
    Learning interface
    step(action) RL tasks; Acme, Ray
  • Flappy Hummingbird [31]
    Physics core
    DART (pydart2)
    Language
    Python
    Subject
    Dual-motor hummingbird MAV
    Aerodynamics
    Not described in repository
    Learning interface
    Gym fwmav_hover-v0/v1; Stable Baselines
  • fwmav_sim_sjtu
    Physics core
    DART
    Language
    C++ (CMake), ROS
    Subject
    SJTU flapping wing
    Aerodynamics
    Port of Flappy Hummingbird
    Learning interface
    None stated
  • FlappingwingSimu [32]
    Physics core
    Webots
    Language
    Python, MATLAB
    Subject
    Flapping-wing biomimetic robot
    Aerodynamics
    QS: translational lift/drag, rotational lift, added mass
    Learning interface
    Trajectory tracking (v2.0)
  • FlapSim v0.2.0 (this report)
    Physics core
    MuJoCo 3.8
    Language
    Python
    Subject
    Any URDF/MJCF/MjSpec robot via manifest
    Aerodynamics
    QS reference + 3 additive models + ground-effect modifier; cycle-averaged reduced model
    Learning interface
    Gymnasium SimulationEnv; parameter studies

III Method

III-A Platform Architecture and Codebase Inventory

FlapSim v0.2.0 is a modular Python library built on MuJoCo 3.8. The evaluated implementation is fixed at revision 19fa57f. Table II summarizes the software inventory of the evaluated implementation: 69 Python modules comprising 9{,}177 lines of source code organized into 13 subpackages (plus root package exports), verified by 117 test functions across 23 test files and accompanied by 22 documentation pages and 24 runnable examples.

Fig. 2: FlapSim architecture and aerodynamic model hierarchy. (a) Robot descriptions and wing geometry are assembled into a MuJoCo 3.8 simulation, with a deterministic sequence of sensing, control, actuation, force evaluation, integration, post-step updates, and recording. Plugins exchange state through a shared signal bus. (b) The hierarchy connects the 50\,\mu\text{s} blade-element reference to alternative 1\,\text{ms} reduced models (65\times\text{--}68\times speedup). Dashed connections denote offline identification.

Simulation Step Pipeline and Signal Bus.

Figure 2 summarizes the software architecture. The simulation core manages the compiled MuJoCo model and dynamic state, an ordered set of plugins, and a shared signal bus. Scalar and array-valued signals represent quantities such as wing angle of attack, angular velocity, and commanded stroke frequency, allowing plugins to communicate through named channels. Each integration step follows a fixed sequence: sensing, control, actuation, aerodynamic and drag-force evaluation, multibody integration, kinematic target updates, and recording. The plugin interface separates actuation, aerodynamics, atmosphere, control, external forces, recording, and sensing. The evaluated version includes 17 plugins: sinusoidal, position-controlled, servo, and motor–crank actuation; quasi-steady, composite, and cycle-averaged aerodynamics; atmospheric density, steady wind, 1-\cos, sinusoidal and step gusts, and Ornstein–Uhlenbeck turbulence; body drag; hover, scheduled, and user-defined control; inertial, range, encoder, and wrench sensing; and in-memory recording. Sensor outputs support sample-and-hold, low-pass filtering, delay, noise, bias, and quantization. Third-party plugins can extend these interfaces, while declarative YAML configurations support simulation, inspection, recording, and parameter sweeps.

TABLE II: Deterministic software inventory of FlapSim v0.2.0 (commit 19fa57f) across its 13 subpackages and root namespace (69 Python modules, 9{,}177 lines, 17 registered plugins, 117 tests across 23 test files, 22 docs, 24 examples).
  • flapsim.robot
    Modules
    7
    Lines
    1,834
    Core responsibilities
    RobotManifest, URDF/MJCF/MjSpec import, patches, builders
  • flapsim.aero
    Modules
    13
    Lines
    1,754
    Core responsibilities
    Aero engine, 4 models, ground-effect modifier, atmosphere, drag, identify
  • flapsim.wings
    Modules
    3
    Lines
    805
    Core responsibilities
    Runtime Wing, planform integrals (profile, polyline, polygon, STL)
  • flapsim.actuators
    Modules
    5
    Lines
    713
    Core responsibilities
    Sinusoidal stroke, PD position, servo, DC motor + crank
  • flapsim.sensors
    Modules
    6
    Lines
    623
    Core responsibilities
    IMU, range finder, encoder, load cell; noise/delay conditioner
  • flapsim.fluid
    Modules
    4
    Lines
    592
    Core responsibilities
    Blade-element math, legacy averaged hover model, MuJoCo adapter
  • flapsim (root)
    Modules
    4
    Lines
    527
    Core responsibilities
    Package exports, SimCore wrapper, study, CLI
  • flapsim.core
    Modules
    5
    Lines
    498
    Core responsibilities
    Simulation, phases, SignalBus, flapsim.sim/1 configs
  • flapsim.controllers
    Modules
    4
    Lines
    447
    Core responsibilities
    hover_pid, schedule, callback
  • flapsim.envs
    Modules
    3
    Lines
    415
    Core responsibilities
    Gymnasium SimulationEnv, hover reward and termination
  • flapsim.io
    Modules
    4
    Lines
    382
    Core responsibilities
    MemoryRecorder, force-arrow overlays, video export
  • flapsim.plugins
    Modules
    4
    Lines
    375
    Core responsibilities
    Base classes, registry, entry-point discovery
  • flapsim.config
    Modules
    5
    Lines
    114
    Core responsibilities
    Typed aero options and wing/torso inputs
  • flapsim.testing
    Modules
    2
    Lines
    98
    Core responsibilities
    Plugin conformance checks (117 tests in tests/)

Robot Manifests and First-Class Wing Planform Geometry.

The robot-description subsystem (7 modules, 1{,}834 lines) and wing-geometry subsystem (3 modules, 805 lines) couple a robot model (URDF, MJCF, or a programmatic MuJoCo specification) to a declarative manifest. The manifest specifies the root body, base type, joint and body modifications, and wing descriptions that are resolved into runtime geometry. Each wing specifies its body, side, aerodynamic frame (span and chord axes or a site), stroke and feathering joints with signs, a planform given as a rectangular or elliptic profile, a chord polyline, a polygon or an STL mesh, hinge offsets, and a mass model such as the spar-plate distribution used by the example robot. At initialization, the wing-geometry subsystem precomputes the blade-element strip geometry and exact spanwise moment integrals:

\displaystyle I_{k} \\ \displaystyle=\int_{0}^{R}r^{k}c(r)\,dr, \\ \displaystyle J_{m} \\ \displaystyle=\int_{0}^{R}r^{m}c(r)^{2}\,dr,\quad k,m\in\{0,1,2,3\}.

which govern translational aerodynamic force (I_{2}), aerodynamic roll/pitch moments (I_{3}), rotational circulation (J_{1}), and added-mass inertia (J_{2}) [7, 13]. The primary benchmark platform is a 30\,\text{g} (0.030\,\text{kg}) gimbaled flapping-wing robot with wing span R=0.070\,\text{m} (70\,\text{mm}) and reference timestep \Delta t_{\text{ref}}=50\,\mu\text{s} (5\times 10^{-5}\,\text{s}), complemented by a parametric flat-plate model generator that constructs two-wing robots of arbitrary span R\in[0.06,0.09]\,\text{m} and chord c\in[0.015,0.025]\,\text{m}.

III-B Composable Aerodynamic Hierarchy and Reduced-Order Surrogate Formulation

At each integration step, the aerodynamic engine evaluates additive per-wing force models and multiplicative corrections. Four models are available: regression-tested quasi-steady blade-element aerodynamics, rotational lift, added mass, and wake capture, together with a ground-effect correction. A composite interface combines these contributions, while a cycle-averaged rigid-body model identifies lift, thrust-vector tilt, control-moment, and damping parameters from fixed-base sweeps. In this study’s calibration probes, the additive added-mass and rotational-lift models produced unphysical mean loads on the example robot (negative or strongly lateral mean force). The regression-tested quasi-steady model therefore serves as the reference; agreement with this simulator is not an independent validation against physical measurements.

1. Quasi-Steady Blade-Element Reference (\Delta t_{\text{ref}}=50\,\mu\text{s}).

The reference simulator integrates blade-element loads using precomputed spanwise planform moments. At a representative span location r_{i}, the relative velocity can be written in the general rigid-body form below; the implementation evaluates its spanwise dependence analytically. At each 50\,\mu\text{s} step, the local relative airflow velocity \mathbf{u}_{i}(t)\in\mathbb{R}^{3} in the wing-strip frame combines the flapping/pitching velocity of the strip, body translational/angular velocity, and transformed ambient wind \mathbf{w}(\mathbf{x}_{i},t):

\displaystyle\mathbf{u}_{i}(t)={} \\ \displaystyle\mathbf{R}_{w}^{\top}(t)\bigl(\mathbf{v}_{\text{body}}(t)+\boldsymbol{\omega}_{\text{body}}(t)\times\mathbf{r}_{i}(t) \\ \displaystyle}{\displaystyle-\mathbf{w}(\mathbf{x}_{i},t)\bigr)+\mathbf{v}_{\text{strip,rel}}(r_{i},t).

The evaluated reference uses FlapSim’s quasi-steady normal-force model.

The wing axes are +X (surface normal), +Y (feathering), and -Z (chord). The angle of attack is evaluated at the spanwise center of pressure using the local flow and feathering angle. The implemented coefficient and chordwise pressure-center fraction are

\displaystyle C_{N}(\alpha)={} \\ \displaystyle 1.8\sin(2\alpha)\cos\alpha+1.95\sin\alpha \\ \displaystyle}{\displaystyle-1.5\cos(2\alpha)\sin\alpha, \\ \displaystyle d_{\mathrm{cp}}(\alpha)={} \\ \displaystyle 0.46-0.332\cos\alpha \\ \displaystyle}{\displaystyle-0.037\cos(3\alpha)-0.013\cos(5\alpha).

The model applies the integrated normal force at its spanwise and chordwise center of pressure, together with a rotational damping moment about the feathering axis. Summing the applied forces and their moment arms about the root body’s center of mass yields \mathbf{W}_{\mathrm{ref}}=[\mathbf{F}_{\mathrm{ref}}^{\top},\boldsymbol{\tau}_{\mathrm{ref}}^{\top}]^{\top}\in\mathbb{R}^{6}. Quasi-steady formulations in the broader literature account for translational loading and wing interactions [9, 10, 7, 16], rotational circulation [8, 20, 14], added mass [1], and unsteady circulation effects [6]. The benchmark reference does not enable separate rotational-lift or added-mass plugins, or a Wagner lag state.

2. Hover Cycle-Averaged (CA) Baseline (\Delta t=1\,\text{ms}).

FlapSim’s built-in reduced plugin steps at \Delta t=1\,\text{ms} (20\times larger than \Delta t_{\text{ref}}) and approximates the stroke-averaged hover thrust and gimbal control moments [24, 4, 27] as:

\displaystyle\bar{F}_{z}(f,\Phi) \\ \displaystyle=k_{L}f^{2}(\Phi/\Phi_{0})^{p}, \\ \displaystyle\mathbf{F}_{\text{hover}} \\ \displaystyle=\bar{F}_{z}\begin{bmatrix}\sin\theta_{\text{pitch}}\\
-\sin\theta_{\text{roll}}\\
\cos\theta_{\text{pitch}}\cos\theta_{\text{roll}}\end{bmatrix}, \\ \displaystyle\boldsymbol{\tau}_{\text{gimbal}} \\ \displaystyle=\begin{bmatrix}k_{\tau,x}\theta_{\text{roll}}\\
k_{\tau,y}\theta_{\text{pitch}}\\
0\end{bmatrix}(\bar{F}_{z}/\bar{F}_{z,0}).

The identification fit gives k_{L}=1.85175\times 10^{-4}\,\text{N/Hz}^{2} and p=2.5002 from 11 wind-tunnel sweeps (22.5\,\text{s}). For flat-plate scenarios, a single hover coefficient k_{\text{plate}}=1.04517\times 10^{-4}\,\text{N/Hz}^{2} is scaled analytically by cR^{3}/(c_{\text{ref}}R_{\text{ref}}^{3}). As documented in the platform roadmap, the cycle-averaged model omits the effect of ambient wind \mathbf{w}, applies frequency changes instantaneously without transient lag, and omits within-cycle stroke harmonics.

3. Linear/Quadratic (LQ) Wind-Lag Baseline (\Delta t=1\,\text{ms}).

To test how much of the fidelity gap can be closed by a compact first-principles extension without high-order basis functions or harmonic synthesis, this baseline augments Eq. (3) with: (i) a first-order actuator/inflow frequency lag \tau_{\text{lag}}\dot{f}_{\text{eff}}+f_{\text{eff}}=f_{\text{cmd}} with \tau_{\text{lag}}=12\,\text{ms}; (ii) linear flapping-coupled wind drag \mathbf{D}_{\text{lin}}=-\mathbf{C}_{1}(f_{\text{eff}}\Phi)\mathbf{w} representing cycle-averaged blade-element advance-ratio damping [24, 25, 26, 27]; (iii) quadratic bluff-body wind drag \mathbf{D}_{\text{quad}}=-\mathbf{C}_{2}\|\mathbf{w}\|\mathbf{w}; and (iv) analytical strip-integral scaling cR^{3}f^{2}\Phi^{2} for parametric flat plates.

4. Multi-Block Harmonic Surrogate (\Delta t=1\,\text{ms}).

To achieve near-reference accuracy across the evaluated conditions while preserving a \sim 65\times\text{--}68\times CPU speedup, the proposed force model decomposes the 6-DoF aerodynamic wrench into a cycle-averaged mean trajectory plus a phase-locked within-cycle harmonic trajectory:

\displaystyle\mathbf{W}_{\text{surr}}(t) \\ \displaystyle=\bar{\mathbf{W}}(t)+\tilde{\mathbf{W}}(t), \\ \displaystyle\bar{\mathbf{W}}(t) \\ \displaystyle=\sum_{b\in\mathcal{B}}\boldsymbol{\phi}_{\text{mean}}^{(b)}(\mathbf{s}(t_{\text{eval}}))^{\top}\mathbf{W}_{m}^{(b)}, \\ \displaystyle\tilde{\mathbf{W}}(t) \\ \displaystyle=\sum_{b\in\mathcal{B}}\boldsymbol{\phi}_{\text{harm}}^{(b)}(\mathbf{s}(t_{\text{eval}}),\psi(t_{\text{eval}}))^{\top}\mathbf{W}_{h}^{(b)}.

where \mathbf{s}(t_{\text{eval}}) denotes the kinematic, gimbal, wind, gust, and planform state features evaluated at the multirate-synchronized clock t_{\text{eval}}, and \psi(t_{\text{eval}})=2\pi f(t_{\text{eval}})t_{\text{eval}} is the direct wing stroke phase matching the sinusoidal actuator.

Multirate Clock Alignment: The recording protocol calls the simulator’s duration-based advance routine once per nominal 1\,\mathrm{ms} sample. Each call forms a new target from the current floating-point simulation time plus 1\,\mathrm{ms}. With 50\,\mu\mathrm{s} reference steps, rounding can make 20 steps fall just below that target, requiring an extra substep. Repeated calls therefore produce approximately 5\% clock dilation over this recording window. The surrogate uses the following affine clock map to align with the recorded reference:

t_{\text{eval}}(t)=\begin{cases}t+0.001,&t<0.2\,\text{s},\\
0.2+1.05(t-0.2)+0.001,&t\geq 0.2\,\text{s}.\end{cases}
(5)

This mapping approximately aligns stroke phase \psi(t_{\text{eval}}), frequency-step transition times, and 1-\cos gust arrival windows with the 50\,\mu\text{s} reference simulator without altering the 1\,\text{ms} MuJoCo integrator timestep.

Hierarchical Feature Blocks (\mathcal{B}): The surrogate organizes features into five physically motivated blocks calibrated via ridge regression across 356 space-filling training trajectories (304 on the gimbaled flapper and 52 on the flat-plate flapper, using seeds \leq 49{,}999 within the 300\,\text{s} training budget): (i) Blocks 1 & 2 (Hover & Gimbal Control): polynomial basis in normalized stroke frequency f, amplitude \Phi, and dynamic pressure (f\Phi)^{2} (12 mean features), coupled with trigonometric gimbal roll/pitch terms (27 mean features) and 1f,2f,3f,4f,6f Fourier harmonics (66 harmonic features), calibrated via two-pass joint Gauss–Seidel ridge regression across steady hover, gimbal, and pre/post-step segments; (ii) Block 3 (Frequency-Step Transients—Included in the Five-Block Model, Omitted in the Four-Block Model): multi-timescale low-pass filtered frequency states and exponential step-decay basis functions (\tau\in\{2,5,12,25,50,100\}\,\text{ms}, 48 mean features) plus dual-phase step harmonics (56 harmonic features); (iii) Blocks 4a & 4b (3D Steady Wind & Multi-Rate Gust Coupling): linear and quadratic 3D wind components (w_{x},w_{y},w_{z}), advance-ratio cross-terms \mathbf{w}\otimes(f\Phi,f^{2}\Phi^{2}), gimbal–wind interactions (54 mean, 24 harmonic features in 4a), and multi-rate filtered wind accelerations \dot{\mathbf{w}}_{\text{lpf}} capturing unsteady 1-\cos gust lags (36 mean, 24 harmonic features in 4b); and (iv) Block 5 (Parametric Flat-Plate Planform Scaling): analytical blade-element basis combining cR^{3}f^{2}\Phi^{2}, c^{2}R^{2}f^{2}\Phi^{2}, aspect ratio R/c, and inverse aspect ratio c/R (26 mean, 32 harmonic features). At runtime, the model evaluates pre-allocated one-dimensional feature arrays against contiguous weight matrices in <70\,\mu\text{s} per 1\,\text{ms} step.

III-C Experimental Protocol and Six-Family Evaluation Benchmark

The benchmark tests each surrogate across 48 held-out test scenarios (8 space-filling scenarios per family generated from hidden test seeds >49{,}999). Each scenario runs for a 200\,\text{ms} unrecorded settle period followed by a 600\,\text{ms} evaluation recording (600 samples at 1\,\text{kHz}) on a fixed base with kinematically imposed stroke and gimbal angles across six regimes: (1) frequency: constant-frequency and amplitude sweeps across f\in[22,48]\,\text{Hz} and \Phi\in[1.1,1.5]\,\text{rad} in still air; (2) gimbal: combined roll and pitch thrust-vector tilt deflections (\theta_{\text{roll}},\theta_{\text{pitch}}) across flapping frequencies; (3) wind: steady 3D ambient wind vectors \mathbf{w}\in\mathbb{R}^{3} up to \|\mathbf{w}\|\approx 3.0\,\text{m/s} across arbitrary azimuth and elevation angles; (4) frequency-step: abrupt mid-flight frequency steps f_{1}\to f_{2} (|f_{2}-f_{1}|\geq 5\,\text{Hz}) occurring at t=0.3\,\text{s} into the recording; (5) gust: transient 3D 1-\cos wind gusts superimposed on flapping flight during the recording window; and (6) flat-plate: cross-robot transfer to flat-plate flapper instances with randomized wing span R\in[0.06,0.09]\,\text{m} and chord c\in[0.015,0.025]\,\text{m}.

To evaluate cycle-averaged mean loads and transient responses without penalizing pure cycle-averaged models for omitting within-stroke oscillations on steady scenarios, both the reference wrench \mathbf{W}_{\text{ref}}(t) and surrogate wrench \mathbf{W}_{\text{surr}}(t) are passed through a two-pass one-stroke-period moving-average filter \mathcal{F}_{W} of integer window length W=\max(1,\text{round}(1/(f_{\min}\Delta t))), where f_{\min}=\min(f_{1},f_{2}) [7]. Let \mathbf{f}_{j}=\mathcal{F}_{W}[\mathbf{F}_{\mathrm{ref}}]_{j} denote the filtered reference samples. The implementation uses

F_{\mathrm{scale}}=\max\!\left(0.10\left\|\frac{1}{N_{f}}\sum_{j=1}^{N_{f}}\mathbf{f}_{j}\right\|_{2},\;0.01\,\mathrm{N}\right),

where N_{f}=600-2(W-1) because both filter passes use valid convolution. The torque scale is \tau_{\mathrm{scale}}=RF_{\mathrm{scale}}. For vector signals, RMSE is the square root of the temporal mean of the squared Euclidean error norm. The normalized RMS force error e_{F}, normalized RMS torque error e_{\tau}, scenario wrench fidelity \mathcal{M}_{s}, and overall benchmark score S are:

\displaystyle e_{F} \\ \displaystyle=\frac{\operatorname{RMSE}(\mathcal{F}_{W}[\mathbf{F}_{\text{surr}}],\mathcal{F}_{W}[\mathbf{F}_{\text{ref}}])}{F_{\text{scale}}}, \\ \displaystyle e_{\tau} \\ \displaystyle=\frac{\operatorname{RMSE}(\mathcal{F}_{W}[\boldsymbol{\tau}_{\text{surr}}],\mathcal{F}_{W}[\boldsymbol{\tau}_{\text{ref}}])}{\tau_{\text{scale}}}, \\ \displaystyle\mathcal{M}_{s} \\ \displaystyle=e^{-(e_{F}+e_{\tau})/2}, \\ \displaystyle S \\ \displaystyle=\bar{\mathcal{M}}\cdot\operatorname{clip}\left(\frac{\ln(\text{CPU}_{\text{ref}}/\text{CPU}_{\text{surr}})}{\ln 20},0,1\right).

Any configuration achieving at least a 20\times CPU speedup saturates the speed factor at 1.0, so its benchmark score S equals its 48-scenario mean wrench fidelity \bar{\mathcal{M}}=\frac{1}{48}\sum_{s=1}^{48}\mathcal{M}_{s}.

IV Results

IV-A Fidelity vs. Compute Across the Aerodynamic Hierarchy

Table III and Figure 3 present the complete held-out benchmark performance across the five evaluated 1\,\text{ms} aerodynamic hierarchy tiers compared against the 50\,\mu\text{s} per-step quasi-steady reference simulator. Because all five 1\,\text{ms} models execute in 2.031\text{--}2.173\,\text{s} of total CPU time across the 48 scenarios—compared to 132.40\text{--}146.68\,\text{s} for the 50\,\mu\text{s} reference simulator—every reduced configuration achieves an overall CPU speedup between 65.19\times and 68.29\times (exceeding the 20\times threshold with a unit speed factor of 1.0).

TABLE III: Held-out benchmark results for five 1\,\text{ms} configurations against the 50\,\mu\text{s} blade-element reference. (a) Fidelity \mathcal{M}, normalized force error e_{F}, and normalized torque error e_{\tau} for each of six regimes (8 scenarios each). (b) Mean fidelity \bar{\mathcal{M}}=S over all 48 scenarios, CPU speedup, and offline training time.
  • Metric
    (a) Per-family results
    Frequency
    (a) Per-family results
    Gimbal
    (a) Per-family results
    Wind
    (a) Per-family results
    Step
    (a) Per-family results
    Gust
    (a) Per-family results
    Flat plate
  • Hover CA
  • Fidelity \mathcal{M}
    (a) Per-family results
    0.9275
    (a) Per-family results
    0.9440
    (a) Per-family results
    0.2356
    (a) Per-family results
    0.4874
    (a) Per-family results
    0.6153
    (a) Per-family results
    0.7462
  • Force error e_{F}
    (a) Per-family results
    0.0838
    (a) Per-family results
    0.0508
    (a) Per-family results
    1.8124
    (a) Per-family results
    0.6922
    (a) Per-family results
    0.5810
    (a) Per-family results
    0.6030
  • Torque error e_{\tau}
    (a) Per-family results
    0.0669
    (a) Per-family results
    0.0647
    (a) Per-family results
    1.3454
    (a) Per-family results
    0.7563
    (a) Per-family results
    0.4399
    (a) Per-family results
    0.0184
  • LQ wind-lag
  • Fidelity \mathcal{M}
    (a) Per-family results
    0.9522
    (a) Per-family results
    0.9248
    (a) Per-family results
    0.8250
    (a) Per-family results
    0.4840
    (a) Per-family results
    0.9088
    (a) Per-family results
    0.8734
  • Force error e_{F}
    (a) Per-family results
    0.0545
    (a) Per-family results
    0.1159
    (a) Per-family results
    0.3035
    (a) Per-family results
    0.7013
    (a) Per-family results
    0.1454
    (a) Per-family results
    0.2609
  • Torque error e_{\tau}
    (a) Per-family results
    0.0436
    (a) Per-family results
    0.0417
    (a) Per-family results
    0.0967
    (a) Per-family results
    0.7676
    (a) Per-family results
    0.0469
    (a) Per-family results
    0.0183
  • Mean-only
  • Fidelity \mathcal{M}
    (a) Per-family results
    0.9543
    (a) Per-family results
    0.9576
    (a) Per-family results
    0.9535
    (a) Per-family results
    0.6028
    (a) Per-family results
    0.9594
    (a) Per-family results
    0.9646
  • Force error e_{F}
    (a) Per-family results
    0.0499
    (a) Per-family results
    0.0456
    (a) Per-family results
    0.0517
    (a) Per-family results
    0.5209
    (a) Per-family results
    0.0440
    (a) Per-family results
    0.0539
  • Torque error e_{\tau}
    (a) Per-family results
    0.0438
    (a) Per-family results
    0.0413
    (a) Per-family results
    0.0437
    (a) Per-family results
    0.4960
    (a) Per-family results
    0.0389
    (a) Per-family results
    0.0183
  • Five-block harmonic
  • Fidelity \mathcal{M}
    (a) Per-family results
    0.9755
    (a) Per-family results
    0.9730
    (a) Per-family results
    0.9662
    (a) Per-family results
    0.9204
    (a) Per-family results
    0.9712
    (a) Per-family results
    0.9814
  • Force error e_{F}
    (a) Per-family results
    0.0231
    (a) Per-family results
    0.0267
    (a) Per-family results
    0.0362
    (a) Per-family results
    0.1095
    (a) Per-family results
    0.0285
    (a) Per-family results
    0.0221
  • Torque error e_{\tau}
    (a) Per-family results
    0.0266
    (a) Per-family results
    0.0283
    (a) Per-family results
    0.0327
    (a) Per-family results
    0.0571
    (a) Per-family results
    0.0300
    (a) Per-family results
    0.0155
  • Four-block harmonic
  • Fidelity \mathcal{M}
    (a) Per-family results
    0.9752
    (a) Per-family results
    0.9730
    (a) Per-family results
    0.9662
    (a) Per-family results
    0.9299
    (a) Per-family results
    0.9714
    (a) Per-family results
    0.9814
  • Force error e_{F}
    (a) Per-family results
    0.0231
    (a) Per-family results
    0.0267
    (a) Per-family results
    0.0362
    (a) Per-family results
    0.0805
    (a) Per-family results
    0.0285
    (a) Per-family results
    0.0221
  • Torque error e_{\tau}
    (a) Per-family results
    0.0273
    (a) Per-family results
    0.0282
    (a) Per-family results
    0.0328
    (a) Per-family results
    0.0674
    (a) Per-family results
    0.0297
    (a) Per-family results
    0.0155
Fig. 3: Wrench fidelity across the aerodynamic model hierarchy. (a) Mean fidelity in each flight regime (n=8 scenarios per regime). (b) Mean fidelity across all 48 scenarios, increasing from 0.6593 for the hover cycle-averaged baseline to 0.9662 for the four-block harmonic model. Error bars represent \pm 1 sample standard deviation across scenarios: n=8 in (a), and n=48 in (b). The plotted scenario-level values are from a local re-evaluation; family means agree with the original benchmark in Table III within 0.001. The bars describe scenario variability, rather than uncertainty across repeated runs.

Where the Built-In Hover Model Succeeds and Fails.

As shown in Table III and Figure 3(a), FlapSim’s built-in cycle-averaged model reproduces the 50\,\mu\text{s} blade-element simulator well in still-air hover (frequency fidelity 0.9275, e_{F}=0.0838, e_{\tau}=0.0669) and constant-tilt attitude control (gimbal fidelity 0.9440, e_{F}=0.0508, e_{\tau}=0.0647). However, its fidelity decreases in four regimes: (1) 3D Steady Wind (wind fidelity 0.2356): ignoring ambient airflow \mathbf{w} yields e_{F}=1.8124 (physical RMSE 37.83\,\text{mN}) and e_{\tau}=1.3454 (1.966\,\text{mN}\cdot\text{m}), approximately 1.81\times the reference force normalization scale; (2) Mid-Flight Frequency Steps (frequency-step fidelity 0.4874): instantaneous changes in \bar{F}_{z}\propto f^{2} without clock synchronization or harmonic synthesis produce e_{F}=0.6922 (15.14\,\text{mN}) and e_{\tau}=0.7563 (1.142\,\text{mN}\cdot\text{m}); (3) Unsteady Wind Gusts (gust fidelity 0.6153): unmodeled 1-\cos gust impingement yields e_{F}=0.5810 (16.10\,\text{mN}) and e_{\tau}=0.4399 (0.847\,\text{mN}\cdot\text{m}); and (4) Parametric Wing Geometries (flat-plate fidelity 0.7462): extrapolating a single hover coefficient via cR^{3} leaves a vertical thrust residual e_{F}=0.6030 (9.25\,\text{mN}) despite low zero-gimbal torque error e_{\tau}=0.0184 (0.019\,\text{mN}\cdot\text{m}) [13].

Closing the 3D Wind, Gust, and Planform Scaling Gaps.

Figure 4 decomposes normalized force error e_{F} and torque error e_{\tau} on a logarithmic scale across all six families. Introducing the compact first-principles linear/quadratic wind-drag and 12\,\text{ms} lag baseline lifts overall 48-scenario fidelity by +0.1687 to 0.828039 (68.29\times speedup): wind fidelity increases from 0.2356 to 0.8250 (e_{F} reduced 6.0\times from 1.8124 to 0.3035; e_{\tau} reduced 13.9\times from 1.3454 to 0.0967), gust fidelity rises from 0.6153 to 0.9088, and flat-plate rises from 0.7462 to 0.8734. Expanding to the full multi-block inflow and planform formulation reduces steady wind force error by 50.1\times relative to the hover baseline (e_{F}=1.8124\to 0.0362, physical RMSE 37.83\,\text{mN}\to 0.77\,\text{mN}) and wind torque error by 41.1\times (e_{\tau}=1.3454\to 0.0327, physical RMSE 1.966\,\text{mN}\cdot\text{m}\to 0.048\,\text{mN}\cdot\text{m}). Similarly, multi-rate filtered gust states reduce gust force error by 20.4\times (0.5810\to 0.0285, fidelity 0.9714), and the polynomial planform basis reduces flat-plate force error by 27.3\times (0.6030\to 0.0221, physical RMSE 9.25\,\text{mN}\to 0.30\,\text{mN}, fidelity 0.9814).

Fig. 4: Force and torque errors by flight regime. (a) Normalized force error e_{F}. (b) Normalized torque error e_{\tau}. Both axes are logarithmic. The original benchmark records a 50.1\times wind force-error reduction (1.8124\to 0.0362) and a 27.3\times flat-plate force-error reduction (0.6030\to 0.0221). Points and error bars show means and \pm 1 sample standard deviation across the 8 scenarios per regime in the local re-evaluation.

IV-B Component Ablations: Harmonic Synthesis and Transient Lag States

We next examine why a cycle-averaged evaluation benchmark—which explicitly filters both reference and surrogate wrenches with a two-pass one-stroke-period moving average \mathcal{F}_{W}—is sensitive to within-cycle stroke harmonics during frequency steps. Figure 5 and Figure 6 present the controlled ablation results and mathematical transfer-function analysis.

Fig. 5: Computational speedup and component ablations. (a) CPU speedup by regime, relative to the reference simulator; the dashed line marks the 20\times score-saturation threshold. Points and error bars show means and \pm 1 sample standard deviation across the 8 scenarios per regime in the local re-evaluation. Original benchmark family speedups span 52.07\times to 109.85\times. (b) Changes in frequency-step and overall fidelity when removing harmonics, explicit transient states, or clock synchronization. Frequency-step changes are -0.3176, +0.0095, and -0.3243, respectively. Panel (b) shows aggregate benchmark differences and has no error bars; the clock comparison uses the completed pre- and post-synchronization runs described in the text.

1. Ablating 1f\text{--}6f Stroke-Phase Harmonics.

Zeroing all within-cycle harmonic weights (\mathbf{W}_{h}^{(b)}=\mathbf{0}) while retaining all cycle-averaged mean blocks, 21-substep clock synchronization, and Block-3 step-transient mean filters reduces the 48-scenario composite score by \Delta S=-0.065925 (from 0.964630 to 0.898705). Across the five constant-frequency families, removing harmonics causes only a modest fidelity reduction of 0.0118\text{--}0.0212 (frequency 0.9755\to 0.9543, gimbal 0.9730\to 0.9576, wind 0.9662\to 0.9535, gust 0.9712\to 0.9594, flat-plate 0.9814\to 0.9646). In comparison, during mid-flight frequency steps, removing harmonics changes fidelity by -0.3176 on the held-out test set (0.9204\to 0.6028; force error increasing 4.76\times from 0.1095 to 0.5209, torque error increasing 8.69\times from 0.0571 to 0.4960) and by -0.3680 on the separate 48-scenario post-hoc evaluation suite (0.9325\to 0.5645, paired t=10.07, p=2.04\times 10^{-5}, exact Wilcoxon p=0.0078125).

2. Transfer-Function Analysis of Moving-Average Filter Leakage.

For a harmonic oscillating at f_{\text{osc}}=kf, two passes of a discrete boxcar moving average of integer length W have the exact amplitude transfer gain:

G_{\text{2pass}}(kf,W)=\left(\frac{\sin(\pi kfW\Delta t)}{W\sin(\pi kf\Delta t)}\right)^{\!2}.
(7)

Post-hoc evaluation across all 48 scenarios (Figure 6) reveals two physical regimes: (i) Constant-Frequency Integer-Millisecond Rounding Leakage (n=40 scenarios): because W=\text{round}(1000/f) rounds the stroke period to the nearest integer millisecond, Wf\Delta t=1+\epsilon with |\epsilon|\leq 1/(2W)\approx 1.1\%\text{--}2.4\%, yielding a non-zero two-pass transmission G_{\text{2pass}}(1f,W)=1.25\times 10^{-4} on average. Because the raw blade-element flapping force oscillation has an RMS amplitude of 0.34\text{--}0.48\,\text{N} (15\times\text{--}21\times larger than F_{\text{scale}}\approx 0.0225\,\text{N}), the evaluation records 0.6\text{--}1.5\,\text{mN} of filtered error in pure mean models. This aggregate residual also depends on higher harmonics and time-varying loads; it cannot be inferred from the fundamental-frequency gain alone. Synthesizing phase-locked 1f\text{--}6f harmonics passes the matching waveform through \mathcal{F}_{W}, cutting filtered force RMSE in half (1.73\times\text{--}2.15\times reduction) and yielding a +0.0173 mean fidelity lift across the 40 constant-frequency scenarios (95\% CI [+0.0140,+0.0208], paired t=9.70, p=6.06\times 10^{-12}). (ii) Mid-Flight Frequency-Step Period Mismatch and Phase-Jump Leakage (n=8 scenarios): in frequency-step scenarios, the stroke frequency jumps at t=0.3\,\text{s} between f_{1} and f_{2}, but the evaluator applies a single fixed window W=\text{round}(1000/\min(f_{1},f_{2})) tuned exclusively to f_{\text{low}}=\min(f_{1},f_{2}). During the 300\,\text{ms} interval where the wing flaps at f_{\text{high}}=\max(f_{1},f_{2}), W spans Wf_{\text{high}}\Delta t\in[1.14,1.70] stroke cycles. Consequently, single-pass 1f_{\text{high}} transmission increases to 11.19\%\text{--}21.09\% (mean 15.59\%) and two-pass transmission G_{\text{2pass}}(1f_{\text{high}},W) increases from 1.03\times 10^{-4} to 0.02515—a 244.2\times increase in 1f transmission and a 105.9\times increase in 2f transmission. Combined with the 2W-sample window straddling the phase jump at t=0.3\,\text{s}, this leaks 9.56\,\text{mN} of harmonic oscillation (\approx 43\% of F_{\text{scale}}) into the filtered reference trajectory. Phase-locked 1f\text{--}6f synthesis reduces filtered frequency-step force RMSE by 4.88\times (9.56\,\text{mN}\to 1.96\,\text{mN}) while simultaneously reconstructing the unfiltered 50\,\mu\text{s} within-stroke waveform across all 48 scenarios, reducing raw unfiltered 3D force RMSE by 6.65\times (0.4166\,\text{N}\to 0.0627\,\text{N}, paired t=15.05, p<10^{-15}) and raw torque RMSE by 3.35\times (0.0210\,\text{N}\cdot\text{m}\to 0.00625\,\text{N}\cdot\text{m}).

Fig. 6: Harmonic reconstruction and moving-average filter leakage. (a) Raw and cycle-filtered three-dimensional force RMSE. Harmonic synthesis reduces raw RMSE by 6.65\times (0.4166\,\text{N}\to 0.0627\,\text{N}). (b) Mean-only and harmonic-model fidelity by regime in the original post-hoc evaluation. The frequency-step improvement is +0.3680, consistent with cancellation of the 244.2\times increase in fundamental-frequency transmission at f_{\text{high}}. Values are aggregate results; neither panel displays standard-deviation bars.

3. Redundancy of Explicit Step-Transient Lag States and Multirate Clock Alignment.

Whereas removing stroke harmonics reduces frequency-step fidelity, removing the 104-feature Block-3 frequency-step transient module (setting \mathbf{W}_{m}^{(3)}=\mathbf{0} and \mathbf{W}_{h}^{(3)}=\mathbf{0}) slightly improves held-out 48-scenario mean fidelity from 0.964630 to 0.966191 (\Delta S=+0.001561), lifting held-out frequency-step fidelity from 0.9204 to 0.9299 (reducing frequency-step force error e_{F} from 0.1095 to 0.0805) and increasing CPU speedup from 65.19\times to 67.98\times. This result reveals that once steady-form 1f\text{--}6f harmonics (Blocks 1 & 2) and 21-substep clock synchronization are active, quasi-static switching between the calibrated pre-step and post-step harmonic basis functions already captures the moving-average filter transition accurately in this benchmark across t=0.3\,\text{s}, whereas the slight degradation with Block 3 is consistent with overfitting of training step magnitudes. Conversely, omitting the 21-substep clock synchronization law (Eq. 5) leaves a 5\% time-base drift that reduces overall fidelity from 0.964536 to 0.893374 (\Delta S=-0.0712) and drops frequency-step fidelity to 0.5957 (Figure 5(b)).

IV-C Per-Scenario Wrench Error Clustering, Asymmetry, and Limitations

Beyond family averages, Figure 7 summarizes our scenario-level error clustering and force-versus-torque asymmetry analysis across all 48 evaluation trajectories.

Fig. 7: Force–torque asymmetry and fidelity dispersion. (a) Mean scenario-wise error ratio e_{F}/e_{\tau} with \pm 1 sample standard deviation (n=8 per regime). (b) Minimum–maximum ranges (lines) and medians (points) of the five-block model’s fidelity across those scenarios. Both panels use the local re-evaluation. The original post-hoc evaluation discussed in the text is a separate record: 100\% of scenarios below its bottom-decile threshold P_{10}=0.9435 are frequency-step cases, with a minimum of 0.8924 at scenario #28. The starred lower SD bar for the hover baseline in the flat-plate regime crosses zero and is displayed at 0.001 times its mean on the logarithmic axis; its upper SD is unchanged.

1. Concentration of Tail Risk and Force-vs-Torque Asymmetry.

In the original 48-scenario post-hoc evaluation (a separate seed set from the held-out benchmark), 100\% of the bottom-decile tail risk (5 out of 5 lowest-fidelity scenarios below the 10th percentile cutoff P_{10}=0.9435) in the harmonic surrogate is concentrated in the frequency-step family (scenarios #28, #25, #31, #32, and #29). The single worst-case scenario is frequency-step #28 (seed 22193, stepping upward from f_{1}=25.04\,\text{Hz} to f_{2}=44.45\,\text{Hz} with filter window duration W\Delta t=40\,\text{ms}), which records a fidelity of 0.8924 with strongly force-dominated residual asymmetry (e_{F}=0.1507 vs. e_{\tau}=0.0771, ratio e_{F}/e_{\tau}=1.954; held-out test frequency-step ratio e_{F}/e_{\tau}=1.918 in the five-block harmonic model and 1.194 in the four-block harmonic model). In the flat-plate family, error is structurally force-dominated across all surrogates (held-out e_{F}/e_{\tau}=1.43 in the harmonic surrogates vs. 14.26 in the first-principles linear/quadratic baseline and 32.77 in the hover baseline) because symmetric vertical thrust errors at zero gimbal tilt do not induce roll or pitch moments. In comparison, across the 24 3D inflow and gimbal scenarios (gimbal, wind, gust), our harmonic surrogate restores tightly balanced 6-DoF residuals (held-out e_{F}/e_{\tau}\in[0.94,1.11], with Pearson correlation r=0.9768 between physical force and torque RMSEs and r=0.8568 between physical force RMSE and the reference force scale F_{\text{scale}}).

2. Discussion of Platform Limitations and Roadmap.

While the streamlined four-block harmonic surrogate achieves 0.9662 mean fidelity across all 48 scenarios at a 67.98\times CPU speedup, three limitations define the scope of our findings and motivate future platform development: (i) Fixed-Base Protocol vs. Free-Flight Coupling: all 48 benchmark scenarios evaluate aerodynamic wrenches on a fixed base with prescribed wing strokes following wind-tunnel practice [7, 16]; while local body velocities enter Eq. (2), closed-loop free-flight maneuvers [17] introduce attitude feedback that should be benchmarked via FlapSim’s Gymnasium simulation environment wrapper; (ii) Multirate Substep Clock Semantics: our identification of the 21-substep (1.05\,\text{ms}) reference clock advancement for t\geq 0.2\,\text{s} highlights a floating-point pitfall when driving a 50\,\mu\text{s} reference simulator inside a 1\,\text{ms} recording loop, which motivates integer substepping (20 substeps per recording interval) and a separate re-evaluation under the corrected clock; and (iii) Calibration Complexity vs. Generalization: higher-complexity calibration schemes—filter-projected scale-normalized IRLS/L-BFGS-B refinement (scoring 0.963339 at 67.49\times speedup) and exact rank-1 leave-one-scenario-out (LOSO) hybrid passband-stopband calibration (scoring 0.963467 at 65.53\times speedup)—did not outperform the simpler ridge-calibrated four-block harmonic hierarchy (0.966191). Of 11 total model configurations evaluated during the study, 10 completed validly and 1 terminated with a score of 0.0 due to a Python multiprocessing process-spawning module-name mismatch prior to switching to forked workers; similarly, in the six-variant ablation runner, 5 variants completed full evaluation and 1 standalone nominal-clock ablation variant had zero completed runs (completed evaluations =0), so the clock-synchronization delta is grounded in the completed pre-synchronization versus post-synchronization 5-block evaluations (0.893374 vs. 0.964536).

V Conclusion

FlapSim v0.2.0 combines a modular MuJoCo 3.8 platform with an aerodynamic model hierarchy evaluated across 48 fixed-base scenarios in six regimes. Against the 50\,\mu\mathrm{s} blade-element reference, the 1\,\mathrm{ms} hover baseline achieves 0.6593 mean wrench fidelity at a 67.51\times CPU speedup. Combining clock alignment, inflow and gust coupling, planform scaling, and phase-locked harmonics raises fidelity to 0.9646 (65.19\times speedup) in the five-block model and 0.9662 (67.98\times) in the four-block model without explicit step-transient states.

Harmonic synthesis reduces raw force RMSE by approximately 85\% relative to the mean-only model (6.65\times reduction) and reproduces oscillations retained by the fixed-window filter during frequency steps, where fundamental-frequency transmission increases by 244.2\times. These results establish the accuracy–computation tradeoff within the evaluated protocol. Generalization to a corrected reference clock, closed-loop flight, and reinforcement-learning tasks remains to be evaluated.

LLM Usage Statement

Coding agents and large language models assisted with plugin implementation, evaluation in the fixed FlapSim harness, reference retrieval, post-hoc statistical analysis, telemetry-based figures, and LaTeX drafting and validation. Reported metrics, codebase counts, and statistical tests are grounded in recorded simulator outputs in paper_data.json.

References

  1. [1] D. D. Chin and D. Lentink (2016) Flapping wing aerodynamics: from insects to vertebrates. Journal of Experimental Biology 219 (7), pp. 920–932. External Links: ISSN 0022-0949, Link, Document
  2. [2] H. Liu, S. Ravi, D. Kolomenskiy, and H. Tanaka (2016) Biomechanics and biomimetics in insect-inspired flight systems. Philosophical Transactions of the Royal Society B: Biological Sciences 371 (1704), pp. 20150390. External Links: ISSN 1471-2970, Link, Document
  3. [3] D. Kolomenskiy, S. Ravi, R. Xu, K. Ueyama, T. Jakobi, T. Engels, T. Nakata, J. L. Sesterhenn, M. F. A, R. Onishi, and H. Liu (2019) The dynamics of passive feathering rotation in hovering flight of bumblebees. Journal of Fluids and Structures 91, pp. 102628. External Links: ISSN 0889-9746, Link, Document
  4. [4] S. Xiao, K. Hu, B. Huang, H. Deng, and X. Ding (2021) A review of research on the mechanical design of hoverable flapping wing micro-air vehicles. Journal of Bionic Engineering 18 (6), pp. 1235–1254. External Links: ISSN 2543-2141, Link, Document
  5. [5] L. A. Miller and C. S. Peskin (2004) When vortices stick: an aerodynamic transition in tiny insect flight. Journal of Experimental Biology 207 (17), pp. 3073–3088. External Links: ISSN 0022-0949, Link, Document
  6. [6] Y. Su, X. Fan, K. Onoue, H. R. Vejdani, and K. Breuer (2025) An improved aerodynamic model for quasi‐steady simulations of animal flight at moderate reynolds numbers. Annals of the New York Academy of Sciences 1557 (1). External Links: ISSN 1749-6632, Link, Document
  7. [7] Q. Wang, J.F.L. Goosen, and F. van Keulen (2016) A predictive quasi-steady model of aerodynamic loads on flapping wings. Journal of Fluid Mechanics 800, pp. 688–719. External Links: ISSN 1469-7645, Link, Document
  8. [8] D. Ishihara and T. Horie (2016) Passive mechanism of pitch recoil in flapping insect wings. Bioinspiration & Biomimetics 12 (1), pp. 016008. External Links: ISSN 1748-3190, Link, Document
  9. [9] J. M. Birch and M. H. Dickinson (2003) The influence of wing–wake interactions on the production of aerodynamic forces in flapping flight. Journal of Experimental Biology 206 (13), pp. 2257–2272. External Links: ISSN 0022-0949, Link, Document
  10. [10] F. Lehmann, S. P. Sane, and M. H. Dickinson (2005) The aerodynamic effects of wing–wing interaction in flapping insect wings. Journal of Experimental Biology 208 (16), pp. 3075–3092. External Links: ISSN 0022-0949, Link, Document
  11. [11] F. Lehmann and S. Pick (2007) The aerodynamic benefit of wing–wing interaction depends on stroke trajectory in flapping insect wings. Journal of Experimental Biology 210 (8), pp. 1362–1377. External Links: ISSN 0022-0949, Link, Document
  12. [12] S. A. Combes and T. L. Daniel (2003) Into thin air: contributions of aerodynamic and inertial-elastic forces to wing bending in the hawkmoth<i>manduca sexta</i>. Journal of Experimental Biology 206 (17), pp. 2999–3006. External Links: ISSN 0022-0949, Link, Document
  13. [13] J. Fu, X. Liu, W. Shyy, and H. Qiu (2018) Effects of flexibility and aspect ratio on the aerodynamic performance of flapping wings. Bioinspiration & Biomimetics 13 (3), pp. 036001. External Links: ISSN 1748-3190, Link, Document
  14. [14] S. Agrawal, B. W. Tobalske, M. Z. Anwar, H. Luo, T. L. Hedrick, and B. Cheng (2022) Musculoskeletal wing-actuation model of hummingbirds predicts diverse effects of primary flight muscles in hovering flight. Proceedings of the Royal Society B: Biological Sciences 289 (1988). External Links: ISSN 1471-2954, Link, Document
  15. [15] T. Nakata, H. Liu, and R. J. Bomphrey (2015) A cfd-informed quasi-steady model of flapping-wing aerodynamics. Journal of Fluid Mechanics 783, pp. 323–343. External Links: ISSN 1469-7645, Link, Document
  16. [16] J. A. Pohly, J. L. Salmon, J. E. Bluman, K. Nedunchezian, and C. Kang (2018) Quasi-steady versus navier–stokes solutions of flapping wing aerodynamics. Fluids 3 (4), pp. 81. External Links: ISSN 2311-5521, Link, Document
  17. [17] B. Cheng, B. W. Tobalske, D. R. Powers, T. L. Hedrick, Y. Wang, S. M. Wethington, G. T.‐C. Chiu, and X. Deng (2016) Flight mechanics and control of escape manoeuvres in hummingbirds ii. aerodynamic force production, flight control and performance limitations. Journal of Experimental Biology. External Links: ISSN 0022-0949, Link, Document
  18. [18] M. Sidebottom, L. Margetts, and M. R. A. Nabawy (2025) Quasi-steady aerodynamic modelling of hovering miniature insects. In AIAA SCITECH 2025 Forum, External Links: Link, Document
  19. [19] J. Gerdes, H. A. Bruck, and S. K. Gupta (2017) Improving prediction of flapping-wing motion by incorporating actuator constraints with models of aerodynamic loads using in-flight data. Journal of Mechanisms and Robotics 9 (2). External Links: ISSN 1942-4310, Link, Document
  20. [20] Q. Wang, J.F.L. Goosen, and F. van Keulen (2017) Optimal pitching axis location of flapping wings for efficient hovering flight. Bioinspiration & Biomimetics 12 (5), pp. 056001. External Links: ISSN 1748-3190, Link, Document
  21. [21] J. Z. Zhang, T. A. Howell, Z. Yi, C. Pan, G. Shi, G. Qu, T. Erez, Y. Tassa, and Z. R. Manchester (2026) Whole-body model-predictive control of legged robots with mujoco. In 2026 IEEE International Conference on Robotics and Automation (ICRA), pp. 17478–17485. External Links: Link, Document
  22. [22] S. Akki and T. Chen (2025) Benchmarking model predictive control and reinforcement learning-based control for legged robot locomotion in mujoco simulation. IEEE Access 13, pp. 108732–108742. External Links: ISSN 2169-3536, Link, Document
  23. [23] J. Degrave, M. Hermans, J. Dambre, and F. wyffels (2019) A differentiable physics engine for deep learning in robotics. Frontiers in Neurorobotics 13. External Links: ISSN 1662-5218, Link, Document
  24. [24] F. Fei, Z. Tu, J. Zhang, and X. Deng (2019) Learning extreme hummingbird maneuvers on flapping wing robots. In 2019 International Conference on Robotics and Automation (ICRA), pp. 109–115. External Links: Link, Document
  25. [25] J. Han and C. Breitsamter (2021) Aerodynamic investigation on shifted-back vertical stroke plane of flapping wing in forward flight. Bioinspiration & Biomimetics 16 (6), pp. 064001. External Links: ISSN 1748-3190, Link, Document
  26. [26] H. K. Kwon and J. Chang (2026) Aerodynamic and visualization study based on advance ratio and insect-like wing shape in insect forward flight. International Journal of Aeronautical and Space Sciences 27 (4), pp. 2818–2834. External Links: ISSN 2093-2480, Link, Document
  27. [27] S. Valencia, J. E. Orduy, P. F. Melo, and C. L. Tafur (2026) Pulley-based flapping propulsion for hoverable micro air vehicles: a critical review, comparative metrics and roadmap. Drones 10 (2), pp. 143. External Links: ISSN 2504-446X, Link, Document
  28. [28] R. Singh, P. Gergondet, and F. Kanehiro (2023) Mc-mujoco: simulating articulated robots with fsm controllers in mujoco. In 2023 IEEE/SICE International Symposium on System Integration (SII), pp. 1–5. External Links: Link, Document
  29. [29] H. Wang, V. Caggiano, G. Durandau, M. Sartori, and V. Kumar (2022) MyoSim: fast and physiologically realistic mujoco models for musculoskeletal and exoskeletal studies. In 2022 International Conference on Robotics and Automation (ICRA), pp. 8104–8111. External Links: Link, Document
  30. [30] R. Vaxenburg, I. Siwanowicz, J. Merel, A. A. Robie, C. Morrow, G. Novati, Z. Stefanidi, G. Both, G. M. Card, M. B. Reiser, M. M. Botvinick, K. M. Branson, Y. Tassa, and S. C. Turaga (2025) Whole-body physics simulation of fruit fly locomotion. Nature 643, pp. 1312–1320. External Links: Document, Link
  31. [31] F. Fei, Z. Tu, Y. Yang, J. Zhang, and X. Deng (2019) Flappy hummingbird: an open source dynamic simulation of flapping wing robots and animals. In 2019 International Conference on Robotics and Automation (ICRA), pp. 9223–9229.
  32. [32] Qian, Fang, Jia, Yan, Liang, and Li (2024) Toward practical autonomous flight simulation for flapping wing biomimetic robots with experimental validation. IEEE Transactions on Automation Science and Engineering.

Appendix A Supplementary Information

A-A Complete FlapSim v0.2.0 Codebase, Plugin, and Robot Manifest Inventory

Table IV lists all 17 registered plugins across the seven plugin kinds of FlapSim v0.2.0, together with the 4 aerodynamic models and 1 modifier available to the composite aerodynamic model, the robot descriptions shipped with the package, and the verification suite (117 test functions across 23 test files).

TABLE IV: Complete registry of FlapSim v0.2.0 plugins (17 across 7 kinds), aerodynamic models (4) and modifiers (1), shipped robot descriptions, and verification suite.
  • actuator
    Count
    4
    Registered identifiers and scope
    sinusoidal_stroke (kinematic or position-only stroke), pd_position (PD or kinematic hold), servo (rate-limited lagged target), dc_motor_crank (voltage-driven motor, gearbox, crank)
  • aero
    Count
    3
    Registered identifiers and scope
    quasi_steady (single-model stack), stack (additive models and modifiers), cycle_averaged (rigid-body hover model, identified parameters)
  • atmosphere
    Count
    1
    Registered identifiers and scope
    standard (ISA density or \rho, steady wind, 1-\cos/sine/step gust, Ornstein–Uhlenbeck turbulence)
  • controller
    Count
    3
    Registered identifiers and scope
    hover_pid (cascaded altitude and attitude PID), schedule (time-scheduled set points), callback (user Python function)
  • force
    Count
    1
    Registered identifiers and scope
    body_drag (quadratic drag per body axis relative to the wind)
  • recorder
    Count
    1
    Registered identifiers and scope
    memory (samples matching signals every \Delta t; export)
  • sensor
    Count
    4
    Registered identifiers and scope
    imu, rangefinder, encoder, wrench, each with sample-and-hold, low-pass, delay, noise, bias and quantization conditioning
  • Aerodynamic models
    Count
    4
    Registered identifiers and scope
    quasi_steady (Whitney & Wood 2010; Dickinson et al. fits), rotational_lift, added_mass, wake_capture
  • Aerodynamic modifiers
    Count
    1
    Registered identifiers and scope
    ground_effect (exponential or Cheeseman–Bennett factor)
  • Robot descriptions
    Count
    1 + builder
    Registered identifiers and scope
    SingleThrustFlapper (30\,\text{g}, R=70\,\text{mm}; URDF, robot.yaml, sim.yaml, hover.yaml) and the parametric flat_plate_flapper builder
  • Verification suite
    Count
    117
    Registered identifiers and scope
    117 unit, regression (lift sweep), conformance and example tests across 23 files; 22 documentation pages; 24 example scripts

A-B Physical Force (N) and Torque (N m) RMSE and Runtime Breakdown by Scenario Family

While Table III in the main text reports normalized force error e_{F} and normalized torque error e_{\tau}, Table V provides the complete dimensional force RMSE (mN), dimensional torque RMSE (\text{mN}\cdot\text{m}), per-family CPU speedup (\times), total candidate and reference CPU seconds, step throughput (steps/s), and offline training and testing wall-clock times for all five completed ablation-study variants in paper_data.json.

TABLE V: Cycle-filtered errors and runtime over 48 held-out scenarios; 5-block and 4-block denote harmonic models. Force/torque RMSE units are \mathrm{mN}/\mathrm{mN}\!\cdot\!\mathrm{m} (10^{-3}\,\mathrm{N}/10^{-3}\,\mathrm{N}\!\cdot\!\mathrm{m}). CPU speedup uses the blade-element reference.
  • Model
    (a) Dimensional errors and per-family speedup
    Metric
    (a) Dimensional errors and per-family speedup
    Frequency
    (a) Dimensional errors and per-family speedup
    Gimbal
    (a) Dimensional errors and per-family speedup
    Wind
    (a) Dimensional errors and per-family speedup
    Step
    (a) Dimensional errors and per-family speedup
    Gust
    (a) Dimensional errors and per-family speedup
    Flat plate
  • Hover CA
    (a) Dimensional errors and per-family speedup
    Force RMSE (mN)
    (a) Dimensional errors and per-family speedup
    1.50
    (a) Dimensional errors and per-family speedup
    1.52
    (a) Dimensional errors and per-family speedup
    37.83
    (a) Dimensional errors and per-family speedup
    15.14
    (a) Dimensional errors and per-family speedup
    16.10
    (a) Dimensional errors and per-family speedup
    9.25
  • Torque RMSE (\text{mN}\cdot\text{m})
    (a) Dimensional errors and per-family speedup
    0.086
    (a) Dimensional errors and per-family speedup
    0.133
    (a) Dimensional errors and per-family speedup
    1.966
    (a) Dimensional errors and per-family speedup
    1.142
    (a) Dimensional errors and per-family speedup
    0.847
    (a) Dimensional errors and per-family speedup
    0.019
  • Family Speedup (\times)
    (a) Dimensional errors and per-family speedup
    65.83
    (a) Dimensional errors and per-family speedup
    82.09
    (a) Dimensional errors and per-family speedup
    65.38
    (a) Dimensional errors and per-family speedup
    61.97
    (a) Dimensional errors and per-family speedup
    60.40
    (a) Dimensional errors and per-family speedup
    87.20
  • LQ wind-lag
    (a) Dimensional errors and per-family speedup
    Force RMSE (mN)
    (a) Dimensional errors and per-family speedup
    1.04
    (a) Dimensional errors and per-family speedup
    3.57
    (a) Dimensional errors and per-family speedup
    6.09
    (a) Dimensional errors and per-family speedup
    15.20
    (a) Dimensional errors and per-family speedup
    3.92
    (a) Dimensional errors and per-family speedup
    3.72
  • Torque RMSE (\text{mN}\cdot\text{m})
    (a) Dimensional errors and per-family speedup
    0.057
    (a) Dimensional errors and per-family speedup
    0.087
    (a) Dimensional errors and per-family speedup
    0.145
    (a) Dimensional errors and per-family speedup
    1.153
    (a) Dimensional errors and per-family speedup
    0.094
    (a) Dimensional errors and per-family speedup
    0.019
  • Family Speedup (\times)
    (a) Dimensional errors and per-family speedup
    81.27
    (a) Dimensional errors and per-family speedup
    69.96
    (a) Dimensional errors and per-family speedup
    53.26
    (a) Dimensional errors and per-family speedup
    66.90
    (a) Dimensional errors and per-family speedup
    63.17
    (a) Dimensional errors and per-family speedup
    97.29
  • Mean-only
    (a) Dimensional errors and per-family speedup
    Force RMSE (mN)
    (a) Dimensional errors and per-family speedup
    0.93
    (a) Dimensional errors and per-family speedup
    1.36
    (a) Dimensional errors and per-family speedup
    1.07
    (a) Dimensional errors and per-family speedup
    11.18
    (a) Dimensional errors and per-family speedup
    1.26
    (a) Dimensional errors and per-family speedup
    0.76
  • Torque RMSE (\text{mN}\cdot\text{m})
    (a) Dimensional errors and per-family speedup
    0.057
    (a) Dimensional errors and per-family speedup
    0.086
    (a) Dimensional errors and per-family speedup
    0.063
    (a) Dimensional errors and per-family speedup
    0.746
    (a) Dimensional errors and per-family speedup
    0.078
    (a) Dimensional errors and per-family speedup
    0.019
  • Family Speedup (\times)
    (a) Dimensional errors and per-family speedup
    77.72
    (a) Dimensional errors and per-family speedup
    75.78
    (a) Dimensional errors and per-family speedup
    55.55
    (a) Dimensional errors and per-family speedup
    56.49
    (a) Dimensional errors and per-family speedup
    59.32
    (a) Dimensional errors and per-family speedup
    115.69
  • 5-block
    (a) Dimensional errors and per-family speedup
    Force RMSE (mN)
    (a) Dimensional errors and per-family speedup
    0.47
    (a) Dimensional errors and per-family speedup
    0.80
    (a) Dimensional errors and per-family speedup
    0.77
    (a) Dimensional errors and per-family speedup
    2.27
    (a) Dimensional errors and per-family speedup
    0.84
    (a) Dimensional errors and per-family speedup
    0.30
  • Torque RMSE (\text{mN}\cdot\text{m})
    (a) Dimensional errors and per-family speedup
    0.036
    (a) Dimensional errors and per-family speedup
    0.059
    (a) Dimensional errors and per-family speedup
    0.048
    (a) Dimensional errors and per-family speedup
    0.084
    (a) Dimensional errors and per-family speedup
    0.060
    (a) Dimensional errors and per-family speedup
    0.015
  • Family Speedup (\times)
    (a) Dimensional errors and per-family speedup
    86.57
    (a) Dimensional errors and per-family speedup
    77.33
    (a) Dimensional errors and per-family speedup
    52.69
    (a) Dimensional errors and per-family speedup
    64.31
    (a) Dimensional errors and per-family speedup
    52.07
    (a) Dimensional errors and per-family speedup
    92.68
  • 4-block
    (a) Dimensional errors and per-family speedup
    Force RMSE (mN)
    (a) Dimensional errors and per-family speedup
    0.47
    (a) Dimensional errors and per-family speedup
    0.80
    (a) Dimensional errors and per-family speedup
    0.77
    (a) Dimensional errors and per-family speedup
    1.70
    (a) Dimensional errors and per-family speedup
    0.84
    (a) Dimensional errors and per-family speedup
    0.30
  • Torque RMSE (\text{mN}\cdot\text{m})
    (a) Dimensional errors and per-family speedup
    0.037
    (a) Dimensional errors and per-family speedup
    0.058
    (a) Dimensional errors and per-family speedup
    0.048
    (a) Dimensional errors and per-family speedup
    0.099
    (a) Dimensional errors and per-family speedup
    0.060
    (a) Dimensional errors and per-family speedup
    0.015
  • Family Speedup (\times)
    (a) Dimensional errors and per-family speedup
    79.20
    (a) Dimensional errors and per-family speedup
    66.03
    (a) Dimensional errors and per-family speedup
    52.57
    (a) Dimensional errors and per-family speedup
    68.92
    (a) Dimensional errors and per-family speedup
    61.38
    (a) Dimensional errors and per-family speedup
    109.85

A-C Mathematical Analysis of Multirate 21-Substep Clock Drift and Filter-Window Non-Commutativity

1. Derivation of the 21-Substep Reference Clock Drift.

At the start of recording call k, let t_{k} be the accumulated simulation time. The implemented advance routine sets the relative target t_{\mathrm{target},k}=t_{k}+10^{-3}\,\mathrm{s} and repeatedly increments time by \Delta t_{\mathrm{ref}}=5\times 10^{-5}\,\mathrm{s} until this target is reached. Floating-point rounding can require 21 rather than 20 substeps. Since the next target is based on the newly accumulated time, these overruns accumulate; a target anchored to 0.2+(k+1)10^{-3} would instead prevent this cumulative dilation. Approximating the repeated calls by 21 substeps gives 1.05\,\mathrm{ms} per recording call and about 30\,\mathrm{ms} of drift over 600 calls (0.75–1.35 wingbeat cycles at 25–45\,\mathrm{Hz}). Exact substep counts depend on the floating-point trajectory, so Eq. (5) is an implementation-specific alignment approximation, not a general identity of IEEE-754 arithmetic. Frequency changes are scheduled by recording index; their reference-clock time consequently differs from the nominal timestamp. The completed pre- and post-alignment runs report frequency-step fidelity of 0.5957 and 0.9204, respectively, but the isolated nominal-clock ablation did not complete.

2. Non-Commutativity of Fixed-Window Moving-Average Filtering Across Frequency Steps.

Let W=\text{round}(1/(f_{\text{low}}\Delta t)) denote the fixed moving-average window length for a frequency-step scenario with pre-step frequency f_{1} and post-step frequency f_{2}, where f_{\text{low}}=\min(f_{1},f_{2}) and f_{\text{high}}=\max(f_{1},f_{2}). Consider the k-th harmonic component of the blade-element wrench, h_{k}(t)=A_{k}(t)\cos(2\pi kf(t)t+\varphi_{k}), where f(t)=f_{1} for t<t_{\text{step}} and f(t)=f_{2} for t\geq t_{\text{step}}. Applying the two-pass discrete moving-average operator \mathcal{F}_{W} yields three distinct regimes:

  1. Low-frequency segment (f(t)=f_{\text{low}}, |t-t_{\text{step}}|>W\Delta t): Because Wf_{\text{low}}\Delta t\approx 1, the recorded mean fundamental gain is G_{\text{2pass}}(f_{\text{low}},W)\approx 1.03\times 10^{-4}, strongly attenuating the harmonic.
  2. Straddle window (|t-t_{\text{step}}|\leq W\Delta t): The averaging window sums samples from both f_{1} and f_{2} across the phase discontinuity \Delta\psi=2\pi(f_{2}-f_{1})t_{\text{step}}, producing a non-zero transient pulse of duration 2W\Delta t\in[52,80]\,\text{ms} whose sign and magnitude depend on the exact phase at t_{\text{step}}.
  3. High-frequency segment (f(t)=f_{\text{high}}, |t-t_{\text{step}}|>W\Delta t): Because Wf_{\text{high}}\Delta t\approx f_{\text{high}}/f_{\text{low}}\in[1.14,1.70] is generally non-integer, the filter need not suppress the harmonics, with the recorded mean increasing two-pass transmission by 244.2\times at 1f_{\text{high}} (mean G_{\text{2pass}}=0.02515) and 105.9\times at 2f_{\text{high}}.

Thus, \mathcal{F}_{W}[h_{k}](t) can be nonzero in both |t-t_{\text{step}}|\leq W\Delta t and the entire f_{\text{high}} half of the trajectory. Because \mathcal{F}_{W} is a linear operator, generating the matching phase-locked harmonics \tilde{\mathbf{W}}(t) inside the 1\,\text{ms} surrogate guarantees \mathcal{F}_{W}[\bar{\mathbf{W}}+\tilde{\mathbf{W}}]=\mathcal{F}_{W}[\bar{\mathbf{W}}]+\mathcal{F}_{W}[\tilde{\mathbf{W}}], so accurate harmonic reconstruction can reproduce both the straddle pulse and the leaked f_{\text{high}} oscillation; linearity alone does not guarantee that the fitted harmonics are accurate.

A-D Multi-Block Ridge Weight Norms, Cross-Validation Sensitivity, and Training Budget Analysis

Figure 8 and Table VI present the complete offline identification and cross-validation analysis.

Fig. 8: Ridge-regression weight norms and sensitivity to the phase model. (a) Frobenius weight norm \|\mathbf{W}\|_{F} by identification stage. Subtracting the Block 1–2 harmonic predictions before Step 5 avoids a 5.13\times increase in weight norm (0.9920 for the five-block model versus 5.0885 without harmonics). (b) Held-out frequency-step cross-validation fidelity for six combinations of phase convention (direct phase, or continuous phase at nominal or synchronized rate) and harmonic sample weight (1.5 or 3.0). Points are the recorded fit results; no standard-deviation bars are shown.
TABLE VI: Offline ridge identification: fit wall time (s), Frobenius norm \|\mathbf{W}\|_{F}, and normalized training RMSE. 5B/4B: five-/four-block harmonic; MO: mean-only. RMSE ratio: MO/5B.
  • 1
    Block and active features
    Pass-1 Block 1 Hover Mean (w_m1, 12 feat.)
    Fit (s)
    0.048
  • 2
    Block and active features
    Pass-1 Block 2 Gimbal Mean (w_m2, 27 feat.)
    Fit (s)
    0.413
  • 3
    Block and active features
    Pass-2 Joint Gauss–Seidel w_m1 (12 feat.)
    Fit (s)
    0.361
  • 4
    Block and active features
    Pass-2 Joint Gauss–Seidel w_m2 (27 feat.)
    Fit (s)
    0.364
  • 5
    Block and active features
    6-Grid CV + Harmonics (w_h1,2, 66) + Block 3 (104)
    Fit (s)
    37.289
  • 6
    Block and active features
    Block 4a Steady 3D Wind (54 mean, 24 harm.)
    Fit (s)
    1.439
  • 7
    Block and active features
    Block 4b Unsteady 3D Gust (36 mean, 24 harm.)
    Fit (s)
    0.877
  • 8
    Block and active features
    Block 5 Parametric Flat Plate (26 mean, 32 harm.)
    Fit (s)
    0.722

1. Offline Compute Partition and 8-Worker Parallelism.

In the five-block harmonic model (160.50\,\text{s} total training wall-clock time), 72.2\% (115.96\,\text{s}) is spent simulating the 356 space-filling 50\,\mu\text{s} reference trajectories (304 gimbaled-flapper trajectories requiring 822.18\,\text{s} reference CPU time at 2.705\,\text{s} mean CPU time per trajectory, and 52 flat-plate flapper trajectories requiring 104.36\,\text{s} reference CPU time at 2.007\,\text{s} per trajectory). Executing these 926.55\,\text{s} of cumulative reference CPU work across 8 forked worker processes yields a 7.99\times parallel throughput gain (7.09\times relative to the gimbaled flapper’s CPU time alone), while the 8-step ridge regression pipeline consumes 41.51\,\text{s} (25.9\%, of which 37.29\,\text{s} is spent in Step 5’s 6-candidate cross-validation grid) and post-fit verification across 48 scenarios takes 3.03\,\text{s} (1.9\%).

2. Why Removing Harmonics Causes a 5.13\times Weight-Norm Increase in Step 5.

As shown in Table VI and Figure 8(a), subtracting the filtered Stage 1–2 harmonic predictions prior to fitting Block 3 in the five-block harmonic model keeps the Step-5 Frobenius weight norm small (\|\mathbf{W}\|_{F}=0.9920, or 0.8718 in the 4-block model) with a low normalized residual RMSE of 0.03621. When harmonics are zeroed, the unsubtracted oscillatory filter leakage remains inside the Step-5 target residual, forcing Block 3’s 48 collinear real exponential-decay and low-pass-filter features (\tau\in\{2,5,12,25,50,100\}\,\text{ms}) to fit oscillatory ringdown with large opposing weights. This increases \|\mathbf{W}\|_{F} by 5.13\times to 5.0885, leaves a 4.76\times larger training residual (0.17224), and coincides with a generalization gap (frequency-step fidelity dropping from 0.6953 in-sample to 0.6215 on CV validation and 0.6028 on the held-out test set).

3. Cross-Validation Phase-Mode Selection.

Across the 6-candidate CV grid (Figure 8(b)), selecting direct phase (\psi_{d}(t)=2\pi f(t)t with harmonic sample weight 3.0) achieves a held-out CV frequency-step fidelity of 0.90580 in the five-block harmonic model and 0.91203 in the four-block harmonic model. Without Block 3, switching to continuous phase at either the nominal or synchronized rate shifts post-step harmonics out of phase with the sinusoidal actuator, changing CV frequency-step fidelity by -0.3603 to 0.5518 (span 0.3603). With both phase conventions in Block 3, the five-block model spans 0.7989\text{--}0.9058 CV fidelity (range 0.1069, 3.37\times narrower).