Next Article in Journal
Predicting the Impact of Managerial Competencies on the Behavioral Outcomes of Employees in the Selected Manufacturing Firms in Nigeria
Previous Article in Journal
Health and the Urban Environment: A Bibliometric Mapping of Knowledge Structure and Trends
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Using Machine Learning for Nutrient Content Detection of Aquaponics-Grown Plants Based on Spectral Data

1
College of Biosystems Engineering and Food Science, Zhejiang University, Hangzhou 310058, China
2
Key Laboratory of Spectroscopy Sensing, Ministry of Agriculture and Rural Affairs, Hangzhou 310058, China
3
Department of Soil and Water Sciences, Faculty of Environmental Agricultural Sciences, Arish University, El-Arish 45516, Egypt
4
Agricultural Engineering Department, Faculty of Agriculture, Suez Canal University, Ismailia 41522, Egypt
5
College of Science and Humanities-Huraymila, Imam Mohammed Bin Saud Islamic University (IMSIU), Riyadh 11432, Saudi Arabia
6
Department of Biology, College of science, Princess Nourah bint Abdulrahman University, P.O. Box 84428, Riyadh 11671, Saudi Arabia
7
College of Mechanical and Electronic Engineering, Nanjing Forestry University, Nanjing 210037, China
*
Author to whom correspondence should be addressed.
Sustainability 2022, 14(19), 12318; https://doi.org/10.3390/su141912318
Submission received: 24 August 2022 / Revised: 22 September 2022 / Accepted: 24 September 2022 / Published: 28 September 2022

Abstract

:
Nutrients derived from fish feed are insufficient for optimal plant growth in aquaponics; therefore, they need to be supplemented. Thus, estimating the amount of supplementation needed can be achieved by looking at the nutrient contents of the plant. This study aims to develop trustworthy machine learning models to estimate the nitrogen (N), phosphorus (P), and potassium (K) contents of aquaponically grown lettuce. A FieldSpec4, Pro FR portable spectroradiometer (ASD Inc., Analytical Spectral Devices Boulder, Boulder, CO, USA) was used to measure leaf reflectance spectra, and 128 lettuce seedlings given four NPK treatments were used for spectra acquisition and total NPK estimation. Principal component analysis (PCA), genetic algorithms (GA), and sequential forward selection (SFS) were applied to select the optimal wavebands. Partial least squares regression (PLSR), back-propagation neural network (BPNN), and random forest (RF) approaches were used to develop the predictive models of NPK contents using the selected optimal wavelengths. Good and significantly correlated predictive accuracy was obtained in comparison with the laboratory-measured freshly cut lettuce leaves with R2 ≥ 0.94. The proposed approach provides a pathway toward automatic nutrient estimation of aquaponically grown lettuce. Consequently, aquaponics will become more intelligent, and will be adopted as a precision agriculture technology.

1. Introduction

In a symbiotic closed environment, fish, hydroponic plants, and nitrifying bacteria are all combined in the integrated farming concept known as aquaponics. Aquaponics tries to transform nutrients derived from fish excrement into beneficial plant biomass. These nutrients must be supplemented since they are insufficient for optimal plant growth in aquaponics systems [1]. Nitrogen (N), phosphorous (P), and potassium (K) are the most important macronutrients needed in abundance by plants [2]. NPK are essential components of cellular biomolecules, such as nucleic acids, proteins, chlorophyll, and growth regulators. Potassium has several important functions related to enzyme activation, osmotic regulation, swelling generation, and cell expansion [3]. The deficiency of any of these nutrients may decrease the photosynthesis rate and consequently decrease the content of chlorophyll and pigments—a hindrance to the branches’ growth and branching— and cause a dark green coloration of leaves, and necrosis of old leaves [4]. As a result, the traceability of these nutrients in plants is one of the very crucial procedures that should not be neglected or ignored.
The most widely used methods for detecting the status of nutrients in the past were laboratory-based chemical analysis and farmers and experts relying solely on their eyesight. The naked eye is inaccurate, and its diagnosis may be ambiguous and unreliable. Chemical analyses can accurately diagnose nutritional status, but they are also plagued by issues, including lengthy processing times, their labor-intensive nature, high costs, and the requirement for chemical reagents [5]. Computer vision is a potent and promising technique that can replace conventional methods in fields of life [6]. Computer vision algorithms have been used to identify plant diseases, nutritional deficits, and chlorophyll levels [7]. These methods have certain limitations, such as the fact that early detection is missed because they depend on the plant showing symptoms. Along with the similarities in symptoms between deficiencies in specific nutrients, such as potassium and phosphorus, a misleading diagnosis may occur [8], in addition to camera-related factors, such as lighting conditions and response to camera sensor changes in plant surface properties [9].
More recently, contemporary and non-destructive technologies have been applied to evaluate the nutritional status of plants in real time, such as spectroscopic technologies. The spectroscopic analysis is a promising, rapid, and reliable technique for evaluating the biochemical and physiological properties of plants [10,11]. Spectroscopy consists of three spectral wave band regions: the visible (VIS) 400–700 nm bandwidth, near-infrared (NIR) 700–1100 nm bandwidth, and shortwave infrared (SWIR) 1100–2500 nm bandwidth. Spectroscopy has been utilized in numerous scientific contributions to estimate the nutrients of plants [12]. In concrete terms, research has shown an empirical relationship between the spectral reflectance of leaves and morphological and physiological leaf conditions, such as water content [13], cell distribution and arrangement, blade surface wax, crops kernel variety identification [14], and biochemical components [15,16]. The visible spectral range (the blue region) is related to the nitrogen and potassium content in plant leaves [17], while the spectral ranges 350–730 nm and 1420–1800 nm are related to phosphorous concentration [16]. Therefore, the nitrogen, phosphorous, potassium, or other biochemical content of plants can be estimated using visible and near-infrared (Vis–NIR).
To estimate a specific nutrient, it must be spectroscopically distinguished from other influencing nutrients. Generally, the spectral responses of plants to environmental conditions that impede growth show increased reflectance in the visible (380–720 nm) or infrared (720–1500 nm) range [2]. For instance, Masoni et al. (1996) investigated the impact of Fe, S, Mg, and Mn deficiency on the spectra of sunflower, maize, and barley leaves, and concluded that the deficiency of these nutrients reduces the content of chlorophyll in the leaves, which in turn increases the spectral reflectance of the leaves [18]. Additionally, to evaluate the quality of spinach leaves, Diezma et al. used two spectral waveband regions: infrared (750–900 nm) and visible (506–614 nm). They used PLSR and discriminant analysis to discover five wavebands, which were 519, 538, 646, 750, and 900 nm [19]. Liu et al. stressed that vegetation, chlorophyll absorption, and infrared reflectance are decreased due to structural changes in the plant [20]. Likewise, Eshkabilov et al. demonstrated that spectroscopic analysis in the 400–1000 nm bandwidth can be used to detect the nutrient content of lettuce leaves [21].
The size of the spectral data is enormous, in addition to containing noisy data; therefore, analyzing it in its raw form may lead to misleading results. Consequently, we must resort to reducing the data size by selecting the optimal wavelengths that convey crucial information about the target. Principle component analysis (PCA), genetic algorithms (GA), analysis of variance (ANOVA) [22], correlation analysis [23], and sequential forward selection (SFS) [24] are some of the techniques used to identify the optimal wavelengths. SFS is a well-known technique for identifying differences both within and between samples [24].
Several statistical data analysis tools have been used to analyze spectral data, including multiple linear regression (MLR), partial least squares regression (PLSR), support vector machine (SVM), a back-propagation neural network (BPNN), and the random forest (RF) model. The nutritional contents of plant leaves can be accurately estimated and predicted using the partial least squares regression (PLSR) approach [21]. One of the most well-known and commonly applied neural networks for determining the biomass and biochemical contents of plants and forecasting their yields is the BPNN [25]. Random forest (RF) is a well-known supervised regression statistical model used in machine learning that is both accurate and has good fault-tolerance [26].
The application of modern technologies such as artificial intelligence, computer vision, and spectral analysis to develop aquaponics systems has not received the attention it deserves in the scientific community. With the help of non-destructive spectroscopic methods, this study intends to develop a machine learning model to accurately predict the nitrogen (N), phosphorus (P), and potassium (P) levels of lettuce grown in aquaponics systems. The following were our specific goals: (1) selecting the optimal wave bands sensitive to the targeted nutrients; and (2) developing a discriminant model to predict the N, P, and K levels of plants.

2. Materials and Methods

2.1. Chemicals and Plants

As a plant nutrient solution, Hoagland’s standard solution was employed. The following substances, at concentrations of 101.1, 236.1, 136.1, and 246.5 g per 1 L of distilled water, respectively, were used to make Hoagland’s solution: potassium nitrate (KNO3), calcium nitrate tetrahydrate (Ca(NO3)2·4H2O), monopotassium phosphate (KH2PO4), and magnesium sulfate heptahydrate (MgSO4·7H2O). Manganese chloride tetrahydrate (MnCl2·4H2O), zinc sulfate heptahydrate (ZnSO4·7H2O), boric acid (H3BO3), sodium molybdate (NaMoO4), and copper sulfate pentahydrate (CuSO4·5H2O) were all added to the solution in quantities of 1.8 g, 0.2 g, 2.8 g, 0.025 g, and 0.1 g, respectively; FeEDTA iron chelates were also included in the solution. All of these chemicals were purchased from Shhushi Ltd. (Jing’an, Shanghai, China). Romaine lettuce (var. longifolia) seedlings were used, which were purchased from the PengJi Industrial Zone, (Liantang, Luohu District, Shenzhen, Guangzhou, China).

2.2. Experimental Setup

Experiments were conducted on the rooftop of the College of Biosystems Engineering and Food Science at Zhejiang University in the Hangzhou, Zhejiang Province, China (30°16′ N, 120°07′07′ E). The proposed method’s flowchart is shown in Figure 1. A greenhouse with an area of 36 m2 (3 m wide × 12 m long) was designed and constructed on the rooftop of the aforementioned college. Inside this greenhouse, an aquaponics system was constructed based on the design recommendations provided in the book “Small-scale aquaponic food production” [27]. Accordingly, various environmental factors, such as temperature and humidity, were partially controlled. For spectra acquisition, four nutritional levels were applied. The sole source of nutrients in system A was fish feed (aquaponics); in system B, nutrients from the fish feed were supplemented with KNO3 and KH2PO4 at 25 and 34 g per 1 L of solution. Additionally, fish feed supplemented with KNO3 and KH2PO4 at 50 and 68 g per 1 L of the solution provided the nutrients for system C. As a control, full-strength Hoagland’s solution was given to system D. Using tub cultures (Figure 2), systems B, C, and D were prepared. All two-week-old seedlings were transferred to tub cultures. The nutrition solution in each tub was aerated using aeration pumps that utilized silicone tubing and an air diffuser stone. Electrical conductivity (EC) (0.1 dSm−1) and pH (6.9) [1] were measured three times daily to monitor the nutrient concentration and, if necessary, replenish the nutrient solutions. Each system received 32 seedlings for a total of 128 plants.

2.3. Measurement of Spectral Reflectance

The leaf spectral measurements were performed using a FieldSpec4, Pro FR portable spectroradiometer (ASD Inc., Analytical Spectral Devices Boulder, Boulder, CO, USA). The spectroradiometer has relative radiation between wavelengths of 350 to 2500 nm VIS–NIR–SWIR, using an optical fiber of 25° FOV. The spectral sampling interval was 1 nm; therefore, each raw spectrum had 2151 data points. Figure 3 shows the raw spectra of lettuce leaves. After transplantation, all plants were measured at four different times: four weeks (7 true leaves stage), five weeks (12 true leaves stage), six weeks (15 true leaves stage), and seven weeks (maturity). Each time, the plants were measured, harvested, dried, and subjected to chemical analysis. Eight plants from each nutritional level were chosen at random each time, with three leaves chosen from each plant. To account for in-leaf variability, six spectral measurements of each leaf were performed at the tip, middle, and base regions, avoiding the midrib region. There were a total of 2304 (128 plant × 3 leaf × 6 measurements) reflectance measurements as a result of this. Measurements were also made consistently from leaves and the adaxial side. The scans were then averaged to represent the spectral reading from that plant.

2.4. Chemical Analysis

Scanned leaves were collected, dried, and acid-digested (2N HCl), and their N, P, and K content were determined. Phosphorus (P) and potassium (K) were measured using optical emission spectrometry (ICP–OES) [28]. Total nitrogen (N) was determined using the Kjeldahl method (BUCHI, Digest automat K-439 and Distillation Kjelflex K-360, Flawil, Switzerland) [29].

2.5. Preprocessing of Spectral Data

The following modeling procedures may be hampered by the high dimension and containment of inappropriate information that characterizes raw spectral data in general. Therefore, this information was eliminated using spectrum preprocessing techniques [30]. Furthermore, these techniques try to reduce noise while enhancing the target’s relevant and significant information. Several frequently used spectral data preprocessing techniques were applied in this study, including light scatter and baseline correction (multiplicative scatter correction (MSC) and standard normal variate (SNV)) to correct light scattering variation and baseline in reflectance spectroscopy. In addition to decreasing scattering in the NIR [31], data enhancement (normalization and mean center) was also used to reduce redundant information. The median filter method reduces the effect of noise, thereby providing smoother spectra. A Savitzky–Golay filter was then used to smooth down the spectral data [32]. Then, the data were split into training, validation, and testing, where 70% (1612 samples) was used for the training and validation process of the regression models, while the other 30% (692 samples) was used to verify the model’s performance by comparing the expected NPK values with the measured values. The open source program HSI-PP was used to perform pre-processing, waveband selection, and statistical analyses [33].

2.6. Multivariate Analysis

2.6.1. Optimal Wavelength Selection

Analyzing raw spectral data may lead to misleading results in addition to overlapping linear relationships and redundancy of spectral data. In light of this, selecting the optimal wavelength is a very effective method for optimizing spectral data analysis. Maximizing the efficiency of the prediction model, reducing the amount of data, and lowering the impact of non-informational wavelengths are all achieved by selecting wavelengths that contain the most significant information about the target. In this study, optimal wavelengths were selected using PCA loadings, GA, and SFS.
PCA is a qualitative analysis strategy commonly used for spectral data analysis. PCA linearly converts the original data variables into new orthogonal variables (called principal components, or PCs). The new variables are categorized by data variances; most of the target’s valuable information is in the first few PCs and explains most of the overall variance. The loading vector for each PC represents the regression coefficients for each wavelength in the corresponding PC, indicating the significance of the corresponding wavelengths. Peaks and valleys for the first few PCA loading plots can be determined manually as optimal wavelengths [34].
The genetic algorithm (GA) is one of the most popular spectral band selectors used to reduce spectral dimensions. When used to identify plant diseases and determine the chemical composition of plants, the GA demonstrated good accuracy in comparison to numerous techniques for selecting the optimal wavelengths [35,36]. One of the best techniques for selecting the optimal wavelengths is the sequential forward selection (SFS) method since it does so without losing or distorting data [37]. SFS techniques have been used in numerous investigations, including those by Haiyan Cen et al. and Vélez Rivera et al. [38]. This technique demonstrated its value in choosing the ideal wavelengths.

2.6.2. Discriminant Models

To quantify the nitrogen, phosphorus, and potassium content of lettuce leaves, three straightforward machine learning models—partial least square regression (PLSR), back-propagation neural network (BPNN), and random forest (RF)—were evaluated.
The function of PLSR is to find the hyperplanes of maximum variance between observed and predicted variables, thus developing a linear model by projecting all variables (observed and predicted) onto a new space. The PLSR model is formulated with Equation (1) [39].
Y = X β + ε
where Y denotes the vector of the predicted variables; X denotes the matrix of the observed variables, which is a linear combination of a few latent factors (spectral reflection); β is the matrix of regression coefficients; and ε denotes the error matrix of the relationship between X and Y.
A multilayer neural network for supervised learning with error back-propagation is known as a back-propagation neural network (BPNN). Using gradient descent, the back-propagation mechanism looks for weights that minimize errors about the changeable network weights. The input layer, which contains the network’s raw data, one or more hidden layers that act as an intermediary layer between the input layer and the output layer, and the output layer are the three different sorts of layers that make up a BPNN. Additionally, with notable results, BPNN has been actively employed in plant disturbance monitoring [40,41]. To train samples and make predictions, random forest (RF) makes use of several decision trees. The random forest is an optimization of many bagging-based decision trees. A radiative transfer model like PROSAIL can be used to extract vegetation properties using this method, which is widely utilized in the field of machine learning [26].
In the present study, the computed average reflectance values were taken to be the predictor variable (Y), and the nutrients content to be the response variable (X). The multivariate analysis of the computed reflectance values of the spectral reflectance and measured nutrient values, such as tissue N, tissue P, and tissue K of leaves, was carried out with regression models. The predicted values of nutrients were computed with Equation (2) [42]:
N u t r i e n t = i = 1 n β i H i + C
where βi is the fit model coefficient of the models, Hi is the spectrum of each pixel in the spectral data, and C is constant.

2.7. Model Evaluation

The accuracy of the regression models was evaluated using the correlation coefficient of determination (R2) and root mean square errors (RMSE) calculated from Equation (3). The best model is the one with the highest R2 values and the smallest RMSE values.
R M S E = 1 N j = 1 N ( y j y p ) 2
where y j and y p are measured (in the laboratory) and predicted nutrients (tissue N, tissue P, tissue K) for sample j, and N is the number of samples in the data set.

3. Results and Discussion

3.1. Changes in Lettuce Growth under Different Nutrient Levels

At the end of the growing season, the remaining plants from all nutritional systems were harvested and weighed before spectral and chemical measurements to determine mass changes in lettuce under different nutritional levels. Four nutritional systems were established. System A was provided with an aquaponics solution only, system B received an aquaponics solution supplemented with KNO3 and KH2PO4 at 25 and 34 g per 1 L of solution, system C received an aquaponics solution supplemented with KNO3 and KH2PO4 at 50 and 68 g per 1 L of the solution, and finally, system D was provided with the full-strength Hoagland’s solution (control). Figure 4 shows the changes in lettuce plant growth under different nutrient levels. The system D plants had the highest average weight per plant (453 ± 10 g). On the other hand, system A produced plants with the lowest average weight of 155 ± 10 g. This outcome is in line with the research of Madar et al. They studied the growth of four lettuce cultivars in aquaponics and hydroponic systems and their findings showed that the hydroponic system achieved an average plant weight that was significantly higher than that of the aquaponic system. They claimed that increased nutrient concentrations increased plant weight [43]. The average weight of plants in the B and C systems is reasonably similar despite the varying nutrient contents in each of them, and each achieved an average weight of 280 and 300 ± 10 g per plant, respectively. The considerable increase in the weight of plants in system D (control) was due to supplying the plants with their needs for optimal growth by providing them with full-strength Hoagland’s solution. On the contrary, the aquaponics solution was devoid of or lacking in some nutrients necessary for the plants’ optimal growth. Figure 5 shows the average weights of plants in nutritional systems.

3.2. Changes in Spectral Reflectance Pattern under Nutrients Levels

The spectral properties of leaves are a function of their chemical composition, morphology, and internal structure [44]. Likewise, the nutritional composition influences the spectral reflections of leaves [45]. Galieni et al. reported that the reflectance in the range of 400 to 2500 nm was significantly affected by photosynthetic pigments, cell structure, and water content. Hence, this range can be relied upon in monitoring the nutritional status of the plant [46]. In addition, Siedliska et al. and Liu et al. stated that the spectral range (SWIR, 1000–2500 nm) can be used to distinguish the levels of nutrients in a plant [47,48]. Figure 6 shows the average spectral reflectance of lettuce leaves with different nutrient levels. It is interesting that as the content of macronutrients in the plant increases (such as N, P, and K), reflectance in the blue bands (~475 nm), green bands (~530 nm), red bands (~668 nm), and the red edge (~717 nm) decreases significantly [49]. Therefore, the lettuce grown in system A (aquaponics) had the highest reflectance (~0.31), whereas the lettuce cultivated in system D (control) achieved the lowest reflectance (~0.13) at 540 nm. This phenomenon is due to the increased levels of nutrition, which lead to an increase in the content of chlorophyll and photosynthesis, which increases the absorption of visible light and reduces the reflection [49]. The reflectivity changed from a negative correlation to a positive correlation from the beginning of the red edge (~720 nm) to the near-infrared (~1300 nm), meaning that the more nutrients present, the higher the reflection. The reflectance of the lettuce cultivated in system A was the lowest (~0.45), whereas the reflectivity of the lettuce grown in the control treatment was the highest (~0.55) at 755 nm. This is mostly due to higher nutrient levels increasing canopy structure, leaf area index, water content, and biomass, which enhances the absorption of chlorophyll and dry matter, in addition to the multi-photon backscattering in NIR resulting in increased near-infrared reflectance [49]. The aforementioned wavelengths are the ones that clearly showed the effect of the plant’s nutrient content on reflectance. There may be other wavelengths affected by the change in the nutritional content of the plant, which will be decided by the methods of selecting the optimal wavelengths.

3.3. Optimal Wavelength Selection

The fewest wavelengths that provide important information about the plant’s nutrients were selected using the optimal wavelength selection protocol. Principal component analysis (PCA), genetic algorithms (GA), and sequential forward selection (SFS) were employed in this work to select the optimal wavelengths. After performing the PCA, local peaks and valleys of the spectrum were observed to determine the locations of significant wavelengths of NPK content. The wavelengths of principal components present at the local maximum values (peaks) or minimum values (valleys) of the loading curve have a more significant contribution to the PC loadings. Three PCs were selected with individual contributions of 79.3%, 11.8%, and 6.3%, and a cumulative contribution of 97.4% of the variance when the PCA was applied to the spectroscopic data and chemical analyses of plant N content. Likewise, three PCs were also selected with an individual contribution of 69.5%, 19.4%, and 8.2%, and a cumulative contribution of 97.1% of the variance to express the optimal wavelengths for the plant’s P content. Also, to select the optimal wavelengths responsive to the K content, three PCs were selected with an individual contribution of 60.8%, 25.2%, 9%, and a cumulative contribution of 95.1% of the variance. The wavelengths corresponding to the peaks and valleys were selected as the optimal wavelengths for NPK estimation, as shown in Figure 7.
The genetic algorithm (GA) stands out for its excellence in selecting the optimal wavebands. This could be explained by how the GA distinguishes between potential solutions, assesses them in light of an objective function, and chooses the best solution for the next generation. It can also solve challenging problems using objective functions that do not have “nice” qualities, such as continuity and differentiation [50]. A genetic algorithm maintains and manipulates a clan of solutions to implement a “survival of the fittest” strategy in its search for optimal solutions. Hence, the genetic algorithm can select the optimal sensitive wavelengths among the spectral data set. The genetic algorithm selected 280 wavelengths as optimally sensitive to N content, 275 wavelengths for P content, and 268 for K content. Finally, 50 wavelengths were selected for SFS, influenced by the plant’s N content, 47 wavelengths affected by the plant’s P content, and 100 wavelengths were significantly influenced by the plant’s K content, as shown in Table 1. Notably, these results are consistent with several relevant scientific contributions at wavelengths of 544.1, 570.1, 617.1, 675.1, 696.3, 739.0, 787.3, 901.5, 945.5, and 1029.00, observed by Sun et al.’s study to estimate the NPK concentration of tomatoes [51]. Additionally, Pacumbaba and Beyl reported that treatments for nutrient deficiency had a substantial impact on the spectral reflectance of lettuce leaves in the visible range between 401.67 and 780.11 nm [52]. The nitrogen content has an impact on the spectrum’s 850 and 1510 nm wavelengths [53]. Moreover, Sun et al. found several wavebands sensitive to nitrogen content in lettuce, including 662.9, 711.7, 735, and 934.6 nm [54]. Finally, and more supportive of our results, Hongyan et al. identified five wavebands (470–590, 440–530, 530–620, 620–710, and 890–980 nm) as optimal wavebands sensitive to the nitrogen content of lettuce [55]. Table 1 displays the optimal wavelengths selected by PCA, GA, and SFS.

3.4. Performance Evaluation of Regression Models

Using analytical spectral devices (ASD), 128 plants of lettuce cultivated in aquaponics were scanned to quantify the NPK concentration. A total of 2304 spectral scans were obtained for all plants, each scan ranging from wavelengths of 350 to 2500 nm. The optimal wavelengths were selected using PCA, GA, and SFS methods. The prediction models of NPK levels in lettuce employed the selected wavelengths as inputs. Back-propagation neural network (BPNN), random forest (RF), and partial least squares regression (PLSR) are three of the most effective predictive models for plant nutrient content. The quality of the models’ performance was calculated using the coefficient of determination of the calibrated model (R2c), the coefficient of determination of the predicted model (R2p), the root mean square error of calibration (RMSEC), and the root mean square error of prediction (RMSEP), as computed from Equation (7). The best-fitted models were selected based on the highest values of R2 and the smallest values of RMSE. Figure 8 and Table 2 present the results of the correlation analysis of measured and predicted N, P, and K values for lettuce plants based on NPK prediction models using the selected optimal wavelengths. The analysis’s findings show that the majority of the predicting models performed well in the prediction task.
Using regression models to predict plant N content, we observed that utilizing the SFS optimal wavelength selection approach, the BPNN model beat all other models in terms of R2c, RMSEC, R2p, and RMSEP with values of 0.98, 0.20, 0.97, and 0.25, respectively, as shown in Figure 8a. These findings are consistent with the work by Sun et al., who utilized the BPNN model to estimate plant NPK content. With a prediction accuracy of 0.99, they demonstrated the BPNN model’s superiority over the comparison models [51]. Additionally, the results agree with Song et al., who used stepwise linear regression (SLR), support vector machine (SVM), random forest (RF), and back-propagation neural network (BPNN) models to predict the nutrient contents in the soil; the BPNN model achieved the highest prediction accuracy among all the models used [56]. When employing the PCA wavelength selection approach, the PLSR model, which had the lowest prediction accuracy of any model, obtained values of 0.61, 3.09, 0.58, and 1.14 for R2c, RMSEC, R2p, and RMSEP, respectively, as shown in Figure 8b. The results of the PLSR model are consistent with Zhai et al. and Bogrekci and Lee, who employed the PLSR model to predict the NPK concentrations of plants and found that the model had an accuracy of 0.59 and 0.50 [2,57]. Furthermore, Sun et al. used the spectral data analysis technique to estimate the nitrogen content in lettuce and obtained a high prediction accuracy with R2 = 0.99 [54]. Additionally, the RF model has produced good predictions of N content using all wavelength selection techniques. By using its outputs as inputs to prediction models, the SFS approach demonstrated its superiority in choosing the appropriate wavelengths sensitive to the N level of the plant, obtaining good forecast accuracy. [24,38].
All prediction models, except the PLSR model with PCA and the BPNN model with SFS, had a high predictive accuracy of more than 90% after assessing the P content data. Using the PCA approach to select the optimal wavelengths, the RF model achieved the maximum prediction accuracy of 0.98, 0.20, 0.94, and 0.2 for R2c, RMSEC, R2p, and RMSEP, respectively. On the other hand, utilizing the PCA optimal wavelengths selection approach, the PLSR model exhibited the lowest predictive accuracy, with values of 0.57, 3.55, 0.52, and 4.48 for R2c, RMSEC, R2p, and RMSEP, respectively, as shown in Figure 8d. The lower predictive ability of the PLSR model with the PCA method can be observed when applied to N and P data. This might be a result of PCA selecting fewer features (components) than SFS and GA did, which would explain why. Due to the low number of features used in training the model, the linear correlation between the observed and fitted response is very weak. Therefore, the prediction accuracy was very low, as shown in Figure 8b,d. It is clear from Table 2’s K models that every regression model worked admirably because each one achieved a prediction accuracy of at least 0.90. By utilizing the PCA approach to choose the best wavelengths, we can see that the RF model is superior to the other models by achieving values of 0.98, 0.20, 0.96, and 0.32 for the R2c, RMSEC, R2p, and RMSEP, respectively. The RF model with the GA of 0.92, 1.5, 0.88, and 2.83 for R2c, RMSEC, R2p, and RMSEP had the lowest performance.
These findings are corroborated by a study by Jiao et al., who estimated wheat and soybean chlorophyll content using the RF model, which had a high prediction accuracy of 0.92 [26]. Additionally, the results of the N and K predictions closely match the work of Osco et al., who calculated the nutrients in Valencia-orange leaf (N, P, K, Mg, S, Cu, Fe, Mn, and Zn) using multiple regression models, including the RF model, which outperformed all other models by achieving a predictive accuracy of 0.91 [58]. Perhaps the RF model’s superiority is attributable to several factors, such as its capacity to work efficiently on large datasets, its excellent ability to process data with high-dimensional features, its capacity to evaluate the significance of each variable in the input data, its assistance in obtaining unbiased estimates for internally generated errors, and finally, its ability to produce good results for discrete input data values [59,60].
Sun et al. combined spectroscopic data analysis with a support vector machine to estimate the nitrogen concentration in lettuce and achieved good predictive accuracy (R2 = 0.86) without selecting the optimal wavelengths; they used PCA to select the optimal wavelengths. They observed that the wavelengths of 662.9, 711.7, 735, and 934.6 nm were the optimal wavebands for nitrogen estimation achieving significant prediction accuracy with R2 = 0.996 [54]. This study makes apparent the significance of selecting the optimal waveband. Perhaps the difference between our study and the study of Sun et al. is the different selected wavelengths between the two studies in addition to the different spectra of leaves as a result of the different lettuce varieties under study. Hongyan et al. used spectroscopy to detect the nitrogen content of lettuce plants via partial least squares (PLS) and extreme learning machine (ELM) models with interval partial least squares (iPLS), synergy interval partial least squares (siPLS), and siPLS combined with genetic algorithms (GA–siPLS) for selecting the optimal wavelengths. Five spectral wavebands were selected, which were 470–590, 440–530, 530–620, 620–710, and 890–980 nm, which are mostly the same selected wavelengths in our study. The results achieved high predictive accuracy with R2p = 0.9218 [55]. The results of this study are fully compatible with the results of our work, but our study has excelled in predictive accuracy (R2p = 0.97), and this may be due to the superiority of the methods of selecting the wavelengths used, in addition to the machine learning models.
Spectroscopy methods combined with machine learning techniques proved their efficiency in detecting the state of nutrients in lettuce grown in aquaponics systems. The application of techniques for selecting the optimal wavelengths sensitive to the nutrient content of the plant served as inputs for the prediction models. The statistical findings revealed some variations in how well the NPK prediction models performed when employing optimal wavelengths as input values. The task of estimating the nitrogen, phosphorus, and potassium content of lettuce produced in aquaponics systems was completed by all regression models, the majority of which achieved a predicted accuracy of greater than 90%.

