sImulatIon of Water purIfICatIon maChIne for VendIng CyBer physICal systems

Об’єктом дослідження є автомат очищення води для систем самообслуговування. Потреба в очищеній воді є на мийках самообслуговування, водоматах, кавоматах, тощо. Як правило, такі системи розміщаються в географічно розпорошених місцях. Одним з найбільш проблемних місць є підбір правильної конфігурації автомату під місце розташування. Іншим проблемним місцем є високі витрати на обслуговування. Більшість існуючих автоматів очищення води, які сьогодні виробляються, не мають в своєму складі системи моніторингу, що виливається в неефективну роботу сервісної служби. Названі проблеми призводять до зменшення кількості користувачів систем самообслуговування. Для вирішення згаданих проблем пропонується проектувати автомат очищення води, який буде працювати в складі 5-ти рівневої вендингової кіберфізичної системи. Описано структуру та принципи роботи автомату очищення води на базі мембрани зворотного осмосу. В ході дослідження використовувалися методи імітаційного моделювання Монте-Карло, що дозволило підібрати конфігураційні параметри автомату відповідно до запитів користувачів. Визначено критичні параметри обладнання, які впливають на продуктивність автомату очищення води. За результатами моделювання вибрано дві типові конфігурації автомату на базі мембран TW30-1812-100 та XLE4040. Додатково програмна модель автомату очищення води інтегрована в аналітичну систему, яка генерує рекомендаційні рішення для сервісного відділу. Аналітична система рекомендує не тільки текучу заміну функціональних вузлів (фільтрів, мембрани), а й здатна спрогнозувати потребу в зміні конфігурації автомату. Такий підхід дозволяє оптимізувати маршрути обслуговування та збільшити ефективність роботи сервісної служби. ключові слова: вендингова кіберфізична система, імітаційне моделювання, мембрана зворотного осмосу, аналітична система. salo a.


Introduction
Vending is the sale of goods and services using automated systems (vending machines).The vending machine should perform the following functions: accept cash and non-cash money; issue a product or service; work independently of the staff (except for filling, repair, collection).It can additionally (if necessary) perform technological (preparation or processing before issuing) and advertising functions.Vending cyber-physical system (VCPS) is a 5-level platform that provides integration of territorially-distributed vending machines (VMs) and information software and hardware systems with the help of telecommunication facilities [1,2].Vending CPS has the following features: -a high level of interaction with a person (great value is the simplicity and convenience of using the machine); -multilevel structure; -heterogeneity (mainly through various types of goods or services that are sold); -disunity (placing vending machines has a vast geography); -energy efficiency (allows to reduce operating costs, as well as increase the number of available places for installation); -real time scale; -constant evolution and growth of intelligence level (especially important for system operators, who should receive recommendations from the FCIS to increase operational efficiency); -ultra-high complexity, the ability to diagnose and recommend correcting errors in software and hardware.Purified water is necessary to ensure the operation of many vending machines.The technological function of water purification is used in self-service washes, coffee vending machines, and water wending machines.Therefore, it is important to study the principles of the operation and structure of the water purification machine (WPM), which works as part of a vending cyber-physical system.

the object of research and its technological audit
Fig. 1 shows a 5-level platform of the vending cyberphysical system.The object of research is a water purification machine, which is one of the functional units that operates as part of a vending cyber-physical system.
Let's describe the general process of the work of the VCPS on the example of self-service washing.The washing process takes place in the following stages: -The driver pays, using a bill acceptor vending machine (payment terminal), for cleaning services.
-The driver chooses the service «Cleaning with purified water».
-The vending machine includes systems that ensure the supply of purified water from the storage tank for a time in accordance with the paid amount.-Vending machine forms a transaction (date and time of payment, amount, amount of used water, washing time) and through the processing module the data is recorded in the VCPS database.
-In addition, the vending machine tracks the status of the equipment and, through the monitoring module, records the information in the VCPS database.
-Analytical system of VCPS, having data on transactions and technical condition of equipment, can generate recommendatory solutions to the customer service.
There are many different WPMs on the market.But one of the most problematic places in the existing water purification machines on the market is their inability to operate as part of the VCPS, which increases the companies' expenses for operation.Also, sales of companies are reduced because the service department can't react quickly to problems with water quality and breakdown of automatic machines.

