Hydropower station daily runoff prediction method, system and equipment and readable storage medium

By using a multi-strategy cooperative search algorithm for parameter optimization in hydropower station daily runoff prediction, and combining it with the error correction method, the problem that traditional methods are difficult to predict runoff sequences under complex conditions is solved, and the prediction accuracy and reliability are significantly improved.

CN119338066APending Publication Date: 2025-01-21STATE GRID SICHUAN ELECTRIC POWER CORP ELECTRIC POWER RES INST
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411460950.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

Traditional methods are difficult to accurately predict nonlinear and non-stationary runoff sequences under complex conditions, resulting in degradation in predictive performance and poor model performance.

Method used

A multi-strategy cooperative search algorithm is used for parameter optimization, and the error correction method is used to comprehensively correct the prediction results in space and time to improve the prediction accuracy.

Benefits of technology

It improves the accuracy and reliability of daily runoff prediction of hydropower stations and provides effective data support and technical support for power grid dispatching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338066A_ABST
    Figure CN119338066A_ABST
Patent Text Reader

Abstract

The invention discloses a hydropower station daily runoff prediction method, system and equipment and a readable storage medium, and the method comprises the steps: building a prediction model based on a least square support vector machine, employing a multi-strategy improved cooperative search algorithm, carrying out the parameter optimization through a sine initialization solution space strategy, a dynamic communication strategy and a migration variation strategy, and obtaining a prediction result through a prediction model; therefore, an aggregation effect occurring in a traditional model parameter optimization technology is avoided, and the domain optimization capability and the global search capability are improved; meanwhile, error space-time comprehensive correction is carried out on a prediction result, and a final daily runoff prediction value is obtained. The daily runoff prediction precision of the hydropower station is improved, and reliable data support and technical support are provided for power grid dispatching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of hydropower technology, and in particular to a method, system, device and readable storage medium for predicting daily runoff of a hydropower station. Background Art

[0002] As the basis for water resource management, regulation and rational planning, accurate runoff prediction can provide more scientific and reasonable decision-making support for water resource management. Machine learning intelligent prediction models have a strong ability to handle nonlinear relationships, but their prediction performance decreases significantly as the dimension and quantity of data increase. The performance of machine learning models is easily affected by parameters, and optimization algorithms are usually used to determine the optimal parameters of the model. However, traditional model parameter optimization technology is prone to clustering effects, that is, in the process of parameter optimization, due to poor algorithm search performance or improper parameter setting, the parameters converge to a local optimal solution prematurely, resulting in poor model performance.

[0003] It can be seen from this that the traditional single method can no longer meet the needs of accurate prediction of nonlinear and non-stationary runoff sequences under complex conditions, and it is urgent to develop new methods to ensure the effectiveness and reliability of runoff prediction. Summary of the invention

[0004] In order to solve the problem of accurate prediction of nonlinear and non-stationary runoff sequences under complex conditions, the present invention proposes a method, system, device and readable storage medium for predicting daily runoff of hydropower stations. The present invention improves the prediction accuracy of daily runoff of hydropower stations by adopting a multi-strategy cooperative search algorithm to optimize parameters and adopts an error correction method to perform comprehensive temporal and spatial error correction on the prediction results, thereby providing effective data and technical support for power grid dispatching.

[0005] The present invention is achieved through the following technical solutions:

[0006] A method for predicting daily runoff of a hydropower station, comprising:

[0007] The data of the daily runoff sequence of the hydropower station and its influencing factors are respectively normalized to construct a training set; the training set includes a plurality of samples consisting of an influencing factor set and its corresponding daily runoff values;

[0008] A prediction model based on a least squares support vector machine is established, the prediction model is trained using the training set, and during the training process, a multi-strategy improved cooperative search algorithm is used to optimize parameters to obtain a prediction model with an optimal parameter combination; the multi-strategy improved cooperative search algorithm uses a sinusoidal initialization strategy to construct an initial solution space, and uses a dynamic communication strategy and a walking mutation strategy to optimize parameters;

[0009] The prediction model with the optimal parameter combination is used to obtain the prediction values ​​of all samples in the training set, and the error sequence between the prediction values ​​and the measured values ​​of all samples in the training set is calculated;

[0010] Inputting the newly acquired influencing factor set into the prediction model of the optimal parameter combination and performing a denormalization process on the prediction result output by the model to obtain an initial prediction result; the newly acquired influencing factor set is obtained by performing a normalization process on the data of each influencing factor;

[0011] According to the error sequence, the initial prediction result is subjected to a spatiotemporal comprehensive correction of the prediction error to obtain a final daily runoff prediction result.

[0012] In some embodiments, the process of establishing a prediction model based on a least squares support vector machine specifically includes:

[0013] Using a kernel function to transform the training set samples into a high-dimensional space;

[0014] According to the principle of minimum structural risk, the daily runoff prediction problem of the hydropower station is transformed into an optimization problem with equality constraints.

[0015] The Lagrangian equation is established for the objective function. According to the Karush–Kuhn–Tucker conditions (KKT conditions), the partial derivatives of the variables in the Lagrangian equation are obtained, and the minimum value problem of the objective optimization is transformed into a linear optimization problem. At this time, the prediction model based on the least squares support vector machine is obtained, which is expressed as:

[0016]

[0017] In the formula, is the kernel function; represents the influencing factor set of the i-th training sample; n represents the number of training samples in the training set; υ i is the Lagrange multiplier; b is the bias.

[0018] In some implementations, the parameter optimization process specifically includes:

[0019] Set the number of model parameter schemes, the maximum number of iterations, and the dimensionality of model parameter variables;

[0020] The initial solution space is constructed using a sinusoidal initialization strategy; the sinusoidal initialization strategy is expressed as:

[0021]

[0022] In the formula, Respectively represent the upper and lower limits of the j-th variable; is the value of the jth variable of the iterative parameter scheme of the i-th parameter at the time of initialization (k=0); φ(0,1) represents the function used to generate random numbers uniformly distributed in the interval [0,1]; the value range of χ is (0,∞);

[0023] A dynamic communication strategy is used to identify the worst parameter solution and dynamically adjust the search direction to improve the probability of finding the global optimal parameter solution; the dynamic communication strategy is expressed as:

[0024]

[0025] In the formula, I, K, and J represent the number of model parameter schemes, the maximum number of iterations, and the dimension of model parameter variables, respectively; is the value of the jth variable of the i-th parameter scheme at the k-th iteration after dynamic communication; Indicates the value of the jth variable of the i-th historical optimal parameter solution at the k-th iteration; represents the value of the jth variable of the ith global worst parameter solution at the kth iteration; represents the value of the jth variable of the indth global optimal parameter solution in the kth iteration, where ind is randomly selected from the integer set {1,2,…,M}, and M represents the number of stored global optimal parameter solutions; Indicates the value of the jth variable of the i-th parameter scheme at the k-th iteration; Indicates from The information gain obtained; Indicates from The information gain obtained; Indicates from The information gain obtained; α and β represent global adjustment parameters; randn is a random number that follows a normal distribution;

[0026] In the early stage of the search, triangle walk is used to improve the algorithm's ability to find high-quality parameter solutions. In the later stage of the search, neighborhood mutation is used to improve the algorithm's neighborhood optimization ability. The walk mutation strategy is expressed as:

[0027]

[0028] In the formula, is the value of the jth variable of the i-th parameter scheme at the k-th iteration after the walk mutation; and They represent the parameter schemes generated by triangle walk and neighborhood mutation respectively; α is the global adjustment parameter; L and LP are auxiliary intermediate variables; rand represents a uniformly distributed random number; randi is a random rounding function, which means randomly selecting a value from {1,2,…,I}.

[0029] If the objective function value corresponding to the parameter scheme after dynamic communication is less than or equal to the objective function value corresponding to the parameter scheme after wandering mutation, the parameter scheme after dynamic communication is used as the current iteration output; otherwise, the parameter scheme after wandering mutation is used as the current iteration output.

[0030] In some implementations, the error sequence acquisition process includes:

[0031] Inputting the influencing factor set of all samples in the training set into the prediction model of the optimal parameter combination, and performing a denormalization process on the prediction result output by the model to obtain the corresponding daily runoff prediction value;

[0032] The difference between the daily runoff prediction value and the daily runoff measured value of the corresponding sample in the training set is calculated to obtain an error sequence.

[0033] In some implementations, the process of spatiotemporal integrated correction of the prediction error specifically includes:

[0034] A nonlinear model is obtained by fitting the error sequence to obtain a time dimension error correction value;

[0035] According to the time dimension error correction value, the initial prediction result is corrected to obtain a time dimension correction result;

[0036] Based on the principle that the absolute value of the difference between the measured values ​​of all samples in the training set and the time dimension error correction value is minimized, the corresponding spatial dimension is determined, and the error corresponding to the spatial dimension in the error sequence is used as the spatial dimension error correction value;

[0037] According to the time dimension error correction value and the space dimension error correction value, a spatiotemporal comprehensive correction value of the prediction error of the current influencing factor set is calculated;

[0038] The initial prediction result is corrected using the spatiotemporal comprehensive correction value of the prediction error to obtain the final daily runoff prediction result.

[0039] In some implementations, the calculation formula for the prediction error spatiotemporal integrated correction value is:

[0040]

[0041] In the formula, represents the spatiotemporal comprehensive correction value of the prediction error; e j,1 Indicates the time dimension error correction value; e j,2 represents the spatial dimension error correction value; a represents the adjustment coefficient;

[0042] Wherein, the time dimension error correction value is expressed as:

[0043]

[0044] Where p1, p2, …, p z is the adjustment coefficient; ε t is the disturbance term; z is the lag term; t represents the number of time periods; is the conversion function; is the error sequence.

[0045] In a second aspect, the present invention proposes a daily runoff prediction system for a hydropower station, comprising:

[0046] A data processing module, wherein the data processing module is configured to: respectively normalize the data of the daily runoff sequence of the hydropower station and its influencing factors to construct a training set; the training set includes a plurality of samples consisting of a set of influencing factors and their corresponding daily runoff values;

[0047] A model building and training module, wherein the model building and training module is configured to: establish a prediction model based on a least squares support vector machine, use the training set to train the prediction model, and use a multi-strategy improved cooperative search algorithm to optimize parameters during the training process to obtain a prediction model with an optimal parameter combination; the multi-strategy improved cooperative search algorithm uses a sinusoidal initialization strategy to construct an initial solution space, and uses a dynamic communication strategy and a walking mutation strategy to optimize parameters;

[0048] An error acquisition module, wherein the error acquisition module is configured to: obtain predicted values ​​of all samples in the training set using a prediction model with an optimal parameter combination, and calculate an error sequence between the predicted values ​​and the measured values ​​of all samples in the training set;

[0049] An initial prediction module, wherein the initial prediction module is configured to: input the newly acquired influencing factor set into the prediction model of the optimal parameter combination and perform a denormalization process on the prediction result output by the model to obtain an initial prediction result; the newly acquired influencing factor set is obtained by performing a normalization process on the data of each influencing factor;

