A fuzzy micro-climate controller for small indoor aeroponics systems

The Indonesian agricultural sector faces challenges producing affordably priced food using sustainable practices. A soilless cultural practice, such as indoor aeroponics, is a compelling alternative to conventional agriculture. The objective of the present study was to develop a system for micro-climate management in a pilot-scale indoor aeroponics system. For this purpose, three fuzzy logic controllers were developed and evaluated to maintain plant chamber parameters (temperature, relative humidity, and light intensity) at desired set points controlled by embedded system controls designed using BASCOM-AVR software. The results showed that the fuzzy controllers provided excellent responses and experienced relatively low errors in all controlled parameters. All parameters changes followed the set point very smoothly and responded accordingly. The averaged percent of working times in which temperature, relative humidity, and light intensity were maintained within less than ±1°C, ±5%, and ±30 lux from the set points were found to be 88.43%, 95.91%, and 85.51%, respectively.


Introduction
In aeroponics/soilless culture systems, climate control is a tool used to manipulate and maximize crop yield or other quality parameters by maintaining the optimum conditions for each crop. In this sense, advanced and highly efficient automatic control systems that make possible obtaining a maximum crop yield at a minimum cost [1] and adapt to changing climate conditions [2] especially micro-climates inside the aeroponics greenhouse, are needed. Numerous reports have been made regarding modern plant cultivation technologies under controlled environment on aeroponics soilless culture. Lakhiar et al. [3] reviewed some environmental factors of aeroponics system which have been investigated extensively, i.e. nutrient droplet size, pH and electrical conductivity (EC) of nutrient, light and temperature, humidity and dissolved oxygen concentration, misting frequency and nutrient reservoir. Theories behind climate control are generally grouped into two types, i.e., classical and modern. In the classical approach for complex biosystems such as animal buildings and greenhouses, the desired conditions, e.g., temperature and relative humidity are not always achieved [2,4]. The other disadvantages of classical approach are that it involves high uncertainties and energy consumption [5,6].
Modern approaches such as fuzzy control have been widely used in many areas, as well as agriculture. Recent research and development related to agricultural smart controls such as fuzzy control systems for greenhouses [1,7], agricultural product storage [8], animal buildings [9][10][11], irrigation [12], rice whitening machines [13], chemical spraying [14], and rice combine harvesters [15] have been reported. Fuzzy systems can maintain indoor climates within acceptable margins and can contribute to minimizing energy consumption [16]. Mirzaee-Ghaleh et al [11], also reported that fuzzy controllers provided better response, experienced a lower error and better performance against disturbances by ambient conditions for temperature and relative humidity inside Iranian poultry houses. The report also revealed that fuzzy controllers had a significantly lower mean value of total power consumption than on/off controllers. Previously, numerous agricultural commodities have been developed using aeroponics with certain controlled environmental factors as focus of study. For example, root zone atmosphere for Alnus maritima seedlings [17], cooling mechanism control with heat pipe  [18], micro-environment control and nutrition supply technique for potato production [19], quality and shelf-life of red and green lettuce as affected by soilless culture production [20], and light intensity and light combination of LED for anthocyanin expression of lettuce [21]. Buckseth et al. [22] reviewed numerous reports regarding seed potato production using aeroponics system. Benke and Tomkins [23] evaluated issues, potential advantages and disadvantages, as well as possible implications of controlled environmental agriculture, such as aeroponics.
Numerous works also have been reported on utilization of fuzzy control to manage the micro-climate condition inside greenhouse. Revathi and Sivakumaran [24] utilize fuzzy control to manage temperature inside greenhouse throughout the months including severe weather conditions in a range of 15-20°C. Marquez-Vera et al [25], used fuzzy control to regulate the temperature inside greenhouse for tomato production in semi-arid weather. Comparison of fuzzy and on/off controller to manage temperature, relative humidity, and CO2 inside mushroom growing hall was reported by Ardabili et al. [26]. Atia and El-Madany [27] made comparison of four control technique to manage greenhouse temperature, i.e. PID, fuzzy, ANN, and ANFIS. Mohamed and Hameed [28] used genetic algorithm (GA) to tune controller parameters in order to improve ANFIS performace in adjusting greenhouse climate control system. Since the Indonesian agriculture sector faces challenges in providing food using sustainable practices while maintaining affordable prices for its fast-growing population, developing soilless culture, such as indoor aeroponics as an alternative for conventional agriculture, is needed. Small indoor aeroponics systems equipped with fuzzy control are suitable for urban farming, where urban people can produce their food using limited resources. Furthermore, it has potential for further application of IoT (internet of things) in agriculture [29]. Therefore, the present study aimed to develop a system for monitoring and micro-climate management in a pilot-scale indoor aeroponics system.

