Prediction control method and device based on time-varying model, equipment and medium
By constructing a benchmark transfer function model and gain multiplier matrix, a real-time transfer function model is generated, and the state space model and prediction output model are determined, which solves the problem that prediction control is difficult to achieve time-varying control under complex operating conditions, and achieves high-precision and convenient time-varying prediction control.
Patent Information
- Application Number
- CN202411957161.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-29
- Publication Date
- 2025-04-11
AI Technical Summary
Predictive control under complex operating conditions in the prior art is difficult to achieve time-varying control easily, especially when the MPC controller needs to adapt to operating conditions and disturbance changes.
By obtaining the input and output historical data of the controlled object, a benchmark transfer function model matrix and a benchmark gain multiplier matrix are constructed, and a real-time transfer function model matrix is constructed based on these matrices, the state space model and prediction output model are determined, and prediction control is performed.
It realizes time-varying prediction control conveniently and intuitively while ensuring the accuracy of prediction control, improving the user experience.
Smart Images

Figure CN119805939A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of industrial control technology, and in particular to a predictive control method, device, equipment and medium based on a time-varying model. Background Art
[0002] As chemical production shifts from automated production to intelligent production, enterprises have new requirements for various production equipment, product quality, key core variables, etc. In order to achieve intelligent production of equipment, enterprises have also introduced many advanced control technologies, among which the most widely used control technology is MPC (Model Predictive Control).
[0003] The MPC prediction model has a great influence on the accuracy of the entire control algorithm solution. In actual industrial production, if the intelligent operation of the entire process is to be achieved, the MPC controller needs to adapt to the changes in the working conditions on site and the changes in various disturbances. However, once the production conditions or certain controlled variables change with the changes in the external environment and production conditions, their characteristics will change significantly, and the prediction model will also change significantly.
[0004] In the related technology, time-varying model predictive control can be implemented based on the state space model. However, since there is no single and direct and obvious relationship between the parameters in the state space equation and the actual input and output variables, it is difficult for control engineers to operate in actual engineering implementation, and it is difficult to implement time-varying control intuitively and conveniently. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a predictive control method, device, equipment and medium based on a time-varying model to solve the problem in the prior art that predictive control under complex working conditions is difficult to conveniently implement time-varying control.
[0006] A first aspect of an embodiment of the present application provides a predictive control method based on a time-varying model, comprising:
[0007] S201, obtaining input and output history data of the controlled object, and constructing a reference transfer function model matrix of the controlled object based on the input and output history data;
[0008] S202, obtaining input and output constraints of the controlled object, determining the number of input and output gains of the controlled object based on the input and output constraints, and constructing a reference gain multiplier matrix using the number of input and output gains, wherein the number of matrix elements in the reference gain multiplier matrix is the same as the number of input and output gains of the controlled object, and the value of each element in the reference gain multiplier matrix is 1;
[0009] S203, constructing a real-time transfer function model matrix based on the reference transfer function model matrix and the gain multiplier matrix, and determining a state space model and a predicted output model of the controlled object based on the real-time transfer function model matrix;
[0010] S204: Perform predictive control on the controlled object based on the state space model and the predictive output model.
[0011] In some embodiments, after determining the state space model and the predicted output model of the controlled object, the method further includes:
[0012] Periodically obtain the operating condition information and disturbance information of the controlled object;
[0013] In response to determining an update of input and output constraints of the controlled object based on the operating condition information and the disturbance information, determining an updated gain multiplier matrix;
[0014] determining an updated real-time transfer function model matrix based on the updated gain multiplier matrix;
[0015] An updated state space model and a predicted output model of the controlled object are determined based on the updated real-time transfer function model matrix, and predictive control is performed on the controlled object based on the updated state space model and the predicted output model.
[0016] In some embodiments, in response to determining the update of the input-output constraint condition of the controlled object based on the operating condition information and the disturbance information, determining the updated gain multiplier matrix includes:
[0017] Determine whether a constraint condition of a target input quantity on a target output quantity in a controlled object changes based on the operating condition information and the disturbance information, wherein the target output quantity is any output quantity of the controlled object, and the target input quantity is any input quantity of the controlled object;
[0018] If yes, then the gain increment of the target input to the target output is calculated based on the changed constraint conditions;
[0019] The calculated gain increment is used to update the gain multiplier matrix to obtain an updated gain multiplier matrix.
[0020] In some embodiments, calculating the gain increment of the target input quantity to the target output quantity based on the changed constraint condition includes:
[0021] Calculate the updated gain of the target input to the target output based on the changed constraint conditions;
[0022] Obtaining a reference gain corresponding to a reference gain multiplier matrix of a gain of a target input quantity to a target output quantity;
[0023] The quotient of the updated gain and the reference gain is determined as the gain increment.
[0024] In some embodiments, after calculating the gain increment of the target input quantity to the target output quantity based on the changed constraint condition, the method further includes:
[0025] In a preset gain multiplier change flag matrix, a matrix element corresponding to a gain multiplier change flag of a target input quantity to a target output quantity is set to a first value, and an initial value of each element in the preset gain multiplier change flag matrix is set to a second value;
[0026] An updated real-time transfer function model matrix is determined based on the updated gain multiplier matrix, including:
[0027] In response to determining that the gain multiplier change flag matrix includes a matrix element of a first value, an updated gain multiplier matrix is obtained, and an updated real-time transfer function model matrix is determined based on the updated gain multiplier matrix.
[0028] In some embodiments, the gain of the same input quantity to the output quantity corresponds to the same matrix element in the reference transfer function model matrix and the gain multiplier matrix;
[0029] The step of determining the updated real-time transfer function model matrix based on the updated gain multiplier matrix is to multiply the updated gain multiplier matrix with the elements at the same position in the current real-time transfer function model matrix to obtain the updated real-time transfer function model matrix.
[0030] In some embodiments, predictive control is performed on a controlled object based on a state space model and a predictive output model, including:
[0031] Determine predicted input data of the controlled object based on the state space module and the predicted output model;
[0032] Use the predicted input data to perform predictive control on the controlled object.
[0033] A second aspect of the embodiment of the present application provides a predictive control device based on a time-varying model, comprising:
[0034] A construction module is configured to obtain input and output history data of the controlled object, and construct a reference transfer function model matrix of the controlled object based on the input and output history data;
[0035] an acquisition module, configured to acquire input and output constraints of the controlled object, determine the number of input and output gains of the controlled object based on the input and output constraints, and construct a reference gain multiplier matrix using the number of input and output gains, wherein the number of matrix elements in the reference gain multiplier matrix is the same as the number of input and output gains of the controlled object, and the value of each element in the reference gain multiplier matrix is 1;
[0036] The determination module is configured to construct a real-time transfer function model matrix based on a reference transfer function and a gain multiplier matrix, and determine a state space model and a predicted output model of a controlled object based on the real-time transfer function model matrix; the prediction module is configured to perform predictive control on the controlled object based on the state space model and the predicted output model.
[0037] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0038] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0039] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application obtain the input and output historical data of the controlled object, construct a benchmark transfer function model matrix of the controlled object, determine the input and output quantity based on the input and output constraints of the controlled object, use the input and output quantity to construct a benchmark gain multiplier matrix, use the benchmark transfer function model matrix and the benchmark gain multiplier matrix to construct a real-time transfer function model matrix, determine the state space model and predicted output model of the controlled object based on the real-time transfer function model matrix, and finally control the controlled object using the state space model and the predicted output model, thereby achieving the effect of constraints on the input and output quantities of the controlled object created by using an easy-to-understand and easy-to-control transfer function model, and at the same time using a high-precision state space model and a predicted output model for predictive control, thereby realizing time-varying predictive control conveniently and intuitively while ensuring the accuracy of predictive control, thereby improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 This is the schematic diagram of MPC control.
[0042] Figure 2 It is a flow chart of a predictive control method based on a time-varying model provided in an embodiment of the present application.
[0043] Figure 3It is a flow chart of another predictive control method based on a time-varying model provided in an embodiment of the present application.
[0044] Figure 4 It is a flowchart of a method for determining an updated gain multiplier matrix provided in an embodiment of the present application.
[0045] Figure 5 It is a flowchart of a method for calculating a gain increment of a target input quantity to a target output quantity based on a changed constraint condition provided in an embodiment of the present application.
[0046] Figure 6 It is a flow chart of a method for predictive control of a controlled object based on a state space model and a predictive output model provided in an embodiment of the present application.
[0047] Figure 7 It is a flow chart of another predictive control method based on a time-varying model provided in an embodiment of the present application.
[0048] Figure 8 It is a schematic diagram of a predictive control device based on a time-varying model provided in an embodiment of the present application.
[0049] Fig. 9 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0051] A predictive control method and device based on a time-varying model according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0052] As mentioned above, MPC is currently the most widely used control technology in production. Figure 1 This is the principle diagram of MPC control. Figure 1 As shown, k represents time, the coordinate axis represents the prediction time domain length from left to right, and the left side of the coordinate axis represents past information and the right side represents future information. The input state of the controlled object is obtained by comparing the difference between the output state of the controlled object and the reference value, and adjusting the controller using the difference.
[0053] In other words, the core idea of MPC is to predict the dynamic characteristics of the system in the future in each control cycle based on the constructed prediction model, and to consider certain constraints to construct a closed-loop optimal objective problem, thereby converting a control problem into a constrained optimization mathematical problem, so as to find its optimal control strategy.
[0054] It can be seen that the MPC prediction model has a great influence on the accuracy of the entire control algorithm solution. In actual industrial production, if the intelligent operation of the entire process is to be achieved, the MPC controller needs to adapt to the changes in the working conditions on site and the changes in various disturbances. However, once the production conditions or certain controlled variables will change significantly with the changes in the external environment and production conditions, their characteristics will change significantly, and the prediction model will change significantly.
[0055] In order to cope with the changes in these working conditions and disturbances, related technologies either build multiple prediction models and use different prediction models under different working conditions and disturbances, or build a time-varying model based on the state-space model for predictive control. However, the former is costly and complex to switch, and the latter is difficult for control engineers to operate in actual engineering implementation because there is no single, direct and obvious relationship between the parameters in the state-space equation and the actual input and output variables, and it is difficult to intuitively and conveniently implement time-varying control.
[0056] In view of this, an embodiment of the present application provides a predictive control method based on a time-varying model, which obtains the input and output historical data of the controlled object, constructs a benchmark transfer function model matrix of the controlled object, and determines the input and output quantities based on the input and output constraints of the controlled object, and uses the input and output quantities to construct a benchmark gain multiplier matrix, and uses the benchmark transfer function model matrix and the benchmark gain multiplier matrix to construct a real-time transfer function model matrix, and determines the state space model and predicted output model of the controlled object based on the real-time transfer function model matrix, and finally uses the state space model and the predicted output model to control the controlled object, thereby achieving the effect of constraints on the input and output quantities of the controlled object created by using an easy-to-understand and easy-to-control transfer function model, and at the same time using a high-precision state space model and a predicted output model to perform predictive control, thereby realizing time-varying predictive control conveniently and intuitively while ensuring the accuracy of predictive control, thereby improving user experience.
[0057] Figure 2 FIG. 1 is a flow chart of a predictive control method based on a time-varying model provided in an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0058] In step S201, historical input and output data of the controlled object are obtained, and a reference transfer function model matrix of the controlled object is constructed based on the historical input and output data.
[0059] In step S202, the input and output constraints of the controlled object are obtained, the input and output gain quantities of the controlled object are determined based on the input and output constraints, and a reference gain multiplier matrix is constructed using the input and output gain quantities.
[0060] The number of matrix elements in the reference gain multiplier matrix is the same as the number of input and output gains of the controlled object, and the value of each element in the reference gain multiplier matrix is 1.
[0061] In step S203, a real-time transfer function model matrix is constructed based on the reference transfer function model matrix and the gain multiplier matrix, and a state space model and a predicted output model of the controlled object are determined based on the real-time transfer function model matrix.
[0062] In step S204, predictive control is performed on the controlled object based on the state space model and the predictive output model.
[0063] In some embodiments of the present application, the method may be executed by a server, or by a terminal device with certain processing capabilities.
[0064] In some embodiments of the present application, the input and output history data of the controlled object may be first acquired, and then a reference transfer function model matrix of the controlled object may be constructed based on the input and output history data.
[0065] In one example, if the reference transfer function model matrix is denoted as Gp, then Among them, G ij (s) represents the transfer function model of the jth input quantity of the controlled object to the ith output quantity, and its general expression is: Among them, s is the time domain operator, a0 to a n and b0 to b m are all set coefficient values, m is less than n and n is less than or equal to 2.
[0066] In some embodiments of the present application, the input and output constraints of the controlled object may be obtained, the input and output gain quantities of the controlled object may be determined based on the input and output constraints, and a reference gain multiplier matrix may be constructed using the input and output gain quantities.
[0067] In one example, the reference gain multiplier matrix can be recorded as Gain. If the number of input and output gains determined is p*q, that is, the gains of q input quantities for p output quantities, then it can be determined that the reference gain multiplier matrix has p rows and q columns. If the reference gain multiplier matrix is recorded as Gain, then Among them, the matrix element K ijIt represents the gain multiplier value of the j-th input quantity of the controlled object to the i-th output quantity, where p, q, i and j are all positive integers, and i is less than or equal to p, and j is less than or equal to q.
[0068] In another example, the gain value G of each input quantity to the output quantity under the current input and output constraints can be calculated first. ij , and the gain multiplier corresponding to the gain value is recorded as 1. That is, the value of each matrix element in the reference gain multiplier matrix is 1, and different matrix elements correspond to the gain values of different input quantities to output quantities under the current input and output constraints.
[0069] In some implementations, a real-time transfer function model matrix may be constructed based on a reference transfer function model matrix and a reference gain multiplier matrix. In one example, the matrix elements at the same position in the reference transfer function model matrix and the reference gain multiplier matrix may be multiplied to obtain the real-time transfer function model matrix. Since the values of each matrix element in the reference gain multiplier matrix are all 1, the real-time transfer function model matrix is substantially the same as the reference transfer function model matrix.
[0070] In some embodiments, the state space model and the predicted output model of the controlled object can be determined based on the real-time transfer function model matrix. In one example, the real-time transfer function model can be first constructed, for example, where u1(s) to u q (s) is the q input quantity of the controlled object, y1(s) to y p (s) is the p output quantity of the controlled object.
[0071] Furthermore, the real-time transfer function model can be used to determine the state space model and predicted output model of the controlled object. For example, based on the constructed real-time transfer function model matrix, the method of converting the real-time transfer function model to the state space model can be called for calculation, and then the state space model is discretized, and the control amount and the disturbance amount are split to obtain the state space model and predicted output model of the controlled object. Conventional calculation methods, such as linear superposition method, decomposition method, or other methods, can be used to determine the state space model and predicted output model of the controlled object using the real-time transfer function model, which are not limited here.
[0072] In one example, the determined state space model may be x(k+1)=Ax(k)+B u u(k)+B v v(k), the prediction output model can be y(k)=Cx(k)+D u u(k)+D v v(k). Where x represents the intermediate state vector of the controlled object, with a dimension of n; u represents the control input vector of the controlled object, with a dimension of n u; v represents the input measurable disturbance vector of the controlled object, with a dimension of n v ; y represents the output vector of the controlled object, with a dimension of n y , k represents the time; A, B u , B v , C, D u , D v is a system matrix with known real constant coefficients.
[0073] After the state space model and the predicted output model of the controlled object are determined, the state space model and the predicted output model can be used to perform predictive control on the controlled object.
[0074] According to the technical solution provided in the embodiment of the present application, by acquiring the input and output historical data of the controlled object, a benchmark transfer function model matrix of the controlled object is constructed, and the input and output quantities are determined based on the input and output constraints of the controlled object, and the input and output quantities are used to construct a benchmark gain multiplier matrix, and the real-time transfer function model matrix is constructed using the benchmark transfer function model matrix and the benchmark gain multiplier matrix, and the state space model and predicted output model of the controlled object are determined based on the real-time transfer function model matrix. Finally, the controlled object is controlled using the state space model and the predicted output model, thereby achieving the effect of constraints on the input and output quantities of the controlled object created by using an easy-to-understand and easy-to-control transfer function model, and predictive control is performed using a high-precision state space model and predicted output model at the same time, and time-varying predictive control is conveniently and intuitively realized while ensuring the accuracy of predictive control, thereby improving user experience.
[0075] Figure 3 is a flow chart of another predictive control method based on a time-varying model provided in an embodiment of the present application. Figure 3 Steps S301 to S304 in the embodiment shown are Figure 2 Steps S201 to S204 in the illustrated embodiment are substantially the same and will not be described in detail herein. Figure 3 As shown, the method also includes the following steps:
[0076] In step S305, the operating condition information and disturbance information of the controlled object are periodically obtained.
[0077] In step S306, in response to determining that the input and output constraints of the controlled object are updated based on the operating condition information and the disturbance information, an updated gain multiplier matrix is determined.
[0078] In step S307, an updated real-time transfer function model matrix is determined based on the updated gain multiplier matrix.
[0079] In step S308, an updated state space model and a predicted output model of the controlled object are determined based on the updated real-time transfer function model matrix, and predictive control is performed on the controlled object based on the updated state space model and the predicted output model.
[0080] In some embodiments of the present application, after the state space model and predicted output model of the controlled object are determined based on the real-time transfer function model matrix, the operating condition information and disturbance information of the controlled object can also be periodically obtained to determine whether the input and output constraints of the controlled object have changed.
[0081] After determining that the input and output constraints of the controlled object are updated, the updated gain multiplier matrix can be determined, and the updated real-time transfer function model matrix can be determined based on the updated gain multiplier matrix. Further, the updated state space model and predicted output model of the controlled object can be determined based on the updated real-time transfer function model matrix, and the controlled object can be predictively controlled based on the updated state space model and predicted output model.
[0082] In this way, the changes in the operating condition information and disturbance information of the controlled object can be obtained through the transfer function model. The transfer function model usually uses standard first-order, second-order, and integral models to characterize the relationship between input and output. For control engineers, it is possible to express the changes in the operating condition information and disturbance information of the controlled object in a more understandable way, and then convert the changes into a state space model and a predicted output model to achieve high-precision control.
[0083] Figure 4 FIG. 1 is a flow chart of a method for determining an updated gain multiplier matrix provided in an embodiment of the present application. Figure 4 As shown, the method comprises the following steps:
[0084] In step S401, it is determined whether a constraint condition of a target input quantity to a target output quantity in a controlled object changes based on operating condition information and disturbance information.
[0085] The target output is any output of the controlled object, and the target input is any input of the controlled object.
[0086] In step S402, if yes, the gain increment of the target input quantity to the target output quantity is calculated based on the changed constraint condition.
[0087] In step S403, the gain multiplier matrix is updated using the calculated gain increment to obtain an updated gain multiplier matrix.
[0088] In some embodiments of the present application, if it is determined based on the operating condition information and the disturbance information that the constraint conditions of the target input quantity to the target output quantity in the controlled object have changed, the gain increment of the target input quantity to the target output quantity can be calculated based on the changed constraint conditions, and the calculated gain increment can be used to update the gain multiplier matrix to obtain an updated gain multiplier matrix.
[0089] The calculation of the gain increment of the target input quantity to the target output quantity based on the changed constraint condition may be that, in a preset gain multiplier change flag matrix, the matrix element corresponding to the gain multiplier change flag of the target input quantity to the target output quantity is set to a first value, and the initial value of each element in the preset gain multiplier change flag matrix is a second value. The first value and the second value are different values. In one example, the first value may be 1 and the second value may be 0.
[0090] That is, a gain multiplier change flag matrix can be preset, and the initial value of each element in the gain multiplier change flag matrix is set to the second value. Furthermore, each element in the gain multiplier change flag matrix corresponds to each element in the gain multiplier matrix.
[0091] For example, if the gain multiplier change flag matrix is recorded as Gflag, Then f ij Indicates whether the gain multiplier of the jth input to the ith output has changed. In an example, when f ij When the value of is the first value, it means that the gain multiplier of the j-th input quantity to the i-th output quantity has changed; when f ij When the value of is the second value, it means that the gain multiplier of the j-th input quantity to the i-th output quantity has not changed.
[0092] Whether to update the transfer function model matrix can be determined by monitoring the gain multiplier change flag matrix. For example, the values of each element in the gain multiplier change flag matrix can be periodically detected. If the detection determines that at least one matrix element of the first value is included, indicating that a gain multiplier has changed, an updated gain multiplier matrix can be obtained, and an updated transfer function model matrix can be determined based on the updated gain multiplier matrix.
[0093] On the other hand, if it is determined based on the operating condition information and the disturbance information that the constraint conditions of the target input quantity on the target output quantity in the controlled object have not changed, the state space model and the predicted output model determined by the current gain multiplier matrix continue to be used to perform predictive control on the controlled object.
[0094] Figure 5 1 is a flow chart of a method for calculating the gain increment of the target input quantity to the target output quantity based on the changed constraint conditions provided in an embodiment of the present application. Figure 5 As shown, the method comprises the following steps:
[0095] In step S501, an updated gain of the target input quantity to the target output quantity is calculated based on the changed constraint condition.
[0096] In step S502, a reference gain corresponding to the gain of the target input quantity to the target output quantity in the reference gain multiplier matrix is obtained.
[0097] In step S503, the quotient of the updated gain and the reference gain is determined as the gain increment.
[0098] In some embodiments of the present application, when calculating the gain increment, the updated gain of the target input to the target output can be calculated based on the changed constraints, and then the reference gain corresponding to the gain of the target input to the target output in the reference gain multiplier matrix is obtained, and finally the quotient of the updated gain and the reference gain is determined as the gain increment.
[0099] In some implementations, the gain multiplier matrix may be updated based on the determined gain increment. If the updated gain multiplier matrix is Among them, part K ij The value of ' can be K ij The value of is the same, but at least one K ij The value of ' is related to K ij The values of are different.
[0100] In some embodiments of the present application, the gain of the same input quantity to the output quantity corresponds to the same matrix element in the reference transfer function model matrix and the gain multiplier matrix. Further, determining the updated real-time transfer function model matrix based on the updated gain multiplier matrix may be to multiply the updated gain multiplier matrix with the element at the same position in the current real-time transfer function model matrix to obtain the updated real-time transfer function model matrix.
[0101] That is, the updated real-time transfer function model matrix obtained using the updated gain multiplier matrix can be
[0102] Figure 6 1 is a flow chart of a method for predictive control of a controlled object based on a state space model and a predictive output model provided in an embodiment of the present application. Figure 6 As shown, the method comprises the following steps:
[0103] In step S601 , predicted input data of the controlled object is determined based on the state space module and the predicted output model.
[0104] In step S602, predictive control is performed on the controlled object using the predicted input data.
[0105] In some embodiments of the present application, predictive control of a controlled object based on a state-space model and a predictive output model may be performed by determining predicted input data of the controlled object based on the state-space module and the predictive output model, and then predictively controlling the controlled object using the predicted input data.
[0106] Figure 7 FIG. 1 is a flow chart of another predictive control method based on a time-varying model provided in an embodiment of the present application. Figure 7 As shown, after the state space model and the predicted output model of the controlled object have been constructed, it is possible to periodically detect whether the gain multiplier has changed. If so, the dynamic gain multiplier matrix, that is, the updated gain multiplier matrix, is obtained, and the dynamic gain multiplier matrix is used to construct a new transfer function object based on the original transfer function. Then, the state space model is converted using the new transfer function object, and the state space model is updated after the conversion is successful. If the gain multiplier has not changed, or the state space model conversion is unsuccessful, the state space model is not updated.
[0107] That is to say, the technical solution provided by the embodiment of the present application, by constructing a reference transfer function matrix model, a model gain multiplier matrix and a model gain multiplier change flag matrix, during the MPC control algorithm execution cycle, if the gain multiplier change flag is detected to be the first value, it triggers the construction of a new transfer function model based on the new gain multiplier and the reference transfer function model, and then calls the transfer function to state space model method to construct a new state space model object. Finally, the robust model predictive control method based on the state space model is called to perform the optimal solution.
[0108] The technical solution provided by the embodiment of the present application combines the front-end transfer function model and the back-end state space model, and can integrate the advantages of the two models. Among them, the front-end uses the transfer function to realize the time-varying model, which is conducive to the understanding of engineers, and the engineering logic is easy to implement. It only needs to modify the gain multiplier based on different production conditions to realize the time-varying model parameters.
[0109] On the other hand, in the background execution logic, the gain multiplier change flag is used to trigger the new model construction and perform model conversion, which reduces the algorithm execution consumption. At the same time, the background solution adopts the model prediction solution based on the state space model, which can take advantage of the predictive control based on the state space model to achieve the optimal rolling optimization solution.
[0110] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0111] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0112] Figure 8 It is a schematic diagram of a predictive control device based on a time-varying model provided in an embodiment of the present application.
[0113] like Figure 8 As shown, the device comprises:
[0114] The construction module 801 is configured to obtain input and output history data of the controlled object, and construct a reference transfer function model matrix of the controlled object based on the input and output history data.
[0115] The acquisition module 802 is configured to obtain the input and output constraints of the controlled object, determine the input and output gain quantity of the controlled object based on the input and output constraints, and use the input and output gain quantity to construct a reference gain multiplier matrix, wherein the number of matrix elements in the reference gain multiplier matrix is the same as the input and output gain quantity of the controlled object, and the value of each element in the reference gain multiplier matrix is 1.
[0116] The determination module 803 is configured to construct a real-time transfer function model matrix based on the reference transfer function and the gain multiplier matrix, and determine the state space model and the predicted output model of the controlled object based on the real-time transfer function model matrix.
[0117] The prediction module 804 is configured to perform predictive control on the controlled object based on the state space model and the prediction output model.
[0118] According to the technical solution provided in the embodiment of the present application, by acquiring the input and output historical data of the controlled object, a benchmark transfer function model matrix of the controlled object is constructed, and the input and output quantities are determined based on the input and output constraints of the controlled object, and the input and output quantities are used to construct a benchmark gain multiplier matrix, and the real-time transfer function model matrix is constructed using the benchmark transfer function model matrix and the benchmark gain multiplier matrix, and the state space model and predicted output model of the controlled object are determined based on the real-time transfer function model matrix. Finally, the controlled object is controlled using the state space model and the predicted output model, thereby achieving the effect of constraints on the input and output quantities of the controlled object created by using an easy-to-understand and easy-to-control transfer function model, and predictive control is performed using a high-precision state space model and predicted output model at the same time, and time-varying predictive control is conveniently and intuitively realized while ensuring the accuracy of predictive control, thereby improving user experience.
[0119] In some embodiments, after determining the state-space model and predicted output model of the controlled object, it also includes: periodically acquiring the operating condition information and disturbance information of the controlled object; in response to determining the update of the input-output constraint conditions of the controlled object based on the operating condition information and the disturbance information, determining an updated gain multiplier matrix; determining an updated real-time transfer function model matrix based on the updated gain multiplier matrix; determining an updated state-space model and predicted output model of the controlled object based on the updated real-time transfer function model matrix, and performing predictive control on the controlled object based on the updated state-space model and predicted output model.
[0120] In some embodiments, in response to determining that the input and output constraints of the controlled object are updated based on the operating condition information and the disturbance information, an updated gain multiplier matrix is determined, including: determining whether the constraints of the target input quantity to the target output quantity in the controlled object have changed based on the operating condition information and the disturbance information, the target output quantity is any output quantity of the controlled object, and the target input quantity is any input quantity of the controlled object; if so, calculating the gain increment of the target input quantity to the target output quantity based on the changed constraints; and updating the gain multiplier matrix using the calculated gain increment to obtain an updated gain multiplier matrix.
[0121] In some embodiments, the gain increment of the target input quantity to the target output quantity is calculated based on the changed constraint conditions, including: calculating the updated gain of the target input quantity to the target output quantity based on the changed constraint conditions; obtaining the reference gain of the gain of the target input quantity to the target output quantity corresponding to the reference gain multiplier matrix; and determining the quotient of the updated gain and the reference gain as the gain increment.
[0122] In some embodiments, after calculating the gain increment of the target input quantity to the target output quantity based on the changed constraint conditions, it also includes: in a preset gain multiplier change flag matrix, setting the matrix element corresponding to the gain multiplier change flag of the target input quantity to the target output quantity to a first value, and the initial value of each element in the preset gain multiplier change flag matrix is a second value; determining an updated real-time transfer function model matrix based on the updated gain multiplier matrix, including: in response to determining that the matrix element in the gain multiplier change flag matrix includes the first value, obtaining an updated gain multiplier matrix, and determining an updated real-time transfer function model matrix based on the updated gain multiplier matrix.
[0123] In some implementations, the gain of the same input quantity to the output quantity corresponds to the same matrix element in the reference transfer function model matrix and the gain multiplier matrix; the step of determining the updated real-time transfer function model matrix based on the updated gain multiplier matrix is to multiply the updated gain multiplier matrix with the element at the same position in the current real-time transfer function model matrix to obtain the updated real-time transfer function model matrix.
[0124] In some implementations, predictive control is performed on a controlled object based on a state-space model and a predictive output model, including: determining predicted input data of the controlled object based on the state-space model and the predictive output model; and predictive control is performed on the controlled object using the predicted input data.
[0125] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0126] Fig. 9 Schematic diagram of an electronic device provided in an embodiment of the present application. Fig. 9 As shown, the electronic device 9 of this embodiment includes: a processor 901, a memory 902, and a computer program 903 stored in the memory 902 and executable on the processor 901. When the processor 901 executes the computer program 903, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 901 executes the computer program 903, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0127] The electronic device 9 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 9 may include, but is not limited to, a processor 901 and a memory 902. Those skilled in the art will appreciate that Fig. 9 The electronic device 9 is merely an example and does not limit the electronic device 9 , and may include more or less components than those shown in the figure, or different components.
[0128] The processor 901 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0129] The memory 902 may be an internal storage unit of the electronic device 9, for example, a hard disk or memory of the electronic device 9. The memory 902 may also be an external storage device of the electronic device 9, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 9. The memory 902 may also include both an internal storage unit of the electronic device 9 and an external storage device. The memory 902 is used to store computer programs and other programs and data required by the electronic device.
[0130] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0131] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0132] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A predictive control method based on a time-varying model, characterized in that: include: S201, acquiring input and output history data of a controlled object, and constructing a reference transfer function model matrix of the controlled object based on the input and output history data; S202, obtaining input and output constraints of the controlled object, determining the number of input and output gains of the controlled object based on the input and output constraints, and constructing a reference gain multiplier matrix using the number of input and output gains, wherein the number of matrix elements in the reference gain multiplier matrix is the same as the number of input and output gains of the controlled object, and the value of each element in the reference gain multiplier matrix is 1; S203, constructing a real-time transfer function model matrix based on the reference transfer function model matrix and the gain multiplier matrix, and determining a state space model and a predicted output model of the controlled object based on the real-time transfer function model matrix; S204: Perform predictive control on the controlled object based on the state space model and the predictive output model.
2. The method according to claim 1, characterized in that After determining the state space model and the predicted output model of the controlled object, the method further includes: Periodically obtain the operating condition information and disturbance information of the controlled object; In response to determining an update of input-output constraints of the controlled object based on the operating condition information and the disturbance information, determining an updated gain multiplier matrix; Determining an updated real-time transfer function model matrix based on the updated gain multiplier matrix; An updated state space model and a predicted output model of the controlled object are determined based on the updated real-time transfer function model matrix, and predictive control is performed on the controlled object based on the updated state space model and the predicted output model.
3. The method according to claim 2, characterized in that The step of determining, in response to updating the input-output constraint condition of the controlled object based on the operating condition information and the disturbance information, determining an updated gain multiplier matrix comprises: Determining whether a constraint condition of a target input quantity on a target output quantity in the controlled object changes based on the operating condition information and the disturbance information, wherein the target output quantity is any output quantity of the controlled object, and the target input quantity is any input quantity of the controlled object; If yes, then the gain increment of the target input to the target output is calculated based on the changed constraint conditions; The gain multiplier matrix is updated using the calculated gain increment to obtain an updated gain multiplier matrix.
4. The method according to claim 3, characterized in that: The step of calculating the gain increment of the target input quantity to the target output quantity based on the changed constraint condition comprises: Calculate the updated gain of the target input to the target output based on the changed constraint conditions; Obtaining a reference gain corresponding to the gain of the target input quantity to the target output quantity in the reference gain multiplier matrix; The quotient of the updated gain and the reference gain is determined as the gain increment.
5. The method according to claim 3, characterized in that: After calculating the gain increment of the target input quantity to the target output quantity based on the changed constraint condition, the method further includes: In a preset gain multiplier change flag matrix, a matrix element corresponding to a gain multiplier change flag of the target input to the target output is set to a first value, and an initial value of each element in the preset gain multiplier change flag matrix is a second value; The step of determining an updated real-time transfer function model matrix based on the updated gain multiplier matrix comprises: In response to determining that the gain multiplier change flag matrix includes a matrix element of a first value, an updated gain multiplier matrix is obtained, and an updated real-time transfer function model matrix is determined based on the updated gain multiplier matrix.
6. The method according to claim 5, characterized in that The gain of the same input quantity to the output quantity corresponds to the same matrix element in the reference transfer function model matrix and the gain multiplier matrix; The step of determining an updated real-time transfer function model matrix based on the updated gain multiplier matrix is to multiply the updated gain multiplier matrix with the elements at the same position in the current real-time transfer function model matrix to obtain an updated real-time transfer function model matrix.
7. The method according to any one of claims 1 to 6, characterized in that The predictive control of the controlled object based on the state space model and the predictive output model includes: Determining predicted input data of the controlled object based on the state-space model and the predicted output model; The predicted input data is used to perform predictive control on the controlled object.
8. A predictive control device based on a time-varying model, characterized in that: include: A construction module is configured to obtain input and output history data of a controlled object, and construct a reference transfer function model matrix of the controlled object based on the input and output history data; an acquisition module, configured to acquire input and output constraints of the controlled object, determine the number of input and output gains of the controlled object based on the input and output constraints, and construct a reference gain multiplier matrix using the number of input and output gains, wherein the number of matrix elements in the reference gain multiplier matrix is the same as the number of input and output gains of the controlled object, and the value of each element in the reference gain multiplier matrix is 1; A determination module, configured to construct a real-time transfer function model matrix based on the reference transfer function and the gain multiplier matrix, and determine a state space model and a predicted output model of a controlled object based on the real-time transfer function model matrix; The prediction module is configured to perform predictive control on the controlled object based on the state space model and the prediction output model.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.