A method for determining peak value and related device

By applying Kalman filtering and peak search algorithms in defect detection, the problem of difficult peak values ​​under noise interference is solved, and the peak data is efficient and accurate determination is achieved, and the detection efficiency is improved.

CN119782723APending Publication Date: 2025-04-08SKYVERSE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311290015.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

During defect detection, defect signals often contain a lot of noise, making it difficult to distinguish and locate the main peak. The existing methods rely on a large amount of manual confirmation and are inefficient.

Method used

Kalman filtering technology is used to filter out noise in the time amplitude sequence, and the peak search algorithm, such as the automatic multi-scale peak search (AMPD) algorithm, is used to determine the target peak data.

Benefits of technology

Through the combination of Kalman filtering and peak search algorithm, the convenience and accuracy of peak data are significantly improved, manual intervention is reduced, and detection efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782723A_ABST
    Figure CN119782723A_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method for determining a peak value and a related device for improving the convenience of obtaining peak data. The method of the embodiment of the present invention includes: obtaining time amplitude sequence data to be predicted; performing Kalman filtering on the time amplitude sequence data to be predicted to filter out noise in the time amplitude sequence data to be predicted; using a peak-finding algorithm to find target peak data in the filtered time amplitude sequence data to be predicted; and outputting the target peak data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method for determining a peak value and a related device. Background Art

[0002] As a defect detection device, the detection device is used to detect the surface of the detection object, the computer processes the detected image and extracts the defects, and the processed image data is stored in the computer. The above processes have been realized in the detection instrument.

[0003] However, in the process of defect detection, it is often necessary to process the acquired defect signal, such as finding the peak in the defect signal and performing further processing based on the peak. However, in the prior art, the defect signal often contains a large amount of noise, making it difficult to identify and locate the main peak in the defect signal. The traditional main peak location method requires a large number of people to manually select the position of the main peak, and this process of manually confirming the main peak position is not only cumbersome, but also inefficient. Summary of the invention

[0004] The embodiment of the present invention provides a method for determining a peak value and a related device, which are used to improve the convenience of obtaining peak value data.

[0005] A first aspect of an embodiment of the present application provides a method for determining a peak value, comprising:

[0006] Obtain the time amplitude series data to be predicted;

[0007] Performing Kalman filtering on the time amplitude sequence data to be predicted to filter out noise in the time amplitude sequence data to be predicted;

[0008] A peak-finding algorithm is used to find target peak data in the filtered time amplitude sequence data to be predicted;

[0009] The target peak data is output.

[0010] Preferably, the Kalman filter comprises an adaptive Kalman filter;

[0011] The adaptive Kalman filter is performed on the time amplitude sequence data to be predicted, comprising:

[0012] S1: Determine the state equation and the measurement equation, wherein the state equation includes the process noise covariance matrix Q k , the measurement equation includes the measurement noise covariance matrix R k ;

[0013] S2: According to the state prediction equation, the predicted amplitude at time k is predicted from the amplitude at time k-1;

[0014] S3: Calculate an estimated value of the amplitude at time k according to the state estimation equation, using the predicted amplitude at time k, the measured amplitude at time k, and the Kalman gain coefficient;

[0015] S4: Calculate the Kalman gain coefficient at time k according to the Kalman gain equation, wherein the Kalman gain equation includes the R k ;

[0016] S5: According to the mean square error prediction equation, the prediction mean square error at time k is predicted based on the prediction mean square error at time k-1, and the prediction mean square error includes the Q k ;

[0017] S6: according to the mean square error estimation equation, the mean square error at time k is estimated from the predicted mean square error at time k to obtain the estimated mean square error at time k;

[0018] S7: Real-time dynamic adjustment of the process noise covariance matrix Q k and the measurement noise covariance matrix R k ;

[0019] Steps S2 to S7 are executed in a loop until the filtering of the time amplitude sequence to be predicted is completed.

[0020] Preferably, the process noise covariance matrix Q is adjusted dynamically in real time k and the measurement noise covariance matrix R k ,include:

[0021] According to the first formula, the Q k , the first formula includes:

[0022] Q i Denotes the process noise covariance matrix Q k The elements in P i Represents the current amplitude covariance, P i-1 represents the last amplitude covariance;

[0023] Adjust the R according to the second formula k , the second formula includes:

[0024] R i Denotes the measurement noise covariance matrix R k The elements in y i represents the actual measured value of the amplitude, Represents the predicted value of the amplitude.

[0025] Preferably, before using a peak-finding algorithm to find target peak data in the filtered time amplitude sequence data to be predicted, the method further includes:

[0026] Determining whether the filtered time amplitude sequence data to be predicted contains background data;