[0050] And, a correction module, wherein the correction module is configured to: perform a spatiotemporal comprehensive correction of the prediction error on the initial prediction result according to the error sequence to obtain a final daily runoff prediction result.

[0051] In some embodiments, the model building and training module further comprises:

[0052] A model building unit, wherein the model building unit is configured to: use a kernel function to convert training set samples into a high-dimensional space; based on the principle of minimum structural risk, convert the daily runoff prediction problem of the hydropower station into an optimization problem with equation constraints; establish a Lagrangian equation for the objective function, and according to the Carlo-Kuhn-Tucker condition, find partial derivatives of each variable of the Lagrangian equation to convert the minimum value problem of the objective optimization into a linear optimization problem, and then obtain a prediction model based on a least squares support vector machine;

[0053] And, a parameter optimization unit, wherein the parameter optimization unit is configured to: set the number of model parameter schemes, the maximum number of iterations and the dimension of the model parameter variables; adopt a sinusoidal initialization strategy to construct an initial solution space; adopt a dynamic communication strategy to identify the worst parameter scheme and dynamically adjust the search direction to improve the probability of finding the global optimal parameter scheme; adopt triangle walks in the early stage of the search to improve the algorithm's ability to find high-quality parameter schemes, and improve the algorithm's neighborhood optimization ability through neighborhood mutation in the later stage of the search; if the objective function value corresponding to the parameter scheme after dynamic communication is less than or equal to the objective function value corresponding to the parameter scheme after the walk mutation, then the parameter scheme after dynamic communication is used as the current iteration output; otherwise, the parameter scheme after the walk mutation is used as the current iteration output.

[0054] In some implementations, the error acquisition module further includes:

[0055] A prediction unit, wherein the prediction unit is configured to: input the influencing factor set of all samples in the training set into the prediction model of the optimal parameter combination, and perform a denormalization process on the prediction result output by the model to obtain the corresponding daily runoff prediction value;

[0056] And, a difference unit, wherein the difference unit is configured to: calculate the difference between the daily runoff prediction value and the daily runoff measured value of the corresponding sample in the training set to obtain an error sequence.

[0057] In some embodiments, the correction module further comprises:

[0058] A time error unit, wherein the time error unit is configured to: obtain a nonlinear model according to the error sequence fitting to obtain a time dimension error correction value;

[0059] A time correction unit, wherein the time correction unit is configured to: correct the initial prediction result according to the time dimension error correction value to obtain a time dimension correction result;

[0060] A spatial error unit, wherein the spatial error unit is configured to: determine the corresponding spatial dimension based on the principle of minimizing the absolute value of the difference between the measured values ​​of all samples in the training set and the time dimension error correction value, and use the error corresponding to the spatial dimension in the error sequence as the spatial dimension error correction value;

[0061] A comprehensive error unit, wherein the comprehensive error unit is configured to: calculate a spatiotemporal comprehensive correction value of the prediction error of the current influencing factor set according to the time dimension error correction value and the space dimension error correction value;

[0062] And, a spatiotemporal correction unit, wherein the spatiotemporal correction unit is configured to: use the spatiotemporal comprehensive correction value of the prediction error to correct the initial prediction result to obtain a final daily runoff prediction result.

[0063] In a third aspect, the present invention proposes a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0064] In a fourth aspect, the present invention proposes a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.

[0065] The invention proposes a method, system, device and readable storage medium for predicting daily runoff of a hydropower station, which adopts a multi-strategy cooperative search algorithm to realize parameter optimization: the initial solution space is constructed by using a sine function, so that the algorithm can efficiently cover various areas of the solution space without increasing the complexity of the design, has good traversal, and covers a wide range of solution spaces more quickly, thereby improving the global search capability of the model parameters. The dynamic communication strategy is adopted to identify the worst parameter solution and gradually escape, so that the algorithm can concentrate resources on more potential solution areas, better guide the search process, and reduce invalid searches. In addition, the search direction can be dynamically adjusted to avoid falling into a harsh search area, and even in the face of noise or uncertainty, it can still maintain good performance, thereby enhancing the robustness of the algorithm. The walking mutation strategy is adopted, in which the triangle walking provides a systematic space exploration capability, which can effectively avoid local optimality and maintain diversity. The mutation disturbance increases the flexibility and adaptability of the search by introducing randomness, and improves the local optimization capability. When the two are used in combination, the algorithm can achieve a good balance between extensive exploration and fine search, and significantly improve the efficiency and quality of model parameter optimization. In addition, the present invention also adopts a comprehensive error correction strategy in time and space, fully explores the distribution characteristics of the training set prediction error, and performs comprehensive error correction on the time and space dimensions of the initial prediction results, which can further improve the prediction accuracy and provide more effective and reliable data and technical support for power grid dispatching. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of the present invention, and do not constitute a limitation of the embodiments of the present invention. In the drawings:

[0067] Figure 1 is a flow chart of a method according to an embodiment of the present invention;

[0068] Figure 2 is a system principle block diagram of an embodiment of the present invention;

[0069] Figure 3 Two test functions selected for the embodiment of the present invention; wherein (a) is the test function F1; (b) is the test function F2;

[0070] Figure 4 The diagrams are a comparison of the prediction results of the present invention (a), the LSSVR model (b), the GSA-LSSVR model (c), and the ICSA-LSSVR model (d). DETAILED DESCRIPTION

[0071] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0072] Embodiment 1:

