Papers
Topics
Authors
Recent
Search
2000 character limit reached

DeepFMKit: DFMI Simulation Toolbox

Updated 8 July 2026
  • DeepFMKit is an open-source Python toolbox for DFMI that integrates physical signal generation, realistic noise injection, and dynamic delay modeling.
  • It offers interchangeable parameter-estimation algorithms, including frequency-domain NLS and real-time EKF variants, to address systematic effects.
  • Its experimentation framework supports large-scale Monte Carlo studies, enabling robust analysis of readout algorithms and precision metrology workflows.

Searching arXiv for the DeepFMKit paper and related terminology to ground the article in the current literature. DeepFMKit is an open-source Python toolbox for the end-to-end simulation and analysis of Deep Frequency Modulation Interferometry (DFMI), introduced to unify physical signal generation, realistic noise injection, parameter estimation, and large-scale experimentation within a single framework (Dovale-Álvarez, 15 Aug 2025). In the DFMI context, it is intended to support prototyping of DFMI systems, investigation of systematic effects, comparison of readout algorithms, and precision metrology workflows. DFMI itself is presented as an emerging laser interferometry technique capable of picometer-level displacement measurement and potentially absolute length determination with sub-wavelength accuracy, but one whose design space is shaped by nonlinear signal dependence, dynamic interferometer motion, laser and detector noise, waveform distortion, and algorithmic readout choices (Dovale-Álvarez, 15 Aug 2025).

1. DFMI context and the rationale for DeepFMKit

DeepFMKit was motivated by a gap in the DFMI software landscape. The package is described as addressing the full DFMI workflow rather than a single layer of the problem: physical modeling, signal corruption by realistic noise, parameter recovery, and systematic exploration of design trade-offs (Dovale-Álvarez, 15 Aug 2025). The paper frames DFMI as computationally demanding because performance depends on the coupled behavior of interferometer physics, laser technology, multiple noise sources, and the estimation algorithm used to recover phase-related parameters.

The stated motivation is comparative as well as constructive. Existing tools are described as partial solutions: Finesse is characterized as strong for frequency-domain optical simulation but not for the time-domain, dynamically modulated DFMI signal model; optical design environments such as Zemax OpticStudio and Code V are described as modeling geometry and aberrations but not DFMI readout or noise propagation; and PyTDI is identified as providing specific DSP utilities such as time shifting rather than the full DFMI pipeline (Dovale-Álvarez, 15 Aug 2025). DeepFMKit is therefore positioned as a framework that combines high-fidelity physics simulation with interchangeable readout algorithms and high-throughput experimentation.

A useful point of disambiguation is that DeepFMKit is unrelated to the recommender-systems framework DeepFM, which combines factorization machines and deep neural networks for CTR prediction (Guo et al., 2018). Despite the lexical similarity, the two names refer to different technical domains: DFMI metrology in one case and click-through-rate prediction in the other.

2. Physical signal model and simulation engine

The core simulation engine is implemented in physics.py and centered on the SignalGenerator class (Dovale-Álvarez, 15 Aug 2025). Its purpose is to model the full DFMI signal chain beyond an idealized sinusoidal approximation. The detector voltage is written as

v(t)=A[1+kcos ⁣(ΔΦtotal(t))],v(t)=A\left[1+k\cos\!\left(\Delta\Phi_{\text{total}}(t)\right)\right],

where AA is the mean optical power term, kk is the fringe visibility, and ΔΦtotal(t)\Delta\Phi_{\text{total}}(t) is the total phase difference between the interferometer arms (Dovale-Álvarez, 15 Aug 2025). The exact phase difference is expressed as

ΔΦtotal(t)=ϕlaser(tτr(t))ϕlaser(tτm(t)),\Delta\Phi_{\text{total}}(t)=\phi_{\text{laser}}(t-\tau_r(t))-\phi_{\text{laser}}(t-\tau_m(t)),

which explicitly incorporates time-of-flight delays in both paths (Dovale-Álvarez, 15 Aug 2025).

