Next Article in Journal
Enhancing Energy Efficiency of the Doze Mode Mechanism in Ethernet Passive Optical Networks Using Support Vector Regression
Previous Article in Journal
Controlling Dispersion Characteristic of Focused Vortex Beam Generation
Previous Article in Special Issue
Raman Spectroscopy Enables Non-Invasive Identification of Mycotoxins p. Fusarium of Winter Wheat Seeds
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Design and Performance of a Near-Infrared Spectroscopy Measurement System for In-Field Alfalfa Moisture Measurement

1
Department of Engineering “Enzo Ferrari”, University of Modena and Reggio Emilia, Via P. Vivarelli 10, 41125 Modena, Italy
2
CNH Industrial S.p.A., 41122 Modena, Italy
*
Author to whom correspondence should be addressed.
Photonics 2022, 9(3), 178; https://doi.org/10.3390/photonics9030178
Submission received: 26 January 2022 / Revised: 9 March 2022 / Accepted: 10 March 2022 / Published: 12 March 2022

Abstract

:
Near-infrared spectroscopy (NIRS) is widely used in fruit and vegetable quality evaluations, usually after harvesting. In particular, the moisture content is a key parameter for determining product quality; processing phase, e.g., drying process; and economical value. NIRS methods are well-established for laboratory practices where the specimens are properly prepared and measurement conditions are well controlled. On the other hand, it is known that in-field NIRS measurements present several difficulties, as many influencing variables, such as mechanical vibrations, electrical and optical disturbances, and dust or dirt in general, can affect the spectral measurement. In this paper, we propose the design and present the prototype of a NIRS-based measuring system for the rapid determination of the moisture content of bales. The new system uses of a halogen lamp illumination unit to recover water absorption spectral data in the range of 900–1700 nm. The compact stainless steel body makes the instrument portable and easy to transport for rapid in-field MC measurements. The prototype system was characterized and its performance extensively evaluated in a laboratory environment. Finally, a preliminary test was carried out, where the moisture contents of 12 freshly harvested crops samples were measured using the partial least squares (PLSs) regression method. The obtained results show that our prototype system can estimate the alfalfa moisture content information with a coefficient of determination R 2 of 0.985 and a root mean square relative error of estimation of 7.1%.

1. Introduction

In recent years, great efforts have been made for the research and development of techniques that allow the evaluation of the physical properties of agricultural products [1]. For instance, the moisture content (MC) of a crop is an important physical parameter to define the right storage process and should be monitored during the harvesting and storage [1]. Storing crops in unsuitable conditions can lead to awful consequences, including fires. For this reason, it is essential to measure the humidity levels before and during storage. Measurements of humidity in static, i.e., storage, and dynamic, i.e., harvesting, conditions obviously present different levels of difficulty.
During storage, the MC measurement can be performed by taking samples and analyzing them using moisture analyzers [2], or less accurately, using a humidity tester [3]. MC measurements during harvesting are much more difficult due to the operating conditions in which they must be performed. Firstly, the time available to acquire the information is limited and depends on the harvesting machine. Second, many influential variables, such as mechanical vibrations, electrical and optical disturbances, and dust or dirt in general, can heavily affect the measurements. Moreover, in order not to hinder and/or slow down the operation of the harvesting machine, the MC measurement should be performed while the crop bale is in motion. To our knowledge, the most common commercial systems exploit a conductometric measurement method that uses two-star wheels as electrodes [1]. Although very robust, as is the case for all contact measurement systems, this approach offers performance highly dependent on mechanical devices that often experience premature aging compared to electrical devices. Therefore, non-contact measurement methods would be desirable.
To date, two techniques offer the potential to perform MC measurements without contact: (i) microwave attenuation [1] and (ii) near-infrared spectroscopy (NIRS) [1,4,5]. The first technique offers the possibility of examining the sample with a greater inspection depth than the second, even if it is very sensitive to the electromagnetic environment and the presence of ferromagnetic structures. Other research works [6] evidence that a rapid determination of soil MC could be achieved with a PMMA Bragg grating sensor that uses the dependence of the light absorption on the water content of the organic sample.
Recently, in our previous paper [7], we evaluated the feasibility of a NIRS approach to the MC measurement. As we showed, the MC in Alfalfa grass can be evaluated by exploiting absorption peaks of water in the near-infrared spectral region. In the paper by Cassanelli et al., we tested the feasibility of our approach in our laboratory using an integrating sphere and other standard laboratory equipment. After this phase, we designed and realized the prototype for the in-field crop moisture measurements described in this paper.
Unfortunately, numerous physical quantities, e.g., crop density [8], can affect the relationship between MC and the near-infrared (NIR) spectrum, especially when measurements are performed in harsh and uncontrolled conditions. Therefore, the instrument’s design requires an accurate optical scheme, a compact and robust assembly, and the possibility of periodic self-calibration to compensate for any drift or misalignment caused by vibrations or dirt accumulated on the optics.
As discussed in our previous papers [7,8], a robust statistical analysis can help to recover the information of interest, even with the presence of different densities or leaf-stem ratios in the sample. Accordingly, a statistical analysis on numerous samples must be considered for the development of a model for the MC and density estimation [9,10]. Other researchers [11,12], have shown that multivariate statistics, such as partial least squares (PLSs), are among the best tools to perform such analysis [13,14].
As experienced by Rodriguez et al. [15,16], the signal-to-noise ratio can be increased if pre-processing is performed before the regression. In addition, as showed and explained in this (Section 4.2) and in previous research [7,14], properly selecting spectral bands according to correlation matrices can improve the prediction capabilities of the model.
Following, Section 2 describes a new portable and semi-automated near-infrared spectroscopy system, which can be potentially used on a harvesting machine. The performances of the proposed measurement system are evaluated in Section 3, where calibration, reflectance sensitivity, warm-up, and a repeatability test performed on National Institute of Standards and Technology (NIST)-certified standard diffuser targets, are presented. Finally, the results obtained from in-filed measurements on fresh alfalfa (Medicago sativa L.) grass samples are presented in Section 4, and conclusions are drawn in Section 5.

