Published research

Machine Learning Approach to Remove Ion Interference Effect in Agricultural Nutrient Solutions

Byunghyun Ban, Donghun Ryu, Minwoo Lee

2019 · 2019 International Conference on Information and Communication Technology Convergence (ICTC) · 1156–1161

Cite

Abstract

High concentration agricultural facilities such as vertical farms or plant factories consider hydroponic techniques as optimal solutions. Although closed-system dramatically reduces water consumption and pollution issues, it has ion-ratio related problem. As the root absorbs individual ions with different rate, ion rate in a nutrient solution should be adjusted periodically. But traditional method only considers pH and electrical conductivity to adjust the nutrient solution, leading to ion imbalance and accumulation of excessive salts. To avoid those problems, some researchers have proposed ion-balancing methods which measure and control each ion concentration. However, those approaches do not overcome the innate limitations of ISEs, especially ion interference effect. An anion sensor is affected by other anions, and the error grows larger in higher concentration solution. A machine learning approach to modify ISE data distorted by ion interference effect is proposed in this paper. As measurement of TDS value is relatively robust than any other signals, we applied TDS as key parameter to build a readjustment function to remove the artifact. Once a readjustment model is established, application on ISE data can be done in real time. Readjusted data with proposed model showed about 91.6 ~ 98.3% accuracies. This method will enable the fields to apply recent methods in feasible status.

Keywords—Machine learning, ISE, Nutrient solution, Aqua culture, Agriculture, Hydroponics, Analog data processing

I. Introduction

Development of IoT applications enabled the propagation of smart farms around agricultural industries. Even small farm owners now adopts smart farm facilities to reduce human resource. Highly concentrated facilities such as vertical farm or plant factories are one of the greatest issue in smart farm area. Aqua cultural methods such as NFT(nutrient film technique), DWT(deep water technique), water dripping or aeroponics are now considered as optimal solutions for highconcentrated smart farms because it becomes significantly efficient to control nutritional environment of whole facility with hydroponic approaches.

Opened hydroponic system discards once-used nutrient solution because the nutritional ions are already uptaken by plant roots. This approach tries to supply stable and balanced nutrition to plants. However, the wastage of nutrition water is hazard to environment so closed hydroponic systems becomes popular[1]. Closed system recycles the nutrient solution so it significantly reduces the cost and possibility of pollution.

It is one of the most important issue in closed system to maintain nutritional balance. Traditional approaches measure electrical conductivity and pH of the nutrient solution to monitor the fertilization[2-3]. However, those methods cannot distinguish the imbalance of nutrient ions and accumulation of useless components, caused by the difference between absorption rate of individual ions at plant roots. It requires additional maintenance labors such as foliar spray to avoid nutrition disorder which may lead to poor yield or death of crops.

Researchers recently suggests application of the ion selective electrodes(ISEs) approaches to measure individual ion’s concentration from the nutrient solution [1, 4-6]. Readjustment of low-concentrated ions with ion selective measurement seems to enable avoidance of nutrient balance collapse. However, applying ISEs on nutrient solution measurement have significant problem: ion interference effect.

ISEs acquires concentration of ion by measuring electrical potential. ISE has ion-selective permeable film and the ionexchange of specific ion fit for the film provides Nernst potential, described on equation (1). F is Faraday constant and z is the number of ions exchanged along the membrane.

E=RTzFln[outside ion][inside ion](1)

However, because of the nature of ISE, ion-exchange along the membrane is interfered by other ions. This phenomenon is described with Nikolsky-Eisenman equation [7] given on equation (2) where a is the activity, ki is the selectivity coefficient and zi is the exchange of interfering ion i along the membrane.

E=E0+RTzFln[a+∑i(kiaizzi)](2)

The activity parameter for target ion and the selectivity coefficients of all the other ions of solution are required to predict the magnitude of ion interference potential. It is not feasible. For example, Yamazaki’s nutrient solution for lettuce [8] contains 23 different ions. Acquisition of those parameter with experiments to maintain agricultural fertilizer is not desirable. Liberti et al. suggested readjustment method using Gran’s plots [9] but it also requires prior knowledge for some specific parameter.

We suggest a machine learning approach to train a readjustment function, which removes ion interference effect from ISE measured data without any prior knowledge chemicophysical parameter.

II. Ion Interference Effect

We measured ion interference effect with ISEs to figure out the exact magnitude of the artifact. Also the data was used for the machine learning algorithm.

A. Equipments for experiment

Ion selective electrodes were used to measure the concentration of ions. We used Vernier’s Go Direct® sensor series. GDX-NO3 was used to measure NO3- ion, and GDXNH4 was used for NH4+ , GDX-CA was used for Ca2+ , and GDX-K was used for K+ ion concentration. The sensors were connected to Arduino to transform analog signal into digital value.

Yamazaki’s nutrient solution for lettuce [8] was selected as experimental environment because it is one of the most popular fertilizer in hydroponics area. But we eliminated the low-concentrated ions in order to avoid ISE-unmeasurable ions. KNO3, Ca(NO3)2-4H2O and NH4H2PO4 were used to reproduce the simplified Yamazaki’s solution. The experimental solution contains K+ , NO3- , Ca2+ , NH4+ , which are measurable with ISEs, and HxPO43-x families which are the only unmeasurable value. The concentration of H+ is measurable with pH meter but we did not measured it because pH of the solution is around 7 so we did not expect any significant interference effect on pH meter.

B. Calibration with machine learning algorithm

Vernier’s manual recommended to measure 2 standard buffer solution to acquire 2 voltage value, and perform linear regression on exp(volt) term along the theoretical value of ion concentration. They presents voltage-concentration equation as equation (3), which fits for Nernst potential described on equation (1). Generally, α describes the sensitivity of sensor and β describes standard potential offset of the electrode.

Concentration = α exp(volt) + β(3)

However, we figured out that Vernier’s ISE does not work as equation (3). 10 times of buffer solution measurement showed that the correlation between concentrations and exp(volt) values showed exponential behaviors. The distribution of measured buffer solution data is described on Figure 1.

Figure 1. Plot between exp(volt) and concentration. (a) K+ , (b) Ca2+ , (c) NO3- and (d) NH4+
Figure 1. Plot between exp(volt) and concentration. (a) K+ , (b) Ca2+ , (c) NO3- and (d) NH4+

R2 values on linear regression with Vernier’s recommended method for K+ , Ca+ , NO3- , NH4+ were 0.9308, 0.9273, 0.9041, 0.9315. We figured out that Vernier’s sensors actually work as equation (4).

Concentration = α′ exp(β′ exp(volt))(4)

It means that Vernier’s ISE does not work robustly. The behavior of sensor in thin solution differs from the behavior in dense solution. The concentration of buffer solutions, measured voltage and coefficients for equation (4) of each ion is presented in Table 1. Coefficients are driven with linear regression between log scaled concentration and exp(volt) values. The R2 for each regression lines are also listed on Table 1. Regression models with equation (4) fits for the experimental data.

Table 1. Calibration results
1234567
K+α = 3.31880e−5β = 0.57347R² = 0.9957
Concentration0.0040.00780.01170.01540.02260.02960.0364
ISE Voltage2.12682.25052.31972.36532.42822.47272.5067
Ca2+α = 9.16069e−11β = 3.17870R² = 0.9831
Concentration0.0010.0020.00290.00380.00570.00740.0091
ISE Voltage1.63171.66741.69051.70891.7291.74571.7573
NO3−α = 5.452673β = −1.33850R² = 0.9910
Concentration0.0040.00780.01170.01540.02260.02960.0364
ISE Voltage1.68561.58641.52331.47531.40831.36561.321
NH4+α = 6.457599e−6β = 0.82985R² = 0.9910
Concentration0.00050.0010.00150.00190.00280.00370.0045
ISE Voltage1.66721.79761.8691.9221.98292.04192.068

C. Ion interference effect measurement

We prepared 100 times more concentrated version of simplified Yamazaki’s solution. We added this ampoule 10 times to 1 liter water with 4 ISEs installed. The theoretical values of ionic concentration for each steps and the experimental values are presented on Table 2.

Comparison between the experimental values and the theoretical values are described on Figure 2. The interference effect becomes larger at higher-concentration status because the flux of undesirable ions through the membrane of ISE becomes greater magnitude of ion interference effect is understood as the distance between the blue and orange lines.

Figure 2. Graph for ion interference effect Theoretical values are described with blue lines and experimental values are in orange line.
Figure 2. Graph for ion interference effect Theoretical values are described with blue lines and experimental values are in orange line.
Table 2. Ion interference effects
12345678910
K
Theoretical Value3.88357.32710.68913.8716.88519.74722.46725.05527.52129.873
Experimental Value4.369557.9612111.336814.571517.5528221.3252424.1940627.2819730.8561534.4981
Ca
Theoretical Value0.970871.8322.6723.4674.2214.9375.6176.2646.887.468
Experimental Value0.955791.548492.048742.316732.6501743.1198533.3569373.651573.7901484.00463
NO3
Theoretical Value5.8252410.99116.03320.80425.32726.9233.737.58241.28144.81
Experimental Value4.044728.2408412.123216.002719.112322.9522825.5797429.3649131.6432834.8821
NH4
Theoretical Value0.485440.9161.3361.7342.1112.4682.8083.1323.443.734
Experimental Value0.810841.461152.093612.683633.1047243.6167264.1012314.3886244.8994555.34784

