Next Article in Journal
Investigation of Optimal Afferent Feedback Modality for Inducing Neural Plasticity with A Self-Paced Brain-Computer Interface
Previous Article in Journal
InGaAs Diodes for Terahertz Sensing—Effect of Molecular Beam Epitaxy Growth Conditions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Membership Function-Weighted Non-Linear Fitting Method for Optical-Sensing Modeling and Reconstruction

State Key Laboratory of Precision Measuring Technology and Instruments, Tianjin University, Tianjin 300072, China
*
Author to whom correspondence should be addressed.
Sensors 2018, 18(11), 3762; https://doi.org/10.3390/s18113762
Submission received: 23 September 2018 / Revised: 28 October 2018 / Accepted: 1 November 2018 / Published: 3 November 2018
(This article belongs to the Section Physical Sensors)

Abstract

:
Imprecise measurements present universally due to variability in the measurement error. We devised a very simple membership function to evaluate fuzzily the quality of optical sensing with a small dataset, where a normal distribution cannot be assumed. The proposed membership function was further used as a weighting function for non-linear curve fitting under expected mathematical model constraints, namely the membership function-weighted Levenberg–Marquardt (MFW-LM) algorithm. The robustness and effectiveness of the MFW-LM algorithm were demonstrated by an optical-sensing simulation and two practical applications. (1) In laser-absorption spectroscopy, molecular spectral line modeling was greatly improved by the method. The measurement uncertainty of temperature and pressure were reduced dramatically, by 53.3% and 43.5%, respectively, compared with the original method. (2) In imaging, a laser beam-profile reconstruction from heavy distorted observations was improved by the method. As the dynamic range of the infrared camera increased from 256 to 415, the detailed resolution of the laser-beam profiles increased by an amazing 360%, achieving high dynamic-range imaging to capture optical signal details. Therefore, the MFW-LM algorithm provides a robust and effective tool for fitting a proper physical model and precision parameters from low-quality data.

1. Introduction

Curve fitting is one of the most powerful and most widely used analysis tools to pre- and post-process data [1,2], to remove outliers [3,4], to compare candidate models [5], and to examine the relationship between one or more predictors [6,7,8]. The parameterization of curve fitting is usually realized by minimizing linear or non-linear least-squares residuals [9,10], in which the Levenberg–Marquardt (LM) algorithm, also known as the damped least-squares method, is popular for fast convergence [11]. Whether the LM fitting results can reflect physical meaning is highly dependent on the quality of measured signal. Improving the LM algorithm’s robustness from outliers and reducing its dependence on the quality of the measured signal are desired.
The LM algorithm for curve fitting was first proposed by Levenberg [12] in 1943 and optimized by Marquardt [13] in 1963. The idea of weighted fitting was demonstrated in 1959. Asadi et al. [14] proposed a hybrid intelligent model combination of genetic algorithms and the LM algorithm for stock-exchange index prediction to cope with the fluctuations of stock-market values. Nawi et al. [15] proposed an algorithm in which a cuckoo search algorithm was used to provide optimal weights for the LM algorithm to obtain better results in training feed-forward artificial neural networks. Zhang et al. [16] proposed a finite-element analysis-based LM algorithm to extract the features of the Brillouin-scattering spectrum with different linewidths and signal-to-noise ratios (SNRs). The weighted LM algorithm had attracted much attention for potentially reducing the effect of outliers.
Outliers present universally due to variability in measurement error, including a transient malfunction of apparatuses, errors in data transmission or transcription, changes in system behavior, operation error, instrument error or through natural deviations, and a flaw in the assumed theory. These outliers always lower the goodness of fit and the precision of fitted parameters. There is no rigid mathematical definition of what constitutes an outlier; determining whether or not an observation is an outlier is ultimately a subjective exercise. Outlier detection methods, e.g., Chauvenet’s criterion [17], Grubbs’ test [18], Dixon’s Q test [19], and Peirce’s criterion [20], are usually graphically or model-based. Deletion of outliers is a controversial practice frowned upon by scientists because the deletion process does not make the practice more scientifically or methodologically sound, especially in small sets or where a normal distribution cannot be assumed. Furthermore, when non-linear fitting is performed from small numbers of replicated observations, the results of an analysis can be very badly and unpredictably affected.
Optical sensing is often performed in situ or in online applications, where small datasets are common for the variability of working conditions or fast response time. These results in outliers buried in observations being more difficult to distinguish from low-quality data distorted by non-linear transmission, interference, electrical noise, dark current fluctuation (DCF), and dark-current non-uniformity and photoresponse non-uniformity between pixels for optical image sensors [21,22,23]. Outliers and distorted signal can be both overly influenced the accuracy of in situ optical sensing and modeling. There is not any universal or robust algorithm to improve the goodness of fit and the precision of fitted parameters for outliers-contained optical sensing with small datasets.
In the work described in this paper, we considered the outliers and distorted signal of optical sensing together as imprecise measurements. Taking the idea of fuzzy logic for the first time, we devised a membership function for optical-sensing data to evaluate the observations’ fidelity. Furthermore, we used the membership function as the weighting function of fitting for signal modeling and reconstruction under expected mathematical model constraints, i.e., a membership-function-weighted Levenberg–Marquardt (MFW-LM) algorithm. We demonstrated the MFW-LM algorithm by an optical-sensing simulation and two experiments: (1) laser-absorption-spectroscopy analysis and (2) laser-beam-profile measurement.

2. Method

2.1. Optical-Sensing Membership Function