2. System Description

The realized system is shown in Figure 1. The compact and robust 300 mm (W) × 150 mm (D) × 125 mm (H) housing is entirely made of stainless steel and has been developed to be rugged and portable. The housing has been divided into two compartments that separate optical components from electronic boards. The design was optimized to be modular, as each part can be easily swapped for future upgrades. The system allows one to easily acquire back-scattered light in the range 900–1700 nm from a 24 mm diameter optical window (Figure 1: item A). An essential I/O panel is realized on the side of the device; here 3 LEDs indicate the status of operation and a standard USB port can be used to control the system through a simple user interface that has been designed with LabVIEW©. This compact system can be easily installed on a harvesting machine and set up to acquire spectral raw data that can be saved for further elaborations. In the next sections, the measuring principle and the main functional blocks of the system are fully described.

2.1. Measuring Principle

The NIRS measuring principle proposed to estimate crop MC was discussed in detail in our previous paper [7]. Below we provide the fundamental information on which our approach is based. Photons’ propagation through a turbid sample is governed by scattering and absorption phenomena. As a matter of fact, information about sample constituents can be recovered from the analysis of a diffused light spectrum. In particular, in the NIR spectral region, OH functional groups exhibit absorption peaks at 1200, 1450, and 1940 nm [4,5,17,18,19]. Therefore, information about sample moisture content can theoretically be derived by analyzing the light diffusion spectrum in this NIR region.
Unfortunately, many other variables influence the scattered light spectrum, including: (i) the scattering coefficient [8], determined by morphology, e.g., leaf-stem ratio, and the density of the sample; (ii) the geometry and optical characteristics of the measurement, which mainly determine the depth at which the investigation is performed [1]; (iii) other organic constituents, e.g., CH and NH functional groups, which cause different absorption or scattering coefficients [1].
For these reasons, it is important to adopt a precise and specific calibration procedure for the instrument to obtain information on the MC. As discussed in our previous paper [7], we propose to extract the information on MC by analyzing the NIR absorption spectrum in in a properly selected band of interest (BOI) ∈ [1.37 μm, 1.55 μm] where the maximum correlation with the MC contents and the least correlation with the density of the collected samples is achieved. As explained later (Section 4.2), this spectral region has been determined by analyzing the behavior of samples with known MC and density using statistical methods. Thanks to this analysis, as experienced in this and in the previous research [7], the development of a PLS regression model showed superior results in MC content estimation for the type of crop harvested.
To achieve a good PLS model, the first step involves processing the raw acquired NIR spectra by focusing our attention on the sample water absorption. The back-scattered spectral light intensity from a target can be expressed with the modified Lambert–Beer law as:
I ( λ ) = I 0 ( λ ) · e c W · ϵ ( λ ) · L · D P F ( λ ) + G ( λ ) ,
where I 0 is the incident beam intensity, c W the water molar concentration, ϵ the water molar extinction coefficient [20], and L the geometrical path-length of photons within the sample. The term G takes into account the losses due to scattering, and the differential pathlength factor (DPF) accounts for the increasing photon pathlength due to scattering. Therefore, the spectral sample absorbance A can be defined as:
A ( λ ) = log 10 I ( λ ) I 0 ( λ ) = 1 2.303 ln I ( λ ) I 0 ( λ ) = 1 2.303 · c W · ϵ ( λ ) · L · D P F ( λ ) + G ( λ ) .
In the back-scattering configuration, the term G refers to the loss of optical signal due to light that is not collected by the system on the illumination side. For crop samples, as for many other biological samples [21], the back-scattered light beams will exit from each sample very close to the initial illumination position. Since the optical window of the system is wide and close to the sample, we can assume almost all of the back-scattered light beams are collected and analyzed by the system. This allows us, as a first approximation, to neglect the losses due to scattering, i.e., the term G in Equation (2).
Note, the sample density directly influences the scattering coefficient of the sample, and therefore the D P F , which, unfortunately, also depends partially on the absorption coefficient and therefore on the MC. Hence, the estimation of the water content c W and thus MC from (2) is a non-trivial task.
As discussed in our previous paper [7], to extract the information of interest, i.e., MC, we propose to analyze the logarithmic transformation of the absorbance spectrum:
L A = ln A = ln 1 2.303 · c W · ϵ + ln L · D P F .
This quantity allows us, as a first approximation, to separate the two main contributions of absorption and scattering. In fact, the first addendum in 3 is mainly related to the sample MC, and the second to its density. To estimate MC, the logarithmic transformation of the absorbance spectrum has been analyzed in the spectral BOI ∈ [1.37 μm, 1.55 μm] (See Section 4.2) where the contribution of the sample water absorption is maximized, whereas the contribution of sample density variations is minimal. By considering this spectral band B O I , Equation (3) can be simplified as:
L A B ln 1 2.303 · c W · ϵ ,
from which the MC can be easily derived.

