Methods for the Efficient Energy Management in a Smart Mini Greenhouse

: To solve the problem of energy efficiency of modern enterprise it is necessary to reduce energy consumption. One of the possible ways is proposed in this research. A multi-level hierarchical system for energy efficiency management of the enterprise is designed, it is based on the modular principle providing rapid modernization. The novelty of the work is the development of new and improvement of the existing methods and models, in particular: 1) models for dynamic analysis of IT tools for data acquisition and processing (DAAP) in multilevel energy management systems, which are based on Petri nets; 2) method of synthesis of DAAP tools in energy efficiency management information systems (EEMIS) of the enterprise which provides a reduction in hardware and time costs from 10% to 40%; 3) method of conflict-free data exchange determining the minimum memory speed for the synthesis of real-time exchanges, it reduces the cost and energy consumption; 4) method of calculating the signal of postsynaptic excitation of neural elements decreases the processing time of technological data two or more times. The proposed methods, models and tools have been tested while implementing the EEMIS of the intelligent mini-greenhouse, as a result, energy efficiency has increased by 12%–25% (depending on season and peculiarities of growing plants).

development of the energy sector of Ukraine is impossible without the introduction of Industry 4.0 technology and implementation of the existing standards ANSI/ISA-95, IEC 62264, etc. [12,13]. Accordingly, the urgent task today is to develop the IT for a multi-level energy efficiency management of the enterprise, which will take into account the peculiarities and specifics of the energy sector of Ukraine.
The purpose of the research is to increase the energy efficiency of an enterprise on the basis of the developed IT for technological data acquisition and processing, i.e.,: • to develop a structure of the information technology for technological data acquisition and processing in a EEMIS that should be based on a modular principle; • to design a multi-level energy efficiency enterprise management system (EEMIS) that should be based on modern principles of technical system development; • to develop mathematical models and methods for information technology of technological data acquisition and processing in a multi-level EEMIS; • to confirm the practical value of the developed multi-level EEMIS by implementing it for a real enterprise (for a smart mini-greenhouse).
Novelty of the given work lays in the following: the model for the investigation of dynamics of the designed system on the basis of Petri nets is proposed, the methods of structural synthesis, conflict-free data exchange, intelligent data processing are improved. This paper is structured as follows. It consists of 7 Sections. After a short introduction to the research context Section 2 reviews the recent literature. Section 3 demonstrates the developed structure of a multi-level system for enterprise energy efficiency management and proposes the model for formalization of IT management of enterprise energy efficiency. Section 4 is dedicated to the development of mathematical models and methods for the synthesis of energy efficiency management information system (EEMIS). The results of implementation of the developed models and methods for EEMIS synthesis are presented in Section 5. Section 6 shows the practical example of EEMIS synthesis for the smart greenhouse. Finally, Section 7 includes the main conclusions.

