Smart greenhouse and plant growth control

Since the development of agriculture is an important problem for every state, huge funds are allocated to this industry. However, the problem of lack of fresh fruits/vegetables, that is, the problem of import substitution remains a pressing issue in many countries. The aim of the study was to inspect the growth of plants in a home-based mini-greenhouse, for which reason the following tasks were set: conduct a biological experiment; search for dependence of the influence of environmental conditions (microclimate) on growth. The paper highlights the problem of import substitution of vegetables in Kazakhstan, and suggests the best way to solve this issue. The proposed solution offers the development of mini-greenhouse that meets the criteria of price and quality. The developed system differs from other smart greenhouses, firstly, by its availability to a wide range of users (price criterion), and secondly, by ensuring agrotechnical, energy, and design requirements (quality criterion). These requirements are implemented through the use of promising technologies: phytomonitoring, intelligent technologies and open source software, the use of available construction materials and water saving technologies such as drip irrigation. The economic effect from the use of the proposed technology has amounted to 10,000 tenge, the payback period was 4 seasons. show experimental data on the environment and plants for 75 days. This is the daily average of the environment and the average of each plant. The average yield was 3-4 kg/plant. By maintaining optimal conditions in the greenhouse, several yields can be obtained in 2-3 months.


Introduction
Throughout human history, agriculture has remained the most conservative branch of the economy. Low margins, high risks, an acute dependence on fluctuations in the prices of fertilisers, fuel, finished products (highly fragmented supply chain) impede the infusion of private investment. Up to 30% of the total budget of the European Union is spent on supporting European farmers [1]. Greenhouse industry is one of the leading branches of agriculture. The health of the population directly depends on the development of this sector of the economy. For the full development of the human body, 80-100 kg of fresh vegetables (not counting potatoes) are needed for one person a year. For a family of 5, it is necessary to consume vegetables (kg): tomatoes (50), cabbage (50), onions (50), carrots (50), cucumbers (25), beans (25 kg), etc. [2; 3]. Since the development of agriculture is an important problem for every state, huge funds are allocated to this industry. However, the problem of lack of fresh fruits/vegetables, that is, the problem of import substitution remains a pressing issue in many countries [4][5][6][7]. The authors of the paper suggest the following solution. It is necessary to build a mini-greenhouse, which, although cannot give a large harvest, can provide for one family. The main advantage of mini-greenhouses from industrial ones is an affordable price for building materials, relatively low prices for household appliances and components, low costs for resources (electricity, water, etc.). It is assumed that if every citizen himself provides his family with fresh vegetables/fruits (growing in his own garden), then the state problem of import substitution will eventually fix itself [8]. There is also a problem of lack of personnel in the countryside due to the outflow of rural youth to the city. The training of rural personnel in the field of smart and precision farming, energy-saving technologies, as well as the widespread introduction of mini-greenhouses in the village will solve the last problem. It is known that the key requirement for the development and implementation of technical systems is the price/quality criterion. Obviously, the higher the quality, the higher the development cost and vice versa. But how to assemble a system that provides both the required quality and low price at the same time? One of the key problems in the development of modern greenhouses is the construction of a system that meets the criterion of price/quality [4; 6]: 1improving the quality of service (accuracy and high speed of control); 2reducing the cost of construction and equipment (availability to the general user) of the greenhouse. Phytomonitoring is one of the leading advances in the greenhouse industry, which performs direct and continuous monitoring of the plant growth process, aimed at improving the controllable yield factors. According to experts, in the near future, it is the use of phytomonitoring that will become the world standard for developed agriculture and change the approach of farmers to their work [4; 9; 10]. This technology includes three components: 1recurrent visual inspection by specialists, sampling of plants, evaluation of the general condition; 2systematic laboratory analyses of plants, soil, irrigation water; 3continuous processing of information coming from phytomonitoring stations (monitoring sensors). But, however, the widespread adoption of the latest technology is limited by several reasons. A plant is a living organism that implements several functionsmaintaining a stationary inner state (immunity), on the one hand, and adaptation to external conditions (survival) [3; 11]. Therefore, there is still a problem of the complexity of analysing the state of the plant (biological problem), and the complexity of developing equipment for monitoring the state of the plant (technical problem) ( Table 1). There is no mass production and widespread use of this technology yet. Drip irrigation [12,13] TP management The accuracy of water regime control is increased and the loss of water resources is reduced (by about 30-60%). Affordable price. Yes.
Smart greenhouses [14,15,16] TP management and control Labour automation, accuracy and speed of data processing. Complexity of development.
Requires special knowledge. The development cost is relatively high, requires an order to a specialist.

