Automation and control of the thermal mixing process

In this research, the automation and control of an industrial mixing process were developed. Process safety was established through pipeline maintenance, plant instrumentation repair, and the addition of required instrumentation to ensure process safety. The process operation was divided into the industrial operation stages A1,F1, F2, F3, F5, and D1 of the GEMMA guide, designed in the GRAFCET methodology. The design of the temperature and level controllers was carried out using the approximation technique of each closed-loop system to a second order system with zero, based on the pole approximation technique. The industrial process was carried out with the DCS Honeywell HC900, integrating the automation of the system and the temperature and level controllers designed. A real-time SCADA supervision system was implemented to visualize the process and report alarms caused by failures in sensors or actuators. The mixing process was carried out in real-time, evidencing the settling times and overshoot values under the desired conditions.


Introduction
Mixing processes are commonly used in industrial engineering applications.These processes involve gaseous and liquid components, which must be monitored and controlled to carry out the desired mixing process.The importance of the mixing processes in the industrial processes of cement, pressurization, and mixing of industrial fuel gases can be evidenced.The mixing process comprises the combination of liquids or gases with different characteristics, resulting in a uniform mixture (Klimenko, 2013).
Control in this type of MIMO (Multi-Input, Multi-Output) processes requires careful design related to unmodeled dynamics, external perturbations, and uncertainty in model parameters (Carreno-Zagarra et al., 2018).In Rojas-Moreno and Hernandez-Garagatti (2017), for example, nonlinear and linear dynamic models of a multipurpose plant containing a water tank fed by two flows (cold water and hot water), which are mixed to produce an outlet flow, are developed.In Akbariza et al. (2021) a simulation study for temperature and level control in a liquid (water) mixing process is proposed using MAT-LAB/Simulink.In the development process of the controller, a PI controller is used to generate the training data required by an Adaptive Neuro-Fuzzy Inference Systems (ANFIS)-based controller.
On the other hand, Muga et al. (2016) conducted research related to controlling temperature and liquid concentration in a simulation as well as real time implementation using PLC and MATLAB, using decoupling control to eliminate the influence between control variables.Similarly, Machado et al. (2018) used PI controllers with decoupling but using an Arduino UNO in the implementation.
In this research, the automation, the supervisory control and data acquisition system (SCADA) and the level and temperature control of a system of 4 coupled tanks are carried out (see Figure 1).The mathematical model of the plant was made by an approximation of the system to four SISO models based on experimental tests by decoupling.The control of the MIMO system was based on the SISO systems with pairs of variables with the highest correlation (H/q c and T/q h ).The design of the temperature and level controllers was carried out using the approximation technique of each closed-loop system to a second order system with zero, based on the pole approximation technique.The automation of the mixing process is integrated with the controllers in a Distributed Control System (DCS).The operation stages were designed through the GEMMA guide, using the GRAFCET methodology and block diagram programming for its implementation.System security was realized by providing a Supervisory Control and Data Acquisition (SCADA) system with fault detection.
In this work, Section 2 presents the plant repair process (corrective, preventive maintenance, and quality improvements).Section 3 presents the automation process composed of DCS programming through Functional Block Diagrams and is based on the GEMMA guide, and the SFC-GRAFCET methodology.The dynamic behavior of the process, the methodology implemented to determine the experimental model of the system, and the design of the controller is presented in Section 4. The results obtained in real time are presented in Section 5, evidencing the behavior of the controlled variables under the established specifications, and finally, the conclusions of the investigation are presented in Section 6.