Related Works
Many scientists have contributed to the research of the theory and practice of energy efficiency at the enterprises, in particular: the basic principles of energy management have been developed in the works of Ganzha [14]; solutions to the problem of municipal energy planning, management and development of local energy systems are highlighted by Nilsson et al. [15] and by others [16,17]; methods and tools for building automated systems of energy efficiency management were described by Capehart et al. [18]; Yang et al. [19] studied energy efficiency management at the state level and interstate cooperation; Thiede [20] investigated the application of energy efficiency management systems in manufacturing; Oung [21] developed guides for improving energy efficiency in production; Smith [22] proposed a solution to the problem of improving energy efficiency in the IT area; Metaxiotis [23] and other authors [16,17,[24][25][26] conducted research on intelligent energy efficiency management systems; Thollander et al. [27] designed engineering solutions to im-proving energy efficiency; Hu et al. [28] defined a generalized energy efficiency factor; Tkachenko [29] proposed energy efficiency management models on the basis of artificial neural networks, etc. However, these methods, models and individual software and hardware for improving energy efficiency of the enterprises are designed to solve local problems. Thus, modern intelligent information technologies are not used to full advantage and the peculiarities of large hierarchical systems are not taken into account.
Today, about two-thirds of the world's population live in the cities. Consequently, the issue of improving energy efficiency is being actively discussed and solved at the level of municipal administrative management in different ways. Particularly, the approach for effective selection of projects to optimize the use of electricity in the smart city systems is presented in [30] and various methods and approaches to improve energy efficiency in the cities are proposed in [31][32][33][34][35]. However, the effectiveness of the proposed solutions is determined by the peculiarities and specifics of each city, region or country.
Thus, the conducted analysis allows us to state that the development of energy efficiency management system at an enterprise requires consideration of its specifics and peculiarities. The standards of modern enterprises management should be the core of the system development [9][10][11][12][13] that will make it possible to implement the integration of systems for different functional purposes. Moreover, the increase in energy efficiency is associated with the need to apply the developed methods and tools with a high level of intellectualization based on the machine learning, artificial neural networks, etc. [36][37][38][39][40], and the synthesis of a multilevel [41] energy efficiency management system at an enterprise should be implemented with the use of system approach.

The Structure of Information Technology for Data Acquisition and Processing in the EEMIS
Presented review of the literature allows us to suggest that the process of an EEMIS development involves solving two main problems. The first problem refers to the collection of prompt and reliable information on the cost of energy and materials in real time and its pre-processing. The second problem is related to the processing of the collected information and making effective management decisions on the basis of it. By its nature, such a system is multi-level and hierarchical. Accordingly, the decision-making process is also hierarchical and multi-level. Based on the analysis of international standards, a three-level energy efficiency management system has been developed.
In the process of multi-level EEMIS implementing, information technology is built, the structure of which is shown in Fig. 1. IT for data acquisition and processing (DAAP) in energy efficiency management system processes the data received from the sensor subsystem. In general, these are technological data on energy consumption, namely electricity, gas, water, etc. The next stage of IT operation is to save the processed data in a format convenient for carrying out the analysis and making optimal decisions to improve energy efficiency in an enterprise.  Methods for intelligent data processing Figure 1: Generalized structure of IT for data acquisition and processing in a multi-level EEMIS Developed IT for DAAP in EEMIS includes special developed methods and tools, namely data acquisition and data pre-processing tools, data storage tools, intelligent data processing tools and methods for synthesis of microcontroller systems, methods for storing processed data, methods for intelligent data processing.
In mathematical form the developed IT can be described using the tuple theory: where: M In is a set of input data; M MMA -a set of tested methods, models and algorithms (mathematical basis of IT for DAAP in EEMIS); M SHT -software and hardware tools of IT for DAAP in EEMIS; M Out -a set of output data of IT for DAAP in EEMIS.
The main task of IT is to process data from sensors in order to generate data for the support and decision-making system. To achieve this goal, the data from the sensors go through several stages of processing using the developed methods and tools. Thus, the developed structure of IT for data acquisition and processing in a multi-level EEMIS is based on the modular principle, which allows us to quickly improve the software and hardware of the developed information technology. In order to explain how the above-described IT is implemented in the EEMIS it is necessary to develop its structure with all hardware and software modules in it. The structure of multilevel energy efficiency management system is shown in Fig. 2, where TCP/IP is a stack of exchange protocols, ETL-Extract, Transform and Load, SCADA-Supervisory Control And Data Acquisition, SoC-System-on-a-Chip, MC-Micro Controller Unit, PLC-Programmable Logic Controller, SS-Smart Sensors, A-actuator, SA-Smart actuator. It includes three levels, namely the level of data acquisition and actuator control; the level of control and management of technological processes; the level of operator control and management decision-making. Each of the levels is able to interact with the neighboring ones. The level of data acquisition and actuator control includes a set of microcontrollers, actuators, sensors and additional expansion cards. This level is responsible for obtaining up-to-date technological data on the state of the system and actuator control. The level of control and management of technological processes comprises a technological database, which is implemented on the basis of multi-port memory, programmable logic components and other auxiliary modules. It is liable for data acquisition on the state of the technological process, communication with the level of operator control and direct control over the parameters of the subsystem. The level of control and management decisionmaking consists of servers, databases, workstations, personal computers, etc. It is accountable for the visualization of data on the state of production and direct control of the operator over the parameters of technological processes.
The developed structure is based on the principles of the universal computing tools usage (computers, microprocessors and microcontrollers) by developing special software; on the use of the specialized FPGA tools that implement algorithms of EEMIS tools in hardware; on functionally-oriented tools (systems-on-a-chip, universal computing tools supplemented by hardware expanders that implement basic algorithms and complex basic operations) and allows you to automate and increase the efficiency of management decisions in the enterprise [42][43][44].

Mathematical Background for IT of Data Acquisition and Processing in EEMIS
The core of the developed information technology is presented by mathematical models and methods and includes the developed methodology of data acquisition and processing in EEMIS. In mathematical form, the methodology is described as a set of tested methods, models and algorithms. where: Step k )-a set of steps of methodology implementation algorithm (sequence of methods and models usage).
Thus, the developed methodology of IT for data acquisition and processing in EEMIS includes new and improved methods and models [45][46][47][48][49][50][51][52][53][54][55]: the method for synthesis of data acquisition and processing tools [41], the method for conflict-free exchange between data acquisition and processing tools in EEMIS [46], the method for intelligent tools implementation based on artificial neural networks [47] and models for analysis of structure dynamics of the synthesized tools of data acquisition and processing based on simple, colored and hierarchical Petri nets [48].
The role and place of each of the components of the methodology of IT for data acquisition and processing in EEMIS is shown in the scheme in Fig. 3.