[0073] In order to achieve accurate prediction of nonlinear and non-stationary runoff sequences under complex conditions, this embodiment proposes a daily runoff prediction method for a hydropower station, which adopts a multi-strategy improved cooperative search algorithm for parameter optimization, avoids the focusing effect of traditional model parameter optimization technology, and improves the neighborhood optimization ability and global search ability; at the same time, an error correction method is used to perform comprehensive temporal and spatial error correction on the prediction results to obtain the final daily runoff prediction value, thereby improving the prediction accuracy and reliability.

[0074] like Figure 1 As shown, the method proposed in this embodiment specifically includes the following steps:

[0075] Step 100, normalize the data of the daily runoff sequence of the hydropower station and its influencing factors respectively to construct a training set.

[0076] In this step, partial autocorrelation analysis and expert experience method can be used to determine the influencing factors. Among them, the partial autocorrelation analysis method specifically determines the influencing factors by calculating the partial autocorrelation coefficient. The data of the daily runoff series and the influencing factors are normalized separately, and the maximum and minimum value normalization method can be used. The formula is as follows:

[0077]

[0078] In the formula, x represents the sequence sample to be processed; x' represents the normalized data; x min Represents the minimum value in the sequence sample; x max Represents the maximum value in the sequence samples.

[0079] Get the training set in They represent the influencing factor set and daily runoff value of the i-th training sample respectively, and n represents the number of training samples in the training set.

[0080] Step 200, establish a prediction model based on the least squares support vector machine, use a training set to train the prediction model, and use a multi-strategy improved cooperative search algorithm to optimize parameters during the training process to obtain a prediction model with the optimal parameter combination.

[0081] The prediction model construction process based on least squares support vector machine specifically includes:

[0082] The kernel function is used to transform the training set samples into a high-dimensional space. The formula is as follows:

[0083]

[0084] In the formula, ω T is the weight vector; is the nonlinear mapping function; b is the bias.

[0085] According to the principle of minimum structural risk, the daily runoff prediction problem of the hydropower station is transformed into an optimization problem with equality constraints, which can be expressed as:

[0086]

[0087] In the formula, ξ i is the error; γ is the regularization parameter.

[0088] The Lagrangian equation is established for the objective function, as shown in equation (4), and the optimization problem is solved by the Lagrangian method:

[0089]

[0090] In the formula, υ i is the Lagrange multiplier.

[0091] According to the KKT conditions (Karush–Kuhn–Tucker conditions), the partial derivatives of the variables in the equation are calculated:

[0092]

[0093] Eliminate ω and ξi , the minimum value problem of target optimization can be transformed into a linear equation:

[0094]

[0095] Where E is a unit vector with dimension n; I is a unit matrix with dimension n×n; ZZ T = k(x i ,x) is a symmetric matrix of kernel function with dimension n×n that satisfies Mercer condition.

[0096] Solving the equation according to kernel function theory, the prediction model based on least squares support vector machine is:

[0097]

[0098] In the formula, is a kernel function, and in this embodiment, the Gaussian radial basis kernel function may be selected but is not limited to; f(x) is the model prediction result.

[0099] After the prediction model based on the least squares support vector machine is constructed, the model parameters (including the number of model parameter schemes, the maximum number of iterations, the dimension of model parameter variables, etc.) are set, the sine initialization strategy is used to construct the initial solution space and the training set is used for training. During the training process, the dynamic communication strategy and the walking mutation strategy are used for parameter optimization to obtain the prediction model with the optimal parameter combination. The specific process is as follows:

[0100] Set model parameters: including the number of model parameter schemes I, the maximum number of iterations K, and the dimension of model parameter variables J;

[0101] Sine initialization strategy: Using the sine function to guide the generation of a high-quality initial population can distribute individuals more evenly in the solution space, avoid the clustering effect of traditional methods, and increase the possibility of obtaining the global optimal solution.

[0102] The sinusoidal initialization strategy is expressed as:

[0103]

[0104] In the formula, Respectively represent the upper and lower limits of the j-th variable; is the value of the jth variable of the iterated parameter scheme at initialization (k=0); φ(0,1) represents a function for generating random numbers uniformly distributed in the interval [0,1]; the value range of χ is (0,∞), and 2π is preferred in this embodiment.

[0105] Dynamic communication strategy: When the model parameter solution gradually approaches the worst parameter solution, it is necessary to adjust the direction in time, move away from the worse parameter solution, increase the search range and the probability of finding the global optimal parameter solution.

[0106] The dynamic communication strategy is expressed as:

[0107]

[0108]

[0109] In the formula, is the value of the jth variable of the i-th parameter scheme at the k-th iteration after dynamic communication; Indicates the value of the jth variable of the i-th historical optimal parameter solution at the k-th iteration; represents the value of the jth variable of the ith global worst parameter solution at the kth iteration; represents the j-th variable value of the ind-th global optimal parameter solution in the k-th iteration, where ind is randomly selected from the integer set {1, 2, ..., M}, and M represents the number of stored global optimal parameter solutions, which is 3 in this embodiment; Indicates the value of the jth variable of the i-th parameter scheme at the k-th iteration; Indicates from The information gain obtained; Indicates from The information gain obtained; Indicates from The information gain obtained; α and β represent global adjustment parameters; randn is a random number that obeys the normal distribution.

[0110] Walk mutation strategy: In the early stage of the search, triangle walk is used to improve the algorithm's ability to find high-quality parameter solutions, and in the later stage of the search, neighborhood mutation is used to improve the algorithm's neighborhood optimization ability.

[0111] The walking mutation strategy is expressed as:

[0112]

[0113] LP=L×rand (17)

