Online uncertainty evaluation method based on time sequence data decomposition and Bayesian principle
Through the combination of time series data decomposition and Bayesian principle, the problem of difficulty in obtaining prior and posterior distributions in Bayesian method is solved, real-time uncertainty assessment of instrument measurement data is realized, and the accuracy of measurement results is improved and real-time.
Patent Information
- Application Number
- CN202411269340.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-31
AI Technical Summary
When the Bayesian method is used to evaluate uncertainty, when the instrument measurement data continues to rise or changes violently, it is difficult to obtain the prior distribution and posterior distribution, which makes the assessment process difficult.
The online uncertainty evaluation method based on time series data decomposition and Bayesian principle is adopted. The measurement data is decomposed into trend period terms and random terms through STL decomposition, and the normal distribution of random terms is set. The Bayesian formula is used to calculate first. Checksum posterior distribution to achieve dynamic update of uncertainty.
It improves the real-time and accuracy of measurement results, ensures the real-time and accuracy of uncertainty assessment, and provides an effective evaluation of complex measurement data.
Smart Images

Figure CN119226356A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of instrument measurement result evaluation methods, and in particular to an uncertainty online evaluation method based on time series data decomposition and Bayesian principle. Background Art
[0002] In the field of instrument measurement result evaluation, it is crucial to accurately assess the uncertainty of measurement results. Traditional uncertainty evaluation methods are mostly based on offline data processing under laboratory conditions. However, these methods are often difficult to meet real-time and dynamic requirements in practical applications, especially in complex measurement environments and rapidly changing application scenarios.
[0003] At present, the Guide to the Expression of Uncertainty in Measurement (GUM) and its supplementary document GUM-S1 issued by international organizations provide two uncertainty assessment methods, which have been widely used in the entire field of metrology. Among them, the GUM-S1 method is not only applicable to linear measurement models, but also to nonlinear measurement models or situations where the measured quantity conforms to a non-Gaussian distribution. GUM-S1 adopts a Monte Carlo sampling strategy in the uncertainty assessment process. However, both the GUM and GUM-S1 methods are based on existing data for measurement uncertainty assessment, ignoring prior information about the measured object. Using the Bayesian statistical idea to dynamically update model parameters and evaluate uncertainty by combining prior knowledge with observation data, it is suitable for processing measurement data with uncertainty and complexity. Applying the Bayesian principle to uncertainty assessment can update the uncertainty assessment results in real time when new observation data is obtained, thereby improving the real-time and accuracy of the assessment.
[0004] However, when the Bayesian method is used for uncertainty assessment in practice, some difficulties are often encountered in the assessment process. For example, when the instrument measurement data continues to rise or changes dramatically, it may be difficult to obtain its prior distribution and posterior distribution. Therefore, in summary, the uncertainty online assessment method based on the Bayesian principle and time series data decomposition has important research significance and broad application prospects. It can provide real-time, dynamic evaluation of uncertainty while improving measurement accuracy and reliability, providing strong support for various measurement and monitoring tasks. Summary of the invention
[0005] The purpose of the present invention is to provide an online uncertainty assessment method based on time series data decomposition and Bayesian principle to solve the problem of difficulty in obtaining the prior and posterior distribution of the measured value in the uncertainty assessment process using the Bayesian method.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is:
[0007] The uncertainty online assessment method based on time series data decomposition and Bayesian principle includes the following steps:
[0008] Step S1: Collect data from a certain instrument T1 to T n+m The data at each moment is used to construct a time series dataset D1 with a time length of n+m, from T1 to T n The data at time T is the initial prior data set, n+1 to T n+m The data at that moment is the observation data set.
[0009] Step S2: Based on the time series additive model Y n+m =St n+m +R n+m , where (St n+m =S n+m +T n+m ), and use the STL decomposition method to decompose D1 into trend cycle terms and random terms. Among them, Y n+m Represents measurement time series data, St n+m Represents the sum of the periodic term and the trend term, R n+m represents a random term, S n+m represents the seasonal term, T n+m represents the trend term, and n+m represents the length of the time series.
[0010] Step S3: First determine the data R n+m = {r i , i=1,2,…,n+m} is a normal distribution, and then according to the data R n = {r i , i = 1, 2, ..., n} to determine the parameters of the prior distribution probability density function of the random term, and then introduce T n+1 The random item data at the moment determines the parameters of the probability density function of its likelihood function. Data R n = {r i , i=1,2,…,n} as the calculation T n+1 Prior information on the uncertainty of random terms at the moment, r n+1 as the observed data with uncertainty.
[0011] Step S4: Determine the joint posterior density function according to the parameters of the probability density function of the prior distribution of the random item data and the probability density function of the likelihood function determined in step 3. Infer and calculate its posterior distribution, and calculate the random item T based on the posterior distribution n+1 The best estimate value and the best estimate variance at the moment are finally obtained, and the best estimate value of the measurement and the standard uncertainty evaluation result are obtained.
[0012] Step S5: The posterior distribution information in step S4 is used as the prior distribution information for calculating the next moment, and then fused with the data collected at the next moment as the information of the posterior distribution at the next moment. This cycle is repeated until the calculation is completed, so that the measurement prior information and posterior distribution are continuously updated, realizing the online uncertainty calculation method.
[0013] Preferably, the step S1 is specifically as follows: if the evaluation instrument T n+1 to T n+m The uncertainty of the moment, collects the first n data as prior information, and obtains a time series data set with a time series length of n+m.
[0014] Preferably, step S2 is specifically as follows: input a time series data set with a time series length of n+m into the STL decomposition module, and process it through inner and outer loops until convergence to obtain trend T, season S, and residual R. St is obtained by fusing trend T and season S, and finally seasonal trend term St and random term R are obtained. The STL decomposition module includes: an inner loop and an outer loop; wherein the inner loop is used to obtain trend T and season S of different convergence conditions; it includes local weighted regression and low-pass filtering; the outer loop is used to obtain residual R and to reduce the influence of outliers on the inner loop. Finally, the original time series data Y n+m ={y i ,i=1,2,…,n+m} is decomposed into St by STL decomposition method n+m ={st i , i=1,2,…,n+m}, R n+m = {r i , i=1,2,…,n+m}.
[0015] Preferably, the step S3 is specifically as follows: determining the data R n+m = {r i , i=1,2,…,n+m} is a normal distribution N(μ,σ 2 ), the data R n = {r i , i=1,2,…,n} as the calculation T n+1 Prior information on the uncertainty of random terms at the moment, r n+1 As T n+m The observation data of the uncertainty of the random term at the moment is used to calculate the parameters of the probability density function of its prior distribution and likelihood function. The specific construction process of the probability density function expression of the prior distribution and likelihood function is as follows:
[0016] Calculate data R n The prior mean of Prior error sum of squares S n , prior variance The formula is as follows:
[0017]
[0018]
[0019]
[0020] According to the relevant knowledge of mathematical statistics, With S n are independent of each other), then μ and σ 2 The conjugate prior distributions of are: (Γ -1 represents the inverse gamma distribution), so (μ, σ 2 The prior distribution density of ) is:
[0021]
[0022] T n+1 The random item data at the moment is regarded as an observation sample, and the parameters of the probability density function of its likelihood function are calculated. The probability density function expression of the likelihood function is:
[0023]
[0024] Preferably, step S4 is specifically as follows: according to the parameters of the probability density function of the prior distribution of the random item data and the probability density function of the likelihood function determined in step 3, determine their joint posterior density function, and infer and calculate their posterior distribution. Calculate the random item T based on the posterior distribution n+m The best estimate of the time and calculate the standard uncertainty. Obtain μ and σ from the Bayesian formula 2 The joint posterior density function is:
[0025]
[0026] in:
[0027] The best estimate of the random term is calculated using the conjugate prior distribution density function, the likelihood function probability density function and the joint posterior density function. The best estimate mean of the random term plus the trend cycle term data is used as the best estimate of the measurement result. The standard uncertainty of the measurement result is calculated using the best estimate variance.
[0028] Preferably, step S5 is specifically as follows: assessing the standard uncertainty of the measurement result at the next moment, taking the best estimated value of the mean of the measurement result as the mean of the prior distribution at the next assessment, taking the best estimated value of the variance of the measurement result as the variance of the prior distribution at the next assessment, realizing the fusion of historical measurement data and current measurement data to update the prior distribution, and then combining the information of the next measurement result to obtain the posterior distribution, and finally performing uncertainty assessment, and repeating this cycle until T is calculated. n+m At any time, online evaluation of measurement uncertainty can be achieved.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] The measured time series data is decomposed into two parts, trend periodic item and random item, through STL technology. The distribution form and parameters of the prior distribution are set according to the random item data, and the uncertainty assessment result obtained from the posterior distribution is used as the prior information of the next assessment process. This not only ensures the objectivity of the uncertainty assessment process, but also realizes the fusion and update of measurement information. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 The flowchart of the uncertainty online evaluation method based on time series data decomposition and Bayesian principle of the present invention;
[0033] Figure 2 This is a random item data decomposition diagram of an embodiment of the present invention;
[0034] Figure 3 The embodiment of the present invention is a normality check diagram of random item data;
[0035] Figure 4 It is a line comparison chart of the uncertainty online assessment method based on time series data decomposition and Bayesian principle and the traditional Bayesian method in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0037] In an embodiment of the present invention, an uncertainty online assessment method based on time series data decomposition and Bayesian principle is proposed. Taking the pressure sensor measuring the pressure at the user end of the steam pipe network as an example, the specific steps are as follows:
[0038] Step S1: Use a pressure sensor to sample the pressure of a user end of the steam pipe network, and sample the pressure measurement data once every one minute. The 28-day pressure data of the measured user is shown in the following table;
[0039]
[0040] Step S2: Decompose the time series data set collected in step 1 using the STL technology to obtain trend T, season S, and residual R. Fusion of trend T and season S yields St, and finally the seasonal trend term St 40320 and the random term R 40320 The decomposition results are as follows Figure 2 shown.
[0041] Step S3: First determine the random term R 40320 is a normal distribution, the results are as follows Figure 3 , and then construct the probability density function expression based on the prior distribution and the likelihood function respectively, and use the pressure random items from the first to the first hundred minutes after the start of pressure sampling as the prior data set to calculate the parameters of the probability density function of the prior distribution; use the pressure random items from the one hundred and first minute after the start of pressure sampling as the posterior data set to calculate the parameters of the probability density function of the likelihood function.
[0042] Step S4: Based on the probability density function of the prior distribution and likelihood function in step 3, the joint posterior density function is obtained, and its posterior estimate and posterior estimate variance are calculated. The posterior estimate is the measurement estimate of the random item of pressure at the moment, and its standard uncertainty value is calculated based on the posterior estimate variance.
[0043] Step S5: The best estimated mean of the measurement result is used as the mean of the prior distribution in the next evaluation, and the best estimated variance of the measurement result is used as the variance of the prior distribution in the next evaluation, so as to realize the fusion of historical measurement data and current measurement data to update the prior distribution, and then combine the information of the next measurement result to obtain the posterior distribution, and finally perform uncertainty assessment, so as to repeat this cycle to realize the online assessment of measurement uncertainty. The data assessment result is as follows: Figure 4 shown.
[0044] The above examples are only used to help understand the core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. An online uncertainty assessment method based on time series data decomposition and Bayesian principle, characterized in that: The following steps are involved: Step S1: Collect the data of a certain instrument from T1 to T n+m The measurement data at each moment is used to construct a time series dataset D1 with a time length of n+m, where T1 to T n The data at time T is used as the initial prior data set, n+1 to T n+m The data at each moment is taken as the observation data set; Step S2: Based on the time series additive model Y n+m =St n+m +R n+m , among which St n+m =S n+m +T n+m , the time series data set D1 is decomposed into trend cycle terms and random terms using the STL decomposition method; Step S3: The random item data R n+m ={ri, i=1,2,…,n+m} is set as a normal distribution, the probability density function parameters of the prior distribution are determined based on the initial prior data set, and the probability density function parameters of the likelihood function are determined based on the observed data set; Step S4: Calculate the joint posterior density function based on the probability density function parameters of the prior distribution and likelihood function obtained in step S3, and calculate T based on the posterior distribution n+1 Uncertainty evaluation results of random items at each moment; Step S5: The posterior distribution information calculated in step S4 is used as the prior distribution information for the uncertainty assessment at the next moment, and is dynamically updated in combination with new observation data until the assessment is completed, thereby realizing online assessment of uncertainty.
2. The method according to claim 1, characterized in that Step S1 is as follows: if the evaluation instrument is at T n+1 to T n+m The uncertainty of a moment, collects the data of the previous n moments as prior information, and constructs a time series dataset with a time series length of n+m.
3. The method according to claim 1, characterized in that Step S2 is specifically as follows: input the time series data set into the STL decomposition module, process it through inner and outer loops until convergence, obtain the trend term T, seasonal term S and residual term R, and fuse the trend term T and seasonal term S to obtain the trend cycle term St, and finally obtain the seasonal trend term St and the random term R.
4. The method according to claim 1, characterized in that: Step S3 specifically includes: n+m = {r i , i=1,2,…,n+m} is set to obey the normal distribution N(μ,σ 2 ), using the initial prior data set R n Calculate the prior mean and prior variance, and use the observed data r n+1 Compute the probability density function parameters of the prior distribution and the probability density function parameters of the likelihood function.
5. The method according to claim 1, characterized in that Step S4 is specifically as follows: Calculate μ and σ using the Bayesian formula 2 The joint posterior density function of is used, and the best estimate of the random term and the standard uncertainty evaluation result are calculated based on the posterior distribution.
6. The method according to claim 1, characterized in that Step S5 is specifically as follows: taking the posterior distribution information at the current moment as the prior distribution information at the next moment, fusing it with the new observation data, updating and calculating the joint posterior density function and uncertainty assessment result at the next moment, and realizing the fusion and update of historical measurement data and current measurement data.
7. The method according to claim 1, characterized in that The time series data is decomposed into trend periodic terms and random terms through the STL decomposition method. Combined with the Bayesian principle, the online evaluation of measurement uncertainty is realized by dynamically updating the prior and posterior distributions, which ensures the objectivity and real-time nature of the uncertainty evaluation process.
Citation Information
Cited By
Environmental safety comprehensive supervision platform based on medical disinfection area
CN120015265A
Temperature on-line metering system and uncertainty dynamic evaluation method thereof
CN121409461A
Temperature on-line metering system and dynamic uncertainty evaluation method thereof
CN121409461B
Automobile battery compartment temperature and humidity uncertainty evaluation method and storage medium
CN122505353A