Conflict-free method for data exchange
Software and information support for the synthesis system

The Method for Automated Synthesis of Software and Hardware Tools
To automate the design of hardware, the method for synthesis of data acquisition and processing in energy efficiency management system at an enterprise is developed [45], which includes two main stages: choosing the element base on the basis of the developed method for selecting the basic elements of IT for multi-level energy efficiency management; the synthesis of data acquisition and processing tools taking into account the requirements of the technical task and the parameters of the interfaces between the basic elements of the synthesized structure.
The first stage involves the method for choosing the basic elements of IT for multi-level energy efficiency management at an enterprise, which is based on the application of the theory of multicriteria analysis [49] and takes into account the requirements of specific applications. The core of this method for selecting the element base is an integrated efficiency evaluation based on partial efficiency criteria for each base element, which are created for each specific application. The evaluation of the integrated efficiency is carried out according to the scheme of compromises, in particular for the evaluation of integrated efficiency of the j-th element base E EIEB,j we use the following expression: where: λ i is the i-th weighting factor that determines the relative importance of the i-th partial criterion; E NEE,i is a normalized efficiency evaluation of the i-th partial criterion; n is a number of partial criteria of the element base efficiency included into the convolution.
The ranking method or point method is used to determine the values of weighting factors. The method for selecting the element base for the synthesis of EEMIS tools requires a sequence of steps, namely: Step 1. To create the list of partial criteria that the efficiency of element base depends on.
Step 2. To determine the scale of changing the numerical values of partial criteria for element base efficiency (due to the requirements of the technical task).
Step 3. To determine the set of the element base that meets the requirements of the technical task for EEMIS components.
Step 4. To calculate the values of weighting factors that determine the relative importance of the i-th partial criterion.
Step 5. To calculate the values of the i-th partial normalized criteria for the element base efficiency.
Step 6. To evaluate an integrated efficiency of each j-th element base.
Step 7. To choose the element base for the synthesis of EEMIS components.
At the second stage of implementing the method for synthesis of DAAP tools, it is necessary to build the structures of new functional tools, which consist of elements obtained at the first stage.
The second stage is based on the developed method for synthesis of information technology tools for EEMIS, which, in contrast to the existing ones, provides a reduction in hardware and time costs due to the communication interfaces of the basic components and their parameters.
The algorithm for the synthesis of data acquisition and processing tools of a multi-level energy efficiency enterprise management system involves five steps: Step 1. Analysis of the requirements of the technical task and preparation of the sets of basic elements.
Step 2. Synthesis of element sets.
Step 3. Rejection of the synthesized component options, the basic elements of which are not compatible with each other.
Step 4. Calculation of the values of the objective function for each filtered configuration of the synthesized system.
Step 5. Sorting and selecting the synthesized components of multilevel EEMIS from a set of N components with the maximum value of the integrated efficiency assessment Q j .
The developed method for synthesis makes it possible to create the list of alternatives to system structures using fewer calculations. All synthesized options, which correspond to the technological task, are compatible with interfaces and are characterized by high technical and economic indicators.