4. Conclusions

Spectral analysis was used in combination with chemometrics to estimate nitrogen (N), phosphorous (P), and potassium (K) in aquaponically grown lettuce. The optimal wavelengths sensitive to the target nutrients were selected by PCA, GA, and SFS. The optimal wavebands were used as inputs for the discriminant models. Three of the discriminant models that have been proven effective in predicting plant nutrients were used, namely PLSR, BPNN, and RF. The results obtained from all discriminant models were very satisfactory, which indicates that the use of spectroscopic data is an effective and promising method for detecting the nutritional status of plants. The BPNN model had the highest predictive accuracy for plant nitrogen content (R2p = 0.97), while the RF model had the highest predictive accuracy for plant content of phosphorous (R2p = 0.94) and potassium (R2p = 0.96). In summary, the models and methods proposed in this study can be used to periodically measure the nutrient concentration of lettuce grown in aquaponics systems or other leafy plant cultivars without destructive laboratory measurements. The suggested framework is flexible enough to be applied to various applications, not only in controlled environmental factors, but also in open fields, such as predicting the nutritional content of crops, crop yield, and chlorophyll content, with only modest modifications. In future work, we will consider several issues, the most important of which is the effect of the distance between the cultivation cups on reflectance, as well as the estimation of chlorophyll content of the leaves as an accurate index of the plant’s nutritional status.

Author Contributions

Conceptualization: M.F.T., N.L. and Z.Q.; methodology: M.F.T.; software: A.I.E. and M.F.T.; validation: A.I.E. and M.F.T.; formal analysis: A.I.E., M.F.T., K.S.A. and K.A.; investigation: M.F.T. and G.E.; resources: M.F.T., K.S.A. and K.A.; data curation: M.F.T., K.S.A. and K.A.; writing—original draft preparation: M.F.T., N.L. and L.Z.; writing—review and editing: M.F.T., G.E., N.L. and L.Z.; visualization: M.F.T., G.E. and L.Z.; supervision: Z.Q.; project administration: Z.Q.; funding acquisition: Z.Q. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the key projects of international scientific and technological innovation cooperation among governments under the national key R & D plan (2019YFE0103800), the Zhejiang province key research and development program (2021C02023), and Princess Nourah bint Abdulrahman University Researchers Supporting Project number (PNURSP2022R188), Princess Nourah bint Abdulrahman University, Riyadh, Saudi Arabia.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

The authors extend their appreciation to Princess Nourah bint Abdulrahman University for funding this work through the Researchers Supporting Project number (PNURSP2022R188), Princess Nourah bint Abdulrahman University, Riyadh, Saudi Arabia. Our thanks are also extended to Imam Mohammed Bin Saud Islamic University (IMSIU), Riyadh, Saudi Arabia for supporting the publication of this research work.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Yang, T.; Kim, H. Characterizing Nutrient Composition and Concentration in Tomato-, Basil-, and Lettuce-Based Aquaponic and Hydroponic Systems. Water 2020, 12, 1259. [Google Scholar] [CrossRef]
  2. Zhai, Y.; Cui, L.; Zhou, X.; Gao, Y.; Fei, T.; Gao, W. Estimation of nitrogen, phosphorus, and potassium contents in the leaves of different plants using laboratory-based visible and near-infrared reflectance spectroscopy: Comparison of partial least-square regression and support vector machine regression methods. Int. J. Remote Sens. 2013, 34, 2502–2518. [Google Scholar]
  3. Prinsi, B.; Espen, L. Mineral nitrogen sources differently affect root glutamine synthetase isoforms and amino acid balance among organs in maize. BMC Plant Biol. 2015, 15, 96. [Google Scholar] [CrossRef] [PubMed]
  4. Sinha, D.; Tandon, P.K. An Overview of Nitrogen, Phosphorus and Potassium: Key Players of Nutrition Process in Plants. In Sustainable Solutions for Elemental Deficiency and Excess in Crop Plants; Springer: Berlin/Heidelberg, Germany, 2020; pp. 85–117. [Google Scholar]
  5. Cook, S.; Bramley, R. Coping with variability in agricultural production-implications for soil testing and fertiliser management. Commun. Soil Sci. Plant Anal. 2000, 31, 1531–1551. [Google Scholar] [CrossRef]
  6. Liang, N.; Sun, S.; Yu, J.; Taha, M.F.; He, Y.; Qiu, Z. Novel segmentation method and measurement system for various grains with complex touching. Comput. Electron. Agric. 2022, 202, 107351. [Google Scholar] [CrossRef]
  7. Taha, M.F.; ElMasry, G.; Gouda, M.; Zhou, L.; Liang, N.; Abdalla, A.; Rousseau, D.; Qiu, Z. Recent Advances of Smart Systems and Internet of Things (IoT) for Aquaponics Automation: A Comprehensive Overview. Chemosensors 2022, 10, 303. [Google Scholar] [CrossRef]
  8. Chen, L.; Lin, L.; Cai, G.; Sun, Y.; Huang, T.; Wang, K.; Deng, J. Identification of nitrogen, phosphorus, and potassium deficiencies in rice based on static scanning technology and hierarchical identification method. PLoS ONE 2014, 9, e113200. [Google Scholar] [CrossRef]
  9. Abdalla, A.; Cen, H.; Wan, L.; Mehmood, K.; He, Y. Nutrient Status Diagnosis of Infield Oilseed Rape via Deep Learning-enabled Dynamic Model. IEEE Trans. Ind. Inform. 2020, 17, 4379–4389. [Google Scholar] [CrossRef]
  10. Ge, Y.; Atefi, A.; Zhang, H.; Miao, C.; Ramamurthy, R.K.; Sigmon, B.; Yang, J.; Schnable, J.C. High-throughput analysis of leaf physiological and chemical traits with VIS–NIR–SWIR spectroscopy: A case study with a maize diversity panel. Plant Methods 2019, 15, 66. [Google Scholar] [CrossRef]
  11. Zhou, L.; Wang, X.; Zhang, C.; Zhao, N.; Taha, M.F.; He, Y.; Qiu, Z. Powdery Food Identification Using NIR Spectroscopy and Extensible Deep Learning Model. Food Bioprocess Technol. 2022, 15, 2354–2362. [Google Scholar] [CrossRef]
  12. Mao, H.; Gao, H.; Zhang, X.; Kumi, F.J.S.H. Nondestructive measurement of total nitrogen in lettuce by integrating spectroscopy and computer vision. Sci. Hortic. 2015, 5, 184. [Google Scholar] [CrossRef]
  13. Zhou, L.; Zhang, C.; Taha, M.F.; Qiu, Z.; He, Y. Determination of Leaf Water Content by a Portable NIRS System based on Deep Learning and Information Fusion Analysis. Trans. ASABE 2021, 64, 127–135. [Google Scholar] [CrossRef]
  14. Zhou, L.; Zhang, C.; Taha, M.F.; Wei, X.; He, Y.; Qiu, Z.; Liu, Y. Wheat Kernel Variety Identification Based on a Large Near-Infrared Spectral Dataset and a Novel Deep Learning-Based Feature Selection Method. Front. Plant Sci. 2020, 11, 575810. [Google Scholar] [CrossRef]
  15. Ayala-Silva, T.; Beyl, C.A. Changes in spectral reflectance of wheat leaves in response to specific macronutrient deficiency. Adv. Space Res. 2005, 35, 305–317. [Google Scholar] [CrossRef] [PubMed]
  16. Wang, L.; Bai, Y.; Yang, L. Spectral response and diagnosis of phosphorus nutrition in corn. Plant Nutr. Fertil. Sci. 2007, 13, 802–808. [Google Scholar]
  17. Hansen, P.; Schjoerring, J. Reflectance measurement of canopy biomass and nitrogen status in wheat crops using normalized difference vegetation indices and partial least squares regression. Remote Sens. Environ. 2003, 86, 542–553. [Google Scholar] [CrossRef]
  18. Masoni, A.; Ercoli, L.; Mariotti, M. Spectral properties of leaves deficient in iron, sulfur, magnesium, and manganese. Agron. J. 1996, 88, 937–943. [Google Scholar] [CrossRef]
  19. Diezma, B.; Lleó, L.; Roger, J.M.; Herrero-Langreo, A.; Lunadei, L.; Ruiz-Altisent, M. Examination of the quality of spinach leaves using hyperspectral imaging. Postharvest Biol. Technol. 2013, 85, 8–17. [Google Scholar] [CrossRef]
  20. Liu, L.; Wang, J.; Huang, W.; Zhao, C.; Zhang, B.; Tong, Q. Estimating winter wheat plant water content using red edge parameters. Int. J. Remote Sens. 2004, 25, 3331–3342. [Google Scholar] [CrossRef]
  21. Eshkabilov, S.; Lee, A.; Sun, X.; Lee, C.W.; Simsek, H. Hyperspectral imaging techniques for rapid detection of nutrient content of hydroponically grown lettuce cultivars. Comput. Electron. Agric. 2021, 181, 105968. [Google Scholar] [CrossRef]
  22. Cho, B.K.; Chen, Y.R.; Kim, M.S. Multispectral detection of organic residues on poultry processing plant equipment based on hyperspectral reflectance imaging technique. Comput. Electron. Agric. 2007, 57, 177–189. [Google Scholar] [CrossRef]
  23. Qin, J.; Chao, K.; Kim, M.; Kang, S.; Cho, B.-K.; Jun, W. Detection of organic residues on poultry processing equipment surfaces by LED-induced fluorescence imaging. Appl. Eng. Agric. 2011, 27, 153–161. [Google Scholar] [CrossRef]
  24. Cen, H.; Lu, R.; Zhu, Q.; Mendoza, F. Nondestructive detection of chilling injury in cucumber fruit using hyperspectral imaging with feature selection and supervised classification. Postharvest Biol. Technol. 2016, 111, 352–361. [Google Scholar] [CrossRef]
  25. Chen, L.; Huang, J.; Wang, F.; Tang, Y.L. Comparison between back propagation neural network and regression models for the estimation of pigment content in rice leaves and panicles using hyperspectral data. Int. J. Remote Sens. 2007, 28, 3457–3478. [Google Scholar] [CrossRef]
  26. Jiao, Q.; Sun, Q.; Zhang, B.; Huang, W.; Ye, H.; Zhang, Z.; Zhang, X.; Qian, B. A Random Forest Algorithm for Retrieving Canopy Chlorophyll Content of Wheat and Soybean Trained with PROSAIL Simulations Using Adjusted Average Leaf Angle. Remote Sens. 2022, 14, 98. [Google Scholar] [CrossRef]
  27. Somerville, C.; Cohen, M.; Pantanella, E.; Stankus, A.; Lovatelli, A. Small-Scale Aquaponic Food Production: Integrated Fish and Plant Farming; FAO Fisheries and Aquaculture Technical Paper; FAO: Rome, Italy, 2014; p. I. [Google Scholar]
  28. Hseu, Z.Y.; Chen, Z.S.; Tsai, C.C.; Tsui, C.C.; Cheng, S.F.; Liu, C.-L.; Lin, H.T. Digestion methods for total heavy metals in sediments and soils. Water Air Soil Pollut. 2002, 141, 189–205. [Google Scholar] [CrossRef]
  29. Ahmed, Z.F.; Alnuaimi, A.K.; Askri, A.; Tzortzakis, N. Evaluation of Lettuce (Lactuca sativa L.) production under hydroponic system: Nutrient solution derived from fish waste vs. Inorganic nutrient solution. Horticulturae 2021, 7, 292. [Google Scholar] [CrossRef]
  30. Gholizadeh, A.; Borůvka, L.; Saberioon, M.M.; Kozak, J.; Vašát, R.; Němeček, K. Comparing different data preprocessing methods for monitoring soil heavy metals based on soil spectral features. Soil Water Res. 2015, 10, 218–227. [Google Scholar] [CrossRef]
  31. Gutiérrez-Rodríguez, B.J.; Argüello-Tovar, J.O.; García-Navarrete, O.L. Use of VIS-NIR-SWIR spectroscopy for the prediction of water status in soybean plants in the Colombian Piedmont Plains. Dyna 2019, 86, 125–130. [Google Scholar] [CrossRef]
  32. Britz, R.; Barta, N.; Schaumberger, A.; Klingler, A.; Bauer, A.; Pötsch, E.M.; Gronauer, A.; Motsch, V. Spectral-Based Classification of Plant Species Groups and Functional Plant Parts in Managed Permanent Grassland. Remote Sens. 2022, 14, 1154. [Google Scholar] [CrossRef]
  33. ElManawy, A.I.; Sun, D.; Abdalla, A.; Zhu, Y.; Cen, H. HSI-PP: A flexible open-source software for hyperspectral imaging-based plant phenotyping. Comput. Electron. Agric. 2022, 200, 107248. [Google Scholar] [CrossRef]
  34. Kong, W.; Zhang, C.; Huang, W.; Liu, F.; He, Y. Application of hyperspectral imaging to detect Sclerotinia sclerotiorum on oilseed rape stems. Sensors 2018, 18, 123. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  35. Nagasubramanian, K.; Jones, S.; Sarkar, S.; Singh, A.K.; Singh, A.; Ganapathysubramanian, B. Hyperspectral band selection using genetic algorithm and support vector machines for early identification of charcoal rot disease in soybean stems. Plant Methods 2018, 14, 86. [Google Scholar] [CrossRef] [PubMed]
  36. Fang, H.; Liang, S.; Kuusk, A. Retrieving leaf area index using a genetic algorithm with a canopy radiative transfer model. Remote Sens. Environ. 2003, 85, 257–270. [Google Scholar] [CrossRef]
  37. Zhang, W.; Li, X.; Zhao, L. Band priority index: A feature selection framework for hyperspectral imagery. Remote Sens. 2018, 10, 1095. [Google Scholar] [CrossRef]
  38. Rivera, N.V.; Gómez-Sanchis, J.; Chanona-Pérez, J.; Carrasco, J.J.; Millán-Giraldo, M.; Lorente, D.; Cubero, S.; Blasco, J. Early detection of mechanical damage in mango using NIR hyperspectral images and machine learning. Biosyst. Eng. 2014, 122, 91–98. [Google Scholar] [CrossRef]
  39. Geladi, P.; Kowalski, B.R. Partial least-squares regression: A tutorial. Anal. Chim. Acta 1986, 185, 1–17. [Google Scholar] [CrossRef]
  40. Zhu, J.; Wu, A.; Wang, X.; Zhang, H. Identification of grape diseases using image analysis and BP neural networks. Multimed. Tools Appl. 2020, 79, 14539–14551. [Google Scholar] [CrossRef]
  41. Prakash, B.; Yerpude, A. Identification of mango leaf disease and control prediction using image processing and neural network. Int. J. Sci. Res. Dev. 2015, 3, 794–799. [Google Scholar]
  42. Rangkuti, M.Y.; Saputro, A.H.; Imawan, C. Prediction of soluble solid contents mapping on Averrhoa carambola using hyperspectral imaging. In Proceedings of the 2017 International Conference on Sustainable Information Engineering and Technology (SIET), Malang, Indonesia, 24–25 November 2017; pp. 414–419. [Google Scholar]
  43. Madar, Á.K.; Rubóczki, T.; Hájos, M.T. Lettuce production in aquaponic and hydroponic systems. Acta Univ. Sapientiae Agric. Environ. 2019, 11, 51–59. [Google Scholar]
  44. Amaral, J.B.C.; Lopes, F.B.; de Magalhães, A.C.M.; Kujawa, S.; Taniguchi, C.A.K.; Teixeira, A.D.S.; de Lacerda, C.F.; Queiroz, T.R.G.; de Andrade, E.M.; Araújo, I. Quantifying Nutrient Content in the Leaves of Cowpea Using Remote Sensing. Appl. Sci. 2022, 12, 458. [Google Scholar] [CrossRef]
  45. Taha, M.F.; Abdalla, A.; ElMasry, G.; Gouda, M.; Zhou, L.; Zhao, N.; Liang, N.; Niu, Z.; Hassanein, A.; Al-Rejaie, S. Using Deep Convolutional Neural Network for Image-Based Diagnosis of Nutrient Deficiencies in Plants Grown in Aquaponics. Chemosensors 2022, 10, 45. [Google Scholar] [CrossRef]
  46. Galieni, A.; D’Ascenzo, N.; Stagnari, F.; Pagnani, G.; Xie, Q.; Pisante, M. Past and future of plant stress detection: An overview from remote sensing to positron emission tomography. Front. Plant Sci. 2021, 11, 1975. [Google Scholar] [CrossRef]
  47. Siedliska, A.; Baranowski, P.; Pastuszka-Woźniak, J.; Zubik, M.; Krzyszczak, J. Identification of plant leaf phosphorus content at different growth stages based on hyperspectral reflectance. BMC Plant Biol. 2021, 21, 28. [Google Scholar] [CrossRef]
  48. Liu, N.; Townsend, P.A.; Naber, M.R.; Bethke, P.C.; Hills, W.B.; Wang, Y. Hyperspectral imagery to monitor crop nutrient status within and across growing seasons. Remote Sens. Environ. 2021, 255, 112303. [Google Scholar] [CrossRef]
  49. Chen, Z.; Wang, X. Model for estimation of total nitrogen content in sandalwood leaves based on nonlinear mixed effects and dummy variables using multispectral images. Chemom. Intell. Lab. Syst. 2019, 195, 103874. [Google Scholar] [CrossRef]
  50. Naguib, I.A.; Darwish, H.W. Support vector regression and artificial neural network models for stability indicating analysis of mebeverine hydrochloride and sulpiride mixtures in pharmaceutical preparation: A comparative study. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 2012, 86, 515–526. [Google Scholar] [CrossRef]
  51. Sun, G.; Ding, Y.; Wang, X.; Lu, W.; Sun, Y.; Yu, H. Nondestructive determination of nitrogen, phosphorus and potassium contents in greenhouse tomato plants based on multispectral three-dimensional imaging. Sensors 2019, 19, 5295. [Google Scholar] [CrossRef]
  52. Pacumbaba Jr, R.; Beyl, C. Changes in hyperspectral reflectance signatures of lettuce leaves in response to macronutrient deficiencies. Adv. Space Res. 2011, 48, 32–42. [Google Scholar] [CrossRef]
  53. Herrmann, I.; Karnieli, A.; Bonfil, D.; Cohen, Y.; Alchanatis, V. SWIR-based spectral indices for assessing nitrogen content in potato fields. Int. J. Remote Sens. 2010, 31, 5127–5143. [Google Scholar] [CrossRef]
  54. Sun, J.; Jin, X.; Mao, H.; Wu, X.; Zhu, W.; Zhang, X.; Gao, H. Detection of nitrogen content in lettuce leaves based on spectroscopy and texture using hyperspectral imaging technology. Trans. Chin. Soc. Agric. Eng. 2014, 30, 167–173. [Google Scholar]
  55. Hongyan, G.; Hanping, M.; Zhang, X. Determination of lettuce nitrogen content using spectroscopy with efficient wavelength selection and extreme learning machine. Zemdirb. Agric. 2015, 102, 51–58. [Google Scholar]
  56. Song, Y.-Q.; Zhao, X.; Su, H.-Y.; Li, B.; Hu, Y.-M.; Cui, X. Predicting spatial variations in soil nutrients with hyperspectral remote sensing at regional scale. Sensors 2018, 18, 3086. [Google Scholar] [CrossRef] [PubMed]
  57. Bogrekci, I.; Lee, W. Spectral phosphorus mapping using diffuse reflectance of soils and grass. Biosyst. Eng. 2005, 91, 305–312. [Google Scholar] [CrossRef]
  58. Osco, L.P.; Ramos, A.P.M.; Pinheiro, M.M.F.; Moriya, É.A.S.; Imai, N.N.; Estrabis, N.; Ianczyk, F.; de Araújo, F.F.; Liesenberg, V.; Jorge, L. A machine learning framework to predict nutrient content in valencia-orange leaf hyperspectral measurements. Remote Sens. 2020, 12, 906. [Google Scholar] [CrossRef]
  59. Mutanga, O.; Adam, E.; Cho, M.A. High density biomass estimation for wetland vegetation using WorldView-2 imagery and random forest regression algorithm. Int. J. Appl. Earth Obs. Geoinf. 2012, 18, 399–406. [Google Scholar] [CrossRef]
  60. Liang, L.; Qin, Z.; Zhao, S.; Di, L.; Zhang, C.; Deng, M.; Lin, H.; Zhang, L.; Wang, L.; Liu, Z. Estimating crop chlorophyll content with hyperspectral vegetation indices and the hybrid inversion method. Int. J. Remote Sens. 2016, 37, 2923–2949. [Google Scholar] [CrossRef]