A major design feature is support for dynamic interferometers with time-varying path lengths,

τr(t)=lr(t)c,τm(t)=lm(t)c,\tau_r(t)=\frac{l_r(t)}{c}, \qquad \tau_m(t)=\frac{l_m(t)}{c},

so that the delay can vary continuously over time rather than being approximated by a fixed or Taylor-expanded quantity (Dovale-Álvarez, 15 Aug 2025). DeepFMKit implements these delays through dsp.timeshift using high-order Lagrange interpolation, which is intended to preserve accuracy when the delay in sample units is both non-integer and time-dependent. The package also uses a pad-and-crop strategy: additional samples are simulated at the beginning and end of the interval so that the interpolation filter has valid boundary support, after which the output is cropped to the requested time range (Dovale-Álvarez, 15 Aug 2025).

The treatment of laser modulation is similarly generalized. The LaserConfig object accepts a user-defined waveform_func, allowing arbitrary modulation waveforms rather than constraining the simulation to a purely sinusoidal drive (Dovale-Álvarez, 15 Aug 2025). In the ideal sinusoidal case, the modulation is given by

fmod(t)=Δfcos(ωmt+ψ),f_{\text{mod}}(t)=\Delta f \cos(\omega_m t+\psi),

with phase modulation

ϕmod(t)=Δffmsin(ωmt+ψ).\phi_{\text{mod}}(t)=\frac{\Delta f}{f_m}\sin(\omega_m t+\psi).

This generality is important because the paper explicitly identifies modulation waveform distortions as one of the systematic complications in practical DFMI design (Dovale-Álvarez, 15 Aug 2025).

The package also defines a structured simulation pipeline. The sequence reported in the paper is: compute dynamic path lengths and delays; generate the modulation waveform; time-shift the modulation phase to each arm; time-shift laser frequency noise separately for both arms; assemble carrier phase, DFMI phase, and laser-noise contributions; then apply amplitude noise and sensing noise (Dovale-Álvarez, 15 Aug 2025). This explicitly models differential cancellation of common-mode laser noise in unequal-arm interferometers.

3. Noise modeling and realistic non-idealities

DeepFMKit includes colored-noise generation for both laser and interferometer subsystems (Dovale-Álvarez, 15 Aug 2025). Each supported noise source is parameterized by a spectral exponent α\alpha with

PSD1fα,α[0,2].\mathrm{PSD}\propto \frac{1}{f^\alpha}, \qquad \alpha\in[0,2].

The paper identifies three canonical cases: AA0 for white noise, AA1 for flicker or pink noise, and AA2 for random-walk or red noise (Dovale-Álvarez, 15 Aug 2025). The implementation in noise.py uses the numerically stable method of Plaszczynski, realized as a cascade of first-order IIR filters and accelerated with Numba JIT compilation.

The supported noise terms are enumerated explicitly: laser frequency noise AA3, tuning amplitude noise AA4, relative intensity noise AA5, OPD noise AA6, and sensing noise AA7 (Dovale-Álvarez, 15 Aug 2025). The paper reports validation plots in which the generated amplitude spectral densities match the expected AA8 slopes, which is presented as evidence that the synthetic noise has the intended spectral character.

In the low-delay approximation, the ideal DFMI phase and voltage reduce to

AA9

with

kk0

and

kk1

These expressions serve as the analytical baseline from which the higher-fidelity engine departs when dynamic delays, arbitrary modulation, and colored disturbances are introduced (Dovale-Álvarez, 15 Aug 2025).

A plausible implication is that the package is intended not merely for nominal signal synthesis but for controlled stress-testing of DFMI readout pipelines under specific non-ideal mechanisms. That interpretation is consistent with the package’s stated role in studying systematic errors and noise coupling (Dovale-Álvarez, 15 Aug 2025).

4. Parameter-estimation algorithms