The Method for Conflict-Free Data Exchange
Modern energy efficiency enterprise management systems are usually three-level systems. The specific of each level is determined by the hardware and software components and the tasks that are solved at this level. One of the main tasks of EEMIS is creating a single information space in real-time with complete up-to-date information and ensuring conflict-free exchange between the components of the developed system. To solve such problems, the method for conflict-free data exchange is improved. Due to the coordination between the intensity of data flow and the intensity of access to exchange tools it provides determining the minimum memory speed for the synthesis of exchange tools in real time with high technical and economic indicators.
The synthesis of data acquisition, exchange and storage module (DAESM) is proposed to carry out on the basis of the method for time allocation of memory resources between external devices (workstations, microprocessor systems, intelligent sensors and actuators), which are connected to DAESM via industrial network interfaces [46]. According to this method, each j-th device, cyclically with a given period T j , is given a fixed time interval to memory access. This time interval is defined by the time of the memory access cycle and the number of external devices connected to DAESM. The minimum period of external devices access to DAESM is determined as follows: where: T min is the smallest of the periods of external devices access to DAESM, t ac is the access cycle to RAM, k is the number of external devices that have access to DAESM.
When the period of access of external devices is equal to or larger than T min , then a conflictfree parallel exchange is provided via DAESM. DAESM exchange with external devices should be carried out using interfaces based on the fieldbus technology.
When selecting the memory for developing DAESM, the access cycle is defined by the expression: The method of time allocation of RAM resources between external devices is improved in this work by coordination of intensity of data flow P d = kF di with the intensity of access to DAESM P IA_DAESM = kn T min , where: P d is the intensity of data flow; F di is the frequency of the i-th bits of data; k is the number of external devices; P IA_DAESM is a intensity of access to DAESM; n is data width.
Coordination of the intensity of data flow P d with the intensity of access to DAESM P IA_DAESM provides selecting the minimum memory speed, which will ensure conflict-free exchange for k external devices. Because memory speed is directly related to power consumption, reliability [47], and cost, it provides reduction in cost and power consumption and increases the reliability of DAESM.