We considered the outliers and distorted signal of optical sensing together as imprecise measurements, which present universally due to three phenomena: (1) imperfect response of sensing and signal conditioning due to non-linearity, DCF, and performance decline with device aging; (2) interference from stray light and optical fringe [24,25], power-line interference [26], and electromagnetic interference; and (3) electrical noise from electronic devices with various processes, including thermal noise, shot noise, flicker noise, burst noise, and transit-time noise.
Generally, the measurement reliability of optical sensing depends largely on the responsivity of the adopted photosensor and signal conditioning unit. A typical responsivity of a photosensor usually exhibits quite good linearity in the middle region of its response curve, while presenting non-linearity near the two ends of the response curve, as shown in Figure 1a. A slightly different responsivity at the low-input end and a saturated feature at the up-input end are very common for most photosensors. The signal conditioning unit of an optical system is usually used to perform amplification for high resolution and SNR of the input signal, filtering for minor out-band interference, and electrical isolation for isolating possible sources of signal perturbations. Practically, a variety of interference and noise should be reduced to a rather small amount compared with the measured signal.
Therefore, the reliability of measured data is closely related to the signal magnitude for a well-designed optical system. Random noise is statistical noise having a Gaussian distribution. Thus, the measurements corresponding to the middle and upper parts of the response curve are more reliable than those of the two ends of the curve.
We took the idea of fuzzy logic, where a membership function represents the degree of truth as an extension of valuation [27]. For an optical-sensing dataset [yi] (i = 1,2, …, n), we devised a membership function, denoted μ(yi), mapping from [yi] to the real unit interval [0, 1], for optical-sensing datum yi (i = 1, 2, …, n) to quantify its fidelity:
μ ( y i ) = { 0 ( 1 / y 1 ) × y i 1 ( y max y i ) / ( y max y 2 ) y i y min , y i y max y min < y i < y 1 y 1 y i y 2 y 2 < y i < y max  
μ ( y i ) [ 0 , 1 ] i = 1 , 2 , , n  
where μ(yi) is the membership degree of an observation yi; ymax and ymin are the maximum and the minimum of right observation, respectively; y1 and y2 are two critical observations with high confidence, respectively; and n is the number of observations.
The criteria for the key parameters in the membership function are closely related to system characteristics. The ymax and ymin are limited values of a sensor’s output range. Any observations beyond ymax and ymin must be outliers, and we assigned membership degree 0 to them, i.e., their fidelity is none. y1 and y2 have fuzzy certainty, which is used to determine the range with the best linearity and make fuzzy optimal selection of observations. These observations between the two critical points y1 and y2 have the highest confidence, and we assigned membership degree 1 to them, which comprise the core of the membership function. However, the scope of this area is not strictly defined and can be appropriately adjusted according to different sensor responsivity and experimental purposes. We assigned membership degree 0 to 1 for the other observations based on their measurement value. The functions from ymin to y1, and from y2 to ymax are specifically designed on the basis of the respective major problems to be solved. The signal in the low amplitude interval is greatly affected by the random noise, so it is necessary to reduce the contribution of the low-SNR observations; while the signal of the high amplitude interval mainly addresses the difficulties of signal distortion and saturation caused by the non-linearity of the sensor’s responsivity. A membership function assigned for a typical responsivity of a photosensor (Figure 1a) is shown in Figure 1b.
The membership degree μ(yi) is closely related with the magnitude of the measurement, similar to the experience using an analog instrument, i.e., one always achieves better accuracy at approximately two-thirds of the full scale of an instrument by properly selecting its scale range [28]. Therefore, the interval set by the two critical values y1 and y2 of the membership function is usually chosen to be near two-thirds of the observations or sensor’s responsivity. A higher membership degree μ(yi) means a precise measurement, while a smaller μ(yi) implies the poorer fidelity of observations. The membership function, drawing on the ideology of fuzzy logic, is a novel concept and valuable for quantitative simple evaluation of observations under the premise that the SNR of the observations is within a reliable range. The higher the SNR of the observations, the more objective the fitting result of the MFW-LM algorithm will be.

2.2. Membership Function-Weighted Levenberg–Marquardt (MFW-LM) Algorithm

The LM algorithm is a well-known damped least-squares algorithm [29], so only a brief review is given. For an observed data set [yi] (i = 1,2, …, n), the expected mathematical model f(x, a ) is often determined based on previous knowledge. The parameter vector a of the model is approximated within a trustworthy range (denoted k, where |k| < ε and ε is any positive number) near its initial value a k to seek an optimal parameter vector a f that minimizes the sum of squared residuals R( a ).
The fitting criteria of the LM algorithm is given by [30,31]:
min R ( a ) = i = 1 n [ y i y i ( a k + k ) ] 2 , i = 1 , 2 , , n  
where R( a ) is the sum of the squared residuals, yi( a k + k) is the data when the parameter is estimated as ( a k + k), and n is the number of fitted points.
We promoted the fitting quality of optical sensing by using the aforementioned membership function as a weighting function. The fitting criterion in Equation (3) was weighted by the membership degree of observations described by Equation (1), namely the MFW-LM algorithm, which is described as follows:
min R ( a ) = i = 1 n μ ( y i ) [ y i y i ( a k + k ) ] 2 , i = 1 , 2 , , n  
where μ(yi) is a membership degree used as a regression weight; a k is the parameter vector of the expected mathematical model. We substituted the optimal parameter vector a f that meets the improved fitting criteria [Equation (4)] into f(x, a ) to obtain the fitting result that is in better agreement with the physical meaning.
We programmed the entire algorithm in OriginPro and LabView software. First, we predicted the initial values of parameters by the least-squares method or experimental results. Next, we weighted observations by assigning a membership function. The fitting parameters were continuously involved in the iterative process until the sum of squared residuals was minimized. Finally, the optimal parameters were obtained to complete the MFW-LM algorithm. The flowchart of this process is shown in Figure 2.
From the view of weighted curve fitting, the membership function is a rather simple function capable of coping with imprecise measurements.

3. Verification of MFW-LM Algorithm

We verified the MFW-LM algorithm by simulating optical-sensing signals, which were accompanied by random noise, sensor non-linearity, and data distortion. We compared the fitting results of the proposed MFW-LM algorithm with that of an outliers-excluded LM (OE-LM).
We assumed a laser beam featuring a Gaussian function based on a large number of previous studies [32,33,34,35], which was described by Equation (5) and is shown in Figure 3a:
I = I 0 + ( η / ( w × π / 2 ) ) × e 2 ( ( x x c ) / w ) 2  
where I0 can be seen as background light; η is a constant; w is the radius at which the intensity value falls to 1/e2 of the maximum intensity; xc is the offset of the maximum intensity relative to the horizontal axis; x is the radial distance from the center axis of the beam; all parameters were randomly generated (in Table 1).
The laser beam was measured by image sensors with four different response characteristics as shown in Figure 3c and with random noise shown in Figure 3b. Taking the simulated SNR = 25, calculated by the amplitude of the simulated signal and the random noise, as an example, we simulated the measurements. The measured laser beams with four image sensors are shown in Figure 3d, in which we intended a bigger input to bring about a saturated signal, seriously distorted data, or outliers, to verify the proposed MFW-LM algorithm.
We fitted measurement I (in Figure 3d) with the MFW- and OE-LM algorithms separately. The fitted curves and preset Gaussian function are shown in the upper panel of Figure 3e and their deviation in the lower panel of Figure 3e. We then changed the response of image sensors to curves II–IV (in Figure 3c), which is more non-linear owing to device aging, and fitted the curves I–IV in Figure 3c with MFW-LM algorithm to verify its universality, as shown in Figure 3g. We simulated 100 signals at different SNRs by adjusting the amplitude of random noise and the sensor’s non-linearity, and averaged them to obtain the relative normalized root-mean-square deviation (NRMSD), described in Equation (6), of the fitted and preset values, as shown in Figure 3f,h, respectively.
According to measurements I–IV, we set the parameters of the membership function (in Table 2) for MFW-LM fitting based on the response curves I–IV in Figure 3c. The ymax and ymin are limited values of the sensor’s responsivity. y1 and y2 are the two-thirds of the sensor’s responsivity. The parameter vector a = (I0, η, w, xc) was obtained by LM fitting and was used as the initial parameter vector of the MFW-LM algorithm. After iteration, the final iteration obtained the optimal parameter vector, which can minimize the sum of squared residuals R( a ). Substituting it into the Gaussian function yielded the fitted laser beam profile.
We compared the deviation between the reconstructed signal and the preset laser-beam profile, which was quantified by the NRMSD of the relative residuals as follows:
NRMSD = i = 1 N [ ( y i y i * ) / y max ] 2 / n
where y i and y i * are the fitted data and the preset value, respectively; y max is the maximum of y i ; and n is the number of fitted points.
The sensor’s non-linearity δ was expressed by Equation (7) and demonstrated in Figure 1a:
δ = | y n y l | / Y  
where yn is the non-linear response data, yl the linear response data, and Y the range of linear response.
The result of the single simulation (Figure 3e) indicates that the relative NRMSD of the OE-LM and the MFW-LM algorithms were 4.5% and 1.1%, respectively. Multiple simulations at different SNRs found that the NRMSD of the MFW-LM algorithm was improved by 66.0%–89.7% compared to the OE-LM algorithm, and that it is always within 5% for different response characteristics when the SNR is not less than 2.5 or the sensor’s non-linearity is not greater than 31.32.
Therefore, the MFW-LM algorithm is extremely robust and effective in minimizing the contribution of outliers and distorted signals and accurately reconstructs the laser-beam profile when dealing with optical sensing with small datasets; that is, the proposed MFW-LM algorithm is suitable for curve fitting that requires high-precision measurement.

4. Applications

4.1. Optical Absorption Spectroscopy Analysis

To improve the accuracy of optical absorption spectroscopy analysis, which is often frustrated by imperfect response, interference, and electronic noise [24,25,36,37,38] in signal acquisition and processing, we applied the MFW-LM algorithm to molecular absorption line modeling of H2O and compared the measurement uncertainty of the temperature and pressure calculated by the fitting results of the MFW-LM and the LM algorithms.
H2O spectral intensity and line shape were used to calculate temperature, and pressure by the LM algorithm based on wavelength-modulation spectroscopy (WMS) [39]. The fitted mathematical expression was determined by the center absorption wavenumber ν0, integral absorbance Ai, and Lorentzian broadening ΔνL [40]. The molecular absorption line modeling M that was used for the fitting is introduced by Equations (8)–(10):
M = A i 0 cos ψ [ H 2 + i 0 2 ( H 1 + H 3 ) cos ψ ] ,  
H i = 1 π π π φ v ( ν ¯ + a cos θ , Δ ν L , Δ ν G ) cos i θ d θ ,  
φ v ( ν ν 0 , Δ ν v ) c L 1 π Δ ν v ( ν ν 0 ) 2 + Δ ν v + c G ln 2 π Δ ν v exp [ ln 2 ( ν ν 0 Δ ν v ) 2 ] ,  
where M is the molecular absorption line modeling; A is integral absorbance; i0 = 0.036 and ψ = 1.12π are parameters of the laser; Hi is the ith harmonic signal; φv is the Voigt profile; ν ¯ = 2.0 × 10 5 GHz is the center frequency of the laser; a = 0.065 cm−1 is the modulation amplitude; θ∈[−π, π]; ν is absorption wavenumber; ν0 is the center absorption wavenumber; ΔνL is the Lorentzian broadening; ΔνG is the Gaussian broadening; Δ ν v is the half width at half maximum (HWHM) of Voigt; cL and cG are weights, which are related to the absorption lineshape [41].
Gas temperature T was calculated according to the line-strength ratio R = Ai/Aj [Equation (11)], which is a fourth-order polynomial obtained by fitting the data provided by the HITRAN database [42]. Pressure P can be inferred by combining Equations (12) to (13):
T = g ( R ) = k 1 + k 2 × R + k 3 × R 2 + k 4 × R 3 + k 5 × R 4  
Δ ν L = P [ χ H 2 O γ self + ( 1 χ H 2 O ) γ mix ] ,  
χ H 2 O = A P S L ,  
where T is the gas temperature; k1, k2, k3, k4, and k5 are polynomial coefficients (Table 3); R is the line-strength ratio; ΔνL is Lorentzian broadening; χ H 2 O is the concentration of H2O; γself and γmix, calculated by γ j ( T ) = γ j ( T 0 ) ( T 0 / T ) n j , are the self-broadening coefficient of H2O and the mix-broadening coefficient of H2O with other gas compounds, respectively; γ j ( T 0 ) is the broadening factor at the reference temperature; nj is the temperature index, which is typically 0.5; A is integral absorbance; S is the line strength; and L is the optical path length.
The temperature of the experimental environment measured by a thermocouple was T = 350 K. Then, the pressure calculated according to the ideal gas law was P = 1.18 atm. The temperature and pressure measurement uncertainties obtained by the LM algorithm were 2.6% and 6.8%, respectively.
To weaken the roles of outliers and distorted signals on curve fitting, we used the proposed MFW-LM algorithm to refit the raw observations. The empirical estimates of ν0, Ai and ΔνL were regarded as initial parameters. The parameters and weighting functions (the membership functions) were set for the LM fitting program by Labview software. By repeating multiple iterations, once the sum of squared residuals R( a ) minimizing, the fitting process will converge to the unique solution, the optimal parameters, and the molecular absorption lineshape of H2O was obtained by the MFW-LM fit. Based on the robustness of the MFW-LM algorithm, the observed signals obtained by sensors with different responsivity can be fitted. Observations and sensor responsivity are one-to-one corresponding, so the limit values and critical values of the observations can be taken as the key parameters of the membership function (see Table 4), so that the responsivity of the photodetector (PDA10CS-EC, Thorlabs Inc., Newton, NJ, USA) used in the experiment is not needed to be tested or corrected. The parameters of the membership function, following Equation (1), were set based on the molecular absorption lineshape of H2O collected by this photodetector as shown in Table 4. The ymax and ymin are limited values of the observations’ amplitude. y1 and y2 are the two thirds of the observations’ amplitude. The variables of the molecular absorption line modeling of H2O are continually updated and iterated until a set of variables is found to minimize the R( a ) (Equation (4)).
The molecular absorption lineshape of H2O and the fitting results of the LM and the MFW-LM algorithms are shown in Figure 4 and Table 5.
The integral absorbance ratio (i.e., R) was obtained from the two absorption peaks 1 and 2 of H2O. Substituting it into Equation (11), we can calculate the gas temperature T. In Equations (12) and (13), the parameters other than the pressure P and H2O concentration χ H 2 O are constants or the known parameters obtained by the fitting signal. Therefore, the pressure P and H2O concentration χ H 2 O can be obtained by combining Equations (12) and (13). The calculated results and uncertainty analysis of the gas temperature T and pressure P are shown in Table 5.
We then took the measurement results from 50 repeated experiments under the same experimental conditions to compare them with the truth values, as shown in Figure 5.
The relative standard deviation (RSD) was used to represent the calculation error of key parameters:
RSD = i = 1 n ( v i v b ) 2 v b n 1 × 100 %  
where vi is the calculated value, vb the truth value, and N the number of data points.
It can be seen that while the MFW-LM algorithm resulted in a slightly lower NRMSD of the signal line profile, it reduced the relative error of the gas temperature and pressure calculated from the fitting result by 42.9% and 61.8%, respectively. The RSDs of the temperature and pressure of the 50 repeated experiments calculated by the LM and the MFW-LM algorithms were reduced from 2.4% to 1.1% and from 3.4% to 1.7%, respectively; that is, the measurement uncertainties of temperature and pressure calculated by the MFW-LM algorithm were dramatically reduced by 53.3% and 43.5%, respectively, compared with that calculated by the LM algorithm.

4.2. Reconstruction of Laser-Beam Profile

We used the MFW-LM algorithm to reconstruct a laser-beam profile from heavily distorted observations to capture more optical signal details lost in the unsaturated laser-beam profile obtained with a neutral density filter or a beam splitter in front of the image sensors.
Laser-beam profile is usually measured by image sensors to improve detection efficiency. At present, the analog-to-digital converter of an image sensor is mostly 8- or 10-bit, which means that the dynamic range (DNR) of a sensor is only 256 or 1024. In order to avoid image sensor saturation, the usual practice is to pick off a small fraction of the beam with a neutral density filter or a beam splitter in front of the image sensors, resulting in the serious loss of laser-beam profile details and the inaccurate reflection of laser-beam spatial characteristics. For example, due to the pixel resolution of the image sensor, only a few intensity points can be resolved within the dramatically changing range of the laser-beam profile, and the analysis of the laser-beam profile based on a small amount of data is considered to be unreliable. If we do not do this, even if it causes slight saturation on the laser-beam profile, the MFW-LM algorithm has been simulated and verified to accurately reconstruct the laser-beam profile, so that more intensity points of the laser-beam profile can be distinguished, giving us a chance to mine hidden information (as shown in Figure 6).
When measuring the laser-beam profile, we increased the incident-laser intensity (or the integration time) beyond the DNR but below the damage threshold of the image sensor to reflect the low intensity in details, which inevitably results in saturation and distortion. We then completed a high-precision reconstruction of the laser-beam profile by using the MFW-LM algorithm, which was proved to solve these problems.
The experimental setup was part of the research on mid-infrared laser-transmission characteristics in hollow waveguides (HWGs). The laser beam emitted from an interband cascade laser was collimated with an aspheric lens and coupled into a HWG by an off-axis parabolic mirror. An infrared camera (FLIR ThermoVision A40, Wilsonville, OR, USA) was used to measure the laser-beam profile near the waist.
To ensure that the laser-beam profile in the experiment could be described by a Gaussian function, we obtained the intact laser-beam profile with a neutral density filter or a beam splitter in front of the infrared camera and described it with two- and three-dimensional images, as shown in Figure 7. In our numerous verification experiments, fitting degrees of the laser-beam profile and Gaussian function were all greater than 95.3%. Therefore, a Gaussian function was used to fit the laser-beam profile.
We increased the DNR of the infrared camera equivalently by reducing the attenuation of laser intensity via an attenuation device and used the proposed MFW-LM algorithm to fit the observations, as shown in Figure 8. The dotted solid curve in the upper panel of Figure 8 is the raw data and the dashed blue curve is the curve fitted by the MFW-LM algorithm. The parameters of the membership function, following Equation (1), were set as in Table 6.
The bottom panel of Figure 8 shows the fitting residuals. The data in the areas marked by the red rectangles have the highest fidelity. The relative NRMSD of the MFW-LM algorithm in the red rectangular areas was as low as 4.1% [Equation (7)].
The laser-beam profiles measured and reconstructed in the case in which the DNR of the infrared camera was increased equivalently were compared using a neutral density filter or a beam splitter in front of the image sensors for signal measuring, as shown in Figure 7. The larger points represent the data with high quality and credibility, while the smaller points indicate that the data had low quality in the purple area. From Figure 6, we note the following clarifications:
  • After reconstructing the heavily distorted laser-beam profiles, the detected laser intensity at the edge of the spot was closer to 0, while the detected laser intensity in other areas was significantly increased, resulting in a significant improvement of the data’s quality.
  • The number of high-quality points used to study the laser-beam profile increased from 5 (larger points on the black fitted curve) to 23 (larger points on the red fitted curve), making the detail resolution of the laser-beam profile study significantly improved by 360% and the fitting results more accurate, which can provide more extracted information for the study of the spatial characteristics of the laser beam.
As the DNR of the infrared camera increased from 256 to 415 with the proposed MFW-LM algorithm, the detail resolution of the laser-beam profiles increased by an amazing 360%. Moreover, the MFW-LW algorithm ensured that the deviation between the fitting result and the raw data in the most reliable region was as low as 4.1%. Therefore, the MFW-LM algorithm achieved high-precision measurement and high dynamic-range imaging (HDRI) to capture optical signal details.

5. Conclusions

In the work reported in this paper, we devised a membership function from fuzzy logic for the first time to evaluate the fidelity of optical sensing. The membership function was further used as a weighting function for the Levenberg–Marquardt algorithm. We verified the robustness and effectiveness of the proposed MFW-LM algorithm through simulation and practical sensing applications. The MFW-LM algorithm dramatically improved the NRMSD by 66.0%, more than the OE-LM algorithm for distorted optical sensing. We leveraged the great advantages of the MFW-LM algorithm in optical sensing under expected mathematical model constraints by reducing the effect of outliers and distorted signals: (1) the measurement uncertainty of temperature and pressure calculated by the molecular spectral line modeling was reduced dramatically, by 53.3% and 43.5%, respectively, compared with the LM algorithm; (2) the detailed resolution of the laser-beam profiles increased by an amazing 360% by reconstructing the laser-beam profile with the method, achieving HDRI to capture optical signal details. Therefore, the proposed method is suitable, particularly for in situ and online sensing under expected mathematical model constraints, for cases in which small datasets cannot imply a normal distribution and the deletion of any outliers and distortion would not be practical. The MFW-LM algorithm provides a useful tool for optical processing from outliers and distorted signal and has great potential for processing optical signals without depending on the quality of the measured signal.

Author Contributions

This work was conducted by S.M., Z.D., L.Y., S.W., R.H., and X.W. contributed to the experiment and data processing.

Funding

This work was supported by the specially funded program on National Key Scientific Instruments and Equipment Development of China (2012YQ06016501).

Conflicts of Interest

The authors declare no conflict of interest. The founding sponsors had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, and in the decision to publish the results.

References

  1. Barajas, L.G.; Xiao, G. Curve Fitting for Signal Estimation, Prediction, and Parametrization. U.S. Patent 7,324,924, 29 January 2008. [Google Scholar]
  2. Ma, X.K.; Zou, B. Application of piece-wise curve fitting to post-processing of synchronous distances. Tech. Acoust. 2004, 3, 159–162. [Google Scholar]
  3. Donald, S.; Maddala, G.S. 24 Identifying Outliers and influential Observations in Econometric Models. In Handbook of Statistics; Elsevier: Amsterdam, The Netherlands, 1993; Volume 11, pp. 663–701. [Google Scholar]
  4. Ord, K. Outliers in Statistical Data. Int. J. Forecast. 1996, 12, 175–176. [Google Scholar] [CrossRef]
  5. Little, J.A. Comparison of Curve Fitting Models for Ligand Binding Assays. Chromatographia 2004, 59, S177–S181. [Google Scholar] [CrossRef]
  6. Motulsky, H.; Christopoulos, A. Fitting Models to biological Data Using Linear and Nonlinear Regression: A Practical Guide to Curve Fitting; Oxford University Press: Oxford, UK, 2004. [Google Scholar]
  7. Salkind, N.J. Encyclopedia of Research Design; Sage Publications Ltd.: Thousand Oaks, CA, USA, 2010; Volume 135, pp. 105–106. [Google Scholar]
  8. Arlinghaus, S. Practical Handbook of Curve Fitting; CRC Press: Boca Raton, FL, USA, 1994; pp. 13–60. [Google Scholar]
  9. Brakhage, K.-H. Analytical investigations for the design of fast approximation methods for fitting curves and surfaces to scattered data. Math. Comput. Simul. 2018, 147, 27–39. [Google Scholar] [CrossRef]
  10. Gray, R.A.L.; Docherty, P.D.; Fisk, L.M.; Murray, R. A modified approach to objective surface generation within the Gauss-Newton parameter identification to ignore outlier data points. Biomed. Signal Process. Control 2016, 30, 162–169. [Google Scholar] [CrossRef]
  11. Glynn, J.E. Numerical Recipes: The Art of Scientific Computing; Cambridge University Press: New York, NY, USA, 1989; Volume 15, pp. 1199–1200. [Google Scholar]
  12. Levenberg, K. A Method for the Solution of Certain Problems in Least Squares. Q. Appl. Math. 1944, 2, 164–168. [Google Scholar] [CrossRef]
  13. Marquardt, D.W. An algorithm for least-squares estimation of nonlinear parameters. J. Soc. Ind. Appl. Math. 1963, 11, 431–441. [Google Scholar] [CrossRef]
  14. Asadi, S.; Hadavandi, E.; Mehmanpazir, F.; Nakhostin, M.M. Hybridization of evolutionary Levenberg–Marquardt neural networks and data pre-processing for stock market prediction. Knowl.-Based Syst. 2012, 35, 245–258. [Google Scholar] [CrossRef]
  15. Nawi, N.M.; Khan, A.; Rehman, M.Z. A New Levenberg Marquardt based Back Propagation Algorithm Trained with Cuckoo Search. Procedia Technol. 2013, 11, 18–23. [Google Scholar] [CrossRef]
  16. Zhang, Y.; Li, D.; Fu, X.; Bi, W. An improved Levenberg–Marquardt algorithm for extracting the features of Brillouin scattering spectrum. Meas. Sci. Technol. 2013, 24, 015204. [Google Scholar] [CrossRef]
  17. Shadrokh, A.; Pazira, H. A new statistic for detecting outliers in exponential case. Aust. J. Basic Appl. Sci. 2010, 32, 573–583. [Google Scholar]
  18. Stefansky, W. Rejecting Outliers in Factorial Designs. Technometrics 1972, 14, 469–479. [Google Scholar] [CrossRef]
  19. Mcbane, G.C. Programs to Compute Distribution Functions and Critical Values for Extreme Value Ratios for Outlier Detection. J. Stat. Softw. 2006, 16, 459–473. [Google Scholar] [CrossRef]
  20. Ross, S.M. Peirce’s criterion for the elimination of suspect experimental data. J. Eng. Technol. 2003, 20, 38–41. [Google Scholar]
  21. Joseph, D.; Collins, S. Modeling, calibration, and correction of nonlinear illumination-dependent fixed pattern noise in logarithmic CMOS image sensors. IEEE Trans. Instrum. Meas. 2002, 51, 996–1001. [Google Scholar] [CrossRef]
  22. Shafie, S.; Kawahito, S.; Halin, I.A.; Wan, Z.W.H. Non-Linearity in Wide Dynamic Range CMOS Image Sensors Utilizing a Partial Charge Transfer Technique. Sensors 2009, 9, 9452–9467. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  23. Soman, M.; Stefanov, K.; Weatherill, D.; Holland, A.; Gow, J.; Leese, M. Non-linear responsivity characterisation of a CMOS Active Pixel Sensor for high resolution imaging of the Jovian system. J. Instrum. 2015, 10, C02012. [Google Scholar] [CrossRef]
  24. Xiong, B.; Du, Z.; Li, J. Modulation index optimization for optical fringe suppression in wavelength modulation spectroscopy. Rev. Sci. Instrum. 2015, 86, 300. [Google Scholar] [CrossRef] [PubMed]
  25. Li, J.; Luo, G.; Du, Z.; Ma, Y. Hollow Waveguide Enhanced Dimethyl Sulfide Sensor Based on a 3.3 μm Interband Cascade Laser. Sens. Actuators B Chem. 2017, 3550–3557. [Google Scholar] [CrossRef]
  26. Levkov, C.; Mihov, G.; Ivanov, R.; Daskalov, I.; Christov, I.; Dotsinsky, I. Removal of power-line interference from the ECG: A review of the subtraction procedure. Biomed. Eng. Online 2005, 4, 50. [Google Scholar] [CrossRef] [PubMed]
  27. Zadeh, L.A. Fuzzy sets. Inf. Control 1965, 8, 338–353. [Google Scholar] [CrossRef] [Green Version]
  28. Ren, H.J. About the Accuracy of the Electric Instrument Reading. J. Mianyang Normal Univ. 2009, 39–42. [Google Scholar]
  29. Li, S.; Lu, R.; Zhang, L.; Peng, Y. Image Processing Algorithms For Deep-Space Autonomous Optical Navigation. J. Navig. 2013, 66, 605–623. [Google Scholar] [CrossRef] [Green Version]
  30. Feng, T.; Edström, P.; Gulliksson, M. Levenberg–Marquardt methods for parameter estimation problems in the radiative transfer equation. Inverse Probl. 2007, 23, 879. [Google Scholar] [CrossRef]
  31. Aigner, M. Distance regression by Gauss–Newton-type methods and iteratively re-weighted least-squares. Computing 2009, 86, 73–87. [Google Scholar] [CrossRef]
  32. Patimisco, P.; Spagnolo, V.; Vitiello, M.S.; Tredicucci, A.; Scamarcio, G.; Bledt, C.M.; Harrington, J.A. Coupling external cavity mid-IR quantum cascade lasers with low loss hollow metallic/dielectric waveguides. Appl. Phys. B Lasers Opt. 2012, 108, 255–260. [Google Scholar] [CrossRef]
  33. Patimisco, P.; Spagnolo, V.; Vitiello, M.S.; Scamarcio, G.; Bledt, C.M.; Harrington, J.A. Low-Loss Hollow Waveguide Fibers for Mid-Infrared Quantum Cascade Laser Sensing Applications. Sensors 2013, 13, 1329–1340. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  34. Bledt, C.M.; Harrington, J.A.; Kriesel, J.M. Loss and modal properties of Ag/AgI hollow glass waveguides. Appl. Opt. 2012, 51, 3114–3119. [Google Scholar] [CrossRef] [PubMed]
  35. Patimisco, P.; Sampaolo, A.; Mihai, L.; Giglio, M.; Kriesel, J.; Sporea, D.; Scamarcio, G.; Tittel, F.K.; Spagnolo, V. Low-Loss Coupling of Quantum Cascade Lasers into Hollow-Core Waveguides with Single-Mode Output in the 3.7–7.6 m Spectral Range. Sensors 2016, 16, 533. [Google Scholar] [CrossRef] [PubMed]
  36. Du, Z.; Luo, G.; An, Y.; Li, J. Dynamic spectral characteristics measurement of DFB interband cascade laser under injection current tuning. Appl. Phys. Lett. 2016, 109, 19140. [Google Scholar] [CrossRef]
  37. Du, Z.; Li, J.; Gao, H.; Luo, G.; Cao, X.; Ma, Y. Ultrahigh-resolution spectroscopy for methyl mercaptan at the ν 2-band by a distributed feedback interband cascade laser. J. Quant. Spectrosc. Radiat. Transf. 2017, 196, 123–129. [Google Scholar] [CrossRef]
  38. Li, J.; Du, Z.; Ma, Y.; Liu, J. Indoor carbon dioxide monitoring with diode laser absorption at 2 μm. In Proceedings of the International Society for Optics and Photonics, Shanghai, China, 28 June–2 July 2015. [Google Scholar]
  39. Du, Z.; Yan, Y.; Li, J.; Zhang, S.; Yang, X.; Xiao, Y. In situ, multiparameter optical sensor for monitoring the selective catalytic reduction process of diesel engines. Sens. Actuators B Chem. 2018, 267, 255–264. [Google Scholar] [CrossRef]
  40. Kluczynski, P.; Lindberg, Å.M.; Axner, O. Wavelength modulation diode laser absorption signals from Doppler broadened absorption profiles. J. Quant. Spectrosc. Radiat. Transf. 2004, 83, 345–360. [Google Scholar] [CrossRef]
  41. Li, J.; Yang, S.; Du, Z.; Gao, H.; Wei, Y. Resolving multiple combustion parameters from a single transition using degraded deconvolution of Voigt lineshape. Infrared Phys. Technol. 2018, 92, 6–12. [Google Scholar] [CrossRef]
  42. Rothman, L.S.; Gamache, R.R.; Goldman, A.; Brown, L.R.; Toth, R.A.; Pickett, H.M.; Poynter, R.L.; Flaud, J.M.; Camypeyret, C.; Barbe, A. The HITRAN database: 1986 edition. Appl. Opt. 1987, 26, 4058–4097. [Google Scholar] [CrossRef] [PubMed]
Figure 1. (a) Typical responsivity of a photosensor; (b) assignment of a membership function. ymax, ymin, y1 and y2 are the maximum, minimum, and two critical observations, respectively. The two small panels in (a) are partial enlargements at the responsivity’s ends.
Figure 1. (a) Typical responsivity of a photosensor; (b) assignment of a membership function. ymax, ymin, y1 and y2 are the maximum, minimum, and two critical observations, respectively. The two small panels in (a) are partial enlargements at the responsivity’s ends.
Sensors 18 03762 g001
Figure 2. Flowchart of membership function-weighted Levenberg–Marquardt (MFW-LM) fitting process.
Figure 2. Flowchart of membership function-weighted Levenberg–Marquardt (MFW-LM) fitting process.
Sensors 18 03762 g002
Figure 3. Demonstration of MFW-LM algorithm. (a) Simulated laser-beam profile with Gaussian distribution; (b) random noise; (c) illustration of various response curves; (d) simulated signals corresponding to various response curves in c and random noise in b; (e) comparison between original (a) and fitted values by the MFW- and outliers-excluded (OE)-LM algorithms with response curve I in c; (f) noise-tolerance comparison of MFW- and OE-LM algorithms with response curve I in c; (g) comparison of fitted results with various measurements in d; (h) non-linearity tolerance of MFW-LM algorithm. MFW-LM denotes membership function-weighted Levenberg–Marquardt algorithm; OE-LM denotes outliers-excluded Levenberg-Marquardt algorithm; NRMSD denotes normalized root-mean-square deviation.
Figure 3. Demonstration of MFW-LM algorithm. (a) Simulated laser-beam profile with Gaussian distribution; (b) random noise; (c) illustration of various response curves; (d) simulated signals corresponding to various response curves in c and random noise in b; (e) comparison between original (a) and fitted values by the MFW- and outliers-excluded (OE)-LM algorithms with response curve I in c; (f) noise-tolerance comparison of MFW- and OE-LM algorithms with response curve I in c; (g) comparison of fitted results with various measurements in d; (h) non-linearity tolerance of MFW-LM algorithm. MFW-LM denotes membership function-weighted Levenberg–Marquardt algorithm; OE-LM denotes outliers-excluded Levenberg-Marquardt algorithm; NRMSD denotes normalized root-mean-square deviation.
Sensors 18 03762 g003
Figure 4. The raw molecular absorption lineshape of H2O and the fitting results of LM and MFW-LM algorithms. The two absorption peaks 1, 2 analyzed are shown in the figure.
Figure 4. The raw molecular absorption lineshape of H2O and the fitting results of LM and MFW-LM algorithms. The two absorption peaks 1, 2 analyzed are shown in the figure.
Sensors 18 03762 g004
Figure 5. Comparison of the key parameters obtained by LM and MFW-LM algorithms with truth values in 50 repeated experiments. Orange and purple horizontal lines are truth values of gas temperature (350 K) and pressure (1.18 atm), respectively.
Figure 5. Comparison of the key parameters obtained by LM and MFW-LM algorithms with truth values in 50 repeated experiments. Orange and purple horizontal lines are truth values of gas temperature (350 K) and pressure (1.18 atm), respectively.
Sensors 18 03762 g005
Figure 6. Comparison of the detail resolution of laser-beam profiles obtained by reducing laser intensity with usual means and reconstructing saturated laser-beam profiles with the MFW-LM algorithm, which are characterized by black and red curves, respectively. Data falling into the purple area have very low quality, and are represented by smaller points than those used to represent high-quality data. The solid curves represent raw signals and the dashed curves represent fitted signals.
Figure 6. Comparison of the detail resolution of laser-beam profiles obtained by reducing laser intensity with usual means and reconstructing saturated laser-beam profiles with the MFW-LM algorithm, which are characterized by black and red curves, respectively. Data falling into the purple area have very low quality, and are represented by smaller points than those used to represent high-quality data. The solid curves represent raw signals and the dashed curves represent fitted signals.
Sensors 18 03762 g006
Figure 7. (a) Experimental curve of laser-beam profile; (b) three-dimensional laser-beam profile; (c) two-dimensional laser-beam profile; (d) HE11 model.
Figure 7. (a) Experimental curve of laser-beam profile; (b) three-dimensional laser-beam profile; (c) two-dimensional laser-beam profile; (d) HE11 model.
Sensors 18 03762 g007
Figure 8. Laser-beam profile reconstructed using the MFW-LM algorithm. Data points with different colored dotted solid curves represent the fact that they were given different weights according to the corresponding membership function; dashed blue line is the fitted curve; the bottom panel shows fitting residuals and the most valuable data marked by red rectangles.
Figure 8. Laser-beam profile reconstructed using the MFW-LM algorithm. Data points with different colored dotted solid curves represent the fact that they were given different weights according to the corresponding membership function; dashed blue line is the fitted curve; the bottom panel shows fitting residuals and the most valuable data marked by red rectangles.
Sensors 18 03762 g008
Table 1. Parameters of the Gaussian function in Equation (5).
Table 1. Parameters of the Gaussian function in Equation (5).
I0ηwxc
−2.70 × 10−52307.404.45−5.26 × 10−18
Table 2. Membership function parameters for different measured laser beams.
Table 2. Membership function parameters for different measured laser beams.
ymin (a.u.)y1 (a.u.)y2 (a.u.)ymax (a.u.)
I16150150225
II3216216324
III45163163245
IV1203203305
Table 3. The polynomial coefficients of Equation (11).
Table 3. The polynomial coefficients of Equation (11).
Polynomial Coefficient0.227 < R < 0.5070.507 < R < 2.2372.237 < R < 7.3357.335 < R < 62.224
k12285.773721078.16869632.97533417.64245
k2−10,756.59361−1126.15794−129.37278−12.094
k331,321.80162908.9728627.124340.4159
k4−44,842.03108−357.95439−2.90883−0.00689
k525,134.0119953.923650.12254.23798 × 10−5
Table 4. Membership function parameters.
Table 4. Membership function parameters.
ymin (a.u.)y1 (a.u.)y2 (a.u.)ymax (a.u.)
0.01.41.42.1
Table 5. Comparison of fitting results and measurement uncertainty of gas temperature and pressure from using LM and MFW-LM algorithms.
Table 5. Comparison of fitting results and measurement uncertainty of gas temperature and pressure from using LM and MFW-LM algorithms.
AlgorithmNRMSD (%)TemperaturePressure
Value 1 (K)Value 2 (K)Relative ErrorValue 1 (atm)Value 2 (atm)Relative Error
MFW-LM 1.0350.00347.210.8%1.181.161.4%
LM 0.9350.00341.022.6%1.181.106.8%
1 Value is the truth value. 2 Value is the calculated value.
Table 6. Membership-function parameters.
Table 6. Membership-function parameters.
ymin (a.u.)y1 (a.u.)y2 (a.u.)ymax (a.u.)
02200255

Share and Cite

MDPI and ACS Style

Meng, S.; Du, Z.; Yuan, L.; Wang, S.; Han, R.; Wang, X. Membership Function-Weighted Non-Linear Fitting Method for Optical-Sensing Modeling and Reconstruction. Sensors 2018, 18, 3762. https://doi.org/10.3390/s18113762

AMA Style

Meng S, Du Z, Yuan L, Wang S, Han R, Wang X. Membership Function-Weighted Non-Linear Fitting Method for Optical-Sensing Modeling and Reconstruction. Sensors. 2018; 18(11):3762. https://doi.org/10.3390/s18113762

Chicago/Turabian Style

Meng, Shuo, Zhenhui Du, Liming Yuan, Shuanke Wang, Ruiyan Han, and Xiaoyu Wang. 2018. "Membership Function-Weighted Non-Linear Fitting Method for Optical-Sensing Modeling and Reconstruction" Sensors 18, no. 11: 3762. https://doi.org/10.3390/s18113762

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop