The following technical discussion is part of an occasional series showcasing the ISA Mentor Program, authored by Greg McMillan, industry consultant, author of numerous process control books, 2010 ISA Life Achievement Award recipient and retired Senior Fellow from Solutia Inc. (now Eastman Chemical). Greg will be posting questions and responses from the ISA Mentor Program, with contributions from program participants.
In the ISA Mentor Program, I am providing guidance for extremely talented individuals from countries such as Argentina, Brazil, Malaysia, Mexico, Saudi Arabia, and the U.S. This question is from Madhawa Somasiri.
Madhawa Somasiri's Question
What is the best approach (philosophy, theory, and practice) in developing a dynamic process model?
Greg McMillan's Answer
The answer to this topic could be a book. The general philosophy is to only make the model as accurate and comprehensive as needed. This was particularly important when you needed to extensively program differential equations and computer processer speed was a constraint. With the speed of computers and the libraries of modeling objects available today, the main concern today is the number of parameters as the scope and complexity of the model increases. If the modeling object can provide a stable result in the right direction for default parameter settings, the user can gradually learn better parameter settings.
Despite the advances in software and computers, there are still simplifications practiced in industry. Universities are interested in partial differential equations to provide a profile within a given volume. Boundary conditions must be computed and iterative techniques employed to achieve these conditions. The solution for any given application is a research project. The only time I have used partial differential equations was for a dynamic viscoelastic model of a fiber spin line. It took me 6 months. Since fiber diameter and properties could not be measured along the spin line, the model was mostly used for exploring the effect of operating conditions rather than for process control improvement. Industry does not have the resources or time to take this more sophisticated approach.
Industry assumes a volume is perfectly mixed so that the temperature and composition is uniform within the volume allowing the use of ordinary differential equations (ODE). While most universities view this as primitive, the approach has served industry well for 50 years. For volumes that are not perfectly mixed, the overall volume is sectioned into small volumes. When profiles are important, such as in heat exchangers, static mixers, plug flow reactors, and fluidized bed reactors, the equipment volume is sectioned axially into as many small volumes as is necessary to show the correct profile. In computational fluid dynamic (CFD) models used for the study of mixing, the equipment volume is sectioned into thousands of tiny volumes. CFD models are presently used mostly in process research and development.
Models that use ODE, equations of state, thermodynamics, heat and mass transfer, and kinetics, are termed first principle models. The ODE provides the process time constant and in conjunction with the other equations, provides the process gain for each process variable. Since these equations show the interrelationship between process variables and their individual responses to process inputs (e.g., flows), the first principle model will show interactions. Some models do not use aforementioned equations and essentially compute compositions and temperatures as a blend of fluid flows. Kinetics for forward, reverse, and side reactions are not included. All of a reactant feed is assumed to immediately become product with a proportional heat release or absorption. Steady-state equations are used for heat and mass transfer.
Despite claims to the contrary, these are not really first principle models. These models do not provide a process time constant and do not show interactions and the effect of abnormal conditions. The results of the model are passed through a filter to simulate the missing time constant and through a bias and gain to correct process gains and create interactions. These models are suitable for simple plug flow volumes without reactions or changes in phase such as pipes, sample lines, static mixers, and dip tubes if the results are passed through a deadtime block to simulate transportation delays. Nearly all dynamic process models suffer from a lack of deadtime. Process deadtime is created by adding transportation delays and mixing delays and putting volumes in series. The only unit operation commonly modeled that has nearly the correct amount of deadtime is distillation when the tray volumes are individually modeled since they are the major source of deadtime.
Models of vessels are notorious for insufficient deadtime due to lack of transportation, mixing, and injection delays. The primary objective of a dynamic model of a continuous process for process control is for the open loop gain, open loop time constant, and total loop deadtime be correct for the effect of each process input (e.g., flow) on each key measured process output. The open loop gain is the product of the final control element gain, process gain, and measurement gain. The final control element gain for a control valve is the slope of the installed flow characteristic.
The measurement gain is the 100% divided by the measurement span. The open loop gain is % measurement change per % final control element change and is thus dimensionless. The open loop time constant is the largest time constant in a loop hopefully but not necessarily in the process. The total loop deadtime is the sum of the process deadtime and automation system delays, deadband, resolution, threshold sensitivity, and equivalent deadtime from signal filters and small lags in the sensor and transmitter. Since batch processes have no discharge flow during processing, there is no steady state, and process variables such as temperature and composition ramp. The open loop gain and open loop time constant is replaced by an integrating process gain whose units are % measurement change per second per % final control element change (1/sec). Gas pressure and level are integrating processes because increases in pressure or level do result in an appreciable change in discharge flow. These variables ramp at a rate proportional to the difference between input and output flows.
Experimental models obtained by an auto tuner, adaptive control, rapid modeler, and model predictive control identification can be used to provide an accurate open loop gain, open loop time constant, and total deadtime over a given operating range. However, these experimental models are linear and the real world is nonlinear particularly during abnormal conditions, startup, shutdown, transitions, and turndown. In the future, these experimental models will be used to enhance first principle models by correction of model parameters and the total loop deadtime.
An essential concept today is the virtual plant where the actual configuration can be imported and exported and actual operator graphics used. In the 1970s and 1980s, plant-wide dynamic simulators were marketed particularly for ammonia plants that used emulations of the control system. Imagine trying to emulate a DCS configuration with all of its detail. Trying to duplicate just the industrial PID with its 40 parameters, proprietary expertise, and years of development is a tremendous task with the inevitable questions as to validity.
These simulators had hefty price tags and often fell far short of expectations. I prefer first principle models because the incorporation of fundamental relationships provides knowledge during the construction and use of the model. I often found I better understood the problem and solution in the process of building the model. The model then became my laboratory to rapidly test ideas for process control improvement (PCI). For 30 years, I had the luxury of doing this in Monsanto’s engineering technology department and had the opportunity to learn from the greatest minds in simulation technology.
Assuming you want a dynamic first principle model for process control improvement (PCI), I offer the following checklist for how I approached doing simulations in CSMP (1970s), ACSL (1980s), HYSYS (1990s), DeltaV (2000s), and MiMiC (present & future).
✓ Get Process Flow Diagram (PFD) and Piping & Instrumentation Diagram (P&ID)
✓ Get or develop prototype of control system configuration, historian, and operator graphics
✓ Decide on simulation fidelity required consulting with process technology and operations
✓ Decide on what final control elements and measurements are most important to achieve fidelity
✓ Get chemical name, formula, and physical properties (e.g., molecular weight, density, vapor pressure, phase enthalpies, and boiling point for liquids) for each component
✓ Get stoichiometric equations, yield, and kinetic equations for chemical and biological products
✓ Get seed, growth, and attrition kinetic equations for crystal and cell population balances
✓ Get volumes for equipment, pump and compressor curves, and valve characteristic curves
✓ Get cross-sectional areas for levels
✓ Get final control element deadband, delay, lag, deadtime, rate limiting, and threshold sensitivity
✓ Get sensor and transmitter delay, lag, update time, resolution, and threshold sensitivity
✓ Use existing library of advanced modeling objects for unit operations, piping, final control elements (e.g., control valves and variable speed drives) and measurements whenever possible
✓ If advanced modeling objects are not available, implement in separate CALC blocks:
- differential equations for material, energy, and component balances for all phases as exemplified in Advanced Application Note
- charge balance equation of acids and bases for pH as exemplified in slides 53-56 in ISA Saint Louis Advanced pH Short Course - Day 1 with dissolved carbon dioxide added as moderator of slope between 4 and 8 pH
- mixing and injection delays as exemplified in slides 65-69 in ISA Saint Louis Advanced pH Short Course - Day 1
- driving force equations for heat and mass transfer with heat and mass transfer coefficients and areas and equilibrium relationships between vapors and liquids and between gases and dissolved gases
- equation of state for gas pressure (e.g., ideal gas law with compressibility factor)
- equations for final control element and measurement dynamics
- equations for kinetics and population balances
- equations for momentum balance for compressor surge control
- speedup factors for differential equations and kinetic equations
✓ If a pressure flow solver is not available, add flow control loops as necessary to set control valve positions and variable frequency drive speeds
✓ Provide way of initializing compositions, levels, pressures, and temperatures
✓ If controls cannot be speeded up in unison with process model, decrease deadtime in proportion to differential equation speedup and scale flows in proportion to kinetic speedup to keep the controller gain relatively the same and decrease reset time in proportion to product of speedups
✓ Interface model outputs to AI block simulate inputs and AO block outputs to model inputs
✓ Commission and tune level and pressure loops to keep inventories from getting out of bounds
✓ Commission and tune remaining loops with setpoints to match PFD operating conditions
✓ Manually adjust model parameters to match manipulated flows on PFD or use model predictive control (MPC) to automatically adapt parameters to make manipulated flows in a virtual plant running in sync with same setpoints as real plant as described in Control magazine article Virtual Control of Real pH.
✓ Manually adjust model parameters to match process gains (e.g., slope of pH titration curve) as described in Chemical Processing magazine article Virtual Plant Provides Real Insights
✓ Add advanced process controls (e.g., adaptive control, feedforward, model predictive control)
Additional Mentor Program Resources
See the ISA book 101 Tips for a Successful Automation Career that grew out of this Mentor Program to gain concise and practical advice. See the InTech magazine feature article Enabling new automation engineers for candid comments from some of the original program participants. See the Control Talk column How to effectively get engineering knowledge with the ISA Mentor Program protégée Keneisha Williams on the challenges faced by young engineers today, and the column How to succeed at career and project migration with protégé Bill Thomas on how to make the most out of yourself and your project. Providing discussion and answers besides Greg McMillan and co-founder of the program Hunter Vegas (project engineering manager at Wunderlich-Malec) are resources Mark Darby (principal consultant at CMiD Solutions), Brian Hrankowsky (consultant engineer at a major pharmaceutical company), Michel Ruel (executive director, engineering practice at BBA Inc.), Leah Ruder (director of global project engineering at the Midwest Engineering Center of Emerson Automation Solutions), Nick Sands (ISA Fellow and Manufacturing Technology Fellow at DuPont), Bart Propst (process control leader for the Ascend Performance Materials Chocolate Bayou plant), Angela Valdes (automation manager of the Toronto office for SNC-Lavalin), and Daniel Warren (senior instrumentation/electrical specialist at D.M.W. Instrumentation Consulting Services, Ltd.).
About the Author
Gregory K. McMillan, CAP, is a retired Senior Fellow from Solutia/Monsanto where he worked in engineering technology on process control improvement. Greg was also an affiliate professor for Washington University in Saint Louis. Greg is an ISA Fellow and received the ISA Kermit Fischer Environmental Award for pH control in 1991, the Control magazine Engineer of the Year award for the process industry in 1994, was inducted into the Control magazine Process Automation Hall of Fame in 2001, was honored by InTech magazine in 2003 as one of the most influential innovators in automation, and received the ISA Life Achievement Award in 2010. Greg is the author of numerous books on process control, including Advances in Reactor Measurement and Control and Essentials of Modern Measurements and Final Elements in the Process Industry. Greg has been the monthly "Control Talk" columnist for Control magazine since 2002. Presently, Greg is a part time modeling and control consultant in Technology for Process Simulation for Emerson Automation Solutions specializing in the use of the virtual plant for exploring new opportunities. He spends most of his time writing, teaching and leading the ISA Mentor Program he founded in 2011.
Connect with Greg: