---
title: 'ComFree-Sim: Multi-Domain Simulation Framework'
url: https://www.emergentmind.com/topics/comfree-sim
type: topic
---

# ComFree-Sim: Multi-Domain Simulation Framework

ComFree-Sim is a non-unique designation that appears in recent arXiv literature for multiple technically distinct systems. The name most explicitly refers to a **GPU-parallelized analytical contact physics engine** for contact-rich robotics [2603.12185], but it is also used for an **open-source end-to-end simulator** for practical cell-free 6G network deployments, presented as **LuSim** [2401.08624], and for several **SIM-enabled cell-free massive MIMO / holographic MIMO architectures** in which **stacked intelligent metasurfaces (SIMs)** perform wave-domain beamforming at distributed access points [2506.19090]. This suggests that “ComFree-Sim” is best treated as a label family whose meaning depends on disciplinary context.

## 1. Terminological scope

The literature uses the label across at least three domains.

| Usage | Paper | Core description |
|---|---|---|
| Contact-rich robotics | [2603.12185] | GPU-parallel analytical contact physics engine built on complementarity-free contact modeling |
| Cell-free 6G network simulation | [2401.08624] | Open-source end-to-end simulation platform, presented as LuSim |
| SIM-assisted cell-free MIMO/HMIMO | [2506.19090], [2405.09753], [2409.12851] | Cell-free architectures using stacked intelligent metasurfaces for wave-domain beamforming |

A recurrent source of ambiguity is the acronym **SIM**. In the wireless cell-free papers, SIM denotes **stacked intelligent metasurfaces** [2506.19090]. In adjacent cellular-systems work, by contrast, SIM denotes the **Subscriber Identity Module**, as in SIM tracing and SIM tunneling platforms [2506.20800]. The same surface form therefore spans robotics simulation, radio-network simulation, metasurface-assisted communication architectures, and SIM-card instrumentation.

## 2. ComFree-Sim as a contact-rich robotics physics engine

In robotics, ComFree-Sim is a **GPU-parallel analytical contact physics engine** designed to remove the main bottleneck in contact-rich simulation: **iterative complementarity-based contact resolution** [2603.12185]. The core idea is to avoid solving a nonlinear complementarity problem or constrained optimization problem at every timestep and instead compute contact impulses **in closed form** using a **complementarity-free, impedance-style prediction–correction update** in the **dual cone of Coulomb friction**.

The discrete-time dynamics are written as
$$
\boldsymbol{M}(\boldsymbol{q})\,d\boldsymbol{v} + \boldsymbol{c}(\boldsymbol{q},\boldsymbol{v})\,dt = \boldsymbol{\tau}\,dt + \mathbf{J}(\boldsymbol{q})^{\top}\boldsymbol{\lambda}\,dt ,
$$
with smooth prediction
$$
\boldsymbol{v}_{smooth}^+ := \boldsymbol{v} + \boldsymbol{M}^{-1}(\boldsymbol{\tau}-\boldsymbol{c})\,dt.
$$
Contact correction is then imposed through dual-cone inequalities in velocity space rather than through force-space complementarity. The formulation is extended to a **unified 6D contact model** covering **tangential friction**, **torsional friction**, and **rolling friction**, with primal constraints
$$
\|\boldsymbol{\lambda}^{\mathrm{t}}\| \le \mu^{\mathrm{t}}\lambda^{n},\quad |m^{\mathrm{tor}}| \le \mu^{\mathrm{tor}}\lambda^{n},\quad \|\boldsymbol{m}^{\mathrm{roll}}\| \le \mu^{\mathrm{roll}}\lambda^{n}.
$$
To make the update computationally practical, each quadratic dual cone is approximated by a **polyhedral cone**, after which contact impulses are obtained analytically by an elementwise ReLU-type activation on violating faces.

The engine’s computational advantage follows from separability. Contact computation is **separable across contact pairs** and **separable across cone facets**, which maps naturally to GPU kernels. The implementation uses **Warp** and exposes a **MuJoCo-compatible interface** as a drop-in backend alternative to **MuJoCo Warp (MJWarp)**. The paper reports **near-linear scaling with contact count**, **2–3 times higher throughput in dense contact scenes**, and about **3× faster simulation speed** in dense-contact scaling tests. In a penetration benchmark, reported mean penetration depth was **\(1.7 \pm 4.9\) mm** for MJWarp and **as low as \(0.9 \pm 1.5\) mm** for ComFree-Sim at tuned settings. In real-time **MPPI-based MPC** on a physical **LEAP Hand**, ComFree-Sim reduced MPPI compute time by about **2.4× on average**, improved closed-loop success rate by about **27 percentage points on average**, and enabled **35–72 Hz** control on hardware. The paper also reports dynamics-aware motion retargeting results using **SPIDER** on five **Unitree G1** motions, with task-level performance comparable to MJWarp but faster optimization times.

## 3. ComFree-Sim as an end-to-end simulator for cell-free 6G deployments

In wireless-network simulation, ComFree-Sim is presented as an **open-source simulator called LuSim** for **practical cell-free 6G network deployments** [2401.08624]. Its purpose is to bridge a gap between **realistic physical propagation** and **system-level network behavior** in a single framework. The architecture consists of a **Unity-based ray-casting physical-layer engine** and a **Python-based system simulator**. Configuration is externalized through **JSON/YAML-style scenario definitions**, and the two halves communicate through a **ZeroMQ proxy over UDP**. On the system side, the simulator uses **SimPy** inside the RW infrastructure for **high-level discrete-event simulation**.

Unity is not used merely for rendering. It acts as the physical-layer environment in which buildings, surfaces, users, and base stations are placed and from which rays are cast. The paper emphasizes **interactive ray casting**, **interactive visualization**, and **GPU acceleration**. The simulator can run either as a standalone Unity application or within the Unity editor, which supports repeatable experiments as well as interactive debugging and visualization.

The channel-generation workflow is built around a **geometry-based stochastic channel model (GSCM)** initialized in Unity through **multi-path components (MPCs)**. The described steps are: **MPC distribution**, **MPC filtering**, **surface association**, **path-gain modeling**, **parameter estimation**, **look-up table generation**, and **scene visualization**. MPCs are uniformly distributed over the environment, especially along building facades, for the first, second, and third reflection orders; densities are chosen according to a COST-based model. The resulting model captures **distance-dependent path loss** as a classical **log-distance power law**, **Gamma-distributed shadow fading**, **time correlation of fading** through an exponential autocorrelation structure, **angular dependence** of scattering, **obstruction and diffraction around corners**, **penetration losses**, **dynamic LOS determination** for moving users, and **multi-order reflections**.

The system-level simulator consumes channel realizations, **DSS-compliant channel measurements**, and entity positions to evaluate **radio resource allocation**, **centralized optimization**, **dynamic federation formation**, **energy-aware antenna disabling**, **wireless power transfer scheduling**, and **localization / sensing** improvements. The paper states that the simulator can represent **digital twins of the network infrastructure including energy, latency and other models**. Supported scenarios include **urban outdoor environments**, **indoor 3D settings**, **fully 3D cell-free deployments**, **moving users**, and **large antenna counts** with distributed antenna layouts. Validation is reported against **real-world measurement data** for **channel gain, Doppler spread, and delay spread**, including **urban intersection scenarios not used during parameter estimation**.

## 4. ComFree-Sim as SIM-enabled cell-free MIMO and HMIMO

