Abstract
Fitting experiment data onto a curve is a common signal processing technique to extract data features and establish the relationship between variables. Often, we expect the curve to comply with some analytical function and then turn data fitting into estimating the unknown parameters of a function. Among analytical functions for data fitting, Gaussian function is the most widely used one due to its extensive applications in numerous science and engineering fields. To name just a few, Gaussian function is highly popular in statistical signal processing and analysis, thanks to the central limit theorem; Gaussian function frequently appears in the quantum harmonic oscillator, quantum field theory, optics, lasers, and many other theories and models in Physics; moreover, Gaussian function is widely applied in chemistry for depicting molecular orbitals, in computer science for imaging processing and in artificial intelligence for defining neural networks.
Introduction: The Challenge of Incomplete Sampling
Fitting a Gaussian curve to experimental data is a fundamental task across diverse scientific disciplines. While theoretically straightforward, the exponential nature of the Gaussian function makes it non-linear and computationally intensive to fit directly. A common simplification involves taking the natural logarithm of the data to transform the Gaussian into a parabola, solvable via Linear Least Squares (LS). However, this approach is flawed: in the "tails" of the Gaussian where values approach zero, log-transformation exponentially amplifies noise.
While Weighted Least Squares (WLS) can mitigate this noise amplification, it typically requires an iterative approach that is slow to converge and highly sensitive to initial parameters. Existing initialization methods often assume a complete sampling of the Gaussian curve. They frequently fail when data is "incompletely sampled"—for instance, when the sampling window captures only one side of the curve or a "long tail" extending beyond the window boundaries.
Proposed Methodology
This research introduces a high-quality initialization method (M3) and a subsequent two-stage fitting process (M4) designed to handle noisy, incompletely sampled data. The approach leverages several key signal processing strategies:
- Local Averaging for Peak Estimation: Instead of relying on a single (potentially noisy) maximum data point, the method employs a sliding window to achieve stable estimates of the peak location ($\mu$) and amplitude ($A$).
- Integral Approximation via the Error Function: The authors utilize the mathematical relationship between the area under a Gaussian curve and the error function ($\text{erf}$). By partitioning the data summation into segments relative to the peak, the algorithm effectively handles cases where one side of the Gaussian is truncated.
- Optimal Parameter Combination: By calculating the Cramer-Rao Lower Bound (CRLB) for width ($\sigma$) estimates, the researchers derived a mathematically optimal weighting strategy to combine multiple estimates into a single high-accuracy value.
- Iterative Refinement: The M4 method utilizes the M3 initialization to perform a standard iterative WLS. Due to the high quality of the starting point, the solver achieves near-perfect convergence in significantly fewer steps.
Experimental Results and Discussion
The performance of the proposed M4 method was validated using synthetic simulation data featuring Gaussian functions with additive white Gaussian noise (AWGN). The simulations specifically targeted "long tail" scenarios where the Gaussian is not centered in the sampling window, creating asymmetric datasets.
Convergence and Efficiency
A primary highlight of the M4 method is its convergence speed. As shown in the performance plots, M4 achieves stable convergence in just two iterations. In contrast, the previous state-of-the-art iterative method (M5) required approximately 12 iterations to reach comparable performance levels.
Accuracy and Computational Cost
In low Signal-to-Noise Ratio (SNR) environments (e.g., 10 dB), the proposed M3/M4 framework demonstrated significantly lower Mean Squared Error (MSE) for height, location, and width compared to existing benchmarks like the Al-Nahhal method (M1). While the M3 initialization is computationally more intensive than simple peak-finding (~304 $\mu s$ vs ~76 $\mu s$), the total execution time for the full M4 process (~502 $\mu s$) is roughly half that of the standard iterative M5 (~1,009 $\mu s$), representing a substantial gain in efficiency without sacrificing precision.
Conclusion
By addressing the limitations of log-transform fitting and the sensitivity of iterative solvers to initialization, this research provides a robust framework for Gaussian curve fitting. The use of the error function for integral approximation and CRLB-based weighting allows for high accuracy even with incomplete data. Future work may extend these principles to Gaussian Mixture Models, which are prevalent in complex spectroscopic and imaging applications.
Summary updated