Process Optimization by Integrating MATLAB with Aspen Plus
Reza Haghpanah, Dow
High throughput research is a highly leveraged capability used to explore a tremendous range of experimental options without consuming the time and resources of the experimenter. With ever present constraints on time and people, smart utilization of this capability is highly encouraged.
Modeling is a powerful tool for understanding how processes work. Modeling can give insight into the robustness of a process during an upset, how a process could be optimized, and so much more. Historically, exploration of these areas was limited to the time and resources available to the process modeler. Through the inventive combination of modeling platforms, this team has developed the capability to complete high throughput modeling, offering the same benefits of high throughput research to the modeling community.
The high throughput modeling approach integrates Aspen Plus® with MATLAB® and uses the more powerful optimization algorithms available in MATLAB. One potential use of this new capability is related to the optimization of existing operations or new designs. Traditional techniques involve a parametric study manipulating one variable at a time on a platform such as Aspen Plus to find the optimum conditions. There are challenges and shortcomings associated with this approach. As processes get more complex, there are more variables to manipulate to arrive at the optimal solution. More variables require more time to optimize, so the greater the chance a “good enough” answer will be accepted rather than finding the true optimum solution. By not reaching the most optimal condition, the company spends additional capital or annual expense; money left on the table that could contribute directly to the bottom line.
This talk includes background on how this capability was developed. It also contains information on how it has been utilized at Dow to optimize existing processes, develop new process control conditions, and save capital on future complex process designs.
Published: 11 Jan 2021
Hello, everyone. I'm Reza Panah from Dow. Before I start, I would like to thank MathWorks for this opportunity, and I hope you and your loved ones are doing well during this pandemic. Today, I'm going to talk about high throughput modeling, process optimization via integrating MATLAB with Aspen Plus.
First I would like to talk about process modeling and simulation in chemical industries. Modeling provides insight into a process. It is a very powerful design and diagnostic tool. And the additional benefit from modeling is that it can be rolled out and shared broadly within a corporation. So the ultimate goal of process modeling is to perform optimization either through sensitivity analysis or using detail optimization algorithm to optimize and improve the performance of processes in the production scale.
However, modeling comes with its own challenges as well. Sometimes it can be complex to develop a model. It can be difficult, sometimes, to make sure that the simulator converges. It takes time to develop model and even more time to optimize that. And typically, we reach the point of diminishing returns with the number of scenarios explored due to time available. It is important to note that by not finding the true optimal operating conditions for the process, we will be leaving money on the table.
This presentation focuses on addressing these two issues by replacing human time with computer time. And that's why we call that high throughput model. The whole idea of high throughput modeling in the context of this presentation is around integrating MATLAB with Aspen Plus and use the optimization algorithm available in MATLAB Global Optimization toolbox. We managed to couple MATLAB with Aspen Plus through ActiveX, and by integrating these two platforms, now MATLAB can run thousands of Aspen simulations in a few hours, versus having a person taking weeks to complete the same task.
We can use this approach in better optimizing new equipment design, to minimize cost and capital. We can also use this approach to better optimize existing processes to maximize yield, minimize costs, or debottleneck a process. And the other place that this approach can be used is in what we call scenario modeling, where we can run thousands of scenarios around the process design to check for the robustness of the design of a process or to develop control schemes. As you can imagine, by this approach, we can free up time to work on more projects while achieving better results.
In the traditional approach for flow sheet optimization, we perform parametric studies where we change one parameter at a time. It is important to note that by parametric study, it is difficult to manually satisfy all process constraints, and it's even more challenging to find the true optimal solution when we are dealing with a complex flow sheet with lots of decision variables. So there is no guarantee to find the real optimum condition by doing parametric studies.
It is important to note that the optimization algorithm available currently in Aspen Plus are derivative-based optimization techniques, which are very sensitive to initial guess. So for example, if our objective function looked like this with a bad initial guess, Optimizer will end up in a local optima rather than finding the global optimum solution. In addition, in Aspen right now, we won't be able to perform mixed integer nonlinear optimization because the current algorithm in Aspen are not capable of handling both integer and continuous variables.
In the new approach, we're using Genetic Algorithm in MATLAB to optimize a flow sheet in Aspen Plus. GA is an evolutionary-based optimization technique which has the capability to escape from local optima due to its stochastic nature. And it can handle both continuous and integer value variables. So here is a simple schematic of how we define the optimization problem.
So as I said, I've used GA in MATLAB, so we specify the decision variables in GA and Optimizer sends those decision variables or the operating conditions that we want to optimize to Aspen. Aspen runs those condition and sent back the result or the performance indicators which are required to calculate the objective function in the optimization problem. And if you have any constraints that we are not satisfying them, or we are violating those constraints, we penalize the objective function. And Optimizer keeps running this loop until it finds the optimal solution.
Now, I'm going to demonstrate a few case studies where we used this approach. So in order to demonstrate the effectiveness of this high throughput modeling approach or this new optimization approach, I decided to compete with my colleague Greg Theunick who is a highly skilled distillation expert at Dow to deoptimize the design of new distillation processes in a limited time. So Greg was using the traditional approach and I was using GA in MATLAB to optimize the distillation columns that we have. The objective function in the optimization problem was to minimize the annual costs, which include both capital cost and the operating cost.
First, we started with the conventional column with binary separation. In this problem, we have five decision variables which are listed here. And in this case, GA was able to find a solution which was 1% lower overall cost compared to the solution that has been obtained through the traditional approach. Then we decided to increase the complexity of the system and we considered a distillation column with a sidedraw. And in this case, now, we have seven decision variables. And GA in this case found a solution which was 3% lower overall cost compared to the solution that we have found through the traditional approach. And finally, we looked at the dividing wall column system, where in this case, we have 11 variables. And in this case, Greg gave up, because now you are dealing with lots of variables to optimize, whereas GA was able to find the optimal solution.
The next case study that we have considered was around optimizing polymerization reactor. So we developed a reactor model for one of our polymerization systems in Dow. And in that reactor simulator, we have considered the reaction kinetics, the transport equation, and we used around three years of plant data to fit the pre-exponential factors and activation energy in our reaction kinetics. Then we coupled this reactor model with our Genetic Algorithm Optimizer in MATLAB where we considered the physical and operational constraints and we specified the objective functions.
Optimizer came up with the optimal operating conditions that we have never considered before in the history of these reactors. And we validated the hypothesis that we came up with this optimization study in our miniplant reactors. And we demonstrated that those conditions from the optimizer are real. And ultimately, we had planned trials, and we implemented the optimal conditions in the plant scale reactors.
The next case study that we considered was a scenario modeling of control issues in a distillation column. In this project, we were dealing with a distillation column at Dow that sees a drastically varying feed composition. And it has a limited number of stages and limited instrumentation for control. It was very difficult to consistently achieve product specification with such variation in feed. And several quality upsets happen every year.
So what did we decide to do? We decided to use a correlation control strategy to come up with an equation and implement that equation, the control system of this distillation column. So what we did is we randomly generated 3,000 scenarios for the feed composition that this distillation column sees, and we ran those scenarios in Aspen Plus while meeting all the product specification. And we recorded the temperature of a stage for which we had a temperature indicator in the distillation column in the plant. So again, we coupled MATLAB with Aspen. We ran all those scenarios in Aspen Plus, and we recorded the required data from Aspen. And then we used all this data in a software called DataModeler to come up with equations that correlate the feed composition as inputs to the stage temperature as the output.
So DataModeler is a very powerful software that performs evolutionary symbolic regression to come up with hundreds of equation to fit the data. And it plots the result in terms of accuracy versus complexity. And the Pareto front, which is shown here as red dots or red circles, identifies a trade off between the competing objectives of accuracy versus complexity of the models. So we can choose the best model on the Pareto front based on the desired accuracy and the complexity of the model we want. So we picked an equation from DataModeler with R square of 0.99 on the Pareto curve, and we used that equation in the control system of the distillation column earlier this year. And we did not have any quality upsets so far using this equation that we came up with in the data model.
And just to explain this a little bit more, in this figure, I'm showing the predicted temperature from DataModeler versus the Aspen temperature. These are the recorded temperature that we collected from 3,000s of scenarios that we ran in Aspen Plus. And then DataModeler came up with an equation with R square of 0.99, and we used that equation inside the control system of the distillation column in the plant.
So in summary, high throughput modeling using a combination of MATLAB with Aspen is a very impactful capability that can be leveraged in achieving better product consistency by running batteries of operating condition and to test that against the existing process to see how the system behaves around the process design. We can also use this for more robust operation to develop control schemes for the process.
And the other point that I made earlier in my presentation is that this time saving is tremendous to achieve the same result if we go through the high throughput modeling approach. To put this into perspective, to run around 2,000 Aspen simulation, it takes around 300 hours of a person's time to do this task, whereas by integrating MATLAB into Aspen, it just takes a few hours of computing time-- not human time-- to finish this task. And as I said, we can use this approach to optimize existing and new processes to achieve capacity gains and lower cost configuration.
With that, I would like to thank you for your attention, and I would be more than happy to answer any questions you have. Thank you.