Improves LMS Algorithm to Detect Heavy Metal Ion Solution
author: Susan
2022-01-04
Challenge
When the micro spectrometer used to detect high-concentration of trace heavy metal ions, the absorption spectra is easy to be interfered by environment and spectrometer noise. The weak absorbance signal annihilation affects detect result accuracy and repeatability.
How to reduce the noise and SNR by a new LMS algorithm that affects weak reflectance signals, the new LMS algorithm improved to reduce noise value and signal to noise ratio.
It provides a new method to detect high concentration absorption spectra with low SNR micro spectrometer.
Principle and Improvement of LMS algorithm
The LMS algorithm is based on the minimum mean square error criterion and uses a gradient descent method to achieve a denoising algorithm that minimizes the loss function.
Improved LMS algorithm
............(1)
Among them,
, represents the signal vector input by the adaptive filter corresponding to the n position;
, represents the filter weight coefficient vector in the state of the n position;
, represents the order of the improved LMS filter, [] represents rounding down, and L>1.
.............(2)
Use the sigmoid function to constrain the amount of deviation caused by the noise signal to-0.5 to 0.5, as shown in Figure 1, which reduces the algorithmic modulus to a certain extent.
The type is sensitive to noise signals. At the same time, when the weight update iteration is performed, the weight change of the weight coefficient vector of the adaptive filter will not be in an oscillating state, which is conducive to the rapid convergence of the weight coefficient.
When the micro spectrometer used to detect high-concentration of trace heavy metal ions, the absorption spectra is easy to be interfered by environment and spectrometer noise. The weak absorbance signal annihilation affects detect result accuracy and repeatability.
How to reduce the noise and SNR by a new LMS algorithm that affects weak reflectance signals, the new LMS algorithm improved to reduce noise value and signal to noise ratio.
It provides a new method to detect high concentration absorption spectra with low SNR micro spectrometer.
Principle and Improvement of LMS algorithm
The LMS algorithm is based on the minimum mean square error criterion and uses a gradient descent method to achieve a denoising algorithm that minimizes the loss function.
Improved LMS algorithm
a. The filter structure is as follows (1):
............(1)
, represents the signal vector input by the adaptive filter corresponding to the n position;
, represents the filter weight coefficient vector in the state of the n position;
, represents the order of the improved LMS filter, [] represents rounding down, and L>1.b. The error calculation module is usually expressed by formula (2):
.............(2)The type is sensitive to noise signals. At the same time, when the weight update iteration is performed, the weight change of the weight coefficient vector of the adaptive filter will not be in an oscillating state, which is conducive to the rapid convergence of the weight coefficient.
Fig. 1 Error constraint
c. Substitute equation (2) into the minimum mean square error function established by the small batch stochastic gradient descent method, and describe it with equation (3):
...............(3)
Optosky ATP2000P portable miniature spectrometer was selected for the experiment. The light source was a deuterium halogen lamp ATG1020H, and the cuvette was a quartz cuvette ATP0080, figure 3.

...............(3)
Fig.2 The relationship between error and loss function
Test ResultsOptosky ATP2000P portable miniature spectrometer was selected for the experiment. The light source was a deuterium halogen lamp ATG1020H, and the cuvette was a quartz cuvette ATP0080, figure 3.

Fig. 3 Experiment System
With Zinc hydrometallurgy as the background, mixed standard solutions of Zn2+, Cu2+, Co2+, and Ni2+ concentrations were 16g·L-1, 1.4mg·L-1, 0.8mg·L-1, 0.3mg·L-1, respectively. The sampling integration time of the micro-spectrometer is set to 3ms, and the sampling integration interval is 500ms. Under the same experimental conditions, the spectral signal of this concentration was repeatedly collected 4000 times. Figure 4(a) shows the absorption spectrum signal obtained by one sampling. Figure 4(b) is the absorption spectrum signal statistically obtained according to the central limit theorem, which is used here as the reference absorption spectrum signal.


Fig. 4 Absorption spectral signal of mixed solution (a): Measured signal (b): Reference signal