[0027] If so, a linear fit is performed on the filtered time amplitude sequence data to be predicted to filter out background data.

[0028] Preferably, the peak finding algorithm comprises an automatic multi-scale peak finding AMPD algorithm.

[0029] Preferably, the using the AMPD algorithm to search for target peak data in the filtered time amplitude sequence data to be predicted includes:

[0030] Determine the time amplitude sequence data X in the time amplitude sequence data, where X=[x1, x2, ...xn];

[0031] Set a sliding window, where the length of the sliding window is w k =2k| k=1,2,...L ,in, Indicates greater than The smallest integer of ;

[0032] For each k value, when i=k+2,...n-k+1, the first formula is satisfied:

[0033] The first formula includes:

[0034]

[0035] According to the first formula, a matrix M is generated, and the matrix M includes:

[0036]

[0037] If in the matrix M, for each k, all elements of the target column i in the matrix M are 1, then the time amplitude corresponding to the target column i is the target peak data.

[0038] Preferably, the time series in the time amplitude series data to be predicted is a time series with non-uniform time steps.

[0039] A second aspect of an embodiment of the present application provides a device for determining a peak value, including:

[0040] An acquisition unit, used for acquiring time amplitude sequence data to be predicted;

[0041] A filtering unit, used for performing Kalman filtering on the time amplitude sequence data to be predicted, so as to filter out noise in the time amplitude sequence data to be predicted;

[0042] A peak-finding unit, used for finding target peak data in the filtered time amplitude sequence data to be predicted by using a peak-finding algorithm;

[0043] An output unit is used to output the target peak value data.

[0044] Preferably, the Kalman filter includes an adaptive Kalman filter, and the filtering unit is specifically used for:

[0045] S1: Determine the state equation and the measurement equation, wherein the state equation includes the process noise covariance matrix Q k , the measurement equation includes the measurement noise covariance matrix R k ;

[0046] S2: According to the state prediction equation, the predicted amplitude at time k is predicted from the amplitude at time k-1;

[0047] S3: Calculate an estimated value of the amplitude at time k according to the state estimation equation, using the predicted amplitude at time k, the measured amplitude at time k, and the Kalman gain coefficient;

[0048] S4: Calculate the Kalman gain coefficient at time k according to the Kalman gain equation, wherein the Kalman gain equation includes the R k ;

[0049] S5: According to the mean square error prediction equation, the prediction mean square error at time k is predicted based on the prediction mean square error at time k-1, and the prediction mean square error includes the Q k ;

[0050] S6: according to the mean square error estimation equation, the mean square error at time k is estimated from the predicted mean square error at time k to obtain the estimated mean square error at time k;

[0051] S7: Real-time dynamic adjustment of the process noise covariance matrix Q k and the measurement noise covariance matrix R k ;

[0052] Steps S2 to S7 are executed in a loop until the filtering of the time amplitude sequence to be predicted is completed.

[0053] Preferably, the filtering unit is specifically used for:

[0054] According to the first formula, the Q k , the first formula includes:

[0055] Q i Denotes the process noise covariance matrix Q k The elements in P i Represents the current amplitude covariance, P i-1 represents the last amplitude covariance;

[0056] Adjust the R according to the second formula k , the second formula includes:

[0057] R i Denotes the measurement noise covariance matrix R k The elements in y i represents the actual measured value of the amplitude, Represents the predicted value of the amplitude.

[0058] Preferably, the device further comprises:

[0059] A judging unit, used for judging whether the filtered time amplitude sequence data to be predicted contains background data;

[0060] The filtering unit is further used to perform linear fitting on the filtered time amplitude sequence data to be predicted when the filtered time amplitude sequence data to be predicted contains background data, so as to filter out the background data.

[0061] Preferably, the peak finding algorithm comprises an automatic multi-scale peak finding AMPD algorithm.

[0062] Preferably, the peak finding unit is specifically used for:

[0063] Determine the time amplitude sequence data X in the time amplitude sequence data, where X=[x1, x2, ...xn];

[0064] Set a sliding window, where the length of the sliding window is w k =2k k=1,2,...L ,in, Indicates greater than The smallest integer of ;

[0065] For each k value, when i=k+2,...n-k+1, the first formula is satisfied:

[0066] The first formula includes:

[0067]

[0068] According to the first formula, a matrix M is generated, and the matrix M includes:

[0069]

[0070] If in the matrix M, for each k, all elements of the target column i in the matrix M are 1, then the time amplitude corresponding to the target column i is the target peak data.

[0071] Preferably, the time series in the time amplitude series data to be predicted is a time series with non-uniform time steps.

[0072] A third aspect of an embodiment of the present application provides a computer device, including a processor, which is used to implement the method for determining a peak value provided in the first aspect of the embodiment of the present application when executing a computer program stored in a memory.

[0073] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is used to implement the method for determining a peak value provided in the first aspect of an embodiment of the present application.

[0074] It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages:

[0075] In an embodiment of the present application, the noise data in the time amplitude sequence data to be predicted is filtered out by Kalman filtering, and then the peak finding algorithm is used to find the target peak data in the time amplitude sequence data to be predicted, thereby improving the convenience of determining the peak data. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 A schematic diagram of an embodiment of a method for determining a peak value in an embodiment of the present application;

[0077] Figure 2 For this application Figure 1 A refinement of step 102 in the embodiment;

[0078] Figure 3 For this application Figure 1 A refinement of step 103 in the embodiment;

[0079] Figure 4 A schematic diagram of an embodiment of a device for determining a peak value in an embodiment of the present application. DETAILED DESCRIPTION

[0080] The embodiment of the present invention provides a method for determining a peak value and a related device, which are used to improve the convenience of obtaining peak value data.

[0081] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0082] The terms "first", "second", "third", "fourth", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0083] For ease of understanding, the method for determining the peak value in the embodiment of the present application is described below. Figure 1 , an embodiment of the method for determining a peak value in the embodiment of the present application includes:

[0084] 101. Obtain time amplitude series data to be predicted;

[0085] In the present application, if you want to obtain the peak value in the time amplitude sequence data, you first need to obtain the time amplitude sequence data to be predicted, and the time amplitude sequence data to be predicted here can be obtained from the detection device locally, or it can be obtained locally, or it can be obtained from a third-party storage medium. There is no specific restriction on the source of the time amplitude sequence data to be predicted.

[0086] Furthermore, in the embodiment of the present application, when acquiring the time amplitude series data to be predicted, it can be acquired in real time or at a scheduled time, and there is no specific restriction on the time for acquiring the time amplitude series data to be predicted.

[0087] In addition, the time amplitude sequence data in the embodiment of the present application is a series of discrete sequence data, and each data in the sequence data includes time and amplitude. For example, the horizontal coordinate of the time series data is time k, and the vertical coordinate is amplitude w. Furthermore, the time series in the time amplitude sequence data to be predicted in the implementation of the present application is a time amplitude sequence with non-uniform time steps, that is, the time interval between two adjacent moments is non-constant.

[0088] 102. Perform Kalman filtering on the time amplitude sequence data to be predicted to filter out noise in the time amplitude sequence data to be predicted;

[0089] After obtaining the time amplitude sequence data to be predicted in step 101, Kalman filtering is further performed on the time amplitude sequence data to be predicted, so as to filter out noise in the time amplitude sequence data to be predicted.

[0090] As a recursive estimation algorithm, Kalman filtering can quickly update state estimates based on past state estimates and current measurements without storing a large amount of historical data. Based on the minimum mean square error criterion, Kalman filtering can obtain the optimal state estimation result under given noise conditions. In addition, Kalman filtering can automatically adapt to different system models and noise characteristics, and can predict the dynamic changes of time amplitude series.

[0091] 103. Use a peak-finding algorithm to find target peak data in the filtered time amplitude sequence data to be predicted;

[0092] After obtaining the time amplitude series data to be predicted after filtering out the noise, the peak finding algorithm is further used to find the target peak data in the filtered time amplitude series data to be predicted. The specific peak finding algorithm includes but is not limited to the automatic multi-scale peak search AMPD algorithm, derivative method, statistical method and Fourier change method, etc., and no specific restrictions are made here.

[0093] 104. Output the target peak data.

[0094] After the target peak data is obtained, the target peak data is further outputted.

[0095] In an embodiment of the present application, the noise data in the time amplitude sequence data to be predicted is filtered out by Kalman filtering, and then the peak finding algorithm is used to find the target peak data in the time amplitude sequence data to be predicted, thereby improving the convenience of determining the peak data.

[0096] based on Figure 1 In the described embodiment, before executing step 103, it is also necessary to determine whether the filtered time amplitude series data to be predicted contains background data. If it contains background data, linear fitting is performed on the filtered time amplitude series data to be predicted to filter out the background data. Specific linear fitting algorithms include but are not limited to the least squares method, ridge regression method, principal component analysis method, etc., and no specific restrictions are made here.

[0097] It should be noted that the background noise here is a fixed background noise value added in order to increase the value of the time amplitude sequence. Therefore, in the embodiment of the present application, when the filtered time amplitude sequence data to be predicted contains background data, the background noise also needs to be filtered out.

[0098] based on Figure 1 In the embodiment described above, step 102 is described in detail below. Specifically, the Kalman filtering method in the embodiment of the present application includes an adaptive Kalman filtering method. When the adaptive Kalman filtering method is performed on the predicted time amplitude sequence data, the following steps are specifically included. Figure 2 , Figure 2 The detailed steps of step 102 are as follows:

[0099] 201. Determine a state equation and a measurement equation, wherein the state equation includes a process noise covariance matrix Q k , the measurement equation includes the measurement noise covariance matrix R k ;

[0100] In Kalman filtering, the state equation and measurement equation need to be determined first. The state equation describes the derivation relationship between the amplitude at time k and the amplitude at time k-1, such as: The state equation is as follows: X k =φ k,k-1 X k-1 +β k,k- 1Q k , where X k represents the amplitude at time k, φ k,k-1 represents the first state transition matrix from time k-1 to time k, X k-1 represents the amplitude at time k, β k,k-1 represents the second state transition matrix from time k-1 to time k, Q k Process noise covariance matrix Q k ;

[0101] The measurement equation is as follows: Z k =H k X k +R k , Z k represents the measured amplitude at time k, H k represents the measurement matrix, X k represents the amplitude at time k, R k represents the measurement noise covariance matrix.

[0102] 202. According to the state prediction equation, the predicted amplitude at time k is predicted from the amplitude at time k-1;

[0103] The state prediction equation is as follows:

[0104] φ k,k-1 represents the first state transfer matrix from time k-1 to time k, represents the predicted amplitude at time k-1, It represents the predicted amplitude at time k predicted by the amplitude at time k-1.

[0105] 203. Calculate an estimated value of the amplitude at time k according to the state estimation equation, using the predicted amplitude at time k, the measured amplitude at time k, and the Kalman gain coefficient;

[0106] The state estimation equation is as follows:

[0107] represents the estimated value of the amplitude at time k, represents the predicted amplitude at time k, K k represents the Kalman gain coefficient at time k, Z k represents the measured amplitude at time k, H k represents the measurement matrix, Represents the predicted amplitude at time k-1.

[0108] 204. Calculate the Kalman gain coefficient at time k according to the Kalman gain equation, wherein the Kalman gain equation includes the R k ;

[0109] The Kalman gain equation is as follows:

[0110] Among them, K k represents the Kalman gain coefficient at time k, P k,k-1 represents the covariance matrix at time k, represents the transposed matrix of the measurement matrix, H k represents the measurement matrix, R k represents the measurement noise covariance matrix.

[0111] 205: According to the mean square error prediction equation, the prediction mean square error at time k is predicted based on the prediction mean square error at time k-1, wherein the mean square error prediction equation includes the Q k ;

[0112] Among them, the mean square error prediction equation is as follows:

[0113] Among them, P k,k-1 represents the predicted mean square error at time k, φ k,k-1 represents the first state transition matrix from time k-1 to time k, P k-1 represents the estimated mean square error at time k-1, The transposed matrix of the process noise covariance matrix at time , β k,k-1 represents the second state transition matrix from time k-1 to time k, Q k-1 represents the process noise covariance at time k-1, The transposed matrix of the second state transition matrix from time to time k.

[0114] It can be seen that according to the mean square error prediction equation, the prediction mean square error at time k can be predicted by the prediction mean square error at time k-1.

[0115] 206: according to the mean square error estimation equation, the mean square error at time k is estimated from the predicted mean square error at time k to obtain the estimated mean square error at time k;

[0116] The mean square error estimation equation is as follows:

[0117] P k,k =[IK k H k ]P k,k-1 , where P k,k is the estimated mean square error at time k, P k,k-1 It represents the predicted mean square error at time k.

[0118] 207. Real-time dynamic adjustment of the process noise covariance matrix Q k and the measurement noise covariance matrix R k ;

[0119] Specifically, when adjusting Q k and R k Q can be calculated according to the following formula k and R k Make adjustments:

[0120] Q i Denotes the process noise covariance matrix Q k The elements in P i Represents the current amplitude covariance, P i-1 represents the last amplitude covariance;

[0121] Adjust the R according to the second formula k , the second formula includes:

[0122] R i Denotes the measurement noise covariance matrix R k The elements in y i represents the actual measured value of the amplitude, Represents the predicted value of the amplitude.

[0123] It can be seen that as long as the initial values ​​X0 and P0 are given, according to the measured value Z at time k k , by looping through steps 202 to 207, the amplitude estimation value at time k can be deduced, where k is an integer from 1 to n.

