Original Research
Frontiers in Physics ·
Volume 14 - 2026 | https://doi.org/10.3389/fphy.2026.1950644
Two-dimensional dynamic correlation feature enhancement and exceedance discrimination of near-infrared and ultraviolet-visible spectra for nitrogen-containing farmland leachate
- Chenxi Li1,2
- Siheng Lu1,2
- Yize Zhang1,2
- Dongjie Zhao1,2
- Si Yang3*corresponding author
- Rong Liu1
- Wenliang Chen1
- Jia Zhai4*corresponding author
- 1State Key Laboratory of Precision Measuring Technology and Instruments, Tianjin University, Tianjin, China
- 2School of Precision Instrument and Optoelectronics Engineering, Tianjin University, Tianjin, China
- 3College of Electronic Information and Automation, Tianjin University of Science and Technology, Tianjin, China
- 4Medical College of Tianjin University, Tianjin University, Tianjin, China
Abstract
To address the difficulty in rapidly and accurately identifying excessive nitrate nitrogen and ammonium nitrogen in nitrogen-containing farmland leachate against the complex background of soil leachate, near-infrared (NIR) and ultraviolet-visible (UV-Vis) spectra were acquired, and a nitrogen exceedance discrimination method based on two-trace two-dimensional correlation spectroscopy (2T2D-COS) and N-way partial least squares discriminant analysis (NPLS-DA) was developed. The results showed that 2T2D-COS effectively revealed weak spectral features and their dynamic variation relationships that were difficult to distinguish in one-dimensional spectra of complex systems. For nitrate nitrogen, synchronous spectra achieved better modeling performance for both NIR and UV-Vis data, with test accuracies of 94.55% and 88.46%, respectively. For ammonium nitrogen, asynchronous spectra performed slightly better in NIR, whereas synchronous spectra still performed better in UV-Vis, with both test accuracies reaching 87.50%. Overall, NIR spectroscopy showed better stability and greater robustness to background interference than UV-Vis. These results provide a new methodological reference for the rapid exceedance discrimination of nitrogen-containing farmland leachate.
Keywords
1 Introduction
Nitrogen is a critical macronutrient that underpins crop growth, development, and yield improvement; however, the excessive application of nitrogen fertilizers in agricultural fields has posed substantial environmental risks [1]. Nitrogen not taken up and assimilated by crops can enter farmland leachate in forms such as nitrate (NO3 −-N) and ammonium (NH4 +-N) under the driving forces of rainfall, irrigation, and soil water migration. This unutilized nitrogen subsequently translocates to groundwater or surface water bodies, resulting in aquatic eutrophication and creating potential hazards to drinking water safety [2–5]. Therefore, the development of rapid, accurate, and non-destructive detection methods for key indicators including nitrate and ammonium nitrogen in farmland nitrogen leachate is of paramount significance for agricultural pollution monitoring and water environment risk early warning.
In recent years, molecular spectroscopy techniques have demonstrated promising application prospects in the field of non-destructive detection due to their unique advantages, including rapid detection speed, no requirement for complex sample pretreatment, and the capability to perform non-destructive analysis and real-time monitoring. In particular, near-infrared (NIR) spectroscopy and ultraviolet-visible (UV-Vis) spectroscopy can reflect the compositional changes of the system from two distinct dimensions: the vibrational information of hydrogen-containing groups [6, 7] and the intrinsic absorption characteristics of target components [8, 9], respectively, laying a solid technical foundation for the identification of trace components in complex liquid samples. Multi-resonance photoacoustic spectroscopy (M-PAS) adopts spherical resonant cavities with multiple high-Q radial eigenmodes combined with wavelength modulation frequency division multiplexing, which enables synchronous high-sensitivity quantification of mixed gaseous analytes including H2O, CO2 and CH4. Optimized via Allan-Werle deviation analysis, this gas-dedicated system achieves detection limits of 1.17 ppm, 83 ppm and 1.76 ppm for the three target gases respectively, with normalized noise equivalent absorption (NNEA) coefficients as low as 5.46 × 10−10 cm-1 W/√Hz, making it widely applicable to atmospheric and industrial gaseous monitoring. Although conventional photoacoustic spectroscopy (PAS) has been preliminarily explored for liquid-phase detection in simple aqueous matrices in prior reports, most liquid PAS schemes rely on customized small-volume resonant cells and independent liquid sampling modules, which differ fundamentally from the flowing gas-based spherical multi-resonance framework of M-PAS. The existing M-PAS optical and gas-circulation setup lacks matched liquid sampling accessories and anti-interference correction strategies for complex liquid matrices; hence it cannot effectively separate and discriminate dissolved nitrate and ammonium nitrogen coexisting in turbid soil leachate with abundant humus and particulate interferences [10, 11].
However, farmland leachate is a typical complex matrix. In addition to the target nitrogen species, it contains humic substances, inorganic salts, particulate matter, and other unknown components. These background interferences are prone to causing overlapping, masking, and shifting of the spectral signals of target analytes, thereby significantly increasing the difficulty of spectral interpretation. Furthermore, dynamic disturbances such as variations in concentration and sample matrix can induce changes in absorption intensity and peak position shifts, whose magnitudes may even exceed the spectral responses elicited by the target analytes themselves [12, 13]. These challenges collectively render traditional methods based on one-dimensional spectral feature extraction incapable of accurately separating and identifying trace component information.
Two-dimensional Correlation Spectroscopy (2D-COS) extends conventional one-dimensional spectra into a two-dimensional space, enabling the revelation of dynamic correlation relationships between spectral peaks and the effective resolution of complex features such as weak peaks, overlapping peaks, and shifted peaks. Consequently, it has become an indispensable tool for the spectral analysis of trace components in complex matrices [14, 15].
A study employed two-dimensional correlation Raman spectroscopy to investigate hydrogen bonding interactions in aqueous nitric acid solutions. They revealed the transformation behavior of HNO3-nH2O clusters with varying concentrations and enhanced the reliability of spectral peak assignment in nitric acid systems [16]. Another study applied 2D-COS to analyze the spatiotemporal dynamic variation patterns of water quality spectra, identified the abrupt change time points and spectral response sequences of parameters including Chemical Oxygen Demand (COD) and Total Nitrogen (TN), and provided a scientific basis for water quality monitoring and remediation [17].
In terms of qualitative and quantitative analysis of trace components, a study proposed a Baijiu quality evaluation method based on chemical reaction-perturbed two-dimensional correlation UV-Vis spectroscopy [18]. This method improved spectral resolution and achieved inter-sample difference discrimination in combination with the correlation coefficient algorithm. Furthermore, a study integrated temperature-perturbation-based 2D-COS slice spectra with N-way partial least squares discriminant analysis (NPLS-DA) to realize high-precision classification of adulterated milk from different brands [19].
Building on this foundation, two-trace two-dimensional correlation spectroscopy (2T2D-COS) can construct two-dimensional correlation spectra using only two single spectra, effectively capturing the differences between two one-dimensional spectra and offering the advantages of simplified experimental procedures and higher analytical efficiency [20].
A study combined 2T2D-COS with Least Squares Support Vector Machine (LS-SVM) and achieved highly accurate qualitative identification of melamine-adulterated milk from different brands [21]. Another study developed a K-Nearest Neighbor (KNN) algorithm model based on temperature-perturbed 2T2D-COS slice spectra, which yielded superior discrimination performance for adulterated olive oil compared to raw spectra [22]. In addition, a study employed 2T2D-COS to analyze the spectral variations of glucose samples under temperature and sugar concentration perturbations, successfully identified different perturbation sources, and established a high-precision prediction model [23].
These studies demonstrate that two-dimensional correlation spectroscopy techniques can effectively overcome the inherent challenges in one-dimensional spectral analysis, including difficult extraction of weak features, separation of overlapping peaks, and identification of dynamic disturbances, by capturing multidimensional information and dynamic variation characteristics, thereby providing crucial support for the qualitative and quantitative analysis of trace components in complex solution systems.
In summary, this study uses soil leachate to simulate farmland nitrogen leachate. Focusing on two typical pollution indicators, nitrate nitrogen and ammonium nitrogen, we collect bimodal NIR and UV-Vis spectral data, construct 2T2D-COS synchronous and asynchronous spectra based on optimal preprocessing, and establish a nitrogen excess identification model combined with N-way partial least squares discriminant analysis (NPLS-DA).
This study focuses on the following three key aspects: (1) the ability of two-dimensional correlation spectroscopy to reveal weak features and dynamic variation information in complex matrices; (2) the differential responses of nitrate nitrogen and ammonium nitrogen in synchronous and asynchronous spectra; (3) the complementary roles of bimodal NIR and UV-Vis spectroscopy in the excess identification of nitrogen in farmland leachate.
Unlike previous studies mainly focusing on food adulteration or relatively simple solution systems, this study applies 2T2D-COS to nitrogen exceedance discrimination in complex soil leachate matrices. The main contributions include the comparative evaluation of NIR and UV-Vis spectral responses, the analysis of synchronous and asynchronous correlation features for nitrate and ammonium nitrogen, and the direct use of two-dimensional correlation matrices for NPLS-DA modeling.
2 Experimental section
2.1 Sample preparation and classification criteria
To construct a simulated farmland nitrogen leachate system with complex background interference characteristics, three types of typical agricultural soils from vegetable fields, wheat fields, and corn fields were selected as matrix sources (Supplementary Table S1). After pretreatment, soil leachates were prepared from each soil type and spiked with nitrate or ammonium nitrogen standard solutions respectively to form simulated samples with different concentration gradients. The nitrate nitrogen stock solution was prepared at a concentration of 100 mg/L, and the ammonium nitrogen stock solution was prepared at 10 mg/L. In total, 183 nitrate nitrogen samples and 159 ammonium nitrogen samples were obtained for subsequent bimodal spectral acquisition and modeling analysis.
Sample classification was performed according to the water quality grading methods for nitrate nitrogen and ammonium nitrogen specified in the Standard for Groundwater Quality of China. Considering that this study focuses on whether the samples can be directly used as drinking water sources, Class I-III samples were classified into the normal group, and Class IV-V samples were classified into the excess group, thereby establishing a binary classification task.
2.2 Bimodal spectral acquisition
To characterize the spectral responses induced by changes in nitrogen concentration from different dimensions, near-infrared (NIR) and ultraviolet-visible (UV-Vis) spectra of the samples were collected simultaneously. NIR spectra were acquired using a Fourier transform near-infrared spectrometer (FTPA2000-260, ABB, Switzerland) over a wavelength range of 1,000–1700 nm with a spectral resolution of 2 nm. Thirty-two consecutive scans were averaged for each sample to improve the signal-to-noise ratio (SNR). Samples were placed in 1 mm quartz cuvettes, and absorption spectra were measured with air as the reference.
UV-Vis spectra were collected using a UV-Vis spectrophotometer (UV-2550, Shimadzu, Japan) over a scanning range of 190–500 nm with a spectral resolution of 1 nm and a medium scanning speed. Each sample was scanned in triplicate and the average spectrum was used for subsequent analysis. Samples were also placed in 1 mm quartz cuvettes, and absorption spectra were acquired using deionized water as the reference.
2.3 Spectral preprocessing
Random noise, baseline drift, and scattering effects caused by particulate matter in soil leachates in the raw spectra can compromise the representation of valid nitrogen signals, thereby impairing the subsequent construction of two-dimensional correlation spectra and the learning performance of discriminant models. Therefore, raw spectra were preprocessed prior to two-dimensional correlation analysis.
Seven preprocessing methods were applied to both NIR and UV-Vis spectra, including Savitzky-Golay (SG) smoothing, Multiplicative Scatter Correction (MSC), Standard Normal Variate (SNV), SG + MSC, SG + SNV, SG + First Derivative (FD), and SG + Second Derivative (SD). The optimal preprocessing method was selected based on the cross-validation accuracy of the Partial Least Squares Discriminant Analysis (PLS-DA) model.
SG reduces high-frequency random noise (Equation 1), FD reduces the influence of baseline variation and enhances local spectral slope and peak-shape changes (Equation 2). MSC corrects global multiplicative scattering offsets by a reference spectrum (Equations 3a,b), while SNV performs mild single-spectrum normalization without reference (Equation 4).
NIR nitrate samples rely on subtle water structural signals, so SG + FD removes drift to amplify weak features. UV nitrate has sharp high-SNR peaks, and MSC alone corrects turbidity interference without extra smoothing. Weak ammonium N-H signals suffer particle scattering; SG + MSC unifies spectral baselines. Ammonium UV has broad faint absorption, so SG + SNV delivers gentle normalization to avoid signal attenuation. Different dominant interferences across four datasets lead to differentiated optimal preprocessing pipelines.
Savitzky-Golay (SG) Equation 1 x λ ^: absorbance after smoothing at wavelength λ, x λ + j: raw absorbance at adjacent wavelengths, c j: predefined convolution weight of SG filter, 2 m + 1: width of the smoothing window.
x λ ^ = ∑ j = − m m c j · x λ + j (1)
First Derivative (FD) Equation 2
Discrete difference form for evenly sampled spectra. Δ λ: uniform wavelength sampling interval, Δ x λ: first-derivative spectrum used to eliminate linear baseline drift, d x d λ λ: discrete numerical first derivative of absorbance at wavelength λ, which removes linear baseline drift and resolves overlapping absorption bands.
d x d λ λ ≈ x λ + Δ λ − x λ − Δ λ 2 Δ λ (2)
Multiplicative Scatter Correction (MSC), Equation 3a and Equation 3b
Linear fitting between individual spectrum and the global average reference spectrum:
x i λ = a i + b i · x ¯ λ (3a)
Spectrum after scatter correction: x i λ: raw absorbance spectrum of the ith sample, x ¯ λ: average reference spectrum of all samples, a i: average reference spectrum of all sample; b i: multiplicative scattering coefficient.
x MSC , i λ = x i λ − a i b i (3b)
Standard Normal Variate (SNV), Equation 4
Independent normalization for a single spectrum: x i ¯: mean absorbance value over all wavelengths of the ith spectrum, σ i: standard deviation of absorbance for the ith spectrum.
x SNV , i λ = x i λ − x i ¯ σ i (4)
2.4 Construction method of 2T2D-COS
To reveal the dynamic spectral differences induced by changes in nitrogen concentration, 2T2D-COS synchronous and asynchronous spectra were constructed based on the optimally preprocessed spectra. This method takes nitrogen concentration as the perturbation variable. By analyzing the correlation relationships of spectral changes under different concentration conditions, it transforms weak peaks and subtle local variations that are not readily resolvable in one-dimensional spectra into two-dimensional correlation features.
The selection of reference spectra was determined by the spectral type. For NIR spectra, pure water spectra were used as the reference to highlight the effects of nitrogen addition on water molecular association structures and hydrogen bonding networks. For UV-Vis spectra, since water exhibits no significant absorption in this wavelength range, the spectra of soil leachate with the lowest nitrogen concentration were selected as the reference to enhance the expression of relative differences between samples of different concentrations. Synchronous spectra are used to describe the intensities of synchronous responses of each wavelength variable to concentration changes, while asynchronous spectra reflect the sequential order of responses from different spectral bands and local variation differences [12, 20].
For each sample, the optimally preprocessed spectrum was paired with the corresponding fixed reference spectrum to calculate one synchronous correlation matrix and one asynchronous correlation matrix. Pure water was used as the reference for NIR spectra, whereas the lowest-concentration soil leachate spectrum was used as the reference for UV-Vis spectra. The resulting two-dimensional matrices were organized as tensor inputs for NPLS-DA modeling.
2.5 Establishment of excess discrimination model and evaluation indicators
In this study, two-dimensional correlation spectra were used as core feature inputs to establish an NPLS-DA-based nitrogen excess discrimination model. Dataset partitioning was performed using the Sample set Partitioning based on joint X-Y distances (SPXY) method in a 7:3 ratio into training and test sets to ensure that the sample concentration distribution and sample spatial distribution were relatively balanced between the two sets. Model performance was evaluated primarily using the test set classification accuracy as the main indicator, with sensitivity and specificity used for auxiliary evaluation of the model’s ability to recognize normal and excess samples.
3 Results and discussion
3.1 Analysis of bimodal raw spectra and optimal preprocessing results
For the raw NIR spectra, nitrate nitrogen samples (Figure 1a) and ammonium nitrogen samples (Figure 1c) both exhibited a broad absorption band around 1,450 nm. This region primarily corresponds to the first overtone absorption of water molecules [24, 25]. With increasing nitrogen concentration, both types of samples showed a slight red shift in the characteristic range of 1,400–1,500 nm, accompanied by an overall decrease in absorbance, indicating that the addition of nitrogen altered the association state of water molecules and the distribution of hydrogen bond structures in the solution [25]. For nitrate nitrogen, this change was relatively regular. For ammonium nitrogen, more pronounced spectral shifts were observed between samples with the same concentration but different soil leachate backgrounds, indicating that it was more susceptible to the combined effects of unknown components and particle scattering at low concentrations.

