A kalman filter-based flood forecasting real-time correction method and system

By segmenting the error sequence and constructing an autoregressive model, combined with the Kalman filtering method, the problem of error information fusion in flood forecasting was solved, and the accuracy of flood forecasting was improved.

CN116029155BActive Publication Date: 2026-06-12水利部信息中心(水利部水文水资源监测预报中心)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
水利部信息中心(水利部水文水资源监测预报中心)
Filing Date
2023-02-27
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively integrate error information from different forecast periods in flood forecasting, resulting in insufficient forecast accuracy. In particular, the lack of observation data makes it difficult to utilize Kalman filtering techniques for error information fusion.

Method used

The error sequence is segmented using the optimal segmentation method, and an autoregressive model AR(p) is constructed. The Kalman filter method is used to correct the error, and the flow rate is estimated using the Kalman filter error correction value. The error information is fused by combining the error autoregressive model and the corresponding fluctuation method.

🎯Benefits of technology

It significantly eliminates systematic errors, deeply explores the inherent laws of errors, reduces random errors in the simulation process, and significantly improves the accuracy of flood forecasting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116029155B_ABST
    Figure CN116029155B_ABST
Patent Text Reader

Abstract

This invention discloses a real-time correction method and system for flood forecasts based on Kalman filtering, relating to the field of hydrological observation. The invention includes the following steps: obtaining the observed first flow sequence and the calculated second flow sequence of the forecast model; calculating the error sequence based on the first and second flow sequences; segmenting the error sequence using the optimal segmentation method; and processing the error x in the k-th segment. i An error AR(p) model is constructed; the Kalman filter error correction value is used as the input of the AR(p) model for error estimation, thereby obtaining the flow estimate. In practical operational forecasting applications, this invention can significantly eliminate forecast errors caused by systematic errors. Furthermore, based on random error samples between the observed sequence and the forecast value, it can deeply explore the inherent hidden patterns of errors after simulation training, significantly reducing random errors in the simulation process and effectively improving forecast accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hydrological observation, and more specifically to a real-time correction method and system for flood forecasting based on Kalman filtering. Background Technology

[0002] Multiple information fusion methods based on Kalman filtering can make optimal statistical inferences about the analyzed variable based on the distribution characteristics (expectation and variance, etc.) of multiple information sources expressing the same variable. Hydrological forecasting involves inferring the true value of a variable (such as flow rate or water level) for a future period. Given multiple methods for inferring the true value of a forecast variable, the inference result of each method constitutes an information source. Multiple information fusion based on Kalman filtering can obtain the best inference of the true value. Inferring the true value of a forecast variable can also be equivalently represented as inferring the forecast error. By fusing multiple error information sources and combining them with the forecast values ​​calculated by the hydrological forecasting model, the inference of the true value of the variable for the forecast period can be obtained.

[0003] Correcting hydrological model calculations can be achieved by modeling the error sequence using time series analysis methods (primarily autoregressive models) based on the error characteristics of the training period samples, thereby estimating the error values ​​for future periods. When the true value is considered not to be equivalent to the observed value, and the true value follows a distribution with the expected value of the observed value and a variance of a certain range (e.g., a proportion of the observed value), the distribution of the error generated by inferring the true value using the observed value can be obtained. The Kalman filter method can be used to fuse the two types of error to correct the training period observations. However, for the forecast period, since there are no observed values, i.e., the error information for inferring the true value using observed values ​​is lacking in the forecast period, only the error information for the forecast period inferred from the error time series model is available. Therefore, it is difficult to use Kalman filtering to fuse the two types of error information. For the training samples, although there are two types of error information, the variance of the error generated by inferring the true value using observed values ​​is not easily expressed and determined in a unified form (e.g., whether the variance of the error is a fixed value or a certain proportion of the observed value), making it difficult to design a unified parameter file format. Therefore, it is also difficult to use Kalman filtering to fuse the two types of error information.

[0004] In practice, hydrological observations are generally considered equivalent to true values, meaning the observed values ​​are considered the true values. Therefore, based on the observation sequence, a certain method (such as the corresponding fluctuation method) should be used to estimate the true values ​​for the forecast period. It is assumed that the error between the true value and the estimated value for the forecast period exhibits characteristics consistent with the error between the observed values ​​and the estimated true values ​​in the training sample phase. Thus, the error of the forecast period under this method (such as the corresponding fluctuation method) can be inferred. Combining the error information of the forecast period inferred from the error time series model, Kalman filtering techniques can be used to fuse the two error information to achieve the optimal inference of the true value of the forecast period. Summary of the Invention