Experimental Aeroponics Model
The research was conducted in the Mechatronics and Agroindustrial Machinery Laboratory of Universitas Brawijaya, Malang, Indonesia. Experiments were carried in a custom-built pilot-scale indoor aeroponics model with 50×50×75 cm 3 aeroponics chamber made of acrylic that was designed for lettuce (Lactuca sativa) and depicted schematically in Figure 1. The chamber was provided with four mini inlet fans at the side wall, i.e., two fans each located at the root zone and top zone. Artificial light with 480, i.e., 384 red colors and 96 blue colors of light emitting diode (LED) arrays for plant illumination was installed on the ceiling wall of the chamber. Four and one sprayer nozzles were installed at the root zone and top zone, respectively, for water and nutrition supply. In this aeroponics model, two thermoelectric Peltiers were used for temperature management, i.e., both acting as cooler and heaters. To manage relative humidity inside the aeroponics chamber, the combination of sprayers and fans acted as a humidifier.

Model Microclimate Parameters Measurement
The measured variables were temperature, relative humidity, and artificial light intensity. The air temperature was measured at two points: the top zone near the plant leaves and the root zone near the plant roots. An LM35 with 0.5°C accuracy was used as the temperature sensor. Air relative humidity was measured at two points at the same position as temperature sensors with an SHT11 with 3.5% accuracy. Finally, light intensity inside the chamber was measured at the near plant leaves using an OPT101 type photodiode. All measurements from all sensors were carried out simultaneously, and all recorded data were transferred to a microcontroller (ATmega16) to make the best decisions using the embedded system control designed using BASCOM-AVR software. All data were also transferred by the microcontroller to a computer with user interface software designed in Delphi 7 software. Afterward, decisions by the embedded system control were transferred to each actuator to maintain the best conditions in the aeroponics chamber using the pulse-width modulation (PWM) technique.

Fuzzy Membership Functions and Rules
Three fuzzy controllers including temperature, relative humidity, and light intensity were developed to maintain aeroponics chamber conditions variables (temperature, relative humidity and light intensity) at desired values. A schematic diagram of these controllers is shown in Figure 2. Because of the importance of the first two parameters, i.e., temperature and relative humidity, and due to the strong interaction between the two [2], these parameters were defined in one controller. The first two parameters were checked in the first and second consecutive steps (steps 1 and 2 in Figure 2), followed by light intensity. As depicted schematically in Figure 2, the fuzzy logic controller for temperature-relative humidity (FLC T-RH) has two inputs and four outputs, while the fuzzy logic controller for light intensity (FLC LI) has one input and one output to control the LED artificial light source. The input-output universe of each discourse is covered using triangular and trapezoidal membership functions whose type and position are based on predetermined preferences by plant agronomical considerations. The temperature function presented three groups, i.e., cold (C), normal (N), and warm (W). As noted in Figure 3(a) C and W are trapezoidal and can reach values up to 0°C and 40°C, respectively. The relative humidity function is composed of three relative humidity groups named dry (D), moderate (Mo) and humid (Hu). As depicted in Figure 3  The Mamdani inference method was selected to devise FLC, due to its simplicity and suitability [30] and has been commonly used in previous studies. Fuzzy rules to characterize the fuzzy system were defined based on the inputs and their conditions. The fuzzy system controls 'ON/OFF' of the sprayer, PWM for thermoelectric Peltier heater and cooler, PWM for the speed of fans, and the intensity of LED. For example, a cold temperature in the top zone and dry relative humidity in the root zone will deactivate the top zone sprayer, turn on the thermoelectric Peltier heater, activate the root zone sprayer, and activate fans at low speed. The AND condition used the minimum algorithm. For example, some of the defined decision rules were as follow. The software, designed in Delphi 7 with input and output windows for user interfacing, could monitor and record actual data sensed by the sensors. The recorded data for the respective sensor was then transformed into Microsoft Excel (.xls) format to display graphically.

