Neuro-Fuzzy Control of Spray Drying Food Machine Katerina Zubkovaa, Volodymyr Sherstjuka a Kherson National Technical University, 24 Berislav Road, Kherson, 73008, Ukraine Abstract The paper is devoted to the development of an intelligent control system for the spray drying machine producing tomato powder. Since the technological process is quite complex, the input is uncertain, and the output is unpredictable, there is no possibility to use mathematical or other formal models to control it. The development task was proposed to be solved in two stages. At the stage of perception, methods for recognizing images captured by the electro- optical and infrared sensors were used. A four-layer fully connected backpropagation neural network was used to identify the state of a mixture consisting of tomato paste particles and superheated droplets, which allows the detection of some deviation in the process flow. At the decision-making stage, a neuro-fuzzy approach based on the Sugeno model was chosen. The neuro-fuzzy controller was implemented based on the ANFIS model represented by a five-layer forward propagation neural network. The ANFIS-based neuro-fuzzy controller was modeled, generated, and trained using the Fuzzy Logic Toolbox. The experiment was shown that a spray drying machine equipped with the developed intelligent control system can produce tomato powder of high quality without human intervention that excludes operator errors. Keywords 1 Intelligent Control System, Spray Drying Machine, Sensor, Image Recognition, State Identification, Neuron Network, Neuro-Fuzzy Controller, 1. Introduction The modern world is subject to numerous challenges. Over the past decade, the conditions of human life have changed significantly due to urbanization, industrialization, population migration, global climate change, and concomitant environmental degradation. There is a talk not only about droughts, forest fires, and changes in the levels of rivers and water reservoirs - their consequence is the complication of growing conditions for some crops, which are the basic products for humans. We are witnessing the beginning of a global food crisis that threatens not only social stability but also the economic development of most countries of the world. There is even a new term – food security [1]. Today, such a situation becomes so serious that an immediate solution is required to many issues not only of intensifying and expanding the cultivation of food crops but also of their careful and efficient processing. The food industry requires revolutionary change [2]. Among other things, it strongly depends not only on technology but also on the availability of raw materials and labor force, competition, and changes in consumer behavior. While advanced achievements in the field of robotics, information technology, and artificial intelligence have long been used in high-tech areas, which have led to the rapid development of new technologies on their basis, in the food industry there has still been a significant lag [3]. The food industry is not considered a sector with high research intensity as well as innovations [4]. At the same time, the energy crisis and signs of a global food crisis require intensification through the introduction of new technologies, which reduce the energy intensity of production processes, speed up production and improve product quality, and provide flexibility and efficiency. One of the IntelITSIS-2023: 4th International Workshop on Intelligent Information Technologies & Systems of Information Security, March 22–24, 2023, Khmelnytskyi, Ukraine EMAIL: zubkova.kateryna@kntu.net.ua (A.1); vgsherstyuk@gmail.com (A.2) ORCID: 0000-0002-8672-0855 (A.1); 0000-0002-9096-2582 (A.2) © 2023 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR Workshop Proceedings (CEUR-WS.org) important technological challenges is the use of advanced artificial intelligence technologies to control the technological processes of food production. Although these issues were considered in the framework of the study of the so-called 4th industrial revolution [5], such issues have not yet been found in a sufficiently deep study among scientists [6]. There is a lack of models and methods of intelligent control in food industry processes that would be operable in real-life. Typically, these processes are transient, non-linear, and non-stationary. As a rule, mathematical models of such processes cannot be defined or have insufficient accuracy. Data are usually based on sensors, which provide ambiguous, imprecise, incomplete, inconsistent, and doubtful information. Such a wide range of uncertainties introduces unpredictability of the states of the processes. Clearly, we should use novel intelligent methods to overcome uncertainties as well as a lack of mathematical models [7]. Thus, the study of ways to develop a method of intelligent control of the technological process of food production based on remote sensing is a topic of our interest. In this paper, we consider issues related to creating and effectively applying modern intelligent control systems in the production of tomato paste powder concentrate. Thus, the authors propose to use modern achievements in the field of artificial intelligence. The problem addressed in this paper is how to use well-known intelligent control methods to increase productivity, ensure proper product quality, and eliminate the possibility of production errors and defects that affect the quality of the final product. 2. Recent works In recent years, artificial intelligence (AI) technology became one of the most popular topics [8]. Today, AI permeates many industries and technologies becoming an essential feature over the world. Now researchers write a lot about Industry 4.0 and already about Industry 5.0, which would be impossible without the industrial advances of AI. In the context of the Food Industry, the main context is based on cyber-physical systems, in which functions are controlled or monitored through computer-based algorithms [9]. The main components of Food Industry 4.0 are digitalization, additive manufacturing, nanotechnology, industrial robots, and automation makeup, which could reduce production time and processing costs [10]. However, fully automated factories are challenging due to huge initial costs while robots are not suitable for many important food processing technologies because of inflexibility [11]. Moreover, traditional robotics are good enough when both the task and data are consistent and predictable, however, it is not like that in real life. These challenges could be resolved by greater involvement of a human, but the requirements for laborers capable of servicing such equipment are sharply increased. The use of deeper AI technologies allows both to reduce labor requirements and increase the flexibility and efficiency of robots [12]. Relevant to the food industry, such AI-based technologies combine sensors, processors, and other computer components on the one hand, and a range of advanced information technologies such as big data, the internet of things, augmented reality, computer vision (CV), machine learning (ML), 3D printing, etc. on the second hand [13]. The transition to Food Industry 5.0 predetermines the contributions of AI, ML, CV, robotics, and blockchain to solve such important tasks as monitoring, diagnosis, prognosis, prediction, optimization, etc. in the context of adaptive process control. Applying AI/ML/CV methods, algorithms, and engines for intelligent control of the food process lines allows to change in food production processes qualitatively shifting attention to smart science and food chain intelligence [14]. Accordingly, perception and decision-making began to be considered as the main challenges in AI instead of actuation or reasoning. The less an issue becomes a computational capacity, the more researchers paid attention to perception and decision-making in intelligent control systems. A wide range of models, methods, and algorithms of various performance and reliability has been offered by scientists [15], the great majority of which is based on predicates, production inference, frame models, semantic networks, cognitive maps, associative structures, etc. Some AI methods are based on a logical approach, including production, and logical or plausible inference. Unfortunately, such methods are based on the “closed world” assumption, so they are poorly applicable in conditions of uncertainty and unpredictability. Artificial neural networks, genetic algorithms, and evolutionary systems have been created according to the principles of organization and functioning of their biological counterparts. They are essentially nonlinear; although they can solve a wide range of recognition, identification, forecasting, and optimization problems, they are not always able to obtain the desired solution in a finite time. Besides, researchers distinguish model- based, rule-based, and case-based classes of intelligent control systems [16]. The use of model-based systems is an issue due to the difficulty of constructing adequate models for non-stationary and nonlinear processes, while their simplification leads to a significant decrease in accuracy. Rule-based systems have obvious drawbacks, since the task of a priori construction of an exhaustive set of rules is practically unsolvable, and the set of rules itself is difficult to adapt to dynamic changes in the environment. Case-based systems depend too much on a sufficient set of cases against which to compare and select. At the same time, a hybrid approach has been proposed to achieve a synergistic effect by combining models and methods. Thus, the use of only the most popular neural networks in automation tasks has some disadvantages, since they receive information about the control object in the process of learning, and statistical data is needed to do this. Such shortcomings can be eliminated by using structures of fuzzy sets, which make it possible to ensure the formalization of fuzzy variables. Therefore, such hybridization as neuro-fuzzy systems can be more relevant for certain domains than the sum of neural networks and fuzzy logic separately [17]. Obviously, it is advisable to choose a hybrid approach concerning the goal of the paper. Using computer vision methods, we can solve the task of perception, while using neural networks to optimize equipment control, we can also solve the task of decision-making. Given the inaccuracy and uncertainty of information coming from the perception stage to the decision-making stage, the fuzzy method should be used to overcome the emerging uncertainties and develop the systems of the neuro- fuzzy class [18]. Thus, this paper aims to contribute to the development of a neuro-fuzzy control system for a specific food machine. 3. Preliminaries 3.1. Tomato Paste Drying Technology Tomato powder is a powdered concentrate of tomato paste, which is used as a food additive in cooking to give dishes a specific smell and color. The raw vegetable material for the drying process is aseptic tomato paste (30% dry matter) canned or directly produced from fresh tomatoes according to the current food standards. To produce a tomato paste, a hot break technology is mainly used, while the tomatoes are chopped at a high temperature (85 to 90ºC). Tomato paste produced by such a method is more viscous and thicker, with a viscosity of 3.5 to 6.0 cm/30s. Thus, hot break tomato paste is further used to produce ketchup and sauces, and its viscosity guarantees a significant reduction in the amount of starch in tomato products. The accompanied procedure of enzymatic inactivation through high temperature increases viscosity and reduces the risk of syneresis (i.e., separation of the liquid part from its fibrous part). At the output of the hot break technology process, tomato paste should match some organoleptic requirements, including appearance (homogeneous concentrated mass without dark inclusions, residues of peel, seeds, and other coarse particles), taste, and odor (no bitterness, burning, and other foreign flavors and odors), and color (red, orange-red, or crimson-red, uniform throughout the mass), as well as chemical requirements of the food standards, such as maximum presence level of impurities of vegetable origin, mineral impurities, foreign impurities, etc. Tomato paste (30% dry matter) that meets the above requirements can be further used to produce a dry powder. There are several methods to produce dried food products from vegetable raw materials [19] including such modern methods as freeze-drying and spray-drying [20]. The research [21] provides an overview of various methods of drying raw fruit and vegetable materials for the overall quality of powders. The freeze-drying method is the most effective in preserving nutrients in powdered products, but its industrial application is hampered by high energy consumption, equipment costs, and low productivity. Some methods of alternating grinding and drying processes are also impractical due to the high energy costs and complexity of the process. Some methods [22] propose obtaining tomato powder with additional ingredients, such as starch or carrot powder. Before granulation, tomato paste should be mixed with additions until the mixture content reaches moisture of 47-53%. This method is also energy-intensive; it requires additional raw materials, which significantly increases the cost of the finished product. Moreover, during the recovery of the powder, the tomato mixed with starch reminds gel-like substances that do not meet the quality requirements. In [23], the authors analyzed conductive drying technologies such as a vacuum drum dryer, a drum dryer, a thin-film dryer with stirring, and a refractometric dryer. This study showed that the drying methods have a strong influence on the final quality of the powder. Thus, most methods influence lycopene degradation since lycopene is the main pigment found in tomatoes. The conductive method is relatively slow for drying concentrated tomato puree and therefore has power limitations, while the increase in heat treatment time harms the sensory characteristics of the finished tomato powder. Summarizing the results of well-known studies, we conclude that those methods that ensure the appropriate quality of the final product are too slow and have high energy consumption, therefore the cost of the final product exceeds the expectations of the food industry. The other methods that ensure an acceptable speed of the process and relatively low energy consumption do not provide the appropriate properties of the final product, including color, taste, the content of useful substances, etc. Based on the results of studies [21-23], the authors decided to use spray drying, which can be recognized as the most cost-effective technology for drying pureed products that maintain proper quality. Thus, we decided to investigate the AI-based advances for intelligent control of spray drying technology to produce high-quality tomato powders as well as other vegetable and fruit powders. Let us analyze the technological process and the corresponding food machinery in terms of controllability. 3.2. The Food Machine Design The appearance of the spray drying machine that uses hot break technology is presented in Fig. 1. The machine’s framework is a cylindrical container with a welded conical bottom (Fig. 2). The machine has a clash-welded lid with a pollutant installed on it. Figure 1: Spray-drying food machine Here and below, the designations will be given according to the diagram in Fig. 2. Drying occurs with the help of air (B) heated in the calf 170 − 180 C . The supply of hot air is carried out from above through a pressure jet (4). Tomato paste (A) is sprayed under a certain pressure through the nozzle (3), while it initially passes through the hot break process. To be injected into the primary dryer chamber (5), tomato paste is ground and heated 85 − 90 C using devices (1) and (2) respectively. In the primary dryer chamber, the main drying process occurs, where hot tomato paste is injected under a pressure of 25-30 bar into a stream of superheated hot air. Thus, there is a mixture of drops of superheated steam and tomato particles of 80-120 microns in size inside the primary dryer. Therefore, the chamber provides a large surface area in the form of small liquid droplets, which leads to producing regular and spherical powder particles. Figure 2: The scheme of a spray drying machine The first stage of the drying process allows the removal of surface moisture to about 38% and prevents the sticking of tomato particles. At the exit of the primary dryer, a partially dehydrated mixture is formed (C). The secondary drying chamber (8) includes tubes having a length sufficient to increase the contact time between the drying air (E) and the droplets/particles. Clearly, the drying rate and temperature are too low to ensure adequate drying without a secondary drying chamber. The secondary dryer minimizes crop losses without increasing the drying speed. The secondary dryer produces tomato powder (D) after removing free moisture with a residual moisture content of about 7-9%. As the result, represented technological process allows for preserving the structure of the product and biologically active substances. To increase its efficiency much more, we need to modify it using novel achievements in intelligent control techniques. The spray-drying process can be controlled by several control parameters. Thus, the drying process is significantly affected by the temperature ( TA ) and pressure ( PA ) of hot air supplied into the primary chamber, the temperature ( TP ) and pressure ( PP ) of the injected tomato paste, the inner chamber temperature ( TC ) and pressure ( PC ), moisture content ( ρ ) of the mixture in the primary chamber, temperature ( TS ) of hot air pumped into the secondary drying chamber, and the rate of release of the mixture from the primary chamber ( υ ). Accordingly, the food machine is equipped with a set of temperature, pressure, and humidity sensors. The control actions are the signals to the tomato paste pump ( y0 P ) and heater ( y0T ), the air supply pump ( y1P ) and calf ( y1T ) in the primary drying circuit, the air heater ( y2T ) in the secondary drying circuit, the damper for the mixture outlet from the primary chamber ( y3 ), and the damper for the powder outlet from the secondary chamber ( y4 ). It should be noted that the process of dehydration of the mixture into powder is essentially non- linear, which is further exacerbated by the significant thermal inertia of both the mass of tomato paste itself and the heaters. Therefore, the technological process is transient, non-linear, and non-stationary, information captured by sensors is mainly inaccurate and comes with a delay, while the response to control signals is poorly predictable. Thus, it is incredibly difficult to control such a process, since any deviation leads either to burned powder, to an unacceptable change in its color or smell, or to the sticking together of its particles, which entails losses. However, using the optionally installed electro-optical camera (6 in Fig. 2) and thermal infrared camera (7 in Fig. 2), the controllability of the process can be improved with the help of modern image recognition and artificial intelligence technologies. 4. Problem Statement As can be seen from the previous section, the tomato paste drying process is quite complex. It is poorly controlled, and without reliable automation, due to operator errors, it often produces a spoiled product, which leads to the loss of raw materials and the rise in the cost of the final product. The objective of the paper is to improve control of the tomato paste drying process by developing an intelligent control system for the spray drying food machine, which will be able to take responsibility for the process control and for the high quality of the final product, so, accordingly, remove this responsibility from the operator. Following the above-mentioned approaches to intelligent controlling of such technologies, the task of developing an AI-based control system can be solved in two stages. The first stage is perception. Although the food machine is equipped with many sensors, the observations are ambiguous, imprecise, and inconsistent. Therefore, we propose to attract optical and infrared cameras in addition to remote sensing. The information captured by these sensors can be processed using modern methods of image recognition. The second stage is decision-making. Actually, the image recognition at the first stage is primarily aimed at identifying the state of the tomato mixture within the chamber, which allows for detecting some deviation in the process flow. Knowing the state of the mixture and the laws of process control, it is possible to generate control signals for the equipment. However, unfortunately, it is impossible to build an adequate mathematical model of the process, as well as to build an exhaustive system of rules that describe the laws of process control. Thus, the development of a neuro-fuzzy control system for the spray drying machine is an acceptable response to the uncertainty of input and unpredictability of output that ensures overcoming them and can be a proper solution to the decision-making task. In the next sections, we develop an image recognition method to solve the perception task and develop a neuro-fuzzy controller to solve the decision-making task. 5. Image Recognition When the tomato paste mass is sprayed in the dryer chamber, it changes the state in various points to “hot”, “boiled”, and even “burnt”. Although the drying process evolves within the entire volume of the chamber, we can observe the drying process by sensors only at a certain plane of the dryer’s volume, capturing the state of a certain surface formed by moving droplets and particles of the mixture, because the sensors used do not provide depth measurement. Suppose W = {w0 , w1 ,..., w6 } is an ordered set of possible states of the tomato paste mixture at a certain point, where w0 is an initial state “heating”, w1 - w5 are transitional states “underheated”, “dried”, “overheated”, “ready”, “burned”, respectively, and w6 is a final state “burnt” (in the sense that further drying will not help - the product is already spoiled). During the drying process, temperature changes lead to a change in the color of the tomato paste particles, but there is no direct dependence due to the significant thermal inertia of both the mass of the tomato paste itself and the heaters. Thus, the state of the mixture can be assessed based on the temperature measurements and the mixture color recognition, primarily the color near the hot surfaces. Taking into account the design of the food machine, we can measure only the closest layer of particles within the tomato paste mixture, which forms an observation surface. 5.1. Model of measurements Consider a two-dimensional Euclidean space C D . Suppose the grid D defines a two-dimensional array D = {dij } m,n of square cells dij sized δ × δ , where i and i , j =0 j are the array indices that correspond to the coordinate axes within the space C and δ is a spatial discrete. Consider each cell dij ∈ D as a minimal homogeneous area on the observation surface of the tomato paste mixture inside the spray-dryer chamber. { } Suppose each cell dij ∈ D is associated with a set of attribute values Aij = aij1 ,...aijn . Initially, we will be particularly interested in two important parameters: aij1 - the color state of the cell on the observation surface evaluated through image recognition based on the images captured by the inner electro-optical camera, and aij 2 - the temperature of the mass measured remotely by the infrared camera within the spray-dryer chamber. As a result of the measurement, we match each cell dij ∈ D with its attributes, so that dij =  a1ij , a2ij  . Thus, we assume that cells dij ∈ D related to certain coordinates ( i, j ) and attribute values dij =  a1ij , a2ij  change their state dynamically under the influence of spray drying. Suppose ϑ is a function like ϑ : D × A → W . Based on remote sensing, we can estimate values of the attributes a1ij , a2ij of the cell dij ∈ D and putting these values into the function ϑ , assess the state of the corresponding cell. Since the cells change through a well-known ordered sequence of states, w0 → w1 ↔ ... ↔ w5 → w6 , the spray-drying process can be represented as a transition of the cells from one state to another. Such transitions can be direct and reverse (the latter excludes w1 and w6 ) (Fig. 3). wkl → wk ( l +1) wkl wk ( l +1) wk ( l +1) → wkl Figure 3: Example of direct and reverse transition of the cell state If using remote sensing, we can timely and accurately determine the transition of the majority of cells from one state to another, we will be able to reliably control the process. 5.2. Image Analyzing Process The image-analyzing process depends on obtaining consecutive image frames captured by the electro- optical camera inside the considered spray drying machine. The electro-optical camera captures a sequence of image frames, which the control system should analyze properly. The entire process of the image analysis consists of the following stages (Fig. 4): 1 Image mapping. As a result of the mapping process, the image frame will be oriented, transformed, and mapped in a certain way to superimpose the cells dij ∈ D of the surface D on a corresponding pixel matrix M ij of size m × n . 2 Image transformation. At this stage, each RGB pixel of the current image frame should be transformed into HSI color space, where H, S, and I respectively mean hue, saturation, and intensity. In this color scheme, the H component represents a pure (dominant) color, the S component indicates a dilution degree of the color over the white light, and the I component defines its brightness. For further computational convenience, all components should be normalized to the intervals: 0 ≤ H ≤ 360°, 0 ≤ S ≤ 1, and 0 ≤ I ≤ 1, where 0 corresponds to strict black as well as 1 corresponds to strict white. As a result of such image transformation, we can speed up the subsequent image analysis significantly since we decouple the intensity component from the color information for all pixels of the current image frame. 3 Image averaging. At this stage, the values of hue, saturation, and intensity will be averaged over the pixels of the m × n pixel matrix M ij within the borders of the corresponding cell dij ∈ D . As a result, each cell dij ∈ D will be associated with the average values H ij , Sij , and I ij . Image from Image from OE Sensor IR Sensor RGB Image Image mapping Image mapping Image Image Gray Color transformation averaging Evaluating µij HSI Image Image averaging Image filtering Image generalization ξij Figure 4: Image analyzing process 4 Image filtering. At this stage, the cells having HSI values out of the proper range should be eliminated from the analysis to speed it up, and their colors should be replaced by the nearest proper color. Since the mixture of the tomato paste must be of red, orange-red, or crimson red depending on the quality and grade of raw materials, we must filter out all cells having average H value out of the allowed interval [340° - 20°] (from dark pink to orange-red). For the average S value, the allowed range is [0.6-1.0], while for the average I value it is [0.4-1.0]. Three closest colors (H=348°, H=0°, H=12°) are assumed to replace all pixels filtered out due to distortions and noise in the image frame. 5 Image generalization. At this stage, the average H value for each cell must be replaced by a degree ξij of similarity to the center color in the HSI color space (H=0°). Thus, all analyzed values will be normalized within the range [0, 1] for each cell dij ∈ D . 5.3. Temperature Measurement The infrared camera allows measure temperature remotely. It captures a thermal image of the observation surface. In the such image, black pixels correspond to points that do not radiate heat. The higher the temperature at a given point, the lighter the color (brightness) of the corresponding pixel to the grayscale. Therefore, the temperature can be estimated at a certain point based on the estimation of the color of the corresponding pixel. Since the resolution of an infrared camera is much lower than the resolution of an optical one, it is required to bind the pixels of a thermal image to the cells of a discrete space in a slightly different way. Besides, due to the nature of the tomato paste mixture, the temperature is usually higher at the points of contact with the metal surfaces than at other points. That is why, to correctly measure the temperature at the points of the greatest heating, it is necessary to search for bursts of gray brightness on the general uniform gray background of the thermal image. The thermal image analysis consists of the following stages: 1 Image mapping. At this stage, we impose all pixels of the thermal image to the discrete space D to map certain sets of pixels to certain cells d ij ∈ D . 2 Image averaging. At this stage, we search for the maximal brightness values for all pixels within each cell dij ∈ D . The cell dij takes this maximal value of brightness Bij in contrast to optical image processing, where color parameters need to be averaged within the cell. 3 Gray color evaluation. At this stage, the ordinal color scale from black to white is mapped on a numerical scale from 0 to 1 using a partial order of grey colors (Fig. 5). According to this scale, each cell dij will be associated with a respective temperature ηij based on the degree of brightness Bij . Bij ηij ... 0 0,125 0, 25 ... 0,875 1 10 C  20 C  60 C  85 C 100 C Figure 5: Partial order of grey color for temperature measurement 5.4. Cell State Identification Given data from the sensors and recognized images, it is possible to identify the state of the tomato paste mixture inside the primary dryer chamber. Since the particles of the mixture are approximately 80-120 microns in size, the resolution of the camera (5376х3024 pixels, wide field of view) gets allow detection of underheating, overheating, excess pressure inside the chamber, and other inconsistencies with the process map. Moreover, it is possible to indirectly estimate the residual moisture at the outlet of the mixture. Since the spray-drying process is essentially non-linear, we can identify the state of the tomato paste mixture using the artificial neural network (NN) because the latter can get a satisfying result when the data is incomplete. In this paper, a four-layer fully connected backpropagation NN is used for state identification, as simplified shown in Fig. 6, which consists of the input layer, two hidden layers, and the output layer. The real NN is a 15×18×6×7 network. The input data of the NN are H, S, and I components of each pixel of three consecutive image frames (i-1, i, i+1) captured by the electro-optical camera, and the respective temperature values ηij estimated by the corresponding IR-captured image. Besides that, the values of inner chamber temperature ( TC ), pressure ( PC ), and moisture content ( ρ ) estimated based on the data from corresponding sensors are also inputs to the network. The log-sigmoid function is used as the transfer function at the input layer and first hidden layer as well as the Gauss-based radial basis function at the second hidden layer. The numbers of the input and output nodes are determined by the process nature, but the determination of the hidden nodes lacks an efficient method. Clearly, the more complex the problem the more hidden nodes are needed. However, when the number of hidden nodes becomes larger the γ ijk that the state of the considered cell dij ∈ D is exactly wk ∈W , k = 0..6 within the range [0, 1]. Hi-1 Hi Si-1 Hi+1 γ0 Si Ii-1 Si+1 Ii µi-1 γ1 Ii+1 µi µi+1 . . ... . . γ6 . . TC . . . . . . PC ρ Figure 6: Neuron network used for identification of the state of the mixture Such confidence value reflects the membership function of the real state at a certain state defined within the set W . Thus, at the perception stage, we perform a sequential scan of three consecutive image frames captured by the cameras and estimate H, S, I, and ηij values for each cell pixel of the observation surface using the image recognition method proposed above. The parameters of each cell within three analyzed consecutive image frames were fed to the NN inputs. Depending on the conditions within the primary drying chamber such as actual pressure, the temperature of the mixture, etc., we get a value at the output of the NN indicating the confidence γ ijk that within the cell dij ∈ D the mixture is in a certain state wk ∈W . Therefore, the state identification process is cyclic, the neural network is sequentially matched with the inputs corresponding to each next cell of the two-dimensional array D to evaluate output values, and then after receiving the next image frame, the process is repeated again and again, for each updated three consecutive frames. Processing three consecutive frames of the image at once allow us to compute the reflective color at the same place of consecutive images differs quite a lot. The image recognition algorithm allows filtering droplets from the mixture image leaving the particles of tomato paste to assess the residual moisture and find out the end of the process. The backpropagation NN needs to train. It consists of two phases: Training phase. Learn and revise the connection weights of the input and output nodes by the numerical and parameter optimization method, until achieving the expected output. Generalization phase. Train the network to predict the unknown samples. The training process is considered a parameter optimization problem. There are many NN features to adjust the weights to obtain more efficient rules. The connections between the different layers are defined based on the weights in the error back-propagation NN, where neurons at the same layers do not connect with each other. The standard backpropagation NN reflects a gradient descent learning algorithm, and the weights revising process is along the opposite direction of the gradient of the error performance function. The initial weights of both networks can be randomly generated. 6. Decision Making Considering the features of the spray drying technological process, the uncertainty of the input information, and the unpredictability of the output state, it is proposed to apply a neuro-fuzzy controller, which uses both artificial neural networks and the procedures of fuzzy logic, making it possible to identify complex processes. 6.1. Neuro-fuzzy control system The structure of the automated control system of the spray drying process is presented in Fig. 7. Figure 7: Structure of the automated control system This automated control system is discrete with period T. At the scheme in Fig. 7, X ( t ) is a vector of input parameters, Ψ ( t ) a vector of external disturbances, x ( t ) a mismatch vector, Y ( t ) a control vector, F an object function, and K a transmission ratio. The switch on the diagram in Fig. 7 toggles the state of the automated system. When the switch is closed, the automated system is at the decision-making stage according to its transmission ratio. When the switch is open, the automated system is in the perception stage. Using a neuro-fuzzy approach [24], the automated system can be presented from a slightly different perspective, as shown in Fig. 8, where z ( t ) is a vector of input parameters captured by sensors. Figure 8: Structure of the automated control system based on ANFIS 6.2. Adaptive-Network-Based Fuzzy Inference System The neuro-fuzzy control system is based on the artificial neural network learning process, which enables the determination of fuzzy inference rules (FIS). As soon as the fuzzy output parameters are defined, neural networks work in normal mode. Thus, a learning neural network algorithm is used to determine the parameters of the fuzzy inference system that includes corresponding fuzzy membership functions. ANFIS (Adaptive-Network-Based Fuzzy Inference System) is the implementation of a fuzzy system proposed in [25] based on a five-layer forward propagation neural network. Fig. 9 illustrates a structure diagram example of ANFIS with two variables. The model inputs x and y are the input variables that allow determining the discrepancy between the current and planned value of the variables, and the output variable f is the control influence. Figure 9: ANFIS structure The decision-making model of the ANFIS is represented in Fig. 10. Figure 10: ANFIS model The first layer of the ANFIS is responsible for fuzzifying the input signal according to the selected membership function. It determines the fuzzy terms of a set of input values. The outputs of the nodes of this layer can be represented by O1i = µ Ai ( x ) , where O1i is an output state of the first layer, Ai ( x ) is the corresponding parameterized membership function of the fuzzy set A. Although there is a wide range of well-known membership functions, we use the trapezoidal membership function, using which, for example, it is quite simple to specify linguistic terms such as "LOW", "NORMAL", and "HIGH" for temperature, pressure, etc. The second layer is responsible for multiplying the input signal and defining the applied fuzzy rules. In this layer, each node corresponds to one uncertain rule, and its output represents the validity of the given rule. In other words, the node output defines an AND operator that satisfies any T-normal form. The node of the second layer is connected to those nodes of the first layer that form the preconditions of the corresponding rule. The outputs of the node can be defined as O= i 2 ω=i µ Ai ( x ) × µ Bi ( y ) . The third layer is responsible for computing the normalized trust of the rule, so it normalizes the degrees of rule fulfillment, O3i = ωi = ωi (ω1 + ω2 + ... + ωn ) . The non-adaptive nodes of this layer calculate the relative weight of the fuzzy rule. The fourth layer is responsible for the output of the node. It provides defuzzification determining the contribution of each fuzzy rule to the output of the network. The output of the node can be calculated as O4i = ωi f i = ωi ( pi x + qi x + ri ) , where pi , qi , and ri are certain parameters. The fifth layer summarizes and calculates the total output of the network as the sum of all input signals providing the control value: O5i = ∑ i ωi f i . ANFIS determines that each value is represented by only one fuzzy set. ANFIS neural network learning procedure has no restrictions on the modification of the membership functions. Although the learning mechanism of the ANFIS does not depend on statistical information, however, since the selection of parameters of the fuzzy neural system is a major problem, and since most of these parameters are selected based on user experience and/or trial and error, only experimental data can be used to automate the spray drying process and minimize error. 6.3. Development of Neuro-Fuzzy Controller The development of the intelligent neuro-fuzzy controller is based on the Sugeno model, ANFIS, and a high-performance neural network training procedure. The following vectors of input ( x ) and output ( y ) parameters are selected for the construction of the neuro-fuzzy controller: x = ( Ω, TA , PA , TP , PP , TC , PC , TS ,υ , ρ ) , where x0 = Ω is the evaluated state of the mixture, x1 = TA and x2 = PA are the temperature and pressure of hot air supplied into the primary chamber, x3 = TP and x4 = PP are the temperature and pressure of the injected tomato paste, x5 = TC and x6 = PC are the inner chamber temperature and pressure x7 = ρ is the moisture content of the mixture within the primary chamber, x8 = TS are the temperature of hot air pumped into the secondary chamber, and x9 = υ is the rate of release of the mixture from the primary chamber. y = ( y0 P , y0T , y1P , y1T , y2T , y3 , y4 ) , where the output parameters determine the control values respectively to the tomato paste pump and heater, the air supply pump and calf in the primary circuit, the air heater in the secondary circuit, the damper for the mixture outlet from the primary chamber, and the damper for the powder outlet from the secondary chamber. The evaluated state of the mixture Ω is an important element of the control procedure. Since we obtain a two-dimensional m × n ( ) ξij = γ ij 0,γ ij1, ...γ ij 6 for each cell dij ∈ D Ξ =(ξij ) m,n and the definition of several variables: ζ 1 is the state of the i , j =0 vast majority of elements in the array Ξ , ζ 2 is the largest estimated state of some of the array Ξ elements, ζ 3 is the smallest estimated state of some of the array Ξ elements, ζ 4 is the state of some representative set of array Ξ elements that are different from the state of most cells, ζ 5 is the estimated transition rate of most elements from state to state, and ζ 6 is the maximum speed of the last transition of some elements from state to state. Thus, Ω =(ζ 1 ,...ζ 6 ) . Such a choice of input and output vectors makes it possible to monitor the current state of the process and adjust the values of the control parameters. The ANFIS model can be represented by the equation: = Yi α 0 + β1Yi −1 + β 2 x1 + ... + β10 x9 + β11 y0 P + ... + β17 y4 . It can be seen that all variables influence the antecedents of fuzzy rules. The fuzzy rules in the ANFIS can be built according to the Sugeno-Takagi algorithm. Accordingly, fuzzy rules should be defined as = IF ( xi A= l ) and ( xk Bm= ) and ( y0 j C= n ) and ( y3 Dz ) THEN Yi1 =α 01 + β11 xi + β 21 xk + β31 y0 j + β 41 y3 Obviously, in the presented rules Al , Bm , Cn , and Dz are fuzzy sets, while α 01 , β11 , β 21 , β 31 , and β 41 are coefficients of the equations. 6.4. ANFIS Training Before using the neuro-fuzzy controller, the neuron network must be first trained. The training procedure should be used after the training vectors for ANFIS have been prepared. The ANFIS learning procedure is implemented as a set of the following steps: first, the rules not equal to zero that affect the result are recognized and a check is performed: if there are unconsidered rules that affect the result, then the increment of the parameters of the membership functions is calculated, then the value of the parameters of the functions is changed belonging to the calculated value. Thus, the nodes of the output layer are trained. Otherwise, if all the rules affecting the result are considered, the transition to the calculation of the output value of the network is performed. the coefficients of the equations are hidden. In the next step, the residual error is calculated. Next, the following check is performed: if there are unexamined rules that affect the result, then the nodes of the first layer, which are the prerequisites of the current rule, are identified; the derivative of the membership function of the nodes of the first layer is calculated; the increment of membership function parameters is calculated and the membership function parameters of the first layer are changed. Otherwise, if all the rules have been considered, the procedure is over. After performing ANFIS training, the controller can control the spray-drying food machine. 7. Implementation The spray drying food machine, tomato paste of the highest quality as well as a possibility of experiment and set accumulation were kindly provided by the company AgroFusion LLC (Hola Prystan, Kherson region, Southern Ukraine). The ANFIS model has been generated using the FIS Editor tool from the Fuzzy Logic Toolbox (MATLAB package). Using the same tools, a system of 276 fuzzy rules has been developed; the corresponding coefficients and membership functions of fuzzy sets have been determined using a built-in algorithm in MATLAB. Initial values were chosen arbitrarily. Next, using the FIS Editor, a training sample has been defined placing the values of the valid verification points. Totally, the training includes 380 epochs. The spray drying machine under the control of an experienced operator has been used to obtain the training sample. This prototype of the intelligent control system has been implemented using embedded microcontroller STM32F429 (180 MHz Cortex M4, 2Mb Flash/256Kb internal RAM, N25Q512 QSPI Flash memory), GNU Tools for ARM Processors, C++ programming language, and Fast Artificial Neural Network Library (FANN). Using the readfis function, generated and trained ANFIS model has been loaded from MATLAB in the embedded microcontroller. Experimental studies of the neuro-fuzzy controller and entire intelligent control system have been conducted and shown that the proposed system provides enough reliability and efficiency for the control of such a complex technological process as fruit/vegetable spray drying concerning its uncertainties and unpredictability. A spray drying machine equipped with a developed intelligent control system can produce tomato powder of high quality without human intervention. It is shown that when the number of the training epochs increases, the error decreases and the accuracy of the control increases essentially. The intelligent control system allows for responding promptly to any deviations in the technological process. As well, the developed intelligent control system provides enough performance for the spray drying machine. Fig. 11 shows a diagram of residual moisture dependency on the production time of a batch of powder in two cases - when the machine is manually controlled (in red) and when using an intelligent control system (in blue). Figure 11: Dependency of residual moisture on the production time 8. Conclusion The proposed intelligent control system based on the neuro-fuzzy controller enables reliable and efficient control of the fruit/vegetable spray drying technological process. It can take responsibility for the high quality of the final product, and, so, deny the responsibility from the human operator. Since the tomato paste drying process is quite complex and poorly controlled, an operator can make errors, therefore a spoiled product can often be produced rising the loss of raw materials and the cost of the final product. The proposed intelligent control system solves its tasks in two stages due to uncertain and imprecise input data captured by sensors as well as the unpredictability of output due to a lack of mathematical models or well-defined laws of the process. At the stage of perception, there was proposed to use image recognition algorithms, where the input images are captured by the electro-optical and infrared camera sensors. Then, a four-layer fully connected backpropagation neural network was proposed to identify the state of a mixture consisting of tomato paste particles and superheated droplets within the drying chamber, which allows for detecting the deviation in the process flow. At the decision-making stage, there was proposed to use a neuro-fuzzy controller based on the ANFIS model. The neuro-fuzzy controller can be defined by a five-layer forward propagation neural network. It uses the Sugeno model to define fuzzy rules and fuzzy membership functions. Fuzzy Logic Toolbox from MATLAB was used to define, model, generate, and train the ANFIS-based neuro-fuzzy system. As the experiment shows, the spray drying machine equipped with the developed intelligent control system can produce tomato powder of high quality without human intervention. Future research will be devoted to researching the ability of the proposed model of the intelligent control system to upgrade the flexibility and adaptability of spray drying technology through the use of more advanced neural network models and case-based systems. 9. References [1] King, T., Cole, M., Farber, J.M., Eisenbrand, G., Zabaras, D., Fox, E.M., Hill, J.P.: Food Safety for Food Security: Relationship between Global Megatrends and Developments in Food Safety. Trends Food Sci. Technol. 68, 160–175 (2017). doi: 10.1016/j.tifs.2017.08.014 [2] Herrero, M., Thornton, P.K., Croz, D.M., Palmer, J., Benton, T.G., Bodirsky, B.L., Bogard, J.R., Hall, A., Lee, B., Nyborg, K.: Innovation Can Accelerate the Transition towards a Sustainable Food System. Nat. Food 1, 266–272 (2020). doi: 10.1038/s43016-020-0074-1 [3] Chapman, J., Power, A., Netzel, M.E., Sultanbawa, Y., Smyth, H.E., Truong, V.K., Cozzolino, D.: Challenges and Opportunities of the Fourth Revolution: A Brief Insight into the Future of Food. Crit. Rev. Food Sci. Nutr. 62, 2845–2853 (2022). doi: 10.1080/10408398.2020.1863328 [4] Morella, P., Lambán, M.P., Royo, J., Carlos Sánchez, J., Fanelli, R.M.: Study and Analysis of the Implementation of 4.0 Technologies in the Agri-Food Supply Chain: A State of the Art. Agronomy, 11, 2526 (2021). doi: 10.3390/agronomy11122526 [5] Jideani, A.I.O., Mutshinyani, A.P., Maluleke, N.P., Mafukata, Z.P., Sithole, M.V., Lidovho, M.U., Ramatsetse, E.K., Matshisevhe, M.M.: Impact of Industrial Revolutions on Food Machinery - An Overview. J. Food Res. 9, 42 (2020). doi: 10.5539/jfr.v9n5p42 [6] Bakalis, S., Gerogiorgis, D., Argyropoulos, D., Emmanoulidis, C.: Food Industry 4.0: Opportunities for a Digital Future. In Food Engineering Innovations Across the Food Supply Chain. Academic Press: London, UK, pp. 357–368 (2022). [7] Slater, D.: Modelling, Monitoring, Manipulating and Managing? Modeling Process Flow in Complex Systems. Cambrensis: Porthcawl, UK (2017). [8] Ramirez-Asis, E., Vilchez-Carcamo, J., Thakar, C. M., Phasinam, K., Kassanuk, T., Naved, M.: A review on role of artificial intelligence in food processing and manufacturing industry, Materials Today: Proceedings 51(8), pp. 2462-2465 (2022). doi: 10.1016/j.matpr.2021.11.616 [9] Echegaray, N., Hassoun, A., Jagtap, S., Tetteh-Caesar, M., Kumar, M., Tomasevic, I., Goksen, G., Lorenzo, J.M.: Meat 4.0: Principles and Applications of Industry 4.0 Technologies in the Meat Industry. Appl. Sci. 12, 6986 (2022). doi: 10.3390/app12146986 [10] Kyaw, K. S., Adegoke S. C., Ajani, C. K., Nwabor, O. F., Onyeaka, H.: Toward in-process technology-aided automation for enhanced microbial food safety and quality assurance in milk and beverages processing. Critical Reviews in Food Science and Nutrition 1-21 (2022). doi: 10.1080/10408398.2022.2118660 [11] Sadeghi, K., Kim, J., Seo, J.: Packaging 4.0: The Threshold of an Intelligent Approach. Comp. Rev. Food Sci. Food Saf. 2022. doi: 10.1111/1541-4337.12932 [12] Barbar, C., Bass, P.D., Barbar, R., Bader, J., Wondercheck, B.: Artificial Intelligence-Driven Automation Is How We Achieve the Next Level of Efficiency in Meat Processing. Anim. Front. 2022, 12, 56–63. doi: 10.1093/af/vfac017 [13] Shi, Y., Wang, X., Borhan, M.S., Young, J., Newman, D., Berg, E., Sun, X.: A Review on Meat Quality Evaluation Methods Based on Non-Destructive Computer Vision and Artificial Intelligence Technologies. Food Sci. Anim. Resour. 41, 563–588 (2021). doi: 10.5851/kosfa.2021.e25 [14] Barbut, S. Meat Industry 4.0: A Distant Future? Anim. Front. 10, 38–47 (2020). doi: 10.1093/af/vfaa038 [15] Varshney, S., Jigyasu, R., Sharma, A., Mathew, L.: Review of various Artificial Intelligence Techniques and its applications. IOP Conference Series: Materials Science and Engineering 594(1), 012023 (2019). doi: 10.1088/1757-899X/594/1/012023 [16] McMillan, L., Varga, L.: A review of the use of artificial intelligence methods in infrastructure systems. Engineering Applications of Artificial Intelligence 116, 105472 (2022). doi: 10.1016/j.engappai.2022.105472 [17] Hamitouche, M., Molina, J.-L.: A Review of AI Methods for the Prediction of High-Flow Extremal Hydrology. Water Resources Management 36(10), 3859-3876 (2022). doi: 10.1007/s11269-022-03240-y [18] Kruse, R., Nauck, D.: Neuro-Fuzzy Systems. In: Kaynak, O., Zadeh, L.A., Türkşen, B., Rudas, I.J. (eds) Computational Intelligence: Soft Computing and Fuzzy-Neuro Integration with Applications. NATO ASI Series 162 (1998). doi: 10.1007/978-3-642-58930-0_12 [19] Jiang, H., Zhang, M., Adhikari, B.: Fruit and vegetable powders. In: Woodhead Publishing Series in Food Science, Technology and Nutrition. Handbook of Food Powders, Ed(s): Bhandari, B., Bansal, N., Zhang, M., Schuck, P., pp. 532-552 (2013). doi: 10.1533/9780857098672.3.532 [20] Mella, C., Vega-Gálvez, A., Uribe, E., Pasten, A., Mejias, N., Quispe-Fuentes, I.: Impact of vacuum drying on drying characteristics and functional properties of beetroot (Beta vulgaris). Applied Food Research 2(1), 100120 (2022). doi: 10.1016/j.afres.2022.100120 [21] Karam, M. C., Petit, J., Zimmer, D., Djantou, E. B., Scher, J.: Effects of drying and grinding in production of fruit and vegetable powders: A review. Journal of Food Engineering 188, 32-49 (2016). doi: 10.1016/j.jfoodeng.2016.05.001 [22] Shishir, M. R. I., Chen, W.: Trends of spray drying: A critical review on drying of fruit and vegetable juices. Trends in Food Science & Technology 65, 49-67 (2017). doi: 10.1016/j.tifs.2017.05.006 [23] Qiu, J., Acharya, P., Jacobs, D. M., Boom, R. M., Schutyser, M. A. I.: A systematic analysis on tomato powder quality prepared by four conductive drying technologies. Innovative Food Science & Emerging Technologies 54, 103-112 (2019). doi: 10.1016/j.ifset.2019.03.013 [24] Takagi, T., Sugeno, M.: Fuzzy Identification of Systems and its Applications to Modeling and Control. IEEE Transactions on Systems, Man, and Cybernetics 1, 116–132 (1985). doi: 10.1109/TSMC.1985.6313399 [25] Jang, J.S.R.: (1993) ANFIS: Adaptive-Network-Based Fuzzy Inference System. IEEE Transactions on Systems, Man, and Cybernetics 23(3), 665–685 (1993). doi: 10.1109/21.256541 [26] Wang, D., He, H., Zhao, B., Liu, D.: Adaptive near-optimal controllers for nonlinear decentralized feedback stabilization problems. IET Control Theory Appl. 11(6), 799–806 (2017). doi: 10.1049/iet-cta.2016.1383