This is a joint work of Benjamin Decardi-Nelson, Jerry Cheng, and Mohan Zhang.
The future of manufacturing is continuous and autonomous. Compared to batch manufacturing, continuous manufacturing leads to less production time, lower energy consumption, greater reliability, and better sustainability.
Moreover, good product quality is hard to achieve for batch manufacturing due to the difficulty of performing quality control and optimization during the batch.
For example, the study here shows that continuous manufacturing can reduce facility costs by 66%, and consumables cost by 68%.
In order to succeed in continuous manufacturing, we need to have the correct process unit setup, design monitoring, and evaluation mechanisms appropriately as well as developing and implementing feasible control and optimization algorithms.
In this blog post, we will walk through one example of a continuous manufacturing process and demonstrate how advanced process control and machine learning optimization can play a key role in the future of continuous manufacturing.
Atropine Process Simulation
In this section, we briefly introduce the continuous-flow atropine manufacturing process. Curious readers may refer to here and here as well as the references therein for a more detailed discussion. A schematic process flow diagram for the continuous-flow manufacturing of atropine is shown below:
The process consists of four main process units in series connection namely, three tubular reactors and a liquid-liquid separator. The reactants are mixed in a mixer before being introduced into the reactors.
Since the formation of atropine involves a complex network of reactions, the reactants are not introduced at the same time. This configuration allows more control over the products formed while avoiding the formation of unwanted by-products.
The effluent of the last reactor is sent to the liquid-liquid separator which selectively separates the aqueous phase (containing atropine) and the organic phase (containing unreacted reactants and undesired products).
The mathematical model used in this study was developed from mass conservation equations. The temperatures in the units were assumed to be perfectly controlled (constant) and therefore the energy conservation equations were not considered.
Overall, a large-scale differential algebraic equation (DAE) system with 1694 differential states and 30 algebraic states was obtained. The DAE system was numerically solved using the DAE integrator in CasADi.
With growing interest in minimizing waste generation associated with the manufacturing of chemicals, various mass-based metrics have been proposed to assess the efficiency of chemical processes.
One such metric is the Environmental (E)-factor which is defined in this study as
E-factor = mass of waste generated (excluding water) / mass of desired product formed
The E-factor is a measure that considers not only the amount of product formed but also the amount of waste generated in the process. Hence, a process with a lower E-factor is better than one with a higher E-factor.
The control objective in this study is, therefore, to control the E-factor of the process. The E-factor is treated as the controlled output. This can be achieved by manipulating the inlet volumetric flow rates of streams S1 – S4. S5 and S6 were kept constant in this study.
Kalman Filter and Advanced Process Control
State-of-the-art linear model predictive control (LMPC) based on a subspace linear model was used to control the atropine manufacturing process described earlier.
MPC is an advanced model-based process control (APC) algorithm that is able to handle complex system-state interactions as well as physical constraints on the system states, outputs, and inputs.
A data-driven linear model was used to make predictions in the MPC to avoid having to solve a complex large-scale nonlinear and possibly nonconvex optimization problem online.
Since the states of the linear subspace model have no physical meaning, a state estimator in the form of a Kalman filter is used to estimate the initial state of the linear model in the controller from the plant’s output. A schematic diagram of the control system employed is shown below:
And a sample result of the setpoint tracking performance of MPC is shown here:
It can be seen that MPC is able to ensure that the system output goes to the setpoint in finite time and keeps the output there, thereafter.
Further Optimization with Machine Learning
Advanced Process Control like MPC discussed above is good at tracking setpoints when they are set. To further optimize the performance, especially economically (in this case, minimizing the E-factor), we may want to leverage Machine Learning.
In practice, we would first run MPC on production for a period of time to collect offline data for training the machine learning models. Specifically, control inputs/outputs as well as some sensor data (e.g. flow rates) are collected from running MPC.
And the machine learning model doesn’t have access to the production environment during training. The hope is that the machine learning model would learn the mapping from inputs to output such that it doesn’t simply mimic MPC behavior but actually perform better than MPC in terms of economic goals.
And indeed we can perform better economically with machine learning as shown below:
For implementation details and more model performance plots please check out our GitHub repo here.
Looking Ahead
Manufacturing will inevitably involve less and less manual input and human involvement. And eventually, we will be operating the whole plant by simply setting a high-level goal and leaving the rest to computers and algorithms.
Our research mission is to accelerate this transformation through AI and Machine Learning. There are surely more exciting development from us and the community in the near future and we cannot wait to see what is next!
If you share the mission or would like to learn more about our research and products, please feel free to reach out anytime!