Data-driven model predictive control method for irrigation system based on Koopman operator
The Koopman operator is used to increase the dimension of the irrigation system to a high-dimensional linear space, establish a global linearization model, and combine it with model predictive control to solve the problem that the Saint-Venant equations cannot be directly controlled, and realize high-precision automatic control of the irrigation system. Model accuracy is improved.
Patent Information
- Application Number
- CN202210357866.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-07
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2042-04-07
AI Technical Summary
The dynamic model of the irrigation system is described by the Saint-Venant equations, which cannot obtain an analytical solution, resulting in low control accuracy. The existing simplified model loses system accuracy, limiting the development of automated control of the irrigation system.
The Koopman operator is used to upgrade the nonlinear irrigation system to a high-dimensional linear space. Through data-driven modeling, a high-dimensional global linearization model is established. Combined with model predictive control, a Koopman model predictive controller is designed to achieve automated control.
It achieves high-precision automatic control of the irrigation system, reduces the computational complexity, improves the generalization ability of the model, and avoids the decrease in control accuracy over time.
Smart Images

Figure CN114779634B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of irrigation system control, and in particular to an irrigation system data-driven model predictive control method based on a Koopman operator. Background Art
[0002] The irrigation system is a typical open channel system, and its dynamic model can be described by a set of nonlinear partial differential equations, also known as the Saint-Venant equations. Since it is impossible to obtain an analytical solution, this model cannot be used to directly solve the control problem. At present, the control of most irrigation systems is based on the simplified model of the Saint-Venant equations. The simplified model often loses the model precision of the system and lacks accuracy, which limits the development of automatic control of irrigation systems.
[0003] It should be noted that the above introduction to the technical background is only for the convenience of providing a clear and complete description of the technical solutions of the present application and for the convenience of understanding by those skilled in the art. It cannot be considered that the above technical solutions are well known to those skilled in the art simply because these solutions are described in the background technology section of the present application. Summary of the invention
[0004] The purpose of the present invention is to provide a data-driven model predictive control method for an irrigation system to solve the data-driven modeling and control problems of the irrigation system without having to deal with the Saint-Venant equations of the dynamic model of the irrigation system. The Koopman operator is used to upgrade the nonlinear system to a high-dimensional linear space, and the system is identified as a characteristic of a high-dimensional global linearization model to obtain a high-dimensional linear representation of the irrigation system. The method is combined with a model predictive control method to realize automatic control of the irrigation system.
[0005] In order to achieve the above object, the present invention provides a data-driven model predictive control method for an irrigation system based on a Koopman operator, comprising the following steps:
[0006] S1, describes the single-channel irrigation system based on the Saint-Venant equations, and performs data sampling after discretizing the equations;
[0007] S2, data dimension is increased, and the Koopman operator is approximated by the extended dynamic mode decomposition method to solve the Koopman model of the irrigation system;
[0008] S3, establish a global linear state space model of the irrigation system in ascending dimensional space;
[0009] S4, design the Koopman model predictive controller to obtain the optimal control sequence for each step in the closed loop and act on the irrigation system to automatically control the irrigation system gates and quickly track the target water level.
[0010] Furthermore, in S1, the irrigation system dynamics model can be described by the Saint-Venant equations:
[0011]
[0012]
[0013] Among them A c is the cross-sectional area of the flow path, Q c and H c is the flow rate and liquid level, t is the time, l is the distance of the section from the reference origin, g is the gravitational acceleration, S f and S b They are channel slope and hydraulic gradient respectively.
[0014] Furthermore, the Saint-Venant equations are discretized and M points are taken in the irrigation system channel. A set of random gate control input data U is given to act on the system, where U = [u1,u2,…,u N ], calculate the water level and flow rate of M sampling points in N time steps, and the water level and flow rate data of the M sampling points in the first N-1 time steps are recorded as X, X = [x1, x2, ..., x N-1 ],in The data from the 2nd to Nth time step is recorded as Y, Y=[x2,x3,…,x N ].
[0015] Furthermore, S2 specifically includes the following sub-steps:
[0016] S21: Select the dimension-raising function
[0017] S22: Use the dimension-raising function to raise the data X and Y to high-dimensional space, and get X lift , Y lift , where X lift =Ψ(X),Y lift =Ψ(Y);
[0018] S23: Use the least squares method to find the coefficient matrices A, B, and C of the high-dimensional state space through the dimension-upgraded data:
[0019] min A,B ||Y lift -AX lift -BU|| F (3)
[0020] min C ||X-CX lift || F (4)
[0021] Alternatively, by solving
[0022]
[0023] , superscript represents the matrix pseudo-inverse, and C can be calculated by formula (6):
[0024]
[0025] Furthermore, in step S3, the global linear state space model of the irrigation system in the increased dimensional space is calculated by equations (7) and (8):
[0026] z(k+1)=Az(k)+Bu(k) (7)
[0027] y(k)=Cz(k) (8)
[0028] In the above formula, z(k)=Ψ(X k ), which is a state of increased dimension.
[0029] Furthermore, in S4, it is assumed that the input of the irrigation system changes R steps from time k, and the system output is predicted at the next P time points, and the prediction equation of the system can be derived:
[0030] Y(k)=Tz(k)+SU(k) (9)
[0031] in
[0032]
[0033]
[0034]
[0035] The expected output value in the prediction time domain is Y r =[y r (k+1)…y r (k+P)] T , F, G are weight matrices of appropriate dimensions, so the irrigation system model predictive control problem can be written in the form of performance indicators, namely:
[0036]
[0037] By solving equation (10), the optimal control sequence for each step in the closed loop is obtained.
[0038] The above scheme of the present invention has the following beneficial effects:
[0039] The Koopman model of the irrigation system provided by the present invention is a model established based on the data drive of the irrigation system. It only needs to collect the water level and flow data of the irrigation system to complete the modeling. The model is a global linearization model, which has higher accuracy than the local linearization simplified model, low computational complexity and strong generalization ability. The Koopman model predictive controller designed by this method will not reduce the control accuracy over time.
[0040] Other beneficial effects of the present invention will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a structural diagram of a single-channel irrigation system of the present invention. DETAILED DESCRIPTION
[0042] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0043] For simplicity of explanation, the method or rule is depicted or described as a series of operations, and its purpose is neither to exhaustively list the experimental operations nor to limit the order of the experimental operations. For example, the experimental operations can be performed in various orders and / or simultaneously, and include other experimental operations that are not described again. In addition, the steps described are not all necessary for the methods and algorithms described herein. Those skilled in the art will recognize and understand that these methods and algorithms can be represented as a series of unrelated states through state diagrams or projects.
[0044] For irrigation systems, their structure can be as follows Figure 1 As shown in the figure, it consists of a channel and a gate. The opening of the gate determines the water flow at the channel gate, thus affecting the water level of the channel. u is the upstream water level, H d is the downstream water level, q i is the water flow rate at point i, h i is the water level at point i. The dynamic model of the irrigation system can be described by the Saint-Venant equations:
[0045]
[0046]
[0047] Among them Ac is the cross-sectional area of the flow path, Q c and H c is the flow rate and liquid level, t is the time, l is the distance of the section from the reference origin, g is the gravitational acceleration, S f and S b They are channel slope and hydraulic gradient respectively.
[0048] The Saint-Venant equations cannot be solved analytically, so control strategies cannot be added. Simplifying the dynamic model will lose accuracy, affect the control effect, and even lead to the failure of the control task.
[0049] In order to overcome the shortcomings of the above problems, an embodiment of the present invention proposes a data-driven model predictive control method for an irrigation system based on the Koopman operator theory. The method upgrades the nonlinear system to a high-dimensional linear space based on the Koopman operator, identifies the system as a high-dimensional linear model in the space, obtains a high-dimensional linear representation of the irrigation system, and combines the model predictive control to realize automatic control of the water level of the irrigation system.
[0050] Specifically, the method comprises the following steps:
[0051] S1, data collection:
[0052] The single-channel irrigation system is described by the Saint-Venant equations. After the equations are discretized, M points are taken in the irrigation system channel. A set of random gate control input data U is given to act on the system, where U = [u1, u2, …, u N ], calculate the water level and flow rate of M sampling points in N time steps, and the water level and flow rate data of the M sampling points in the first N-1 time steps are recorded as X, X = [x1, x2, ..., x N-1 ],in The data from the 2nd to Nth time step is recorded as Y, Y=[x2,x3,…,x N ].
[0053] S2, data dimension upgrade:
[0054] The Koopman operator is an infinite-dimensional linear operator, but its infinite dimension cannot be directly obtained, so the extended dynamic mode decomposition method is chosen to approximate the Koopman operator. Based on the data collected by S1, the extended dynamic mode decomposition method is used to solve the Koopman model of the irrigation system. The specific sub-steps are as follows:
[0055] S21: Manually select a suitable dimension-raising function Among them, the dimension-raising function usually uses a series of scalar value functions to measure the system state, and observes the evolution of the system through measurement. Manual selection is mainly aimed at different system characteristics, and the observation function of each nonlinear system is different.
[0056] S22: Use the dimension-raising function to raise the data X and Y to high-dimensional space, and get X lift , Y lift , where X lift =Ψ(X),Y lift =Ψ(Y).
[0057] S23: Use the least squares method to find the coefficient matrices A, B, and C of the high-dimensional state space through the dimension-upgraded data:
[0058] min A,B ||Y lift -AX lift -BU|| F (3)
[0059] min C ||X-CX lift || F (4)
[0060] Alternatively, by solving
[0061]
[0062] , superscript represents the matrix pseudo-inverse, C can be calculated as follows:
[0063]
[0064] S3, build the state space model:
[0065] Based on the A, B, and C matrices obtained in step 2, the state space model of the irrigation system is obtained:
[0066] z(k+1)=Az(k)+Bu(k) (7)
[0067] y(k)=Cz(k) (8)
[0068] In the above formula, z(k)=Ψ(X k ), which is a dimensional state. Equations (7) and (8) are the global linear state space models of the irrigation system in the dimensional space.
[0069] S4, Model Predictive Control:
[0070] The global linear state space model obtained by S3 is used to design a Koopman model predictive controller. Assuming that the input of the irrigation system changes in R steps from time k, the system output is predicted at the next P moments, and the prediction equation of the system can be derived:
[0071] Y(k)=Tz(k)+SU(k) (9)
[0072] in
[0073]
[0074]
[0075]
[0076] The expected output value in the prediction time domain is Y r =[y r (k+1)…y r (k+P)] T , F, G are weight matrices of appropriate dimensions, so the irrigation system model predictive control problem can be written in the form of performance indicators, namely:
[0077]
[0078] By solving equation (10), we can obtain the optimal control sequence for each step in the closed loop. Applying it to the irrigation system can achieve the effect of automatically controlling the irrigation system gate to quickly track the target water level.
[0079] The Koopman model of the irrigation system proposed in the above embodiment is a model established based on the data drive of the irrigation system. It only needs to collect the water level and flow data of the irrigation system to complete the modeling. This model is a global linearization model, which is more accurate than the local linearization simplified model, has low computational complexity and strong generalization ability. The Koopman model predictive controller designed by this method will not reduce the control accuracy over time.
[0080] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A data-driven model predictive control method for an irrigation system based on the Koopman operator, characterized in that: The steps include: S1, describes the single-channel irrigation system based on the Saint-Venant equations, and performs data sampling after discretizing the equations; S2, data dimension is increased, and the Koopman operator is approximated by the extended dynamic mode decomposition method to solve the Koopman model of the irrigation system; S3, establish a global linear state space model of the irrigation system in ascending dimensional space; S4, design the Koopman model predictive controller to obtain the optimal control sequence for each step in the closed loop and act on the irrigation system to automatically control the irrigation system gate and quickly track the target water level; In S1, the irrigation system dynamics model can be described by the Saint-Venant equations: Among them A c is the cross-sectional area of the flow path, Q c and H c is the flow rate and liquid level, t is the time, l is the distance of the section from the reference origin, g is the gravitational acceleration, S f and S b are channel slope and hydraulic slope respectively; After discretizing the Saint-Venant equations, we select M points in the irrigation system channel and give a set of random gate control input data U to act on the system, where U = [u1, u2, ..., u N ], the water level and flow rate of M sampling points in N time steps are calculated, and the water level and flow rate data of the M sampling points in the first N-1 time steps are recorded as X, X = [x1, x2, ..., x N-1 ],in The data from the 2nd to Nth time steps are recorded as Y, Y = [x2, x3, ..., x N ]; S2 specifically includes the following sub-steps: S21: Select the dimension-raising function S22: Use the dimension-raising function to raise the data X and Y to high-dimensional space, and get X lift , Y lift , where X lift =Ψ(X),Y lift =Ψ(Y); S23: Use the least squares method to find the coefficient matrix A, BC of the high-dimensional state space through the data after dimensionality increase: Alternatively, by solving , Superscript represents the matrix pseudo-inverse, C can be calculated by formula (6): In step S3, the global linear state space model of the irrigation system in the ascending dimensional space is calculated by equations (7) and (8): z(k+1)=Az(k)+Bu(k) (7) y(k)=Cz(k) (8) In the above formula, z(k)=Ψ(X k ), which is the state of ascending dimension; In S4, it is assumed that the input of the irrigation system changes R steps from time k, and the system output is predicted at the next P time points. The prediction equation of the system can be derived: Y(k)=Tz(k)+SU(k) (9) in The expected output value in the prediction time domain is Y r =[y r (k+1)…y r (k+P)] T , F, G are weight matrices of appropriate dimensions, so the irrigation system model predictive control problem can be written in the form of performance indicators, namely: By solving equation (10), the optimal control sequence for each step in the closed loop is obtained.