[0124] It should be noted that the present application uses an adaptive Kalman filter to filter the time amplitude sequence data to be predicted, which is different from the Q k and R k is a fixed value. In the process of presenting the amplitude estimation value at time k, the embodiment of the present application makes an adjustment to Q k and R k Real-time adjustments allow the adaptive Kalman filter to adapt to changing noise conditions and improve the estimation accuracy under these conditions.

[0125] based on Figure 1 In the embodiment described above, step 103 is described in detail below. The embodiment of the present application specifically uses the automatic multi-scale peak search AMPD algorithm to determine the peak data in the time amplitude sequence. Figure 3 , Figure 3 The detailed steps of step 103 are as follows:

[0126] 301. Determine time amplitude sequence data X in the time amplitude sequence data, where X=[x1, x2, . . . xn];

[0127] For the sake of convenience, assume that n in the time amplitude sequence is 5, then X = [x1, x2, x3, x4, x5], where each x includes time k and amplitude w, such as x1 = (k1, w1).

[0128] 302. Set a sliding window, wherein the length of the sliding window is w k =2k| k=1,2,...L ,in, Indicates greater than The smallest integer of ;

[0129] When using the AMPD algorithm to determine the peak value, it is necessary to set the sliding window w k , where w k is a variable window value. For example, when k=1, the window length is 2, when k=2, the window length is 4, and so on. L is Because when n is 5, is 3, so the maximum value of L is 2.

[0130] 303. For each k value, when i=k+2,...n-k+1, the first formula is satisfied:

[0131] The first formula includes:

[0132]

[0133] According to the first formula, a matrix M is generated, and the matrix M includes:

[0134]

[0135] It can be seen that when n=5 and L=2, the matrix M is as follows:

[0136]

[0137] 304. If in the matrix M, for each k, all elements of the target column i in the matrix M are 1, then the time amplitude corresponding to the target column i is the target peak data.

[0138] In the above M matrix, when k=1, the element in the fourth column is 1, and when k=2, the element in the fourth column is 1, so the fourth time amplitude data is determined as the target peak data.

[0139] In the embodiment of the present application, the automatic multi-scale peak search AMPD algorithm is used to determine the target peak data, which improves the convenience of peak determination on the one hand, and improves the accuracy of peak determination on the other hand.

[0140] The above describes in detail the method for determining the peak value in the embodiment of the present application. Next, the device for determining the peak value in the embodiment of the present application is described. Figure 4 , the device for determining the peak value in the embodiment of the present application includes:

[0141] An acquisition unit 401 is used to acquire time amplitude sequence data to be predicted;

[0142] A filtering unit 402 is used to perform Kalman filtering on the time amplitude sequence data to be predicted, so as to filter out noise in the time amplitude sequence data to be predicted;

[0143] A peak-finding unit 403 is used to find target peak data in the filtered time amplitude sequence data to be predicted by using a peak-finding algorithm;

[0144] The output unit 404 is used to output the target peak value data.

[0145] Preferably, the Kalman filter includes an adaptive Kalman filter, and the filtering unit 402 is specifically used for:

[0146] S1: Determine the state equation and the measurement equation, wherein the state equation includes the process noise covariance matrix Q k , the measurement equation includes the measurement noise covariance matrix Rk ;

[0147] S2: According to the state prediction equation, the predicted amplitude at time k is predicted from the amplitude at time k-1;

[0148] S3: Calculate an estimated value of the amplitude at time k according to the state estimation equation, using the predicted amplitude at time k, the measured amplitude at time k, and the Kalman gain coefficient;

[0149] S4: Calculate the Kalman gain coefficient at time k according to the Kalman gain equation, wherein the Kalman gain equation includes the R k ;

[0150] S5: According to the mean square error prediction equation, the prediction mean square error at time k is predicted based on the prediction mean square error at time k-1, and the prediction mean square error includes the Q k ;

[0151] S6: according to the mean square error estimation equation, the mean square error at time k is estimated from the predicted mean square error at time k to obtain the estimated mean square error at time k;

[0152] S7: Real-time dynamic adjustment of the process noise covariance matrix Q k and the measurement noise covariance matrix R k ;

[0153] Steps S2 to S7 are executed in a loop until the filtering of the time amplitude sequence to be predicted is completed.

[0154] Preferably, the filtering unit 402 is specifically used for:

[0155] According to the first formula, the Q k , the first formula includes:

[0156] Q i Denotes the process noise covariance matrix Q k The elements in P i Represents the current amplitude covariance, P i-1 represents the last amplitude covariance;

[0157] Adjust the R according to the second formula k , the second formula includes:

[0158] R i Denotes the measurement noise covariance matrix R k The elements in y i represents the actual measured value of the amplitude, Represents the predicted value of the amplitude.

[0159] Preferably, the device further comprises:

[0160] A judging unit 405 is used to judge whether the filtered time amplitude sequence data to be predicted contains background data;