DeepFMKit organizes its estimators in fitters.py according to a Strategy pattern, making the readout stage interchangeable within a common workflow (Dovale-Álvarez, 15 Aug 2025). The principal offline estimator is the frequency-domain nonlinear least-squares implementation StandardNLS, while the real-time estimators are StandardEKF and IntegratedEKF.

StandardNLS fits the parameter vector

kk2

where kk3 is the AC amplitude, kk4 the effective modulation depth, kk5 the interferometric phase, and kk6 the modulation phase (Dovale-Álvarez, 15 Aug 2025). Its frequency-domain model uses harmonic amplitudes

kk7

derived from the Jacobi–Anger expansion of the ideal DFMI signal (Dovale-Álvarez, 15 Aug 2025). The fitter minimizes a sum-of-squared-residuals objective between measured and modeled harmonic amplitudes. The implementation is described as an optimized Levenberg–Marquardt algorithm that computes SSQ, the Jacobian, and the gradient, tests candidate damping parameters kk8, accepts the first improving step, and iterates to convergence (Dovale-Álvarez, 15 Aug 2025). Robustness measures include smart kk9 initialization through a one-dimensional scan and a grid-search fallback over ΔΦtotal(t)\Delta\Phi_{\text{total}}(t)0 if the initial fit quality is poor. Performance-oriented features include vectorized NumPy harmonic and Jacobian evaluation, parallel processing across buffers, and warm-starting from the previous buffer’s solution (Dovale-Álvarez, 15 Aug 2025).

The real-time branch comprises two Extended Kalman Filter variants. StandardEKF uses a random-walk process model with state

ΔΦtotal(t)\Delta\Phi_{\text{total}}(t)1

state-transition matrix ΔΦtotal(t)\Delta\Phi_{\text{total}}(t)2, and measurement model

ΔΦtotal(t)\Delta\Phi_{\text{total}}(t)3

It is described as simple, stable, and suited to quasi-static or stochastic parameter evolution (Dovale-Álvarez, 15 Aug 2025).

IntegratedEKF extends this to an integrated random walk, or constant-velocity, model with 10-dimensional state

ΔΦtotal(t)\Delta\Phi_{\text{total}}(t)4

and a block-diagonal transition matrix built from repeated kinematic blocks

ΔΦtotal(t)\Delta\Phi_{\text{total}}(t)5

This variant is intended for signals with persistent drift or approximately constant velocity in parameter space (Dovale-Álvarez, 15 Aug 2025).

The paper gives the standard EKF recursion: predict ΔΦtotal(t)\Delta\Phi_{\text{total}}(t)6 and ΔΦtotal(t)\Delta\Phi_{\text{total}}(t)7, linearize the measurement model through ΔΦtotal(t)\Delta\Phi_{\text{total}}(t)8, compute the innovation ΔΦtotal(t)\Delta\Phi_{\text{total}}(t)9, form the Kalman gain ΔΦtotal(t)=ϕlaser(tτr(t))ϕlaser(tτm(t)),\Delta\Phi_{\text{total}}(t)=\phi_{\text{laser}}(t-\tau_r(t))-\phi_{\text{laser}}(t-\tau_m(t)),0, and update the state and covariance (Dovale-Álvarez, 15 Aug 2025). It emphasizes the role of ΔΦtotal(t)=ϕlaser(tτr(t))ϕlaser(tτm(t)),\Delta\Phi_{\text{total}}(t)=\phi_{\text{laser}}(t-\tau_r(t))-\phi_{\text{laser}}(t-\tau_m(t)),1 and ΔΦtotal(t)=ϕlaser(tτr(t))ϕlaser(tτm(t)),\Delta\Phi_{\text{total}}(t)=\phi_{\text{laser}}(t-\tau_r(t))-\phi_{\text{laser}}(t-\tau_m(t)),2: larger ΔΦtotal(t)=ϕlaser(tτr(t))ϕlaser(tτm(t)),\Delta\Phi_{\text{total}}(t)=\phi_{\text{laser}}(t-\tau_r(t))-\phi_{\text{laser}}(t-\tau_m(t)),3 yields faster tracking but noisier estimates, while smaller ΔΦtotal(t)=ϕlaser(tτr(t))ϕlaser(tτm(t)),\Delta\Phi_{\text{total}}(t)=\phi_{\text{laser}}(t-\tau_r(t))-\phi_{\text{laser}}(t-\tau_m(t)),4 gives smoother estimates with more lag.