The Method for Calculating the Signal of Postsynaptic Excitation of Neural Elements in Artificial Neural Networks
One of the ways to increase the efficiency of methods and tools of data acquisition and processing in a multi-level EEMIS of the enterprise is the use of intelligent IT tools. In EEMIS the intelligent tools are used to solve the following tasks: recovery of lost data fed from sensors under noise conditions; dynamic filtering of data from sensors; data compression and decompression; forecasting, control and management of technological processes; adjustment of technical parameters; ensuring information security and others.
Implementation of intelligent EEMIS tools is carried out on the basis of artificial neural networks [48,[51][52][53]. The main elements on the basis of which neuro-like systems are synthesized are neuro-elements, in which the weighting factors W j are pre-calculated and do not change or very rarely change during operation. In the general case, the neuro element performs data conversion due to the formula: where: Y is a output signal of neuro-element; f is an activation function; N is a number of inputs.
According to formula (6) it follows that data processing in neuro-element is reduced to the operation of calculating the scalar product and the activation function f . Many intelligent tools are synthesized on the basis of microcontrollers (microprocessors), the operational bases of which are simple arithmetic operations (addition, subtraction, inversion and shifts). Such intelligent tools for calculating the scalar product use multiplication algorithms with direct formation of partial products, because they are regular and well-structured. The most common of these are multiplication algorithms with one digit analysis. Multiplication of binary numbers with the analysis of one digit of the multiplier is written as follows where: n is the digit of the multiplier; x i is the value of the i-th digit of the multiplier; P ji is the i-th partial product.
The multiplication operation according to the above algorithm is performed in n steps, each of which is reduced to the formation and accumulation of partial products according to the following formulas: where: C ji is a sum of accumulating partial products; P ji is the i-th partial product.
To calculate the scalar product Z = N j=1 W j X j using multiplication algorithms (7), it is necessary to perform N multiplication and (N − 1) addition operations. The time of obtaining a scalar product can be reduced by applying a multi-operand approach and a vertical computational model. The implementation of such a calculation requires the formation of a macroparticle product P Mi for each bit cut.
In neuro-like systems, the weighting factors W j are pre-calculated, i.e., they can be considered constants. To calculate the scalar product, a vertical tabular-algorithmic method of calculation is improved, it involves calculating and storing in memory of macroparticle products P Mi with their subsequent summation. The calculation of the values of macroparticle products P Mi is carried out according to the following formula: The calculation of the scalar product using the tabular-algorithmic method is performed in n iterations. Computation time reduction of the scalar product according to this method can be achieved by parallelizing the computational process using two or more memory tables. The advanced tabular-algorithmic method with the use of two memory tables for scalar product calculation can be written as follows: The calculation of the scalar product by this method is performed in n/2 iterations. Thus, the method of calculating the signal of postsynaptic excitation of neural elements in artificial neural networks is improved, which is based on parallel tabular-algorithmic calculation of the scalar product using two or more tables and provides processing time reduction of technological data.

Models Based on Petri Nets
To study and analyze the work of EEMIS tools, the models were developed on the basis of the theory of simple and colored Petri nets at the system level of EEMIS synthesis [54,55]. In order to describe the functioning of a hierarchical energy efficiency enterprise management system, it is proposed to use hierarchical models based on hierarchical Petri nets [49]. In the general case, the following mathematical model of the hierarchical system is described by the following expression [56]: where: PN1 is the first level Petri set (PN1 = (PN1 1 , PN1 2 , . . . , PN1 n ); n is the number of the first level Petri nets; HPN is the main hierarchical network (or hierarchical network of the 0-th level); P is the set of positions; T is the set of transitions; F is the set of arcs; M 0 is the initial markup for the hierarchical Petri net HPN.
Each of the first-level Petri nets is described by a similar expression with only that particularity it may include the second level nets: where: MP2 k is a set of the second level nets for the k-th net of the first level.
For three-level hierarchical Petri net there are Petri nets of the third level: where: MP2 m is a set of the third level nets for the second level net MP2 k ; m is a number of the third level nets for MP2 k net.
The models based on the theory of Petri nets and their extensions afforce to study the dynamics and to form decisions on proper functioning of a hierarchical multi-level system in accordance with the technical task requirements.
Let consider an example of a model based on the Petri net, in which the communication between hierarchical levels is taken into account. There exist certain peculiarities of the network, as each level is able to communicate with its neighbors and to transmit instructions or data. For proper system operating there is a dedicated memory area for storing and accumulating instructions and data, it is divided into buffers, which are simultaneously accessible to several hierarchical levels. That is why, the model based on the Petri net is divided into 3 subnets, each of which is responsible for obtaining instructions and generating data at a specific level (Fig. 4) Sending data to L3 Reading data from L2

Reading instruction from L3
Instructions for L2 Sending instruction to L2

Figure 4: Petri net for modelling the communication and interaction between the EEMIS levels
Based on the constructed model and the Petri net of communication and interaction of hierarchical levels, a graph of reachability of the model states was generated, it is shown in Fig. 5. The graph has 3 main operating cycles, the first one is responsible for communication between the first and second levels, and the second cycle reflects the communication of the second and third levels. According to the obtained results, all the states and subnet transitions are reachable and deadlocks are absent. The model of data acquisition and actuator control level works properly and correctly. Therefore, it can be concluded that the developed methods and models work properly, correctly, and give the output results with a given accuracy.  Reading data from L2 Sending data to L3 Figure 5: Reachability graph of states for the Petri net

The Results of the Study of the Developed Methods and Models
The paper presents the results of the study of the effectiveness of the developed synthesis methods according to different input parameters. The main parameter of the study is the efficiency of synthesis process which depends on the number of parameters of the system under development. In particular, a series of simulations of the synthesis process was performed. Different options of data acquisition and processing with different number of basic elements from 2 to 12 were generated for the experiment. During each simulation of the alternative of the developed system one microcontroller was selected which was the main system element. Auxiliary elements were selected from the list of sensors, actuators and expansion modules. For instance, temperature, light, and smoke sensors, lighting and heating actuators, as well as Bluetooth communication modules and LCD screens were selected for one of the system alternatives.
During each generating of the designed system alternative, the total number of elements' combination options is calculated as well as the number of options that are filtered for compatibility with the interfaces, and the duration time of the synthesis process is measured too. The simulation was performed on a MacBook Pro 2015 with a Core i7 processor and 16 GB of RAM.
One of the important aspects of the synthesis process is the dependence of the number of options for combining the basic elements on the number of system parameters. An additional filter is used in synthesis process and that allows to reject those options that are not compatible with the number of available interfaces. That is why a special attention in this work was paid to the study of the effectiveness of this method.
The graph of the dependence of the total number of combination options and the number of filtered options on the number of parameters of the designed system alternative is shown in Fig. 6. According to the obtained results, it can be seen that the method for filtering elements by their compatibility with the interfaces is efficient when the number of parameters of the developed system increases. Thus, the more elements the system consists of, the more microcontroller ports are involved. Consequently, many options do not have free ports and the system cannot be connected to a single microcontroller. Accordingly, with the increase in the number of elements the percentage of the rejected options also increases.  The following important characteristic of the synthesis process is the complexity of calculations during it. An important parameter in this case is the synthesis duration time, which depends on the number of options of the element combinations. A series of computational experiments were performed and the dependence of the total time of synthesis on the number of parameters of the designed system alternative is shown in Fig. 7. From the obtained data we can conclude that the total time of synthesis depends linearly on the number of options of components' combinations. Thus, the complexity of the synthesis method is O(n), where n is the number of elements' combination options.  The developed methods and IT tools were used in the process of building a multilevel energy efficiency management system for a smart mini greenhouse [57,58]. An example of the designed structure of a multilevel EEMIS for a smart mini greenhouse is presented in Fig. 8.
The system consists of three levels. The first level includes operator control and management decision-making. At this level a PC receives data over a local network and a mobile phone using Wi-Fi. The operator, with the help of the developed programs, is able to view the information about the state of the system, to get statistics for certain time intervals, to adjust the operating parameters, and to make decisions managing the system.  The second level involves control and management of technological process. At this level there is a minicomputer with a database and several programs, including a server application that provides data for the level of operator control, and the main program for interaction with the lower level. This level is responsible for aggregating data and instructions, storing data in the database and organizing interaction between the levels.
The level of data acquisition and actuator control consists of microcontrollers, temperature, humidity and lighting sensors and actuators for irrigation, ventilation, heating and lighting. This level is accountable for reading data from sensors and actuator control according to internal logic. Operating parameters can be adjusted at the level of control and management of the technological process. The system is divided into several modules, each of them is responsible for a separate room or climate zone.
An example of the subsystem controlling the whole system from a mobile device based on the Android OS is demonstrated in Fig. 9, where the screenshots of the main menus are shown. In general, there are three main screens where you can get information about climate control zones.
The indicators of energy efficiency of mini greenhouse may vary because they depend on season of the year, weather, peculiarities of certain plants growing, etc. According to a preliminary estimate, the developed system made it possible to reduce energy consumption up to 25%. For example, comparative monitoring of energy consumption was conducted in March. For one greenhouse module with an effective area of 5 m 2 , energy consumption for lighting was 15.8 kW (using smart sensors) and 18 kW (using hard automation, on/off timers), lighting savings of 12%.
For heating, the figures are as follows: 720 and 828 kW (respectively with smart sensors and hard-programmed timers), heating savings are about 13%. Figure 9: Example of the implementation of multilevel EEMIS for a smart mini greenhouse

Conclusions
The designed three-level basic architecture of the EEMIS with a variable set of the equipment has a constant core and replaceable modules that provide system adaptation to the requirements of a certain enterprise.
The methodology of data acquisition and processing in the EEMIS is developed, it includes the tested methods and models, namely the method for synthesis of data acquisition and processing tools, models of analysis of the structure dynamics of the synthesized data acquisition and processing tools on the basis of simple, colored and hierarchical Petri nets, conflict-free method for the exchange between DAAP tools in the EEMIS and the method for implementing intelligent tools based on artificial neural networks. The developed methodology is the mathematical basis for information technology of data acquisition and processing in the EEMIS and afforce to effectively solve the problems of synthesis of the energy efficiency management system for an enterprise.
The results of the component synthesis of the energy efficiency management system are presented. A prototype of the EEMIS for a smart mini greenhouse is developed, it consists of three levels and allows to reduce energy consumption. The indicators of energy efficiency of mini greenhouse may vary because they depend on season of the year, weather, peculiarities of certain plants growing, etc.