A runoff prediction method based on chaos theory and quantum neural network
By combining complete overall empirical mode decomposition and chaos theory, using Lyapunov exponent and quantum neural network, the problem of insufficient accuracy of existing runoff prediction methods in complex nonlinear systems is solved, and fast and accurate runoff prediction results are achieved. .
Patent Information
- Application Number
- CN202311528676.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2043-11-16
AI Technical Summary
Existing runoff prediction methods have insufficient accuracy when dealing with complex nonlinear systems. Especially when watershed data are incomplete or inaccurate, process-driven models are difficult to predict accurately, and data-driven models fail to effectively consider the physical mechanisms of hydrological processes. .
Combining the complete overall empirical mode decomposition and chaos theory, the delay vector and phase space trajectory are constructed by decomposing the runoff sequence, using the Lyapunov index to determine the predictability, and using the quantum neural network for medium and long-term runoff prediction, reconstructing the runoff components to Improve prediction accuracy.
It achieves fast and accurate prediction results in complex nonlinear runoff systems, overcomes the problems of insufficient accuracy and failure to consider physical mechanisms of traditional methods when data are insufficient, and improves the reliability and accuracy of predictions.
Smart Images

Figure CN117521903B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of runoff prediction, in particular to a runoff prediction method based on chaos theory and quantum neural network. Background Art
[0002] Runoff prediction is an important part of water resources planning and management. The runoff prediction of a river basin can provide a reference for the comprehensive utilization of water resources, flood control and drought relief, and power station operation and management. Due to the influence of complex factors such as the hydrological and meteorological characteristics of the river basin, the characteristics of the river basin's underlying surface, and human activities, the river basin runoff is a complex nonlinear system. There are many methods for runoff prediction, which can be roughly summarized into two categories: process-driven models and data-driven models. The process-driven model has high requirements for the completeness of the basin data. When the basin data is incomplete or inaccurate, the process-driven model is difficult to make accurate predictions. The data-driven model basically does not consider the physical mechanism of the hydrological process, and establishes the optimal mathematical relationship between input and output data. It is widely used in basins with incomplete data.
[0003] In June 2010, the 38th issue of the Journal of Northwest Agriculture and Forestry University (Natural Science Edition) published an article by Wang Yimin and Zhang Jue entitled "Runoff Prediction Model Based on Chaotic Neural Network", which reveals the variation law of runoff time series and makes predictions, providing guidance for reservoir operation. In view of the nonlinear characteristics of runoff time series, the structure of the neural network is determined by the embedding digit of the reconstructed phase space, and a BP network model for runoff prediction based on chaotic phase space reconstruction is established. The model is used to predict the runoff time series of Shiquan Hydrological Station located on the Hanjiang River in Shaanxi Province. The example calculation shows that the time series of the monthly average flow of Shiquan Hydrological Station is chaotic, and the maximum embedding dimension is 12. The BP neural network constructed in sequence has fast convergence speed and good prediction accuracy. The number of input layer nodes of the BP neural network can be reasonably determined by using the optimal embedding dimension in the reconstructed phase space. The disadvantage of this method is that it only uses chaos theory to determine the delay time and embedding dimension of the sequence, and determines the number of nodes in the neural network input layer according to the embedding dimension, so that the selection of the number of input layer nodes has a theoretical basis compared to free selection. Its essence is still to use neural networks for time series prediction, and it does not consider the evolution of nonlinear dynamic systems.
[0004] In November 2012, the Science and Technology Innovation and Application published an article by Xing Baifeng entitled "Analysis of Runoff Prediction Method Based on Wavelet Neural Network". The article used a normalized method to process the time series hydrological samples of the measured annual net flow at a hydrological station of the Yellow River, making them training samples of the wavelet neural network to improve the generalization ability of the network, accelerate the convergence speed of the network, and then construct a wavelet network hydrological prediction model. Compared with prediction methods such as regression analysis, the results show that the wavelet network hydrological prediction method can obtain accurate prediction results. The disadvantage of this method is that it only analyzes from the perspective of time series prediction. The wavelet transform function is used in the hidden layer of the neural network to process the input layer data, which can identify the cycle of the sequence to a certain extent, and the prediction effect is improved to a certain extent, but it cannot systematically reveal the evolution trend and cycle trend of the runoff nonlinear system like chaos theory. Summary of the invention
[0005] In order to solve the above technical problems, the present invention proposes a runoff prediction method based on chaos theory and quantum neural network, which combines complete overall empirical mode decomposition with chaos theory and quantum neural network to construct a combined prediction model for medium- and long-term runoff prediction.
[0006] The purpose of the present invention is to provide a runoff prediction method based on chaos theory and quantum neural network, which includes collecting runoff data in a watershed and preprocessing the runoff data, and also includes the following steps:
[0007] Step 1: Decompose the runoff series using complete overall empirical mode decomposition;
[0008] Step 2: Convert each runoff component sequence into a delay vector and construct a delay matrix;
[0009] Step 3: constructing a phase space trajectory from the delay vector, using the Lyapunov exponent to determine the predictability of each runoff component, and using the maximum Lyapunov exponent to determine the maximum predictable time of each runoff component;
[0010] Step 4: Based on chaos theory, quantum neural network is used to predict each runoff component; Step 5: Repeat steps 2 to 4 until all runoff components are predicted and the runoff components are reconstructed.
[0011] Preferably, the pretreatment comprises the following sub-steps:
[0012] Step 01: Processing abnormal values and null values in the collected runoff data;
[0013] Step 02: Arrange the runoff data after preliminary processing according to the runoff prediction time scale, and standardize the data obtained by the sorting. The formula is:
[0014]
[0015] Where Q(t) is the standardized data of runoff at time t, t = 1, 2, ..., n, n is the length of the runoff sequence, q(t) is the runoff data at time t, is the mean of runoff data, σ is the standard deviation of runoff data;
[0016] Step 03: According to the length of the time series, the entire period is divided into the rate period and the test period.
[0017] In any of the above schemes, preferably, step 1 includes the following sub-steps:
[0018] Step 11: Add several groups of white noise with opposite positive and negative values to the sequence Q(t). and Get a new sequence and The formula is
[0019]
[0020] in, and is the i-th group of new sequences, I is the number of random sequence groups;
[0021] Step 12: Perform empirical mode decomposition on the series of sequences;
[0022] Step 13: Calculate the ensemble mean of each intrinsic mode function IMF and residual term res. The formula of the residual term res is shown as
[0023]
[0024] in, It represents the jth IMF after the empirical mode decomposition of the i-th group of positive random sequences. It represents the residual term res after the empirical mode decomposition of the positive random sequence added to the i-th group, It represents the jth IMF after the i-th group is added to the negative random sequence using the empirical mode decomposition. It represents the residual term after the empirical mode decomposition of the i-th group of negative random sequences, and J is the total number of IMFs after the empirical mode decomposition;
[0025] Step 14: Get the final modal decomposition result, the formula is
[0026]
[0027]
[0028] Among them, IMFj (t) represents the jth IMF after the complete overall empirical mode decomposition of the original sequence, and res(t) represents the residual term after the complete overall empirical mode decomposition of the original sequence.
[0029] In any of the above solutions, preferably, step 11 includes the following sub-steps:
[0030] Step 111: Find all the maximum and minimum extreme points of the sequence, use the cubic spline interpolation function to fit the upper and lower envelopes of the sequence, and find the mean of the upper and lower envelopes.
[0031]
[0032] in, Sequence The upper and lower envelopes of Sequence The upper and lower envelopes of Sequence The envelope mean of ;
[0033] Step 112: Subtract the envelope mean from the original sequence to obtain a new sequence:
[0034]
[0035] in, are the new sequences obtained respectively;
[0036] Step 113: Inspection Can it be used as an intrinsic mode function (IMF)? If it does not satisfy the condition that at any time, the upper and lower envelopes defined by the maximum value have a mean of zero, and the number of extreme points is the same as the number of zero crossing points or only differs by one, then cannot be used as an intrinsic mode function (IMF). Repeat steps 111 and 112 as the original sequence until the above conditions are met, and then define it as the first intrinsic mode function
[0037] In any of the above solutions, preferably, step 11 further comprises subtracting the first intrinsic mode function (IMF) from the original sequence to obtain a residual sequence:
[0038]
[0039] in, for The remaining sequence after subtracting the intrinsic mode functions.
[0040] In any of the above schemes, preferably, step 12 comprises: Repeat the above operation as a new original sequence until all the intrinsic mode functions are decomposed J is the number of intrinsic mode functions until the remaining sequence Until it is a single trend term, and it is defined as the residual term res i (t).
[0041] In any of the above solutions, preferably, step 2 includes using the autocorrelation method and the mutual information method to determine the value of the delay time τ, including the following sub-steps:
[0042] Step 201: Delay the sequence x(t) by different time steps k to obtain a set of delayed time series Y={x(k), x(k+1),…, x(n)}. Remove the last k data from the original sequence and record it as X={x(1), x(2),…, x(nk)}. Calculate the autocorrelation function ACF(k) and mutual information function MI(k) of the delayed sequence and the original sequence as k changes. The formula is:
[0043] ACF(k)=Corr(X,Y)
[0044] Among them, X and Y represent the processed series and delayed time series respectively, and Corr represents the correlation coefficient;
[0045] Make a graph with ACF value as ordinate and k as abscissa, find the first significant truncation point or zero crossing point, and the k value corresponding to this point is the delay time τ;
[0046] Step 202: Draw a graph with MI value as the ordinate and k as the abscissa, find the local minimum point or saturation point of the mutual information, the k value corresponding to the point is the delay time τ, and the mutual information calculation formula is:
[0047]
[0048] Among them, p(x,y) represents the probability that variables X and Y take the values x and y at the same time, and p(x) and p(y) represent the marginal probabilities of variables X and Y taking the values x and y respectively;
[0049] Step 203: Compare the values of the delay time τ determined by the methods in step 201 and step 202 to determine the final selected value of the delay time τ.
[0050] In any of the above solutions, preferably, step 2 further includes using pseudo neighbor points to determine the embedding dimension m, converting the component sequence into a delay vector and constructing a delay vector matrix, including the following sub-steps:
[0051] Step 211: Given an embedding dimension m0 (m0=2), the original sequence is converted into a delay vector according to the value of the determined delay time τ and the assumed embedding dimension m0. The formula is:
[0052] x′(t)=[x(t),x(t+τ),x(t+2τ),...,x(t+(m0-1)τ)]
[0053] Where τ is the delay time, m is the embedding dimension, and the delay vector x′(t) can be regarded as an m0-dimensional vector, t=1,2,…,M0, M0=n-(m0-1)τ;
[0054] For each vector x′(i) in the m0-dimensional phase space, i=1,2,…,M, find the vector x′(j) closest to it in the m0-dimensional phase space and calculate the Euclidean distance between them. The calculation formula is as follows:
[0055]
[0056] in, is the Euclidean distance between vectors x′(i) and x′(j);
[0057] The distance between vectors x′(i) and x′(j) in the m0+1 dimensional phase space is:
[0058]
[0059] in, is the Euclidean distance between vectors x′(i) and x′(j);
[0060] Step 212: Calculate the percentage of false neighbor points under m0, and increase m0 successively until the percentage of false neighbor points is very small or does not decrease with the increase of m0. At this time, m0 is the required embedding dimension m. If It is a false neighbor point, and its ratio is defined as:
[0061]
[0062] Among them, R(i) is the proportion of false neighbor points.
[0063] If R(i)>R0, then x′(j) is called the false neighbor point of x′(i), R0 is the threshold, usually greater than 10, and the proportion of false neighbor points under m0 is calculated. Then m0 is increased successively until the percentage of false neighbor points is very small or does not decrease with the increase of m0. At this time, m0 is the required embedding dimension m.
[0064] Step 213: constructing a delay matrix according to the determined parameters, including converting the original component sequence into a delay vector according to the determined value of the delay time τ and the embedding dimension m:
[0065] x1(t)=[x(t),x(t+τ),x(t+2τ),...,x(t+(m-1)τ)]
[0066] Where, t=1,2,…,M, M=n-(m-1)τ, M is the number of delay vectors;
[0067] The delay vector is constructed as a delay matrix, denoted as
[0068]
[0069] In any of the above schemes, preferably, step 3 includes calculating the Lyapunov exponent of the reconstructed phase space using the Wolf method, verifying the predictability and determining the maximum predictable time using the maximum Lyapunov exponent, and includes the following sub-steps:
[0070] Step 31: regard each delay vector x1(t) in the delay matrix as a phase point X(t) in the m-dimensional phase space, the number of phase points is M, M=n-(m-1)τ;
[0071] Step 32: Taking the initial phase point X(1) as the base point, select the point X(j) closest to X(1) from the remaining phase points of the point set {X(i)} as the endpoint to form an initial vector, and record the Euclidean distance between X(1) and X(j) as L(t1);
[0072] Take the time step as k, t2 = t1 + k, the initial vector evolves forward along the trajectory to obtain a new vector, the Euclidean distance between the base point and the endpoint of the new vector is recorded as L′(t1), and the system linear exponential growth rate in the corresponding time period is recorded as
[0073]
[0074] Among them, λ is the system linear exponential growth rate during this period;
[0075] Step 33: Continue calculating to all phase points and take the average of the growth rates of each exponential as the estimated value of the Lyapunov exponent. The formula is:
[0076]
[0077] This estimated value LE1(m) is the Lyapunov index of the runoff system when the delay time is τ and the embedding dimension is m. LE1(m)<0 means that the phase volume is shrinking in this direction and the motion is stable, that is, the system is predictable. LE1(m)>0 means that the system is chaotic and unpredictable.
[0078] According to the reselected delay time τ, the embedding dimension m is increased in turn, and the above steps are repeated to calculate LE1(m) until LE1(m) becomes relatively stable as m changes. The calculation result obtained at this time is the maximum Lyapunov exponent value λ1 of the runoff system at the delay time τ. According to its inverse 1 / λ1, the maximum predictable time period t of the system can be defined p .
[0079] In any of the above schemes, it is preferred that step 3 also includes using the Lyapunov exponent to determine the predictability of the runoff component. When it is determined that the runoff component is unpredictable, step 2 is repeated to reselect the delay time and the embedding dimension. When it is predictable, the maximum Lyapunov exponent is calculated to determine the maximum predictable time of the runoff component.
[0080] In any of the above schemes, preferably, step 4 includes the following sub-steps:
[0081] Step 401: According to chaos theory, a dynamic system model can be established in the reconstructed m-dimensional phase space.
[0082] X(t+Δt)=f[X(t)]
[0083] Among them, Δt is the prediction time step, and f is the functional relationship;
[0084] Step 402: According to the maximum predictable time period t p And phase space reconstruction theory, changing the delay between time steps can construct n functional relationships about X(t+T),
[0085]
[0086] Among them, Δt is the prediction time step, f is the functional relationship, n is the number of functional relationships, n=t p / Δt, f1 represents the evolution law of the system when the time step delay is Δt, f2 represents the evolution law of the system when the time step delay is 2Δt, f n Indicates that the time step delay is t p The evolution law of the time system;
[0087] Step 403: Comprehensively consider the phase point X(t+Δt) and X(t), X(t-Δt), ..., X(tt p ), using the phase points X(t), X(t-Δt), …, X(tt p ) predicts the phase point X(t+Δt),
[0088] X(t+Δt)=f1[X(t)]+f2[X(t-Δt)]+…+f n [X(tt p )].
[0089] In any of the above solutions, preferably, step 4 further includes the following sub-steps:
[0090] Step 411: When constructing a quantum neural network for prediction, firstly transform the phase point X(t+Δt) and X(t), X(t-Δt), ..., X(tt p ) is converted into a quantum state, and the Hadamard gate is used to convert the classical bit into a quantum bit with a certain probability distribution. The Hadamard gate matrix expression is as follows:
[0091]
[0092] Where H represents the Hadamard gate;
[0093] The CNOT gate is used to perform entanglement operations on quantum bits. Through entanglement, multiple quantum bits are connected to make them interdependent. The CNOT gate matrix expression is as follows:
[0094]
[0095] Among them, CNOT represents CNOT gate;
[0096] Step 412: Construct a quantum neural network. Similar to a neural network, a quantum neural network has input, hidden and output layers, connected by multiple quantum neurons.
[0097] The input data of the quantum neuron is the quantum state data. The connection weight between the input layer and the hidden layer is the rotation angle θ of the quantum rotating gate R(θ). The quantum NOT gate U(λ) with parameter λ is used to process the input data, and the probability amplitude of the ground state |1> of y is output as the final quantum state.
[0098]
[0099]
[0100]
[0101]
[0102]
[0103] Among them, |x i > is the input data x i The quantum state of and for|x i> collapses to the probability amplitude of states |0> and |1>; R is the quantum rotation gate; θ is the rotation angle; U is the quantum NOT gate; λ is the parameter that needs to be optimized for the quantum NOT gate; f(λ) is the sigmoid function; n is the number of input data;
[0104] Step 413: Complete the training of the rate-periodic quantum neural network, and use the trained quantum neural network to predict the component.
[0105] In any of the above schemes, preferably, step 5 includes optimizing the reconstruction method of each runoff component by using the least square method, and solving the reconstruction coefficient of each component by using the gradient descent method.
[0106] In any of the above solutions, preferably, the method for solving the reconstruction coefficient comprises the following sub-steps:
[0107] Step 501: After performing complete total empirical mode decomposition (CEEMD) on the runoff sequence, the intrinsic mode function, the residual term and the runoff sequence obtained after decomposition have the following relationship:
[0108]
[0109] Step 502: When the prediction results of each component are reconstructed as described above, errors will be superimposed, which may make the prediction effect poor. The least square method is used to optimize the reconstruction method. The optimized reconstruction formula is:
[0110]
[0111] Among them, Q′(t) is the reconstructed runoff sequence, IMF j ′(t) is the jth intrinsic mode function IMF j The predicted value of (t), w j For IMF j (t), J is the number of intrinsic mode functions, res′(t) is the predicted value of the residual term res(t), and w J+1 is the reconstruction coefficient of the residual prediction value res′(t);
[0112] Step 503: Define the sequence Q(t) as the dependent variable Y, where Y is a T×1 vector, T is the total length of the time series, and IMF′ j (t) and res′(t) constitute the T×(J+1) independent variable matrix T, and the reconstruction coefficients to be determined constitute the (J+1)×1 parameter vector W:
[0113] Y=Q(t)
[0114] X=[IMF′1(t),IMF′2(t),…,IMF′ J (t),res′(t)]
[0115] W=[w1,w2,…,w J ,w J+1 ]
[0116] Among them, Y is defined as the dependent variable in the least squares problem, X is defined as the independent variable in the least squares problem, and W is defined as the parameter vector in the least squares problem;
[0117] Step 504: Find the optimal W to minimize the sum of squared errors, that is:
[0118] min‖Y-XW‖ 2
[0119] Initialize the value of the parameter vector W, which can be set to random initialization or zero vector;
[0120] Step 505: Update the value of the parameter vector W according to the update formula of the gradient descent method:
[0121] W k+1 =W k -α[-2X T (Y-XW k )]
[0122] Where k is the number of updates of the parameter vector, W k is the parameter vector after the kth update, α is the learning rate, -2X T (Y-XW k ) is ‖Y-XW‖ 2 The gradient of W;
[0123] Step 506: Repeat steps 501 to 505 until ‖Y-XW‖ 2 It tends to converge, and the parameter vector sought at this time is the reconstruction coefficient.
[0124] In any of the above solutions, preferably, step 5 further includes substituting the obtained reconstruction coefficient into the following formula:
[0125]
[0126] The runoff sequence Q′(t) is reconstructed based on the prediction results of each component, and Q′(t) is denormalized to obtain the final runoff forecast value.
[0127] The present invention proposes a runoff prediction method based on chaos theory and quantum neural network, which can perform runoff prediction relatively quickly and accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0128] Figure 1The present invention is a flow chart of a preferred embodiment of a runoff prediction method based on chaos theory and quantum neural network.
[0129] Figure 2 The flowchart is another preferred embodiment of the runoff prediction method based on chaos theory and quantum neural network according to the present invention.
[0130] Figure 3 The figure is a schematic diagram of the structure of a quantum neuron according to an embodiment of the runoff prediction method based on chaos theory and quantum neural network of the present invention. DETAILED DESCRIPTION
[0131] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.
[0132] Embodiment 1
[0133] With the development of computer technology and the proposal and improvement of new theories, the introduction of new algorithms or new theories in the field of runoff prediction has become an important means of runoff prediction. Chaos theory is an important theory in the study of nonlinear systems. The development of chaos theory provides a method for revealing the dynamic characteristics of runoff systems. The application of phase space reconstruction technology in chaos theory can reveal the complex motion characteristics of nonlinear runoff systems, find their laws, and thus predict runoff. Complete total empirical mode decomposition (CEEMD) can effectively solve modal aliasing and decompose the runoff sequence into multiple physically meaningful stable intrinsic mode functions (IMFs) and single residual terms (res), so as to better grasp the regularity of each component. When using chaos theory for prediction, the system is greatly affected by the disturbance of the initial state, making the system predictable only in a short time. Using CEEMD to decompose the runoff sequence, the runoff sequence that is easily affected by the initial disturbance is transformed into several components with strong regularity and small influence of the initial disturbance, which effectively improves the prediction effect of chaos theory. Phase space reconstruction technology reconstructs each mode and residual term into a phase point. Using the phase point in high-dimensional space for prediction can further grasp the laws between data. On the other hand, since the input and output data of this prediction method are both high-dimensional vectors, the amount of calculation is too large, and the laws between high-dimensional data are more complex and difficult to capture. Quantum neural networks introduce quantum mechanics into classical neural networks. Parallel calculations and mutual dependence between quantum bits can effectively improve the running speed. In addition, quantum neural networks can also operate in high-dimensional Hilbert space. Compared with traditional neural networks, this enables it to more effectively capture the complex data relationships between high-dimensional data and is more suitable for processing these high-dimensional data problems. In order to overcome the limitations of the theory and construct a combined prediction model for runoff prediction, the present invention provides a runoff prediction method based on chaos theory and quantum neural networks, which can predict runoff more quickly and accurately.
[0134] like Figure 1 As shown, a runoff prediction method based on chaos theory and quantum neural network includes the following steps:
[0135] Execute step 100 to collect runoff data in the watershed and pre-process the runoff data.
[0136] Step 110 is executed to decompose the runoff series using complete population empirical mode decomposition (CEEMD).
[0137] In step 110, the complete population empirical mode decomposition (CEEMD) is used to decompose the sequence. First, several groups of white noises with opposite positive and negative values are added to the sequence Q(t) to obtain a new series of sequences. The series of sequences are subjected to empirical mode decomposition. Finally, the ensemble average of each intrinsic mode function (IMF) and the residual term res is calculated to obtain the final modal decomposition result.
[0138] Execute step 120 to convert each runoff component sequence into a delay vector and construct a delay matrix;
[0139] In step 120, the value of the delay time τ is determined by the autocorrelation method and the mutual information method. First, the sequence x(t) is delayed by different time steps k to obtain a set of delay time series Y={x(k), x(k+1),…, x(n)}. The last k data of the original sequence are removed and recorded as X={x(1), x(2),…, x(nk)}. The autocorrelation function ACF(k) and the mutual information function MI(k) of the delayed sequence and the original sequence are calculated as a function of k. A graph is drawn with the ACF value as the ordinate and k as the abscissa to find the first significant truncation point or zero crossing point. A graph is drawn with the MI value as the ordinate and k as the abscissa to find the local minimum point or saturation point of the mutual information. The values of the delay time τ determined by the two methods are compared to determine the final value of the delay time τ.
[0140] In step 120, the embedding dimension m is determined by using false neighbor points. A smaller embedding dimension m0 is given. The original sequence is converted into a delay vector according to the value of the determined delay time τ and the assumed embedding dimension m0. The proportion of false neighbor points under m0 is calculated, and m0 is increased successively until the percentage of false neighbor points is very small or does not decrease with the increase of m0. At this time, m0 is the required embedding dimension m, and the delay matrix is constructed according to the determined parameters.
[0141] Executing step 130, constructing a phase space trajectory from the delay vector, using the Lyapunov exponent to determine the predictability of each runoff component, and using the maximum Lyapunov exponent to determine the maximum predictable time of each runoff component;
[0142] In step 130, the Wolf method is used to calculate the Lyapunov exponent of the reconstructed phase space. Each delay vector in the delay matrix is regarded as a phase point in the m-dimensional phase space. The initial phase point is taken as the base point, and the point closest to the base point is selected as the endpoint from the remaining phase points of the point set to form an initial vector. The initial vector is made to evolve forward along the trajectory for a fixed time to obtain a new vector. The system linear exponential growth rate in this time period is calculated, and the calculation is continued to all phase points to take the average of the exponential growth rates as the estimated value of the Lyapunov exponent.
[0143] In step 130, the Lyapunov exponent is used to determine the predictability of the runoff component. When the runoff component is determined to be unpredictable, step 2 is repeated to reselect the delay time and the embedding dimension. When it is predictable, the maximum Lyapunov exponent is calculated to determine the maximum predictable time of the runoff component.
[0144] Execute step 140, forecast each runoff component using a quantum neural network based on chaos theory;
[0145] In step 140, when making predictions based on chaos theory, in order to improve the prediction effect, the maximum predictable period t p , comprehensively consider the phase point X(t+Δt) and X(t), X(t-Δt), ..., X(tt p ), using the phase points X(t), X(t-Δt), …, X(tt p ) predicts the phase point X(t+Δt).
[0146] In step 140, when constructing a quantum neural network for prediction, firstly transform the phase point X(t+Δt) and X(t), X(t-Δt), ..., X(tt p ) is converted into quantum state. The connection weight between the quantum state input data and the hidden layer is the rotation angle θ of the quantum rotation gate R(θ). The input data is processed using the quantum NOT gate U(λ) with parameter λ, and the probability amplitude of the ground state |1> of y is output as the final quantum state.
[0147] Execute step 150 to determine whether the forecast of all runoff components is completed. If the forecast of all components is not completed, execute step 120; if the forecast of all runoff components is completed, execute step 160 to reconstruct the runoff components;
[0148] In step 160, the least square method is used to optimize the reconstruction method of each runoff component, and the gradient descent method is used to solve the reconstruction coefficient of each component.
[0149] Embodiment 2
[0150] like Figure 2As shown, the present invention provides a runoff prediction method based on chaos theory and quantum neural network, and the specific steps are as follows:
[0151] 1. Collect runoff data within the basin and preprocess the runoff data.
[0152] First, the runoff data of the sites where runoff prediction is required are collected, and the abnormal values and null values in the collected raw runoff data are processed.
[0153] Secondly, the runoff data after preliminary processing is sorted according to the runoff prediction time scale, and the sorted data is standardized. The standardized calculation formula is as follows:
[0154]
[0155] Where: Q(t) is the standardized data of runoff at time t, t = 1, 2, ..., n, n is the length of the runoff sequence; q(t) is the runoff data at time t, m 3 / s; is the mean of runoff data, m 3 / s; σ is the standard deviation of runoff data, m 3 / s.
[0156] Finally, according to the length of the time series, the entire period is divided into the rate period and the test period.
[0157] 2. Use complete total empirical mode decomposition (CEEMD) to decompose the sequence.
[0158] First, add positive and negative opposite white noise to the sequence Q(t) and Get a new sequence and
[0159]
[0160] Where: and is the i-th group of random sequence (white noise), and is the i-th group of new sequences, and I is the number of random sequence groups.
[0161] Find all the maximum and minimum extreme points of the sequence, use the cubic spline interpolation function to fit the upper and lower envelopes of the sequence, and find the mean of the upper and lower envelopes:
[0162]
[0163] Where: Sequence The upper and lower envelopes of Sequence The upper and lower envelopes of Sequence The envelope mean of .
[0164] Subtract the envelope mean from the original sequence to get a new sequence:
[0165]
[0166] Where: are the new sequences obtained respectively.
[0167] test Can it be used as an intrinsic mode function (IMF)? If it does not satisfy the condition that at any time, the upper and lower envelopes defined by the maximum value have a mean of zero, and the number of extreme points is the same as the number of zero crossing points or only differs by one, then cannot be used as an intrinsic mode function (IMF). Repeat the above steps as the original sequence until the above conditions are met, and then define it as the first intrinsic mode function
[0168] Subtracting the first intrinsic mode function (IMF) from the original sequence gives the residual sequence:
[0169]
[0170] Where: for The remaining sequence after subtracting the intrinsic mode functions.
[0171] Will Repeat the above operation as a new original sequence until all the intrinsic mode functions are decomposed J is the number of intrinsic mode functions until the remaining sequence Until it is a single trend term, and it is defined as the residual term res i (t).
[0172] The decomposition of each group of sequences is completed, and the intrinsic mode function (IMF) and the residual term (res) with unity of each group of sequences are obtained.
[0173]
[0174] Where: It represents the jth IMF after the empirical mode decomposition of the i-th group of positive random sequences. It represents the residual term res after the empirical mode decomposition of the positive random sequence added to the i-th group, It represents the jth IMF after the i-th group is added to the negative random sequence using the empirical mode decomposition. Represents the residual term after the i-th group is added to the negative random sequence using empirical mode decomposition.
[0175] Repeat the above steps to decompose all I groups of new sequences to obtain the final decomposition result.
[0176]
[0177]
[0178] Where: IMF j (t) represents the jth IMF after the complete overall empirical mode decomposition of the original sequence, and res(t) represents the residual term after the complete overall empirical mode decomposition of the original sequence.
[0179] In this way, the original runoff sequence is decomposed into intrinsic mode functions and residual terms, and each component is predicted later.
[0180] 3. Use the autocorrelation method and mutual information method to determine the value of the delay time τ of each component.
[0181] Take the first intrinsic mode function IMF1(t) as an example and record it as x(t).
[0182] First, the sequence x(t) is delayed by different time steps k to obtain a set of delayed time series Y = {x(k), x(k+1), ..., x(n)}. The last k data of the component sequence are removed and recorded as X = {x(1), x(2), ..., x(nk)}.
[0183] When using the autocorrelation function method, calculate the autocorrelation function ACF(k) of the time series data, where k represents the time difference. The calculation formula is as follows:
[0184] ACF(k)=Corr(X,Y) (9)
[0185] Where: X and Y represent the processed sequence and the delayed time series respectively, Corr represents the correlation coefficient, and the Pearson correlation coefficient can be used.
[0186] Make a graph with ACF value as the ordinate and k as the abscissa, and find the first significant truncation point or zero crossing point. The k value (time difference) corresponding to this point is the delay time τ.
[0187] The mutual information calculation formula is as follows:
[0188]
[0189] Where: X and Y represent the processed sequence and delayed time series respectively, p(x,y) represents the probability that variables X and Y take the values x and y at the same time, p(x) and p(y) represent the marginal probabilities that variables X and Y take the values x and y respectively.
[0190] Draw a graph with MI value as the ordinate and k as the abscissa to find the local minimum or saturation point of the mutual information. The k value (time difference) corresponding to this point is the delay time τ.
[0191] The value of the delay time τ is determined by comparing the autocorrelation method with the mutual information method, and the final value of the delay time τ is determined.
[0192] 4. Use pseudo-neighbor points to determine the embedding dimension m, transform the component sequence into delay vectors and construct the delay vector matrix.
[0193] First, given an embedding dimension m0 (usually a minimum value of 2), the original component sequence is converted into a delay vector according to the value of the determined delay time τ and the assumed embedding dimension m0, as shown in the following formula:
[0194] x′(t)=[x(t),x(t+τ),x(t+2τ),...,x(t+(m0-1)τ)] (11)
[0195] Where τ is the delay time, m is the embedding dimension, and the delay vector x′(t) can be regarded as an m0-dimensional vector, t = 1, 2, …, M0, M0 = n-(m0-1)τ.
[0196] For each vector x′(i) in the m0-dimensional phase space, i=1,2,…,M, find the vector x′(j) closest to it in the m0-dimensional phase space and calculate the Euclidean distance between them. The calculation formula is as follows:
[0197]
[0198] Where: is the Euclidean distance between vectors x′(i) and x′(j).
[0199] The distance between vectors x′(i) and x′(j) in the m0+1 dimensional phase space is:
[0200]
[0201] Where: is the Euclidean distance between vectors x′(i) and x′(j).
[0202] if It is a false neighbor point, and its ratio is defined as:
[0203]
[0204] Where: R(i) is the proportion of false neighbor points.
[0205] If R(i)>R0, then x′(j) is called the false neighbor point of x′(i). R0 is the threshold, which is usually greater than 10. The proportion of false neighbor points under m0 is calculated, and m0 is increased successively until the percentage of false neighbor points is very small or does not decrease with the increase of m0. At this time, m0 is the required embedding dimension m.
[0206] Secondly, according to the value of the delay time τ and the embedding dimension m, the original component sequence is converted into a delay vector:
[0207] x1(t)=[x(t),x(t+τ),x(t+2τ),...,x(t+(m-1)τ)] (15)
[0208] Wherein: t=1,2,…,M, M=n-(m-1)τ, M is the number of delay vectors.
[0209] The delay vector is constructed as a delay matrix, denoted as
[0210]
[0211] 5. The Wolf method is used to calculate the Lyapunov exponents of the reconstructed phase space, verify the predictability and determine the maximum predictable time using the maximum Lyapunov exponent.
[0212] First, each delay vector x1(t) in the delay matrix is regarded as a phase point X(t) in the m-dimensional phase space, where the number of phase points is M, M=n-(m-1)τ.
[0213] Secondly, taking the initial phase point X(1) as the base point, select the point X(j) closest to X(1) from the remaining phase points of the point set {X(i)} as the endpoint to form an initial vector, and record the Euclidean distance between X(1)~X(j) as L(t1).
[0214] Take the time step as k, t2 = t1 + k, the initial vector evolves forward along the trajectory to obtain a new vector, the Euclidean distance between the base point and the endpoint of the new vector is recorded as L'(t1), and the system linear exponential growth rate in the corresponding time period is recorded as:
[0215]
[0216] Where: λ is the system linear exponential growth rate during this period, and k is the time step.
[0217] This continues until all phase points are calculated, and then the average of the exponential growth rates is taken as the estimated value of the Lyapunov exponent:
[0218]
[0219] This estimated value LE1(m) is the Lyapunov index of the runoff system when the delay time is τ and the embedding dimension is m. LE1(m) < 0 means that the phase volume is shrinking in this direction and the motion is stable, that is, the system is predictable. LE1(m) > 0 means that the system is chaotic and unpredictable. Repeat the above steps to reselect the delay time and embedding dimension.
[0220] According to the reselected delay time τ, the embedding dimension m is increased in turn, and the above steps are repeated to calculate LE1(m) until LE1(m) becomes relatively stable as m changes. The calculation result obtained at this time is the maximum Lyapunov exponent value λ1 of the runoff system at the delay time τ. According to its inverse 1 / λ1, the maximum predictable time period t of the system can be defined p .
[0221] 6. Use quantum neural network to predict the components.
[0222] According to chaos theory, a dynamic system model of the form (19) can be established in the reconstructed m-dimensional phase space:
[0223] X(t+Δt)=f[X(t)] (19)
[0224] Where: Δt is the prediction time step, and f is the functional relationship.
[0225] Compared with neural networks and other black-box models for time series prediction, the use of dynamical system models for prediction can reflect the law of the system evolving from the current time state X(t) to the next time state X(t+Δt), and discover the evolution of the system state over time. This evolution often has a certain physical basis, and the discovered laws with a physical basis are used to predict the dynamical system.
[0226] According to the meaning of the maximum Lyapunov exponent, we can know that according to the current time state, from the current time state X(t), the longest predictable time is X(t+t p ), that is, X(t+t p ) depends to some extent on the current state X(t).
[0227] According to the maximum predictable period t p And phase space reconstruction theory, changing the delay between time steps can construct n functional relationships about X(t+T):
[0228]
[0229] Where: Δt is the prediction time step, f is the functional relationship, n is the number of functional relationships, n=t p / Δt, f1 represents the evolution law of the system when the time step delay is Δt, f2 represents the evolution law of the system when the time step delay is 2Δt, …, f n Indicates that the time step delay is t p The evolution law of the time system.
[0230] In order to improve the forecast effect, we can comprehensively consider the phase point X(t+Δt) and X(t), X(t-Δt), ..., X(tt p ), that is, comprehensively consider the evolution law of the system at different time step delays. Using phase points X(t), X(t-Δt), …, X(tt p ) predicts the phase point X(t+Δt), that is:
[0231] X(t+Δt)=f1[X(t)]+f2[X(t-Δt)]+…+f n [X(tt p )] (twenty one)
[0232] Phase points X(t), X(t-Δt), …, X(tt p ) is an m-dimensional vector. The use of quantum neural networks can perform parallel operations, quickly dig out the laws of the system at different time step delays, and consider the impact of various laws on the current time state (phase point) X(t+Δt) to be predicted, and fit a suitable model. In addition, the basic unit of quantum neural networks is quantum bits, which can represent quantum states in high-dimensional Hilbert space. Multiple quantum bits are combined to form the state of high-dimensional Hilbert space, and quantum gates and quantum neurons are based on this. They also operate on data in high-dimensional Hilbert space. Compared with traditional neural networks, quantum neural networks are more suitable for processing such high-dimensional arrays and effectively capturing the connection between data.
[0233] First, according to the principle of quantum neural network, the phase points X(t+Δt) and X(t), X(t-Δt), ..., X(tt p ) is converted into quantum states.
[0234] In computers, data is represented by binary codes, that is, a number of classical bits. The Hadamard gate is used to convert classical bits into quantum bits with a certain probability distribution. The Hadamard gate matrix expression is as follows:
[0235]
[0236] Where: H represents the Hadamard gate.
[0237] The CNOT gate is used to perform entanglement operations on quantum bits. Through entanglement, multiple quantum bits are connected to make them interdependent. The CNOT gate matrix expression is as follows:
[0238]
[0239] Wherein: CNOT represents a CNOT gate.
[0240] Measuring entangled quantum bits will put them in a certain state, thus obtaining a deterministic result. The measurement result can be recorded and used as a representation of quantum state data. After converting the deterministic data into quantum state data, multiple measurements are performed to obtain statistical results.
[0241] Secondly, we build a quantum neural network. Similar to a neural network, a quantum neural network has input, hidden, and output layers, connected by multiple quantum neurons. The structure of a quantum neuron is as follows: Figure 3 shown.
[0242] The input data of the quantum neuron is the quantum state data. The connection weight between the input layer and the hidden layer is the rotation angle θ of the quantum rotation gate R(θ). The input data is processed using the quantum NOT gate U(λ) with parameter λ, and the probability amplitude of the ground state |1> of y is output as the final quantum state.
[0243]
[0244]
[0245]
[0246]
[0247]
[0248] Where: |x i > is the input data x i The quantum state of and for|x i > collapses to the probability amplitude of states |0> and |1>; R is the quantum rotation gate; θ is the rotation angle; U is the quantum NOT gate; λ is the parameter that needs to be optimized for the quantum NOT gate; f(λ) is the sigmoid function; n is the number of input data.
[0249] Finally, after completing the training of the periodic quantum neural network, the trained quantum neural network is used to predict the components.
[0250] 7. Complete all component predictions and reconstruct the component data.
[0251] Repeat steps 3 to 6 until all runoff components are forecasted.
[0252] After the complete total empirical mode decomposition (CEEMD) is performed on the runoff series, the intrinsic mode function, residual term and runoff series are obtained as follows:
[0253]
[0254] When the prediction results of each component are reconstructed as described above, errors will be superimposed, which may lead to poor forecasting results. The least squares method is used to optimize the reconstruction method. The optimized reconstruction formula is:
[0255]
[0256] Where: Q′(t) is the reconstructed runoff sequence, IMF j ′(t) is the jth intrinsic mode function IMF j The predicted value of (t), w j For IMF j ′(t), J is the number of intrinsic mode functions, res′(t) is the predicted value of the residual term res(t), and w J+1 is the reconstruction coefficient of the residual prediction value res′(t).
[0257] The gradient descent method is used to solve the above least squares problem. The sequence Q(t) is defined as the dependent variable Y, where Y is a T×1 vector, T is the total length of the time series, and IMF j ′(t) and res′(t) constitute the T×(J+1) independent variable matrix T, and the reconstruction coefficients to be calculated constitute the (J+1)×1 parameter vector W:
[0258] Y= Q(t) (31)
[0259] X=[IMF1′(t),IMF2′(t),…,IMF J ′(t),res′(t)] (32)
[0260] W=[w1,w2,…,w J ,w J+1 ] (33)
[0261] Where: Y is defined as the dependent variable in the least squares problem, X is defined as the independent variable in the least squares problem, and W is defined as the parameter vector in the least squares problem.
[0262] We need to find the optimal W to minimize the sum of squared errors, that is:
[0263] min‖Y-XW‖ 2 (34)
[0264] The value of the initialization parameter vector W can be set to random initialization or a zero vector.
[0265] According to the update formula of the gradient descent method, update the value of the parameter vector W:
[0266] W k+1 =W k -α[-2X T (Y-XW k )] (35)
[0267] Where: k is the number of updates of the parameter vector, W k is the parameter vector after the kth update, α is the learning rate, -2X T (Y-XW k ) is ‖Y-XW‖ 2 The gradient of W.
[0268] Repeat the above steps until ‖Y-XW‖ 2 It tends to converge, and the parameter vector sought at this time is the required reconstruction coefficient.
[0269] The obtained reconstruction coefficient is substituted into formula (30), and the runoff sequence Q′(t) is reconstructed based on the prediction results of each component. Q′(t) is denormalized to obtain the final runoff forecast value, and the prediction effect of the model in the rate period and the test period is verified.
[0270] Embodiment 3
[0271] Taking the Yalu River Basin as an example, the Yalu River is an important water resource in Northeast China, with a basin area of about 61,900 square kilometers, of which the basin area in China is about 32,500 square kilometers, and the basin data on the DPRK is missing. The Shuifeng and Taipingwan power stations are the two power stations at the lowest reaches of the mainstream of the Yalu River Basin. The Shuifeng Reservoir was selected as the outlet section of the Yalu River Basin, and the ten-day runoff time series data of the Shuifeng Reservoir from 1990 to 2022 were selected as the runoff forecast data.
[0272] Firstly, the ten-day runoff data from 1990 to 2012 were selected as the training set (rate period) and normalized. Using CEEMD, the normalized runoff data can be decomposed into eight runoff components, including seven intrinsic mode functions IMF and one residual term res.
[0273] Then, the phase space reconstruction technique is used to reconstruct the phase space of each runoff component, determine the delay time τ and embedding dimension m of each runoff component, and use the maximum Lyapunov exponent to determine the maximum predictable time period t of each runoff component. p , used to determine the input and output of the quantum neural network, the parameters determined by each component are shown in Table 1:
[0274] Table 1 Parameters determined by each component
[0275]
[0276] A quantum neural network is constructed for each component, and the model is trained. The trained model is used to predict each component on the training set (rate period), and the reconstruction method is optimized using the least squares method. The optimized reconstruction coefficients are shown in Table 2:
[0277] Table 2 Optimized reconstruction coefficients
[0278] <![CDATA[w1]]> <![CDATA[w2]]> <![CDATA[w3]]> <![CDATA[w4]]> <![CDATA[w5]]> <![CDATA[w6]]> <![CDATA[w7]]> <![CDATA[w8]]> 0.53 1.35 1.24 1.17 1.26 0.86 0.99 0.86
[0279] The trained model and optimized reconstruction coefficients are used to test the prediction effect in the validation set (rate period).
[0280] When forecasting on the validation set, according to the selected rate period, slide one data backward each time, select the runoff data with the same length as the rate period for normalization, use CEEMD to decompose the normalized data, set the number of decomposition layers to 7, and divide the obtained components according to their delay time τ, embedding dimension m and maximum predictable time period t p Determine its input, use the trained neural network model to get the predicted value of each component, reconstruct it according to the optimized reconstruction coefficient, and then de-standardize the reconstructed value to get the final runoff forecast value until the entire validation set (rate period) forecast is completed.
[0281] The method of the present invention is used to forecast the ten-day runoff in the Yalu River Basin. The average relative error on the test set (rate period) is 4.27%, and the average relative error on the validation set (test period) is 9.43%, and the forecasting effect is good.
[0282] In order to better understand the present invention, the above is described in detail in conjunction with the specific embodiments of the present invention, but it is not intended to limit the present invention. Any simple modifications made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention. Each embodiment in this specification focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referenced to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. A runoff prediction method based on chaos theory and quantum neural network, comprising collecting runoff data in a watershed and preprocessing the runoff data, characterized in that: The following steps are also included: Step 1: Decompose the runoff series using complete overall empirical mode decomposition; Step 2: Convert each runoff component sequence into a delay vector and construct a delay matrix. Use the autocorrelation method and mutual information method to determine the value of the delay time τ, including the following sub-steps: Step 201: Delay the sequence x(t) by different time steps k to obtain a set of delayed time series Y={x(k), x(k+1),…, x(n)}. Remove the last k data from the original sequence and record it as X={x(1), x(2),…, x(nk)}. Calculate the autocorrelation function ACF(k) and mutual information function MI(k) of the delayed sequence and the original sequence as k changes. The formula is: ACF(k)=Corr(X,Y) Among them, X and Y represent the processed series and delayed time series respectively, and Corr represents the correlation coefficient; Make a graph with ACF value as ordinate and k as abscissa, find the first significant truncation point or zero crossing point, and the k value corresponding to this point is the delay time τ; Step 202: Draw a graph with MI value as the ordinate and k as the abscissa, find the local minimum point or saturation point of the mutual information, the k value corresponding to the point is the delay time τ, and the mutual information calculation formula is: Among them, p(x,y) represents the probability that variables X and Y take the values x and y at the same time, and p(x) and p(y) represent the marginal probabilities of variables X and Y taking the values x and y respectively; Step 203: Compare the values of the delay time τ determined by the methods in step 201 and step 202 to determine the value of the delay time τ finally selected; The embedding dimension m is determined by using pseudo neighbor points, the component sequence is converted into a delay vector and a delay vector matrix is constructed, including the following sub-steps: Step 211: Given an embedding dimension m0, the original sequence is converted into a delay vector according to the value of the determined delay time τ and the assumed embedding dimension m0. The formula is: x′(t)=[x(t),x(t+τ),x(t+2τ),...,x(t+(m0-1)τ)] Where τ is the delay time, m is the embedding dimension, and the delay vector x′(t) can be regarded as an m0-dimensional vector, t=1,2,…,M0, M0=n-(m0-1)τ; For each vector x′(i) in the m0-dimensional phase space, i=1,2,…,M, find the vector x′(j) closest to it in the m0-dimensional phase space and calculate the Euclidean distance between them. The calculation formula is as follows: in, is the Euclidean distance between vectors x′(i) and x′(j); The distance between vectors x′(i) and x′(j) in the m0+1 dimensional phase space is: in, is the Euclidean distance between vectors x′(i) and x′(j); Step 212: Calculate the proportion of false neighbor points under m0, and increase m0 successively until the percentage of false neighbor points is very small or does not decrease with the increase of m0. At this time, m0 is the required embedding dimension m. If It is a false neighbor point, and its ratio is defined as: Among them, R(i) is the proportion of false neighbor points; If R(i)>R0, then x′(j) is called the false neighbor point of x′(i), R0 is the threshold, usually greater than 10, and the proportion of false neighbor points under m0 is calculated. Then m0 is increased successively until the percentage of false neighbor points is very small or does not decrease with the increase of m0. At this time, m0 is the required embedding dimension m. Step 213: constructing a delay matrix according to the determined parameters, including converting the original component sequence into a delay vector according to the determined value of the delay time τ and the embedding dimension m: x1(t)=[x(t),x(t+τ),x(t+2τ),...,x(t+(m-1)τ)] Where t = 1, 2, ..., M, M = n-(m-1)τ, M is the number of delay vectors; the delay vector is constructed as a delay matrix, denoted as Step 3: constructing a phase space trajectory from the delay vector, using the Lyapunov exponent to determine the predictability of each runoff component, and using the maximum Lyapunov exponent to determine the maximum predictable time of each runoff component; The Wolf method is used to calculate the Lyapunov exponent of the reconstructed phase space. Each delay vector in the delay matrix is regarded as a phase point in the m-dimensional phase space. The initial phase point is taken as the base point, and the point closest to the base point is selected as the endpoint from the remaining phase points of the point set to form the initial vector. The initial vector is made to evolve forward along the trajectory for a fixed time to obtain a new vector. The linear exponential growth rate of the system in this time period is calculated, and the calculation is continued to all phase points to take the average of the exponential growth rates as the estimated value of the Lyapunov exponent. The predictability of the runoff component is determined using the Lyapunov index. If the runoff component is unpredictable, repeat step 2 to reselect the delay time and embedding dimension. If it is predictable, calculate the maximum Lyapunov index to determine the maximum predictable time of the runoff component. Step 4: Based on chaos theory, quantum neural network is used to forecast each runoff component. When forecasting based on chaos theory, in order to improve the forecast effect, the maximum predictable period t p , comprehensively consider the phase point X(t+Δt) and X(t), X(t-Δt), ..., X(tt p ), using the phase points X(t), X(t-Δt), …, X(tt p ) predicts the phase point X(t+Δt); When constructing a quantum neural network for prediction, first transform the phase point X(t+Δt) and X(t), X(t-Δt), …, X(tt p ) is converted into quantum state, the connection weight between the quantum state input data and the hidden layer is the rotation angle θ of the quantum rotation gate R(θ), the input data is processed by the quantum NOT gate U(λ) with parameter λ, and the probability amplitude of the ground state |1> of y is output as the final quantum state; Step 5: Repeat steps 2 to 4 until all runoff components are predicted and reconstructed.
2. The runoff prediction method based on chaos theory and quantum neural network as claimed in claim 1, characterized in that: The pre-processing comprises the following sub-steps: Step 01: Processing abnormal values and null values in the collected runoff data; Step 02: Arrange the runoff data after preliminary processing according to the runoff prediction time scale, and standardize the data obtained by the sorting. The formula is: Where Q(t) is the standardized data of runoff at time t, t = 1, 2, ..., n, n is the length of the runoff sequence, q(t) is the runoff data at time t, is the mean of runoff data, σ is the standard deviation of runoff data; Step 03: According to the length of the time series, the entire period is divided into the rate period and the test period.
3. The runoff prediction method based on chaos theory and quantum neural network as claimed in claim 2 is characterized in that: The step 1 comprises the following sub-steps: Step 11: Add several groups of white noise with opposite positive and negative values to the sequence Q(t). and Get a new sequence and The formula is in, and is the i-th group of new sequences, and I is the number of random sequence groups; Step 12: Perform empirical mode decomposition on the series of sequences; Step 13: Calculate the ensemble mean of each intrinsic mode function IMF and residual term res. The formula of the residual term res is shown as in, It represents the jth IMF after the empirical mode decomposition of the i-th group of positive random sequences. It represents the residual term res after the empirical mode decomposition of the positive random sequence added to the i-th group, It represents the jth IMF after the i-th group is added to the negative random sequence using the empirical mode decomposition. It represents the residual term after the empirical mode decomposition of the i-th group of negative random sequences, and J is the total number of IMFs after the empirical mode decomposition; Step 14: Get the final modal decomposition result, the formula is Among them, IMF j (t) represents the jth IMF after the complete overall empirical mode decomposition of the original sequence, and res(t) represents the residual term after the complete overall empirical mode decomposition of the original sequence.
4. The runoff prediction method based on chaos theory and quantum neural network as claimed in claim 3 is characterized in that: The step 11 includes the following sub-steps: Step 111: Find all the maximum and minimum extreme points of the sequence, use the cubic spline interpolation function to fit the upper and lower envelopes of the sequence, and find the mean of the upper and lower envelopes. in, Sequence The upper and lower envelopes of Sequence The upper and lower envelopes of Sequence The envelope mean of ; Step 112: Subtract the envelope mean from the original sequence to obtain a new sequence: in, are the new sequences obtained respectively; Step 113: Inspection Can it be used as an intrinsic mode function (IMF)? If it does not satisfy the condition that at any time, the upper and lower envelopes defined by the maximum value have a mean of zero, and the number of extreme points is the same as the number of zero crossing points or only differs by one, then cannot be used as an intrinsic mode function (IMF). Repeat steps 111 and 112 as the original sequence until the above conditions are met, and then define it as the first intrinsic mode function 5. The runoff prediction method based on chaos theory and quantum neural network as claimed in claim 4, characterized in that: The step 11 also includes subtracting the first intrinsic mode function (IMF) from the original sequence to obtain a residual sequence: in, for The remaining sequence after subtracting the intrinsic mode functions.
6. The runoff prediction method based on chaos theory and quantum neural network as claimed in claim 5, characterized in that: The step 12 comprises: Repeat the above operation as a new original sequence until all the intrinsic mode functions are decomposed J is the number of intrinsic mode functions until the remaining sequence Until it is a single trend term, and it is defined as the residual term 7. The runoff prediction method based on chaos theory and quantum neural network as claimed in claim 6, characterized in that: The step 3 includes calculating the Lyapunov exponent of the reconstructed phase space using the Wolf method, verifying the predictability, and determining the maximum predictable time using the maximum Lyapunov exponent, including the following sub-steps: Step 31: regard each delay vector x1(t) in the delay matrix as a phase point X(t) in the m-dimensional phase space, the number of phase points is M, M=n-(m-1)τ; Step 32: Taking the initial phase point X(1) as the base point, select the point X(j) closest to X(1) from the remaining phase points of the point set {X(i)} as the endpoint to form an initial vector, and record the Euclidean distance between X(1) and X(j) as L(t1); Take the time step as k, t2 = t1 + k, the initial vector evolves forward along the trajectory to obtain a new vector, the Euclidean distance between the base point and the endpoint of the new vector is recorded as L′(t1), and the system linear exponential growth rate in the corresponding time period is recorded as Among them, λ is the system linear exponential growth rate during this period; Step 33: Continue calculating to all phase points and take the average of the growth rates of each exponential as the estimated value of the Lyapunov exponent. The formula is: This estimated value LE1(m) is the Lyapunov index of the runoff system when the delay time is τ and the embedding dimension is m. LE1(m) < 0 means that the phase volume is shrinking in this direction and the motion is stable, that is, the system is predictable. LE1(m) > 0 means that the system is chaotic and unpredictable. According to the reselected delay time τ, the embedding dimension m is increased in turn, and the above steps are repeated to calculate LE1(m) until LE1(m) becomes relatively stable as m changes. The calculation result obtained at this time is the maximum Lyapunov exponent value λ1 of the runoff system at the delay time τ. According to its inverse 1 / λ1, the maximum predictable time period t of the system can be defined p .
8. The runoff prediction method based on chaos theory and quantum neural network as claimed in claim 7, characterized in that: The step 3 also includes using the Lyapunov index to determine the predictability of the runoff component. When it is determined that the runoff component is unpredictable, repeating step 2 to reselect the delay time and the embedding dimension. When it is predictable, calculating the maximum Lyapunov index to determine the maximum predictable time of the runoff component.
