A method for predictive control of batch reaction processes based on sparse identification
Patent Information
- Application Number
- CN202311254264.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2043-09-26
AI Technical Summary
同时,在实际生产中,会出现模型失配的情况,因此,需要对所建立的模型进行实时更新
[0052]1. In batch reaction process modeling, while machine learning and deep learning-based models can capture the nonlinearity of the process, they require large amounts of production data and lack interpretability, limiting their applicability in engineering. Online updates of neural network-based models require retraining the network, leading to increased computational costs. This invention proposes a hybrid modeling and predictive control method for batch reaction processes based on sparse identification of nonlinear dynamics. The SINDY model requires only a small amount of data to construct, obtaining an accurate and interpretable model by sparsely combining multiple nonlinear terms. Simultaneously, by incorporating the nonlinear terms fitted by the FNN into the SINDY model's basis function library, the SINDY model possesses more powerful nonlinear approximation capabilities.
Smart Images

Figure CN117193101B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of process control, and more particularly to a predictive control method for intermittent reaction processes based on sparse identification. Background Technology
[0002] Batch reaction processes play a crucial role in modern chemical production, typically used to produce small-batch, multi-variety, high-value-added products such as fine chemicals and polymers. Unlike continuous reaction processes, batch reaction processes are non-steady-state operations, primarily characterized by small-scale dynamic processes, and must complete a batch process within a finite timeframe. Furthermore, due to the multi-stage and non-linear characteristics inherent in batch reaction processes, developing predictive control strategies that fully consider these features is an indispensable step in the production process.
[0003] Wang Xin et al., in their Chinese invention patent application "Optimal Control Method for Batch Reaction Process in Batch Reactor" (application number CN201410409098.6), first calculated the optimal parameter trajectory and used a linear generalized predictive controller and a nonlinear neural network generalized predictive controller to compensate for the system's nonlinear terms and track the reference trajectory. However, this method can only select one of the linear model and the neural network model at any given time. The linear model cannot well fit the nonlinear characteristics of the batch reaction process, while the neural network model lacks interpretability. Bo Cuimei et al., in their Chinese invention patent application "Two-Dimensional Multi-Model Predictive Iterative Learning Control Method for Multi-Batch Batch Reaction Process" (application number CN201410566073.7), used a recursive augmented least squares method to identify multiple process sub-models for the multi-stage batch reaction process. They established multiple combined linear models using time-varying weighting factors and designed a two-dimensional system controller using iterative learning control and predictive control to track the reference trajectory. However, the linear sub-models in this method cannot well reflect the nonlinear characteristics of the stage, and the time-varying weighting factors over-consider the influence of stages that have not yet occurred and stages that have long passed on the current stage. In their Chinese invention patent application "A Variable-Period Collaborative Optimization Control Method for Intermittent Reaction Processes" (application number CN202110094234.7), Bo Cuimei et al. considered the variable length problem of intermittent reaction processes when solving the objective function containing economic and control indicators. They used batch length and production input variables as decision variables, effectively shortening the reaction time and further approaching the economic optimum. However, this method did not consider the impact of model mismatch on predictive control, so online model updates are needed to better reflect the actual process.
[0004] Advanced control strategies for batch reaction processes typically employ a two-layer optimized control structure: the upper layer optimizes the process reference trajectory, while the lower layer designs a controller to track the reference trajectory. The optimized process reference trajectory in the upper layer is generally obtained through multiple actual production runs. In the lower-layer trajectory tracking control, because batch reaction processes exhibit highly nonlinear and multi-stage characteristics, a model reflecting these nonlinear and multi-stage features is required. Furthermore, model mismatches can occur during actual production, necessitating real-time updates to the established model.
[0005] Therefore, those skilled in the art are dedicated to developing a new predictive control method for batch reaction processes to address the aforementioned technical deficiencies in existing technologies. Summary of the Invention
[0006] In view of the above-mentioned deficiencies of the prior art, the technical problem to be solved by the present invention is how to overcome the modeling and controller design difficulties caused by the high nonlinearity of the batch reaction process, and to overcome the model mismatch that occurs in the batch reaction process.
[0007] To achieve the above objectives, the present invention provides a predictive control method for intermittent reaction processes based on sparse identification, comprising the following steps:
[0008] Step 1: Record the production data during the batch reaction process, including the batch number I, the number of variables J, and the total number of sampling points K for each batch, wherein the number of variables J = n x +n u n x n is the number of states. u To control the number of inputs and to segment the production data into stages;
[0009] Step 2: Establish a hybrid model of the intermittent reaction process based on nonlinear dynamic sparse matrix identification (SINDY) and fully connected neural network (FNN);
[0010] Step 3: Design a model prediction controller, using the hybrid model established in Step 2 as the prediction model in the model prediction controller;
[0011] Step 4: Update the hybrid model online based on the error triggering mechanism, and use the moving window error metric E. h To represent the hybrid model at t=t k Prediction accuracy at time:
[0012]
[0013] In the formula, N b x is the number of sampling periods. p (t k-ix(t) represents the predicted value of the past state using the hybrid model. k-i ) represents the actual state measurement value of the system, and δ is a small positive real number to avoid division by zero;
[0014] Set error limit E t If E is satisfied h >E t Then, the hybrid model will be updated online.
[0015] Furthermore, step 2 includes the following sub-steps:
[0016] Step 2.1: Construct an offline dataset using the production data after the stage segmentation in Step 1. The offline dataset is a three-dimensional data matrix Ω∈R. I×J×K And compare the state Ω of the i-th batch with that of the k-th time. i (k) is denoted as:
[0017]
[0018] Step 2.2: Fit the nonlinear terms in the intermittent reaction process using the FNN; the input of the FNN is all measurable state variables and control variables Ω. i (k), where the output is a nonlinear term in the intermittent reaction process or a measurable variable whose functional relationship with the state variable is unclear, denoted as FNN(Ω). i (k)); The mixing model of the batch reaction process is:
[0019]
[0020] Among them, F h The hybrid model is defined as FNN(x, u), which is the FNN that captures nonlinear relationships.
[0021] Step 2.3: Use SINDY to establish the hybrid model of the batch reaction process.
[0022] Furthermore, step 2.3 includes the following sub-steps:
[0023] Step 2.3.1: Divide the production data of each batch into a full-state data matrix X. i and input data matrix U i Where i∈I, the subscript i is omitted below:
[0024]
[0025]
[0026] At the same time, establish the derivative matrix of the corresponding state variables:
[0027]
[0028] The SINDY algorithm uses a large number of nonlinear basis functions and sparsity algorithms to construct and capture the first-order ordinary differential equation model of the original system:
[0029]
[0030] Where θ[X, U] is a basis function library containing a large number of nonlinear terms, and Ξ is the corresponding coefficient matrix;
[0031] Using the FNN describing the unknown nonlinear term established in step 2.2 as a basis function, construct the following basis function library:
[0032] θ[X, U] = [1 T X T sin(X) T , (e X ) T U T (XU) T [, ..., FNN(X, U)]
[0033] Most systems contain only a few nonlinear terms; therefore, Ξ is a sparse matrix.
[0034]
[0035] The optimal Ξ is obtained by solving the following equation using a sparse regression algorithm:
[0036]
[0037] Where the subscript r represents each row in the matrix, the first term minimizes the model error, and the second term ensures the sparsity of the coefficient matrix; finally, a SINDY hybrid model containing the basis function FNN(x, u) is obtained.
[0038] Furthermore, in step 3, at each sampling time k, the performance index function L and its constraints are as follows:
[0039]
[0040] stu min ≤u k ≤u max
[0041] y min ≤y k ≤y max
[0042] Δu min ≤Δu k≤Δu max
[0043] In the formula, PH represents the prediction time domain; Q and R u These are the output and input weight matrices, respectively; y ref,k It is the predicted value at time k; u min and u max These are the minimum and maximum values of the control quantity, respectively; y min and y max These are the minimum and maximum values of the output, respectively; Δu k =u k -u k-1 To control the increment, Δu min and Δu max These are the minimum and maximum values of the control increment, respectively;
[0044] Solve the optimization problem of the performance index function L to obtain the optimal control sequence u. * and u * The first element is used as the control input at the current moment; the above optimization problem is repeated at each new sampling moment to update the control law.
[0045] Furthermore, we assume that the control time domain and the prediction time domain are equal.
[0046] Furthermore, the stage segmentation is performed by dividing the training set, validation set, and test set in a 3:1:1 ratio.
[0047] Furthermore, the FNN model includes an input layer, a hidden layer containing 10 neurons, and an output layer.
[0048] Furthermore, take N b =10.
[0049] Furthermore, E t =0.02.
[0050] Furthermore, the update strategy of the hybrid model is: by updating N b The measured values of the past states of the actual system within the range are sampled, the derivative is obtained by finite difference method, and new parameters are identified by least squares regression on only the non-zero terms in the sparse matrix Ξ in combination with historical data.
[0051] The intermittent reaction process prediction and control method based on sparse identification provided by this invention has at least the following technical advantages:
[0052] 1. In batch reaction process modeling, while machine learning and deep learning-based models can capture the nonlinearity of the process, they require large amounts of production data and lack interpretability, limiting their applicability in engineering. Online updates of neural network-based models require retraining the network, leading to increased computational costs. This invention proposes a hybrid modeling and predictive control method for batch reaction processes based on sparse identification of nonlinear dynamics. The SINDY model requires only a small amount of data to construct, obtaining an accurate and interpretable model by sparsely combining multiple nonlinear terms. Simultaneously, by incorporating the nonlinear terms fitted by the FNN into the SINDY model's basis function library, the SINDY model possesses more powerful nonlinear approximation capabilities.
[0053] 2. The technical solution provided by this invention also takes into account that continuous changes in the setpoint during the intermittent reaction process will lead to model mismatch. Therefore, in the process of online selection and updating of the hybrid model, the least squares method is used to correct the model without changing the number of nonlinear terms in the model, so as to reduce the amount of computation. Furthermore, an error triggering mechanism is used to avoid continuous updates of the model, thereby further reducing the amount of computation.
[0054] The following will further explain the concept, specific structure, and technical effects of the present invention in conjunction with the accompanying drawings, so as to fully understand the purpose, features, and effects of the present invention. Attached Figure Description
[0055] Figure 1 This is a schematic diagram illustrating a preferred embodiment of the present invention, which establishes a hybrid model based on SINDY and FNN.
[0056] Figure 2 This is a schematic diagram of a preferred embodiment of the predictive controller based on a hybrid model of the present invention.
[0057] Figure 3 A comparison chart of actual and predicted values under an open-loop step test is provided as a preferred embodiment of the present invention.
[0058] Figure 4 The figure shows the simulation results of reactor temperature tracking for a batch reaction process, which is provided as a preferred embodiment of the present invention. Detailed Implementation
[0059] The following description, with reference to the accompanying drawings, illustrates several preferred embodiments of the present invention to make its technical content clearer and easier to understand. The present invention can be embodied in many different forms, and the scope of protection of the present invention is not limited to the embodiments mentioned herein.
[0060] This invention provides a hybrid modeling and predictive control method for intermittent reaction processes based on nonlinear dynamics sparse identification (SINDY). The method includes establishing a hybrid model of the intermittent reaction process based on SINDY and a fully connected neural network (FNN), designing a predictive controller, and online model updating based on an error-triggered mechanism. Traditional machine learning models can yield accurate results when applied to process models, but they lack interpretability. SINDY, based on the fact that only a few nonlinear terms are needed to determine the dynamic model of a complex process, uses nonlinear combinations of multiple state variables to describe the process, obtaining results similar to mechanistic models. Therefore, the mechanistic-like SINDY model is more interpretable than machine learning models, and selecting a small number of basis functions from a large number of candidate basis functions to describe the process is more concise than machine learning models. However, adding a large number of irrelevant basis functions to the basis function library as candidates may not improve model performance and may increase the burden of model training. Therefore, using a neural network model as one of the basis functions of SINDY to establish a hybrid model of the process can simultaneously improve model accuracy and interpretability. Meanwhile, online model updates based on error-triggered mechanisms can address potential mismatches between the actual system and the model during the process.
[0061] Example 1
[0062] This invention provides a predictive control method for intermittent reaction processes based on sparse identification, comprising the following steps:
[0063] Step 1: Data Acquisition. Collect production data for the batch reaction process, including the batch number I, the number of variables J, and the total number of sampling points K for each batch, where the number of variables J = n. x +n u n x n is the number of states. u To control the number of inputs and to segment production data into stages based on the characteristics of the batch reaction process and operating conditions;
[0064] Step 2: Establish a hybrid model of the intermittent reaction process based on SINDY and FNN; the hybrid model is usually constructed by combining a mechanistic model and a data-driven model. This embodiment of the invention uses SINDY for nonlinear system identification, using only measurement data to identify system models in the form of first-order nonlinear differential equations similar to mechanistic models; it uses a feedforward neural network to extend SINDY's basis function library, fitting nonlinear terms in the process or measurable variables with unclear functional relationships to state variables, thereby achieving hybrid modeling.
[0065] Step 3: Design the model predictive controller, and use the hybrid model established in Step 2 as the predictive model in the model predictive controller;
[0066] Step 4: Update the hybrid model online based on the error triggering mechanism, and use the moving window error metric E. h To represent the mixture model at t=t k Prediction accuracy at time:
[0067]
[0068] In the formula, N b x is the number of sampling periods. p (t k-i x(t) represents the predicted value of past states using a mixture model. k-i ) represents the actual state measurement value of the system, and δ is a small positive real number to avoid division by zero;
[0069] Set error limit E t If E is satisfied h >E t Then, the hybrid model will be updated online.
[0070] Example 2
[0071] Based on Example 1, step 2 includes the following sub-steps:
[0072] Step 2.1: Construct an offline dataset using the production data after stage segmentation in Step 1. The offline dataset is a three-dimensional data matrix Ω∈R. I×J×K And compare the state Ω of the i-th batch with that of the k-th time. i (k) is denoted as:
[0073]
[0074] Step 2.2: Fit the nonlinear terms of the intermittent reaction process using an FNN; an FNN typically consists of an input layer, hidden layers, and an output layer; the inputs of the FNN are all measurable state variables and control variables Ω. i (k), where the output is a nonlinear term in an intermittent reaction process or a measurable variable with an unclear functional relationship to the state variables, denoted as FNN(Ω). i (k)); Therefore, the mechanistic model of the batch reaction process is:
[0075]
[0076] y=(x)
[0077] It can be changed to the following hybrid model:
[0078]
[0079] Among them, F h It is a hybrid model, where FNN(x, u) is an FNN model that captures nonlinear relationships;
[0080] Step 2.3: Use SINDY to establish a mixed model of the batch reaction process.
[0081] Example 3
[0082] A nonlinear dynamic model is established using the SINDY method. Based on Example 2, step 2.3 includes the following sub-steps:
[0083] Step 2.3.1, as follows Figure 1 SINDY uses only input and output data from the system to build a first-order ordinary differential equation model. The production data for each batch is divided into a full-state data matrix X. i and input data matrix U i Where i∈I, the subscript i is omitted below:
[0084]
[0085]
[0086] At the same time, establish the derivative matrix of the corresponding state variables:
[0087]
[0088] If the derivatives of certain state variables cannot be measured, the finite difference method is used to calculate the derivative values.
[0089] SINDY uses a large number of nonlinear basis functions and sparsity algorithms to construct and capture the first-order ordinary differential equation model of the original system:
[0090]
[0091] Where θ[X, U] is a basis function library containing a large number of nonlinear terms, and Ξ is the corresponding coefficient matrix;
[0092] Given the prevalence of monomials, polynomials, trigonometric functions, and exponential functions in engineering systems, and using the FNN described by the unknown nonlinear term established in step 2.2 as a basis function, the following basis function library is constructed:
[0093] E[X, U] = [1 T X T sin(X) T , (e X ) T U T (XU)T [, ..., FNN(X, U)]
[0094] Most systems contain only a few nonlinear terms; therefore, Ξ is a sparse matrix.
[0095]
[0096] The optimal Ξ is obtained by solving the following equation using a sparse regression algorithm:
[0097]
[0098] Where the subscript r represents each row in the matrix, the first term minimizes the model error, and the second term ensures the sparsity of the coefficient matrix; finally, a SINDY hybrid model containing the basis function FNN(x, u) is obtained.
[0099] Example 4
[0100] Based on Examples 1, 2, and 3, such as Figure 2 The hybrid model established in step 2 is used as the prediction model in the controller. Specifically, in step 3, at each sampling time k, the performance index function L and constraints are as follows:
[0101]
[0102] stu min ≤u k ≤u max
[0103] y min ≤y k ≤y max
[0104] Δu min ≤Δu k ≤Δu max
[0105] In the formula, PH represents the prediction time domain; Q and R u These are the output and input weight matrices, respectively; y ref,k It is the predicted value at time k; u min and u max These are the minimum and maximum values of the control quantity, respectively; y min and y max These are the minimum and maximum values of the output, respectively; Δu k =u k -u k-1 To control the increment, Δu min and Δu maxLet these be the minimum and maximum values of the control increment, respectively. Assume the control time domain and prediction time domain are equal. Solve the optimization problem of the performance index function L to obtain the optimal control sequence u. * and u * The first element is used as the control input at the current moment; the above optimization problem is repeated at each new sampling moment to update the control law.
[0106] Due to the multi-stage nature of batch reaction processes and the continuous variation of operating points, or parameter changes or unknown disturbances, the mismatch between the hybrid model and the actual process increases, necessitating online model selection and updates. Simultaneously, an error triggering mechanism is introduced to prevent excessively frequent model updates. The update strategy for the hybrid model is: by adjusting N... b The measured values of the past states of the actual system within the range are sampled, the derivative is obtained by finite difference method, and new parameters are identified by least squares regression on only the non-zero terms in the sparse matrix Ξ in combination with historical data.
[0107] Example 5
[0108] This invention uses an example of an intermittent exothermic reaction with two reactions to design a hybrid modeling and predictive control method for intermittent reaction processes based on nonlinear dynamic sparse identification.
[0109] The main and side reactions of this batch process are as follows:
[0110]
[0111] In this simulation, the reaction of materials A and B to produce product C is the main reaction, while the other reaction is a side reaction. Under different reaction conditions, the reaction rates and activation energies of the main and side reactions differ. To obtain as much of the target product as possible, precise control of the reaction temperature is often required. The entire reaction process is divided into a heating stage, an isothermal stage, and a cooling stage; that is, the reactor temperature setpoint curve is divided into three stages. The heating stage is further divided into three sub-stages. The simulation time is 300 minutes, and the reaction temperature process requirements are as follows:
[0112] 1) Heating section: The temperature rises from 25℃ to 45℃. Material B is fed at a feed flow rate F and a feed temperature of T. Fin The material A undergoes an exothermic reaction for 120 minutes.
[0113] 2) Constant temperature section: Maintain 45℃ for 240 minutes. At the beginning of this stage, the hot and cold fluid switching operation is performed, that is, the hot water valve is closed and the cold water valve is opened.
[0114] 3) Cooling section: Stop feeding material B and reduce the temperature to 35°C at 300 minutes.
[0115] The dynamic equations of the batch feed reaction mechanism model are as follows:
[0116] 1) Mass balance equation (assuming constant density, m 3 ( / min) is:
[0117]
[0118] 2) The equilibrium equation (kmol / min) for material A is:
[0119]
[0120] 3) The equilibrium equation (kmol / min) for material B is:
[0121]
[0122] 4) The equilibrium equation (kmol / min) for material D is:
[0123]
[0124] 5) The reactor energy balance equation (kJ / min) is:
[0125]
[0126] 6) The energy balance equation (kJ / min) for the jacket cooling water is:
[0127]
[0128] 7) The instantaneous heat transfer area is:
[0129]
[0130] Among them, C A C B C C C D These represent the concentrations of raw materials A and B, product C, and byproduct D, respectively; V R It refers to the reaction volume; the reactor temperature T. R It is the controlled variable, ranging from 20℃ to 70℃; T J It refers to the jacket temperature; the flow rate F of the hot and cold fluids. cw To control the amount, the range is 0 to 0.2m. 3 Between / min; T c,in The temperature is the jacket cooling water temperature. Material B is fed at a feed flow rate F and a feed temperature of T. F,in k 10 k 20 E1 and E2 are the reaction rate constants, E1 and E2 are the activation energies, and R is the universal gas constant. totalV represents the total area of the jacket. Rtotal This represents the reactor volume. Other parameters are as follows: ρ, ρ J These are the reactant density and the fluid density inside the jacket, respectively; c p c J λ1 and λ2 represent the mass heat capacities of the reactants and the fluid within the jacket, respectively; U is the overall heat transfer coefficient, and λ1 and λ2 are the heats of reaction. The control objective is to track the reactor temperature setpoint by adjusting the flow rates of the hot and cold fluids.
[0131] In this example, it is assumed that all states are measurable.
[0132] The specific parameters of the model are shown in the table below:
[0133]
[0134] This invention provides a predictive control method for intermittent reaction processes based on sparse identification, comprising the following steps:
[0135] Step 1: Use the above batch reaction process kinetic model and process parameters to establish a mechanism model, collect production data of the I batch batch reaction process that has been running, divide it into stages, and then divide it into training set, validation set and test set in a 3:1:1 ratio;
[0136] Step 2: Fit the nonlinear terms using an FNN. In this embodiment, the reaction kinetic parameters k1 and k2 in this intermittent reaction process exhibit strong nonlinearity; therefore, an FNN is used to fit a mathematical model of the state variables. The FNN model has one input layer, one hidden layer containing 10 neurons, and one output layer. The input consists of 7 state variables [C]. A C B C C C D T R T J F CW If the outputs are k1 and k2, then the functional relationship between the state variables and the outputs can be represented as FNN. k1 FNN k2 ;
[0137] Step 3: Use the FNN model from Step 2 as a basis function of SINDY to establish a hybrid model of SINDY and FNN.
[0138] Therefore, SINDY's base function library is C. A C B C C C D T R T J F CW FNN k1 V AC B FNN k2 C B 2 And their intersection terms. Substitute the training set collected in step 1 into θ[X, U], and obtain the optimal Ξ by solving the following equation:
[0139]
[0140] This yields a hybrid model for each stage, which serves as the initial prediction model in the prediction controller. Figure 3 The actual values and predicted values of the mixture model were recorded for this batch reaction process under an open-loop step test. The initial value of the state is [V]. R C A C B C C C D T R T J = [5.36, 0.31, 0.04, 0.16, 0.02, 42.97, 46.19], control input is F CW =0.11.
[0141] Step 4: Solve for the control input of the model predictive controller at each sampling time. Prediction time domain: PH = 5, Q = 1, R... u =0.1. The performance index function is as follows:
[0142]
[0143] st0≤F CW,k ≤0.2
[0144] 20≤T R,k ≤70
[0145] -0.005≤ΔF CW,k ≤0.005
[0146] Assume that the control time domain and the prediction time domain are equal.
[0147] Solving the above optimization problem yields the optimal control sequence F. CW * The first element is used as the control input at the current moment. The optimization problem is repeated at each new sampling moment to update the control law.
[0148] Step 5: Online model selection and update based on error triggering mechanism. A moving window error metric E is used to represent the mixture model at t=t. k Prediction accuracy at time:
[0149]
[0150] In the formula, N b x is the number of sampling periods. p (t k-i x(t) represents the predicted value of past states using a mixture model. k-i ) represents the actual system state measurement value, and δ is a small positive real number to avoid division by zero. The error limit E is set. t If E > E t If N is not found, then the model is updated online. In this embodiment, N is taken as N. b =10, E t =0.02.
[0151] The model update strategy is as follows: by updating N b The measured values of the past states of the actual system within the range are sampled, the derivative is obtained by finite difference method, and new parameters are identified by least squares regression on only the non-zero terms in the sparse matrix Ξ in combination with historical data.
[0152] In this embodiment, the reactor temperature setpoint curve shows that the reactor went through three major stages: heating, isothermal, and cooling. The setpoint changed continuously, which is different from a continuous process where the setpoint is usually constant. The batch reaction process is more difficult to control. Figure 4 The results demonstrate that a predictive controller based on a hybrid model can drive the reactor temperature to track the set curve with good tracking performance.
[0153] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A method for predictive control of batch reaction processes based on sparse identification, characterized in that, The method includes the following steps: Step 1, record production data in intermittent reaction process, including batch number of the production data , variable number , and total number of sampling points of each batch , wherein the variable number , is the number of states, is the number of control inputs, and the production data is divided into stages, and the training set, the validation set and the test set are divided according to the ratio of 3:1:1; Step 2: Establish a hybrid model of the intermittent response process based on SINDY (a nonlinear dynamic sparse matrix recognition) and FNN (a fully connected neural network). FNN is embedded as a basis function in the SINDY basis function library. FNN includes an input layer, a hidden layer with 10 neurons, and an output layer. Step 3: Design a model prediction controller, using the hybrid model established in Step 2 as the prediction model in the model prediction controller; Step 4, updating the mixture model online based on error trigger mechanism and using moving window error metric to represent the prediction accuracy of the mixture model at time instant: wherein is the number of sampling periods, is the predicted value of the past state using the hybrid model, is the measured value of the state of the actual system, is a small positive real number to avoid division by zero, taken as , ; Setting error limit If the following condition is satisfied The online updating of the hybrid model is performed, and the updating strategy is as follows: the derivatives are calculated by using the finite difference method through sampling the measured values of the actual system past states within the range , and the new parameters are identified by the least square regression only for the non-zero items in the sparse matrix combined with the historical data.
2. The sparse identification based intermittent reaction process predictive control method of claim 1, wherein, Step 2 includes the following sub-steps: Step 2.
1. Constructing an offline dataset from the production data after the phase segmentation by Step 1, the offline dataset being a three-dimensional data matrix and the batch number of the first time point is recorded as: and the batch number of the first time point is recorded as: ; Step 2.2: Fit the nonlinear terms in the intermittent reaction process using the FNN; the input of the FNN is all measurable state and control variables. The output is a nonlinear term in the intermittent reaction process or a measurable variable whose functional relationship with the state variable is unclear, denoted as... The mixing model for the batch reaction process is: in, It is the hybrid model, To capture the nonlinear relationships of the FNN; Step 2.3: Use SINDY to establish the hybrid model of the batch reaction process.
3. The intermittent reaction process prediction and control method based on sparse recognition as described in claim 2, characterized in that, Step 2.3 includes the following sub-steps: Step 2.3.1: Divide the production data of each batch into a full-state data matrix. and input data matrix ,in Subscripts are omitted below. : At the same time, establish the derivative matrix of the corresponding state variables: ; The SINDY algorithm uses a large number of nonlinear basis functions and sparsity algorithms to construct and capture the first-order ordinary differential equation model of the original system: in, It is a basis function library containing a large number of nonlinear terms. This is the corresponding coefficient matrix; Using the FNN describing the unknown nonlinear term established in step 2.2 as a basis function, construct the following basis function library: Most systems contain only a few nonlinear terms, therefore, It is a sparse matrix: The optimal solution is obtained by solving the following equation using a sparse regression algorithm. : Among them, subscript r Representing each row in the matrix, the first term minimizes the model error, and the second term ensures the sparsity of the coefficient matrix; ultimately, a matrix containing basis functions is obtained. The SINDY hybrid model.
4. The intermittent reaction process prediction and control method based on sparse recognition as described in claim 3, characterized in that, In step 3, at each sampling time k Performance index function L The constraints are as follows: s.t. In the formula, For prediction in the time domain; and These are the output and input weight matrices, respectively. yes The predicted value at any given time; and These are the minimum and maximum values of the control quantity, respectively. and These are the minimum and maximum values of the output, respectively. To control the increment, and These are the minimum and maximum values of the control increment, respectively; Solve the performance index function L The optimization problem is to obtain the optimal control sequence. and will The first element is used as the control input at the current moment; the above optimization problem is repeated at each new sampling moment to update the control law.
5. The intermittent reaction process prediction and control method based on sparse recognition as described in claim 4, characterized in that, Assume that the control time domain and the prediction time domain are equal.
Citation Information
Patent Citations
Optimal Control Method of Batch Reaction Process in Batch Reactor
CN104375475B
Two-dimensional multi-model prediction iterative learning control method for multi-batch batch reaction processes
CN104460319B
Variable-period collaborative optimization control method for intermittent reaction process
CN113687632A