[0005] In view of this, the present invention provides a method and system for real-time correction of flood forecasts based on Kalman filtering.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] One aspect discloses a real-time correction method for flood forecasts based on Kalman filtering, which includes the following steps:

[0008] Obtain the first flow sequence of observed values ​​and the second flow sequence of calculated values ​​from the forecast model, respectively;

[0009] Calculate the error sequence based on the first flow rate sequence and the second flow rate sequence;

[0010] The error sequence is segmented using the optimal segmentation method;

[0011] For the k-th segment error x i Construct an error AR(p) model;

[0012] The Kalman filter error correction value is used as the input of the AR(p) model for error estimation, and then the flow rate estimate is obtained.

[0013] Optionally, the error x of the k-th segment i The error AR(p) model is constructed as follows:

[0014]

[0015] In the formula, the mean value of the k-th error sequence is u. k ; ε is the autoregressive coefficient; i The residuals are those of the autoregressive model.

[0016] Optionally, the variance of the AR(p) model is

[0017]

[0018] In the formula, Let x be the error i (i=LL) k-1 +1~LL k The variances of ρ1, ρ2, ..., ρ p Let x be the k-th segment of the error sequence. i (i=LL) k-1 +1~LL k The autocorrelation coefficient of ); LL k For the error of the k-th segment, LL k-1 This represents the error of the (k-1)th segment.

[0019] Optionally, the flow estimate is:

[0020]

[0021] Among them, xy i-j Kalman filter fusion x i-j y i-j Error correction values ​​after two types of errors; x i-j The error prediction value of the AR(p) model is given; y i-j The predicted value of time ij calculated using the corresponding fluctuation difference method is used as a substitute for the true value and the calculated value Q. cal The difference between (ij).

[0022] Optionally, the error sequence can be segmented using the optimal segmentation method as follows:

[0023] A sequence of data of length N is X = (x1, x2, ..., x...). N The data is divided into K segments, with n data points in the k-th segment. k (k = 1, 2, ..., K); the mean of the entire sequence data is u, the total sum of squared deviations is σ², and the mean of the k-th segment is u. k The sum of squared deviations within the K segments is

[0024]

[0025] In the formula, N k Let N0 = 0, N1 = n1, and N2 = n1 + n2. K =N.

[0026] On the other hand, a real-time correction method for flood forecasts based on Kalman filtering is also disclosed, including:

[0027] Flow sequence acquisition module: used to acquire the first flow sequence of observed values ​​and the second flow sequence of calculated values ​​from the forecast model, respectively;

[0028] Error sequence calculation module: used to calculate the error sequence based on the first flow sequence and the second flow sequence;

[0029] Error sequence segmentation module: used to segment the error sequence using the optimal segmentation method;

[0030] AR(p) model building module: used for calculating the error x of the k-th segment i Construct an error AR(p) model;

[0031] Flow estimation module: Used to estimate the error by taking the Kalman filter error correction value as the input of the AR(p) model, and then obtain the flow estimation value.

[0032] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a real-time correction method for flood forecast based on Kalman filtering, which has the following beneficial effects: in actual forecasting applications, it can significantly eliminate forecast errors caused by systematic errors, and can deeply explore the inherent hidden laws of errors after simulation training based on random error samples between observation sequences and forecast values, significantly reducing random errors in the simulation process and effectively improving forecast accuracy. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0034] Figure 1 This is a schematic diagram of the process of the present invention;

[0035] Figure 2 This is a technical roadmap for the present invention. Detailed Implementation

[0036] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0037] This invention discloses a real-time correction method for flood forecasts based on Kalman filtering, such as... Figure 1-2 As shown, the details are as follows:

[0038] Taking flow forecast as an example, this illustrates the process of inferring forecast values ​​using the error autoregressive method. The inference process is similar when the forecast variable is water level. Let t be the current time, and Q be the observed flow sequence. obs (i)(i=1,2,...,t); the flow sequence calculated by the forecast model is Q cal (i) (i = 1, 2, ..., t, ..., t + L), where L is the number of forecast periods. An autoregressive (AR) model is used to infer the flow values. The steps are as follows:

[0039] Step 1: According to Q obs (i), Q cal (i) Calculate the error sequence x i=Q obs (i)-Q cal (i)(i=1,2,...,t).