The raw UV-Vis spectra provided direct absorption information distinct from that of NIR spectra. Nitrate nitrogen samples (Figure 1b) showed a distinct absorption peak around 200 nm [8, 26], and the absorption intensity increased significantly with increasing concentration. Ammonium nitrogen samples (Figure 1d) also exhibited strong absorption in the 190–250 nm range, but the peak boundaries were indistinct and the characteristics were less clear than those of nitrate nitrogen. Meanwhile, neither type of sample showed stable and effective characteristic changes above 300 nm, so only the 190–300 nm wavelength range was retained for subsequent analysis.
Comparison of the raw spectra of samples with the same nitrogen concentration from the three types of soil leachates revealed that even when the target nitrogen concentration was identical, there were still certain deviations in the spectral curves under different soil backgrounds, and the shift magnitude of ammonium nitrogen was generally larger than that of nitrate nitrogen. This indicates that complex background components exerted a more significant interference on ammonium nitrogen, and also demonstrates that relying solely on raw one-dimensional spectra cannot stably achieve excess discrimination in complex samples.
To mitigate the impacts of random noise, baseline drift, and scattering interference on two-dimensional correlation analysis, raw spectra were preprocessed in this study. Building on previous research findings and based on the cross-validation accuracy and spectral stability, different preprocessing methods were compared. It was finally determined that the optimal preprocessing methods for nitrate nitrogen NIR, nitrate nitrogen UV-Vis, ammonium nitrogen NIR, and ammonium nitrogen UV-Vis data were SG + FD, MSC, SG + MSC, and SG + SNV, respectively. The corresponding test set accuracies of the PLS-DA models improved to 87.27%, 86.79%, 83.33%, and 83.67%, respectively (Table 1).
TABLE 1. Optimal preprocessing methods and selection results for different datasets.
| Nitrogen species | Spectral type | Latent variables (LVs) | Raw spectra accuracy | Preprocessed spectra accuracy | Optimal preprocessing method |
|---|---|---|---|---|---|
| NO3--N | NIR | 1 | 85.45% | 87.27% | SG + FD |
| UV-Vis | 9 | 81.82% | 86.79% | MSC | |
| NH4+-N | NIR | 9 | 65.96% | 83.33% | SG + MSC |
| UV-Vis | 9 | 76.09% | 83.67% | SG + SNV |
However, optimal preprocessing is primarily limited to the level of one-dimensional signal correction and cannot reveal the variation relationships between different spectral bands. Therefore, it is necessary to further introduce two-dimensional correlation analysis on the basis of optimal preprocessing to extract more discriminative dynamic features from bimodal spectra.
3.2 Feature analysis of 2T2D-COS
After obtaining the optimally preprocessed spectra, 2T2D-COS analysis was performed separately on the NIR and UV-Vis data of nitrate nitrogen and ammonium nitrogen. This method takes nitrogen concentration as the perturbation variable and constructs synchronous and asynchronous spectra to extract two-dimensional correlation features. The 2T2D-COS synchronous spectra of nitrate nitrogen and ammonium nitrogen for different spectral types are shown in Figure 2. Overall, under the same nitrogen species and spectral type, the synchronous spectra of normal and excess samples are relatively similar in contour morphology, but there are significant differences in their correlation intensity and local correlation structure.