Process plant repair
Maintenance is fundamental to guarantee production quality and maintain the proper functioning of the machines, lengthening their useful life.In the 1970s, total productive maintenance (TPM) emerged, developed by the Japanese Seichi Nakajima (Villanueva et al., 1989), which integrates corrective and preventive maintenance with human production personnel, guaranteeing the safe operation of the process in the long term.
In this research, the TPM was worked together with automation to guarantee the safety and effectiveness of the Industrial Mixing Process.The blending process plant had been out of use for a long time and had malfunctioning devices.For this reason, in the first place, the verification of the operation of sensors and actuators was carried out to find out any damage in the process plant and carry out the respective corrective maintenance.In addition, to guarantee the safe operation of the process, preventive maintenance was carried out consisting of cleaning the pipes and tanks of the mixing plant.Finally, it was necessary to install new sensors and adapt the fluid evacuation system.Table 1 presents the plant maintenance activities.
To comply with the corrective maintenance, a diagnosis of sensors and actuators was carried out.Various faults were found in the tested components, requiring their replacement.In addition, changes in the wiring were made due to incorrect implementation of the sensors or actuators that make up the mixing process plant.These procedures are shown in Figure 2.
Due to the idle time of the process plant, the pipelines were obstructed by sedimented material, reducing the effectiveness of the process, making necessary the disassembling and cleaning of the pipes and valves, increasing the effectiveness of the process.The results are shown in Figure 3.
The safety of the process was addressed by installing three multi-point level switch sensors in the feed and reserve tanks to avoid fluid spills, damage to the return pump due to cavitation, and damage to the thermal  resistance and condenser caused by fluid insufficiency.A fluid evacuation system was designed in TK-004 at two heights using a submersible hydraulic pump as an extra coupling and decoupling accessory to the thermal mixing plant, obtaining a fully functional and safe mixing plant, preventing damages to the return pump due to cavitation and the spill of this tank.

Automation
The automation was made with an HC900 Honeywell DCS (Distributed Control System) integrates with the Designer software for programming the HC900, HMI web display builder for the SCADA, and Configuration studio for linking the HC900 with the SCADA window, working together with industrial programming strategies or methodologies as the GEMMA guide, GRAFCET, FBDs, and Karnaugh maps.

DCS programming
In this project, with the main objective of programming the HC900 Honeywell DCS, some stages of the GEMMA guideline (Guide des Modes d'Etude et d'Arrets Marches) were applied to guarantee the safety and autonomy of the process.The GEMMA guideline provides a general approach to the vocabulary and safety practices in the industrial process.Nonetheless, the GEMMA guideline is not widespread in the current industrial practice of PLC programming, and it is adaptable to the needs of the process (Barbieri & Gutierrez, 2021).The GEMMA guideline is the product of research carried out by the French National Agency for the Development of Production Applied to Industry (ADEPA) and includes different stages for stop procedures (A), operating procedures (F), and emergency procedures (D) (Jovanny, 2014).In this work, the A1, F1, F2, F3, F5, and D1 procedures (See Figure 4) were applied.At the same time, the GEMMA guideline was applied and integrated with the SFC (Sequential Function Control) and the graphic representation model GRAFCET (Graphe Fonctionnel de Commande des Etapes et Transitions).

SFC-GRAFCET
SFC program is composed of interconnected stages with transitions, where the stages correspond to different process conditions, allowing the automated execution of the mixing process in this case (Jovanny, 2014).
• Initial stop state (A1): The initial state establishes the different process values in zero conditions or initial conditions, depending on the different requirements.
The Honeywell HC900 DCS remains in this state after the operator or user establishes the correct conditions to start the process.• Running in verification mode orderly (F5): With the principal aim of guaranteeing the safe operation of the process, the F5 procedure was indispensable for the process, allowing the validation of the sensors and actuators present in the mixing plant.However, this procedure can be skipped if the operator knows in advance the correct behavior of the plant.Otherwise, it is recommended to perform this process before starting the operation.• Start up process (F2): According to the established requirements, the process must start ever at the same conditions, fulfilling the supply and reserve tanks, and the control tank must be empty.With the purpose of getting the correct function of the process, the F2 procedure is to supply the required fluid to the tanks and heat up and cold up the fluid at the desired set points.• Normal production (F1): The F1 state is where the control is established.This GEMMA state allows the normal operation of the process, supervising all the process variables and as result, the level and temperature desired in the control tank.• Shutdown process (F3): At the end of normal production, or in this case, after obtaining the desired temperature and level results, the operator must close the process, initially having to disable the heating resistance to recirculate the fluid for a while.In addition, the process must end in safe conditions, avoiding the release of the fluid.• Emergency stop (D1): Throughout the process, the system verifies the safety conditions and if it detects any anomaly, an alarm state is activated, and, as a result, procedure D1 is also activated.Furthermore, the critical elements are turned off and the process is stopped.