2.2. System Block Diagram

Block function diagram of the developed measuring system is illustrated in Figure 2. The 24 mm-diameter sapphire optical window that is placed very close to the sample under test (SUT) surface on the harvesting processing line, allows the permanent protection of optical components from dust and external environment contamination. Additionally, a flap mechanism which can be opened and closed, allows one to control the three different measurement phases. When the flap mechanism is closed and the illumination is off, the dark-spectrum is acquired, whereas by turning on the illumination, a pre-measurement calibration phase is performed, presenting a known reflectance target to the optical system. In particular, on the side opposite the optical window, the flap houses a sheet of white paper, i.e., the reflectance reference target (RRT), whose reflectivity has been determined by comparison with NIST certified reflectance standards (Spectralon® Diffuse Reflectance Standards, LABSPHERE© Inc., North Sutton, NH, USA). More information on this aspect is described in Section 3.1. When the flap mechanism is open, from the optical window, the surface of the SUT is illuminated and the back-scattered light is collected and guided to the spectrometer through an optical fiber. A micro-controller unit is used to collect and pre-process spectral data that are finally sent to the PC on which a LabVIEW GUI allows monitoring and controlling the acquisition process.

2.2.1. Illumination Unit

To obtain sufficient optical radiation in the spectral region of interest at a low cost, the system exploits a 20 W halogen lamp, the DECOSTAR 51 ALU (OSRAM GmbH©, Munich, Germany). This device, in addition to guaranteeing a low cost, also has a sufficiently long average life, i.e., 4000 h. The distance between the halogen lamp and the optical window was chosen in such a way as to guarantee the maximum irradiance on the sample surface and a sufficient uniformity of illumination. The normalized spectrum of the light emitted by this halogen lamp is shown in Figure 3.
The main electrical and optical characteristics of the light bulb are reported in Table 1.

2.2.2. Detection Unit

To detect back-scattered light, the instrument exploits the microspectrometer (MSN) NIR1.7 OEM (INSION GmbH©, Obersulm, Germany), which has a measuring range from 900 to 1700 nm with 8 nm spectral resolution. This spectrometer is based on a 128 InGaAs photodiodes array detector and pre-integrated readout electronics, which offer high performances in terms of accuracy, sensitivity, and signal to noise ratio (SNR). All parameters of the spectrometer can be set and optimized by the user to match the specific requirements of different applications. The MSM NIR1.7 OEM module includes readout electronics (BIM-NIRP) based on an analog to digital converter with 16-bit-resolution.
The spectral analysis is performed by a hollow cavity wave-guide design without moving parts. As shown in Figure 2, the light is coupled to the spectrometer through a 300/330 nm low OH-silica optical fiber up to the spectrometer entrance slit.

2.2.3. Control and Data Acquisition Unit

Control and data acquisition are performed by the micro-controller unit (MCU) based on a ChipKIT Wi-FIRE (Digilent©, Pullman, WA, USA) board, i.e., the conditioning and control boards shown in Figure 2. The Wi-FIRE board takes advantage of a powerful 32-bit micro-controller from PIC running at 200 MHz, i.e., PIC32MZEC. This tiny board allows simultaneously collecting data through the serial interface while performing hard-coded fast Fourier transformation on the acquired absorption spectrum. In addition, the board allows the user to change different measuring parameters that can be set from the designed GUI in LabVIEW©. The board’s digital outputs are programmed to control the measurement phases and to drive different system components, such as the halogen lamp, the cooling fan, and the movement of the mechanical flap on the optical sapphire window. Finally, acquired spectral data are transmitted by the board by means of a UART/RS232 to the LabVIEW GUI.

2.3. Measurement Procedure

Assuming the SUT is facing the system’s sapphire optical window, the complete measurement procedure consists of four steps.
  • Step 1: Halogen lamp: off, flap mechanism: close. Instrument offset intensity spectrum I D a r k I is acquired.
  • Step 2: Halogen lamp: off, flap mechanism: open. Ambient offset intensity spectrum I D a r k A is acquired.
  • Step 3: Halogen lamp: on, flap mechanism: close. RRT faces the optical system. Reference intensity I R R T is acquired.
  • Step 4: Halogen lamp: on, flap mechanism: open. Sample intensity spectrum I S U T is acquired.
This procedure is performed once after power-on and warm-up; I D a r k I , I D a r k A , and I R R T are memorized. Assuming the environmental and instrumental conditions remain unchanged—i.e., environment illumination, ambient temperature, and distance between SUT and optical window—subsequent measurements include only step four. Depending on the application, the instrument settings panel allows the user to establish how often the complete measurement procedure must be repeated.
The SUT reflectivity spectrum is then obtained from the following equation:
R S U T ( λ ) = I S U T ( λ ) I D a r k A ( λ ) I R R T ( λ ) I D a r k I ( λ ) · R R R T ( λ ) ,
where R R R T ( λ ) is the reflectance spectrum of RRT determined during the system calibration (see Section 3.1). S U T absorbance spectra could be obtained as:
A S U T ( λ ) = 1 R S U T ( λ )

3. System Performance

After assembling the system, the functioning of the various functional blocks and of the whole system has been verified. Afterward, the system was carefully calibrated and characterized in terms of: (i) warm-up, (i) linearity, and (iii) repeatability. Calibration and characterization procedures were performed by comparing the measured reflectance with certified reflectivity standards targets. In particular, the used reflectivity indexes were 0.99 ( S 099 ), 0.75 ( S 075 ), 0.50 ( S 050 ), and 0.02 ( S 002 ) (Spectralon® Diffuse Reflectance Standards, LABSPHERE© Inc., North Sutton, NH, USA). All the experimental activities were performed in our laboratory under controlled ambient conditions.

