This repository implements a full-wave electromagnetic Digital Twin for a planar microstrip antenna array in a cross configuration, specifically designed to rigorously evaluate Direction of Arrival (DOA) estimation algorithms.
Unlike standard theoretical signal processing models that assume isotropic and point-source antennas in a vacuum, this model captures real hardware physics. By numerically solving Maxwell's equations, the simulation exposes DOA algorithms to non-ideal conditions: mutual coupling, finite substrate diffraction, and Active Element Patterns.
The radiant design and material selection respond to strict trade-offs between RF performance and digital processing viability.
The code defines a continuous search space: resonant frequency (
In satellite or radar applications, linear polarization is vulnerable to Faraday rotation and multipath fading. To avoid this, the corners of the square patch are truncated. This asymmetry perturbs the degenerate fundamental modes
-
Dielectric Substrate (FR4): Modeled using FR4 (
$\epsilon_r = 4.5$ ). The FDTD engine captures the high tangent losses of this material via the effective conductivity ($\kappa$ ). Given the dense structure, mutual coupling (Cross Talk) between adjacent ports is a critical factor that corrupts signal phase. The simulator extracts the maximum$S_{21}$ parameter to quantify this energy leakage. -
SMA Coaxial Feed: The modeling includes the copper pin and the Teflon dielectric (
$\epsilon_r = 2.1$ ). The radii ratio guarantees a$Z_0 = 50 \Omega$ characteristic impedance, preventing spurious reflections in the transmission line.
To balance precision and computational cost, two regimes are implemented:
-
2D Fidelity (
$t_{cobre} = 0.0$ ): The patch is a zero-thickness polygon (PEC). This drastically relaxes the Courant-Friedrichs-Lewy (CFL) condition on the Z-axis, allowing ultra-fast simulations during geometric exploration phases. -
3D Fidelity (
$t_{cobre} > 0.0$ ): Models the physical copper thickness (e.g.,$35\text{ }\mu\text{m}$ ). It captures the exact fringing fields at the metal edges, serving as a strict validation before hardware manufacturing.
Near-field resolution is executed using the FDTD (Finite Difference Time Domain) algorithm.
The spatial Yee grid maintains strict sub-metric discretization (
FDTD solves the fields strictly within a volume bounded by Perfectly Matched Layers (PML). To calculate the radiation at infinity (Fraunhofer region), the Huygens Equivalence Principle is applied over a closed virtual box.
The fundamental deliverable of this simulation is the complex Steering Vector (or Manifold)
A deterministic DOA scenario (e.g., targets at
The classical estimator maximizes the output power by steering the array's beam:
To break the Rayleigh barrier, the Multiple Signal Classification algorithm isolates the noise subspace
This update solves frequency shift issues and false inductive resonances by improving the fidelity of the electromagnetic model in openEMS.
-
Dielectric-aware Mesh: Base mesh resolution is now scaled by the substrate's relative permittivity (
$\sqrt{\epsilon_r}$ ). This prevents EM wave sub-sampling inside the FR4 and fixes major frequency shift errors. - Feed Mesh Anchoring: Forced exact mesh lines at the feed point coordinates to eliminate mathematical interpolation errors during voltage injection.
- Lumped Port Collision Fix: Removed the redundant PEC cylinder that overlapped with the 1D LumpedPort, fixing a numerical short-circuit when using realistic 0.5 mm diameter pins (0.25 mm inner radius) and restoring proper inductive behavior.
The simulator extracts this peak's sharpness and the localization Root Mean Square Error (