A third usage refers to cell-free architectures in which **stacked intelligent metasurfaces** are deployed at access points to shift part of beamforming from the digital domain to the electromagnetic domain. In the fronthaul-constrained **CF-mMIMO** formulation, each access point is equipped with a SIM consisting of **\(L\) metasurface layers** with **\(M\) meta-atoms** per layer, and the end-to-end SIM transformation is written as
$$
\mathbf{G}_i = \boldsymbol{\Phi}_{i,1}\mathbf{W}_{i,2}\boldsymbol{\Phi}_{i,2}\cdots \mathbf{W}_{i,L}\boldsymbol{\Phi}_{i,L}.
$$
The paper formulates joint optimization of digital beamforming, wave-domain beamforming, and fronthaul compression under finite-capacity fronthaul constraints for both uplink and downlink. Because the resulting problems are high-dimensional and non-convex, the solution uses **alternating optimization**, with digital blocks handled through the **matrix Lagrangian duality transform** and **Fenchel’s inequality**, and wave-domain blocks optimized either layer-by-layer or by **gradient ascent** [2506.19090]. Numerical results report **fast convergence**, **near fully-digital performance** with sufficiently deep SIMs, especially around **\(L=7\)** layers, and a runtime reduction of **more than a factor of 20** in the simulations. The same study notes that the downlink gap to fully digital is larger at **low SNR**.

In the **uplink cell-free HMIMO** formulation, each AP has **\(M\) receive antennas** and a SIM with **\(T_l\) layers**, each containing **\(N\) passive reconfigurable elements**. The cascaded effective channel is
$$
\mathbf{G}^{(l)} = \mathbf{A}^{(l,1)}\mathbf{\Xi}^{(l,1)} \mathbf{A}^{(l,2)}\mathbf{\Xi}^{(l,2)} \cdots \mathbf{A}^{(l,T_l)}\mathbf{\Xi}^{(l,T_l)},
$$
and APs optimize local SIM coefficients and local receiver combiners using only **local CSI**, while the CPU fuses local detections using an **MMSE** criterion [2405.09753]. The paper explicitly models **RF-chain hardware impairments** at both UEs and APs and shows that they limit achievable rate in the high-SNR regime. Its reported setup uses **\(f_c=30\) GHz**, **\(L=16\)** APs, **\(K=8\)** UEs, **\(M=4\times 4\)** receive antennas, **\(N=16\times 16\)** elements per layer, and **\(T_l=4\)** layers. It reports that the layer-by-layer iterative algorithm converges within roughly **10 iterations**, and that about **4-bit phase resolution** can approach infinite-resolution performance.

In a related **low-power and cost** formulation, the SIM-enhanced CF mMIMO system uses **TDD**, a **two-layer signal processing framework**, **phase-aware MMSE** channel estimation, **MR combining** at APs, and **LSFD** or **EGCD** at the CPU [2409.12851]. The SIM at AP \(l\) applies diagonal phase-shift matrices
$$
\mathbf{\Phi}_{l,m}= \mathrm{diag}\left(e^{j\varphi_{l,m}^1},\ldots,e^{j\varphi_{l,m}^N}\right),
$$
and the overall SIM beamforming matrix is
$$
\mathbf{G}_l = \mathbf{\Phi}_{l,M}\mathbf{W}_{l,M}\mathbf{\Phi}_{l,M-1}\mathbf{W}_{l,M-1} \cdots \mathbf{\Phi}_{l,2}\mathbf{W}_{l,2}\mathbf{\Phi}_{l,1}.
$$
The paper proposes an **interference-based greedy pilot assignment**, **wave-based beamforming using only statistical CSI**, and **max-min SE power control** solved by **bisection**. Reported numerical findings include a **57\%** SE improvement for the proposed wave-based beamforming algorithm, best SE performance with **20 APs plus 1200 SIM meta-atoms**, the claim that **10 APs** with SIM can outperform **15 APs** in a traditional CF mMIMO system, and that a **2-antenna SIM-enhanced AP** can achieve performance close to a **traditional 4-antenna AP**. The same paper reports the best meta-atom spacing as
$$
d_x=d_y=\lambda/2.
$$

## 5. Methodological patterns and reported limitations