Results and Analysis 3.1. Temperature and Relative Humidity Responses
Temperature and relative humidity responses are shown in Figure 4(a) and Figure 4(b), respectively. The results are for short-run testing during two random days in December 2017. In these experiments, testing runs were for 1 h with a 2 min of sampling rate. The testing was conducted during the day (Trial1) and night (Trial2) in order to analyze system responses to different ambient conditions. The desired set point for each test was different in order to analyze the accuracy of system responses to a small difference in the desired set point.
It can be seen that uncontrolled temperature and relative humidity inside the chamber varied from 31-35 °C and 50-60%, respectively, during the test. Based on the results in all experiments, the fuzzy controllers maintained temperature and relative humidity (Tin and RHin) close to set point (Tset and RHset), during the experimental runs. Temperature and relative humidity changes followed the set point very smoothly. The fuzzy system provided excellent responses for temperature and relative humidity and experienced a low error rate. The second test was designed for the extended run testing, with runs for 11 h with 15 min of sampling rates. The results were depicted for temperature and relative humidity in Figure 5 (a) and Figure 5 (b), respectively. The further results for respective temperature and relative humidity responses are summarized in Table 1.
From Table 1, it can be seen that the values for percent of the working time in which temperature and relative humidity were maintained in less than ±1°C and ±5% from the set points were quite high. The results also indicated that time required for the fuzzy controller to reach the set point for respective temperature and relative humidity was relatively low, i.e. 3.13 min and 3.88 min, respectively. Compared to previous research by Mirzaee-Ghaleh et al [11], who studied fuzzy logic controllers for temperature-relative humidity in animal buildings, the results indicate better performance in terms of percent of working time under acceptable error of temperature (±1°C) and slightly lower in terms of percent of working time under acceptable error of relative humidity (±5%). Regarding required time for reaching the relative humidity set point, the result indicates a slower response if compared to previous research by Mirzaee-Ghaleh et al [11]. This appeared to be due to the combination of sprayers and fans, which did not act as effectively as a humidifier and were not able to change relative humidity immediately. The present result also has inferiority in terms of maximum positivenegative error if compared to previous work reported by Ardabili et al. [26], who studied fuzzy logic controllers for temperature-relative humidity of mushroom growing hall.  (a) (b) Figure 5. Responses with fuzzy controllers during long-run testing, (a) temperature, (b) relative humidity

Light Intensity Responses
The pilot scale of aeroponics model was designed to operate in indoor conditions; hence natural light was not sufficient to fulfill the agronomical aspects of the plants. The installed LED was designed to give artificial light at a desired intensity according to plant agronomical requirements. Just as with temperature and relative humidity, experiments measuring light intensity responses by LED were also conducted twice in short-run tests with the same duration and sampling rate. The artificial light test was also conducted during the daylight hours (Trial1) and at night (Trial2) in order to analyze system responses to different ambient conditions and at different light intensity set points.
The light intensity responses in short run testing are shown in Figure 6 (a). It can be seen that uncontrolled natural light intensity inside the chamber varied from 87-165 lux during the test, which is not suitable for proper photosynthesis for plant inside the chamber. Based on the results in all two experiments, fuzzy controllers maintained light intensity (LIin) close to the setpoint (LIset) during the experimental runs. Light intensity inside the chamber during the daylight fluctuated more often when compared to the night time due to ambient natural light that had slight fluctuations; hence the fuzzy logic controller for light intensity had to control and maintain light by LED accordingly to the set point. It can be concluded that the fuzzy system also provides the best responses for light intensity, and experiences relatively low errors.
The long-run testing for artificial light by LED, which ran at the same duration and sampling rate as the temperature and humidity long-run test, was conducted at two set points of light intensity. The predetermined two set points were run timely and sequentially by agronomical considerations of plants. The first set point was 1300 lux, which ran for the first 90 mins, and the second set point was 200 lux, which ran for the second 420 min. The final 90 min of the test was at a 1300 lux set point. The light intensity response during the long-run test is shown in Figure 6 (b). The further results for light intensity responses are summarized in Table 2.  It can be seen in Table 2 that the value for percent of the working time in which light intensity inside the top zone near plant leaves was maintained at less than ±30 lux from the set points was high. The results also indicated that the time required for the fuzzy controller to reach the set point for light intensity was relativelyslow (1.61 min), considering the light intensity responses that should be very quick. However, the result may not indicate actual condition, i.e. this matter could be because the responses were measured at low sampling rate (2 min). Since the intensity of LED were well controlled compared to natural light, which as artificial source of light for photosynthesis, the photosynthesis reaction of plant can also be controlled [31].

Conclusion
The fuzzy system developed in present research can control the essential parameters in a custom-built pilot-scale indoor aeroponics model designed for lettuce (Lactuca sativa), such as temperature, relative humidity, and light intensity, with high accuracy. It was observed that the errors for temperature, relative humidity, and light intensity were still at acceptable values in most of the working durations. All essential parameters changes followed the set point very smoothly and responded accordingly.