[0114]

[0115] In the formula, is the value of the jth variable of the i-th parameter scheme at the k-th iteration after the walk mutation; and They represent the parameter schemes generated by triangle walk and neighborhood mutation respectively; α is the global adjustment parameter; L and LP are auxiliary intermediate variables; rand represents a uniformly distributed random number; randi is a random rounding function, which means randomly selecting a value from {1,2,…,I}.

[0116] Optimal strategy:

[0117]

[0118] Wherein, F(x) is the objective function corresponding to the parameter scheme x. In this embodiment, the Nash-efficiency coefficient (NSE) is used as the objective function (as shown in formula (20)); The value of the jth variable of the i-th parameter scheme for the k+1th iteration; is the i-th parameter solution at the k-th iteration after dynamic communication; is the parameter scheme of the i-th iteration after the walk mutation; for a time series of length n, t i and are the ith measured value and the model predicted value, respectively. Represents the average value of the measured series.

[0119] Step 300, using the prediction model with the optimal parameter combination to obtain the predicted values ​​of all samples in the training set, and calculating the error sequence between the predicted values ​​and the measured values ​​of all samples in the training set.

[0120] In step 300, the influencing factors of all samples in the training set are set Input them into the prediction model with the optimal parameter combination in sequence, and denormalize the prediction results output by the model to obtain the corresponding prediction value The predicted value is compared with the daily runoff value (i.e. the measured value) of the corresponding sample in the training set. ) is subtracted to obtain the error sequence, which can be expressed as

[0121] Step 400: input the newly acquired influencing factor set into the prediction model of the optimal parameter combination and perform a denormalization process on the prediction result output by the model to obtain an initial prediction result.

[0122] In step 400, the newly acquired impact factor set Input into the prediction model with the optimal parameter combination and output the prediction result After the prediction result is denormalized, the initial runoff prediction result is obtained. It should be noted that the newly acquired influencing factor set is obtained by normalizing the influencing factor data in the manner of constructing the training set in step 100. And the prediction result after the model prediction output is also a normalized value, so it is necessary to perform a denormalization process on the model output prediction result to obtain the initial runoff prediction result.

[0123] Step 500, based on the error sequence, the initial prediction result is corrected in time and space to obtain the final daily runoff prediction result.

[0124] The spatiotemporal comprehensive correction process of forecast error specifically includes:

[0125] Step 501, a nonlinear model is obtained by fitting the error sequence to obtain a time dimension error correction value. For example, the influencing factor set of the training samples in the training set Input the prediction model in sequence, and perform denormalization on the prediction results to obtain the corresponding prediction value: Then the predicted values ​​and measured values ​​of all samples in the training set are The error sequence is

[0126] According to the error sequence error i train , (i=1,2,...,n) The time dimension error correction value obtained by fitting is:

[0127]

[0128] Among them, p1, p2, …, p z is the adjustment coefficient; ε t is the disturbance term; z is the lag term; t represents the number of time periods; As the conversion function, the exponentiation function h(x)=e x , square function h(x)=x 2 , linear function h(x)=x, absolute value function h(x)=|x|, need to be selected according to the data characteristics of the sample and the target function. The present invention selects a linear function as the conversion function.

[0129] Step 502, correcting the initial prediction result according to the time dimension error correction value to obtain a time dimension correction result.

[0130] Among them, the time dimension correction result is:

[0131] Step 503, based on the principle of minimizing the absolute value of the difference between the actual measured values ​​of all training samples in the training set and the time dimension error correction value, the corresponding spatial dimension is determined, thereby obtaining the spatial dimension error correction value.

[0132] This step takes With y j The dimension with the smallest absolute value between them is taken as the spatial dimension i * , take the error corresponding to this dimension as the spatial dimension error correction value

[0133] Step 504: Calculate the spatiotemporal comprehensive correction value of the prediction error of the current influencing factor set based on the time dimension error correction value and the space dimension error correction value. The calculation formula is:

[0134]

[0135] Where a represents the adjustment coefficient.

[0136] Step 505: Use the spatiotemporal comprehensive correction value of the prediction error to correct the initial prediction result to obtain the final daily runoff prediction result. The correction formula is:

[0137] The method proposed in this embodiment establishes a prediction model based on the least squares support vector machine, and adopts a multi-strategy improved cooperative search algorithm to optimize parameters through the sinusoidal initialization solution space strategy, dynamic communication strategy, and walking mutation strategy, thereby avoiding the aggregation effect of traditional model parameter optimization technology and improving the field optimization ability and global search ability; at the same time, the prediction results are comprehensively corrected in time and space to obtain the final daily runoff prediction value. The prediction accuracy of daily runoff of hydropower stations is improved, providing reliable data support and technical support for power grid dispatching.

[0138] This embodiment also proposes a hydropower station daily runoff prediction system, such as Figure 2 As shown, the system proposed in this embodiment includes:

[0139] The data processing module is configured to normalize the data of the daily runoff sequence of the hydropower station and its influencing factors to construct a training set. The specific normalization processing method is the same as that described in the above step 100, and will not be repeated here.

[0140] The model building and training module is configured to: establish a prediction model based on the least squares support vector machine, train the prediction model with a training set, and use a multi-strategy improved cooperative search algorithm to optimize parameters during the training process to obtain a prediction model with the optimal parameter combination.

[0141] The error acquisition module, the initial prediction module is configured to: use the prediction model with the optimal parameter combination to obtain the predicted values ​​of all samples in the training set, and calculate the error sequence between the predicted values ​​and the measured values ​​of all samples in the training set.