Figure 1. Flowchart of the proposed method.
Figure 1. Flowchart of the proposed method.
Sustainability 14 12318 g001
Figure 2. Tub cultures.
Figure 2. Tub cultures.
Sustainability 14 12318 g002
Figure 3. Raw spectra of lettuce leaves.
Figure 3. Raw spectra of lettuce leaves.
Sustainability 14 12318 g003
Figure 4. Changes in lettuce plant growth under different nutrient systems.
Figure 4. Changes in lettuce plant growth under different nutrient systems.
Sustainability 14 12318 g004
Figure 5. Average plant weights in all nutritional levels.
Figure 5. Average plant weights in all nutritional levels.
Sustainability 14 12318 g005
Figure 6. Average of spectral reflectance of lettuce leaves with different nutrient levels.
Figure 6. Average of spectral reflectance of lettuce leaves with different nutrient levels.
Sustainability 14 12318 g006
Figure 7. Optimal wavelengths selection of N (a), P (b), and K (c) content by PCA loadings.
Figure 7. Optimal wavelengths selection of N (a), P (b), and K (c) content by PCA loadings.
Sustainability 14 12318 g007
Figure 8. Correlations between the measured and predicted values of the NPK contents in lettuce plants by different regression models using optimal wavelength methods. (a) N content results predicted by the BPNN using SFS; (b) N content results predicted by the PLSR model using PCA; (c) P content results predicted by the RF model using PCA; (d) P content results predicted by the PLSR model using PCA; (e) K content results predicted by the RF model using PCA; (f) K content results predicted by the RF model using GA.
Figure 8. Correlations between the measured and predicted values of the NPK contents in lettuce plants by different regression models using optimal wavelength methods. (a) N content results predicted by the BPNN using SFS; (b) N content results predicted by the PLSR model using PCA; (c) P content results predicted by the RF model using PCA; (d) P content results predicted by the PLSR model using PCA; (e) K content results predicted by the RF model using PCA; (f) K content results predicted by the RF model using GA.
Sustainability 14 12318 g008
Table 1. Selected optimal wavelengths using PCA, GA, and SFS.
Table 1. Selected optimal wavelengths using PCA, GA, and SFS.
MethodNPK
NumberWavelengths (nm)NumberWavelengths (nm)NumberWavelengths (nm)
PCA22561, 589, 653, 659, 768,
758, 854, 936, 1000, 1031,
1099, 1236, 1245, 1284,
1369, 1373, 1376, 1453,
1462, 1503, 1507, 1511
29554, 557, 570, 598, 601,
655, 656, 662, 777, 790,
782, 844, 849, 946, 950,
1001, 1006, 1038, 1108,
1273, 1371, 1401, 1448,
1469, 1490, 1508, 1509,
1516, 1591
24556, 592, 601, 658,
661, 667, 767, 783
848, 849, 866, 950,
1000, 1004, 1035,
1041, 1120, 1268,
1276, 1374, 1401,
1492, 1515, 1521
GA280450–550, 590–700, 780–850275510-615, 700–820, 850–900268500–568, 700–780, 900–1120
SFS50400, 401, 412, 425, 426,
430, 435, 436, 440, 456,
458, 461, 463, 469, 487,
489, 515, 520, 536, 539,
542, 549, 555, 571, 578,
579, 581, 592, 594, 598,
642, 652, 665, 704, 970,
976, 1081, 1084, 1089,
1114, 1116, 1340, 1364,
1378, 1721, 1726, 1737,
1781, 1801, 1802
47541-555, 567, 568, 693,
716, 1387, 1524, 1532,
1533, 1540, 1611,
1617, 1628, 1635, 1638,
1650-1654, 1662–1665, 1672, 1674, 1685, 1692,
1695, 1700, 1801, 1898,
1899
100405–497, 710, 1413,
1588, 1785, 1796,
1859, 1880
Table 2. Performance of different regression models.
Table 2. Performance of different regression models.
ModelInputNPK
R2cRMSECR2pRMSEPR2cRMSECR2pRMSEPR2cRMSECR2pRMSEP
PLSRPCA0.613.090.581.140.573.550.524.480.940.330.930.37
GA0.980.200.950.420.900.450.881.920.970.210.950.34
SFS0.970.280.960.300.872.250.834.40.940.340.920.38
BPNNPCA0.930.450.870.60.950.450.900. 260.950.300.900.50
GA0.882.50.853.250.912.500.883.000.930.350.900.53
SFS0.980.200.970.250.614.450.574.350.970.250.940.36
RFPCA0.970.350.900.550.980.200.940.20.980.200.960.32
GA0.960.320.950.390.970.280.890.350.921.50.882.83
SFS0.960.450.960.360.960.490.850.540.980.320.960.35
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Taha, M.F.; ElManawy, A.I.; Alshallash, K.S.; ElMasry, G.; Alharbi, K.; Zhou, L.; Liang, N.; Qiu, Z. Using Machine Learning for Nutrient Content Detection of Aquaponics-Grown Plants Based on Spectral Data. Sustainability 2022, 14, 12318. https://doi.org/10.3390/su141912318

AMA Style

Taha MF, ElManawy AI, Alshallash KS, ElMasry G, Alharbi K, Zhou L, Liang N, Qiu Z. Using Machine Learning for Nutrient Content Detection of Aquaponics-Grown Plants Based on Spectral Data. Sustainability. 2022; 14(19):12318. https://doi.org/10.3390/su141912318

Chicago/Turabian Style

Taha, Mohamed Farag, Ahmed Islam ElManawy, Khalid S. Alshallash, Gamal ElMasry, Khadiga Alharbi, Lei Zhou, Ning Liang, and Zhengjun Qiu. 2022. "Using Machine Learning for Nutrient Content Detection of Aquaponics-Grown Plants Based on Spectral Data" Sustainability 14, no. 19: 12318. https://doi.org/10.3390/su141912318

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