the aim and objectives of research
The aim of research is the development of a structural scheme and model of a water purification machine that will provide the necessary productivity of water preparation and delivery to consumers and which must be integrated into the 5-level platform of the vending cyber-physical system.
To achieve this aim, it is necessary to perform the following tasks: 1. To identify the type, list and parameters of equipment that can operate as part of a water purification machine.
2. To simulate the customer requests of the vending machine.
3. To develop a simulation model (algorithm) of a water purification machine, which will allow to select the WPM configuration for customer requests.
4. Based on the simulation model, to develop a data analysis module that will generate the recommended solutions for the replacement of functional nodes, as well as possible configuration changes.

research of existing solutions of the problem
At the moment, the question of the concept of building cyber-physical systems is promising and many studies have been devoted to it.So, in [3,4] basically consider the general issues of CPS construction for plants.In [5], a universal platform was shown, which became the basis for the CPS construction.In [6] it was shown that the CPS development is an iterative process, which consists of the stages of simulation, design and analysis.So, one of the most important stages is simulation, which will allow selecting the correct configuration of the WPM equipment in accordance with the users' requests.It should be noted that the intensity of WPM operation will depend on the location, which requires selecting different equipment configurations for more efficient use of resources.Thus, the correct implementation of the simulation step reduces the costs of the development and operation of the system.Summarizing the above, let's define the basic requirements for the WPM design: high-quality water purification; work in the CPS; determine a certain number of typical configurations that will be optimally adapted to the intensity of use.
To ensure high-quality cleaning, WPM is based on reverse osmosis, which is one of the most popular methods of membrane filtration.Membrane technology is the most common technology of water treatment, the characteristic feature of which is the consistently high quality of purified water (permeate), environmental friendliness, ease of use.Due to this membrane filtration is becoming increasingly popular in domestic and industrial applications [7,8].It was shown in [9,10] that using the Monte Carlo simulation method it is possible to ensure reliable operation of water purification systems.The use of the Monte Carlo method in industry is quite common.For example: the American company Jewel Vending Company (JVC), which manufactures and installs vending machines for the sale of jewelry, uses this simulation method to find the right configuration of equipment for a specific point of sale [11].Paper-making companies use this method to optimize the chemical process and ensure the continuous delivery of paper products that do not meet the brightness standards [12].Steel manufacturers for automotive parts use this method to improve the level of quality and strength of the finished product [13].
Thus, the results of the analysis allow to conclude that the WPM composition should use reverse osmosis membranes, which will ensure a high level of water purification.For the correct choice of the configuration of the equipment, it is most expedient to apply the Monte Carlo simulation method.The WPM software model should be implemented as part of the analytical system (4th level of the VCPS).

