Low-Cost and Efﬁcient Solution for the Automation of Laboratory Scale Experiments: The Case of Distillation Column

: Chemical laboratories badly need efﬁcient support for human works when experiments are carried out. Process control and data acquisition at the laboratory scale are still practical challenges among others, due to equipment prices and the relative complexity of the different scientiﬁc disciplines. There is, however, a large demand recently for the so-called Internet of Things (IoT), intelligent/smart labeled solutions that also include laboratory equipment items. Such solutions have enormous potential in making research activity and routine laboratory work efﬁcient and easy by implementing proper data acquisition and control for laboratory-scale equipment items. To solve these practical challenges, an efﬁcient and simple solution was designed and completed for the control and data acquisition of a laboratory-scale rectiﬁcation process by a well-known microcontroller connected to MATLAB/Simulink. The straightforward application of this solution is demonstrated in case study measurements. The data acquired were used also for process identiﬁcation. The data were then further processed for various simple and more advanced tunings that were applied, evaluated, and compared. By implementing gain scheduling, signiﬁcant improvements can be achieved compared to model-based PID tunings while the application of self-tuning by adaptive interaction demands too much consideration for better evaluation with low beneﬁt. Furthermore, the developed device introduces the advantages of digitalization and the 4.0 industrial revolution in the laboratory as well as supports human laboratory work. It also narrows the gap between the laboratory and industrial environment items since the ﬁnal design can provide a complete process control experience already at the laboratory scale.


Introduction
Recently attractive terms such as intelligent applications, Internet of Things (IoT), industry 4.0, and smart solutions are capturing attention having essentially one common vision, that is, various appliances are utilized having different kinds of sensors, actuators, electronics, software, and connectivity enabling to connect and exchange data. The aim of such connectivity varies from one application to another, and the possibilities are endless, creating also the potential and the rethinking of laboratory research activity.
The development of new technologies or technological procedures involves various phases from small laboratory scale to pilot scale before it is implemented commercially at full scale. Each development step has a different challenge to overcome in order to be able to step forward. The control of various processes at the research scale is usually addressed at a mature state of the investigation. Such tendency can be addressed to additional equipment costs and background knowledge of process dynamics and control that may not be particularly close to the aim of the investigation.
The implementation of microcontrollers can deliver a cost-effective and trouble-free solution for such aims with high benefits on the other side. Such a solution can also be found in recent literature in various fields of research [1][2][3][4][5][6]. Although many incentives have been completed to apply control solutions based on Arduino, it has not been introduced into chemical engineering and chemical engineering research [7,8]. Since the research starts at the laboratory level this level is therefore selected for the investigation of the applicability of microcontrollers for different, simple, and complex control solutions.

Methods and Experimental Setup
To develop the novel microcomputer-based data acquisition and control system, the rectification column of laboratory scale was selected. Its control challenge is well-known and comprehensively studied. There are solutions for industrial problems but also improvements [9]. The typical problems can be due to the high difference in time constants of the various process variables (PV), certain delays resulting in process stiffness, interaction among control loops, etc. The problems were studied by Skogestad and Morari (e.g., [10][11][12]). The history of control techniques and strategies has developed alongside the quality and efficiency of the distillation process [13]. Part of the mentioned problems occur only at MIMO (multiple input multiple output) control, however, others also appear in a SISO system.
In the case of laboratory size rectification columns, their control is a problem if both price and performance are considered.
In this work, the decentralized control structure for a rectification column of laboratory size was applied and Single Input Single Output (SISO) control loops were built and applied. A new kind of application of the open-source and inexpensive microcontrollers in the laboratory was used.
The experimental setup, software/hardware architecture and the applied chemicals are all easily available to purchase. We repeated the experiment three times. The solution was also implemented in a separate test bench for undergraduate lab exercises. The solution was used in our standard educational as well as in our research labs.

System Investigated and Controlled
Considering the history of process control development and the complexity of chemical engineering processes, a rectification column of continuous operation was selected as a controlled process. The scheme of the system is presented in Figure 1. The controlled process is a glass wall distillation column with a diameter of 5 cm and 30 cm height of Mellapak structured packing from Sulzer Chemtech. The reboiler of the distillation column is a 750 mL triple neck type round-bottom flask. The column head includes a condenser and a phase separator that is a conical shape glass that drives the condensed liquid to the reflux valve. The conical shape glass has three holes for the rising  The controlled process is a glass wall distillation column with a diameter of 5 cm and 30 cm height of Mellapak structured packing from Sulzer Chemtech. The reboiler of the distillation column is a 750 mL triple neck type round-bottom flask. The column head includes a condenser and a phase separator that is a conical shape glass that drives the condensed liquid to the reflux valve. The conical shape glass has three holes for the rising vapor to pass. The reflux stream returns at lower part of the heed with a communicating vessels tip to prevent vapor back-flow. The distilled mixture is chlorobenzene with 3 m/m% benzene impurity.

The Concept of the Control Structure and the Controlled System
Based on control practices [14], material balance and composition control loops were installed. The material balance control is about two orders of magnitude faster than the composition control therefore it is an inherent decoupling option [14]. The pressure is atmospheric, distillate collector and bottom levels were controlled with the outflows. After investigating the distillation of zeotrope mixtures it was concluded that dual composition control can be completed, that is, both the distillate and bottom compositions can be controlled simultaneously [14]. In the column built and investigated, dual composition control was carried out, that is, the top and bottom product compositions are controlled according to the temperature. The sensor converts the measured data to an easily transported signal to the microcontroller of Arduino type. The microcontroller can function either as a process controller itself and/or can re-transmit the received signal to higher hierarchy levels such as software running on a computer, a personal computer (PC). The concept of the whole system is shown in Figure 2.  Depending on the particular separation problem, set-points were defined and t control algorithm was applied. The output signal of the controller was then transmitt to the actuator that enables the automatic operated process in closed loop operatio Open-loop operation is also possible. Due to the possibilities of a computer-controll process, any kind of control solutions can be tested and the control quality can be e hanced with additional sensors to perform cascade, and also feedforward control. Onli monitoring and data acquisition (DAQ) of all the measured and controlled variable a possible. Depending on the particular separation problem, set-points were defined and the control algorithm was applied. The output signal of the controller was then transmitted to the actuator that enables the automatic operated process in closed loop operation. Openloop operation is also possible. Due to the possibilities of a computer-controlled process, any kind of control solutions can be tested and the control quality can be enhanced with additional sensors to perform cascade, and also feedforward control. Online monitoring and data acquisition (DAQ) of all the measured and controlled variable are possible.
The more detailed structure of the Arduino microcontroller-based control system is presented in Figure 3.
Depending on the particular separation problem, set-points were defined and control algorithm was applied. The output signal of the controller was then transmi to the actuator that enables the automatic operated process in closed loop operat Open-loop operation is also possible. Due to the possibilities of a computer-contro process, any kind of control solutions can be tested and the control quality can be hanced with additional sensors to perform cascade, and also feedforward control. On monitoring and data acquisition (DAQ) of all the measured and controlled variable possible.
The more detailed structure of the Arduino microcontroller-based control system presented in Figure 3.  The central unit is the Master Arduino MEGA which runs the OPC server. The reflux valve, the heating and temperature sensors are controlled by the central microcontroller. The Arduino MEGA communicates with the Slave Arduino UNOs via I2C protocol and uploads all the date data into an SQL server [15,16]. The two UNOs each operate a stepper motor.
As far as the final control elements are concerned, the reboiler heat requirement is supplied by a heating basket of Bovimex MBO series. It is powered by 50 Hz 230 V AC and actuated with a solid-state relay that is controlled by the digital output of the Arduino board with the periodic time of two seconds. It is switched on or off with full power performance. The solid-state relay is only capable to cut power or turn on at 0 V crossings of the power source, therefore two seconds is chosen to be the time period. This way the minimal resolution of the power adjustment is 1%. With such small periodic time, no oscillation of the temperature values can be observed. The heating is the manipulated variable of the bottom composition, that is, temperature.
The sensors of the composition control loop are thermometers. The temperature is measured with a standard three-wire PT-100 thermometer at the reboiler, and at the head of the column. The thermometer is attached to PT100 SBW Temperature Sensor Transmitter Module, that is powered by a 24 V DC power supply. The transmitter provides the temperature signal in a 4-20 mA current range within −50 to + 150 • C. The current signal is converted to a voltage signal with high accuracy 250 Ohm resistor for the microcontroller input.
The composition of the head product is controlled by a magnetic glass/steel stick reflux ratio solenoid valve that is actuated by an IRL540 N type mosfet (metal-oxidesemiconductor field-effect transistor). The solenoid (CEME ESM 86) and the mosfet operate with 24 V DC and the mosfet is triggered by digital output signal of the Arduino board. It either allows the distillate to flow back to the column or directs the fluid to the product container. According to preliminary tests, the minimal time of stay/state should be at least 2 s, due to liquid accumulation time at the rate of 5 mL/sec. For normal operation, the periodic time is set to 10 s. Arduino Due type microcontroller is used. The analog Processes 2022, 10, 737 5 of 11 input signals are connected to the analog pins while the output signals are connected to the digital output pins with pulse width modulation (PWM). The Arduino is programmable with integrated development environment (IDE) with a PC by defining the variables of the different input and output pins, set points and generating the control algorithm, etc.
It is also possible to retransmit the signals to a PC and control them there rather than in the Arduino-type microcontroller.
The sensor and actuators are connected to the analog and digital input and output slots of the microcontroller board, respectively. Such boards are capable to receive and transmit multiple analog inputs without additional user multiplexing. Every configured analog input variable is handled as input in Matlab/Simulink. The signals are within the range of 0-3.3 V corresponding to the transmitter's signal range of −50 to +150 • C. The micro controller's A/D converter converts the inputs to 12 bits (0-4096) digital signal. This practically means in case of a measured value of 0 • C is first converted to 8 mA then to 1.32 V and eventually to the digital signal 1638. Excluding noises, the AD converter sets the maximal resolution to the temperature measurement, that is around 0.06 • C. The setup of the signal conditioning and conversion is shown in Figure 4.  The input temperature reads are conditioned with a running average function taking 200 samples and giving two digital signal values every second. Such frequency of data acquisition in our case is sufficient, however, the theory of sampling rate in closed-loop control must be followed that is investigated by Shanon and Niquist (Nyquist-Shannon sampling theorem) [17]. Signal conditioning is necessary in order to filter out any upcoming noise that may spoil the measurement or may cause unwanted control effects. The conditioned input is then handled as the process variable (PV) in process control against the desired set point.

