Development of a Distance Education Experiment Set That Allows the Ratio of Chemical Components In Hydroponic Farming Nutrient Liquid to be Estimated by Artificial Intelligence

: With the increase and development of electronic systems, especially with the advancement of artificial intelligence (AI) applications, AI has begun to meet many of humanity's needs. Due to the rapidly increasing human population and the decreasing availability of fertile land, the use of AI has become necessary in rapidly expanding soilless agriculture practices. One of the biggest challenges in soilless agriculture is the inability to accurately determine the chemical content of nutrient solutions in real-time. In this study, the results of inductively coupled plasma optical emission spectrometry (ICP-OES) and electrical conductivity (EC) were obtained for 300 hydroponic agriculture nutrient solutions containing different ratios of Mg, K, and P minerals. The obtained data were evaluated using artificial neural networks in Matlab® software, with ICP-OES results as inputs and EC results as outputs (3 inputs-1 output). The results were uploaded to the cloud system using Firebase, and an EC meter capable of communicating with the cloud was developed. The results of the produced EC meter were compared with the data in the cloud, and attempts were made to determine the element ratios in the nutrient solution content of 300 samples using artificial neural networks. The Pearson Correlation Constant (R) was found to be 0.860 for all data. According to the test results obtained with the produced system, the success rate of the artificial neural network in detecting the chemical composition of the nutrient solution ranged from 53.2% to 87.4% depending on the chemical ratios in the nutrient solution.


INTRODUCTION
Agricultural research and development (R&D) is generally conducted to meet the rapidly increasing demands of the population for nutrition and better living, ensuring healthy nutrition, food safety, and reliability, developing environmentally friendly and sustainable agricultural techniques, and increasing foreign trade.These studies gain even more importance today, when cultivable areas cannot be increased and are even decreasing.The new technologies developed as a result of R&D activities lead to increased production, economic growth, and changes in social structure, thus giving rise to new societal needs.This cycle demonstrates the necessity of continuous R&D in the field of agriculture [1].
When interdisciplinary studies are taken into consideration within the scope of R&D activities in agriculture, innovation in agriculture becomes a phenomenon where many individuals working in agronomy, software, and electronic hardware converge on a common ground [2].In recent years, soilless agriculture has become one of the frequently studied topics in R&D activities within agricultural applications, particularly in private companies and university laboratories.
With its features such as being able to be cultivated throughout the year, achieving high yields in small areas, not requiring fertile soil, and being controllable against external factors, soilless agriculture has begun to replace traditional agricultural practices today [3].Additionally, topics such as soilless agriculture and the environment, fertilizer applications in soilless farming, and their effects on plant physiology have begun to be studied in a scientific framework through postgraduate education.As a result, efforts to achieve maximum yield in agricultural production with minimum cost have gained momentum [4][5][6][7][8].
Hydroponic farming is one of the types of soilless agriculture, and in this field, both scientific and industrial activities are carried out.Instant monitoring of the element ratios in the nutrient solution is crucial for both system control and preventing chemical nutrient waste during production.Upon reviewing the relevant literature, it is observed that methods such as measuring electrical conductivity (EC), pH measurement, and ion chromatography results are used to obtain information about the chemical components in the nutrient solution in hydroponic farming [9][10][11][12][13] .While methods such as measuring electrical conductivity and pH levels of the solution provide quick measurement results, they cannot provide precise results about the nutrient elements in the solution.However, by analyzing sample specimens taken from the solution in ion chromatography systems, the element ratios in the nutrient solution content can be precisely determined.Yet, in this method, instant analysis results cannot be obtained due to reasons such as the costly nature of ion chromatography systems, their limited availability, and the need to wait in line for measurement depending on the system's workload intensity.
The mentioned methods have features that can complement each other's disadvantages.EC and pH measurement results of the nutrient solution and ion chromatography results of the same solution can be evaluated using machine learning algorithms.Thus, it is thought that it is possible to develop a system that can provide fast and highly accurate results.By evaluating the data obtained from these methods with intuitive algorithms, chemical components in the nutrient solution content can be instantly, rapidly, and accurately identified.
Artificial neural networks (ANNs) have the ability to generate new data from the information gathered through learning and generalization, similar to the human brain.In other words, the learning process of the human brain can be mathematically modeled [14].
In this study, firstly, a conductivity measurement system capable of electrical measurement and communicating with cloud systems was developed.For EC measurements, the Keysight 4285A Impedance Analyzer electrical measurement system and the Elmer Optima 5300DV ICP-OES System were used for ion chromatography.The produced conductivity measurement system was calibrated against the Keysight 4285A Impedance Analyzer system.
The data obtained from these systems were evaluated using artificial neural networks through Matlab software.300 solutions with different element ratios were prepared.The results obtained from EC and ion chromatography methods for these solutions were evaluated together using artificial neural networks.Out of the data sets correlated with artificial neural networks, 240 were used to train the model, and the remaining 60 were used to determine the prediction capability.
Taking into account the characteristics of distance learning technology and the advantages it brings forth, along with the current status of the precision agriculture technology curriculum, it is observed that technological advancements in distance learning can be utilized not only in agricultural faculties but also in higher education and industrial applications.Therefore, one of the objectives of the study is to examine how accurate results can be obtained if the developed system is used as a distance learning experimental kit for students studying hydroponic farming in agricultural faculties during the distance learning phase.

METHODS and EXPERIMENTAL
In the study, the dataset to be obtained will focus on three macronutrient elements commonly used in hydroponic farming: magnesium (Mg), potassium (K), and phosphorus (P) [15].300 samples of nutrient solution with varying ratios of these elements have been prepared.Magnesium sulfate (MgSO4) (99.99% purity, Merck) was used as the Mg source, potassium sulfate (K2SO4) (99% purity, Merck) as the K source, and phosphoric acid (H3PO4) (85% purity, Merck) as the P source.Ultrapure water was used as a solvent to avoid any contamination in the samples from which the data set was obtained.The source chemicals were added to 10 ml of ultra-pure water in different ratios and mixed for 15 minutes at room temperature.For clarity, the mixing ratios of 15 samples are provided in Table 1.For ion chromatography measurements, an ICP-OES (Inductively Coupled Plasma -Optical Emission Spectroscopy) system was used.The basic principle of this system relies on the excitation of the sample by argon plasma, which reaches high temperatures (5000-9000 ºK) through electromagnetic induction.The excited elements emit specific wavelengths and emission intensities, which are then determined based on these characteristics.ICP-OES is a method used for the analysis of elements dissolved in aqueous solutions [16].The Perkin Elmer Optima 5300DV ICP-OES system used in this study provides information about elements in the solution at parts per million (ppm) levels.The basic schematic diagram and operation principle of this system are shown in Figures 1 and 2, respectively.Upon reviewing the relevant literature, it has been observed that studies exist where the content of sample specimens taken periodically from the nutrient solution in hydroponic farming systems is determined [17].While ICP-OES measurement can accurately determine the solution content, it is not suitable for obtaining instant results.Furthermore, EC measurement can provide instant but not precise results.EC, or Electrical Conductivity, can be described as the value of the current passing through a sample when voltage is applied to it.It is one of the distinguishing properties of samples.Moreover, changes in the element ratios present in the chemical composition also alter the electrical conductivity value of the component.Therefore, the EC measurement results of the prepared samples were obtained for the dataset under investigation.Electrical conductivity in liquids occurs through dissolved ions.However, this can vary depending on the temperature and type of ions in the liquid.Additionally, there are two different methods for measuring conductivity in liquids: conductive conductivity and inductive conductivity.Due to its relatively simple structure and the ability to work with low-cost, widely applicable probes, the conductive conductivity method will be applied in this project.In this method, alternating current (AC) is applied to the electrodes, preventing the polarization of ions on the electrodes and allowing current to pass through.Measuring conductivity by applying direct current (DC) does not yield accurate results because DC voltage causes oxygen and hydrogen molecules to gasify in the liquid, leading to electrolysis.Additionally, concentration changes due to evaporation can also ocur [19].Therefore, the Keysight 4285A Impedance Analyzer system, capable of applying AC in the range of 10-20 V and at kHz frequencies, has been preferred for EC measurement.
Each of the 300 samples produced had its electrical conductivity determined using the Keysight 4285A Impedance Analyzer system.Since the samples for EC measurement were liquids, conductive plates with dimensions of 1×1 cm² were placed at the tips of the Impedance Analyzer system's probes.
There is a 1 cm distance between the conductive plates.The arrangement of the Keysight 4285A Impedance Analyzer system and the probes within the samples is shown in Figures 3a and 3b, respectively.The obtained ICP-OES and EC measurement results were combined using Matlab software and analyzed for their correlation using artificial neural network (ANN) method.Artificial neural networks are powerful in terms of computation and information processing.This power stems from their ability to learn and generalize.Therefore, they have become one of the most important tools in solving both linear and non-linear problems.A simple example of an ANN neuron is shown in Figure 4. Out of the results obtained from the 300 samples, 80% of the data was used for training the model, while the remaining 20% was used for testing.A system for an EC meter (also called distance education experiment set) that communicates with the cloud environment using the Firebase communication procedure has been developed (Figure 5).This system facilitates communication with data on the cloud and can relay the corresponding chemical component ratio based on the measured value to the user through an Android application interface.

RESULTS and DISCUSSION
ICP-OES and EC results for the 15 samples shown as an example in Table 1 are presented in Table 2.The ICP-OES results are shown in parts per million (ppm), while the EC results are shown in mS levels.When comparing Table 1 and Table 2, it is observed that the components with higher concentrations in Table 1 correspond to higher component ratios in Table 2, as expected.Additionally, it can be seen that the MgSO4 component is more conductive compared to the K2SO4 and H3PO4 components.
Matlab was used to analyze the data of the 300 samples with 3 inputs and 1 output shown in Table 2 using artificial neural networks.During the analysis, 30 iterations were performed in Matlab software, with a total of 50 neurons used.The obtained training, validation, test, and regression results are shown in Figure 6.The R value in the graph where the data was trained was found to be 0.866.The same value for the validation and test graphs was calculated as 0.658 and 0.891, respectively.The relatively low values of these figures stem from the fact that the obtained dataset is not entirely linear.This is because the interaction between the chemicals in the samples affects the output data, and a completely linear graph cannot be obtained.When examining Figure 6, it is determined that all the data analyzed with ANN can be matched linearly with an accuracy of 0.860.Particularly, it is evident that linearity is lost in regions where the output data is low or high, resulting in a decrease in the R value.In regions where the output data is of moderate magnitude, the fit drawn on the graph is more compatible.Considering that the produced system will operate within a certain range of chemical concentrations, this situation is favorable for the system to provide more accurate results.
The results obtained from the system capable of measuring EC were compared with the data on the cloud.It was found that while the results were not exactly the same, they operated with an accuracy ranging from a minimum of 0.532 to a maximum of 0.874.Considering that a similar study has not been attempted in the literature before, this range of values can be considered promising.

CONCLUSIONS
In the study, the ICP-OES and EC measurement results of 300 hydroponic nutrient solutions containing Mg, K, and P elements were analyzed using artificial neural networks in Matlab software.In the examined dataset, the ICP-OES results were considered as input data, while the EC results were treated as output data.It is evident that the low and high EC result regions in the dataset do not change linearly, but the intermediate range appears relatively linear.Considering that the produced system will be used within a certain EC range, particularly in the intermediate region, the obtained R results for training, validation, test, and overall are promising for this study, which has not been previously attempted in the literature.In addition, the prediction rate of the EC meter system, which is designed to provide instant detection and serve as an experiment set for students and academics working in the field of soilless agriculture in distance education, varies between minimum 0.532 and maximum 0.874 at different values of the data set.If the prediction success rate is evaluated with non-linear functions in regions where the graph does not change linearly, it is expected to increase.

Figure 5 .
Figure 5. Produced electrical conductivity meter system (distance education experiment set)

Figure 6 .
Figure 6.Regression graphs of data processed on Matlab artificial neural network

Table 1 .
The Mixing ratios of first 15 samples