3.1. System Calibration

The calibration of the system has basically two objectives: (i) make the measurement independent of instrumental parameters, and (ii) make the reflectance measurement traceable. For the use of the system, the first objective would be sufficient and easily achievable using a reference target to perform a comparison. However, this approach allows obtaining “qualitative” and non-referable reflectance measurements. To make the measurements provided by our instrument comparable with those performed by other researchers with different instrumentation, it is important to make the measurement traceable, and therefore, refer the reference target to a certified standard. In our system, the RRT is a sheet of white paper housed on the flap mechanism. This target faces the spectrometer optical head when the flap mechanism is closed.
RRT reflectivity ( R R R T ( λ ) ) over the considered spectral band was obtained for comparison with the certified reflectivity standard’s index 0.99 S 099 . In accordance with the measurement procedure illustrated in Section 2.3, the reflectance standard S 099 was positioned in front of the optical sapphire window of the system as a replacement for the SUT. Afterward, the measurement procedure was started, but instead of acquiring the intensity of the back-scattered optical signal from SUT, I S U T , the optical signal coming from S 099 , I S 099 was acquired. Thus, the RRT reflectivity was derived from the following equation:
R R R T ( λ ) = I R R T ( λ ) I D a r k I ( λ ) I S 099 ( λ ) I D a r k A ( λ ) 0.99 ,
where the values of I R R T , I D a r k I , I S 099 , and I D a r k A were obtained. We averaged 60 acquisitions within the same measurement session. Figure 4a shows the intensities I R R T and I S 099 . In the same figure both dark contributions, I D a r k I and I D a r k A , are completely overlapped. The reflectivity R R R T of the the reference target obtained from Equation (7) is shown in Figure 4b.

3.2. Instrument Warm-Up

Exploiting a complete measurement procedure, the system was calibrated; and the information relating to I D a r k I , I D a r k A , and I R R T was stored. The system was turned off, and we waited for all parts to reach room temperature. Immediately after a new system power-on, the S 050 reference sample was positioned close to the sapphire optical window, the lamp was switched on, and the flap mechanism was opened. Acquisitions of the I S 050 intensity were then performed at 30 s intervals for 120 min. In this way, the intensity spectral measurements were performed from a “cold–start” condition until the system thermal regime was reached.
For each acquisition, according to Equation (5), the reflectivity R S 050 ( λ ) was estimated and its average value R S 050 ¯ in the spectral interval 900–1700 nm calculated. Figure 5 shows the trend of R S 050 ¯ in the acquisition time interval and the corresponding fit to an exponential decay function obtained by minimizing the mean square deviations.
In the warm-up period, the system exhibited a decrease in the measured average reflectivity well approximated by an exponential decay ( R 2 = 0.9876). The observed average reflectivity reduction was about 1.4 % with a decay constant of 13.6 s. At the end of the transient, the measurement error was 0.6 %.

3.3. Instrument Linearity

The linearity of the system was evaluated using certified reflectance standards. The instrument was turned on, and after waiting for the warm-up time, a complete measurement procedure was performed to calibrate the system. The information related to I D a r k I , I D a r k A , and I R R T was stored. The reference standards S 099 , S 075 , S 050 , and S 002 were positioned in front of the sapphire optical window in place of the SUT. For each standard, ten intensity spectra were acquired, and their average was calculated. Therefore, in accordance with Equation (5), the reflectivity of each standard was calculated. Moreover, for each reflectivity spectrum, the average reflectivity in the spectral interval 900–1700 nm was calculated. Figure 6a shows the reflectivity spectra obtained. The spectra show a sufficiently flat trend with a slight positive slope towards high wavelengths. The average reflectances of the standards with reference to the certified value are shown in Figure 6b. The integral linearity error calculated as the root mean square deviation of the measurements with respect to the reference values was 0.93%.

3.4. Measurement Repeatability

Finally, the repeatability test was performed on a single NIST target to check measurement consistency over an extended 13 h long session. The instrument was turned on, and after waiting for the warm-up time, a complete measurement procedure was performed to calibrate the system storing the information relating to I D a r k I , I D a r k A , and I R R T . Afterward, a reference standard target S 050 was positioned in front of the sapphire optical window in place of the SUT, and 26 reflectivity measurements were carried out every 30 min. For each measurement, an average of eight single acquisitions, i.e., I S 050 ( λ ) , were performed, and in accordance with Equation (5), the reflectivity spectrum R S 050 ( λ ) was computed. Moreover, for each measurement the average reflectivity R S 050 ¯ in the spectral interval 900–1700 nm was calculated. After each measurement, the S 050 standard was moved randomly to simulate a different positioning of the SUT. The results are shown in Figure 7. We noted that when comparing these results with the warm-up results after the transient (see Figure 5), the variability observed in this experimental phase was mainly due to the re-positioning of the sample.
The measurements showed an average value of 49.76% and a sample standard deviation equal to 0.71%.

4. In-Field Results

4.1. Sample Preparation