[0142] The initial prediction module is configured to: input the newly acquired influencing factor set into the prediction model of the optimal parameter combination and perform a denormalization process on the prediction result output by the model to obtain an initial prediction result. The newly acquired influencing factor set is obtained by normalizing the influencing factor data.

[0143] And, a correction module, which is configured to: perform a spatiotemporal comprehensive correction of the prediction error on the initial prediction result according to the error sequence to obtain the final daily runoff prediction result.

[0144] Furthermore, the model building and training module also includes:

[0145] The model building unit is configured as follows: using a kernel function to transform the training set samples into a high-dimensional space, as shown in formula (2); based on the principle of minimum structural risk, the daily runoff prediction problem of the hydropower station is transformed into an optimization problem with equation constraints, as shown in formula (3); establishing a Lagrangian equation for the objective function, and according to the KKT condition, finding the partial derivative of each variable in the Lagrangian equation, and transforming the minimum value problem of the objective optimization into a linear optimization problem. At this time, a prediction model based on the least squares support vector machine is obtained, as shown in formula (8).

[0146] And, a parameter optimization unit, which is configured to: set model parameters (including the number of model parameter solutions, the maximum number of iterations, the dimension of model parameter variables, etc.), sinusoidally initialize the solution space and train with a training set, and use a dynamic communication strategy and a walking mutation strategy to optimize parameters during the training process to obtain a prediction model with an optimal parameter combination. The sinusoidal initialization strategy, the dynamic communication strategy, and the walking mutation strategy are as described in the above step 200, and will not be described in detail here.

[0147] Furthermore, the error acquisition module also includes:

[0148] The prediction unit is configured to: set the influencing factors of all samples in the training set Input them into the prediction model with the optimal parameter combination in sequence, and denormalize the prediction results output by the model to obtain the corresponding prediction value

[0149] And, a difference unit, which is configured to: subtract the predicted value from the daily runoff value (i.e., the measured value) of the corresponding sample in the training set to obtain an error sequence, which is expressed as

[0150] Furthermore, the correction module also includes:

[0151] The time error unit is configured to obtain a nonlinear model according to the error sequence fitting to obtain a time dimension error correction value. The specific fitting process is as described in the above step 501, and will not be described in detail here.

[0152] The time correction unit is configured to correct the initial prediction result according to the time dimension error correction value to obtain a time dimension correction result. The specific correction method is as described in the above step 502, which will not be described in detail here.

[0153] The spatial error unit is configured to determine the corresponding spatial dimension based on the principle of minimizing the absolute value of the difference between the actual measured value of all training samples in the training set and the time dimension error correction value, thereby obtaining the spatial dimension error correction value. The specific process is as described in the above step 503, and will not be repeated here.

[0154] The comprehensive error unit is configured to calculate the spatiotemporal comprehensive correction value of the prediction error of the current influencing factor set according to the time dimension error correction value and the space dimension error correction value. The specific calculation formula is as described in the above step 504, which will not be repeated here.

[0155] And, a spatiotemporal correction unit, which is configured to: use the spatiotemporal comprehensive correction value of the prediction error to correct the initial prediction result to obtain the final daily runoff prediction result. The correction formula is as described in the above step 505, and will not be repeated here.

[0156] Embodiment 2:

[0157] This embodiment uses two test functions to verify the method and system proposed in the above embodiment 1. The detailed information of the two test functions is shown in Table 1, and the two-dimensional schematic diagram is shown in Figure 3 shown.

[0158] Table 1 Detailed information of the test function

[0159]

[0160] The butterfly optimization algorithm (BOA) and the lightning connection process algorithm (LAPO) were selected as comparison algorithms, and the population size was set to 50 and the maximum number of iterations was set to 1000. 30 experiments were conducted, and the experimental statistical results are shown in Table 2.

[0161] Table 2 Statistical values ​​of 30 experiments of different optimization methods for each test function

[0162]

[0163]

[0164] It can be seen from Table 2 that the multi-strategy improved cooperative search algorithm (ICSA) proposed in this embodiment has strong search capability and fast convergence speed, and can ensure the identification accuracy and optimization efficiency of model parameters.

[0165] Example 3

[0166] This embodiment uses a hydropower station prediction result and actual measurement result for comparison to verify the feasibility and effect of the method and system proposed in the above embodiment 1. For a sample sequence of length n, if t i and are the measured value of the i-th runoff and the predicted value of the model, respectively. The evaluation indicators are as follows: root mean square error (RMSE), correlation coefficient (R), and Nash-efficiency coefficient (NSE). The experimental results are shown in Table 3.

[0167] Table 3 Evaluation indicators of prediction results of each model

[0168]

[0169] The calculation method of each evaluation index is as follows:

[0170]

[0171] Where, t i , Represent the i-th value of the measured sequence and the predicted sequence respectively; represent the average values ​​of the measured and predicted series, respectively.

[0172] Figure 4 The prediction results are those of the present invention (LSSVR model with multi-strategy improved cooperative search algorithm and error correction) and the least squares support vector machine (LSSVR), the LSSVR model driven by the gravitational search algorithm (GSA-LSSVR), and the LSSVR model driven by the multi-strategy improved cooperative search algorithm (ICSA-LSSVR). It can be seen that the present invention has a high global search capability and can quickly find a satisfactory parameter combination. The obtained prediction results have a higher degree of fit with the measured values ​​and a smaller error. Its performance index is significantly better than the comparison method. In summary, the present invention provides a more reliable and effective method for daily runoff prediction of hydropower stations.