[0040] Step 2: Use the optimal segmentation method to segment x i Divide the integer (i = 1, 2, ..., t) into K segments, and denote the length of each segment as L. k (k = 1, 2, ..., K).

[0041] Step 3: For the error x of the k-th segment i (remember Then i = LL k-1 +1~LL k Construct an error AR model. Let the mean of the k-th error sequence be u. k Then the error x of the kth segment i The AR(p) model is:

[0042]

[0043] In the formula, ε is the autoregressive coefficient; i The residuals of the autoregressive model have a mean of 0 and a variance of .

[0044]

[0045] In the formula, Let x be the error i (i=LL) k-1 +1~LL k The variances of ρ1, ρ2, ..., ρ p Let x be the k-th segment of the error sequence. i (i=LL) k-1 +1~LL k The autocorrelation coefficient of ).

[0046] AR sequences exhibit the characteristics of autocorrelation coefficient tailing and partial correlation coefficient truncation. This is achieved through the autocorrelation coefficient ρ of the sequence. i (i = 1, 2, ..., p), the partial correlation coefficients of the AR(p) model are derived as follows:

[0047]

[0048] Initially, the maximum lag number where the partial correlation coefficient is greater than the critical threshold is used as the order p of the AR model.

[0049]

[0050] And through the parameters in the AR(p) model Whether the stability condition is met ultimately determines the order p of the model. When the parameters in the AR(p) model... Make the characteristic equation

[0051]

[0052] If all roots of the equation lie within the unit circle, then the AR(p) sequence is stationary. That is, the roots of the equation must satisfy |V i |<1(i=1,2,...,p).

[0053] Step 4: Error estimation (between measured and predicted values) based on AR(p). For the k-th segment of the error sequence x... i (i=LL) k-1 +1~LL k Since p is generally much smaller than L, when i ≤ p, we take x. i =0.

[0054] When i > p

[0055]

[0056] It can be denoted as X i =AX i-1 +Γε i ,in

[0057] If p = 2, then

[0058]

[0059] Error value x i The true value (in terms of the observed value Q) obs (i) Substitute) with the calculated value Q cal The difference between (i) and (i), therefore the error value x at time i. i As a scalar, for the AR(p) model we have

[0060]

[0061] If p = 2, then H = (1 0), middle Γ=(10) T .

[0062] For the test sample, i.e., k = 1 to K-1, the AR(p) model is used to infer the error value at time i and the error value x at time ij. i-j It is expressed as the difference between the measured value and the value calculated by the forecast model, i.e., x i-j =Q obs (ij)-Q cal(ij)(j=1,2,...,p). For the last segment of the optimal segmentation, i.e., k=K, the AR(p) model is used to infer the error x of subsequent time i (i>t, t is the current time). i Since the measured values ​​at time ij>t (j=1,2,...,p) are unknown, the Kalman filter error correction value xy is used here to infer the error value at time i. i-j x is the input value of the AR(p) model at time ij. i-j , that is, x i-j =xy i-j Therefore, the estimated flow rate at time i is obtained.

[0063] xy i-j Kalman filter fusion x i-j y i-j Error correction values ​​after two types of errors. i-j y represents the error prediction value based on the AR(p) model. i-j The predicted value of time ij calculated using the corresponding fluctuation difference method is used as a substitute for the true value and the calculated value Q. cal The difference between (ij) is Among them, the predicted value at time t+1 inferred by the corresponding difference method Forecast value at time t+2 Q kal (t+1) represents the flow forecast value at time t+1 after Kalman filtering correction. Flow forecast values ​​after time t+2... Among them, Q kal (t+1) is the predicted correction value obtained after fusing the two error information using Kalman filtering, i.e.

[0064] Q kal (t+1)=Q cal (t+1)+xy t+1 ;

[0065] In the formula, xy t+1 Q represents the error correction value after fusing the two errors using Kalman filtering. kal The calculation method for (i)(i>t+1) is the same as above.

[0066] Another embodiment also discloses a forecast value obtained based on a sequence of measured values ​​using the corresponding fluctuation method. Compared with the measured value Q obs The error between (i) is Let the error sequence be... The average value is Q Δave Then it can be used As observed value Q obs The unbiased estimate of (i), and then using As an unbiased estimate of the error. If If it holds true at a certain confidence level (usually 0.05), then... As the variance of the error (resulting from replacing the measured value with the predicted value using the corresponding differential method); if If not true, then directly use y i Variance of the sequence The variance of the error (resulting from replacing the measured value with the predicted value using the corresponding differential method), i.e. Therefore, the predicted value obtained by the corresponding fluctuation method is used instead of the measured value, and its value is compared with the value Q calculated by the prediction model. cal The error between (i) can be represented by the mean y. i The variance is R i The normal distribution N(y) i ,R i )express.