Preliminary tests were performed on alfalfa (Medicago sativa L.) grass samples properly harvested in September from farmlands in Modena (Italy). Twelve fresh cuttings, with weights ranging from 8.7 to 26 g, were collected from three different cultivation fields. Specifically, four cuttings were collected in each cultivation field, where naturally, different MC values were obtained. Each alfalfa sample was cut at a length of 2 cm from the ground and held in a hermetically-sealed plastic bag to preserve MC during the transport to our laboratory. As normal harvesting conditions were satisfied, each crop cutting was constituted by a heterogeneous composite of stems, leaves, and air interstices with variable moisture content related to the specific conditions of the cultivation field, i.e., exposure to climatic variables, irrigation, soil conformation.
In the laboratory, each sample under test (SUT) was prepared by taking material each cutting and filling a Petri dish with it, without exerting pressure on the sample.
Three different densities, each calculated as the ratio between the net weight of the alfalfa sample and the Petri dish volume, were obtained: ρ 1 = 83 kg/m 3 , ρ 2 = 125 kg/m 3 , and ρ 3 = 250 kg/m 3 . After performing the NIRS measurements, the SUT MC was determined according to the American Society of Agricultural and Biological Engineers standard [1], as explained in our previous paper [7]. This procedure allowed us to obtain a total of 12 Petri dishes with naturally different MCs ranging from ( 8 ± 0.4 ) % to ( 76 ± 0.4 ) % , three of which had MC equal to 75%.

4.2. NIRS Absorbance Measurement Procedure and Data Analysis

Once each SUT was prepared in a Petri dish, the absorbance measurements were performed with the NIRS instrument properly warmed-up and calibrated. In particular, eight single NIR spectral measurements were performed in different regions of the Petri dish surface. In accordance with Equation (6), for each measurement position, the absorbance A S U T ( λ ) was calculated, thereby providing a total of 96 absorption spectra. Due to the poor uniformity of the harvested samples, each observation was considered unique and independent from the others.
As discussed in our previous paper [7], before estimating the MC and density content of collected samples, data pre-processing was performed using MATLAB (MathWorks, Sherborn, MA, USA). Firstly, according to Equation (3), the logarithmic transformation of the absorbance spectrum L A S U T ( λ ) was calculated for each SUT. Subsequently, the first derivative of L A S U T ( λ ) was computed to eliminate any possible baseline effects [22,23]. Then, smoothing was performed through the second-order “Savitzky–Golay” filter (SG method), and the resulting spectrum has been normalized to its maximum.
Following the pre-processing of the acquired data, the spectral band BOI for the SUT MC estimation was determined. Wavelengths of interest were selected by analyzing the correlation coefficients between reference variables, i.e., SUT MC and density ρ , and predictor variables, i.e., the first derivatives of L A S U T ( λ ) . Figure 8 shows the obtained MC and ρ correlation coefficients as functions of the radiation wavelength.
The spectral band of interest (BOI), was then defined as the spectral region where the first derivative of L A S U T ( λ ) is correlated maximally with SUT MC and minimally with SUT ρ . Conventionally, we defined BOI as the spectral band where the correlation coefficient of MC is greater than 85% of its maximum value, and at the same time, the correlation coefficient of ρ is less than 50% of its maximum. As expected the resulting BOI = (1.371 μm, 1.547 μm) included the main water absorption peak in the measured spectral region, i.e., 1.45 μm.
A linear regression model, i.e., a partial least squares (PLS) model, was then developed using the 96 first derivatives of L A S U T ( λ ) , i.e., FDLA, in the spectral BOI as predictor variables and SUTs’ reference MC as response variables. In the PLS model, according to our previous experiments [7], to maximize estimation accuracy while avoiding over-fitting, the number of latent variables for the regression was set to 10. Additionally, the complete predictor dataset, i.e., the 96 first derivatives of L A S U T ( λ ) , was randomly split into the calibration dataset, composed of 67 predictor variables, and validation dataset, including the remaining 29 predictor variables. This splitting operation was performed maintaining the ratio between calibration and validation predictor variables for each MC value equal to 0.7.
Finally, this PLS model was evaluated on both calibration and validation datasets by taking into account two different statistics: calibration and validation root mean square errors (C-RMSE and V-RMSE, respectively) and the coefficients of determination (C-R2 and V-R2, respectively). All the calculations, i.e., data pre–processing, model estimations, and statistical results, were performed with functions integrated in the MATLAB (MathWorks, Sherborn, MA, USA) software suite.

4.3. Crop Moisture Estimation