5. Experimentation framework and large-scale studies

DeepFMKit includes an experimentation framework in experiments.py for parameter sweeps and Monte Carlo analyses (Dovale-Álvarez, 15 Aug 2025). The paper describes the user interface in terms of four declarations: static parameters, swept axes, stochastic variables, and analyses to run. The framework then constructs the Cartesian product of the sweep axes, generates Monte Carlo trials at each grid point, executes each trial as an atomic simulate-and-analyze job, aggregates the outputs into structured ΔΦtotal(t)=ϕlaser(tτr(t))ϕlaser(tτm(t)),\Delta\Phi_{\text{total}}(t)=\phi_{\text{laser}}(t-\tau_r(t))-\phi_{\text{laser}}(t-\tau_m(t)),5-dimensional arrays, and computes statistics such as mean and standard deviation (Dovale-Álvarez, 15 Aug 2025).

For multiprocessing robustness, the framework uses an ExperimentFactory class. The stated reason is that parallel execution in Python requires picklable objects, so experiment-specific configuration is encapsulated in a serializable factory object that can be dispatched to worker processes (Dovale-Álvarez, 15 Aug 2025). The paper identifies this as important for avoiding nested parallelism problems.

The paper’s principal case study is a second harmonic distortion (SHD) analysis (Dovale-Álvarez, 15 Aug 2025). In that experiment, the framework sweeps the true modulation depth ΔΦtotal(t)=ϕlaser(tτr(t))ϕlaser(tτm(t)),\Delta\Phi_{\text{total}}(t)=\phi_{\text{laser}}(t-\tau_r(t))-\phi_{\text{laser}}(t-\tau_m(t)),6 and the distortion amplitude ΔΦtotal(t)=ϕlaser(tτr(t))ϕlaser(tτm(t)),\Delta\Phi_{\text{total}}(t)=\phi_{\text{laser}}(t-\tau_r(t))-\phi_{\text{laser}}(t-\tau_m(t)),7, samples unknown phases ΔΦtotal(t)=ϕlaser(tτr(t))ϕlaser(tτm(t)),\Delta\Phi_{\text{total}}(t)=\phi_{\text{laser}}(t-\tau_r(t))-\phi_{\text{laser}}(t-\tau_m(t)),8 and ΔΦtotal(t)=ϕlaser(tτr(t))ϕlaser(tτm(t)),\Delta\Phi_{\text{total}}(t)=\phi_{\text{laser}}(t-\tau_r(t))-\phi_{\text{laser}}(t-\tau_m(t)),9 by Monte Carlo, and estimates the bias in τr(t)=lr(t)c,τm(t)=lm(t)c,\tau_r(t)=\frac{l_r(t)}{c}, \qquad \tau_m(t)=\frac{l_m(t)}{c},0 using NLS. The distorted modulation is modeled as

τr(t)=lr(t)c,τm(t)=lm(t)c,\tau_r(t)=\frac{l_r(t)}{c}, \qquad \tau_m(t)=\frac{l_m(t)}{c},1

which induces a perturbation

τr(t)=lr(t)c,τm(t)=lm(t)c,\tau_r(t)=\frac{l_r(t)}{c}, \qquad \tau_m(t)=\frac{l_m(t)}{c},2

and an approximate signal error

τr(t)=lr(t)c,τm(t)=lm(t)c,\tau_r(t)=\frac{l_r(t)}{c}, \qquad \tau_m(t)=\frac{l_m(t)}{c},3

The resulting study reveals what the paper calls “robustness valleys,” where the bias is suppressed; analytically, these correspond to extrema of τr(t)=lr(t)c,τm(t)=lm(t)c,\tau_r(t)=\frac{l_r(t)}{c}, \qquad \tau_m(t)=\frac{l_m(t)}{c},4, satisfying