Fig. 5 The denoising results of the simulation data the normal LMS algorithm Fig. 6 The denoising results of the actually measured data the improved LMS algorithm

Fig. 5 The denoising results of the simulation data the normal LMS algorithm Fig. 6 The denoising results of the actually measured data the improved LMS algorithm
This method is used to de-noise the measured absorbance spectrum signal of the micro- spectrometer. The de-noising effect is shown in Figure 6. The improved LMS algorithm effectively eliminates the interference of strong noise, and also effectively retains the high concentration ratio in the background. The signal characteristics of the original absorption spectra of trace heavy metal ions.
Conclusion
In the process of processing absorption spectrum signals with low signal-to-noise ratio, the proposed method is superior to the standard LMS algorithm, SG denoising algorithm, wavelet soft threshold algorithm, and wavelet hard threshold algorithm in terms of signal-to-noise ratio and mean square error. Effectively remove the influence of irrelevant noise, retain some important real details in the spectral signal, and avoid the problem of subjective judgment selection of key detail parameters, providing a new solution for the analysis of spectral signals under low signal-to-noise ratio Ideas.
Related Products

ATP2000P Light source ATG1020H Optical fiber UV-VIS Cuvette Holder ATP0080
Related Articles
Conclusion
In the process of processing absorption spectrum signals with low signal-to-noise ratio, the proposed method is superior to the standard LMS algorithm, SG denoising algorithm, wavelet soft threshold algorithm, and wavelet hard threshold algorithm in terms of signal-to-noise ratio and mean square error. Effectively remove the influence of irrelevant noise, retain some important real details in the spectral signal, and avoid the problem of subjective judgment selection of key detail parameters, providing a new solution for the analysis of spectral signals under low signal-to-noise ratio Ideas.
Related Products
ATP2000P Light source ATG1020H Optical fiber UV-VIS Cuvette Holder ATP0080
Related Articles
- “Spectral Signal Denoising Algorithm Based on Improved LMS”
- “Spectroscopy and Spectral Analysis”
- “Spectrochimica Acta Part A Molecular & Biomolecular Spectroscopy”
Measuring Solution Absorbance Comparison by UV-VIS Spectrometer Water Pollution Warning How to Detect COD in the Field Environment by UV Spectroscopy
Reflection Spectrum Analysis Measurement Solution
How to Detect Water Chroma by Fiber Optics Sensor
Related Article

The ATP7810 is a wide-band, high-resolution infrared grating spectrometer covering up to 0.9–5 μm. Featuring a motorized rotating grating, multiple detector options (InGaAs/MCT), and flexible interfaces (SMA905 or free space, USB/UART control), it delivers high SNR and stability for absorption/reflection/transmission spectroscopy, laser wavelength testing, and fiber optic sensing.
New Product Recommendation | ATP7810 Ultra-Wide Range Infrared Spectrometer Series
This study uses the ATP5200P UV-Vis spectrometer to investigate xanthate adsorption on chalcopyrite surfaces. By analyzing absorbance at 300 nm under controlled pH and temperature, the method optimizes flotation conditions for copper recovery, enabling real-time, sensitive detection of adsorption mechanisms in non-ferrous mineral processing.
Using the ATP5200P Spectrometer to Unravel Xanthate Adsorption and Separation Mechanisms
ATP1030 is an ultra‑compact, high‑resolution spectrometer covering 190–1100 nm. With a 1024‑pixel CMOS detector, adjustable integration time down to 1 ms, and USB‑powered design, it delivers reliable performance for applications like online water analysis, color measurement, handheld instruments, and Raman spectroscopy.
Product Recommendation | ATP1030 mini spectrometer Spectrometer
Vis-NIR transmission spectroscopy enables non-destructive identification of infertile duck eggs before incubation, achieving >95% accuracy. By detecting spectral fingerprints (e.g., 836 nm peak for fertile eggs), this method reduces energy waste and improves hatch rates, offering a low-cost, high-throughput solution for modern poultry farming.
Application case | How Spectral Technology is Transforming Duck Egg Farming