Function block diagram
The Function Block Diagram (FBD) programming language described in Commission (2003)

SCADA
By using the HMI web display builder it was designed an HMI to monitor all sensors and actuators as follows: • Also, it allows to control the level and temperature of the TK-003 and includes process configuration buttons, as well as an emergency stop button.The designed HMI is presented in Figure 5 In this work, the implemented SCADA system has been configured to show the physical process diagram, representing the status of the numeric elements with colour coding as presented in Figure 5.For digital signals, the absence of an electric signal will be shown in black on the actuator and in white on the sensor, while the presence of a signal will be indicated in green.Analog signals, on the other hand, will display their value on the screen next to the respective device.To guarantee the safety of the mixing process, the emergency stop procedure was implemented through sensor failures.The sensor failures cause the stoppage of all the actuators of the system and present an alarm in the SCADA system, while warnings are associated with the Low-Low and High-High states of the TK-001, TK-002, TK-003, and TK-004, Errors belong to impossible states of the sensors.i.e the activation of the High-High state with no presence of a Low-Low state in the same tank.

Configuration studio
Configuration Studio software provides a central location for configuration tools, health checks, and access to system information.Aspects of system configuration, including but not limited to hardware configuration, variable history, OPC, control strategies, controllers, and even field devices can be managed using this software.The sensors and actuators were linked to the HMI displays, in addition to configuring the level monitoring alarms.The data acquired from the process, such as temperature and level controlled variables, can be stored using this software.

Dynamic model
Most industrial process controls involve different inputs (manipulated variables) and outputs (controlled variables), referring to these processes as MIMO (multiple input-multiple outputs).Figure 6 shows the behavior of the MIMO mixing process, made up of two input flows (w c , w h ) associated with temperatures, T c and T h , respectively, considered as disturbances.The level H and temperature T of the mixing tank are to be controlled Seborg et al. (2016).
The analyses of the manipulated variables, the controlled variables, and the disturbances of the process allow establishing a dynamic model of the process, which represent the behavior of a system, being fundamental to determining the control of a process.On the other hand, the different process models are based on conservation laws such as the conservation of mass and energy, present in this process due to the corresponding variables of the input flows (q h , q c , T h , T c ) and the output flow.

Conservation of mass
The mixing process treated in this project is composed of two inlet flow rates and one outlet flow rate.Considering the outlet flow rate as constant, the input flow rates are the manipulated variables to obtain the desired value of the controlled variable H.To establish the dynamics of the model corresponding to the height variation of the controlled tank, we start from the rate of mass accumulation mass described in the following expression: Where the mass in corresponds to the sum of the inlet mass flow rates mass in = w c + w h .Besides, the rate of mass accumulation can be expressed as the rate of volume times density, considering for this analysis the density value as a constant Seborg et al. (2016).
Finally, because the industrial mixing process treated in this project has a constant area of the stirred tank, the rate of height (controlled variable) can be expressed in terms of volumetric flows.

Conservation of energy
The industrial mixing process has two controlled variables due to its nature as a MIMO system.The dynamics of the temperature model are determined by the law of conservation of energy, also called the First Law of Thermodynamics.The total energy of a thermodynamic system is composed of internal energy, kinetic energy, and potential energy.Nonetheless, due to small changes in kinetic and potential energy compared with internal energy, they are neglected.Also, the liquid temperatures in the stirred tank are not affected by temperature, setting the energy balance as Seborg et al. (2016).
Where w is the mass flow and Ĥ enthalpy per unit mass.Likewise, for pure liquids at low and moderate pressures, the internal energy per unit mass can be approximated as the enthalpy per unit mass and H depends only on temperature as shown in Equation ( 5) Seborg et al. (2016).
Where C is the constant pressure heat capacity.Assuming that the mixing tank has a condition of temperature T and enthalpy Ĥ, Equation ( 5) can be integrated at a reference temperature (T ref ), giving as a result: Assuming zero loss of generality ( Ĥ ref = 0) at T ref , the convection term − (w Ĥ) of ( 4) can be written as: Considering that the liquid varies with the time and the total internal energy of the liquid in the tank can be expressed as the product between the mass and the internal energy per unit mass in the tank (U int = ρV Û int ) (Seborg et al., 2016).The energy balance for this process is the following: Expanding by the chain rule the derivative presented in (8) gives: Finally, substituting (7) at the left side of ( 9), equation governs the dynamic behavior of the controlled temperature of the process:

Model identification
Theoretical model identification may be impractical in several industrial processes due to the complexity to obtain the unknown parameters.An alternative to these theoretical models is the modeling approaches in control applications through the experimental data.Empirical models are known as black-box models when all their parameters are unknown and are obtained through approximations based on experimental tests, this process is known as process, or system identification (Seborg et al., 2016).
The empirical adjustment of the process model is carried out through the analysis of the transient response of the system to a change in the input flow.In this work, the mixing process is composed of two input variables and two output variables, so four empirical models are required to determine the behavior of each controlled variable concerning each manipulated variable.For this purpose, the principle of superposition was applied, observing the behavior of the outputs when The level and temperature models of the thermal mixing process in this investigation are derived from the analysis of the system at a specific operating point.The operating point was established based on the system limitations presented in Table 2.
Tank level models respect to cold flow and hot flow are presented below, respectively: Likewise, the models obtained from the temperature with respect to the inlet flows are:

Controller design
The cooling system of the TK-002 does not work properly, making the cooling process of the fluid very long, being necessary the future maintenance of this system.According to this issue, it has been decided to implement a decentralized PI control in the industrial process in order to test the proposed controller design methodology.This indicates that the process will be taken as two independent SISO systems (without decoupling).In other words, the transfer functions h(s)/q c (s) and T(s)/q h (s) will be used for the controller design of each control loop.
For controller design, the second-order transfer functions of Equations ( 11) and ( 14) can be approximated by first-order systems, as follows: Consider a PI controller for this process, whose transfer function is given by the following expression: The transfer function of the closed loop control system would be: (17) This closed-loop model corresponds to a second-order system with zero, as follows: where,

Underdamped response
In case of underdamped behavior, the time response to a unit step input is represented by the following expression: where a, b and c are the fit parameters of the exponential expression.
For the design of control systems with small overshoots, ζ = 0.9 can be selected.Figure 8 shows the fit for the exponential curve of Equation ( 21) when ζ = 0.9.In that case, M p (p) = 3.947e −5.273p was the fitted curve for the overshoot.

Overdamped response
In case of overdamped behavior, the time response to a unit step input is represented by the following expression: where, The resulting step response for ζ = 1.3 for different p values are shown in Figure 9(b).It can be verified that to obtain an overdamped behavior p > 0.3 is required.
Figure 10 shows the settling time as a function of p for ζ = 1.3.The following expression fits the data of the curve:

Level control loop
Based on the identified models, the controllers were designed.The multivariable control scheme consists of two SISO controllers, one for level control and the other for temperature control.The following specifications were defined for the level system: an overshoot of less than 6% and a settling time of no more than 1000 seconds.The transfer function presented in Equation ( 11) can be reduced to the following first-order model: To achieve the specification of the overshoot when selecting ζ = 0.9, a value of p = 0.8 is required, according to Figure 9(a).In this case, ω n t s = 4.7725 [s], where t s is the desired settling time in the closed-loop control system.For a settling time around 1000 [s] ω n = 4.77 • 10 −3 [rad/s] can be selected.Using the expressions of the Equation ( 19), the following parameters of the PI controller are obtained:

Temperature control loop
Likewise, for the temperature controller, a voltage value supplied by the temperature transmitter represents the system input.The controller output is given by a voltage proportional to the opening of the hot water supply tank valve.For the temperature loop, the following specifications were defined: an overdamped behavior with a settling time close to 7500 [s].The transfer function presented in Equation ( 12) can be reduced to the following first-order model: In order to achieve an overdamped dynamic ζ = 1.3 and p = 0.4 can be selected, as shown in Figure 9