No.
AIoT platforms / AIoT applications TP control Control of data coming from sensors, equipment, and other devices. Yes.

Agricultural robots TP management and control
Unmanned aerial vehicles, drones for monitoring the state of fields and harvesting, smart sensors. No.
Hydroponics / Aeroponics [17,18] * Improves the quality of harvesting by growing plants in water/air. Requires special knowledge in the field of biology and special equipment. The price is relatively high. Yes.
Genetic engineering [4] * Improves the quality of obtaining crop varieties. Requires special knowledge in the field of biology and special equipment. The price is relatively high.

No.
Note: * These technologies do not belong to IT technologies.
For these reasons, most inexpensive greenhouses use control schemes without taking into account the state of the object of researchplants. This is a big drawback of such systems [5; 12; 14; 17; 18]. How to get out of the situation, is it possible to find an alternative solution that replaces the use of sensors for monitoring plant health?
The authors propose to use intellectual technology instead of a phytosensor as part of the system, that is, two expert systems were used throughout the study. The first is used for control (phytomonitoring), the secondfor object management. The aim of the study is to inspect the growth of a plant in a mini-greenhouse. Research tasks: conduct a biological experiment; find the dependence of growth on the influence of environmental conditions (microclimate).

Materials and methods
In the life cycle (ontogeny) of the plant, four stages are distinguished: embryonic (seed development), juvenile (youth), reproductive (maturity), old age. Growth dynamics is determined by a growth curve that obeys a logarithmic law (Figure 1a) [3; 19]. The productivity of vegetable crops is largely determined by external conditions, that is, by microclimate conditions: − climatictemperature (day and night, total temperature), light (illumination, spectrum, photoperiod), air (composition, movement, humidity), magnetic field, mechanical impact (wind, etc.); − soil (physical and chemical properties, soil air and moisture). The level of plant response to exposure is determined by three values: optimum (most favourable), minimum and maximum (extreme) values of the factor at which plant life is possible. Closer to the optimum, the normal growth is observed, and closer to the minimum and maximum, the growth of individual organs slows down or accelerates, and as a result, the growth is defective. The closer to the optimum, the shorter the lag and the steeper the logarithmic part of the curve (Figure 1b). Optimisation of conditions for growing vegetable crops in sheltered ground depends on the level of technical equipment that provides heating, lighting, maintaining a gaseous regime, watering, feeding and caring for plants, phytomonitoring.
The purpose of the experiment is to investigate the dynamics of plant growth in a home mini-greenhouse. The tasks of the experiment: to determine the dependence of growth on the influence of three factors of the microclimate environment: temperature, watering and illumination.  Lining-out April 3 Seedling hardening April 4 Planting seedlings April 5 Installation of supports and trellises May 6 Manual plant care (loosening the soil, weeding, hilling, watering) the entire growing season 7 visual inspection, measurement, processing of measurement data; analysis of the work of the expert system and adjustment, if necessary every 7 days during the growing season 8 Control and management of plant growth using the "Microclimate GH" mobile application the entire growing season 9 Combatting plant diseases May-July 10 Removal of side shoots May-July 11 Harvest August The 7th and 8th stages of the work plan represent the use of intelligent technology. In the course of the 7th stage, the following indicators of plant growth are measured: number and length, colour of leaves, length and thickness of the main stem. The 7th stage is the training mode, and the 8th stage is the usage mode of the expert system. The figure below provides the process flow diagram of the mini-greenhouse (Fig. 2). The system implements three technological processes (TP): cooling, watering and lighting.