3.2.1 Synchronous spectral feature analysis of nitrate nitrogen and ammonium nitrogen
From the NIR synchronous spectra of normal nitrate nitrogen samples (Figure 2a) and excess nitrate nitrogen samples (Figure 2e), distinct autocorrelation peaks appeared on the main diagonal around 1,400 nm and 1,490 nm for both groups, indicating that these two wavelength regions were the most sensitive to concentration perturbation. A strong negative cross-peak was observed at the off-diagonal position approximately (1,490 nm, 1,400 nm) [24], suggesting that changes in nitrate nitrogen concentration primarily induced structural response differences between the free water region and the strongly hydrogen-bonded water region.
For normal samples (Figure 2a), an additional weak cross-peak existed at approximately (1,400 nm, 1,340 nm), indicating that the free water region was more significantly perturbed at lower concentrations. In contrast, in excess samples (Figure 2e), this cross-peak weakened while the range of the (1,490 nm, 1,400 nm) cross-peak expanded. This spectral behavior suggests that increasing nitrate nitrogen concentration may enhance the interaction between nitrate ions and water molecules [16], and rearrangement of hydrogen bond-related structures occurred in the system, resulting in two-dimensional correlation features of the synchronous spectra that differed from those of normal samples.
In comparison, the synchronous spectral features of nitrate nitrogen UV-Vis, ammonium nitrogen NIR, and ammonium nitrogen UV-Vis were relatively simpler. As shown in Figures 2b–d,f–h, these groups of synchronous spectra mainly exhibited strong autocorrelation peaks near the main diagonal with few cross-peaks in the off-diagonal regions. This indicated that under optimally preprocessed conditions, the synchronous responses of these datasets were primarily manifested as increased local absorption intensity with concentration changes, while information that could directly reflect molecular structural changes was relatively limited.
3.2.2 Asynchronous spectral feature analysis of nitrate nitrogen and ammonium nitrogen
To further analyze the differential responses of different spectral bands to concentration perturbation, 2T2D-COS asynchronous spectra were calculated for the aforementioned data, and the results are shown in Figure 3. The NIR asynchronous spectra of nitrate nitrogen are presented in Figures 3a,e. Normal samples formed cross-peaks around (1,400 nm, 1,390 nm), (1,470 nm, 1,400 nm), and (1,510 nm, 1,410 nm), while excess samples formed cross-peaks around (1,420 nm, 1,400 nm), (1,480 nm, 1,400 nm), and (1,510 nm, 1,420 nm). The changes in cross-peak positions between the two groups indicate that with increasing nitrate nitrogen concentration, the NIR characteristic peaks undergo a certain degree of shift, suggesting that their effects on different types of water molecular structures in the system are not completely synchronous but are accompanied by changes in the local response sequence. In comparison, although the UV-Vis asynchronous spectra of nitrate nitrogen (Figures 3b,f) also showed certain differences in cross-peaks, the peak shapes were weak and more susceptible to noise interference, thus their role in revealing the dynamic response sequence was relatively limited.

The NIR asynchronous spectra of ammonium nitrogen exhibited more distinct structural differences, as shown in Figures 3c,g. Both normal and excess samples formed negative cross-peaks around (1,450 nm, 1,405 nm) and positive cross-peaks around (1,500 nm, 1,450 nm). Negative cross-peaks indicate that during the spectral intensity variation process, the contribution of the free water region to the overall change is greater than that of the weakly hydrogen-bonded water region; positive cross-peaks suggest that the contributions of strongly hydrogen-bonded water and absorptions associated with N-H stretching vibrations to spectral changes are higher than that of weakly hydrogen-bonded water [24, 25]. Further comparison of the cross-peak intensities between the two sample groups revealed that the cross-peak at (1,450 nm, 1,405 nm) was relatively stronger in normal samples, while the cross-peak at (1,500 nm, 1,450 nm) was more prominent in excess samples. This indicates that with increasing ammonium nitrogen concentration, the influences of strongly hydrogen-bonded structures and N-H-related absorptions on spectral changes in the system gradually intensify, while the relative contribution of free water structures decreases. This observed spectral behavior is consistent with an increased contribution from strongly hydrogen-bonded water structures at elevated ammonium nitrogen concentrations.
The UV-Vis asynchronous spectra of ammonium nitrogen are shown in Figures 3d,h. The differences between normal and excess samples were relatively small, with only weak cross-peaks appearing around (215 nm, 205 nm), reflecting the N-H-related ultraviolet absorption of ammonium nitrogen. With increasing ammonium nitrogen concentration, this cross-peak only exhibited a slight shift, indicating that UV-Vis spectroscopy provides relatively limited information for characterizing the dynamic response sequence of ammonium nitrogen and is overall inferior to the corresponding NIR asynchronous spectra.
3.3 Nitrogen excess discrimination results based on two-dimensional correlation features
To verify the effectiveness of two-dimensional correlation features in the excess identification of nitrogen in complex farmland leachate systems, NPLS-DA discrimination models were established using 2T2D-COS synchronous and asynchronous spectra constructed from optimally preprocessed bimodal spectra as inputs, and the discrimination results are shown in Table 2.
TABLE 2. NPLS-DA results for nitrogen exceedance discrimination based on two-dimensional correlation features.
| Nitrogen species | Spectral type | Two-dimensional spectrum type | LVs | Training set accuracy | Test set accuracy | Sensitivity | Specificity |
|---|---|---|---|---|---|---|---|
| NO3 −-N | NIR | Sync | 4 | 94.44% | 94.55% | 93.85% | 95.20% |
| Async | 6 | 95.31% | 90.74% | 89.62% | 91.81% | ||
| UV-Vis | Sync | 8 | 91.67% | 88.46% | 87.14% | 89.77% | |
| Async | 7 | 89.34% | 81.13% | 80.09% | 82.14% | ||
| NH4 +-N | NIR | Sync | 9 | 92.79% | 86.96% | 85.71% | 88.33% |
| Async | 9 | 89.91% | 87.50% | 86.42% | 88.64% | ||
| UV-Vis | Sync | 9 | 89.19% | 87.50% | 86.15% | 88.89% | |
| Async | 10 | 90.83% | 84.44% | 83.08% | 85.71% |
Sync, Synchronous Spectrum; Async, Asynchronous Spectrum.
For nitrate nitrogen, both NIR and UV-Vis spectra achieved better classification performance on synchronous spectra. Specifically, the test set accuracy of the nitrate nitrogen NIR synchronous spectrum model reached 94.55%, which was higher than that of the corresponding asynchronous spectrum model (90.74%). The test set accuracy of the nitrate nitrogen UV-Vis synchronous spectrum model was 88.46%, also higher than that of the asynchronous spectrum model (81.13%). This result indicates that changes in nitrate nitrogen concentration are mainly manifested as a relatively stable synchronous response process in the two-dimensional correlation space, and the variation trends between different spectral bands are relatively consistent. Therefore, synchronous spectra can more effectively reflect the differences between normal and excess samples.
For ammonium nitrogen, the optimal two-dimensional spectrum type varied across different spectral modalities. In ammonium nitrogen NIR, the test set accuracy of the asynchronous spectrum model was 87.50%, slightly higher than that of the synchronous spectrum model (86.96%), indicating that the responses of different absorption bands in the near-infrared region to ammonium nitrogen concentration perturbation are not completely synchronous, and asynchronous spectra have more advantages in reflecting their dynamic sequence differences. In contrast, in ammonium nitrogen UV-Vis, the test set accuracy of the synchronous spectrum model was 87.50%, higher than that of the asynchronous spectrum model (84.44%). This suggests that without introducing additional feature enhancement, the two-dimensional response of UV-Vis spectroscopy to ammonium nitrogen is dominated by local absorption intensity changes, and the discrimination ability of asynchronous information is relatively limited.
Comparison of the discrimination performance of different nitrogen species in bimodal spectra revealed that the overall modeling results for nitrate nitrogen were superior to those for ammonium nitrogen. This is related to the fact that nitrate nitrogen has more distinct response characteristics in both the near-infrared and ultraviolet-visible regions: nitrate nitrogen NIR spectra can be indirectly characterized through changes in the hydrogen bond structure of water molecules, and it also exhibits obvious low-wavelength intrinsic absorption in UV-Vis spectra. In addition, the overall concentration level of ammonium nitrogen is lower, making it more susceptible to interference from unknown components in soil leachates, resulting in relatively weaker stability of two-dimensional spectral features.
To further quantify model performance and verify the reliability of accuracy comparison, independent two-sample t-test was conducted on the test set accuracies of nitrate and ammonium nitrogen models. The result yielded a p-value >0.05, demonstrating that the minor accuracy reduction of ammonium nitrogen models was not statistically significant. The relatively weaker discrimination performance of ammonium nitrogen originated from its lower concentration level and diffuse absorption features vulnerable to soil matrix interference. Moreover, sensitivity and specificity were supplemented in Table 2 to evaluate the model’s capacity to correctly identify normal and over-limit samples, where sensitivity represents the correct recognition rate of standard nitrogen samples and specificity stands for the identification accuracy of nitrogen-excess samples.
3.4 Discussion on the complementarity of NIR and UV-Vis in two-dimensional correlation analysis
As demonstrated by the results of this study, both near-infrared and ultraviolet-visible spectroscopy have application value in the excess identification of nitrogen in farmland leachate systems, but the levels of information they reflect are different. NIR mainly indirectly characterizes the changes in the association states of water molecules and hydrogen bonding networks in the solution after nitrogen addition through absorptions associated with hydrogen-containing groups such as O-H and N-H. In contrast, UV-Vis spectroscopy more reflects the direct absorption responses of target components in the low-wavelength region. Therefore, NIR and UV-Vis can provide complementary information from two dimensions: solvent structural changes and solute intrinsic absorption.
For nitrate nitrogen, UV-Vis spectroscopy is conducive to directly observing the enhanced intrinsic absorption of nitrate ions, while NIR is more advantageous for characterizing the rearrangement of water spectral structures caused by the entry of nitrate nitrogen into the system. Both exhibit relatively clear synchronous responses in two-dimensional correlation analysis, thus showing complementarity in mechanistic interpretation. For ammonium nitrogen, the bimodal complementarity is more reflected in the differences in information intensity and stability. Although ammonium nitrogen has absorption in the ultraviolet region, it has weak peak shapes and is more susceptible to interference in complex matrices. In contrast, NIR can more stably reflect the local environmental changes caused by ammonium nitrogen through water spectral variations, especially showing more obvious dynamic sequence differences in asynchronous spectra. Therefore, for components such as ammonium nitrogen with non-sharp intrinsic absorption, low concentration, and higher susceptibility to background interference, NIRS is suitable as the primary discrimination method, and UV-Vis is suitable as the auxiliary verification method.
NIR and UV-Vis have a distinct complementary relationship in two-dimensional correlation analysis: NIR is more suitable for capturing system structural changes, while UV-Vis is more suitable for characterizing the local intrinsic absorption of target components. For complex farmland leachate samples, this bimodal two-dimensional correlation analysis method is more conducive to improving the credibility and interpretability of discrimination results than single spectral analysis.
It should be noted that the samples investigated in this study were simulated farmland leachates prepared using three types of agricultural soil leachates and nitrogen standard solutions. Although these samples introduced complex matrix interference, their composition may not fully represent the variability of naturally collected farmland leachates. Further validation using field-collected samples is therefore required.
4 Conclusion
In this study, soil leachate was used to simulate farmland nitrogen leachate, and a nitrogen excess discrimination method based on bimodal NIR and UV-Vis spectroscopy combined with two-dimensional correlation analysis was established. The results show that 2T2D-COS can effectively reveal weak features and their dynamic variation relationships that are difficult to resolve directly by one-dimensional spectra in complex matrices. For nitrate nitrogen, better modeling performance was achieved with synchronous spectra in both NIR and UV-Vis spectroscopy, indicating that its concentration changes are mainly manifested as a relatively stable synchronous response. For ammonium nitrogen, asynchronous spectra showed slightly better performance in NIR, while synchronous spectra still performed better in UV-Vis, reflecting the greater complexity of its dynamic response. Overall, NIR spectroscopy exhibited better stability and anti-interference ability than UV-Vis spectroscopy. These results demonstrate the feasibility of the proposed method for nitrogen exceedance discrimination under simulated complex soil-leachate conditions and provide a methodological reference for future farmland pollution monitoring.
Generative AI statement
The author(s) declared that generative AI was not used in the creation of this manuscript.
Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
Supplementary material
The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/fphy.2026.1950644/full#supplementary-material
Supplementary material Supplementary material at the source
Footnotes
Edited by: Jingsong Li, Anhui University, China
Reviewed by: Li Ming, Tianjin University of Commerce, China
Qi Huang, University of Science and Technology of China, China
Statements
- Conflict of interest
The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
- Funding
The author(s) declared that financial support was received for this work and/or its publication. This study was supported by the National Key Research and Development Program of China (Grant Nos. 2023YFD1701801 and 2023YFD1701802) and the National Major Scientific Instruments and Equipment Development Project of the National Natural Science Foundation of China (Grant No. 42527806).
- Data availability
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.
- Author contributions
CL: Conceptualization, Data curation, Formal Analysis, Funding acquisition, Investigation, Methodology, Software, Validation, Visualization, Writing – original draft, Writing – review and editing. SL: Formal Analysis, Methodology, Validation, Writing – original draft, Writing – review and editing. YZ: Conceptualization, Data curation, Formal Analysis, Methodology, Validation, Visualization, Writing – review and editing. DZ: Formal Analysis, Investigation, Methodology, Software, Writing – original draft. SY: Conceptualization, Formal Analysis, Methodology, Project administration, Supervision, Validation, Visualization, Writing – original draft. RL: Conceptualization, Data curation, Formal Analysis, Methodology, Project administration, Validation, Writing – original draft. WC: Conceptualization, Formal Analysis, Project administration, Resources, Visualization, Writing – original draft. JZ: Conceptualization, Data curation, Formal Analysis, Project administration, Validation, Visualization, Writing – original draft, Writing – review and editing.
References
- 1. Martínez-Dalmau J, Berbel J, Ordóñez-Fernández R. Nitrogen fertilization. A review of the risks associated with the inefficiency of its use and policy responses. Sustainability (2021) 13: 5625. doi:10.3390/su13105625
- 2. Bijay S, Craswell E. Fertilizers and nitrate pollution of surface and ground water: an increasingly pervasive global problem. SN Appl Sci (2021) 3: 518. doi:10.1007/s42452-021-04521-8
- 3. Ward MH, Jones RR, Brender JD, de Kok TM, Weyer PJ, Nolan BT Drinking water nitrate and human health: an updated review. Int J. Environ. Res. Public Health (2018) 15 (7): 1557. doi:10.3390/ijerph15071557
- 4. Abascal E, Gómez-Coma L, Ortiz I, Ortiz A. Global diagnosis of nitrate pollution in groundwater and review of removal technologies. Sci The Total Environ (2022) 810: 152233. doi:10.1016/j.scitotenv.2021.152233
- 5. Sebilo M, Mayer B, Nicolardot B, Pinay G, Mariotti A. Long-term fate of nitrate fertilizer in agricultural soils. Proc Natl Acad Sci USA (2013) 110: 18185 – 9. doi:10.1073/pnas.1305372110
- 6. Yin L, Zhou J, Chen D, Han T, Zheng B, Younis A A review of the application of near-infrared spectroscopy to rare traditional Chinese medicine. Spectrochimica Acta A (2019) 221: 117208. doi:10.1016/j.saa.2019.117208
- 7. Ma L, Peng Y, Pei Y, Zeng J, Shen H, Cao J Systematic discovery about NIR spectral assignment from chemical structural property to natural chemical compounds. Scientific Reports (2019) 9: 9503. doi:10.1038/s41598-019-45945-y
- 8. Pons M-N, Assaad A, Oucacha C, Pontvianne S, Pollier B, Wagner P Nitrates monitoring by UV–vis spectral analysis. Ecohydrology Hydrobiology (2017) 17: 46 – 52. doi:10.1016/j.ecohyd.2016.12.001
- 9. Shi Z, Chow CWK, Fabris R, Liu J, Jin B. Applications of online UV-Vis spectrophotometer for drinking water quality monitoring and process control: a review. Sensors (Basel, Switzerland) (2022) 22 (8): 2987. doi:10.3390/s22082987
- 10. Huang Q, Wei Y, Li J. Simultaneous detection of multiple gases using multi-resonance photoacoustic spectroscopy. Sensors Actuators B: Chem (2022) 369: 132234. doi:10.1016/j.snb.2022.132234
- 11. Liang M, Jiao M, Feng M, Chen P, Gao Y, Qiao Y Multi-gas photoacoustic sensor using multi-mode demodulation. Photoacoustics (2025) 42: 100688. doi:10.1016/j.pacs.2025.100688
- 12. Šašić S, Ozaki Y. Statistical two-dimensional correlation spectroscopy: its theory and applications to sets of vibrational spectra. Anal Chem (2001) 73: 2294 – 301. doi:10.1021/ac0014010
- 13. Liu LIY, Yang RJ, Zhang J, Gong GM, Yang YR. Recent progress in two-dimensional correlation spectroscopy for the environmental detection and analysis. J Mol Struct (2020) 1214: 128263. doi:10.1016/j.molstruc.2020.128263
- 14. Yan Z, Liu H, Zhang S, Li J, Wang Y. Superiority of two-dimensional correlation spectroscopy combined with ResNet in species identification of bolete. Infrared Phys Tech (2022) 125: 104303. doi:10.1016/j.infrared.2022.104303
- 15. Wu H, Yang R, Wei Y, Dong G, Jin H, Zeng Y Influence of brands on a discrimination model for adulterated milk based on asynchronous two-dimensional correlation spectroscopy slice spectra. Spectrochimica Acta Part A (2022) 271: 120958. doi:10.1016/j.saa.2022.120958
- 16. Yang B, Zhang Y, Cheng B, Li Y, Qu P, Tang H. Investigation of hydrogen bonding in aqueous nitric acid solution under concentration perturbation by two-dimensional correlated raman spectroscopy. Spectrosc Spectral Anal (2025) 45: 958 – 63. doi:10.3964/j.issn.1000-0593(2025)04-0958-06
- 17. Lu K, Gao X, Liu D, Zhang S, Li Q, Gao H An innovative method for identifying aquatic environmental characteristics: construction of water quality fingerprint spectrum and combination with two-dimensional correlation spectroscopy analysis. Environ Res (2025) 279: 121810. doi:10.1016/j.envres.2025.121810
- 18. Zhang Z, Sha M, Wang Y, Wang H. Chemical perturbation two-dimensional correlation ultraviolet visible spectroscopy for quality control of Chinese liquor. J Am Soc Brewing Chemists (2018) 76: 141 – 6. doi:10.1080/03610470.2017.1406257
- 19. Huang M-y., Long J, Wu HY, Yang RJ, Jin H, Yang YR. Temperature-perturbed two-dimensional generalized correlation characteristic slice spectra combined with multivariate method to identify adulterated milk. Spectrochimica Acta Part A (2023) 287: 122066. doi:10.1016/j.saa.2022.122066
- 20. Noda I. Two-trace two-dimensional (2T2D) correlation applied to a number of spectra beyond a simple pair. Spectrochimica Acta Part A (2022) 277: 121258. doi:10.1016/j.saa.2022.121258
- 21. Jin H, Dong GM, Wu HY, Yang YR, Huang MY, Wang MY Identification of adulterated milk based on auto-correlation spectra. Spectrochimica Acta Part A: Mol Biomol Spectrosc (2023) 286: 121987. doi:10.1016/j.saa.2022.121987
- 22. Sohng W, Eum C, Chung H. Exploring two-trace two-dimensional (2T2D) correlation spectroscopy as an effective approach to improve accuracy of discriminant analysis by highlighting asynchronous features in two separate spectra of a sample. Analytica Chim Acta (2021) 1152: 338255. doi:10.1016/j.aca.2021.338255
- 23. Liu R, Wang M, Sun Z, Chen W, Li C, Xu C. Research on temperature disturbance of glucose solution with two-trace two-dimensional correlation spectrum method. Spectrosc Spectral Anal (2023) 43: 1051 – 5. doi:10.3964/j.issn.1000-0593(2023)04-1051-05
- 24. Segtnan VH, Sasić S, Isaksson T, Ozaki Y. Studies on the structure of water using two-dimensional near-infrared correlation spectroscopy and principal component analysis. Anal Chem (2001) 73: 3153 – 61. doi:10.1021/ac010102n
- 25. Heiman A, Licht S. Fundamental baseline variations in aqueous near-infrared analysis. Analytica Chim Acta (1999) 394: 135 – 47. doi:10.1016/s0003-2670(99)00312-8
- 26. Zhu X, Yu K, Zhu X, Su J, Wu C. An improved algorithm for measuring nitrate concentrations in seawater based on deep-ultraviolet spectrophotometry: a case study of the Aoshan Bay seawater and Western Pacific seawater. Sensors (2021) 21: 965. doi:10.3390/s21030965
Citation
Li, C., et al. (2026). Two-dimensional dynamic correlation feature enhancement and exceedance discrimination of near-infrared and ultraviolet-visible spectra for nitrogen-containing farmland leachate. Frontiers in Physics, Volume 14. https://doi.org/
- Received
- Accepted
- Published
- Volume
- 14 - 2026
Copyright
Copyright © 2026 Li, Lu, Zhang, Zhao, Yang, Liu, Chen and Zhai.
License: https://creativecommons.org/licenses/by/4.0/
*Correspondence: Si Yang; Jia Zhai
Article metrics
- Views
- 0
- Downloads
- 0
- Citations
- 0
- Shares
- 0