[0173] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0174] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0175] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0176] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0177] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for predicting daily runoff of a hydropower station, characterized in that: include: The data of the daily runoff sequence of the hydropower station and its influencing factors are respectively normalized to construct a training set; the training set includes a plurality of samples consisting of an influencing factor set and its corresponding daily runoff values; A prediction model based on a least squares support vector machine is established, the prediction model is trained using the training set, and during the training process, a multi-strategy improved cooperative search algorithm is used to optimize parameters to obtain a prediction model with an optimal parameter combination; the multi-strategy improved cooperative search algorithm uses a sinusoidal initialization strategy to construct an initial solution space, and uses a dynamic communication strategy and a walking mutation strategy to optimize parameters; The prediction model with the optimal parameter combination is used to obtain the prediction values ​​of all samples in the training set, and the error sequence between the prediction values ​​and the measured values ​​of all samples in the training set is calculated; Inputting the newly acquired influencing factor set into the prediction model of the optimal parameter combination and performing a denormalization process on the prediction result output by the model to obtain an initial prediction result; the newly acquired influencing factor set is obtained by performing a normalization process on the data of each influencing factor; According to the error sequence, the initial prediction result is subjected to a spatiotemporal comprehensive correction of the prediction error to obtain a final daily runoff prediction result.

2. A method for predicting daily runoff of a hydropower station according to claim 1, characterized in that: The process of establishing the prediction model based on least squares support vector machine specifically includes: Using a kernel function to transform the training set samples into a high-dimensional space; According to the principle of minimum structural risk, the daily runoff prediction problem of the hydropower station is transformed into an optimization problem with equality constraints. The Lagrange equation is established for the objective function. According to the Carlo-Kuhn-Tucker condition, the partial derivatives of the variables in the Lagrange equation are obtained, and the minimum value problem of the objective optimization is transformed into a linear optimization problem. At this time, the prediction model based on the least squares support vector machine is obtained, which is expressed as: In the formula, is the kernel function; represents the influencing factor set of the i-th training sample; n represents the number of training samples in the training set; υ i is the Lagrange multiplier; b is the bias.

3. A method for predicting daily runoff of a hydropower station according to claim 2, characterized in that: The parameter optimization process specifically includes: Set the number of model parameter schemes, the maximum number of iterations, and the dimensionality of model parameter variables; The initial solution space is constructed using a sinusoidal initialization strategy; the sinusoidal initialization strategy is expressed as: In the formula, Respectively represent the upper and lower limits of the j-th variable; is the value of the jth variable of the iterative parameter scheme of the i-th parameter at the time of initialization (k=0); φ(0,1) represents the function used to generate random numbers uniformly distributed in the interval [0,1]; the value range of χ is (0,∞); A dynamic communication strategy is used to identify the worst parameter solution and dynamically adjust the search direction to improve the probability of finding the global optimal parameter solution; the dynamic communication strategy is expressed as: In the formula, I, K, and J represent the number of model parameter schemes, the maximum number of iterations, and the dimension of model parameter variables, respectively; is the value of the jth variable of the i-th parameter scheme at the k-th iteration after dynamic communication; Indicates the value of the jth variable of the i-th historical optimal parameter solution at the k-th iteration; It represents the value of the jth variable of the ith global worst parameter solution at the kth iteration; represents the value of the jth variable of the indth global optimal parameter solution at the kth iteration, where ind is randomly selected from the integer set {1,2,…,M}, and M represents the number of stored global optimal parameter solutions; Indicates the value of the jth variable of the i-th parameter scheme at the k-th iteration; Indicates from The information gain obtained; Indicates from The information gain obtained; Indicates from The information gain obtained; α and β represent global adjustment parameters; randn is a random number that follows a normal distribution; In the early stage of the search, triangle walk is used to improve the algorithm's ability to find high-quality parameter solutions. In the later stage of the search, neighborhood mutation is used to improve the algorithm's neighborhood optimization ability. The walk mutation strategy is expressed as: In the formula, is the value of the jth variable of the i-th parameter scheme at the k-th iteration after the walk mutation; and They represent the parameter schemes generated by triangle walk and neighborhood mutation respectively; α is the global adjustment parameter; L and LP are auxiliary intermediate variables; rand represents a uniformly distributed random number; randi is a random rounding function, which means randomly selecting a value from {1,2,…,I}. If the objective function value corresponding to the parameter scheme after dynamic communication is less than or equal to the objective function value corresponding to the parameter scheme after wandering mutation, the parameter scheme after dynamic communication is used as the current iteration output; otherwise, the parameter scheme after wandering mutation is used as the current iteration output.

4. A method for predicting daily runoff of a hydropower station according to any one of claims 1 to 3, characterized in that: The error sequence acquisition process includes: Inputting the influencing factor set of all samples in the training set into the prediction model of the optimal parameter combination, and performing a denormalization process on the prediction result output by the model to obtain the corresponding daily runoff prediction value; The difference between the daily runoff prediction value and the daily runoff measured value of the corresponding sample in the training set is calculated to obtain an error sequence.

5. A method for predicting daily runoff of a hydropower station according to any one of claims 1 to 3, characterized in that: The process of the spatiotemporal comprehensive correction of the prediction error specifically includes: A nonlinear model is obtained by fitting the error sequence to obtain a time dimension error correction value; According to the time dimension error correction value, the initial prediction result is corrected to obtain a time dimension correction result; Based on the principle that the absolute value of the difference between the measured values ​​of all samples in the training set and the time dimension error correction value is minimized, the corresponding spatial dimension is determined, and the error corresponding to the spatial dimension in the error sequence is used as the spatial dimension error correction value; According to the time dimension error correction value and the space dimension error correction value, a spatiotemporal comprehensive correction value of the prediction error of the current influencing factor set is calculated; The initial prediction result is corrected using the spatiotemporal comprehensive correction value of the prediction error to obtain the final daily runoff prediction result.