methods of research
5.1.general structure of the water purification machine.The automatic machine consists of three main modules (Fig. 2): a module for dosing and dispensing water (DDWM), a water treatment module (WTM), and a control module (CM).The water treatment module is a complex consisting of a number of previous filters that protect the membrane from damage (strong oxidants, for example chlorine and mechanical impurities), semipermeable membranes, and post filters and mineralizers (if necessary).Preliminary filters have porosity within 1-5 microns.The main goal is pressurization of water under high pressure through a semipermeable membrane in order to eliminate dissolved substances, organic matter, colloidal particles and bacteria from the water.The pump creates pressure in the saturated zone (water+impurities), as a result of which the water molecules seep through the semipermeable membrane into the zone of the unsaturated solution (pure water).Post filters and mineralizers improve the taste of water (in self-service washes this stage is not used).ISSN 2226-3780 Basically, the membrane has low productivity and to compensate for the need for purified water, the user needs to put an intermediate storage tank.The ultraviolet lamp disinfects the water.
The analysis of the structure in Fig. 2 shows that the machine for preparation and delivery of water has 3 main critical parameters (less productive): the productivity of the reverse osmosis membrane, the volume of storage capacity, the productivity of the pump, carries out the delivery of water.
At the moment, the study shows that the pump output of water of 600 l/h is enough.Therefore, this parameter will be assumed to be unchanged.Let's investigate the configuration of the equipment with different types of membranes and storage tanks.The performance of the membrane is measured by the yield per permeate (conversion, hydraulic efficiency) of the system: where a perm -the yield per permeate; , Q s Q perm and Q concvolumetric flows of source water, permeate and concentrate, respectively.The productivity and selectivity of the reverse osmosis process depend not only on the membrane itself, but also on the parameters of the separation process.These parameters include: pressure, temperature and salt content of the source water.To model, let's take the minimum possible capacity of the membrane (50 % of the declared fluxes of permeate).Many membrane models are selected from those offered by one of the world manufacturers of such equipment -Dow Chemical Company [14] (Table 1).Storage tanks will be selected among the series produced, and this is 50 liters, 100 liters, 150 liters, 200 liters, 250 liters, 500 liters.
So, based on the results of the analysis, let's describe a lot of typical configuration parameters of a water purification machine: where k -the configuration type; n -the number of configurations.Each of the elements P ij k is characterized by a set of the following characteristics: where Q mi -the set of reverse osmosis membranes (Table 1), Q m = {50, 75, 150, 250}; V j -the set of storage tanks, V = {50, 100, 150, 200, 250, 500}; Q p -productivity of water delivery pump, Q p = 600 l/hour.5.2. the set of input variables.Two variables are input to the WPM input, namely requests from consumers, as well as water, will be cleared.Let's assume that the volume of water that must flow (Table 1) is always ensured.To determine the demand for purified water, daily sales (use) of purified water at 20 outlets in the city of Lviv (Ukraine) were canceled within two months [15].The next step was to select groups of objects with similar sales.To do this, cluster analysis is used based on the Kohonen network, which is implemented in the programming language R. As a result of the cluster analysis, the demand for WPM is highlighted for productivity up to 640 l/day and up to 1000 l/day.As a result, let's obtain the intensity of customer requests during the day with a total cleaning requirement of up to 640 l/day (Fig. 3).Similarly, the input flow is formed up to 1000 l/day.In fact, the task of generating input data that most closely corresponds to the real one is one of the most important and directly affects the accuracy of determining the WPM configuration.
5.3.simulation algorithm.The simulation algorithm is shown in Fig. 4 by the graph-scheme of the algorithm.
The input of the algorithm is given by the parameters P, and the result of the work is the output variable Y -the number of failures to users.Let's describe the main variables used in the algorithm: Vs -the remainder of water in the tank; V -the volume of the tank; Vm -the volume of water that the system purifies in one iteration; Vout -the volume of water that the system issues to the user in one iteration; C -request from the client; Lq -number of users in the queue; Delt -simulation step; T -total simulation time; Ti -current simulation time; S = 1 is a sign of WPM occupancy.Let's briefly describe the main steps of the algorithm.First, the P ij k parameters of the WPM model are introduced and variables are initialized.It is believed that at the beginning of the simulation the capacity is complete.Next, the main simulation cycle takes place with the Delt step and the total time T. Let's describe the list of functions of the main loop: -imitation of a set of water in a tank; -generating randomly the user's request (an example of the data is shown in Fig. 4); -checking the status of the system; -imitation of water delivery to the user; -checking the request correctness.
If at some point the system is busy, then the request that comes is put in the queue.It is believed that the queue has an unlimited size.

research results
To obtain the research results, the simulation algorithm (Fig. 4) was implemented in the programming lan-guage R. Let's enter the set of configurations described in section 5.1 of this work into the input of the algorithm, and also set the intensity of consumption of purified water, which is described in section 5.2.For example, let's show the results of simulation the WPM operation with the following configuration: membrane type -TW30-1812-100; a tank with a capacity of 250 liters (Table 2).
The most important is the «Number of failures» that are made by the system during the simulation process.If this value is not zero, then the system does not cope with such an intensity of requests, therefore the configuration of the equipment is not suitable.As can be seen from Table 2, the same system reacts differently, depending on the intensity of the requests.In the first case there was a zero failure, that is, the system successfully processed all transactions.In the second there were 24 failures, which is almost 20 % of the total number of requests.So, the above configuration is able to work at points where the intensity of water consumption is up to 640 l/day.The simulation results of all the given configurations are presented in Tables 3, 4. At the intersection of the corresponding type of tank and membrane, the state of the system «0» is described, which means that the machine can't cope with this stream of customers; «1» -will be able to process all clients.At calculations 50 % of productivity of a membrane is taken.So, the optimal configuration of WPM equipment for user maintenance with an intensity of 640 l/day is the three working membranes TW30-1812-100 with storage capacity of 250 liters in parallel.To serve customers with an intensity of 1000 l/day, it is necessary to select the membrane XLE4040 with a storage capacity of 50 liters.For the second case, the configuration of two TW30-3012-500 and 500-liter tank was not chosen, because it does not fit in the given WPM dimensions.When the WPM is established, a configuration is determined that is most suitable for a particular location, if during the operation the analytical system, predicting the behavior of users, can recommend changing the configuration to a more productive one.
fig.1.5-level platform of the vending cyber-physical system

3 .
fig. 3. Intensity of requests of clients during the day (up to 640 l/day)

ISSNfig. 4 .
fig.4.Graph-scheme of the simulation algorithm for the operation of a water purification machine