A gate group timing flow anomaly diagnosis method based on statistical error analysis
By using a method based on filtering and statistical error analysis, combined with the gate characteristics to fit the flow error range, the problem of the influence of outliers in gate group regulation was solved, high-accuracy flow anomaly diagnosis and data correction were achieved, and the reliability and consistency of monitoring data were improved.
Patent Information
- Application Number
- CN202411119761.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-08-15
AI Technical Summary
In the existing technology of gate group control, the emergence of outliers leads to a decrease in the consistency and reliability of monitoring data, affecting the accuracy of engineering scheduling decisions. In addition, the decision-making process of machine learning models is poorly interpretable when there is a lack of labeled data.
The flow data preprocessing based on the filtering method is combined with statistical error analysis. Noise is eliminated through median filtering and recursive average filtering. The flow error distribution is analyzed. The kup/down-σ rule is used to determine the reasonable error range. The relationship between the gate flow coefficient is fitted based on historical data to diagnose and correct abnormal flow.
It improves the accuracy of abnormal diagnosis, reduces missed detection and false detection rates, improves the reliability and consistency of monitoring data, and has interpretability and flexibility to adapt to changes in the characteristics of different gates.
Smart Images

Figure CN119004329B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of water conservancy informatization research, and particularly relates to a gate group time sequence flow abnormality diagnosis method based on statistical error analysis. BACKGROUND
[0002] Water regime monitoring data directly affects the results of gate group regulation and control decisions. Flow, as an important indicator of real-time monitoring, can comprehensively reflect the changes of water flow and is an important basis for gate group regulation and control decisions. However, environmental changes, equipment failures, human interventions, line transmission and other influencing factors may cause the appearance of abnormal values, reducing the consistency of real-time monitoring data, and further affecting the reliability of engineering scheduling decisions and hydraulic simulation pre-rehearsal.
[0003] Data cleaning is a necessary link to ensure the quality of monitoring data. Common data cleaning methods can be divided into two categories: statistical methods and machine learning methods. Statistical methods mostly use the 3σ rule to determine a reasonable range, and use distance, clustering, deviation, density and other indicators to achieve abnormality diagnosis. The 3σ rule requires that the monitoring data follow a normal distribution, which may not match the actual situation, leading to false positives and false negatives in the cleaning process. Machine learning-based anomaly detection methods convert the detection problem into a classification or prediction problem through models such as convolutional neural networks (CNN), and use models such as recurrent neural networks (RNN) and long short-term memory networks (LSTM) to achieve anomaly detection of time series data. However, machine learning models require a large amount of labeled data for training, and in practical applications, it is often difficult to obtain labeled information for abnormal data, and the black box model characteristics result in poor interpretability of the decision-making process, limiting its application in practical engineering. SUMMARY
[0004] The present application aims to provide a gate group time sequence flow abnormality diagnosis method based on statistical error analysis, thereby solving the aforementioned problems in the prior art.
[0005] To achieve the above-mentioned purpose, the technical solution adopted by the present application is as follows:
[0006] A gate group time sequence flow abnormality diagnosis method based on statistical error analysis, comprising the following steps,
[0007] S1, flow data preprocessing based on filtering method:
[0008] The real-time collected flow data of the gate station is subjected to median filtering, and the data after median filtering is subjected to recursive average filtering to obtain the final filtering result.
[0009] S2, flow error distribution analysis:
[0010] According to the error between the pre-processed flow data and the real-time monitoring flow data, analyze whether the flow error distribution is a bell-shaped curve similar to the normal distribution;
[0011] S3, based on k up / down - Determination of reasonable flow error range of the σ law:
[0012] Fit the cumulative frequency curve of the regulating gate flow error to obtain the cumulative distribution function Φ of the regulating gate error; refer to the 3σ rule and use the probability formula to inversely calculate the k value, and determine the reasonable flow error range of the gate station based on the k value;
[0013] S4. Curve fitting of the relationship between gate discharge coefficient:
[0014] Based on the historical gate water conditions and engineering monitoring information, the relationship between the gate discharge coefficient and the gate opening and the water level difference before and after the gate is fitted;
[0015] S5. Calculation of theoretical sluice station flow:
[0016] Calculate theoretical sluice station flow based on the historical sluice flow coefficient relationship;
[0017] S6. Diagnosis and correction of abnormal traffic data:
[0018] Whether the monitored flow data is abnormal is determined based on whether the real-time gate flow error is within a reasonable flow error range, and the abnormal monitored flow data is corrected based on the theoretical gate station flow.
[0019] Preferably, the median filter is specifically to perform multiple consecutive samplings at the same time, sort the sample values by size, and take the middle value as the current sampling value.
[0020] Preferably, the recursive average filtering is specifically to construct a data buffer with a fixed length, input the sampled values after median filtering into the buffer, remove the maximum and minimum values in the buffer, and calculate the mean of the remaining values as the result of this filtering; use the first-in-first-out principle to update the data in the buffer, continue the above process, realize real-time recursive filtering of time series data, and finally output the filtered traffic data.
[0021] Preferably, whenever a new traffic data point enters the data queue, median filtering and recursive average filtering calculations are performed, and the new mean is output as the filtering result, the new data point is added to the end of the data queue, and the oldest data point is removed to keep the data queue length unchanged.
[0022] Preferably, step S2 specifically includes calculating the error between the filtered data and the monitoring data to obtain the long-sequence flow monitoring error; calculating the mean μ and standard deviation σ of the long-sequence flow monitoring error and drawing an error histogram to determine whether the flow monitoring error is a bell-shaped curve similar to a normal distribution.
[0023] Preferably, step S3 specifically includes the following contents:
[0024] S301, draw the cumulative frequency curve of the flow error of the regulating gate, use the Boltzmann function to fit the cumulative frequency curve, and use the determination coefficient R 2 Evaluate the fitting accuracy of the fitting curve and obtain the cumulative distribution function Φ of the flow error of the regulating gate;
[0025] S302, setting the cumulative distribution function Φ of the flow error of the regulating gate, and using the probability formula to reversely calculate the k value with reference to the 3σ rule; the meaning of the k value is that 99.73% of the data points in the long sequence flow monitoring error should fall within the range of μ±kσ;
[0026] S303, calculate the reasonable flow error range of the gate station [μ-k down σ,μ+k up When the flow error is within this interval, the flow data is considered normal; when the flow error is outside this interval, the flow data is considered abnormal.
[0027] Preferably, step S4 specifically includes collecting historical water conditions and working conditions data including gate opening, water level before the gate, water level after the gate, gate flow rate, and gate hole width;
[0028] The ratio of gate opening to water level difference before and after the gate is taken as the independent variable, and the gate discharge coefficient is taken as the dependent variable. The relationship between the historical gate discharge coefficient is fitted based on the principle of least squares method, and the coefficient of determination R is used to determine the gate discharge coefficient. 2 Discriminant function fitting effect.
[0029] Preferably, step S5 specifically comprises calculating the theoretical gate flow coefficient from the historical gate flow coefficient relationship according to the real-time gate opening, water level before the gate, and water level after the gate, and calculating the theoretical gate station flow according to the theoretical gate flow coefficient.
[0030] Preferably, step S6 specifically includes the following contents:
[0031] S601, determine whether the real-time gate flow error is within the reasonable flow error range [μ-k down σ,μ+k up If yes, the flow rate data monitored at this moment is considered normal and retained; otherwise, the flow rate data monitored at this moment is considered abnormal.
[0032] S602: For abnormal values, data correction is performed according to the theoretical sluice station flow value, thereby ensuring the accuracy and reliability of the sluice flow monitoring data.
[0033] The beneficial effects of the present invention are as follows: 1. The method of the present invention analyzes the true error distribution of flow monitoring data and tailors a reasonable error range for specific project monitoring data. Compared with directly applying the 3σ rule, it can fully utilize the anomaly monitoring efficiency of different gates, effectively improve the accuracy of anomaly diagnosis, and reduce the rate of missed or false detection. 2. The method of the present invention combines theoretical calculation formulas with actual monitoring data, while fully utilizing the interpretability and generalization capabilities of the anomaly diagnosis model, and has certain flexibility and learnability advantages. With the rolling update of monitoring data, the internal parameters of the anomaly diagnosis model can be updated. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a flow chart of a diagnostic method according to an embodiment of the present invention;
[0035] Figure 2 1 is a flow error histogram of the regulating gate at the outlet of the inverted siphon of Puhe River in an embodiment of the present invention;
[0036] Figure 3 1. is a graph showing the cumulative frequency of error of the regulating gate at the outlet of the Puhe inverted siphon according to an embodiment of the present invention;
[0037] Figure 4 1 is a flow data diagnosis effect diagram based on the diagnosis method in an embodiment of the present invention;
[0038] Figure 5 This is a flow data diagnosis effect diagram based on the traditional 3σ method in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0040] Example 1
[0041] like Figure 1 As shown, in this embodiment, in order to solve the problem of abnormal data management in flow monitoring of sluice stations in water conservancy projects, a method combining filtering algorithms and statistical analysis is provided to diagnose abnormal values and interpolate abnormal values based on the stable flow relationship of the sluice station. By utilizing the error distribution and stable mapping relationship of the actual sluice station project monitoring data, a management framework for sluice station flow monitoring data is tailored to further reduce the proportion of misjudgments and wrong judgments and improve the reliability and consistency of monitoring data. It specifically includes the following parts:
[0042] 1. Traffic data preprocessing based on filtering method
[0043] The real-time collected gate station flow data is subjected to median filtering, and the median filtered data is subjected to recursive averaging filtering to obtain the final filtering result.
[0044] In this embodiment, the time series data is preprocessed based on the filtering method. Compared with the traditional filtering method, the recursive median mean filtering has a stronger anti-interference ability, can effectively eliminate the abnormal values with noise, and improve the quality of the monitoring data. The recursive median mean filtering algorithm combines the advantages of median filtering and mean filtering. Its basic principle is to store data in time series and build a data buffer with a fixed length. The data is updated in the buffer using the first-in-first-out principle. Its core includes two parts: median calculation (median filtering) and mean calculation (recursive mean filtering).
[0045] 1. Median filtering: Sampling multiple times continuously at the same time, sorting the sample values by size, and taking the middle value as the current sampling value
[0046] 2. Recursive average filtering: To reduce the impact of extreme values, remove the maximum and minimum values in the buffer and calculate the mean of the remaining values.
[0047] Construct a data buffer of fixed length, input the sampled values after median filtering into the buffer, remove the maximum and minimum values in the buffer, and calculate the mean of the remaining values as the result of this filtering; use the first-in-first-out principle to update the data in the buffer, continue the above process, realize real-time recursive filtering of time series data, and finally output the filtered traffic data.
[0048] In this embodiment, whenever a new data point enters the queue, the median and mean calculation steps described above are executed, and the new mean is output as the filtering result. The new data point is added to the end of the queue, and the oldest data point is removed to maintain the queue length. This process continues, achieving real-time recursive filtering of time series data.
[0049] 2. Flow Error Distribution Analysis
[0050] According to the error between the preprocessed flow data and the real-time monitoring flow data, it is analyzed whether the flow error distribution is a bell-shaped curve similar to the normal distribution.
[0051] Specifically: calculate the error between the filtered data and the monitoring data to obtain the long-sequence flow monitoring error; calculate the mean μ and standard deviation σ of the long-sequence flow monitoring error and draw an error histogram to determine whether the flow monitoring error is a bell-shaped curve similar to the normal distribution.
[0052] According to the flow error distribution, the flow error of each regulating gate presents a bell-shaped curve similar to normal distribution, but the statistical indicators show that it does not completely conform to normal distribution, and the kurtosis and skewness of each curve are different, so the 3σ rule cannot be directly used for abnormal value diagnosis.
[0053] III. Determination of reasonable flow error range based on k up / down -σ rule
[0054] The cumulative frequency curve of the regulating gate flow error is fitted to obtain the cumulative distribution function Φ of the regulating gate error, and the k value is inversely calculated by using the probability formula with reference to the 3σ rule, and the reasonable flow error range of the gate station is determined based on the k value. Specifically, the following steps are included,
[0055] 3.1. Draw the cumulative frequency curve of the regulating gate flow error, fit the cumulative frequency curve using the Boltzmann function, and use the coefficient of determination R 2 Evaluate the fitting accuracy of the fitted curve to obtain the cumulative distribution function Φ of the regulating gate flow error.
[0056] 3.2. Set the cumulative distribution function Φ value of the regulating gate flow error, and inversely calculate the k value by using the probability formula with reference to the 3σ rule. The meaning of k value is that 99.73% of the data points in the long sequence flow monitoring error should fall within the range of μ±kσ.
[0057] 3.3. Calculate the reasonable flow error range [μ-k down σ, μ+k up σ] of the gate station. When the flow error is within this interval, the flow data is considered normal, and when the flow error is outside this interval, the flow data is considered abnormal.
[0058] In this embodiment, when the data satisfies the standard normal distribution, the 3σ rule requires that 99.73% of the data falls within the range of μ±3σ, i.e. the points exceeding 3 times the standard deviation can be considered as abnormal values or extreme values. For the bell-shaped curve similar to normal distribution, the k up / down -σ rule can be used to determine the reasonable error range.
[0059] The key of the k up / down -σ rule to judge abnormal values lies in determining the k up / down value. The cumulative frequency curve of the regulating gate flow error needs to be drawn, and the cumulative frequency curve is fitted using the Boltzmann function to obtain the cumulative distribution function Φ. For example, when k up / down = 3, Φ(3) is 0.99865, which means that the probability of the value distributed in the interval (μ-3σ, μ+3σ) is 99.73%, and the probability of the value distributed outside this interval is less than 0.3%, as shown in formula (1). Therefore, when the cumulative distribution function Φ value at a certain point is known, the k value can be inversely calculated by using the probability formula, as shown in formula (2).
[0060] P{μ-3σ <x<μ+3σ}=2Φ(3)-1=2×0.99865-1=0.9973 (1)
[0061] P{μ-kσ <x<μ+kσ}=2Φ(k)-1=2×0.99865-1=0.9973 (2)
[0062] Where μ is the mean, σ is the standard deviation, and Φ(k) is the cumulative distribution function.
[0063] Similar to the 3σ rule, the lower limit of the reasonable error of the proposed gate station is μ-k down σ, the upper limit of reasonable error is μ+k up σ, when the flow error of the gate station is symmetrically distributed, k up / down The values are the same.
[0064] 4. Curve Fitting of the Relationship between Gate Flow Coefficient
[0065] Based on the historical gate water conditions and engineering monitoring information, the relationship between the gate discharge coefficient and the gate opening and the water level difference before and after the gate is fitted.
[0066] Specifically: collect historical water conditions and engineering conditions data, including gate opening, water level before the gate, water level after the gate, gate flow rate, and gate hole width.
[0067] The gate flow coefficient is related to factors such as gate opening and water level difference before and after the gate. The ratio of gate opening to water level difference before and after the gate is used as the independent variable, and the real-time gate flow coefficient is used as the dependent variable. The relationship between the historical gate flow coefficient is fitted based on the principle of least squares method, and the coefficient of determination R is used to determine the coefficient of flow. 2 Discriminant function fitting effect.
[0068] 5. Calculation of theoretical sluice station flow
[0069] The theoretical gate flow coefficient is calculated based on the historical gate flow coefficient relationship, and the theoretical gate station flow is calculated based on the theoretical gate flow coefficient.
[0070] Specifically: Based on the measured gate opening, water level before the gate, and water level after the gate, the different theoretical gate flow coefficients corresponding to different measured data are calculated using the historical gate flow coefficient relationship, and the corresponding theoretical gate flow values are calculated using formula (3).
[0071]
[0072] Among them, m is the flow coefficient of the gate; Q is the flow of the gate, m 3 / s; b is the gate hole width, m; g is the acceleration of gravity, which is 9.81m / s 2; H0 is the theoretical water depth before the gate, m; H2 is the theoretical water depth after the gate, m.
[0073] 6. Diagnosis and Correction of Abnormal Traffic Data
[0074] Whether the monitored flow data is abnormal is determined based on whether the real-time gate flow error is within a reasonable flow error range, and the abnormal monitored flow data is corrected based on the theoretical gate station flow.
[0075] Specifically: determine whether the real-time gate flow error is within the reasonable flow error range [μ-k down σ,μ+k up If yes, the flow rate data monitored at this moment is considered normal and retained; otherwise, the flow rate data monitored at this moment is considered abnormal.
[0076] For abnormal values, data correction is performed according to the theoretical gate station flow value, thereby ensuring the accuracy and reliability of the gate flow monitoring data.
[0077] Example 2
[0078] In this embodiment, the execution process and effectiveness of the method of the present invention are specifically described by taking the Buhe inverted siphon outlet control gate as an example.
[0079] 1. Preprocessing time series data based on filtering method
[0080] Based on a recursive median-mean filtering algorithm, traffic data is stored in time series and a fixed-length data buffer is constructed. The data in the buffer is sorted by magnitude. To reduce the impact of extreme values, the maximum and minimum values in the buffer are removed, and the mean of the remaining values is calculated as the filtering output. Data in the buffer is updated using the first-in, first-out principle.
[0081] 2. Analyze the flow error distribution
[0082] The error between the filtered data and the monitoring data was calculated to obtain the long-sequence flow monitoring error. The mean μ and standard deviation σ of the error were calculated, and the error histogram was plotted. According to the flow error distribution, the flow error of each control gate showed a bell-shaped curve similar to the normal distribution, but the statistical indicators showed that it did not completely obey the normal distribution, and the kurtosis and skewness between the curves were different, so the 3σ rule could not be directly used for outlier diagnosis. Table 1 shows the statistical indicators obtained from the analysis. Figure 2 is the error histogram.
[0083] Table 1 Error statistical indicators
[0084] Gate station name Skewness Kurtosis μ σ Puhe inverted siphon outlet control gate -1.68949 63.42421 -0.00144 0.45785
[0085] 3. Determine a reasonable error range
[0086] For a bell-shaped curve similar to the normal distribution, a k-value similar to the 3σ rule can be used. up / down -σ rule determines the reasonable error range. To determine k up / down The value of the flow error of the regulating gate needs to be plotted, and the cumulative frequency curve is fitted with the Boltzmann function to obtain the cumulative distribution function Φ. Table 2 shows the fitting formula and R of the regulating gate. 2 result, Figure 3 It is the error cumulative frequency curve.
[0087] Table 2 Cumulative frequency curve fitting formula
[0088] Gate station name Cumulative frequency curve fitting formula <![CDATA[R 2 ]]> Puhe inverted siphon outlet control gate y=99.81654+(0.1958-99.81654) / (1+exp((k-0.09769) / 0.1731)) 0.99
[0089] Let the cumulative frequency curve fitting formula result y = 0.99865 for the inverted siphon outlet control gate of the waterfall river. According to the cumulative frequency curve fitting formula, the k value is calculated and the result is 8.10. Since the error distribution is approximately symmetrical, it can be considered that k up / down = ±8.10. According to μ±k up / down The reasonable error range of the sluice gate at the outlet of the Puhe River is calculated to be [-3.710025, 3.707145]. The calculation results are shown in Table 3.
[0090] Table 3 Reasonable error range
[0091] Gate station name μ kσ Reasonable lower limit of error Reasonable upper limit of error Puhe inverted siphon outlet control gate -0.00144 ±3.708585 -3.710025 3.707145
[0092] 4. Fitting the relationship curve of gate discharge coefficient based on historical data
[0093] The gate discharge coefficient is related to factors such as gate opening and water level difference before and after the gate. The ratio of gate opening e and water level difference ΔH before and after the gate is used as the independent variable, and the real-time gate discharge coefficient M calculated from water conditions and engineering conditions data is used as the dependent variable. The function relationship is fitted based on the principle of least squares method, and the coefficient of determination R is used to determine the coefficient of flow. 2 The fitting effect of the function was judged and the fitting results are shown in Table 4.
[0094] Table 4 Cumulative frequency curve fitting formula
[0095] Gate station name variable Gate flow coefficient formula <![CDATA[R 2 ]]> Puhe inverted siphon outlet control gate e / ΔH M = 0.0082(e / ΔH) 2 + 0.9936(e / ΔH) - 0.3307 0.998
[0096] 5. Calculate theoretical sluice station flow
[0097] According to the measured gate opening, water level before the gate, and water level after the gate, the different theoretical gate flow coefficients corresponding to different measured data are calculated by the gate flow coefficient fitting function, and the corresponding theoretical gate flow values are calculated using formula (3).
[0098] 6. Diagnosis and Correction of Abnormal Traffic Data
[0099] Based on the reasonable error range of [-3.710025, 3.707145] for the flow rate passing through the gate at each moment, the measured flow rate error is determined to be within the reasonable error range. If it is within the reasonable error range, the monitoring data at that moment is considered normal and retained. If it is not within the reasonable error range, the monitoring data at that moment is determined to be an outlier. For outliers, the data is corrected according to the theoretical flow rate value of the gate station.
[0100] The method proposed in this invention is used to diagnose abnormal values of the measured flow data of the inverted siphon outlet gate of Puhe River for 240 hours in 2023. The results are as follows: Figure 4 As shown in the figure, when the time is 28h and 48h, the monitored flow exceeds the allowable error range and is diagnosed as an abnormal value. The traditional 3σ method is used to diagnose the measured data, and the results are as follows Figure 5 As shown in the figure, in the first 60 hours, the measured flow data were almost all abnormal values, inconsistent with the actual situation. Therefore, the method proposed in this paper can establish a reasonable error range that is more consistent with the specific gate characteristics, effectively improving the accuracy of abnormality diagnosis and reducing the rate of missed or false detection.
[0101] By adopting the above technical solution disclosed in the present invention, the following beneficial effects are obtained:
[0102] The present invention provides a method for diagnosing abnormal flow of gate groups based on statistical error analysis. The method of the present invention analyzes the true error distribution of flow monitoring data and tailors the reasonable error range of specific engineering monitoring data. Compared with the direct application of the 3σ rule, it can give full play to the abnormal monitoring performance of different gates, effectively improve the accuracy of abnormal diagnosis, and reduce the missed detection or false detection rate. The method of the present invention combines theoretical calculation formulas with actual monitoring data. While giving full play to the interpretability and generalization ability of the abnormal diagnosis model, it has certain flexibility and learnability advantages. With the rolling update of monitoring data, the internal parameters of the abnormal diagnosis model can be updated.
[0103] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for diagnosing abnormal flow in a gate group based on statistical error analysis, characterized by: The following steps are included: S1. Flow data preprocessing based on filtering method: Perform median filtering on the real-time collected gate station flow data, and perform recursive averaging filtering on the median filtered data to obtain the final filtering result; S2. Flow error distribution analysis: According to the error between the pre-processed flow data and the real-time monitoring flow data, analyze whether the flow error distribution is a bell-shaped curve similar to the normal distribution; S3, based on k up / down - Determination of reasonable flow error range of the σ law: The cumulative frequency curve of the regulating gate flow error is fitted to obtain the cumulative distribution function φ of the regulating gate error. The k value is then inverted using the probability formula with reference to the 3σ rule, and the reasonable flow error range of the gate station is determined based on the k value. Step S3 specifically includes the following contents: S301, draw the cumulative frequency curve of the flow error of the regulating gate, use the Boltzmann function to fit the cumulative frequency curve, and use the determination coefficient R 2 Evaluate the fitting accuracy of the fitting curve and obtain the cumulative distribution function φ of the flow error of the regulating gate; S302, setting the cumulative distribution function Φ of the flow error of the regulating gate, and using the probability formula to reversely calculate the k value with reference to the 3σ rule; the meaning of the k value is that 99.73% of the data points in the long sequence flow monitoring error should fall within the range of μ±kσ; S303, calculate the reasonable flow error range of the gate station [μ-k down σ,μ+k up σ], when the flow error is within this interval, the flow data is considered normal; when the flow error is outside this interval, the flow data is considered abnormal; S4. Curve fitting of the relationship between gate discharge coefficient: Based on the historical gate water conditions and engineering monitoring information, the relationship between the gate discharge coefficient and the gate opening and the water level difference before and after the gate is fitted; Step S4 specifically includes collecting historical water and engineering data including gate opening, water level before the gate, water level after the gate, gate flow rate, and gate hole width; The ratio of gate opening to water level difference before and after the gate is taken as the independent variable, and the gate discharge coefficient is taken as the dependent variable. The relationship between the historical gate discharge coefficient is fitted based on the principle of least squares method, and the coefficient of determination R is used to determine the gate discharge coefficient. 2 Discriminant function fitting effect; S5. Calculation of theoretical sluice station flow: Calculate theoretical sluice station flow based on the historical sluice flow coefficient relationship; Step S5 specifically includes calculating the theoretical gate flow coefficient from the historical gate flow coefficient relationship based on the real-time gate opening, the water level before the gate, and the water level after the gate, and calculating the theoretical gate station flow based on the theoretical gate flow coefficient; S6. Diagnosis and correction of abnormal traffic data: Whether the monitored flow data is abnormal is determined based on whether the real-time gate flow error is within a reasonable flow error range, and the abnormal monitored flow data is corrected based on the theoretical gate station flow.
2. The method for diagnosing abnormal flow rate in a gate group based on statistical error analysis according to claim 1, characterized in that: Specifically, median filtering involves taking multiple samples at the same time, sorting the sample values by size, and taking the middle value as the current sample value.
3. The method for diagnosing abnormal flow rate in a gate group based on statistical error analysis according to claim 2, characterized in that: The recursive average filtering is specifically to build a data buffer of fixed length, input the sampled values after median filtering into the buffer, remove the maximum and minimum values in the buffer, and calculate the mean of the remaining values as the result of this filtering; use the first-in-first-out principle to update the data in the buffer, continue the above process, realize real-time recursive filtering of time series data, and finally output the filtered traffic data.
4. The method for diagnosing abnormal flow rate in a gate group based on statistical error analysis according to claim 3, characterized in that: Whenever a new traffic data point enters the data queue, median filtering and recursive average filtering calculations are performed, and the new mean is output as the filtering result. The new data point is added to the end of the data queue and the oldest data point is removed to keep the data queue length unchanged.
5. The method for diagnosing abnormal flow rate of a gate group based on statistical error analysis according to claim 1, characterized in that: Step S2 specifically includes calculating the error between the filtered data and the monitoring data to obtain the long-sequence flow monitoring error; calculating the mean μ and standard deviation σ of the long-sequence flow monitoring error and drawing an error histogram to determine whether the flow monitoring error is a bell-shaped curve similar to a normal distribution.
6. The method for diagnosing abnormal flow rate in a gate group based on statistical error analysis according to claim 1, characterized in that: Step S6 specifically includes the following contents: S601, determine whether the real-time gate flow error is within the reasonable flow error range [μ-k down σ,μ+k up If it is within σ], the flow rate data monitored at that moment is determined to be normal and retained; Otherwise, the monitored flow data at this moment is determined to be an abnormal value; S602: For abnormal values, data correction is performed according to the theoretical sluice station flow value, thereby ensuring the accuracy and reliability of the sluice flow monitoring data.