6. A method for predicting daily runoff of a hydropower station according to claim 5, characterized in that: The calculation formula of the spatiotemporal comprehensive correction value of the prediction error is: In the formula, represents the spatiotemporal comprehensive correction value of the prediction error; e j,1 Indicates the time dimension error correction value; e j,2 represents the spatial dimension error correction value; a represents the adjustment coefficient; Wherein, the time dimension error correction value is expressed as: Where p1, p2, …, p z is the adjustment coefficient; ε t is the disturbance term; z is the lag term; t represents the number of time periods; is the conversion function; is the error sequence.

7. A daily runoff prediction system for a hydropower station, characterized in that: include: A data processing module, wherein the data processing module is configured to: respectively normalize the data of the daily runoff sequence of the hydropower station and its influencing factors to construct a training set; the training set includes a plurality of samples consisting of a set of influencing factors and their corresponding daily runoff values; A model building and training module, wherein the model building and training module is configured to: establish a prediction model based on a least squares support vector machine, use the training set to train the prediction model, and use a multi-strategy improved cooperative search algorithm to optimize parameters during the training process to obtain a prediction model with an optimal parameter combination; the multi-strategy improved cooperative search algorithm uses a sinusoidal initialization strategy to construct an initial solution space, and uses a dynamic communication strategy and a walking mutation strategy to optimize parameters; An error acquisition module, wherein the error acquisition module is configured to: obtain predicted values ​​of all samples in the training set using a prediction model with an optimal parameter combination, and calculate an error sequence between the predicted values ​​and the measured values ​​of all samples in the training set; An initial prediction module, wherein the initial prediction module is configured to: input the newly acquired influencing factor set into the prediction model of the optimal parameter combination and perform a denormalization process on the prediction result output by the model to obtain an initial prediction result; the newly acquired influencing factor set is obtained by performing a normalization process on the data of each influencing factor; And, a correction module, wherein the correction module is configured to: perform a spatiotemporal comprehensive correction of the prediction error on the initial prediction result according to the error sequence to obtain a final daily runoff prediction result.

8. A hydropower station daily runoff prediction system according to claim 7, characterized in that: The model building and training module also includes: A model building unit, wherein the model building unit is configured to: use a kernel function to convert training set samples into a high-dimensional space; based on the principle of minimum structural risk, convert the daily runoff prediction problem of the hydropower station into an optimization problem with equation constraints; establish a Lagrangian equation for the objective function, and according to the Carlo-Kuhn-Tucker condition, find partial derivatives of each variable of the Lagrangian equation to convert the minimum value problem of the objective optimization into a linear optimization problem, and then obtain a prediction model based on a least squares support vector machine; And, a parameter optimization unit, wherein the parameter optimization unit is configured to: set the number of model parameter schemes, the maximum number of iterations and the dimension of the model parameter variables; adopt a sinusoidal initialization strategy to construct an initial solution space; adopt a dynamic communication strategy to identify the worst parameter scheme and dynamically adjust the search direction to improve the probability of finding the global optimal parameter scheme; adopt triangle walks in the early stage of the search to improve the algorithm's ability to find high-quality parameter schemes, and improve the algorithm's neighborhood optimization ability through neighborhood mutation in the later stage of the search; if the objective function value corresponding to the parameter scheme after dynamic communication is less than or equal to the objective function value corresponding to the parameter scheme after the walk mutation, then the parameter scheme after dynamic communication is used as the current iteration output; otherwise, the parameter scheme after the walk mutation is used as the current iteration output.

9. A hydropower station daily runoff prediction system according to claim 7, characterized in that: The error acquisition module also includes: A prediction unit, wherein the prediction unit is configured to: input the influencing factor set of all samples in the training set into the prediction model of the optimal parameter combination, and perform a denormalization process on the prediction result output by the model to obtain the corresponding daily runoff prediction value; And, a difference unit, wherein the difference unit is configured to: calculate the difference between the daily runoff prediction value and the daily runoff measured value of the corresponding sample in the training set to obtain an error sequence.

10. A hydropower station daily runoff prediction system according to any one of claims 7 to 9, characterized in that: The correction module also includes: A time error unit, wherein the time error unit is configured to: obtain a nonlinear model according to the error sequence fitting to obtain a time dimension error correction value; A time correction unit, wherein the time correction unit is configured to: correct the initial prediction result according to the time dimension error correction value to obtain a time dimension correction result; A spatial error unit, wherein the spatial error unit is configured to: determine the corresponding spatial dimension based on the principle of minimizing the absolute value of the difference between the measured values ​​of all samples in the training set and the time dimension error correction value, and use the error corresponding to the spatial dimension in the error sequence as the spatial dimension error correction value; A comprehensive error unit, wherein the comprehensive error unit is configured to: calculate a spatiotemporal comprehensive correction value of the prediction error of the current influencing factor set according to the time dimension error correction value and the space dimension error correction value; And, a spatiotemporal correction unit, wherein the spatiotemporal correction unit is configured to: use the spatiotemporal comprehensive correction value of the prediction error to correct the initial prediction result to obtain a final daily runoff prediction result.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

12. A computer-readable storage medium having a computer program stored thereon, 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 6 are implemented.

Citation Information

Cited By

  • Underground water pollution information identification method and related device

    CN121545624A