arXiv:2610.40902cs.ROOct 2026

Manuscript Offprint

arXiv:2610.40902

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

Mingshan He

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Mingshan He ∗^{*}

Figure

Fig. 1. Overview of FlapSim. The main view illustrates a gimbaled flapping-wing robot, its stroke trajectory, passive feathering mechanism, and blade-element forces. Insets show the stroke from above, the drivetrain, a parametric robot, and illustrative free-flight and wind/gust configurations. The quantitative aerodynamic benchmark in this report uses the fixed-base configuration.

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 ms with a 50 µs quasi-steady blade-element reference. The built-in hover cycle-averaged baseline achieves a 67.51× 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–6f harmonics raises mean fidelity to 0.9646 at a 65.19× 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× 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]–[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∈[102,104]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]–[11], and aeroelastic pitch recoil [12]–[14]. While direct Navier–Stokes computational fluid

∗^{*}Corresponding author. Mingshan He is with the Department of Mechanical Engineering, School of Engineering, Institute of Science Tokyo, Tokyo, 1528550, Japan. Email: mshe.research@gmail.com. ORCID: 0000-0002-0369-5181.

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 [7], [9], [10], [14]—provide a tractable middle ground whose accuracy depends on the kinematics and aerodynamic effects included [16]–[18]. However, because the wing's instantaneous velocity, angle of attack, and pitching rate oscillate at 20–50 Hz (with higher harmonics up to 300 Hz), resolving blade-element loads alongside multibody dynamics motivates small integration steps; this study uses Δtref=50μs\Delta t_{\text{ref}} = 50 \mu\text{s} (20 kHz) [19], [20]. At 50μs50 \mu\text{s}, simulating 1 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 Δt=1 ms\Delta t = 1 \text{ ms} (1 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]–[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μs50 \mu\text{s} per-step quasi-steady blade-element simulator down to a 1 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 ms reduced-order aerodynamic configurations against the 50μs50 \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−6f1f-6f stroke-harmonic synthesis raises 48-scenario mean wrench fidelity from 0.6593 (built-in hover base-

line) and 0.8280 (first-principles wind-lag baseline) to 0.9646 (65.19×65.19 \times speedup) in a five-block surrogate and 0.9662 (67.98×67.98 \times speedup) in a streamlined four-block surrogate. Through controlled ablations and transfer-function analysis, we explain why within-cycle 1f−6f1f-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 1 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/.

References (32)