III. Method

A readjustment method to remove ion interference effect is proposed in this section. In order to provide a rapid and feasible solution to the industrial field, we avoided evaluation of chemicophysical parameters. We applied simple machine learning algorithm which doesn’t even requires any GPU devices.

A. Equipments

The regression process was performed on Microsoft’s Azure VM standard D4s v3, which has4 vcpus and 16 GiB memory. The operation system is ubuntu 18.04 and we used R and R Studio Server for data analysis and regression.

B. Data preperation

Experimental data on Table 2 from ion interference effect measurement was used. We randomly separated 3 columns for test data and the other 7 columns for training data. Column 5, 7 and 9 were selected as test data and the others were fed to the model for training.

C. Readjustment method

We applied simple readjustment method in order to application of the trained model on readjustment as simple as possible because real-time and on-site readjustment is one of the biggest issue in the agricultural industry [1].

As TDS(total dissolved solids) is calculated regardless of ion composition in the solution, we took TDS value as key independent variable. The readjustment method is described as equation (5), where Cr is readjusted value for concentration, CISE is experimentally driven value for concentration and μ is a function of TDS value.

Cr=μ(TDS)×CISE(5)

We assumed the concentration of each ion and the magnitude of ion interference effect as functions of TDS in Yamazaki’s nutrient solution system because the imbalance of ionic balance does not occur fast. Also, with continuous readjustment on the nutrient solution, the ionic balance is maintained continuously.

D. Regression of μ function

TDS values were calculated from the theoretical value of ion concentrations from Table 2. TDS is calculated as equation (6). Mion is the molecular weight and [ion] is molarity.

∑ Mᵢₒₙ × [ion](6)

From the definition of μ, converged form of α function is defined as equation (7).

μ(TDS)=CrCISE(7)

And we expect the readjusted value Cr to converge toward theoretical value Ct. Therefore, we launched regression to fit equation (9).

μ(TDS)≈CtCISE(8)

The values of μ(TDS) driven from 7 points of training data are plotted on Figure 3 as blue dots.

As the behavior of voltage along ion concentration from equation (1) and the interference effect driven from equation (2) are both logarithm, we expected that the error correction coefficient μ to show logarithmic distribution. However, quadratic regression fit much better than log regression. Mean R2 from log regression was 0.70615 while quadratic regression showed 0.96158. The regression lines are described as orange lines on Figure 3. Parameters for quadratic regression model equation (10) and R2 values for the models are also presented in Table 3.

μ(TDS) = A × TDS² + B × TDS + C(10)
Table 3. Regression Results
ABCR²
K+-3e-081e-040.83220.9478
CA2-2e-084e-040.82860.9871
NO3−3e-08-2e-041.5210.9255
NH4+-3e-083e-040.93820.9859
Figure 3. 𝛍(𝐓𝐃𝐒) values with regression lines. Horizontal axis are independent variable, TDS, while vertical axis is μ(TDS) driven from equation (9).
Figure 3. 𝛍(𝐓𝐃𝐒) values with regression lines. Horizontal axis are independent variable, TDS, while vertical axis is μ(TDS) driven from equation (9).

IV. Experiment

A. Evaluation on training data

To evaluate the trained model on training data, we calculated μ(TDS) from equation (10), rather than equation (9) because value from equation (9) will provide 100% correctness, which is meaningless. The driven μ are multiplied with CISE to show whether the ion interference effect were removed. The results are presented on Figure 4. The model removed 45.8752%, 63.2386%, 81.5443% and 92.434% of ion interference effect from K+ , Ca2+ , NO3- and NH4+ . R2 of Ca2+ is greater than that of NO3- but NO3- showed better result.

Figure 4. Results of trained model on training data
Figure 4. Results of trained model on training data

B. Evaluation on test data

Evaluation on test data was performed by trained model. We apply untrained TDS value as input to μ function, and multiplied that to CISE of test data.

V. Results

Test data was applied on the trained quadratic model. The result is described on Figure 5 and Table 3-4. The error was defined as equation (11), where C stands for both CISE and corrected concentration. Accuracy was defined as 100% - error.

Error=Ct−CCt×100%(11)

The errors on whole date are presented on Figure 3. Except only one case, column 5 from K+ , proposed method successfully removed the ion interference effect. Especially, NH4+ model showed remarkable result. Average accuracy values are presented on Table 4. The model worked on both training data and test data. The accuracy between training data and test data from Ca+ was significantly different. However, the proposed method successfully increased the accuracy of test data, 59.331%, into 93.209 %.