τr(t)=lr(t)c,τm(t)=lm(t)c,\tau_r(t)=\frac{l_r(t)}{c}, \qquad \tau_m(t)=\frac{l_m(t)}{c},5

The experiment is reported to have been carried out with 50 million simulated and fitted trials, which the paper presents as evidence that the framework is suitable for very large studies (Dovale-Álvarez, 15 Aug 2025).

This suggests that DeepFMKit is intended not only for single-scenario simulation but also for systematic operating-point discovery, especially in problems where estimator bias depends nontrivially on waveform imperfections and latent phase variables.

6. Software architecture, workflow, and computational performance

The package uses an object-oriented architecture in which LaserConfig and IfoConfig combine into SimConfig, DeepFrame acts as the central controller, RawData stores raw time series, and FitData stores fit outputs (Dovale-Álvarez, 15 Aug 2025). The paper explicitly states that the design follows a Composition pattern for physics objects and a Strategy pattern for fitters. DeepFrame orchestrates the .simulate() and .fit() stages, while BaseFitter is subclassed by StandardNLS, StandardEKF, and IntegratedEKF (Dovale-Álvarez, 15 Aug 2025).

The reported benchmark uses a 100-second, 200 kHz dataset comprising 20 million samples (Dovale-Álvarez, 15 Aug 2025). Throughput figures are given for Apple M4 Max and Intel Core Ultra 7 hardware.

Algorithm Apple M4 Max Intel Core Ultra 7
StandardNLS, sequential 3,804 kS/s 1,889 kS/s
StandardNLS, parallel 13,334 kS/s 11,940 kS/s
StandardEKF 904 kS/s 726 kS/s
IntegratedEKF 398 kS/s 310 kS/s

The paper’s stated conclusions from these measurements are that parallel NLS is fastest overall, that the EKF implementations are fast enough for real-time use, and that the 5D random-walk EKF is significantly faster than the 10D integrated or constant-velocity EKF (Dovale-Álvarez, 15 Aug 2025). These results align with the architectural split between high-throughput offline fitting and state-space tracking for real-time estimation.

The practical value claimed for the package is correspondingly broad: prototyping DFMI instruments before hardware construction, investigating systematic errors such as waveform distortion and nonlinearity, comparing offline and real-time readout methods, studying noise coupling and dynamic effects in unequal-arm interferometers, and supporting reproducible precision-metrology research (Dovale-Álvarez, 15 Aug 2025).

7. Significance, scope, and terminology

DeepFMKit is presented as a validated, open-source DFMI simulation-and-analysis environment that bridges theoretical DFMI models and practical precision-measurement workflows (Dovale-Álvarez, 15 Aug 2025). Its defining features are physically faithful treatment of dynamic delays and colored noise, interchangeable estimators spanning frequency-domain NLS and time-domain EKFs, and a high-throughput experimental layer for sweeps and Monte Carlo studies.

A recurring source of confusion is nomenclature. The term “DeepFM” is established in recommender systems as an end-to-end wide-and-deep CTR framework with shared embeddings for FM and deep components (Guo et al., 2018), and it has generated a family of derivatives such as DexDeepFM (Chen et al., 2021). DeepFMKit, by contrast, denotes a toolkit for Deep Frequency Modulation Interferometry rather than a library for factorization-machine-based recommendation. The shared prefix therefore reflects an acronym collision rather than a methodological relationship.

Within precision interferometry, the package’s significance lies in unifying modeling, estimation, and large-scale study under one software boundary. A plausible implication is that this integration lowers the cost of iterating between theoretical signal models, algorithm selection, and tolerance analysis. That interpretation is consistent with the paper’s bottom-line characterization of DeepFMKit as a tool for turning DFMI into a computationally testable and optimizable engineering platform (Dovale-Álvarez, 15 Aug 2025).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to DeepFMKit.