Figure 2. Technological processes in the mini-greenhouse
The drip irrigation system works in the following way. Water is filled into the tank (1). The control unit (CU) (11) regulates the water supply (control action u2), that is, opens/closes the water valve (2) by turning on/off the controller relay. When the valve is open, water flows downward (blue arrow), passing the main pipeline (3) and the drip chamber (4), and watering the plant in the pot (brown vessel). Information about the state of the soil g2 is measured by the moisture sensor (5) and transmitted to the controller by the control unit. The cooling system is described as follows. The control unit regulates the air supply to the greenhouse, forming a control action u1, by turning on/off the fan (6) through a relay. The air supply is indicated by a grey arrow. The temperature sensor (7) measures the greenhouse air temperature g1 and transmits the data to the CU controller.
The lighting system controls the light conditions in the greenhouse. The control unit generates a control action u3, which turns on/off the lamp (8) via the controller relay. The light intensity data g3 is measured by the light sensor (9) and transmitted to the CU controller. Data on the state of the object x is measured by a phytosensor (10) and transmitted to the CU controller. Based on these data, the CU makes a decision on the management of the object. Let us consider in more detail the connection of the Control Unit with the technological processes of the greenhouse ( Figure 3). The signals g1(t), g2(t), g3(t) from the sensors of the greenhouse environment (5), (7), (9), the signal x(t) of the plant sensor (10) are received at the input of the control unit. The frequency of reception of these signals and the frequency of processing by the microcontroller are differentthe growth rate of a plant is much slower than the speed of reaction to environmental factors. This is due to biological and physiological processes in plants [3; 19]. The frequency of receiving environmental signals is assumed to be f1=1 min (this is the frequency of updating the Database). The frequency of receiving signals from the plant sensor (10), describing the growth rate, is taken equal to f2=7 days (7*24*60=10080 min). This is the frequency of updating the Knowledge Base.
The developed model "Plant-Environment-Situation-Control" allows solving two types of problems: assessment of the state of an object (environment and plants) and the choice of a control mode for NLC. To assess the state of an object, the Environment block and the Plant block are used. The regulator (NLC) implements the function of selecting technological control depending on the situation in the Situation-Control block. The circuit that functionally implements the described model is shown in Fig. 4. It consists of the main blocks: a) Control object, in the centre of which the Plant is located; b) Information and measuring system; c) Actuating mechanisms; d) Control devices (CD) based on NLC. The system is controlled by the CD, which generates a control action based on the rules of the expert (the law of optimum) and based on the assessment of the current situation, calculated on the basis of information received from the measuring sensors and sends it to the appropriate actuating mechanism. Data exchange also occurs through the CD, which sends data to the Cloud Data Storage. Data from cloud storage for machine processing goes to the Matlab script, after processing it goes back to the CD through the Cloud storage. Monitoring data are stored in the storage for the entire growing season.

Figure 4. Functional diagram of an intelligent system
An experiment was carried out on a small scale, that is, in a home-based mini-greenhouse. This paper also presents an experiment on a large scale in a greenhouse for scientific research. For the purpose of the experiment, a diagram of the third block of the research greenhouse of the Al-Farabi Kazakh National University (Fig. 5). The block area is 3 hectares (length 60 m, width 5 m, height 3.6 m). The growing area contains 4 rows, each row contains 3 blocks. The total number of blocks is 4x2 = 8. One block is one plot, 3 plants can be planted in it. Each of the 8 blocks has its own watering valve (shown as a white open square). Water supply can be controlled by opening/closing the corresponding irrigation valve. Through each valve, through three irrigation droppers, water flows to an 8x3 = 24 plants. To monitor the state of the plant, each plant in the vicinity of the soil zone has its own transmitter with built-in sensors: temperature and humidity, illumination and soil moisture.  Table 3. Lining-out April 3 Seedling hardening April 4 Planting seedlings April 5 Installation of supports and trellises May 6 Manual plant care (loosening the soil, weeding, hilling, watering) Initial and All stages 7 visual inspection, measurement, processing of measurement data; analysis of the work of the expert system and adjustment, if necessary every 7 days during the growing season 8 Control and management of plant growth using the "Smart Greenhouse" mobile application All stages 9 Combatting plant diseases May 10 Removal of side shoots May 11 Harvest Fruiting stage The experimental data was obtained on specially designed equipment of the "Home Smart Greenhouse" system (the system configuration is given in the Table 4).

Results and discussion
A mathematical model of the "Plant-Environment-Situation-Control" system is proposed. It consists of blocks: Environment, Plant, Situation, and Control: 1 -Block Environment characterises the state of the microclimate on a daily basis (Atmosphereair temperature, relative air humidity; Soilrelative soil humidity; Lightillumination). The state of the environment is described by the vector F.

-
The Plant block is the main block of the system (Control object) and characterises the state of the plant and is described by the vector X.
3 -The Situation-Control block characterises the state variables of the system and the choice of the control mode (ventilation, lighting, drip irrigation) depending on the specific situation S. In this block, the integral indicators of Environment and Plants are calculated. The mathematical model of the system belongs to the class of continuous-discrete (hybrid) systems. This suggests that the system is characterised by both continuous and discrete behaviour. Despite the fact that in any physical system the time t is continuous, we can speak of discrete times t (i,j) as a subset of continuous time values. The developed model of the "Plant-Environment-Situation-Control" system and the process of regime control in accordance with a specific situation are shown in Figure 8. Before starting the simulation, the operation of converting continuous time into discrete time is performed: t→t (i,j). For example, the processes in the Environment Block are described in the diurnal time scale t (i), that is, they have the Day and Night states. And the processes of the Plant Block on a biological time scale t (j), this means that during the growing process, the plant passes through four phases (phenophases): initial (Sprout-Seedling), growth of the vegetative part, flowering and fruiting. Depending on the specific state of the environment and the state of the plant, the system transitions from one mode to another. These specific states are situations (events). They define the control modes. There are two types of modes: a) biological, which describe the transition of a plant from one phase to another; and b) technological, describing the transition from one technological process to another. The conditions for the transition from one mode to another are determined by the corresponding biological and technological standards [20][21][22][23][24].
The "Plant-Environment-Situation-Control" model is described in [2; 4] and is implemented as an expert system (ES). Its core is the Knowledge Base (KB), it is built on the basis of an expert's knowledge and formalised in the form of rules. In our case, knowledge base replaces the mathematical model of the control object . At the same time, the success of solving the problem largely depends on the structure and content of knowledge bases, as well as algorithms for their processing [49][50][51][52][53][54][55][56][57][58][59][60][61][62][63][64][65][66][67]. At the disposal of the expert, with whose participation the biotechnological (biological and technological) control is formed, there is a database in which the state of plants X(t), the state of the environment (climate) F(t), operating parameters of technological operations uk (t), k=0,1,2,3 (norm, ventilation, lighting and watering). The knowledge of the expert in assessing the situation S (X, F) will be used to select the control mode uk. The model of the "Plant-Environment-Situation-Control" system is specified as a sequence (Eqs. 1-6): = ⟨ (0, ), (0, ), ( , 0, * , * * , * * * ), ( , , * , * * , * * * )⟩ (4) where: -Xm (ti)daily plant stateinput parameter (data); -Xm (tj)biological state of the plantinput parameter (data); -Fr (ti)daily state of the environmentinput parameter (data); -Fl (tj)biological state of the environmentinput parameter (data); -Siassessment of the current situation (daily)calculation; -Sjassessment of the current integral situation (biological)calculation; -Uk(Si)control mode in the current situation (daily)calculation; -Uk(Sj)control mode in the current situation (biological)calculation; -OPTioptimal conditions and norms (daily)task; -OPTjoptimal conditions and norms (biological)task. Mini-greenhouse is located in the apartment, under the window. The drawings were removed in the evening. It can be seen that the apartment is dark, although it was light outside and there is a lack of light. Therefore, most of the time the floodlight is switched on (Fig. 9). a) b) c) Figure 9. Home mini-greenhouse: a) irrigation valve; b) control unit; c) plants in the greenhouse Figure 10 illustrates the readings of the sensors for air temperature, soil moisture and light. These data reflect the law of variation of a random variable (temperature 20 ± 2 ºC, soil moisture 76 ± 6%, illumination 5 ± 2 lm). The results of the biological experiment are shown in the Table 5. From the biological characteristics of the plant, we know that normal growth is 45 cm, planting of seedlings in 40-45 days. The growth graph in Figure 10b shows the plant growth function with deviations from Table 5. Plant growth in a home-based greenhouse with deviations from  Fig. 8a, 9b, 10a). The overall cumulative estimate is O = 2.1105 (Fig. 9a). Fuzzy inference graphs of the knowledge base FIS_OPTIM in Fig. 11b show that the integral state of the environment and the plant is located near the optimum zone, thereby providing favourable conditions for plants. The results confirm that the observed states correspond to the law of optimum throughout the entire period of plant growth and development [103][104][105][106][107][108][109][110][111][112][113][114][115][116][117][118][119][120].  Figure 10b shows the dynamics of plant growth and development, its graph clearly resembles the logistic growth curve (Fig. 2).

Conclusions
The task of developing mathematical models of complex agrotechnical and biological systems is an urgent problem for engineers and developers of software systems. This paper considers the model of the "Plant-Environment-Situation-Control" systems, proposed by the authors as an alternative version of the "Soil-Plant-Atmosphere" system. Unlike the Soil-Plant-Atmosphere system, which is a white box type model, the latest models are grey box type models, that is, based on the identification of experimental data. A feature of the system is its availability and simple operation, allowing the use of simpler methods than special allometric measurements to account for plant growth and development. It should be noted that the central place in the control of the state of the object and the management of agrotechnical systems will remain with the Man. The developed system is also a man-machine system with a rational separation of the functions of data preparation (computer) and decision-making (man).
In the course of the study, the following estimates were obtained: the state of the air environment to the optimum (process 1), the state of illumination to the optimum (process 2), the state of the soil environment to the optimum (process 3), and the overall integral assessment of the environment and plants to the optimum (process 4). The results obtained confirm that only at optimal values of the factor (in the optimum zone) are the best indicators of plant vital activity observed: they actively grow, feed, and multiply. The greater the deviation of the factor from these indicators, the less favourable it is for plants. As a result of the study, the authors came to the conclusion that: a) under optimal environmental conditions, the process of normal, balanced growth and development of the plant is observed; b) with non-optimum, that is, with a lack of certain factors (heat, air, light, water), a slowdown of plant growth and development is observed.
In the course of the study, the following was performed: a biological experiment was carried out; the dependence of growth on the conditions of microclimate parameters were determined.
The following conclusions were also made: 1. Vegetable plants react very sharply to changes in environmental factors, these factors are not interrelated, none can be replaced by another. The lack of illumination cannot be replaced by an increase in temperature or an improvement in root nutrition. 2. The full development of plants, and, consequently, a high yield is achieved while maintaining a complex of environmental factors within the optimum range. When receiving a crop yield of 20 kg/m 2 , at a price of 500 tenge/kg, the economic effect has amounted to 10,000 tenge.