Controller Tuning Methods Applied
In the course of the investigation of the microcontroller-based control system, different methods are considered and tested for controller tuning. In order to test the built system of Matlab/Simulink and closed-loop a number of tuning methods and setups are investigated, these are: The different controller tuning methods are programmed in the Arduino-Simulink- The input temperature reads are conditioned with a running average function taking 200 samples and giving two digital signal values every second. Such frequency of data acquisition in our case is sufficient, however, the theory of sampling rate in closed-loop control must be followed that is investigated by Shanon and Niquist (Nyquist-Shannon sampling theorem) [17]. Signal conditioning is necessary in order to filter out any upcoming noise that may spoil the measurement or may cause unwanted control effects. The conditioned input is then handled as the process variable (PV) in process control against the desired set point.

Controller Tuning Methods Applied
In the course of the investigation of the microcontroller-based control system, different methods are considered and tested for controller tuning. In order to test the built system of Matlab/Simulink and closed-loop a number of tuning methods and setups are investigated, these are: The different controller tuning methods are programmed in the Arduino-Simulink-Matlab environment, tested, and compared.

Open Loop Behavior
First, an open loop investigation was carried out and step response of the controlled system was completed. The experiments carried out were repeated three times. Figure 5 shows the response of the open-loop step change of the column setup. The step change is to model a plant startup, by applying a 50% heat load change at zero time. The initial temperature resembled room temperature while the final value settled at~120 • C. The shape of the response function shows a clear dead time of~300 s, while the rising time has an inflection at 1600 s and the final value is reached at~2000 s. An approximate mathematical model, first order unit with dead time, can be concluded according to this dynamic behavior for startup behavior:

On-Off Reflux Ration Control
A simple test of the controlled system was also carried out with the programming and testing of on-off distillate composition control where the reflux-ratio is the manipulated variable. In the case of industrial rectification columns, such a control task is completed with a continuously operating controller but if laboratory equipment items are considered this is the classical solution. However, such an investigation is also aiming at the possibilities of the Arduino-based microcontroller-operated system. The setup of the logic is shown in Figure 6. Any set point, that is, the top temperature can be introduced depending on the separation problem. In the case of startup, until the set point is met, the reflux valve remains closed. The desired temperature range, so called switch on-off range can be also given. If the top temperature minus the lower value of the switch on-off range, that is, the desired distillate composition arrives, the product is withdrawn. If the temper- An approximate mathematical model, first order unit with dead time, can be concluded according to this dynamic behavior for startup behavior:

On-Off Reflux Ration Control
A simple test of the controlled system was also carried out with the programming and testing of on-off distillate composition control where the reflux-ratio is the manipulated variable. In the case of industrial rectification columns, such a control task is completed with a continuously operating controller but if laboratory equipment items are considered this is the classical solution. However, such an investigation is also aiming at the possibilities of the Arduino-based microcontroller-operated system. The setup of the logic is shown in Figure 6. Any set point, that is, the top temperature can be introduced depending on the separation problem. In the case of startup, until the set point is met, the reflux valve remains closed. The desired temperature range, so called switch on-off range can be also given. If the top temperature minus the lower value of the switch on-off range, that is, the desired distillate composition arrives, the product is withdrawn. If the temperature is increasing and arrives at the set point plus upper value of the range, the reflux controller switches on and no product is withdrawn. The purity of the head product can be varied by the variation of the set point range.
Processes 2022, 10, x FOR PEER REVIEW 8 of 12 Figure 6. Schemes of on-off reflux control.

Comparison of the Selected Controller Tuning Methods
Step disturbances of the set points of the top temperature/composition control loop are applied for the study of different tunings, open loop Ziegler-Nichols (Oppelt method), Matlab PID tuner, Cohen-Coon tuning method, gain scheduling and self-tuning alternatives are tested. 80 °C is selected as new set point. The self-tuning setup is presented in Figure 7.
It can be clearly seen that the three controller parameters (proportional, integral and derivative) are identified in different. The work and result of the self-tuning can be influenced by the "gamma", adaptation coefficient.

Comparison of the Selected Controller Tuning Methods
Step disturbances of the set points of the top temperature/composition control loop are applied for the study of different tunings, open loop Ziegler-Nichols (Oppelt method), Matlab PID tuner, Cohen-Coon tuning method, gain scheduling and self-tuning alternatives are tested. 80 • C is selected as new set point. The self-tuning setup is presented in Figure 7.

Comparison of the Selected Controller Tuning Methods
Step disturbances of the set points of the top temperature/composition control loop are applied for the study of different tunings, open loop Ziegler-Nichols (Oppelt method), Matlab PID tuner, Cohen-Coon tuning method, gain scheduling and self-tuning alternatives are tested. 80 °C is selected as new set point. The self-tuning setup is presented in Figure 7.
It can be clearly seen that the three controller parameters (proportional, integral and derivative) are identified in different. The work and result of the self-tuning can be influenced by the "gamma", adaptation coefficient.   It can be clearly seen that the three controller parameters (proportional, integral and derivative) are identified in different. The work and result of the self-tuning can be influenced by the "gamma", adaptation coefficient. Figure 8 shows the load rejection behavior of the different tunings.

Figure 8.
Step response of the top temperature in the case of different tunings.
The self-tuning method is presented for two different cases presenting the effect of the adaptation coefficient. Besides the dead time first order model, a second order model is found to be the best for the description of the top product, controlled with the reflux ration as manipulated variable, Equation (2).
The model is applied in the Matlab PID tuner. Table 1 presents the corresponding control quality parameters.

Study of Dynamic Operation with Set Point Changes
The Arduino based microcontroller system is tested also for the continuous separation of a different mixture. For the test of the dual composition control, the n-pentane-nhexane mixture is selected. The best tuning method is applied, model based self-tuning Different set point changes are carried out for dynamic investigation (Figure 9). The self-tuning method is presented for two different cases presenting the effect of the adaptation coefficient. Besides the dead time first order model, a second order model is found to be the best for the description of the top product, controlled with the reflux ration as manipulated variable, Equation (2).
The model is applied in the Matlab PID tuner. Table 1 presents the corresponding control quality parameters.

Study of Dynamic Operation with Set Point Changes
The Arduino based microcontroller system is tested also for the continuous separation of a different mixture. For the test of the dual composition control, the n-pentane-n-hexane mixture is selected. The best tuning method is applied, model based self-tuning. Different set point changes are carried out for dynamic investigation (Figure 9). Bumpless operation can be carried out. The Arduino-based microcontroller system is capable of properly controlling the rectification column. The process variable is the top temperature, the controller output manipulates the reflux ratio.
A well-known fact can be seen, that is, the rectification column is a non-linear system. However, the decentralized controller system using SISO control loops can solve its control helping the work in the laboratory.
One possible operation disturbance could occur, if data fall out for some unexpected reason. In this case, no new variable is captured by the DAQ system. One commonly used preventive solution is to calculate the standard deviation of parameters in a certain floating timeframe. In this demonstrated system, a minute time window is applied to capture such events. Other inherent process-related disturbances, such as change of environmental temperature, pressure, etc., are also part of the system due to feedback control. However, as the setup is situated in a closed climatized space it is less exposed to such disturbance compared to industrial-scale plants. The control loops applied, should also be able to compensate for such an event.

Conclusions
In chemical laboratories, there is always a permanent need to apply flexible, targetoriented and efficient control solutions, possibly at a reasonable price.
The most common problem usually is that the additional knowledge of the implementation of such devices needs too much time and effort moreover the professional equipment items have too high costs. With the rise of the Internet of Things, these barriers are constantly stretched and by now user-friendly solutions such as the connection of Arduino boards with MATLAB can be carried out. Applying such solution data acquisition and process control at a laboratory scale is made practical, easy, and cost efficient. Such a system increases the level of laboratory work and helps them. As for demonstration, the distillation of two binary liquid mixtures with decentralized dual composition control is solved by working with column head temperature with reflux ratio and bottom product with the heating of the kettle. Data acquisition is utilized for process tuning whereas different controller tuning methods are tested.
It is presented that such connectivity of process and software via a microcontroller enables basic and advanced controls. It is also demonstrated that cost-effective, easy-touse custom control of laboratory scale equipment is possible to set up. Further developments can be towards deploying to any other laboratory-scale process. Other develop- Bumpless operation can be carried out. The Arduino-based microcontroller system is capable of properly controlling the rectification column. The process variable is the top temperature, the controller output manipulates the reflux ratio.
A well-known fact can be seen, that is, the rectification column is a non-linear system. However, the decentralized controller system using SISO control loops can solve its control helping the work in the laboratory.
One possible operation disturbance could occur, if data fall out for some unexpected reason. In this case, no new variable is captured by the DAQ system. One commonly used preventive solution is to calculate the standard deviation of parameters in a certain floating timeframe. In this demonstrated system, a minute time window is applied to capture such events. Other inherent process-related disturbances, such as change of environmental temperature, pressure, etc., are also part of the system due to feedback control. However, as the setup is situated in a closed climatized space it is less exposed to such disturbance compared to industrial-scale plants. The control loops applied, should also be able to compensate for such an event.

Conclusions
In chemical laboratories, there is always a permanent need to apply flexible, targetoriented and efficient control solutions, possibly at a reasonable price.
The most common problem usually is that the additional knowledge of the implementation of such devices needs too much time and effort moreover the professional equipment items have too high costs. With the rise of the Internet of Things, these barriers are constantly stretched and by now user-friendly solutions such as the connection of Arduino boards with MATLAB can be carried out. Applying such solution data acquisition and process control at a laboratory scale is made practical, easy, and cost efficient. Such a system increases the level of laboratory work and helps them. As for demonstration, the distillation of two binary liquid mixtures with decentralized dual composition control is solved by working with column head temperature with reflux ratio and bottom product with the heating of the kettle. Data acquisition is utilized for process tuning whereas different controller tuning methods are tested.
It is presented that such connectivity of process and software via a microcontroller enables basic and advanced controls. It is also demonstrated that cost-effective, easy-to-use custom control of laboratory scale equipment is possible to set up. Further developments can be towards deploying to any other laboratory-scale process. Other development routes can be the usage of less computationally intensive software. This would mean better performance of real-time data management and the ability to implement more sophisticated control algorithms. The possible disadvantage of these methods comes from the applied software architecture. One important parameter is that the software utilized provides only near real-time data management. This means that computational resources are varied based on load demand. On true industrial equipment, real time data management is rather more strict.
The application of advanced control algorithms such as gain scheduling is very beneficial and further improvement such as with adaptive control can also be achieved but at a price of time and effort of deep investigation of the process behavior. Results show that the setup of a distillation column controlled with an Arduino-based microcontroller system is a simple and flexible tool for control in laboratory scale.