Results and discussion
This section shows the experimental results obtained in the mixing process.The first step focuses on the system operation, validating the correct implementation of plant maintenance.The process was automated in order to validate its operation and maintenance.The control process of the process plant was experimentally validated under real conditions, simultaneously implementing the two controllers in the mixing plant until reaching the desired setpoint values.The performance of the control system can be validated based on characteristics such as response speed, steady-state error, overshoot, and disturbance rejection.
The graphs of the controlled variable and the control action (q c ) for the level control concerning time are presented in Figure 11.This figure shows a 2% overshoot and a 900 [s] settling time, satisfying the conditions for an overshoot under 6% and a settling time under 1000 [s].
Besides, the behavior of the closed-loop temperature control system and its control action (q h ) concerning time, are presented in Figure 12.There is no overshoot in this controller and its settling time is 6265 [s], validating the requirements of an overdamped system with a settling time under 7500 [s].

Conclusions
In this research, maintenance, automation, and control of a mixing industrial process are presented.The safety of an industrial process begins with the maintenance of the system components, as evidenced in this work.The sediments in the pipes and the failure of different elements (sensors and actuators) of the process are a consequence of the absence of periodic preventive maintenance, which is necessary to optimize an industrial process.
Otherwise, an automation system was realized using a Honeywell HC900 DCS.The GEMMA guide and the GRAFCET methodology were implemented in the automation, guaranteeing a safe process.In addition, it is evident that these methodologies can be adapted to the needs of the process, using specific procedures (A1, F1, F2, F3, F5, D1) as in this work.The function block diagram (FBD) was the programming methodology implemented due to the characteristics of the DCS, not being an impediment due to the adaptability of the SFC methodologies.
The main contribution of the work is the methodology for controller design.While control theory academic texts commonly present the responses of first and second order systems, in this paper the temporal response for second order systems with zero is presented.The controller design technique allows adjusting the parameters of a PI controller to obtain the settling time and desired overshoot in the closed-loop control system, which is approximated to a second-order system with zero.
For level and temperature control in the mixing process, a TITO (two Input-Two Output) multivariable linear model was tuned.The design proposal guarantees precise tracking of the reference in the presence of disturbances and unmodeled dynamics, and even despite the dynamic coupling between the variables, for which the use of a decoupling stage was not required.
It is important to note that this mixing process serves as a platform for the design of advanced controllers in automatic control courses and is a useful resource for the implementation of industrial automation technologies.

Figure 2 .
Figure 2. Corrective maintenance of the process plant.Order and suitability of devices and repair of sensors and actuators.

Figure 3 .
Figure 3. Preventive maintenance of the process plant (A) Piping system repair (B) Initial state of the pipes due to sedimentation and lack of maintenance (C) Cleaning of obstructed pipes (D)dirty tank surfaces due to lack of maintenance (E) tank surfaces after maintenance.
Visualization of ON-OFF valve activation through indicators.• Visualization of the Low and High water level indicators or the TK-001, TK-002, and TK-004 and temperature values in degrees Celsius of the TK-001 and TK-002 to avoid spills or lack of water and monitor the correct process temperature in them.• Visualization of the opening percentage of proportional valves in a range of 0-100.• The water level and temperature (controlled variables) in TK-003.• Warning and Error Alarms.

Figure 5 .
Figure 5. HMI-SCADA Design of the process plant with monitoring of input signals (sensors) and control of output variables (actuators).

Figure 7
Figure 7 shows the overshoot percentage as a function of p = a/ζ ω n for different values of the damping factor, when ζ ≤ 1.Each of these curves can be represented by an exponential of the form:

Figure 7 .Figure 10 .
Figure 7. Percent overshoot as a function of ζ and ω n , for secondorder transfer function with zero.p = a/ζ ω n increases, the finite zero moves farther into the left half-plane and away from the poles, and the step response approaches the second-order system response, as expected.Figure10shows the settling time as a function of p for ζ = 0.9 and ζ = 1.3.For the underdamped

Figure 8 .
Figure 8. Overshoot as a function of the parameter p for ζ = 0.9 in a second order system with zero.

Figure 9 .
Figure 9. Response for the second-order transfer function with a zero for different values of the ratio p = a/ζ ω n when ζ = 0.9 and ζ = 1.3.

Figure 11 .
Figure 11.Level response for control loop with set-point value of sp = 4.90 V (a) Level reference tracking (b) Control action q c .

Figure 12 .
Figure 12.Temperature response for control loop with set-point value of sp = 0.75 V (a) Temperature reference tracking (b) Control action q h .

Table 2 .
Constraints for Thermal Mixing Process.