Figure 5. Result of trained model on test data
Figure 5. Result of trained model on test data
Table 4. Error rate of raw data and proposed method (in %). The column 5, 7 and 9 are training data and the other columns are used for training.
Error rate from12345678910Average
K+Raw data11.9468.21065.69934.74193.67437.73697.45558.674711.92215.3018.536235
K+Proposed Method1.40192.03993.2844.33686.32184.29456.57117.79697.52017.31835.088521
Ca2+Raw data2.492815.88723.50533.2637.20736.69340.08641.51444.71446.15732.15142
Ca2+Proposed Method3.13024.12586.73862.02613.115410.0939.166110.7448.09178.14256.537297
NO3−Raw data30.87525.10624.33322.92724.32522.22523.77621.48622.94821.71423.97158
NO3−Proposed Method2.29650.33832.78853.96227.6896.43839.0546.68258.48056.85995.458977
NH4+Raw data8.19318.20725.29826.13230.99932.49733.71236.90236.69736.99928.56361
NH4+Proposed Method1.42630.41250.79963.92791.37262.4783.18580.12961.95382.6341.832009
Table 5. Accuracy of raw data and proposed method (in %)
K⁺ TrainingK⁺ TestCa²⁺ TrainingCa²⁺ TestNO₃⁻ TrainingNO₃⁻ TestNH₄⁺ TrainingNH₄⁺ Test
Raw data91.098592.316171.49959.33175.904976.316773.681866.1971
Proposed method95.646893.195793.571593.208995.804891.592298.313297.8293

VI. Conclusion

Machine learning algorithm with low computational complexity to remove ion interference effect was presented. Ion interference effect exists and gets stronger in denser environment. Quadratic regression on equation (9) successfully removed ion interference effect from almost all the data point, except only one case. As the computational resource for using pre-trained quadratic model is small enough, the presented method is highly feasible to industries. Even an embedded device can run the inference process in milliseconds. We expect applying higher-variance machine learning algorithms such as deep neural network, rather than high-bias and low variance model such as quadratic regression, would enhance the ability of artifact removal.

Acknowledgment

Special thanks to Janghun Lee for selecting ISE devices and establishing measurement pipeline with Arduino.

References

  • [1] Cho W J, Kim H J, Jung D H, Kim D W, Ahn T I, Son J E. On-site ion monitoring system for precision hydroponic nutrient management. Comput Electron AGR. 2018; 146: 51-58. https://doi.org/10.1016/j.compag.2018.01.019.

  • [2] Bamsey M, Graham T, Thompson C, Berinstain A, Scott A, Dixon M. Ion-specific nutrient management in closed systems: the necessity for ion-selective sensors in terrestrial and space-based agriculture and water management systmes. Sensors. 2012; 12(10): 13349-13392. https://doi.org/10.3390/s121013349.

  • [3] Katsoulas N, Savvas D, Kitta E, Bartzanas T, Kittas C. Extension and evaluation of a model for automatic drainage solution management in tomato crops grown in semi-closed hydroponic systems. Comput Electron AGR. 2015; 113: 61-71. https://doi.org/10.1016/j.compag.2015.01.014.

  • [4] Kim H J, Son D W, Kwon S G, Roh M Y, Kang C I, Jung H S. PVC membrane-based portable ion analyzer for hydroponic and water monitoring. Comput Electron Agric. 2017; 140: 374-385. https://doi.org/10.1016/j.compag.2017.06.015.

  • [5] Ryan S Knight, Mark Lefsrud. Automated Nutrient Sensing and Recycling. 2017 ASABE Annual International Meeting. 2017; 1701609. https://doi.org/10.13031/aim.201701609.

  • [6] Jung D H, Kim H J, Kim W K, Kang C I, Choi G L. Automated Sensing and Control of Hydroponic Macronutrients Using a Computercontrolled System. ASABE. 2013; 131594020. https://doi.org/10.13031/aim.20131594020.

  • [7] Hall, Denver G. "Ion-selective membrane electrodes: a general limiting treatment of interference effects." The Journal of Physical Chemistry 100.17 (1996): 7230-7236. https://doi.org/10.1021/jp9603039

  • [8] Yamazaki K. Nutrient solution culture. Tokyo, Japan: Pak-kyo Co; 1982. Japanese

  • [9] Liberti, Arnaldo, and Marco Mascini. "Anion determination with ion selective electrodes using Gran's plots. Application to fluoride." Analytical Chemistry 41.4 (1969): 676-679.

Citation

형식을 누르면 인용 정보가 복사됩니다.

BibTeX 파일RIS 파일

← 논문 목록으로 돌아가기