[0161] The filtering unit 402 is further configured to perform linear fitting on the filtered time amplitude sequence data to be predicted when the filtered time amplitude sequence data to be predicted contains background data, so as to filter out the background data.

[0162] Preferably, the peak finding algorithm comprises an automatic multi-scale peak finding AMPD algorithm.

[0163] Preferably, the peak finding unit 403 is specifically used for:

[0164] Determine the time amplitude sequence data X in the time amplitude sequence data, where X=[x1, x2, ...xn];

[0165] Set a sliding window, where the length of the sliding window is w k =2k k=1,2,...L ,in, Indicates greater than The smallest integer of ;

[0166] For each k value, when i=k+2,...n-k+1, the first formula is satisfied:

[0167] The first formula includes:

[0168]

[0169] According to the first formula, a matrix M is generated, and the matrix M includes:

[0170]

[0171] If in the matrix M, for each k, all elements of the target column i in the matrix M are 1, then the time amplitude corresponding to the target column i is the target peak data.

[0172] Preferably, the time series in the time amplitude series data to be predicted is a time series with non-uniform time steps.

[0173] In the embodiment of the present application, the filtering unit 402 uses Kalman filtering to filter out noise data in the time amplitude sequence data to be predicted, and then the peak finding unit 403 uses a peak finding algorithm to determine the target peak data in the time amplitude sequence data to be predicted, thereby improving the convenience of determining the peak data.

[0174] The above describes the peak value determination device in the embodiment of the present invention from the perspective of modular functional entities. The following describes the computer device in the embodiment of the present invention from the perspective of hardware processing:

[0175] The computer device is used to implement the function of the device for determining the peak value. In an embodiment of the present invention, an embodiment of the computer device includes:

[0176] Processor and memory;

[0177] The memory is used to store a computer program, and when the processor is used to execute the computer program stored in the memory, the following steps can be implemented:

[0178] Obtain the time amplitude series data to be predicted;

[0179] Performing Kalman filtering on the time amplitude sequence data to be predicted to filter out noise in the time amplitude sequence data to be predicted;

[0180] A peak-finding algorithm is used to find target peak data in the filtered time amplitude sequence data to be predicted;

[0181] The target peak data is output.

[0182] In some embodiments of the present invention, the Kalman filter includes an adaptive Kalman filter, and the processor may also be used to implement the following steps:

[0183] S1: Determine the state equation and the measurement equation, wherein the state equation includes the process noise covariance matrix Q k , the measurement equation includes the measurement noise covariance matrix R k ;

[0184] S2: According to the state prediction equation, the predicted amplitude at time k is predicted from the amplitude at time k-1;

[0185] S3: Calculate an estimated value of the amplitude at time k according to the state estimation equation, using the predicted amplitude at time k, the measured amplitude at time k, and the Kalman gain coefficient;

[0186] S4: Calculate the Kalman gain coefficient at time k according to the Kalman gain equation, wherein the Kalman gain equation includes the R k ;

[0187] S5: According to the mean square error prediction equation, the prediction mean square error at time k is predicted based on the prediction mean square error at time k-1, and the prediction mean square error includes the Q k ;

[0188] S6: according to the mean square error estimation equation, the mean square error at time k is estimated from the predicted mean square error at time k to obtain the estimated mean square error at time k;

[0189] S7: Real-time dynamic adjustment of the process noise covariance matrix Q k and the measurement noise covariance matrix R k ;

[0190] Steps S2 to S7 are executed in a loop until the filtering of the time amplitude sequence to be predicted is completed.

[0191] In some embodiments of the present invention, the processor may also be used to implement the following steps:

[0192] According to the first formula, the Q k , the first formula includes:

[0193] Q i Denotes the process noise covariance matrix Q k The elements in P i Represents the current amplitude covariance, P i-1 represents the last amplitude covariance;

[0194] Adjust the R according to the second formula k , the second formula includes:

[0195] R i Denotes the measurement noise covariance matrix R k The elements in y i represents the actual measured value of the amplitude, Represents the predicted value of the amplitude.

[0196] In some embodiments of the present invention, before using the peak finding algorithm to find the target peak data in the filtered time amplitude sequence data to be predicted, the processor may also be used to implement the following steps:

[0197] Determining whether the filtered time amplitude sequence data to be predicted contains background data;

[0198] If so, a linear fit is performed on the filtered time amplitude sequence data to be predicted to filter out background data.

[0199] In some embodiments of the present invention, the peak finding algorithm comprises an automatic multi-scale peak finding AMPD algorithm.

[0200] In some embodiments of the present invention, the processor may also be used to implement the following steps:

