Application of a Spectroscopic Analysis-Based Portable Sensor for Phosphate Quantitation in Hydroponic Solutions

Hydroponic plant culturing requires the concentration of nutrients in the supplied solution to be maintained at a constant level. For example, phosphate ion concentration directly affects crop growth, which necessitates the development of convenient and rapid techniques for on-site phosphate quantitation. Herein, we developed a new low-cost colorimetric method of quick onsite phosphate quantitation based on a modification of the conventional molybdenum colorimetric method. Specifically, the nutrient solution treated with ascorbic acid and molybdate was analyzed by colorimetric method after 10min incubation, and a phosphate quantitation protocol was proposed. To verify this protocol, 50 nutrient solution samples with concentrations of 0–200 ppm were used to develop a model and perform a validation experiment, and the PLSR (Partial Least Squares Regression) and PCR (Principal Component Regression) models were developed and validated using a crossvalidation method and sample transmission spectra. The PLSR model, employing smoothing preprocessing at a 5 nm wavelength spacing, exhibited the best prediction performance and showed an error of ~10% within the measurement range during verification. In addition, an artificial neural network-based model achieved R2 = 0:93 for the training set and R2 = 0:86 for the validation set. Finally, we developed convenient-to-use software for phosphate ion quantitation by the presented method and performed a demonstration test.


Introduction
Hydroponic cultivation in greenhouses is a method of growing plants, which is already widely used in many countries. Modernized greenhouses generally use a nutrient solution supply system where a concentrated nutrient solution is diluted~100-fold with raw water and adjusted to electrical conductivity (EC) to supply to crops [1,2]. Unfortunately, this EC-based method does not allow us to determine the concentrations of individual ion. Besides, the optimal nutrient supply varies with weather and crop conditions and the ion balance in the nutrient solution can hardly be maintained [3], since an increase or decrease of the concentration of a particular ion may result in ionic imbalance, which complicates the efficient management of optimal ion concentration at each crop growth stage. That is why the development of an appropriate nutrient concentration sensing technique for individual ion is needed.
Among the ions contained in nutrient solutions supplied to greenhouse-cultured crops, the phosphate ion (PO 4 3− ) is one of the most essential macronutrients [4][5][6]. Phosphate ions affect the energy metabolism of plants and are the leading nutrient that can be utilized by microorganisms and plants [7], for performing photosynthesis and respiration of plant growth [8]. Since plant growth is critically affected by both excess and lack of phosphate ions, it is necessary to develop a technique of quick phosphate ion quantitation to prevent unbalanced plant growth.
The reliable method to determine the phosphate concentration is the spectrophotometric molybdenum blue method, which is generally developed by Murphy and Riley [9]. The molybdenum blue method is a colorimetric approach, and this is commonly used to determine the concentration of chemical elements in solutions by using a color-generating reagent in a simple way [10]. This method involves the reaction of acid ammonium molybdate with phosphate ions to form phosphomolybdenum complexes [11], which are reduced to molybdenum blue by strong acid condition using ascorbic acid and sulfuric acid.
In previous studies, using a modified molybdenum blue method was applied to measure the phosphate ion concentration of the water by absorbing a light source and by using a transmitted spectrum that measured at 700 nm-850 nm [11,12]. However, this method needs a spectrometric laboratory analyzer to determine the exact phosphate concentration and is high-cost. Several simple spectrophotometers that spend low-cost are reported [13,14]. Unfortunately, these spectrophotometers were able to detect clear reagents and were less than ideal to detect phosphate ions in nutrient solution that complexes a number of ions.
This study is mainly aimed at developing a portable phosphate ion sensor that is a modified method based on the molybdenum blue colorimetric method and visible range (400-700 nm) spectroscopic analysis characterized by a short response time and low-cost. Images of the nutrient solution after light transmission were obtained and converted to spectral data, and then, prediction models were developed using PLSR, PCR and partial component regression (PCR), and artificial neural network (ANN) techniques. Given the variety of ions present in the nutrient solution, ANN manages nonlinear multivariate interactions based on knowledge storage and learning and properties that control the number of hidden neurons and hidden layers, making it a suitable way to predict phosphate ion concentrations in the nutrient solution [15][16][17][18]. Regression models were developed by applying the crossvalidation method and evaluated by the software which is able to display the estimated concentration of phosphate ions.

Materials and Methods
To analyze phosphate ion concentrations in nutrient solution, two types of phosphate ion samples (distilled waterand nutrient solution-based ones) were prepared for each concentration. The former samples were used to analyze the correlation between phosphate ion concentration and wavelength, while the latter ones were used to develop models for predicting phosphate ion concentration. Regression models for predicting phosphate ion concentrations in nutrient solution were developed using tomato nutrient solution-based samples prepared by diluting high-concentration nutrient solutions A and B, which were obtained by referring to the Yamazaki nutrient solution (1978), as presented in Table 1. In total, 50 samples with concentrations of 10-200 ppm (interval = 5 -10 ppm) were prepared.
The commercially available Desktop Spectrometer Kit 3.0 (Public Lab Store, MA, USA; Figure 1) was used to record transmission spectra and develop models for pre-dicting phosphate ion concentration in the nutrient solution. The above device employed an optimal DVD, which was used as a diffraction plate, and we obtained images of diffracted light at each wavelength through a camera. The thus obtained images were not immediately utilized for analysis but were converted to spectral data to clearly see the difference of wavelength according to color.
The desktop spectrometer used in the experiment featured an outer shell made of paper. Moreover, slightly different results were obtained even if the same sample was used, depending on the light source. Accordingly, a portable spectrum acquisition device was constructed by firmly fixing a desktop spectrometer inside a plywood darkroom containing a white light-emitting diode (LED) as an artificial light source ( Figure 2). For diffraction, patterned plastic was separated from the back of the DVD (digital video disk) and firmly fixed to the spectrometer at an angle that allowed smooth spectrum acquisition. Generally, DVD consists of two plates, one of which was engraved with a narrow pattern of 400 μm for grating, so it can be replaced instead of a costly spectrometer grating. A cuvette holder was used to prevent any other light from interfering with the light emitted by the LED lamp powered 220 V AC, which penetrated the solution and entered the slit. Table 2 presents the specifications of the measurement device camera and the light source installed inside the darkroom. The spectrophotometer used in this study used a white LED to obtain images of the transmitted light source.

Journal of Sensors
Total phosphorus determination is commonly performed by spectrophotometric detection relying on the wellestablished molybdenum blue reaction chemistry [19]. The molybdate-based colorimetric method proposed by [20] requires four samples, and the color reaction takes about 30 min to develop. Another molybdate colorimetric method developed by [9] comprises five stages and employs four chemicals (sulfuric acid, ammonium molybdate, ascorbic acid, and potassium antimonyl tartrate) for reagent fabrication, requiring a certain time for the above components to react. Since a simpler method was needed to develop a portable phosphate ion measurement device, the color reaction stage was simplified by using only molybdate and ascorbic acid. The minimum reaction time was set to 10 min to detect colors at a lower concentration since the sample with a concentration over 200 ppm had an excessive reaction and the light transmission amount was too small to detect in the case of the over 10 min reaction.
The portable spectrometer was used to characterize the color reaction between the molybdate/ascorbic acid mixture and 50 phosphate ion samples with different concentrations. For the experiment, 10 g of molybdate was dissolved in 40 mL of distilled water upon stirring. Likewise, 6.6 g of ascorbic acid was dissolved in 50 mL of distilled water, and the obtained solution was mixed with that containing molybdate. Figure 3 shows the operation protocol of the portable phosphate ion sensor.
Light transmitted through samples was captured by the camera of the spectrum acquisition device. Pixel values of   3 Journal of Sensors image zones were converted to R, G, and B values to obtain an average spectrum in the visible range (400-800 nm). The obtained spectral images of the sample were separated into three channels of R, G, and B to achieve intensity histograms of pixels along with each channel. The histogram of B was placed at 401-600 nm, the histogram of G was placed at 501-700 nm, and the histogram of R was placed at 601-800 nm, and then, the overlapped parts were summed, and all channels were converted to a spectrum in full range.
Prediction (regression) models were developed by applying the PLSR, PCR, and ANN techniques to spectral data obtained for each of the 50 phosphate ion samples. In the PLSR technique, which is related to multivariate calibration for spectrum analysis [21], the regression equation is derived by analyzing spectral data (that is, the main components of independent variables) and determining new variables based on the actually measured dependent variables [22]. Additionally, factors of the PCR are related to variation in the response measurement regressed against the effect of significance [23] and also frequently used for quantitative spectrum analysis. The ANN prediction method infers output layers from input layers by using hidden layers and can assess the prediction accuracy of the developed model [24]. The Levenberg-Marquardt backpropagation, currently utilized in the MATLAB ANN tool, was used for ANN training.
Smoothing (moving average), standard normal variate transformation (SNV), multiple scatter correction (MSC), and the first derivation method were used for spectral data preprocessing together with conventional methods. Specifically, smoothing was used to remove noise or light/electric signal interferences, and SNV and MSC were used for excluding all influences except for those of spectrum components; i.e., the above techniques removed disturbances such as those due to light scattering while retaining information included in the spectrum. The analysis results were expressed as Equation ((1)), including the coefficients of determination (R C 2 andR V 2 ), root mean square errors of calibration (RMSEC), and root mean square errors of prediction (RMSEP) for regression model accuracy and relative percentage difference (RPD) for triplet independent tests.
where N is the number of samples, y i is the measured data, y is the mean of measured data, n and m are the number of samples used for calibration and validation, respectively, and l is the number of samples used for the independent test set. Figure 4 shows the correlation between phosphate ion concentration and spectrum value of 50 nutrient solution samples at each wavelength, demonstrating the presence of a strong negative correlation in the wavelength range of 450-700 nm. Although the optimal wavelength is 820 nm for the method proposed by Murphy and Riley [9], the correlation coefficient around -0.9 in a range of 550 and 640 was considered to be useful for selecting an effective wavelength band. It is judged that the reason why between the transmitted light and the phosphate ion concentration in the entire visible region is due to the yellow and blue colors after the reaction. In addition, it is considered that the high sensitivity of the equipment affected the strong correlation in the middle of the measurement area.  Journal of Sensors Figures 5 and 6 show the spectra and appearance, respectively, of 50 phosphate ion nutrient solution samples with concentrations of 0-200 ppm processed as described above. Since sample absorbance after color development is proportional to phosphate ion concentration, the intensity of the blue color increased with increasing phosphate concentration, while the corresponding transmission values concomitantly decreased. The presented spectra were derived from pixel values of captured images. For this reason, peaks of the R, G, and B wavelength bands were identified. Table 3, smoothing, SNV, MSC, and first-derivative methods were applied to the PLSR and PCR models developed based on 50 spectral datasets. Notably, the best RMSEP value (18.00) was obtained for the PLSR model involving smoothing preprocessing at a 5 nm wavelength interval, while the corresponding RMSEC, R C 2 , and R V 2 values equaled 14.90, 0.92, and 0.88, respectively (Figure 7). The error was determined as 18.00 ppm, which was within 10% of the total measurement range of phosphate ion concentration. Notably, the error of two-step preprocessing, which combined smoothing with either SNV or MSC, exceeded that of one-step preprocessing, since the light absorption zone of the main wavelength band could not be detected in the former case.

Result of ANN Model Validation.
A previous work on the analysis of nonlinear multiple regression models reported that ANN exhibited a more appropriate structure and produced better results than PLSR and PCR [25,26]. To develop an  5 Journal of Sensors ANN model, 30 spectral datasets with high correlation values in the wavelength range of 400-800 nm were selected and used as input data, and the thus developed model was trained using Levenberg-Marquardt backpropagation to prevent overfitting. Since the computation load became overly large when all spectral data were used as input, only the top 15 datasets with respect to the correlation value (obtained by correlation analysis) were used for model development, and a training period of five epochs proved to be most suitable (Figure 8). Figure 9 shows the training and validation results of the developed model. In the case of training, R 2 and RMSEP values of 0.93 and 13.56, respectively, were observed, while values of 0.86 and 15.80, respectively. Compared to the existing PLSR model, the ANN model featured a similar coefficient of determination (R 2 ) but performed slightly better in terms of RMSE.

Development of Phosphate Ion Measurement Software and Demonstration Test
Results. Finally, we developed software for the above phosphate ion quantitation method relying on the simple protocol and the PLSR-based prediction model. Specifically, a nutrient solution sample was reacted with the molybdate-ascorbic acid solution for 10 min and transferred into a 4.5 mL cuvette. The cuvette was installed in a cuvette holder, and the measurement was started by clicking the "Measure" button. As shown in the left image of Figure 10, the software displayed predicted spectral concentrations (ppm). A measurement image is provided in a separate window on the right side.
The independent test set validation was conducted to evaluate the software. Tomato nutrient solution samples with phosphate concentrations of 33.33, 50, and 120 ppm were prepared, and each sample was measured 3 times, with the obtained results listed in Table 4. When the concentration was as low as 33.33 ppm, the error equaled 9.91%, whereas a smaller value of 6.10% was obtained for a high concentration of 120 ppm. In addition, RPD showed less than 10%, which satisfies the field precision limit, and also showed a similar pattern as an error. Since a deeper color developed at high concentrations, the prediction was more accurate at high concentrations. This error and RPD level seem to be applicable for quantifying phosphate ion concentrations (0~1200 ppm) in nutrient solutions conventionally used in hydroponic farms [3].

Journal of Sensors
The proposed sensing method describes a new low-cost colorimetric sensor of the quick phosphate quantitation based on a modification of conventional molybdenum colorimetry and develops predictive models based on the PLSR, partial component regression, and ANN techniques. In addition, the portable sensor has the advantage of being more low-cost than the other sensors used in agriculture [12,13,27]. In the case of phosphate ions, the conventional method needed various reagents, and the proposed method is to be used in a simple manner using only 2 reagents, which are complicated but essential procedures. In addition, the portable spectrometer is a low-cost product that can be used in agricultural fields because it used a low-cost Public Lab product instead of a costly spectrometer. However, the next step of this research is to consider the reaction time of 10 minutes and the stabilization stage of the device.

Conclusions
Herein, we developed a low-cost device for quantitation of phosphate ions in nutrient solution and verified its performance. Specifically, a simplified version of the molybdenum blue colorimetric method was employed. Sample images captured by a camera were converted to transmission spectra within a wavelength range of 400-800 nm. Spectra of 50 nutrient solution samples with concentrations of 0-200 ppm were acquired for the development of the PLSR, PCR, and ANN models, which were evaluated through crossvalidation. The PLSR model, which was developed by subjecting spectral data to smoothing preprocessing at the 5 nm wavelength interval, exhibited the best predictive power, featuring RMSEC = 14:885, R C 2 = 0:919, RMSEP = 17:998, and R V 2 = 0:88. The corresponding error equaled 18.0 ppm, which was within 10% of the total measurement range for the phosphate ion. It is necessary to apply various regression techniques to increase the precision of the predictive model, but it seems suitable for use in agricultural field applications. Finally, to facilitate the application of the above model, we developed software for phosphate ion quantitation and utilized it in a demonstration test. The developed portable phosphate ion sensor featured a shorter processing time (~10 min) and lower price than existing colorimetric sensors and should, therefore, be easy to commercialize for farm applications. Moreover, apart from nutrient solution analysis, the developed technique could also be used to assess the extent of the river, stream, and soil eutrophication.

Data Availability
The data used to support the findings of this study are included within the article.