Microsoft Word - 425simasatitkul.doc CHEMICAL ENGINEERING TRANSACTIONS VOL. 74, 2019 A publication of The Italian Association of Chemical Engineering Online at www.cetjournal.it Guest Editors: Sauro Pierucci, Jiří Jaromír Klemeš, Laura Piazza Copyright © 2019, AIDIC Servizi S.r.l. ISBN 978-88-95608-71-6; ISSN 2283-9216 Virtual Sensor Using Neural Networks in Batch Distillation of Fermented Beverages Tiago H. Alvesa*, Patricia N. Oliveirab, Liliane O. Motaa,Cristina Correab, Ana K. Abudb, Antonio Oliveira Juniorb a Department of Chemical Engineeering, Federal University of Sergipe – Av. Marechal Rondon, n/n. Zip code: 49100-000. São Cristóvão-SE, Brazil b Departmanet of Food Technology, Federal University of Sergipe – Av. Marechal Rondon, n/n. Zip code: 49100-000. São Cristóvão-SE, Brazil tiagohora@gmail.com The main purpose of controlling the distillation process is to maintain the composition of the products in an intended specification in order to optimize operating costs and meet market requirements. Line analyzers and laboratory analysis are generally used for composition information. However, such alternatives are expensive, do not provide information in real time and are not always feasible or available. In this context, soft sensors emerge as a cheaper alternative. The aim of this work is to develop a soft sensor to infer online the ethanol content in the products of a batch distillation process of watermelon wine, based on temperature measurements. The developed model consists in a multilayer perceptron artificial neural network with one hidden layer. The Levenberg-Marquardt algorithm was used to optimize the weights. In order to train and validating the ANN, real distillation data of water-alcohol binary mixtures with initial compositions similar to the watermelon wine used. The simulation was also validated with real data of wine distillations. The RMSE was applied in the performance evaluation of the model and its result was 0.029 in mass fraction, showing the feasibility of its use as a soft sensor. 1. Introduction According to the Brazilian legislation, fruit spirits are the alcoholic beverage of thirty-six to fifty-four percent by volume, at twenty degrees Celsius, produced from simple alcoholic distillate of fruit or by the distillation of fruit fermented must (Brazil, 2011). Composed mostly of water and ethanol, it presents in a smaller volume a series of compounds called associates or congeners, most of which originate from fermentation, which interfere with the sensorial characteristics of the beverage, some of them: higher alcohols, organic acids, esters, methanol and carbonyl. An example is the influence of the esters and higher alcohols on the taste of the distillate and the carbonyl compounds on the aroma obtained (Batista and Meireles, 2011). During distillation the "head", "heart" and "tail" cuts are separated, the "heart" is the product with adequate ethanol content and desirable components. Thus, the execution of cuts during distillation is decisive for the quality of fruit spirits (Spaho et al., 2013). However, obtaining information on quality variables such as composition is not a simple task. The use of line analyzers represents a high cost in equipment acquisition and maintenance. In addition, analyzers may have delays that impair the efficience of the control systems (Oisiovici and Cruz, 2000). An alternative to the analyzers, off-line laboratory analysis also require investment in expensive equipment as well as investment in labor and have a very high delay in response (Shi and Xiong). In this context, the use of soft sensors for quality variables estimation is a cheap and attractive technique of industrial automation (Torgashov et al., 2018). Soft sensors are mathematical models that estimate quality variables, hard to measure, through easily measured variables such as temperature, pressure and flow (Torgashov and Zmeu, 2015). Due to this characteristics, soft sensors has been applied in several areas of science and engineering, as bioprocesses (Gopakumar et al., 2018), civil engineering (Das and Saha, 2018) and wastewater treatment (Xue, 2017). There are two main approaches in the development of DOI: 10.3303/CET1974248 Paper Received: 13 May 2018; Revised: 5 October 2018; Accepted: 24 December 2018 Please cite this article as: Alves T.H., Oliveira P., Mota L., Correa C., Abud A.K., Oliveira Junior A., 2019, Virtual Sensor Using Neural Networks in Batch Distillation of Fermented Beverages, Chemical Engineering Transactions, 74, 1483-1488 DOI:10.3303/CET1974248 1483 virtual sensors, phenomenological, derived from the physical mechanisms of the process, and empirical, based on input and output data from industrial processes (Kadlec et al., 2009). The use of the first principle models are recommended when there is enough knowledge about the process (Pascual, 2015), but industrial processes are usually complex and hard to represent applying a rigorous modeling (Grbic et al., 2013). In addition, first principle models may have an excessive number of parameters and require a high processing time, impairing the efficiency of control strategies (Abdulah et al., 2007). Because of these difficulties to obtain phenomenological models and the large amount of data available in industries, empirical models have gained in popularity (Shi and Xiong, 2018). In the literature, there are many papers that develop black box models to infer product composition in distillation processes and several techniques have been successfully applied, such as PLS (Zamprogna et al., 2002), Sistemas Fuzzy (Jalee e Aparna, 2016) and Artificial Neural Networks (Rani et al., 2013). In this sense, the aim of this work was to develop a virtual sensor to infer the composition of ethanol in a process of batch distillation of a fermented beverage using artificial neural networks. For this, a Multilayer Perceptron feedforward neural network was developed. 2. Materials ans Methods The work was divided in two stages: experimental and computational. In the experimental stage, the data sets used in the training and validation of the virtual sensor were generated and in the computational stage a neural network was developed for purposes of predicting the ethanol composition from the temperature of the top tray. 2.1 Experimental Stage The equipment is consisted by an experimental distillation module of Eco Educacional that operates in batch, as shown in Figure 1. Figure 1: Schematic representation of the batch distillation equipment. The column has dimensions of 0.90 m of height by 0.065 m of internal diameter. It is transparent and has vacuum thermal insulation that operates at 600 to 650 mmHg, temperature monitoring and sample collection system with seven jacketed glass / Teflon modules containing Rasching rings. At the top of the column is the condenser, connected to an ultrathermostatic SL 152 bath that works at 10 ° C to avoid process losses. In the inferior part is the still, of maximum capacity of 5 L. The power of the equipment is of 1000 W. The experimental design consisted in approximating the distillation of the watermelon fermented must by a synthetic binary mixture of distilled water and etanol under the same operating conditions. In order to obtain a precise representation of the process, six distillations with initial concentrations between 10 and 15% (v/v), range of typical concentrations of fermented musts, were performed. The great advantage of this approach is its low cost, since it eliminates the production stage of the must and the most of the synthetic mixture was reused in all the distillations. The experiments were conducted with a 1:2 reflux rate and initial volume of 4.5 L. Samples were collected every 2 minutes with the aid of a DA-130 N digital densimeter with accuracy of ± 0.001 g / cm³ and subsequently converted in mass fraction. As the samples were collected, the respective top tray temperatures were monitored. The process ended when the alcohol content in the samples was considered insignificant. Watermelon wine was produced with the purpose of validating the virtual sensor. This 1484 step will not be detailed here because it is not the focus of this work. The wine had an alcohol content of 11.00% (v/v). From the watermelon wine, three distillations were carried out in batch for the production of watermelon spirit, the first two with an initial volume of 4.5 L and the third with an initial volume of 4 L. Those distillations ran under the same operating conditions of the distillations of the synthetic mixtures. The ethanol content of the samples and the respective top tray temperature were monitored every 5 minutes. 2.2 Computational Stage Artificial neural networks are an artificial intelligence technique widely used in the modeling of complex problems. Due to their ability to map non-linearities between input and output data without the need for a priori knowledge about the system, they were successfully applied in predicting product composition in distillation columns by Osorio et al. (2008), Rogina et al. (2011), Patil et al. (2011), Sun et al. (2016), Jana and Barnejee (2018). The learning process of the Neural Network is based on optimizing the values of the weights of each neuron as they are exposed to the datasets. These values are changed successively until the network represents the desired function satisfactorily and the acquired knowledge can be applied in new situations (Coelho et al., 2015). In this work, an artificial neural network feedforward multilayer perceptron was used in the development of the virtual sensor. The MLP architecture has one input layer, at least one hidden layer, and one output layer. In MLP, each neuron is connected to all neurons in the anterior and posterior layers. The data is fed into the input layer, processed into the hidden layers and transmitted to the next layer until it provides the response at the output layer (Ansari et al., 2018). Since the problem to be modeled has only the temperature of the top tray as input and the ethanol mass fraction as output, the Levenberg-Marquardt algorithm was used to train the neural network. This algorithm has good convergence speed and is suitable for problems with low number of parameters (Hagan and Menhaj, 1994). A configuration with just one hidden layer was used, sufficient to approximate any continuous function, as long as an adequate number of neurons and a sufficient set of data were given to neural networks learn from (Patil and Ghate, 2015). The optimal number of neurons in the hidden layer was determined by trial and error. The logistic and hyperbolic tangent activation functions were applied to the hidden layer and a linear function was applied to the output layer. Several structures were tested by varying the number of neurons in the hidden layer and their activation function. The simulations were implemented through the Matlab R2016a toolbox. For the purpose of evaluate the performance of the models, the MSE was used in the training stage and the RMSE in the validation stage, Equation 1 and Equation 2 respectively. = ∑ − (1) = ∑ − (2) Where y is the ethanol mass fraction and N is the number of collected samples. 3. Results and Discussion For the training phase, 350 data were generated from six binary distillations. The five neural networks with the lowest MSE were selected for the validation phase, where the models were tested with the data of the three distillations of the watermelon wine, corresponding to 79 data. In this phase, the RMSE including all samples of the three distillations was used to evaluate the model performance. The results are in Table 1. Table 1: Neural networks with better performance in the training phase Number of neurons Activation function (hidden layer) Activation function (output layer) MSE (x10-4) (training) RMSE (validation) 3 Hyperbolic tangent linear 3.2 0.031 8 Logistic linear 3.3 0.029 15 Logistic linear 3.5 0.033 6 Hyperbolic tangent linear 3.6 0.031 5 Logistic linear 3.6 0.031 1485 From the results in Table 1, it can be observed that all networks tested in the validation phase presented a good predictive capacity, being feasible the use of any of them as soft sensor. The neural network with eight neurons in the hidden layer and activation function logsig obtained the lowest value of the RMSE and therefore was chosen to be used as a virtual sensor. It is also observed in Table 1 that the increase of neurons of the hidden layer up to 15 did not improve the performance of the neural network, concluding that the network reached its maximum capacity of generalization, dispensing the realization of new tests with more neurons. The figures 2-4 show the comparision of the prediction performed by the sensor and the process data, as well as the profile of the temperature of the top tray, used as input. Figure 2: (a) Validation of soft sensor (b) Temperature profile – Run 1 Figure 3: (a) Validation of soft sensor (b) Temperature profile – Run 2 Figure 4: (a) Validation of soft sensor (b) Temperature profile – Run 3 1486 From Figures 2-4a, it can be concluded that the proposed virtual sensor was able to perform a good prediction of ethanol concentration in real time. The proposed model responded well to the oscillations of the process, even when it is not as precise as was the case of the first distillation (Figure 1a). Figures 2-4b show the strong influence of the temperature profile on the ethanol concentration profile, since disturbances in the temperature data give an immediate response in the concentration of ethanol. Table 2 evaluates the performance of the virtual sensor in each distillation process separately. Table 2: Soft sensor performance in each distillation Distillation 1 Distillation 2 Distillation 3 RMSE 0,041 0,022 0,019 Despite the good representation of the concentration profile of ethanol over time, the virtual sensor had worse performance in the first distillation compared to the last two. One of the disadvantages of the empirical models is the lack of knowledge about the process, which precludes a deeper understanding of the behavior of the concentration profile in the first distillation, since the operating conditions were the same for the three batchings. Table 3 shows the values of the weights and bias of the best performance neural network, chosen to be used as soft sensor. Using the values of these parameters can reproduce the Neural Network used and calculate the mass fraction of ethanol from the temperature in the process studied. Table 3: Weights and biases of best neural network configuration Neuron Hidden layer Output layer w1,j bj wi,1 b1 1 13.9759 -12.4059 -1.4888 0.3255 2 10.8909 -9.6380 0.9082 3 -10.4197 5.8833 0.4307 4 13.2048 -2.5956 -0.3174 5 10.0239 1.3871 -0.23973 6 11.2110 4.5795 -0.0493 7 12.4306 7.4395 -0.1543 8 -13.8381 -13.5623 0.3601 4. Conclusions In this work, data from the distillation of a binary ethanol-water mixture were successfully used in the training of a virtual sensor for the prediction of the ethanol concentration profile in the distillation of watermelon wine for the production of a distilled beverage. The feedforward neural network optimized with Levenberg- Marquardt algorithm presented satisfactory performance, ratified by the observed RMSE values. The model configuration 1-8-1 was most suitable to provide the composition of the distillate in real time from the top tray temperature data. The objective of the sensor developed here is to reduce the delays due to manual measurement of ethanol in the follow-up of distillation cuts in the production of watermelon spirit, a key step in the definition of the sensorial characteristics of the product, bringing improvements to its quality and avoiding losses in the process. The proposed sensor is a viable and inexpensive alternative to meet the need to monitor the content of ethanol in real time and the methodology developed is not expensive, being an alternative mainly for small industries that do not have great capacity for investment in process automation Acknowledgments This work was supported by a grant from CAPES. References Abdullah Z., Norashid A., Zainal A., 2007, Nonlinear modelling application in distillation column, Chemical Product and Process Modeling. 2, 1-23, DOI: 10.2202/1934-2659.1082 Ansari H.R., Zarei M.J., Sabbaghi S., Keshavarz P., 2018. A new comprehensive model for relative viscosity of various nanofluids using feed-forward back-propagation MLP neural networks. International Communications in Heat and Mass Transfer, v. 91 p. 158–164. DOI: 10.1016/j.icheatmasstransfer2017.12.012 Batista F.R.M., Meirelles A.J.A., 2011, Computer simulation applied to studying continuous spirit distillation and product quality control, Food Control, 22, 592-1603. DOI: 10.1016/j.foodcont.2011.03.015 1487 Brazil. Department of Agriculture, Livestock and Supply. (2011). Normative instruction N°13, of June 29, 2005 which regulates law number 8.918 of July 14, 1994. Coelho D. F., Silva C. A., Machado C. S., Silveira. E., Tambourgia E. B., 2015, Use of artificial neural networks to predict aqueous twophases system optimal conditions on bromelain’s purification, Chemical Engineering Transactions, 43, 1417-1422. DOI: 10.3303/CET1543237 Das S., Saha P., 2018, A review of some advanced sensors used for health diagnosis of civil engineering structures, Measurement, 129, 68-90. DOI: 10.1016/j.measurement.2018.07.008 Gopakumar V., Tiwari S., 2018, A deep learning based data driven sofr sensor for bioprocesses, 2018, Biochemical Engineering Journal, 15, 28-39. DOI:10.1016/j.bej.2018.04.015 Grbić R., Slišković D., Kadlec P., 2013, Adaptive soft sensor for online prediction and process monitoring based on a mixture of gaussian process models, Computers and Chemical Engineering, 58, 84-97, DOI: 10.1016/j.compchemeng.2013.06.014 Hagan M.T., Menhaj M.B., 1994, Training Feedforward Networks with the Marquardt algorithm. IEE Transactions on Neural Networks, 5, 989-993. DOI: 10.1109/72.329697 Jalee E.A., Aparna K., 2016, Neuro-fuzzy soft sensor estimator for benzene toluene distillation column, Procedia Technology, 2016, 25, 92-99. DOI: 10.1016/j.protcy.2016.08.085 Jana, A.K., Banerjee, S., 2018. Neuro estimator-based inferential extended generic model control of a reactive distillation column, Chemical Engineering Research and Design, 130, p. 284-294. DOI:10.1016/j.cherd.2017.12.041 Kadlec P., Gabrys B., Strandt S., 2009, Data-driven soft sensors in the process industry, Computers and Chemical Engineering, 33, 705-814. Oisiovici R.M., Cruz S.L., 2000, State estimation of batch distillation columns using an extended Kalman filter, Chemical Engineering Science, 55, 4667-4680. DOI: 10.1016/S0009-2509(00)00088-9 Osorio, D., Perez-Correa J.R., Agosin M.C., 2008, Soft-sensor for online estimation of ethanol concentration in wine stills. Journal of Food Engineering, 87, 571-577. DOI:10.1016/j.jfoodeng.2008.01.011 Pascual, D.G., 2015, Artificial Intelligence Tools, CRC press, Boca Raton, USA. ISBN-10: 9781466584051 Patil S.R., Ghate V.N., 2015, A generalized regression neural network based on soft sensor for multicomponent distillation column, International Journal of Communication and Chemical Engineering, 4, 371-378. Patil S.V., Mankar R.B., Mahadik M.M., 2011, Online estimation of composition using software sensor in batch distillation operation, International Conference on Process Automation, Control and Computing DOI: 10.1109/PACC.2011.5978969 Rani A., Singh V., Gupta, J.R.P., 2013, Development of soft sensor for neural network based control in distillation column, ISA Transactions, 52, 438-449. DOI:10.1016/j.isatra.2012.12.009 Rogina A., Sisko I., Mohler I., Ujevi Z., Bolf N., 2011, Soft sensor for continuous product quality estimation (in crude distillation unit), Chemical engineering research and design, 89, 2070–2077. Shao W., Tian X., 2015, Adaptative soft sensor for quality prediction of chemical processes based on selective ensemble of local partial least squares models, Chemical Engineering Research and Design, 95,113-132. DOI: 10.1016/j.cherd.2015.01.006 Shi X., Xiong W., 2018, Approximate linear dependence criteria with active learning for smart soft sensor design, Chemometrics and Intelligent Laboratory Systems, 180, 88-95. DOI: 10.1016/j.chemolab.2018.07.009 Spaho, N., Peter D., Grba S., Velagic-Habul E., Milenko B., Effects of distillation cut on the distribution of higher alcohols and esters in brandy produced from three plum varieties, 2013, Journal of Institute of Brewing and Distilling, 119, 48-56. DOI: 10.1002/jib.62 Sun K., Huang S-H., Jang S.S., Wong D.S.L., 2016, Development of soft sensor with neural network and nonlinear variable selection for crude distillation unit process, Computer Aided Chemical Engineering, 38, 337-342. DOI:10.1016/B978-0-444-63428-3.50061-8 Torgashov A., Zmeu K., 2015, Identification of nonlinear soft sensor models of industrial distillation process under uncertainty, IFAC-Papers Online, 48, 45-46. DOI: 10.1016/j.ifacol.2015.12.098 Torgashov, A., Skogestad, S., Dmitry, A., 2018, A rigorous model for evaluating moving window soft sensors for industrial distillation process, Chemical Engineering Transactions, 69, 487-563. DOI: 10.3303/CET1869082 Xue, H., 2017, Prediction of chemical oxygen demand emissions in wastewater treatment plant based on improved Artificial Neural Network model, Chemical Engineering Transactions, 62, 1453-1458. Zamprogna E., Barolo M., Seborg D.E., 2002, Development of a soft sensor for a batch distillation column using linear and nonlinear pls regression techniques, IFAC Proceeding Volumes, 35, 431-436. DOI:10.3182/20020721-6-ES-1901.00483 1488