[0067] The expressed error autoregressive model is X i =AX i-1 +Γε i Let P0 be the covariance matrix of X0 and V be the covariance matrix of ε, then X i covariance matrix P i =AP i-1 A T +V. The observed value x is expressed i With X i Between x i =HX i Then x i The variance is HP i H T Therefore, the error estimate for future time moments obtained based on the autoregressive error model can be represented by a mean of x. i The variance is HP i H T The normal distribution N(x) i HP i H T )express.

[0068] According to the Kalman filter principle, N(y) i ,R i ) and N(x i HP i H T The error values ​​x and y represent the two types of error corrections. i The variance matrix is ​​P i ′:

[0069]

[0070] where \(H\) is a row vector with the first element being 1 and other elements being 0. Denote \(P\) i The upper left corner first element in 11 (i) can be written as:

[0071]

[0072] where \(G\) is the gain factor. Taking the corrected \(xy\) i as the error inference value at time \(i\) (between the observed value and the calculated value of the prediction model), the correction value of the predicted value at time \(i\) based on the Kalman filter is \(Q\) kal (i)=Q cal (i)+xy i .

[0073] In the last segment of the optimal error segmentation: Based on the error data of this segment, the error value \(x\) at future time \(i\) (\(i > t\), \(t\) is the current time) is predicted through the AR model of the error sequence, using \(xy\) i (\(j = 1,2,\cdots,p\) and \(t < i - j\)) and \(x\) i-j (\(j = 1,2,\cdots,p\) and \(i - j\leq t\)) as the input items of AR(\(p\)). First, use the corresponding fluctuation difference method to calculate the i-j at time \(i\) (\(i > t\)). When \(i = t + 1\), When \(i = t + 2\), When \(i\geq t + 2\), Then, combined with the calculated value \(Q\) cal (i) of the prediction model, the predicted error value based on the corresponding fluctuation difference method is obtained

[0074] In other segments of the optimal error segmentation, that is, based on the error data of this segment, the corrected value after Kalman filtering, the calculated value of the prediction model, and the measured value are compared to analyze and verify the filtering effect. In the calculation of the error value \(x\) at time \(i\) based on the AR(\(p\)) model, the difference between the measured value and the calculated value of the prediction model before time \(i\) is still used as the error at the corresponding time, rather than using the corrected error value \(xy\) i (\(i - p < j\leq i - 1\)) as the input item of AR(\(p\)). j (i - p < j\leq i - 1) as the input item of AR(\(p\)).

[0075] Among them, the specific steps of the optimal segmentation method are as follows:

[0076] Now assume that the sequence data with length \(N\) is \(X=(x_1,x_2,\cdots,x\) N ), which is divided into \(K\) segments, and the amount of data in the \(k\) - th segment is \(n\) k (k = 1,2,\cdots,K). Obviously, \(n_1 + n_2+\cdots + n\) K=N. The mean of the entire sequence data is u, the total sum of squared deviations is σ², and the mean of the k-th segment is u. k The sum of squared deviations within the K segments is

[0077]

[0078] In the formula, N k Let N0 = 0, N1 = n1, and N2 = n1 + n2. K =N. Sum of squares of deviations between segments for:

[0079]

[0080] According to mathematical statistics theory It decreases monotonically as K increases, and when K = N, Zero, The mean u of each segment k Under the null hypothesis of indifference, the statistic F follows an F(S⁻¹, NS) distribution:

[0081]

[0082] When F>F α (S-1, NS), reject the null hypothesis. Some studies take the number of segments S corresponding to the maximum F value as the optimal number of segments. Other studies suggest that when... It is reasonable to use the number of segments that decreases to a relatively stable value as the number of segments increases as the segmentation number. Because of this... The judgment of whether the value decreases to a relatively stable level as the number of segments increases is somewhat subjective. This invention uses the number of segments K corresponding to the maximum F value as the optimal number of segments.

[0083] This embodiment also discloses a real-time correction method for flood forecasts based on Kalman filtering, including:

[0084] Flow sequence acquisition module: used to acquire the first flow sequence of observed values ​​and the second flow sequence of calculated values ​​from the forecast model, respectively;

[0085] Error sequence calculation module: used to calculate the error sequence based on the first flow sequence and the second flow sequence;

[0086] Error sequence segmentation module: used to segment the error sequence using the optimal segmentation method;

[0087] AR(p) model building module: used for calculating the error x of the k-th segment i Construct an error AR(p) model;

[0088] Flow estimation module: Used to estimate the error by taking the Kalman filter error correction value as the input of the AR(p) model, and then obtain the flow estimation value.

[0089] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0090] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A real-time correction method for flood forecasts based on Kalman filtering, characterized in that, Includes the following steps: Obtain the first flow sequence of observed values ​​and the second flow sequence of calculated values ​​from the forecast model, respectively; Calculate the error sequence based on the first flow rate sequence and the second flow rate sequence; The error sequence is segmented using the optimal segmentation method; The error sequence is segmented using the optimal segmentation method as follows: A sequence of data of length N is X=(x1,x2,...,x...). N The data is divided into K segments, with n data points in the k-th segment. k (k=1,2,...,K); the mean of the entire sequence data is u, and the total sum of squared deviations is... 2 The mean value within the k-th segment is u. k The sum of squared deviations within the K segments is : ; In the formula, N k Let N be the number of the first k segments of the sequence, N0=0, N1=n1, N2=n1+n2, and N... K =N; For the k-th segment error x i Construct an error AR(p) model; The error of segment k is x i The error AR(p) model is constructed as follows: ; In the formula, the mean value of the k-th error sequence is u. k ; i (i=1,2,...,p) are the autoregressive coefficients; ε i The residuals of the autoregressive model; The variance of the AR(p) model is : ; In the formula, Let x be the error i (i=LL k-1 +1~LL k The variances of ρ1, ρ2, ..., ρ p Let x be the k-th segment of the error sequence. i (i=LL) k-1 +1~LL k The autocorrelation coefficient of LL; k For the error of the k-th segment, LL k-1 This represents the error of the (k-1)th segment; The Kalman filter error correction value is used as the input of the AR(p) model to estimate the error, and then the flow rate estimate is obtained. The estimated flow rate is: =Q cal (i)+x i =Q cal (i)+xy i ; Among them, xy i-j Kalman filter fusion x i-j y i-j Error correction values ​​after two types of errors; x i-j The error prediction value of the AR(p) model is given; y i-j The predicted value of time ij calculated using the corresponding fluctuation difference method is used as a substitute for the true value and the calculated value Q. cal The difference between (ij).

2. A real-time flood forecast correction system based on Kalman filtering, characterized in that, include: Flow sequence acquisition module: used to acquire the first flow sequence of observed values ​​and the second flow sequence of calculated values ​​from the forecast model, respectively; Error sequence calculation module: used to calculate the error sequence based on the first flow sequence and the second flow sequence; Error sequence segmentation module: used to segment the error sequence using the optimal segmentation method; The error sequence is segmented using the optimal segmentation method as follows: A sequence of data of length N is X=(x1,x2,...,x...). N The data is divided into K segments, with n data points in the k-th segment. k (k=1,2,...,K); the mean of the entire sequence data is u, and the total sum of squared deviations is... 2 The mean value within the k-th segment is u. k The sum of squared deviations within the K segments is : ; In the formula, N k Let N be the number of the first k segments of the sequence, N0=0, N1=n1, N2=n1+n2, and N... K =N; AR(p) model building module: used to calculate the error x of the k-th segment. i Construct an error AR(p) model; The error of segment k is x i The error AR(p) model is constructed as follows: ; In the formula, the mean value of the k-th error sequence is u. k ; i (i=1,2,...,p) are the autoregressive coefficients; ε i The residuals of the autoregressive model; The variance of the AR(p) model is : ; In the formula, Let x be the error i (i=LL k-1 +1~LL k The variances of ρ1, ρ2, ..., ρ p Let x be the k-th segment of the error sequence. i (i=LL) k-1 +1~LL k The autocorrelation coefficient of LL; k For the error of the k-th segment, LL k-1 This represents the error of the (k-1)th segment; Flow estimation module: Used to estimate the error by taking the Kalman filter error correction value as the input of the AR(p) model, and then obtain the flow estimation value; The estimated flow rate is: =Q cal (i)+x i =Q cal (i)+xy i ; Among them, xy i-j Kalman filter fusion x i-j y i-j Error correction values ​​after two types of errors; x i-j The error prediction value of the AR(p) model is given; y i-j The predicted value of time ij calculated using the corresponding fluctuation difference method is used as a substitute for the true value and the calculated value Q. cal The difference between (ij).