[0201] Determine the time amplitude sequence data X in the time amplitude sequence data, where X=[x1, x2, ...xn];

[0202] Set a sliding window, where the length of the sliding window is w k =2k k=1,2,...L ,in, Indicates greater than The smallest integer of ;

[0203] For each k value, when i=k+2,...n-k+1, the first formula is satisfied:

[0204] The first formula includes:

[0205]

[0206] According to the first formula, a matrix M is generated, and the matrix M includes:

[0207]

[0208] If in the matrix M, for each k, all elements of the target column i in the matrix M are 1, then the time amplitude corresponding to the target column i is the target peak data.

[0209] In some embodiments of the present invention, the time series in the time amplitude series data to be predicted is a time series with non-uniform time steps.

[0210] It can be understood that when the processor in the computer device described above executes the computer program, it can also implement the functions of the various units in the corresponding device embodiments described above, which will not be repeated here. Exemplarily, the computer program can be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program in the device for determining the peak value. For example, the computer program can be divided into the various units in the above-mentioned device for determining the peak value, and each unit can implement the specific functions described in the above-mentioned corresponding device for determining the peak value.

[0211] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that a processor and a memory are merely examples of computer devices and do not constitute a limitation of the computer device. The computer device may include more or fewer components, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, and the like.

[0212] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and uses various interfaces and lines to connect various parts of the entire computer device.

[0213] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the computer device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0214] The present invention also provides a computer-readable storage medium, which is used to implement the function of the device for determining a peak value, and stores a computer program thereon. When the computer program is executed by a processor, the processor can be used to perform the following steps:

[0215] Obtain the time amplitude series data to be predicted;

[0216] Performing Kalman filtering on the time amplitude sequence data to be predicted to filter out noise in the time amplitude sequence data to be predicted;

[0217] A peak-finding algorithm is used to find target peak data in the filtered time amplitude sequence data to be predicted;

[0218] The target peak data is output.

[0219] In some embodiments of the present invention, the Kalman filter includes an adaptive Kalman filter. When the computer program is executed by a processor, the processor may also be used to implement the following steps:

[0220] S1: Determine the state equation and the measurement equation, wherein the state equation includes the process noise covariance matrix Q k , the measurement equation includes the measurement noise covariance matrix R k ;

[0221] S2: According to the state prediction equation, the predicted amplitude at time k is predicted from the amplitude at time k-1;

[0222] S3: Calculate an estimated value of the amplitude at time k according to the state estimation equation, using the predicted amplitude at time k, the measured amplitude at time k, and the Kalman gain coefficient;

[0223] S4: Calculate the Kalman gain coefficient at time k according to the Kalman gain equation, wherein the Kalman gain equation includes the R k ;

[0224] S5: According to the mean square error prediction equation, the prediction mean square error at time k is predicted based on the prediction mean square error at time k-1, and the prediction mean square error includes the Q k ;

[0225] S6: according to the mean square error estimation equation, the mean square error at time k is estimated from the predicted mean square error at time k to obtain the estimated mean square error at time k;

[0226] S7: Real-time dynamic adjustment of the process noise covariance matrix Q k and the measurement noise covariance matrix R k ;

[0227] Steps S2 to S7 are executed in a loop until the filtering of the time amplitude sequence to be predicted is completed.

[0228] In some embodiments of the present invention, when the computer program is executed by a processor, the processor may also be used to implement the following steps:

[0229] According to the first formula, the Q k, the first formula includes:

[0230] Q i Denotes the process noise covariance matrix Q k The elements in P i Represents the current amplitude covariance, P i-1 represents the last amplitude covariance;

[0231] Adjust the R according to the second formula k , the second formula includes:

[0232] R i Denotes the measurement noise covariance matrix R k The elements in y i represents the actual measured value of the amplitude, Represents the predicted value of the amplitude.

[0233] In some embodiments of the present invention, before using the peak finding algorithm to find the target peak data in the filtered time amplitude sequence data to be predicted, when the computer program is executed by the processor, the processor may also be used to implement the following steps:

[0234] Determining whether the filtered time amplitude sequence data to be predicted contains background data;

[0235] If so, a linear fit is performed on the filtered time amplitude sequence data to be predicted to filter out background data.

[0236] In some embodiments of the present invention, the peak finding algorithm comprises an automatic multi-scale peak finding AMPD algorithm.

[0237] In some embodiments of the present invention, when the computer program is executed by a processor, the processor may also be used to implement the following steps:

[0238] Determine the time amplitude sequence data X in the time amplitude sequence data, where X=[x1, x2, ...xn];

[0239] Set a sliding window, where the length of the sliding window is w k =2k k=1,2,...L ,in, Indicates greater than The smallest integer of ;

[0240] For each k value, when i=k+2,...n-k+1, the first formula is satisfied:

[0241] The first formula includes:

[0242]

[0243] According to the first formula, a matrix M is generated, and the matrix M includes:

[0244]

[0245] If in the matrix M, for each k, all elements of the target column i in the matrix M are 1, then the time amplitude corresponding to the target column i is the target peak data.

[0246] In some embodiments of the present invention, the time series in the time amplitude series data to be predicted is a time series with non-uniform time steps.

[0247] It is understandable that if the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a corresponding computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned corresponding embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0248] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0249] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0250] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0251] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for determining a peak value, characterized in that: include: Obtain the time amplitude series data to be predicted; Performing Kalman filtering on the time amplitude sequence data to be predicted to filter out noise in the time amplitude sequence data to be predicted; A peak-finding algorithm is used to find target peak data in the filtered time amplitude sequence data to be predicted; The target peak data is output.

2. The method according to claim 1, characterized in that The Kalman filter includes an adaptive Kalman filter; The adaptive Kalman filter is performed on the time amplitude sequence data to be predicted, comprising: S1: Determine the state equation and the measurement equation, wherein the state equation includes the process noise covariance matrix Q k , the measurement equation includes the measurement noise covariance matrix R k ; S2: According to the state prediction equation, the predicted amplitude at time k is predicted from the amplitude at time k-1; S3: Calculate an estimated value of the amplitude at time k according to the state estimation equation, using the predicted amplitude at time k, the measured amplitude at time k, and the Kalman gain coefficient; S4: Calculate the Kalman gain coefficient at time k according to the Kalman gain equation, wherein the Kalman gain equation includes the R k ; S5: According to the mean square error prediction equation, the prediction mean square error at time k is predicted based on the prediction mean square error at time k-1, and the prediction mean square error includes the Q k ; S6: according to the mean square error estimation equation, the mean square error at time k is estimated from the predicted mean square error at time k to obtain the estimated mean square error at time k; S7: Real-time dynamic adjustment of the process noise covariance matrix Q k and the measurement noise covariance matrix R k ; Steps S2 to S7 are executed in a loop until the filtering of the time amplitude sequence to be predicted is completed.

3. The method according to claim 2, characterized in that The process noise covariance matrix Q is dynamically adjusted in real time k and the measurement noise covariance matrix R k ,include: According to the first formula, Q is adjusted k , the first formula includes: Q i Denotes the process noise covariance matrix Q k The elements in P i Represents the current amplitude covariance, P i-1 represents the last amplitude covariance; Adjust the R according to the second formula k , the second formula includes: R i Denotes the measurement noise covariance matrix R k The elements in y i represents the actual measured value of the amplitude, Represents the predicted value of the amplitude.

4. The method according to claim 1, characterized in that Before using the peak-finding algorithm to find target peak data in the filtered time amplitude sequence data to be predicted, the method further includes: Determining whether the filtered time amplitude sequence data to be predicted contains background data; If so, a linear fit is performed on the filtered time amplitude sequence data to be predicted to filter out background data.

5. The method according to claim 1, characterized in that The peak finding algorithm includes an automatic multi-scale peak finding AMPD algorithm.

6. The method according to claim 5, characterized in that The method of using the AMPD algorithm to search for target peak data in the filtered time amplitude sequence data to be predicted includes: Determine the time amplitude sequence data X in the time amplitude sequence data, where X=[x1, x2, ...xn]; Set a sliding window, where the length of the sliding window is w k =2k| k=1,2,...L ,in, Indicates greater than The smallest integer of ; For each k value, when i=k+2,...n-k+1, the first formula is satisfied: The first formula includes: According to the first formula, a matrix M is generated, and the matrix M includes: If in the matrix M, for each k, all elements of the target column i in the matrix M are 1, then the time amplitude corresponding to the target column i is the target peak data.

7. The method according to claim 1, characterized in that The time series in the time amplitude series data to be predicted is a time series with non-uniform time steps.

8. A device for determining a peak value, characterized in that: include: An acquisition unit, used for acquiring time amplitude sequence data to be predicted; A filtering unit, used for performing Kalman filtering on the time amplitude sequence data to be predicted, so as to filter out noise in the time amplitude sequence data to be predicted; A peak-finding unit, used for finding target peak data in the filtered time amplitude sequence data to be predicted by using a peak-finding algorithm; An output unit is used to output the target peak value data.

9. A computer device comprising a processor, characterized in that: When the processor executes the computer program stored in the memory, the processor is configured to implement the method for determining a peak value according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it is used to implement the method for determining a peak value according to any one of claims 1 to 7.