Apparatus and Methods to Build a Reliable Deep Learning Controller by Imposing Model Constraints
20220365497 · 2022-11-17
Inventors
Cpc classification
International classification
Abstract
Deep learning models and other complex models provide accurate representations of complex industrial processes. However, these models often fail to satisfy properties needed for their use in closed loop systems such as Advanced Process Control. In particular, models need to satisfy gain-constraints. Methods and systems embodying the present invention create complex closed-loop compatible models. In one embodiment, a method creates a controller for an industrial process. The method includes accessing a model of an industrial process and receiving indication of at least one constraint. The method further includes constructing and solving an objective function based on at least one constraint and the model of the industrial process. The solution of the objective function defines a modified model of the industrial process that satisfies the received constraint and can be used to create a closed-loop controller to control the industrial process.
Claims
1. A method of creating a controller for an industrial process, the method comprising: accessing a model of an industrial process, the model having been created using operation data of the industrial process; receiving at least one constraint; constructing an objective function based on the received at least one constraint and the accessed model of the industrial process, said constructing being performed by a computer processor; solving, by the computer processor, the objective function at an operating point of the industrial process, results of said solving defining a modified model of the industrial process; and based on the modified model, generating a controller that controls the industrial process.
2. The method of claim 1 further comprising: implementing a first move plan for the industrial process from the operating point to an updated operating point; determining if the updated operating point is outside a threshold; resolving, based on the determination, the objective function at the updated operating point to create an updated modified model of the industrial process; and based on the updated modified model updating the controller.
3. The method of claim 2 further comprising; collecting measurement data of the industrial process at the updated operating point; comparing the measurement data of the industrial process at the updated operating point to a prediction of the industrial process at the updated operating point generated by the modified model; and revising, based on the comparison, the updated modified model.
4. The method of claim 1 further comprising: generating a linear dynamic model of the industrial process localized at the operating point and derived from the modified model; and wherein the controller utilizes the linear dynamic model to control the industrial process.
5. The method of claim 1 wherein the controller is configured for closed-loop control of the industrial process.
6. The method of claim 5 wherein the controller is further configured for Model Predictive Control of the industrial process.
7. The method of claim 1 wherein the received at least one constraint includes at least one gain constraint.
8. The method of claim 7 wherein the at least one gain constraint includes at least one of steady-state gain monotonicity, steady-state gain ratios, and equality or nonequality linear combination of steady-state gains.
9. The method of claim 1 wherein the accessed model of the industrial process is a deep learning model.
10. The method of claim 9 wherein the deep learning model is a recurrent neural network.
11. The method of claim 1 wherein the industrial process is a nonlinear system.
12. The method of claim 1 wherein the objective function is a quadradic programming problem.
13. The method of claim 12 wherein the quadradic programming problem is:
14. The method of claim 12 wherein the quadradic programming problem finds a solution that minimizes deviation from the accessed model of the industrial process while the received at least one constraint is satisfied.
15. A system for controlling an industrial process, the system comprising: a model of an industrial process, the model having been created using operation data of the industrial process and stored in computer memory; an input module configured to receive at least one constraint; a computer processor communicatively coupled to the input module and the computer memory, the computer processor configured to: construct an objective function based on the received at least one constraint and the model of the industrial process; solve the objective function at an operating point of the industrial process, results of said solving defining a modified model of the industrial process; and a controller responsive to the computer processor and generated based on the modified model configured to control the industrial process.
16. They system of claim 15 wherein: the controller is further configured to implement a first move plan for the industrial process from the operating point to an updated operating point; and the computer processor is further configured to: determine if the updated operating point is outside a threshold; resolve, based on the determination, the objective function at the updated operating point to create an updated modified model of the industrial process; and update, based on the updated modified model, the controller.
17. The system of claim 16 wherein the computer processor is further configured to compare measurement data of the industrial process at the updated operating point to a prediction of the industrial process at the updated operating point generated by the modified model, and based, on the comparison, revise the updated modified model.
18. The system of claim 15 wherein the computer processor is further configured generate a linear dynamic model of the industrial process localized at the operating point and derived from the modified model and the controller is further configured to utilize the linear dynamic model to control the industrial process.
19. The system of claim 15 wherein the controller is a closed-loop controller
20. The system of claim 19 wherein the controller is a Model Predictive Control controller.
21. The system of claim 15 the received at least one constraint includes at least one gain constraint.
22. The system of claim 21 wherein the at least one gain constraint includes at least one of steady-state gain monotonicity, steady-state gain ratios, and equality or nonequality linear combination of steady-state gains.
23. The system of claim 21 the model of the industrial process is a deep learning model.
24. The system of claim 23 the deep learning model is a recurrent neural network.
25. The system of claim 15 wherein the industrial process is a nonlinear system.
26. The system of claim 15 wherein the objective function is a quadradic programming problem.
27. The system of claim 26 wherein the quadradic programming problem is:
28. The system of claim 27 wherein the quadradic programming problem finds a solution that minimizes deviation from the model of the industrial process while the received at least one constraint is satisfied.
29. A non-transitory computer-readable data storage medium comprising instructions to cause a computer to: access a model of an industrial process, the model having been created using operation data of the industrial process; receive at least one constraint; construct an objective function based on the received at least one constraint and the accessed model of the industrial process, said constructing being performed by a computer processor; solve the objective function at an operating point of the industrial process, results of said solving defining a modified model of the industrial process; and based on the modified model, generate a controller that controls the industrial process.
30. The non-transitory computer-readable data storage medium of claim 29 wherein the instructions further cause the computer to: implement a first move plan for the industrial process from the operating point to an updated operating point; determine if the updated operating point is outside a threshold; resolve, based on the determination, the objective function at the updated operating point to create an updated modified model of the industrial process; and based on the updated modified model update the controller.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The foregoing will be apparent from the following more particular description of example embodiments, as illustrated in the accompanying drawings in which like reference characters refer to the same parts throughout the different views. The drawings are not necessarily to scale, emphasis instead being placed upon illustrating embodiments.
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
DETAILED DESCRIPTION
[0024] A description of example embodiments follows.
[0025] New systems and methods are disclosed for building a reliable advanced process controller by imposing control-relevant model properties. The following disclosure is specifically directed to a Deep Learning based controller incorporating steady-state gain constraints. A model's steady-state gain is defined as the derivative of an output variable with respect to an input variable at the steady-state. For example, for a given industrial process (chemical, pharmaceutical, petroleum, or other process), the temperature rises when the steam flow steps up. After a certain time period, the temperature will reach a new steady-state value. The ratio of delta change in temperature over the delta change in steam flow at the steady-state is the steady-state gain for those variables (i.e., temperature and steam flow). The invention disclosed herein can address the following control-relevant model gain constraints: i) steady-state gain monotonicity; ii) steady-state gain ratios; and iii) equality or nonequality linear combination of steady-state gains. Although a Deep Learning model is used as an explicit embodiment of the invention, the methods and systems presented can be applied to other types of linear and nonlinear dynamic models without loss of generality.
[0026] The two step approach starts with either creating or accessing an initial model of a subject process created with process operation data. This model may be a simplified linear model built from readily available regular plant operation data or a Deep Learning model, which can more accurately describe the process's behavior, such as severe nonlinearity. The initial model can be generated with any known existing modeling techniques for creating and/or training a model that simulates a subject process unit (process system).
[0027] The initial model is then modified to meet pre-defined model property requirements, so the behavior of the model complies to a-prior knowledge of the modeled process. The derivation of a modified model from the initial model is done by solving a Quadratic Programming (QP) problem where the objective function measures the deviation of the modified model gains from the original model gains, subject to pre-defined constraints such as gain constraints. The gain constraints can include the sign (monotonicity), ratios and linear combination of the steady-state gains. The modified model is then fed into the controller engine to calculate the control target of the subject process.
[0028] To account for potential nonlinearity of both the subject process and its model, as in the case of an initial Deep Learning model, the QP problem is solved at different operating points and a certain number of iterations are executed to find a true optimum for the process using the nonlinear model. A threshold range or a trust region, for each independent variable, limits how far a variable is permitted to move away from the operating point at which the QP problem is solved and a modified model is created. If the trust region is left, the QP problem is solved again at an updated operating point and an updated modified model is created. This process is repeated as the controller modifies the process's independent variables until the calculated control target or a variable boundary is reached. The calculated target can then be used to generate a new dynamic move plan for the subject process.
[0029] To reduce the computation time so the whole calculation can be finished within a specified control cycle (normally one minute), a locally linearized dynamic model may be derived from the deep leaning model at each control cycle and a move plan towards the control target is calculated based on this simplified model. To overcome any deviation between the two step model and the process, real-time feedback is used to update the local linearized dynamic model prediction when the next cycle starts.
[0030] Example Network Environment for Plant Processes
[0031]
[0032] The system computers 101 and 102 may communicate with the data server 103 to access collected data for measurable process variables from a historian database 111. The data server 103 may be further communicatively coupled to a distributed control system (DCS) 104, or any other plant control system, which may be configured with instruments 109A-109I, 106, 107 that collect data at a regular sampling period (e.g., one sample per minute) for the measurable process variables. Instruments 106, 107 are online analyzers (e.g., gas chromatographs) that collect data at a longer sampling period. The instruments 109A-109I, 106, 107 may communicate the collected data to an instrumentation computer 105, also configured in the DCS 104, and the instrumentation computer 105 may in turn communicate the collected data to the data server 103 over communications network 108. The data server 103 may then archive the collected data in the historian database 111 for model calibration and inferential model training purposes. The data collected varies according to the type of target process.
[0033] The collected data may include measurements for various measurable process variables. These measurements may include, for example, a feed stream flow rate as measured by a flow meter 109B, a feed stream temperature as measured by a temperature sensor 109C, component feed concentrations as determined by an analyzer 109A, and reflux stream temperature in a pipe as measured by a temperature sensor 109D. The collected data may also include measurements for process output stream variables, such as, for example, the concentration of produced materials, as measured by analyzers 106 and 107. The collected data may further include measurements for manipulated input variables, such as, for example, reflux flow rate as set by valve 109F and determined by flow meter 109H, a re-boiler steam flow rate as set by valve 109E and measured by flow meter 109I, and pressure in a column as controlled by a valve 109G. The collected data reflect the operation conditions of the representative plant during a particular sampling period. The collected data is archived in the historian database 111 for model calibration and inferential model training purposes. The data collected varies according to the type of target process.
[0034] The system computers 101 or 102 may execute various types of process controllers for online deployment purposes. The output values generated by the controller(s) on the system computers 101 or 102 may be provided to the instrumentation computer 105 over the network 108 for an operator to view, or may be provided to automatically program any other component of the DCS 104, or any other plant control system or processing system coupled to the DCS system 104. Alternatively, the instrumentation computer 105 can store the historical data 111 through the data server 103 in the historian database 111 and execute the process controller(s) in a stand-alone mode. Collectively, the instrumentation computer 105, the data server 103, and various sensors and output drivers (e.g., 109A-109I, 106, 107) form the DCS 104 and can work together to implement and run the presented application.
[0035] The example architecture 100 of the computer system supports the process operation of a representative plant. In this embodiment, the representative plant may be, for example, a refinery or a chemical processing plant having a number of measurable process variables, such as, for example, temperature, pressure, and flow rate variables. It should be understood that in other embodiments a wide variety of other types of technological processes or equipment in the useful arts may be used.
[0036]
[0037] An objective function is constructed 215 that measures the deviation of a modified model gains (aka the derivative of an output variable with respect to an input variable) from the initial model gains. The objective function also requires that the modified model conforms to the received model property requirements from step 210. The objective function of step 215 may be a Quadratic Programming (QP) objective function. Next, the objective function is solved 220 for a modified model that minimizes gain deviation from the initial model and remains subject to the received model property requirements from step 210. The modified model retains the complexity and predictive power of the initial model while complying with the physical laws and/or process constraints captured in the model property requirements. The objective function is solved 220 at an operating point of the subject industrial process due to the nonlinearity it (the objective function) inherits from the initial model. At the output of step 220 is a deployable modified model. The example method 200 further includes controlling (or enabling control of) 225 the industrial process based on the modified model from step 220 (such as by servers 101, 102 executing a process controller employing the modified model).
[0038] A digital processor may be programmed to implement the steps 205, 210, 215, 220 of method 200 and may be in communication with servers 101, 102, 112 for carrying out step 225. In other embodiments, servers 101, 102, and/or 112 are configured to perform the steps of method 200. Computer processors perform method 200 upon user command, with or without user intermittent interaction, automatically, and the like, given the disclosure herein.
[0039]
[0040]
[0041] The method 400 further includes establishing 410 a trust region for each variable of the industrial process 305. A trust region is a threshold range surrounding the value of the variable at the operating point the objective function was solved at. The trust region, in some embodiments, can be 10% of the operating range for the independent variable, the method may adaptively increase or decrease the region to speed convergence. If the industrial process (outputs and monitored variable values/sensor values) remains within that threshold range, the predictions and calculations of the modified model will be accurate. However, if the industrial process (outputs and monitored variable values/sensor values) exceeds the threshold range, there is no guarantee that the predictions and calculations of the modified model will be accurate at the current cycle. When next cycle starts, feedback information can be incorporated and the calculation will be updated to improve accuracy.
[0042] The move plan is executed 415 based on the predictions and calculations of the modified model. If the trust region is exceeded, the method includes solving 420 the objective function again at the current operating point of the industrial process to create a new modified model. Using the new modified model resulting from step 420, method 400 iterates steps 405, 410, 415, and 420 as shown at 425 in
[0043] Method 400 produces a dynamic process where a move plan for the subject industrial process 305 is executed utilizing a model that is ensured to be accurate for the current operating point of the industrial process and also satisfies the model property requirements incorporated in the objective function. Once the industrial process 305 reaches the target, a new target and corresponding move plan may be determined based on the needs of a user or system control plan.
[0044] To reduce the computation time so all the necessary calculations can be finished within a specified control cycle (normally one minute), a locally linearized dynamic model may be derived from the modified model at each control cycle and the move plan is calculated based on this simplified model (the derived locally linearized dynamic model).
[0045] Details of an Example Embodiment
[0046] A generic dynamic process (representative of subject industrial processes 305 of
Y(k)=F((Y.sub.0,U(k), . . . ,U(k−N)) (1)
[0047] Where, F is a linear or nonlinear function, k is time, N is the dynamic memory length, Y.sub.0 is the initial condition, and U and Y are input variables and output variables, respectively.
U=[u.sub.1,u.sub.2, . . . ,u.sub.m], m≥1
Y=[y.sub.1,y.sub.2, . . . ,y.sub.n], n≥1
[0048] For a nonlinear system, the gain value, g.sub.ij, varies at different initial condition Y.sub.0.
[0049] The process operation constraints can be described as:
UL≤U≤UH (2)
YL≤Y≤YH (3)
[0050] Where, UL and UH are input variable low and high limits, and YL and YH are output variable low and high limits, respectively.
[0051] For a linear dynamic process, equation (1) can be re-written as
Y(k)=Σ.sub.t=0.sup.NC(t)*U(k−t) (4)
[0052] Where C is a series of coefficients.
[0053] For a nonlinear dynamic process, a possible representation can be a Deep Learning model as illustrated in
[0054] The goal of an advanced process controller, particularly in MPC, is to find a sequence of process inputs so that the process outputs satisfy the process constraints while a pre-defined objective function J is optimized:
[0055] such that Equations or relationships (1), (2), and (3) hold true.
[0056] If the optimization solution from equation (5) can be reliably applied to an industrial process, model (1) must satisfy certain properties. Many of these properties are constraints on the input-output steady-state gain. An input-output steady-state gain is defined as
[0057] Equation (6) states that if there is a step change in one of input variables i while keeping other input variables constant, the ratio of output value j net change at steady state over the input step change is the gain, g.sub.ij. [0058] Gain monotonicity: either g.sub.ij≥0 or g.sub.ij≤0 across the whole operating range, unless certain variables truly exhibit gain sign change behavior presented in the process unit (subject industrial process). [0059] Gain ratio constraint: commonly used gain ratio constraints include
[0061] The following describes how these gain constraints can be imposed on a Deep Learning model based advanced process control system (MPC in particular).
[0062] Step 1: Create an Unconstrained Deep Learning model.
[0063] The input and output variables of an industrial process required to achieve closed-loop control of an industrial process unit are selected. Using process operation data, a conventional Deep Learning model for the process unit is generated and trained. In some cases, designed perturbation is used to enrich the operation data for better training. A recurrent neural network such as Long Short-Term Memory (LSTM) is normally used to capture the complextity of the process dynamics. During Step 1, no constraints are considered in the model training.
[0064] Step 2: Define Constraints.
[0065] Based on a-priori knowledge about the modeled process unit, a user specifies the model gain constraints relevant to the closed-loop control requirement. These constraints may include: gain monotonicity, gain ratios, and the linear combination.
[0066] Step 3: Build a Deep Learning Controller.
[0067] Model predictive control involves two major calculations: a steady-state target determination, and a dynamic move plan calculation. To use a Deep Learning model, Applicants have derived a new algorithm to overcome the complexity involved in nonlinear optimization so that the model can be deployed in real time application:
[0068] 1) Choose a maximal allowed step fraction, a, for the input and output variables, where 0<a≤1.
[0069] 2) Calculate the local derivatives from the Deep Learning model: Let U(k+1)=U(k+2)= . . . =U(k+N)=Uc, calculate the Deep Learning output values Ys at k+N. Use [Uc,Ys] as the reference point to calculate the numerical derivatives,
from the Deep Learning model.
[0070] 3) Imposing the pre-defined gain constraints: modify the original derivatives,
so that the modified derivatives (aka gains), G, satisfy the gain constraint requirement. Refer to Step 4 below for more details.
[0071] 4) Run optimization problem Equation (5) using a locally linearized model:
Y=Ys+G*U (7)
with the following additional constraints:
|U−Uc|≤(UH−UL)*a
|Y−Ys|≤(YH−YL)*a (8)
[0072] Denote the solution as [Ua,Ya].
[0073] 5) Using [Ua,Ya] as the reference point to calculate the local derivatives from the Deep Learning model, and then return to 3) above to calculate the modified derivatives. Stop if the required convergence is reached.
[0074] 6) Create a locally linearized dynamic model: Generate a step response curve from the Deep Learning model by making a delta change in each of the inputs U, one at a time. The delta change direction is determined by the sign of (Ua−Uc). The gain of the step response curve is determined by
[0075] To ensure that the locally linearized dynamic model is consistent with the steady state target and the gain constraints, a QP is solved with the following structure:
[0076] Where Gopt is the steady-state gains of the linearized dynamic model used for the dynamic move plan calculation, Uinit is the initial input, Yinit is the initial output, Uopt is the input target, and Yopt is the output target.
[0077] 7) Calculate Dynamic Move Plan: Follow a conventional approach in Model Predictive Control to calculate a dynamic move plan using the linearized model Equation (9).
[0078] Step 4: Imposing Model Constraints.
[0079] When the numeric derivatives,
is obtained from the Deep Learning model, the following QP problem is formulated with the specified gain constraints:
[0080] such that
gl.sub.{ij}≤g.sub.{ij}≤gh.sub.{ij} for subset of variables, where gl.sub.{ij} and gh.sub.{ij} are given constants (13)
Σ.sub.{i,j}c.sub.ij*g.sub.ij=0 for subset of variables, where c.sub.ij are given constants (14)
[0081] This QP problem aims to find a new gain matrix that defines a modifed model such that the specified gain constraints are satisfied while the deviations from the original gains (derivatives) are minimized. Imposing constraints such as those in (13), (14) and (15) need to be done based on the understanding of the modeled process unit; unnecessay constraints can introduce modeling errors.
[0082] Step 5: Output Results and Feedback Update
[0083] Upon the completion of the calculaton, only the first changes in the move plan (a series of input variable changes over the control time horizon) is sent to the process unit to be implemented. A new set of target and move plan is calculated when the next control cycle starts. Before the new control cycle starts, measurements from the process unit are collected (for example from sensors 330a, . . . , 330n, or analyzers and sensors 109A- 109D, 109H, 109I, 106, 107 described in
[0084] Example Digital Processing Environment
[0085]
[0086]
[0087] In one embodiment, the processor routines 92 and data 94 are a computer program product (generally referenced 92), including a computer readable medium (e.g., a removable storage medium such as one or more DVD-ROM's, CD-ROM's, diskettes, tapes) that provides at least a portion of the software instructions for the disclosed system. Computer program product 92 can be installed by any suitable software installation procedure, as is well known in the art. In another embodiment, at least a portion of the software instructions may also be downloaded over a cable, communication, and/or wireless connection. In other embodiments, the programs are a computer program propagated signal product 75 (
[0088] In alternate embodiments, the propagated signal is an analog carrier wave or digital signal carried on the propagated medium. For example, the propagated signal may be a digitized signal propagated over a global network (e.g., the Internet), a telecommunications network, or other network. In one embodiment, the propagated signal is a signal that is transmitted over the propagation medium over a period of time, such as the instructions for a software application sent in packets over a network over a period of milliseconds, seconds, minutes, or longer. In another embodiment, the computer readable medium of computer program product 92 is a propagation medium that the computer system 50 may receive and read, such as by receiving the propagation medium and identifying a propagated signal embodied in the propagation medium, as described above for computer program propagated signal product. Generally speaking, the term “carrier medium” or transient carrier encompasses the foregoing transient signals, propagated signals, propagated medium, storage medium and the like. In other embodiments, the program product 92 may be implemented as a so-called Software as a Service (SaaS), or other installation or communication supporting end-users.
[0089] It should be understood that the flow diagrams, block diagrams, and network diagrams may include more or fewer elements, be arranged differently, or be represented differently. But further it should be understood that certain implementations may dictate the block and network diagrams and the number of block and network diagrams illustrating the execution of the embodiments be implemented in a particular way. Accordingly, further embodiments may also be implemented in a variety of computer architectures, physical, virtual, cloud computers, and/or some combination thereof, and, thus, the data processors described herein are intended for purposes of illustration only and not as limitations of the embodiments.
[0090] While example embodiments have been particularly shown and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the embodiments encompassed by the appended claims.