CETvol87 DOI: 10.3303/CET2187007 Paper Received: 6 November 2020; Revised: 11 February 2021; Accepted: 22 April 2021 Please cite this article as: Eppinger T., Longwell G., Mas P., Goodheart K., Badiali U., Aglave R., 2021, Increase Food Production Efficiency Using the Executable Digital Twin (xDT), Chemical Engineering Transactions, 87, 37-42 DOI:10.3303/CET2187007 CHEMICAL ENGINEERING TRANSACTIONS VOL. 87, 2021 A publication of The Italian Association of Chemical Engineering Online at www.cetjournal.it Guest Editors: Laura Piazza, Mauro Moresi, Francesco Donsì Copyright © 2021, AIDIC Servizi S.r.l. ISBN 978-88-95608-85-3; ISSN 2283-9216 Increase Food Production Efficiency Using the Executable Digital Twin (xDT) Thomas Eppingera,*, Glenn Longwellb, Peter Masc, Kevin Goodheartb, Umberto Badialic, Ravindra Aglaveb a Siemens Industry Software GmbH, Nordostpark 3, 90411 Nürnberg, Germany b Siemens Digital Industries Software Inc., 5800 Granite Pkwy, Plano, TX 75024, USA c Siemens Industry Software SAS, 19 Boulevard Jules Carteret, 69007 Lyon, France Thomas.Eppinger@Siemens.com The food industry has improved product quality while reducing production time and cost by automating production using programmable logic controllers (PLC) over the last several decades. However, many production plants still require some level of manual expert interaction, mainly because the production processes are not 100% under control. Operators are often still present to take quality samples, re-tune unit operation controls or resolve failures. The use of a physics-based “Digital Twin” is getting more and more traction to develop the equipment virtually due to the improvements in prediction accuracy and speed of computation. Digital twins allow engineers to find the optimal design before the unit goes into production. However, these digital twins can’t be deployed at the operational level because they can be complex or too slow to react at the speed of operation. In this contribution a new set of solutions that lowers the barrier in executing the digital twins on the production floor is explain based on a few examples. This will deliver substantial return on investment (ROI) for the food production industry. They include technologies such as: • A machine learning based methodology to perform Model Order Reduction (MOR) on the digital twin in order to get real time response based on production information. • A machine learning based methodology to convert the reduced model into a virtual sensor for online quality predictions or predictive maintenance scheduling as well as to use it for creating an optimal controller of the unit based on the product requirements. • Fast edge computing hardware that can collect data from sensors and run the Executable Digital Twin (xDT) to suggest corrective action to the operator, in real time, or ultimately run in closed loop control. 1. Introduction Traditionally, manufacturing industries used simulation mainly for validation and troubleshooting in reactive mode. But since a few years with the introduction of industry 4.0 and its concept of the digital twin, where not only a single piece of equipment but the whole manufacturing process is replicated in the virtual world, substantially better products and production lines can be designed in a shorter amount of time and with reduced costs (Hartmann and Van der Auweraer, 2019). A logical next step is the digitalization and automation of the production process. Different issues however exist, like the variability of raw material and environmental condition as few of the major issues affecting directly the end product quality and needs to be taken care in the manufacturing process: The raw material can come from different provisions, sources and suppliers. During the process, it is subject to different environmental conditions like temperature, humidity and dust, which might affect its properties. Also, different storage or residence times in container, hoppers or even in transport pipe can impact the properties as well. As a consequence, the production parameters need to be constantly monitored and updated by the operator to maintain a homogeneous output quality and this leads to an increased cost of the production and therefore of the end product. In most of the production lines the control of the manufacturing process is a manual 37 operation, executed by the operator either through physical measurements on samples in the sub-station or simply visual inspection of the products, following certain guidelines in combination with the execution of periodical lab samples analysis. Therefor a direct estimation of the product parameters by the machine itself is rare or impossible with standard set-up, resulting in a potential delay in the evaluation of the product and/or production KPI (Key Performance Indicators) with possible off-target quality. Furthermore, the overall market trend goes in the direction of customized products and therefore an increasing demand of small batches. The need of flexible manufacturing processes is more and more a must for the industries that would like to stay competitive in the near future. In order to improve the efficiency in implementing a new production line or to upgrade an existing one, two different methodologies are available, Virtual Commissioning (VC) and Virtual Sensing (VS). Both methodologies aim to implement optimal automation algorithms and identify machine and process control parameters to reach target KPIs like machine performance, quietness, sustainability, reliability and product quality. 1.1 Virtual Commissioning When a new production process is developed, Virtual Commissioning refers to the digital twin of the system, supporting and enabling the automation code development, integration and tuning before the actual machine or production line. This methodology aims at • Avoiding or minimize the risk of late machine re-design. • Avoiding damaging the machine during the control calibration. • Executing the major effort of the control calibration in remote (which is even more relevant during Covid19 time). • Reducing the amount of material wasted during the calibration phase. Additionally, the digital twin approach is used to support the identification of the control parameters to reach target KPIs and improve the existing process in terms of increasing efficiency and energy saving, reducing the number of off-target end products, enhancing the reliability of the process and last but not least reducing the downtime of the machine during maintenance. In this context the term machine means both the equipment as well as the production line or the whole plant and usually involves different physics like electrical, hydraulics, mechanical, thermal, chemical and others systems that have strong impacts one on another and influence the product that is processed; the control of the machine interacts directly with the machine by piloting several actuators either in Open Loop or in Closed Loop, using physical sensors on board to get feedback on the on- going operation and adjust actuators set points to maintain target KPIs. In standard processes, the commissioning of a plant consists in an operator who manually adjusts the automation code parameters based on direct estimation of end-product quality and production KPIs, comparing the target with actual output and is based on a classical trial and error approach. Depending on the case this can be a very inefficient process moreover if the operator is not an expert or if the production process is not derived from an existing one where previous experience can be utilized. Figure 1: Virtual Commissioning and Virtual Sensing for existing and new processes. 38 With Virtual Commissioning an environment is created that mimics the real automation hardware for the controls engineer to validate their PLC (Programmable Logic Controller) logic and HMI (Human-Machine Interface) before the actual machine is available using a digital twin of the plant that can simulate off-line with the automation code (SiL – Software-in-the-Loop) or in real time with the PLC hardware (HiL – Hardware-in- the-Loop). 1.2 Virtual Sensing A virtual sensor is a sensor that does not directly measure the quantities that are useful for the operator or the closed loop control but uses a real time model of the system to convert existing measurements into the virtual one. Typically, this process is done in two steps at every time stamp that new data comes in: A first step uses the model of the production process in combination with the current measurements to bring the model in the right state as close as possible to the actual state the machine is in. In a second step the model is used to predict the virtual un-measurable variables and can even extend that prediction to the future as long as the impact of the uncertainties remains low. For that last reason, typically the virtual sensor process is repeated for every time stamp that new measured data comes in (Van der Auweraer et al., 2017). The virtual sensors have a number of advantages compared to the physical one: • Cost and weight savings in case of mobile devices compared to physical sensors. • Safety/fault tracking – create redundancy with respect to measured variable to evaluate reliability of physical sensors, which is very useful for sensor that are prone to failures. • Data fusion & extending range of operation – add extra information on top of variables that can be measured either because there is no physical sensor technology able to capture the desired variable or to add additional information like spatial information and not only punctual measurements. • Predictive maintenance – use the sensed variable to define a maintenance schedule to decrease the machine downtime. • Controls and monitoring – use the sensor to improve the controllability for the production process to enhance the feedback loop. 1.3 Deployment Usually these methodologies are deployed in a step-by-step procedure made of 5 different phases which are depicted in Figure 2. Typically, the first step is the Historical Data Analysis to understanding the system, identify model parameters from historical data and process/product KPIs through an intelligent analysis of available information by merging domain, context and analytics know how. Tools that are typically used in this phase are machine learning based data analytics, to understand the most sensitive parameters or to develop surrogate models of systems with high level of non-linearities and cross coupling between the inputs towards the outputs. Nowadays with the strong growth of Neural Network (NN) capabilities, methodologies are coming up to Figure 2: The digital twin in the manufacturing process. Five steps how Virtual Commissioning and Virtual Sensing work together. 39 combine equations with machine learning techniques to predict outputs with same accuracy but less input data. The second step is the core of the process and consists of Developing the Digital Twin model of the target system. The digital twin can be distinguished between different modeling approaches: • Equation driven models – analytical models that are usually based on Ordinary Differential Equations (ODEs) without the notion of space. • Geometry based models – usually models that rely on meshing of existing geometry to approximate the solution of dedicated set of equations like Navier-Stokes. • Data driven models (Surrogate models,black box linking Inputs with outputs) – can be very simple like a map or very complex like a Neural network. • Hybrid models – combination of the 3 above categories. Usually a plant or, in “smaller” size, a machine is made by a combination of different systems. Each system can be modeled with different approaches depending on the level of details and the phenomenon which need to be included, like mechatronics at system level, detailed Computational Fluid Dynamics (CFD), 3D structural, electromagnetics, chemical and many more (Van der Auweraer et al., 2018). The important key take-away here is, that even though each part of the machine can be modeled with a different approach in a different simulation environment tool, there are always strategies to make these tools communicate so to create a holistic representation of the system mockup. The next step is then the Model Order Reduction. By default, a digital twin model is usually slower than real time (RT) and non-compatible with fixed time step solver which are the basics requirements to have a RT closed loop system. This is even more true for of models like CFD or FEM (Finite Element Method). Therefore, a two-step procedure is proposed. In step 1 the part of the machine which is modeled is embedded with a geometrical based approach within a (equation based) system model via transfer function, surface response or surrogate model. In step 2 a Model Order Reduction is executed to create an xDT to be used as virtual sensor on edge devices and integrated within the control system (Hartmann et al., 2020). The fourth step is the Synthesis of the Virtual Sensor. The digital twin can be used to predict several variables which are still physical quantities in the fluid domain (e.g. pressure, velocities, temperatures, enthalpies), mechanical domain (accelerations, speeds, displacements, forces, rotary accelerations, angular velocities and torques) electromagnetic domain (current, voltages, magnetic fluxes) or chemical domain (composition, reaction rates, energies etc.). Most of the time the required KPIs for evaluation cannot be extracted directly from the variables predicted by the digital twin but somehow are linked to such variables. Classical examples are food contamination and degradation, component life time, sensory characteristics and fluid and material properties like viscosities, densities and so on. In this kind of cases it is possible to derive a virtual sensor by linking the physical properties to the desired KPI by means of machine learning techniques combining simulated variables with historical data acquired on the field. Sometimes it is also important to extract information from the process itself like an operator would do by visually inspecting the production line: in this case cameras can be used to record scenes and Artificial Intelligence (AI) can be used to post-process the image data, reconstruct the scene and use this information to feed the control loop. The last step is then the Automation Control Upgrade. After using a Digital Twin and a virtual sensor that is capable of much better predicting the variables of the process being controlled, the ultimate step is to close the loop. Standard techniques like ladder logic are not flexible enough and usually cannot take into account the huge variability of the production process. This leads to the need to have operators close to substations and/or conveyor belts to monitor and adjust the process and also results in some portion of off-target end- product. The chemical process industry uses already for some time methods like MPC (Model Predictive Controls, where the digital twin itself is used to optimize the control logic. Nowadays based on Machine learning other methods like Reinforcement learning are rapidly gaining traction (Hein et al., 2020). Below a quick recall of some basic differences between Artificial Intelligence methods: • AI (artificial intelligence): A program that can sense, reason, act, and adapt. • ML (machine learning): Algorithms whose performances improve as they are exposed to more data over time. • RL (reinforcement learning): Algorithms that allow machines and software agents to automatically determine the ideal behavior within a specific context, in order to maximize its performance. In the case of the reinforcement learning methodology, the digital twin is used as training environment to create a controller that in this case can be considered as a student. In order to make this student, that is often 40 called “agent”, learn based on a virtual experience he is let play within the simulation environment. Finally, the whole framework has the following structure: 1) Control objectives (KPIs), constraints (motor speed cannot exceed this value, etc.) and reward functions are defined. 2) Simulation scenarios are created with the digital twin to cover the several possible conditions that the real machine could experience (input material variability, component wear, etc.). 3) At each time step the system model provide the states of the system to the agent (speeds, pressures, pictures, etc.  virtual sensors). 4) The agent based on the targets and constraints, executes an action (open a valve, accelerate a motor, stop a pump, etc.). 5) If the action ends with a positive feedback with respect to target KPIs, the agent gets a reward and in this way the agent learns how to behave based on this virtual experience. 6) Once the agent is well prepared (like a student before an exam), it can go “live” and can be deployed for controlling the real machine. 2. Examples This section briefly present some cases where the described methodology was successfully applied. The first case is related to a ketchup plant as shown in Figure 3, where the objective was to improve the monitoring of the temperature of the product. The challenge is that the ketchup temperature must be maintained above a certain threshold during the complete process to avoid bacteria proliferation leading to a huge energy consumption. As a solution a smart scheduling algorithm was implemented to generate training data from native simulation tool combining static and transient scenarios for NN surrogate model identification for the ketchup tank system which is the most complicated part of the plant. The surrogate model of the tanks with spatial distribution of temperature is then embedded within a system simulation model of the complete plant that will be then synthetized as virtual sensor and used for monitoring the network and controlling the heaters. In this way an optimal thermal management system was achieved to decrease the safety margin in the target temperature setting, thus reducing the energy consumption leading to a substantial operating cost saving. The second example is related to a spray drying process to produce milk powder as shown in Figure 4. The challenges here are on the one hand side the product quality: It has to be ensured that the moisture content of the product is below a certain value, the powder size is in the expected range and that the temperature in the droplets/particles always stay below a certain threshold. On the other hand, the thermal efficiency of the spray dryer should be as high as possible. In this case it was possible to optimize drying conditions by modifying the Figure 3: Optimization of a ketchup production process to ensure thermal efficiency and product quality 41 airflow and the position and flow conditions on the nozzles resulting in an improved product quality. But not only the operating costs were reduced, also expensive pilot plant construction was avoided by using this methodology. Figure 5 shows an example of transportation of cheese blocks. They often have a very non-linear contact behaviour, resulting in easily getting stuck on the transportation belt. To avoid such behaviour, a camera can detect positions at the start of the belt and can drive individual belt speeds. The control of such a process can easily be learned by reinforcement learning techniques within a simulation environment, before they are applied in real life. 3. Conclusion The food industry faces new challenges driven by changing market demand, regulations and cost efficiency requiring new technologies to satisfy these needs. In this contribution a new set of solutions that lowers the barrier in executing the digital twins on the production floor was presented. Artificial Intelligence is the right technology to make smart usage of all the data and information collected from the field during plant operation to optimize the production process and the digital twin in combination with smart control algorithms are the key enablers for reaching target KPIs within reasonable time and cost. References Hartmann D., Van der Auweraer H. (2019), Digital Twins, in Proc. International Congress on Industrial and Applied Mathematics, Valencia, Spain Hartmann D., Herz M., Paffrath M., Rommes J., Tamarozzi T., Van der Auweraer H., Wever U. (2020), Model order reduction and digital twins, in Model Order Reduction Vol.3 Applications, ed. Peter Benner et al, (2020), De Gruyter Berlin, 379-430 Hein D., Limmer S., Runkler T.A (2020), Interpretable Control by Reinforcement Learning, IFAC PapersOnLine 53-2 (2020) 8082–8089 Naets F., Tamarozzi T., Rottiers W., Donders S., Van der Auweraer H., Desmet W. (2018), Model order reduction for nonlinear dynamics engineering applications, in Proc. ISMA2018 - USD2018 Conference, pp. 2415-2429 Van der Auweraer, H., Donders, S., Hartmann, D., Desmet, W. (2018), Simulation and digital twin for mechatronic product design, in Proc. ISMA2018 - USD2018 Conference, pp. 2415-2429 Van der Auweraer H., Tamarozzi T., Risaliti R., Sarrazin M., Croes J., Forrier B., Naets F., Desmet W. (2017), Virtual sensing based on design engineering models, in Proc. ICEDyn2017 Conference, International Conference on Structural Engineering Dynamics Figure 4: Optimization of air flow and spray injection nozzles for milk powder production Figure 5: Application of reinforcement learning to control a conveyer belt to avoid cheese blocks to get stuck 42