Ground wind direction observation data anomaly detection method
By establishing a wind direction change model and a sparse angle wind direction landing precursor table, identifying wind direction data abnormalities, solving the timeliness and applicability of the existing technology stroke wind direction data monitoring, and achieving efficient detection of complex wind direction modes and multi-component faults.
Patent Information
- Application Number
- CN202411245892.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-13
AI Technical Summary
The prior art is difficult to detect abnormalities in observing equipment in a timely manner when monitoring the quality of ground wind direction data, especially for complex wind direction modes and multi-component fault conditions, and cannot be applied to different types of wind direction sensors, and it is difficult to take into account real-time and time window settings. accuracy.
By establishing a wind direction change model, the wind direction data information is recorded using the sparse angle wind direction landing precursor table, the wind direction data is modeled to be a random walk process within the range of 0-360 degrees, the sparse or empty intervals are identified to find abnormalities, and the extremely small probability of The atypical wind direction sequence pattern is abnormal.
It realizes flexible and real-time wind direction data abnormal detection within any window length, and is suitable for different types of wind direction sensors, improving the robustness and sensitivity of detection and avoiding misjudgment.
Smart Images

Figure BDA0005030713360000031 
Figure BDA0005030713360000032 
Figure BDA0005030713360000041
Abstract
Description
Technical Field
[0001] The present invention relates to the field of meteorological information processing, and in particular to a method for detecting anomalies in ground wind direction observation data. Background Art
[0002] Wind is one of the important dynamic variables in meteorological elements that characterize atmospheric movement. It can reflect atmospheric circulation and the transfer of heat and water vapor between the earth's surface and the atmosphere. [1] Surface wind direction has a direct impact on weather forecasts, pollutant diffusion research, transportation safety, and pesticide spraying operations. [2-6] High-quality ground wind direction observation data is also of great value in architectural design, urban planning and climate feasibility demonstration. [7,8] .
[0003] Observation data can directly reflect the operating status of observation equipment, and through data analysis, the operating status of equipment can be remotely monitored. However, compared with other factors, the wind direction pattern in the natural environment is complex and changeable, so it is always difficult to monitor the quality of wind direction data and detect abnormalities of observation equipment in time. Jimenez et al. [9] Moving mean and moving variance have been used to perform quality control on ground wind direction observation data, but this method can only detect serious anomalies such as missing wind direction data samples within a large angle range, and is only applicable to historical data.
[0004] Chinese scientific and technological workers have carried out a lot of work on wind direction sensor fault detection methods based on observation data.
[10] By listing the missing wind direction angle range corresponding to each Gray code fault state as the fault set element, it is determined whether there is a Gray code fault based on whether the observed data contains the fault element subset.
[11] Zhang Yongjun et al.
[12] Sensor failure can be detected or judged by matching the distribution of wind direction observation data with the distribution of wind direction data when each bit of Gray code fails.
[13] Liu Ying et al.
[14] The wind direction sensor fault is detected by reverse checking the Gray code of wind direction data. If a Gray code is always 0 or 1, or the number of occurrences of these two states differs too much, the Gray code is judged to be invalid.
[0005] The above data anomaly detection scheme is based on the Gray code encoding of the photoelectric wind direction sensor. It determines the abnormality of the wind direction data based on the data of a specific period of time by determining that a certain Gray code value remains unchanged or the wind direction data within the angle range it represents is continuously missing. The common problems they have are: First, in order to ensure a high detection accuracy, the statistical period is mostly set to months or ten days. However, the time window setting for periodic detection is a difficult problem. If it is too large, it is difficult to detect data anomalies in time and intermittent anomalies cannot be detected. If it is too small, it may cause more misjudgments, affecting the application of these methods in business systems; second, the failure of wind direction observation equipment involves multiple components. The above method cannot detect some data anomalies that are different from Gray code failure failures; third, for wind direction data collected using other types of wind direction sensors, such as Hall effect electromagnetic wind direction sensors, resistive wind direction sensors, and ultrasonic wind direction sensors, the above method is also powerless.
[0006] References
[0007] [1]Hui W, Xiaolan W, Val R.Swail. Homogenization and Trend Analysis of Canadian Near-Surface Wind Speeds. Journal of Climate, 2010, 23(3): 1209-1225.
[0008] [2]ARTHUR T.DEGAETANO.A Quality-Control Routine for Hourly WindObservations.Journal of Atmospheric and OceanicTechnology,1997,14(4):308-317..
[0009] [3] Liao Biting, Huang Jun, Wang Chunlin, et al. Comparative analysis of boundary layer characteristics of haze process and clean process in Guangzhou. Chinese Environmental Science, 2018, 38(12), 4432-4443.
[0010] [4] Yu Gengkang, Wang Boni, Chen Peng, et al. Characteristic analysis of continuous fog-haze weather in Jiangsu in 2013. Meteorology, 2015, 41(5), 622-629.
[0011] [5] Qin Jian, Zhao Gang, Chen Yan, et al. Variation characteristics of local atmospheric wind field in the lower reaches of Jinsha River. Meteorology, 2013, 39(6), 749-758.
[0012] [6] Niu Diyu, Bao Yunxuan, Yuan Chengsong, et al., Temporal and spatial distribution characteristics of strong winds and strong crosswinds on typical expressways in Jiangsu Province. Journal of Natural Disasters, 2017, 26(4), 63-76
[0013] [7]Mehmet Ak, Sinem Ozdede. Urban landscape design and planning related to wind effects. Oxidation Communications 39(1): 699-710
[0014] [8] Yang, J, Fu, x (2020) Wind Environment Optimization Design Practice in Planning and Design. In: The Center of City: Wind Environment and SpatialMorphology. Springer, Singapore. https: / / doi.org / 10.1007 / 978-981-13-9690-8_7
[0015] [9] PEDRO A.JIME′NEZ, J.FIDEL GONZA′LEZ-ROUCO, JORGE NAVARRO. Quality Assurance of Surface WindObservations from Automated Weather Stations. Journal of Atmospheric and Oceanic Techno / ogy, 2010, 27(7): 1101-1122.
[0016]
[10] He Lide, Shen Xuefeng, Wu Shucheng use set theory to locate and determine wind direction sensor failures. Meteorological, Hydrological and Oceanographic Instruments, 2009(1): 69-71
[0017]
[11] Yang Lizhong, Li Chongzhi, Yu Qingping, Analysis of wind direction data in judging sensor failure, Meteorological, Hydrological and Oceanographic Instruments, 2010(6): 86-89
[0018]
[12] Chen Fengyun, Reverse Gray Code Detection of EC9-1 Wind Direction Sensor Fault, Meteorological, Hydrological and Oceanographic Instruments, 2010(1): 89-92
[0019]
[13] Zhang Yongjun, Zou Chao, Yang Hengxiang, et al. Wind direction sensor fault detection algorithm based on distribution law. Meteorological Science and Technology, 2013, 41(5), 837-842
[0020]
[14] Liu Ying, Wang Haijun, Li Zhonghua. Design and Application of Wind Direction Sensor Fault Detection Method Based on Observational Data. Meteorology, 2015, 41(11), 1408-1416. Summary of the invention
[0021] In view of the deficiencies in the prior art methods, the present invention estimates the model parameters of wind direction change based on the wind direction observation data obtained within the specified window, establishes a wind direction change model, and uses a sparse angle wind direction point precursor table to record wind direction data information; the wind direction data is modeled as a random walk process within the range of [0, 360) degrees, and potential abnormalities are discovered by finding sparse intervals or empty intervals; the distribution of subsequent wind direction points in non-sparse intervals or non-empty intervals is examined, and the method provided by the present invention for determining whether it belongs to an atypical wind direction sequence pattern with a very small probability is used to determine whether the wind direction sequence is abnormal. The detection method provided by the present invention does not rely on a specific Gray code encoding principle, has the generality of wind direction abnormal sequence detection, can detect complex wind direction abnormal sequences and avoid misjudgment of the situation where the real wind direction is stable for a long time and changes little, thereby improving the robustness of the detection method.
[0022] The present invention specifically comprises the following steps:
[0023] Step P1: Parameter setting
[0024] Step P2: Obtain wind direction data within a specified window;
[0025] Step P3: Establish a wind direction change sequence;
[0026] Step P4: Estimate the scale parameters of the wind direction variation model;
[0027] Step P5: Establish a statistical model of wind direction change;
[0028] Step P6: construct a sparse angle wind direction drop point precursor table;
[0029] Step P7: Identify the target sparse wind direction interval;
[0030] Step P8: consider the abnormality determination of a single sparse interval;
[0031] Step P9: Identify the target empty wind direction interval;
[0032] Step P10: Consider abnormality determination of all empty intervals.
[0033] The above-mentioned method for detecting anomaly of ground wind direction observation data, in step P1: the length T of the wind direction data window to be obtained, the minimum observation interval threshold msw, the width of the non-sparse interval or non-empty interval nsw, the sparse threshold st, the parameter sp of the size of the adjacent areas on both sides of the sparse interval considered by the algorithm and the anomaly judgment threshold ε t And other parameters to set.
[0034] In the above-mentioned method for detecting abnormality of ground wind direction observation data, in step P2: according to the window length T set in step P1, a wind direction data sequence X to be determined is obtained from a wind direction observation sequence. t ={x 1 , x 2 , x 3 , ..., x i , ..., x T}, x i ∈[0,360); The wind direction data comes from the real-time wind direction observation data of the transmission network or from the historical data stored in the data file after reception.
[0035] In the above-mentioned method for detecting abnormality of ground wind direction observation data, in step P3: the wind direction data sequence X obtained in step P2 is t According to formula (1), the wind direction change sequence D containing T-1 elements is obtained. t , d is one of the elements
[0036]
[0037] Where [] is the integer part, d i ∈[-180,180].
[0038] In the above-mentioned method for detecting anomaly of ground wind direction observation data, in step P4: the scale parameter λ of the wind direction change model is estimated according to formula (2):
[0039]
[0040] If λ=0 and the time length covered by the wind direction data sequence exceeds 12 hours, the wind direction data is reported to be abnormal and the abnormality judgment process is terminated.
[0041] In the above-mentioned method for detecting abnormality of ground wind direction observation data, in step P5: a statistical model of wind direction change d is established according to formula (3):
[0042]
[0043] in is the Laplace distribution Laplace(0,λ) with location parameter 0 and scale parameter λ, F(·) is the cumulative density function of the Laplace distribution, and I() is a Boolean function that takes 1 when the condition is true and 0 when the condition is false.
[0044] In the above-mentioned ground wind direction observation data anomaly detection method, in step P6: a sparse angle wind direction landing point precursor table is designed to record the wind direction data sequence X obtained in step P2 t The number of wind direction data at each angle and the precursor information of wind direction points that meet the sparse conditions.
[0045] The table consists of a header node array Heads[0, ..., 359] corresponding to 360 wind direction angles and an indefinite number of Node nodes that record the situation of the predecessor wind direction point of each angle wind direction data point; the Head node contains a sparse threshold st, records the number of wind direction points count at the corresponding wind direction angle and a pointer pLink pointing to the Node node; the Node node contains the angle preloc of the predecessor point, the serial number index of the predecessor wind direction point, and a pointer pLink pointing to the next Node point;
[0046] The wind direction data sequence X obtained by scanning step P2 t , count the number of wind direction points at each angle and add them to count; if the number of wind direction points at a certain angle is less than the given sparse threshold st, use the Node node to record the relevant angle and index information of its predecessor wind direction point.
[0047] The established sparse angle wind direction point precursor table can be used for the subsequent selection of specific intervals. The precursor wind direction point information in the table can be used to obtain how many subsequent wind direction points in a wind direction interval fall into a specific sparse interval or empty interval, so as to complete the subsequent abnormal judgment.
[0048] In the above-mentioned ground wind direction observation data anomaly detection method, in step P7: based on the given sparse threshold st and the minimum observation interval threshold msw, in the sparse angle wind direction point precursor table constructed in step P6, find the largest possible non-overlapping sparse wind direction interval with a degree interval ≥ msw and a number of wind direction points ≤ st, denoted as S k , k = 1, ... r;
[0049] There may be 0 or more such intervals. If there is no such sparse interval, report that the wind direction data for this section is normal; otherwise, execute step P8.
[0050] In the above-mentioned method for detecting abnormality of ground wind direction observation data, in step P8: for any target sparse wind direction interval S obtained in step P7 k =[d 1 , d 2], perform the following steps:
[0051] Step P801: In S k The two sides are divided into continuous and non-overlapping wind direction intervals of sp / 2 with a width of nsw. This set of wind direction intervals must contain non-sparse intervals. Assume that there are q non-sparse intervals, recorded as {NS i}, i = 1, ... q, and count the number of wind direction data points in each non-sparse interval {n i}.
[0052] Step P802: Estimate the arbitrary non-sparse interval NS obtained in step P801 according to formula (4) i Inner wind direction point x t The successor falls to S k Probability of being within:
[0053]
[0054] in For NS i and S k The distance between the centers of two intervals, For S k The width of the interval.
[0055] Step P803: According to the sparse angle wind direction point predecessor table constructed in step P6, the subsequent wind direction data points in each non-sparse interval that fall in the sparse interval S are counted. k The number of i}, i=1,...,q;
[0056] Step P804: For a given probability threshold ε t , NS i The inner wind direction point subsequently falls into S k The number of Z i , calculate the joint probability P{Z 1 ≤m 1 , ..., Z q ≤m q}
[0057]
[0058] If P{Z 1 ≤m 1 , ..., Z q ≤m q} satisfies the following formula
[0059] P{Z 1 ≤m 1 , ..., Z q ≤m q}<εt (9)
[0060] Report abnormal wind direction data and terminate the determination process.
[0061] Where P{Z i =j} is NS i The successor of the mid-wind direction point falls into S i The probability that the number of i is the number of wind direction points in the i-th non-sparse band.
[0062] In particular, when st = 0, then m 1 To m q are all 0, then
[0063]
[0064] The determination basis of wind direction data anomaly is simplified to satisfy formula (11):
[0065] P{Z 1 =0,...,Z q =0}<ε t (11)
[0066] Report abnormal wind direction data and terminate the determination process.
[0067] In the above-mentioned ground wind direction observation data anomaly detection method, in step P9: given the minimum observation interval threshold msw, according to the wind direction point count in the sparse angle wind direction landing point precursor table constructed in step P6, the largest possible wind direction interval with an angle interval width ≥ msw and a wind direction landing point number of 0 is found, which is recorded as B k , k=1,…r; there may be 0 or more such intervals. If there is no such empty wind direction interval, the reported data is normal; otherwise, proceed to step P10.
[0068] The above-mentioned method for detecting abnormality of ground wind direction observation data, in step P10, specifically comprises the following steps:
[0069] Step P1001: Divide the non-empty intervals in the wind direction range [0, 360) into a set of non-overlapping non-empty intervals {NB i}, and count the number of wind direction points in each non-empty interval {n i}, i = 1, ... q. The part with width less than nsw is discarded;
[0070] Step P1002: Estimate the non-empty interval NB obtained in step P1001 according to formula (16) i Inner wind direction point x t The successor falls into the empty interval B identified in step P9 kProbability of being within:
[0071]
[0072] in For NB i and B k The distance between the centers of two intervals, For B k The width of the interval.
[0073] Step P1003: Calculate the non-empty interval NB i The probability that the successor of a wind direction point falls into an empty interval
[0074] Step P1004: Calculate the probability P{Z} that the subsequent wind direction points of all non-empty intervals will not fall into the empty interval according to formula (17). 1 =0,...,Z q =0}
[0075]
[0076] If P{Z 1 =0,...,Z q =0} satisfies the following formula:
[0077] P{Z 1 =0,...,Z q =0}<ε t (18)
[0078] If the wind direction data is abnormal, the report is that the wind direction data is abnormal; otherwise, the report data is normal and the determination process is terminated.
[0079] The beneficial effects of the present invention are as follows:
[0080] 1. The present invention establishes a probability model of wind direction point jump for the first time, and designs a method and necessary data structure for determining wind direction data anomaly using this probability model. The method uses whether the subsequent jump pattern of the wind direction point in the sequence belongs to an atypical set with a very small probability of occurrence as the criterion for determining whether the wind direction sequence is abnormal. This method can be implemented within any window length with statistical significance, and has greater flexibility and real-time performance.
[0081] 2. The method of the present invention does not rely on a specific Gray code encoding principle, and is also applicable to observation data obtained by wind direction observation equipment based on other observation principles. It has the generality of wind direction anomaly sequence detection, which greatly improves the robustness of the detection method.
[0082] 3. The method of the present invention determines whether the wind direction data sequence is abnormal based on the dynamic process of subsequent jumps of wind direction points in the sequence. In principle, it is fundamentally different from the existing method of judging whether the wind direction data is abnormal based on whether a certain Gray code value remains unchanged in the wind direction data within a fixed period of ten days or a month, or whether the wind direction data is continuously missing within the angle range it represents, or whether the 16-direction wind direction distribution is abnormal. The present invention can find the situation where the aforementioned long-term coarse-grained statistical distribution is normal but the dynamic changes of the wind direction sequence are abnormal, detect anomalies that cannot be found by existing methods, and improve sensitivity. It can also avoid the situation where the normal wind direction sequence is misjudged as abnormal by the existing method when there is a prevailing wind. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] Figure 1 Two-dimensional planar representation of a wind direction data series.
[0084] Figure 2 Wind direction range W a Schematic diagram of the subsequent landing points of the mid-wind direction point.
[0085] Figure 3 System structure diagram for implementing wind direction data anomaly detection method.
[0086] Figure 4 Example of a precursor table of sparse angle wind direction drop points.
[0087] Figure 5 Typical existing difficult cases detected in the implementation of the present invention ( Figure 5 a 57669 station, Figure 5 b 59230 station, Figure 5 c 54249 station, Figure 5 d 51334 station). In the figure, the left side of the red line is the abnormal mode before the maintenance of the observation equipment, and the right side is the normal mode after the maintenance.
[0088] Figure 6. Instantaneous wind direction sequence at station 59985 from November 9, 2022 to December 10, 2022. DETAILED DESCRIPTION
[0089] 1. Definition
[0090] Several main definitions involved in the present invention are as follows:
[0091] Definition 1: Wind direction data sequence. Wind direction data sequence X t ={x 1 , x 2 , x 3 , ..., x i , ..., x T} is a time-ordered sequence of integers ranging from 0 to 359 degrees.
[0092] Definition 2 Predecessors and successors of wind direction data points. Two adjacent data points x in the wind direction data sequence i and x i+1 , we call x i For x i+1 The predecessor of x i+1 For x i The successor of.
[0093] Define 3 wind direction intervals. From the wind direction angle x 1 Rotate clockwise to x 2 The wind direction angle range covered is called a wind direction interval, denoted by W(x 1 , x 2 ), x 1 and x 2 is the boundary of this wind direction interval. 1 >x 2 , indicating that the wind direction range spans 360 degrees, such as W(315, 45) represents the wind direction range consisting of 315-359 degrees and 0-45 degrees.
[0094] Definition 4: Sparse wind direction interval. For a wind direction sequence to be judged as abnormal, the wind direction interval whose number of wind direction data points is less than or equal to the specified sparse threshold value st is called a sparse wind direction interval, which can be expressed as S(x 1 , x 2 , st) indicates that it forms a line with an angle x on the wind direction sequence diagram. 1 and x 2 The sparse wind direction point area with the boundary is referred to as the sparse interval without causing ambiguity. Figure 1 The S shown 1 is a sparse interval with a sparse threshold of 2.
[0095] Definition 5 Empty wind direction interval. The sparse interval band with st = 0 is called the empty wind direction interval, and is represented by B(x 1 , x 2 ) indicates. Figure 2 B(18,132) in the figure represents an interval from 18 degrees to 132 degrees with no wind direction point in the 20 consecutive wind direction points under investigation. If there is no ambiguity, it is referred to as the empty interval.
[0096] Definition 6: Non-sparse wind direction interval and non-empty wind direction interval. For a wind direction sequence under consideration, if the number of wind direction points in a certain wind direction interval NS(x1, x2) is greater than the sparse threshold st, then this interval is called a non-sparse wind direction interval. Similarly, when st>0, it is called a non-empty wind direction interval.
[0097] Define 7 wind direction interval jump events. A wind direction interval W a The wind direction point x′ iThe successor point x″ i Whether it falls into the wind direction interval W b is a random event, called the wind direction interval jump event Y(i, W a , W b ), the successor point x″ i Falling into interval W b If it does not fall into the range, its value is 1, and if it does not fall into the range, its value is 0. That is:
[0098]
[0099] If attached Figure 2 For the wind direction sequence, W a There are 8 wind direction points, marked as x′ 1 ~x′ 8 . Y(1,W a , W b )=0,Y(2,W a , W b )=1, because the wind direction falls on point x′ 1 The successor point x″ 1 Not in W b Inside, and W a The wind direction point x′ 2 The successor point x″ 2 In W b Inside.
[0100] 2 Specific implementation steps
[0101] In order to explain the present invention more clearly, the present invention is further described below in conjunction with preferred embodiments and drawings. It should be understood by those skilled in the art that the content described below is illustrative rather than restrictive, and should not be used to limit the scope of protection of the present invention.
[0102] Specifically, the present invention provides a method for detecting abnormality in ground wind direction observation data, and its system structure is as shown in the attached figure. Figure 3 It includes modules such as data acquisition, sequence transformation, wind direction change modeling, construction of sparse angle wind direction landing point precursor table and anomaly discrimination. Among them, the anomaly discrimination module is the core part of this method, corresponding to P7 to P10 in the following steps.
[0103] Step P1: For the wind direction data window length T to be obtained, the minimum observation interval threshold msw, the width of the segmented non-sparse interval or non-empty interval nsw, the sparse threshold st, the parameter sp that limits the size of the adjacent areas on both sides of the sparse interval considered by the algorithm, and the abnormality judgment threshold ε t The parameters are set as follows. In this preferred embodiment, the parameters are set as follows: T = [60, ... 2 i ×60, ..., 2 7×60], msw=5, nsw=5.625, st=0, sp=10, ε t =10 -12 . T is a set of values, indicating that this detection is performed on a variable window.
[0104] In some other specific implementations, the setting of these parameters can be performed with reference to the following principles or methods:
[0105] Step P101: Setting of window length T:
[0106] Because when there is not enough wind direction data to make an abnormal judgment, it can be further judged by adding data, so the specific implementation recommends the use of variable window discrimination technology, as long as the wind direction data pattern shows abnormality within a certain period of time, the abnormality will be reported. In the implementation process of the present invention, the abnormality discrimination process will be called repeatedly, and the parameter T should be in T min To T max Take a value between.
[0107] The input of this preferred embodiment is the instantaneous wind direction data within [0, 360) degrees arriving at a certain time interval (such as minutes or hours). Because estimating the parameters of the wind direction change model requires a certain amount of wind direction data, it is recommended that the minimum discrimination window length T min No less than 60 wind direction data points, maximum discrimination window T max The length is 128×T min , which is 128 times the minimum window length.
[0108] Assume T min =60, the 60×i wind direction data is currently read, then the system will determine [60×i-2 0 ×60,60×i],[60×i-2 1 ×60, 60×i], ..., [60×i-2 k ×60, 60×i], ..., [60×i-2 7 ×60, 60×i], etc., to see if the wind direction data in windows of different lengths is abnormal. k ×60<0, indicating that the wind direction data stream is in the initial reading stage, 2 k If the ×60 length window data is incomplete, the corresponding window data will not be judged as abnormal. In actual implementation, the minimum window can be adjusted to a certain extent according to the actual situation.
[0109] Step P102: msw, nsw, st, sp and ε t Settings:
[0110] China's ground automatic station observation specifications require that the wind direction measurement resolution is 2.8125 degrees and the maximum allowable error is 3 degrees. Therefore, a 3-degree empty wind direction interval may appear in the wind direction observation data. The minimum observation interval threshold msw of the present invention is 5. The width nsw of the segmented non-sparse interval or non-empty interval is recommended to be 5.625, which is the wind direction angle range corresponding to the two lowest-order Gray codes of the seven-bit photoelectric Gray code wind direction sensor currently commonly used in China. The sparse threshold st should generally be less than 4. If the number of wind direction points in the observation interval is less than st, it is considered to be sparse; the parameter sp that limits the size of the adjacent areas on both sides of the sparse interval considered by the algorithm is recommended to be an even number not greater than 12, indicating an interval of sp×nsw size on both sides of the sparse interval to be examined; the abnormal threshold parameter ε t Recommended value ≤10 -10 In this preferred embodiment, msw=5, nsw=5.625, st=0, q=5, ε t =10 -12 , while simplifying the calculation, false alarms can be basically eliminated.
[0111] Step P2: Obtain a wind direction data sequence X of a given length T to be determined from a wind direction observation sequence t ={x 1 , x 2 , x 3 , ..., x i , ..., x T}, x i ∈[0,360); The wind direction data comes from the real-time wind direction observation data of the transmission network or from the historical data stored in the data file after reception.
[0112] Step P3: The wind direction data sequence X obtained in step P2 t According to formula (1), the wind direction change sequence D containing T-1 elements is obtained. t , d is the element
[0113]
[0114] Where [] is the integer part, d i ∈[-180,180].
[0115] Step P4: Estimate the scale parameter λ of the wind direction change model according to formula (2):
[0116]
[0117] If λ=0 and the time length covered by the wind direction data sequence exceeds 12 hours, the wind direction data is reported to be abnormal and the abnormality judgment process is terminated.
[0118] Step P5: Establish a statistical model of wind direction change d according to formula (3)
[0119]
[0120] in is the Laplace distribution Laplace(0,λ) with location parameter 0 and scale parameter λ, F(·) is the cumulative density function of the Laplace distribution, and I() is a Boolean function that takes 1 when the condition is true and 0 when the condition is false.
[0121] Step P6: In order to record the number of wind direction data at each angle and the precursor information of wind direction points that meet the sparse conditions, the present invention records the wind direction data X obtained in step P2 by designing a sparse angle wind direction point precursor table. t The number of wind direction data at each angle and the precursor information of wind direction points that meet the sparse conditions.
[0122] Sparse angle wind direction point front drive representation, for example, attached Figure 4 It consists of a header node array Heads[0,…,359] corresponding to 360 wind direction angles and an indefinite number of Node nodes that record the situation of the predecessor wind direction point of each angle wind direction data point; the Head node contains a sparse threshold st, records the number of wind direction points count at the corresponding wind direction angle and a pointer pLink pointing to the Node node; the Node node contains the angle preloc of the predecessor point, the serial number index of the predecessor wind direction point, and a pointer pLink pointing to the next Node point;
[0123] The wind direction data sequence X obtained by scanning step P2 t , count the number of wind direction points at each angle and add them to count. If the number of wind direction points at a certain angle is less than the corresponding threshold st, use the Node node to record the relevant angle and index information of its predecessor. The established sparse angle wind direction point predecessor table can be used for the subsequent selection of specific intervals. The predecessor information in the table can be used to obtain how many successors of a wind direction interval fall into a specific sparse interval or empty interval, so as to complete the subsequent abnormal judgment.
[0124] In a specific embodiment, the method for constructing a sparse angle wind direction point precursor table of the present invention is as follows: examine the wind direction point x in the window obtained in step P2 i , x i The angle corresponding to the header Heads[x i ]'s count increases by 1. If count≤st, in Heads[x i ] Insert a Node node into the linked list of the table header and record x iThe angle information and sequence index of the predecessor data point; if count>st, it is determined that this angle is not sparse, and Heads[x i ] is the Node node of the table header, and the prefix of the specific landing point is no longer recorded, and the pointer field Plink is left empty.
[0125] As attached Figure 4 This is an example of a sparse angle wind direction point predecessor table with a sparse threshold value of st = 2. There are two wind direction data of 0 degrees, one with index = 12 and the other with index = 28, and their respective previous wind direction points are at 23 degrees and 26 degrees respectively. There are 5 wind direction points at 359 degrees, which exceeds the st value of 2 and cannot belong to the sparse band. The prefix of the specific point is no longer recorded, and the pointer field Plink is left empty.
[0126] Step P7: Based on the given sparse threshold st and the minimum observation interval threshold msw, in the sparse angle wind direction point precursor table constructed in step P6, find the largest possible non-overlapping sparse wind direction interval with a degree interval ≥ msw and a number of wind direction points ≤ st, recorded as S k , k = 1, ... r;
[0127] There may be 0 or more such intervals. If there is no such sparse interval, report that the wind direction data for this section is normal; otherwise, execute step P8.
[0128] Step P8: For each target sparse wind direction interval S obtained in step P7 k =[d 1 , d 2 ], perform the following steps:
[0129] Step P801: In S k The two sides are divided into continuous and non-overlapping wind direction intervals of sp / 2 with a width of nsw. This set of wind direction intervals must contain non-sparse intervals. Assume that there are q non-sparse intervals, recorded as {NS i}, i = 1, ... q, and count the number of wind direction data points in each non-sparse interval {n i}.
[0130] Step P802: Estimate the arbitrary non-sparse interval NS obtained in step P801 according to formula (4) i Inner wind direction point x t The successor falls to S k Probability of being within:
[0131]
[0132] in For NS i and S k The distance between the centers of two intervals, For S k The width of the interval;
[0133] In a specific implementation, the wind direction interval width and the center point and wind direction interval distance are calculated as follows:
[0134] The wind direction interval may span 360 degrees, so the calculation of the wind direction interval width is as shown in formula (5):
[0135]
[0136] where x 1 , x 2 is the boundary angle of the wind direction range.
[0137] Wind direction interval center point x m The calculation of is as follows:
[0138]
[0139] The distance between the two wind direction intervals 1 and 2 is calculated as shown in formula (7):
[0140]
[0141] where x m1 and x m2 They are the center points of wind direction interval 1 and wind direction interval 2 respectively.
[0142] Step P803: According to the sparse angle wind direction point predecessor table constructed in step P6, the subsequent wind direction data points in each non-sparse interval that fall in the sparse interval S are counted. k The number of i}, i=1,...,q;
[0143] Step P804: For a given probability threshold ε t , NS i The inner wind direction point subsequently falls into S k The number of Z i , calculate the joint probability P{Z according to formula (8) 1 ≤m 1 , ..., Z q ≤m q}
[0144]
[0145] If P{Z 1 ≤m 1 , ..., Z q ≤m q} satisfies the following formula
[0146] P{Z1 ≤m 1 , ..., Z q ≤m q}<ε t (9)
[0147] Report abnormal wind direction data and terminate the determination process.
[0148] Where P{Z i =j} is NS i The successor of the mid-wind direction point falls into S i The probability that the number of i is the number of wind direction points in the i-th non-sparse band.
[0149] In particular, when st = 0, then m 1 To m q are all 0, then
[0150]
[0151] The determination basis of wind direction data anomaly is simplified to satisfy formula (11):
[0152] P{Z 1 =0,...,Z q =0}<ε t (11)
[0153] The basis for determining whether the wind direction data sequence is abnormal based on whether the conditions of formula (9) and formula (11) are met is as follows:
[0154] The statistics of wind direction changes in the present invention show that its distribution conforms to the Laplace distribution as shown in formula (3). The present invention models the wind direction data sequence as a random walk process within the range of 0-360 degrees, and the probability density of the wind direction change step length conforms to formula (3).
[0155] On a two-dimensional plane with wind direction angle and time as the vertical and horizontal axes, the wind direction interval is represented as a strip with a given angle range, as shown in the attached figure. Figure 2 W on a Area. Consider two wind direction intervals W on the plane. a and W b For interval W a The wind direction point on the 1 , x′ 2 , ..., x′ n There are two possibilities for the successors of these wind direction points. One possibility is to fall into W b region, another possibility is to fall into non-W b Area (including W a itself), this is a random walk process. Figure 1 As shown, the × mark is interval W a The wind direction points within W are marked with +, and the points marked with + are the subsequent wind direction points of these points. a Inside, W again a The successor of the inner wind direction point is marked with *. a Contains 77 wind direction points, one of which falls into W b , connected by dotted lines in the figure, the successors of other points do not fall into W b .
[0156] Let W a The wind direction point x′ i To interval W b The closest distance is l, then x′ i The direct successor point x″ i Fall into W b The probability of the interval P(Y(i,W a , W b )=1) is
[0157]
[0158] in It is W b The width of the interval. To simplify the problem, if W a If the interval width is not large, you can use W a Center position to interval W b The distance l a,b Approximately all W a Mid-wind direction point to W b The distance between these points is W. b The probability p is:
[0159]
[0160] The probability of falling in other directions is 1-p. a,b W a and W b The distance between the centers of the two intervals, and W a The specific position of the point in is irrelevant. Then, for n W a The wind direction points of the interval, their successor points fall to W b The number of intervals is also a random variable Z, which obeys a binomial distribution with parameters n and p, where p = P(Y(t, W a , W b )=1). W a Among the n wind direction points in the interval, m of them have successors falling into the interval W. b , that is, the probability of m successes in n trials is given by the probability mass function
[0161]
[0162] Given. Where m = 0, ... n, is the binomial coefficient.
[0163] Therefore, the cumulative distribution function W can be calculated by formula (15) a The n wind direction points in the interval, the successor falls into W b The number of intervals does not exceed m t Probability
[0164]
[0165] In a judgment window, examine whether the successors of the wind direction points in the q non-sparse intervals fall into the sparse interval S. k This event. Assuming that whether the wind direction points in different non-sparse intervals fall into this sparse interval is independent, if the n of the i-th non-sparse interval i The number of wind direction points that fall into this sparse interval is the random variable Z i , then Z 1 ≤m 1 , ..., Z q ≤m q The probability of simultaneous occurrence is
[0166]
[0167] That is, formula (8). Where n i is the number of wind direction points in the i-th non-sparse interval, p i is the probability that the successor of the wind direction point in the i-th non-sparse interval falls into this sparse interval. If the wind direction change pattern in the observation window meets Z 1 ≤m 1 , ..., Z q ≤m q , and P{Z 1 ≤m 1 , ..., Z q ≤m q} is very small, less than a specified threshold ε t , it can be determined that an atypical concentrated sequence pattern of wind direction changes with an abnormally small probability has occurred, thus determining that the wind direction data is abnormal.
[0168] Step P9: Identify the target empty wind direction interval, that is, given the minimum inspection interval threshold msw, according to the wind direction point count in the sparse angle wind direction point precursor table constructed in step P6, find the largest possible wind direction interval with an angle interval width ≥ msw and a wind direction point number of 0, recorded as B k, k=1,…r; there may be 0 or more such intervals. If there is no such empty wind direction interval, the reported data is normal; otherwise, proceed to step P10.
[0169] Step P10: Consider the abnormality determination of all empty intervals, which specifically includes the following steps:
[0170] Step P1001: Divide the non-empty intervals in the wind direction range [0, 360) into a set of non-overlapping non-empty intervals {NB i}, and count the number of wind direction points in each non-empty interval {n i}, i = 1, ... q. The part with width less than nsw is discarded;
[0171] Step P1002: Estimate the non-empty interval NB obtained in step P1001 according to formula (16) i Inner wind direction point x t The successor falls into the empty interval B identified in step P9 k Probability of being within:
[0172]
[0173] in For NB i and B k The distance between the centers of two intervals, For B k The calculation method of the wind direction interval width and center point, and the wind direction interval distance is the same as the method in step P802.
[0174] Step P1003: Calculate the non-empty interval NB i The probability that the successor of a wind direction point falls into an empty interval
[0175] Step P1004: Calculate the probability P{Z} that the subsequent wind direction points of all non-empty intervals will not fall into the empty interval according to formula (17). 1 =0,...,Z q =0}
[0176]
[0177] If P{Z 1 =0,...,Z q =0} satisfies the following formula:
[0178] P{Z 1 =0,...,Z q =0}<ε t (18)
[0179] If the wind direction data is abnormal, the report is that the wind direction data is abnormal; otherwise, the report data is normal and the determination process is terminated.
[0180] The basis for determining whether the wind direction data sequence is abnormal based on whether the condition of formula (18) is satisfied is similar to that in step P804, except that the random event examined here is whether the successor of a wind direction point in a non-sparse interval falls into any empty interval.
[0181] In the implementation process of the present invention, the above steps are implemented as executable codes using computer algorithms and loaded into a device containing computing, storage and communication interfaces to form a basic module such as Figure 3 Anomaly detection system for ground wind direction data.
[0182] 3. Implementation Effect
[0183] The ground wind direction observation data anomaly detection method designed by the present invention was applied to the minute-by-minute ground wind direction observation data from June 1 to 20, 2021 and February 2023 uploaded to the National Meteorological Information Center big data cloud platform by 2,432 national automatic stations across the country in June 2021 and March 2023. The wind direction data of 90 and 64 stations were detected to be abnormal in the two implementations and confirmed by experts. The relevant report was submitted to the functional management department of the China Meteorological Administration by the National Meteorological Information Center in the form of a special report on the quality of China's ground meteorological observation data, and was issued to relevant provinces for investigation.
[0184] Figure 5 These are typical abnormal cases of wind direction observation data reported during the implementation of the present invention. These abnormal cases do not conform to the abnormal pattern of wind direction data under Gray code failure, and there is no continuous loss of wind direction angle. It is difficult to detect based on the statistics of corresponding wind direction observation data under different states of Gray code or based on the statistics of wind direction frequency in sixteen directions.
[0185] The present invention not only improves the sensitivity to abnormal wind direction data, but also avoids misjudgment in the presence of obvious prevailing winds. Affected by factors such as atmospheric circulation and / or special terrain, the wind direction in some areas may be concentrated in certain angle ranges for a long time, while the wind direction at other angles may not appear for a long time. Taking the eastern part of Hainan Island and the Xisha Islands in its southeast as an example, the northeast wind prevails in the area in winter, and the wind direction in other directions may not appear for a long time. As shown in the attached figure Figure 6 The wind direction between 220-300 degrees at station 59985 did not appear for more than one month from November 9, 2022 to December 10, 2022. Similar situations also occurred in some coastal areas in eastern my country. In this case, the existing literature method may misjudge the wind direction at certain angles as abnormal because the wind direction does not appear for a long time or the data is too little, but the present invention will not make such a misjudgment.
[0186] Obviously, the above embodiments are merely examples for clearly illustrating the present invention, and are not limitations on the implementation methods of the present invention. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is impossible to list all the implementation methods here. All obvious changes or modifications derived from the technical solution of the present invention are still within the protection scope of the present invention.
Claims
1. A method for detecting anomalies in ground wind direction observation data, characterized in that: The steps include: Step P1: Parameter setting Step P2: Obtain wind direction data within a specified window; Step P3: Establish a wind direction change sequence; Step P4: Estimate the scale parameters of the wind direction variation model; Step P5: Establish a statistical model of wind direction change; Step P6: construct a sparse angle wind direction drop point precursor table; Step P7: Identify the target sparse wind direction interval; Step P8: consider the abnormality determination of a single sparse interval; Step P9: Identify the target empty wind direction interval; Step P10: Consider abnormality determination of all empty intervals.
2. The method for detecting anomaly of ground wind direction observation data according to claim 1, characterized in that: In step P1: for the wind direction data window length T to be obtained, the minimum observation interval threshold msw, the width of the non-sparse interval or non-empty interval nsw, the sparse threshold st, the parameter sp that limits the size of the adjacent areas on both sides of the sparse interval considered by the algorithm, and the abnormal judgment threshold ε t And other parameters to set; In step P2: according to the window length T set in step P1, a wind direction data sequence X to be determined is obtained from a wind direction observation sequence. t ={x1,x2,x3,…,x i ,…,x T }, x i ∈[0,360); wind direction data comes from real-time wind direction observation data of the transmission network or from historical data stored in data files after reception; In step P3: the wind direction data sequence X obtained in step P2 is t According to formula (1), the wind direction change sequence D containing T-1 elements is obtained. t , d is the element Where [] is the integer part, d i ∈[-180,180]; In step P4: Estimate the scale parameter λ of the wind direction change model according to formula (2): If λ=0 and the time length covered by the wind direction data sequence exceeds 12 hours, the wind direction data is reported to be abnormal and the abnormality judgment process is terminated.
3. The method for detecting anomaly of ground wind direction observation data according to claim 1, characterized in that: In step P5: establish a statistical model of wind direction change d according to formula (3) in is the Laplace distribution Laplace(0,λ) with location parameter 0 and scale parameter λ, F(·) is the cumulative density function of the Laplace distribution, and I(·) is a Boolean function that takes 1 when the condition is true and 0 when the condition is false; In step P6: a sparse angle wind direction point precursor table is designed to record the wind direction data sequence X obtained in step P2 t The number of wind direction data at each angle and the precursor information of wind direction points that meet the sparse conditions. The table consists of a header node array Heads[0, ..., 359] corresponding to 360 wind direction angles and an indefinite number of Node nodes that record the situation of the predecessor wind direction point of each angle wind direction data point; the Head node contains a sparse threshold st, records the number of wind direction points count at the corresponding wind direction angle and a pointer pLink pointing to the Node node; the Node node contains the angle preloc of the predecessor point, the serial number index of the predecessor wind direction point, and a pointer pLink pointing to the next Node point; The wind direction data sequence X obtained by scanning step P2 t , count the number of wind direction points at each angle and add them to count; if the number of wind direction points at a certain angle is less than the given sparse threshold st, use the Node node to record the relevant angle and index information of its predecessor wind direction point. The established sparse angle wind direction point precursor table can be used for the subsequent selection of specific intervals. The predecessor wind direction point information in the table can be used to obtain how many subsequent wind direction points in a wind direction interval fall into a specific sparse interval or empty interval, so as to complete the subsequent abnormal judgment; In step P7: based on the given sparse threshold st and the minimum inspection interval threshold msw, the sparse angle wind direction point precursor table constructed in step P6 is used to find the largest possible non-overlapping sparse wind direction interval with a degree interval ≥ msw and a number of wind direction points ≤ st, which is recorded as S k , k=1,…r; There may be 0 or more such intervals. If there is no such sparse interval, report that the wind direction data for this section is normal; otherwise, execute step P8.
4. The method for detecting anomaly of ground wind direction observation data according to claim 1, characterized in that: In step P8: for each target sparse wind direction interval S obtained in step P7 k =[d1,d2], perform the following steps: Step P801: In S k The two sides are divided into continuous and non-overlapping wind direction intervals of sp / 2 with a width of nsw. This set of wind direction intervals must contain non-sparse intervals. Assume that there are q non-sparse intervals, recorded as {NS i }, i = 1, ... q, and count the number of wind direction data points in each non-sparse interval {n i }. Step P802: Estimate the arbitrary non-sparse interval NS obtained in step P801 according to formula (4) i Inner wind direction point x t The successor falls to S k Probability of being within: in For NS i and S k The distance between the centers of two intervals, For S k The width of the interval; Step P803: According to the sparse angle wind direction point predecessor table constructed in step P6, the subsequent wind direction data points in each non-sparse interval that fall in the sparse interval S are counted. k The number of i }, i = 1, ..., q; Step P804: For a given probability threshold ε t , NS i The inner wind direction point subsequently falls into S k The number of Z i , calculate the joint probability P{Z1≤m1,…,Z q ≤m q } If P{Z1≤m1,…,Z q ≤m q } satisfies the following formula P{Z1≤m1,…,Z q ≤m q }<ε t (9) Report abnormal wind direction data and terminate the determination process. Where P{Z i =j} is NS i The successor of the mid-wind direction point falls into S i The probability that the number of i is the number of wind direction points in the i-th non-sparse band. In particular, when st = 0, then m1 to m q are all 0, then The determination basis of wind direction data anomaly is simplified to satisfy formula (11): P{Z1=0,…,Z q =0}<ε t (11) Report abnormal wind direction data and terminate the determination process.
5. The method for detecting anomaly of ground wind direction observation data according to claim 1, characterized in that: In step P9: given the minimum inspection interval threshold msw, according to the wind direction point count in the sparse angle wind direction point precursor table constructed in step P6, find the largest possible wind direction interval with an angle interval width ≥ msw and a wind direction point number of 0, which is recorded as B k , k=1,…r; there may be 0 or more such intervals. If there is no such empty wind direction interval, the reported data is normal; otherwise, proceed to step P10.
6. The method for detecting anomaly of ground wind direction observation data according to claim 1, characterized in that: In step P10, the following steps are specifically included: Step P1001: Divide the non-empty intervals in the wind direction range [0,360) into a set of non-overlapping non-empty intervals {NB i }, and count the number of wind direction points in each non-empty interval {n i }, i = 1, ... q. The part with width less than nsw is discarded; Step P1002: Estimate the non-empty interval NB obtained in step P1001 according to formula (16) i Inner wind direction point x t The successor falls into the empty interval B obtained in step P9 k Probability of being within: in For NB i and B k The distance between the centers of two intervals, For B k The width of the interval; Step P1003: Calculate the non-empty interval NB i The probability that the successor of a wind direction point falls into an empty interval Step P1004: Calculate the probability that the subsequent wind direction points of all non-empty intervals will not fall into the empty interval according to formula (17): PZ1=0, ..., Z q =0} If P{Z1=0,…,Z q =0} satisfies the following formula: P{Z1=0,…,Z q =0}<ε t (18) If the wind direction data is abnormal, the report is that the wind direction data is abnormal; otherwise, the report data is normal and the determination process is terminated.
7. The method for detecting anomaly in ground wind direction observation data according to claim 1, characterized in that: In step P6: examine the wind direction data sequence X in the window obtained in step P2 t Center wind direction x i , x i The angle corresponding to the header Heads[x i ]'s count increases by 1. If count≤st, in Heads[x i ] Insert a Node node into the linked list of the table header and record x i The angle information and sequence index of the predecessor data point; if count>st, it is determined that this angle is not sparse, and Heads[x i ] is the Node node of the table header, and the prefix of the specific landing point is no longer recorded, and the pointer field Plink is left empty; In step P7: using the sparse angle wind direction point precursor table generated in step P6 as the basic data structure, scan all table header nodes. If it is found that the sum of the wind direction point counts of the continuous angles is less than or equal to st and the angle range is greater than the minimum inspection interval threshold msw, it is considered that a sparse interval is found. If this interval is extended and becomes a non-sparse interval, it is confirmed that a target sparse interval is found, it is marked, and then the search continues at other locations. The discovery of the target empty wind direction section in step P9 is the same.
8. The method for detecting anomaly in ground wind direction observation data according to claim 1, characterized in that: The calculation method of the wind direction interval width and center point involved in steps P802 and P1002, and the distance between two wind direction intervals is as follows: The wind direction interval may span 360 degrees, so the calculation of the wind direction interval width is as shown in formula (5): Where x1 and x2 are the boundary angles of the wind direction range. Wind direction interval center point x m The calculation of is as follows: The distance between the two wind direction intervals 1 and 2 is calculated as shown in formula (7): where x m1 and x m2 They are the center points of wind direction interval 1 and wind direction interval 2 respectively.
9. A system for detecting anomalies in ground wind direction observation data, characterized in that: It includes the following modules: a data acquisition module, used to input the required wind direction data into the system: the real-time wind direction observation data from the transmission network or the historical data stored in the data file after receiving; a sequence transformation module, used to execute the P3 step in claim 1; a wind direction change modeling module, corresponding to the P4 and P5 steps; a sparse angle wind direction landing point precursor table construction module, corresponding to the P6 step; the abnormality discrimination module is the core part of the method of the present invention, corresponding to the P7 to P10 steps.
10. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, wherein the instructions are configured to execute the method of any one of claims 1 to 14 or the system of claim 16.
Citation Information
Cited By
Method for detecting abnormal data of wind direction sensor
CN120723755A