Figure 9 shows the PLS response variable obtained from calibration as a function of the MC reference values, whereas the results obtained from validation dataset are shown in Figure 10. For completeness, each figure shows the PLS response variable, i.e., the logarithmic transformation of MC ( l n ( M C ( % ) ) (a), and the corresponding value of MC in linear scale (b). Statistics of the developed PLS model are reported in Table 2, whereas Figure 11 shows the root mean square relative error of the MC estimation ϵ r (MC)%.
Although we performed our analysis on a low number of samples, the results are encouraging, and show how the instrument can potentially estimate a crop’s MC with an average relative error of 7.1%. Thanks to the developed PLS model, which exploits the logarithmic transformation of the NIRS absorbance spectra, this relative error remained quite constant over the fitting range [7].

5. Conclusions

A NIRS measuring system for in-field crop moisture measurement has been developed, and preliminary tests have been performed on freshly harvested alfalfa samples. Great care has been devoted to the design and realization of the system, which must be able to operate in-field during crop harvesting phases.
In this paper, we presented a completed characterization of the instrument and a preliminary test on alfalfa grass samples collected directly from cultivation fields. Thanks to the reference reflectance target (RRT) inserted directly into the instrument, measurement traceability can be achieved.
The analytical approach and the PLS regression modeling methodology used to estimate the crop MC, already presented and discussed in our previous article [7], require an initial calibration phase performed on the specific crop samples of interest. This phase can be expensive in the early phases of the use of the instrument. Nevertheless, by collecting this calibration information for different types of crop, a database of model parameters could be implemented, avoiding repeating the PLS calibration every time before using the system.
Future experimental phases should involve the assembly of the instrument directly on a harvesting machine. This will allow us to perform the MC measurements directly on crop bales.

Author Contributions

Writing—original draft preparation, G.G. and L.R.; writing—review and editing, G.G. and L.R.; project administration, L.R.; Methodology, G.G. and L.R.; software, G.G.; formal analysis, G.G. and L.R.; Validation, N.L. and L.F.; supervision N.L. and L.F. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The spectral data that support the findings of this study concerning both the system’s performance (Section 3) and in-field results (Section 4) are available from the corresponding author upon reasonable request by email: [email protected].

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. ASAE. ASAE S352.2—Moisture Measurement—Forages; American Society of Agricultural Engineers: St. Joseph, MI, USA, 2017. [Google Scholar]
  2. Moisture Analyzers. Available online: www.mt.com/int/en/home/products/Laboratory_Weighing_Solutions/moisture-analyzer.html (accessed on 6 March 2021).
  3. Agreto. Available online: www.agreto.com/en/hay-moisture-tester/ (accessed on 6 March 2021).
  4. Liang, X.; Li, X.; Lei, T. A new NIR technique for rapid determination of soil moisture content. In Proceedings of the 2012 International Conference on Systems and Informatics (ICSAI2012), Yantai, China, 19–20 May 2012; pp. 16–20. [Google Scholar]
  5. Ribeiro, L.d.S.; Gentilin, F.A.; Franca, J.A.d.; Felicio, A.L.d.S.M.; Franca, M.B.d.M. Development of a Hardware Platform for Detection of Milk Adulteration Based on Near-Infrared Diffuse Reflection. IEEE Trans. Instrum. Meas. 2016, 65, 1698–1706. [Google Scholar] [CrossRef]
  6. Wang, H.; Gao, S.; Yue, X.; Cheng, X.; Liu, Q.; Min, R.; Qu, H.; Hu, X. Humidity-Sensitive PMMA Fiber Bragg Grating Sensor Probe for Soil Temperature and Moisture Measurement Based on Its Intrinsic Water Affinity. Sensors 2021, 21, 6946. [Google Scholar] [CrossRef] [PubMed]
  7. Cassanelli, D.; Lenzini, N.; Ferrari, L.; Rovati, L. Partial Least Squares Estimation of Crop Moisture and Density by Near-Infrared Spectroscopy. IEEE Trans. Instrum. Meas. 2021, 70, 1–10. [Google Scholar] [CrossRef]
  8. Lenzini, N.; Rovati, L.; Ferrari, L. Effects of the density and homogeneity in NIRS crop moisture estimation. In Proceedings of the Optical Measurement Systems for Industrial Inspection X, Munich, Germany, 26–29 June 2017; Volume 10329, pp. 1147–1152. [Google Scholar] [CrossRef]
  9. Wold, S.; Sjöström, M.; Eriksson, L. PLS-regression: A basic tool of chemometrics. Chemom. Intell. Lab. Syst. 2001, 58, 109–130. [Google Scholar] [CrossRef]
  10. Höskuldsson, A. PLS regression methods. J. Chemom. 1988, 2, 211–228. [Google Scholar] [CrossRef]
  11. Shawky, E.; Selim, D.A. NIR spectroscopy-multivariate analysis for discrimination and bioactive compounds prediction of different Citrus species peels. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 2019, 219, 1–7. [Google Scholar] [CrossRef] [PubMed]
  12. Zhang, H.; Li, Y.; Jiang, L. Multivariate Modeling Dahurian Larch Plantation Wood Density Based on Near Infrared Spectroscopy. In Proceedings of the 2010 International Conference on Measuring Technology and Mechatronics Automation, Changsha, China, 13–14 March 2010; Volume 2, pp. 748–751. [Google Scholar]
  13. Fornasini, P. The Uncertainty in Physical Measurements: An Introduction to Data Analysis in the Physics Laboratory; Springer Science & Business Media: New York, NY, USA, 2008. [Google Scholar] [CrossRef] [Green Version]
  14. Abasi, S.; Minaei, S.; Jamshidi, B.; Fathi, D. Development of an Optical Smart Portable Instrument for Fruit Quality Detection. IEEE Trans. Instrum. Meas. 2020, 70, 1–9. [Google Scholar] [CrossRef]
  15. Rodriguez-Saona, L.E.; Fry, F.S.; McLaughlin, M.A.; Calvey, E.M. Rapid analysis of sugars in fruit juices by FT-NIR spectroscopy. Carbohydr. Res. 2001, 336, 63–74. [Google Scholar] [CrossRef]
  16. Fan, Q.; Wang, Y.; Sun, P.; Liu, S.; Li, Y. Discrimination of Ephedra plants with diffuse reflectance FT-NIRS and multivariate analysis. Talanta 2010, 80, 1245–1250. [Google Scholar] [CrossRef] [PubMed]
  17. da Silva Dias, L.; da Silva Junior, J.C.; de Souza Maudeira Felício, A.L.; de França, J.A. A NIR Photometer Prototype with Integrating Sphere for the Detection of Added Water in Raw Milk. IEEE Trans. Instrum. Meas. 2018, 67, 2812–2819. [Google Scholar] [CrossRef]
  18. Salvatori, G.; Suh, K.; Ansari, R.; Rovati, L. Instrumentation and calibration protocol for a continuous wave near infrared hemoximeter. IEEE Trans. Instrum. Meas. 2006, 55, 1368–1376. [Google Scholar] [CrossRef]
  19. Mesic, M.; Corluka, V.; Valter, Z. Analysis of some parameters influencing moisture quantity measurements in wheat with NIR technique. In Proceedings of the 2005 18th International Conference on Applied Electromagnetics and Communications, Dubrovnik, Croatia, 12–14 October 2005; pp. 1–4. [Google Scholar]
  20. Palmer, K.F.; Williams, D. Optical properties of water in the near infrared. J. Opt. Soc. Am. JOSA 1974, 64, 1107–1110. [Google Scholar] [CrossRef]
  21. Rovati, L.; Bandera, A.; Donini, M.; Salvatori, G.; Pollonini, L. Design and performance of a wide-bandwidth and sensitive instrument for near-infrared spectroscopic measurements on human tissue. Rev. Sci. Instrum. 2004, 75, 5315–5325. [Google Scholar] [CrossRef]
  22. Szłyk, E.; Szydłowska-Czerniak, A.; Kowalczyk-Marzec, A. NIR Spectroscopy and Partial Least-Squares Regression for Determination of Natural α-Tocopherol in Vegetable Oils. J. Agric. Food Chem. 2005, 53, 6980–6987. [Google Scholar] [CrossRef] [PubMed]
  23. García-Sánchez, F.; Galvez-Sola, L.; Martínez-Nicolás, J.J.; Muelas-Domingo, R.; Nieves, M. Using near-infrared spectroscopy in agricultural systems. Dev. Near-Infrared Spectrosc. 2017, 1, 97–127. [Google Scholar]
Figure 1. CAD image and a picture of the NIRS instrument measuring head. On the top-left, the orange area indicates optical-component housing, while on the right, the blue area indicates the electronic component housing. A is the hole-mounting for the 24 mm diameter optical sapphire window. A mechanical flap that can slide horizontally is used to open or close the reading window. B is the mounting hole for the halogen lamp marked with D. C is the optical fiber head holder. E is the OH-silica optical fiber connected to the Insion spectrometer J. F is an 80 mm cooling fan for the halogen lamp. G and I are the control and conditioning boards, respectively. H is the MCU board provided with a PIC32 microcontroller. K is a DC–DC converter used to supply the 12 V to the lamp and the cooling fan.
Figure 1. CAD image and a picture of the NIRS instrument measuring head. On the top-left, the orange area indicates optical-component housing, while on the right, the blue area indicates the electronic component housing. A is the hole-mounting for the 24 mm diameter optical sapphire window. A mechanical flap that can slide horizontally is used to open or close the reading window. B is the mounting hole for the halogen lamp marked with D. C is the optical fiber head holder. E is the OH-silica optical fiber connected to the Insion spectrometer J. F is an 80 mm cooling fan for the halogen lamp. G and I are the control and conditioning boards, respectively. H is the MCU board provided with a PIC32 microcontroller. K is a DC–DC converter used to supply the 12 V to the lamp and the cooling fan.
Photonics 09 00178 g001
Figure 2. Block function diagram of the developed measuring system.
Figure 2. Block function diagram of the developed measuring system.
Photonics 09 00178 g002
Figure 3. The normalized emission spectrum of the halogen lamp Decostar 51 ALU by OSRAM GmbH©.
Figure 3. The normalized emission spectrum of the halogen lamp Decostar 51 ALU by OSRAM GmbH©.
Photonics 09 00178 g003
Figure 4. (a) Intensities I R R T (blue line) and I S 099 (red line) back-reflected by the instrument reflectance reference target and reflectance standard S 099 , respectively. Both dark intensities I D a r k A and I D a r k I (yellow line) were almost equal over the measured spectral range. (b) Reflectivity of the instrument reflectance reference target (RRT) obtained from Equation (7).
Figure 4. (a) Intensities I R R T (blue line) and I S 099 (red line) back-reflected by the instrument reflectance reference target and reflectance standard S 099 , respectively. Both dark intensities I D a r k A and I D a r k I (yellow line) were almost equal over the measured spectral range. (b) Reflectivity of the instrument reflectance reference target (RRT) obtained from Equation (7).
Photonics 09 00178 g004
Figure 5. Warm-up reflectivity measurement performed on the NIST standard diffuser S 050 . Orange dots: 240 measurements of the R S 050 ¯ over the 120 min warm-up test. Blue dash–dot line: fit of experimental data to an exponential decay function.
Figure 5. Warm-up reflectivity measurement performed on the NIST standard diffuser S 050 . Orange dots: 240 measurements of the R S 050 ¯ over the 120 min warm-up test. Blue dash–dot line: fit of experimental data to an exponential decay function.
Photonics 09 00178 g005
Figure 6. (a) Reflectance sensitivity measurement. Normalized spectra distribution acquired from back–scattered light of different NIST standard diffusers. The solid blue line (1) refers to R S 099 , dotted orange line (2) to R S 075 , ∘ yellow marks (3) to R S 050 , and dash–dot purple (4) to R S 002 . (b) Linearity in reflectivity measurement of a different NIST standard diffuser. * marks show experimental data obtained from the mean of reflectance distributions from Figure 6a. Solid blue line is the ideal behavior.
Figure 6. (a) Reflectance sensitivity measurement. Normalized spectra distribution acquired from back–scattered light of different NIST standard diffusers. The solid blue line (1) refers to R S 099 , dotted orange line (2) to R S 075 , ∘ yellow marks (3) to R S 050 , and dash–dot purple (4) to R S 002 . (b) Linearity in reflectivity measurement of a different NIST standard diffuser. * marks show experimental data obtained from the mean of reflectance distributions from Figure 6a. Solid blue line is the ideal behavior.
Photonics 09 00178 g006
Figure 7. Repeatability test performed over a 13 h long session. * blue markers represent the S 050 reflectivity measurements. The red dash–dot line is the average reflectivity value, and the light green area corresponds to the region delimited by the standard deviation of the entire set.
Figure 7. Repeatability test performed over a 13 h long session. * blue markers represent the S 050 reflectivity measurements. The red dash–dot line is the average reflectivity value, and the light green area corresponds to the region delimited by the standard deviation of the entire set.
Photonics 09 00178 g007
Figure 8. Correlation coefficients between reference, i.e., SUT MC and ρ , and predictor, i.e., first derivative of L A S U T ( λ ) , variables. The dash–dot line relates to SUT MC while dashed orange line to SUT ρ . The light-blue region defines the spectral band of interest (BOI) where the first derivative of L A S U T ( λ ) is correlated maximally with SUT MC and minimally with SUT ρ .
Figure 8. Correlation coefficients between reference, i.e., SUT MC and ρ , and predictor, i.e., first derivative of L A S U T ( λ ) , variables. The dash–dot line relates to SUT MC while dashed orange line to SUT ρ . The light-blue region defines the spectral band of interest (BOI) where the first derivative of L A S U T ( λ ) is correlated maximally with SUT MC and minimally with SUT ρ .
Photonics 09 00178 g008
Figure 9. Calibration PLS response variables as a function of the reference values (a). Predicted vs. reference moisture content for the calibration dataset (b).
Figure 9. Calibration PLS response variables as a function of the reference values (a). Predicted vs. reference moisture content for the calibration dataset (b).
Photonics 09 00178 g009
Figure 10. Validation PLS response variables as a function of the reference values (a). Predicted vs. reference moisture content for the validation dataset (b).
Figure 10. Validation PLS response variables as a function of the reference values (a). Predicted vs. reference moisture content for the validation dataset (b).
Photonics 09 00178 g010
Figure 11. Root mean square relative error of the MC estimations. (a) Results obtained for the calibration dataset and (b) for the validation dataset. The red dash–dot lines are the means of single measurements: C_MEAN_ERR in (a) and V_MEAN_ERR.
Figure 11. Root mean square relative error of the MC estimations. (a) Results obtained for the calibration dataset and (b) for the validation dataset. The red dash–dot lines are the means of single measurements: C_MEAN_ERR in (a) and V_MEAN_ERR.
Photonics 09 00178 g011
Table 1. OSRAM Decostar 51 ALU halogen lamp’s specifications.
Table 1. OSRAM Decostar 51 ALU halogen lamp’s specifications.
Electrical Parameters
Nominal Power20.0 W
Nominal Voltage12.0 V
Photometric Parameters
Optical Power0.81 W/sr
Color Temperature2800 K
Illuminometric Parameters
Beam Size36
Table 2. Statistical results of the PLS model. C-RMSE and C- R 2 refer to the calibration dataset’s root mean square error and R-squared values; V-RMSE and V- R 2 refer to the validation dataset’s equivalents. C_MEAN_ERR and V_MEAN_ERR are the mean relative errors for the calibration and validation datasets, respectively.
Table 2. Statistical results of the PLS model. C-RMSE and C- R 2 refer to the calibration dataset’s root mean square error and R-squared values; V-RMSE and V- R 2 refer to the validation dataset’s equivalents. C_MEAN_ERR and V_MEAN_ERR are the mean relative errors for the calibration and validation datasets, respectively.
ParameterResults
C-RMSE0.1671
C- R 2 0.9507
V-RMSE0.0897
V- R 2 0.9846
C_MEAN_ERR14.83%
V_MEAN_ERR7.11%
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Gibertoni, G.; Lenzini, N.; Ferrari, L.; Rovati, L. Design and Performance of a Near-Infrared Spectroscopy Measurement System for In-Field Alfalfa Moisture Measurement. Photonics 2022, 9, 178. https://doi.org/10.3390/photonics9030178

AMA Style

Gibertoni G, Lenzini N, Ferrari L, Rovati L. Design and Performance of a Near-Infrared Spectroscopy Measurement System for In-Field Alfalfa Moisture Measurement. Photonics. 2022; 9(3):178. https://doi.org/10.3390/photonics9030178

Chicago/Turabian Style

Gibertoni, Giovanni, Nicola Lenzini, Luca Ferrari, and Luigi Rovati. 2022. "Design and Performance of a Near-Infrared Spectroscopy Measurement System for In-Field Alfalfa Moisture Measurement" Photonics 9, no. 3: 178. https://doi.org/10.3390/photonics9030178

APA Style

Gibertoni, G., Lenzini, N., Ferrari, L., & Rovati, L. (2022). Design and Performance of a Near-Infrared Spectroscopy Measurement System for In-Field Alfalfa Moisture Measurement. Photonics, 9(3), 178. https://doi.org/10.3390/photonics9030178

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