Across these usages, a common design pattern is the replacement of expensive canonical formulations by structured surrogates or decompositions. In robotics, iterative complementarity solves are replaced by a **closed-form dual-cone impedance update** [2603.12185]. In LuSim, exhaustive ray tracing is replaced by **interactive ray casting** combined with a **GSCM** [2401.08624]. In SIM-enabled cell-free MIMO, one RF chain per physical antenna is avoided by shifting part of beamforming to the **wave domain** through stacked intelligent metasurfaces [2506.19090].

The limitations are correspondingly domain-specific. LuSim is described as a pragmatic middle ground: **ray casting and GSCM are more efficient than exhaustive ray tracing, but still approximate the full electromagnetic complexity of real-world propagation**, and the discussion identifies **RIS** and **integrated sensing and communications** as future extensions rather than fully mature features [2401.08624]. The SIM-assisted HMIMO formulation assumes **narrowband transmission**, **independent SIM layers without mutual coupling**, **local CSI** at each AP, and **idealized controllable diagonal SIM layers**; it also states that **wideband/spatial-wideband effects** are not addressed and that **HWIs and layer attenuation limit performance at high SNR** [2405.09753]. The fronthaul-constrained hybrid digital-wave formulation reports that the gap to fully digital remains more pronounced in the **downlink at low SNR** [2506.19090]. For robotics, ComFree-Sim is reported to tolerate moderate timestep sizes, but it **generally benefits from smaller \(dt\) than MJWarp** [2603.12185].

A related misconception is to treat all occurrences of “ComFree-Sim” as references to one simulator. The cited record shows instead that the same label is attached to a robotics backend, a cell-free 6G end-to-end simulator, and several metasurface-assisted cell-free network architectures.

## 6. Related systems and adjacent terminology

Two adjacent systems help situate the term. **SIMulator** is a **low-cost SIM tracing platform** that reproduces the essential functions of traditional SIM tracing hardware using simple components such as **UART interfaces**, **GPIO ports**, and a **Raspberry Pi Pico (~4 USD)** [2506.20800]. Its key architectural choice is to **electrically decouple the SIM side from the modem side** and bridge them only at the **APDU level**. The path is **Modem ↔ Pico ↔ Host relay ↔ SIM provider ↔ physical SIM/eSIM**, with support for **physical SIM readers**, **Android SIM Access Profile (SAP)**, **T=0 and T=1 contact smart cards**, and **ISO 7816 Waiting Time eXtensions (WTX)**. The paper reports successful testing with **7 modems**, **4 smart card terminals**, and **1,000 ms artificial delay** without failures or degraded behavior. It is explicitly described as **not a direct implementation of ComFree-Sim**, but as a **related enabling system and a key building block** for low-cost SIM tunnel / SIM virtualization ideas.

**SimRIS Channel Simulator** is an **open-source MATLAB package with GUI** for **mmWave RIS-assisted communication systems** [2006.00468]. It models the cascaded RIS link and direct path through
$$
y=\left(\mathbf{g}^{\mathrm{T}}\mathbf{\Theta}\mathbf{h}+h_{\text{SISO}}\right)x,
$$
supports **indoor and outdoor** scenarios, and is demonstrated at **28 GHz** with support also stated for **73 GHz**. Its channel model includes **RIS element radiation characteristics**, **path loss**, **LOS probability**, and a **3GPP-style clustered mmWave model**. Although it is not a cell-free simulator, it supplies a relevant channel-modeling baseline for RIS-oriented and metasurface-oriented wireless studies.

Taken together, these neighboring systems clarify the semantic range around the term. In one branch, ComFree-Sim concerns **analytical contact physics**; in another, it denotes **cross-layer cell-free 6G simulation**; in another, it denotes **SIM-assisted cell-free radio architectures**; and in adjacent cellular-instrumentation work, “SIM” refers not to metasurfaces but to the **Subscriber Identity Module**. Accurate interpretation therefore depends on the paper’s disciplinary setting, the expansion of “SIM,” and whether the object under discussion is a simulator, a communication architecture, or an enabling hardware platform.

Source: https://www.emergentmind.com/topics/comfree-sim