Adaptive filtering control method, system and electronic equipment
Through the adaptive filtering control method, the ultrasonic data received by the air-coupled ultrasonic surface density meter is processed using sliding windows and median selection technology, solving the problem of noise removal and achieving more efficient signal feature retention and measurement accuracy improvement.
Patent Information
- Application Number
- CN202510072996.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-01-17
AI Technical Summary
The prior art is difficult to effectively remove noise when processing ultrasonic data received by air-coupled ultrasonic surface density meter, resulting in a decrease in measurement accuracy and reliability. In addition, traditional filtering algorithms find it difficult to distinguish signals from noise when processing complex noise, and easily lose signal characteristics.
Adaptive filtering control method is adopted, and the ultrasonic data is obtained and divided into multiple sliding windows, sorting and median selection is performed, the average value is calculated and the original data point is replaced. Finally, the window is moved along the time series, and the above process is repeated until the data set completes processing.
This method can remove noise in ultrasonic data more effectively and accurately while retaining important signal characteristics, improving measurement accuracy and reliability.
Smart Images

Figure CN119513502B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ultrasonic data processing, and in particular to an adaptive filtering control method, system and electronic equipment. Background Art
[0002] Air-coupled ultrasonic surface density meters are widely used in industrial inspections. However, due to the propagation characteristics of the air medium and the influence of environmental noise, the received ultrasonic data often contains a lot of noise, which affects the measurement accuracy and reliability. Although the traditional filtering method is effective, it is easy to lose signal characteristics when processing the spike noise of the received ultrasonic data. In addition, the existing filtering algorithm has the disadvantages of difficulty in adjustment and poor flexibility in the process of using sliding windows to process the filtered data; and it is difficult to effectively distinguish between signals and noise when processing complex noise, and it is easy to misjudge useful signals as noise, resulting in poor filtering effect.
[0003] It can be seen that the general filtering algorithm in the prior art can only be used for processing some specific application scenarios. Not only is the processing speed slow, but it is also unable to adapt well to the data characteristics in the scenario, resulting in unsatisfactory filtering control effect. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide an adaptive filtering control method, system and electronic device, which has significant advantages in adaptability, noise identification and removal, multi-scale processing, real-time optimization mechanism, hardware acceleration and optimization of the characteristics of ultrasonic data. It can remove noise in ultrasonic data more effectively and accurately while retaining important signal characteristics. It is particularly suitable for application scenarios in which ultrasonic data in air-coupled ultrasonic surface densitometers are filtered.
[0005] In a first aspect, an embodiment of the present invention provides an adaptive filtering control method, which is applied to a filtering control process of an air-coupled ultrasonic surface density meter, and the method comprises:
[0006] Data preparation steps: after obtaining the ultrasonic data received by the air-coupled ultrasonic surface density meter, determine the sliding window corresponding to the ultrasonic data, and obtain the window length corresponding to the sliding window;
[0007] Window division step: divide the ultrasonic data into multiple sliding windows according to the window length, and sort the ultrasonic data in each sliding window;
[0008] Median selection step: using the sorting results of the ultrasonic data to determine the median of the ultrasonic data in each sliding window, and constructing a subset corresponding to the median based on the sorting results;
[0009] Average calculation step: calculate the average of all data points contained in the subset and replace the values of all data points with the average value;
[0010] Window moving step: Move the sliding window along the time series according to the preset step size until all ultrasonic data are processed.
[0011] Optional data preparation steps include:
[0012] Acquire ultrasonic data received by an air-coupled ultrasonic surface density meter and determine fluctuation parameters corresponding to the ultrasonic data;
[0013] Initialize the sliding window according to the size parameter corresponding to the ultrasonic data, and determine the initial length value of the sliding window;
[0014] A size adjustment strategy for the sliding window is determined based on the fluctuation parameter, and after the initial length value is adjusted using the size adjustment strategy, a window length corresponding to the sliding window is determined.
[0015] Optionally, a sliding window size adjustment strategy is determined based on the fluctuation parameter, including:
[0016] The variance value of the ultrasonic data within the sliding window is determined using the fluctuation parameter;
[0017] A preset variance threshold and a size adjustment value are obtained, and a size adjustment strategy for the sliding window is determined according to a numerical relationship between the variance value and the variance threshold and by using the size adjustment value.
[0018] Optional, median selection steps include:
[0019] The median is determined based on the number of ultrasound data in each sliding window;
[0020] The central data corresponding to the median position of the sorting result is obtained, and based on the sorting result, multiple data points are taken before and after the central data according to a preset number value to form a subset centered on the central data.
[0021] Optional, average calculation step, including:
[0022] Obtain multiple size parameters corresponding to the sliding window, and determine multiple average values corresponding to the multiple size parameters;
[0023] Calculate the average value of the data points in the sliding window, and use the average value of the data points to calculate the average difference value of the data points in the sliding window;
[0024] Determine the weight value corresponding to the size parameter based on the average difference value of the data points, and calculate the average value of all data points in the subset using the weight value and the average value;
[0025] Replace the values of all data points with the mean.
[0026] Optionally, a weight value corresponding to the size parameter is determined based on the average difference value of the data points, and the average value of all data points in the subset is calculated using the weight value and the average value, including:
[0027] Get the average difference value of the data points; the average difference value of the data points is calculated using the following formula:
[0028] ;
[0029] in, is the average difference value of the data points; is the size value of the sliding window corresponding to the size parameter; is a data point; is the average of the data points;
[0030] The weight value corresponding to the size parameter is calculated based on the inverse of the average difference value of the data points; the weight value is calculated using the following formula:
[0031] ;
[0032] Among them, Q is the number corresponding to the size parameter; is the weight value;
[0033] The average value of all data points in the subset is calculated using the weight value and the average value, which is calculated using the following formula:
[0034] ;
[0035] in, is the average value.
[0036] Optionally, after calculating the weight value corresponding to the size parameter based on the inverse of the average difference value of the data points, the method further includes a weight adjustment step, including:
[0037] Determine the filter level, gain matrix and error signal corresponding to the current weight value;
[0038] The dynamic weight value corresponding to the filter level, the gain matrix and the error signal is calculated based on the least square method, and the dynamic weight value is updated to the weight value; wherein the calculation process of the dynamic weight value is calculated by the following formula:
[0039] ;
[0040] Among them, K(k) is the gain matrix, e(k) is the error signal, and k is the filtering level.
[0041] Optionally, before the average value calculation step, the method further includes a data noise reduction step, including:
[0042] Extracting historical feature data corresponding to the data points in the subset; the historical feature data at least includes the amplitude of the data point, the difference between adjacent points, and the frequency component;
[0043] Using historical feature data to construct training data corresponding to the subset, and determining signal points and noise points corresponding to the data points based on the training data;
[0044] The signal points and noise points are trained using the initialized SVM model, and the hyperparameters in the SVM model are obtained in real time. When the hyperparameters meet the preset threshold conditions, the training process of the SVM model is stopped.
[0045] Input the current feature data of the data point into the trained SVM model, and determine whether the data point is a signal or noise based on the output result of the SVM model;
[0046] Remove the noisy book search data points from the subset.
[0047] In a second aspect, the present invention provides an adaptive filtering control system, which is applied to a filtering control process of an air-coupled ultrasonic surface density meter, and the system comprises:
[0048] A data preparation module is used to obtain the ultrasonic data received by the air-coupled ultrasonic surface density meter, determine the sliding window corresponding to the ultrasonic data, and obtain the window length corresponding to the sliding window;
[0049] A window division module, used to divide the ultrasonic data into multiple sliding windows according to the window length, and sort the ultrasonic data in each sliding window;
[0050] A median selection module is used to determine the median of the ultrasonic data in each sliding window using the sorting result of the ultrasonic data, and to construct a subset corresponding to the median based on the sorting result;
[0051] An average value calculation module is used to calculate the average value of all data points contained in the subset and replace the values of all data points with the average value;
[0052] The window moving module is used to move the sliding window along the time series according to a preset step size until all the ultrasonic data are processed.
[0053] In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of the adaptive filtering control method provided in the first aspect.
[0054] In a fourth aspect, an embodiment of the present invention further provides a storage medium storing computer executable instructions. When the computer executable instructions are called and executed by a processor, the computer executable instructions prompt the processor to implement the steps of the adaptive filtering control method provided in the first aspect.
[0055] An adaptive filtering control method, system and electronic device provided by an embodiment of the present invention, in the process of filtering and controlling an air-coupled ultrasonic surface density meter, the method first obtains the ultrasonic data received by the air-coupled ultrasonic surface density meter, determines the sliding window corresponding to the ultrasonic data, and obtains the window length corresponding to the sliding window; then divides the ultrasonic data into multiple sliding windows according to the window length, and sorts the ultrasonic data in each sliding window; then uses the sorting result of the ultrasonic data to determine the median of the ultrasonic data in each sliding window, and constructs a subset corresponding to the median based on the sorting result; then calculates the average value of all data points contained in the subset, and replaces the values of all data points with the average value; finally, moves the sliding window along the time series according to the preset step size until all ultrasonic data are processed. The method has significant advantages in adaptability, noise identification and removal, multi-scale processing, real-time optimization mechanism, hardware acceleration, and optimization for the characteristics of ultrasonic data. It can more effectively and accurately remove noise in ultrasonic data, while retaining important signal characteristics, and is particularly suitable for the application scenario of filtering ultrasonic data in air-coupled ultrasonic surface density meters.
[0056] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0057] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0059] Figure 1 A flowchart of an adaptive filtering control method provided by an embodiment of the present invention;
[0060] Figure 2 A flowchart of step S101 in an adaptive filtering control method provided by an embodiment of the present invention;
[0061] Figure 3 A flow chart of determining a sliding window size adjustment strategy based on a fluctuation parameter in an adaptive filtering control method provided by an embodiment of the present invention;
[0062] Figure 4 A flowchart of step S103 in an adaptive filtering control method provided by an embodiment of the present invention;
[0063] Figure 5 A flowchart of step S104 in an adaptive filtering control method provided by an embodiment of the present invention;
[0064] Figure 6 A flowchart of step S503 in an adaptive filtering control method provided by an embodiment of the present invention;
[0065] Figure 7 A flowchart of a weight adjustment step in an adaptive filtering control method provided by an embodiment of the present invention;
[0066] Figure 8 A flow chart of a data denoising step in an adaptive filtering control method provided by an embodiment of the present invention;
[0067] Fig. 9 A flowchart of another adaptive filtering control method provided by an embodiment of the present invention;
[0068] Fig.10 A schematic diagram of an adaptive filtering control system provided by an embodiment of the present invention;
[0069] Fig.11 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.
[0070] Reference numerals
[0071] 1010-data preparation module; 1020-window division module; 1030-median selection module; 1040-average value calculation module; 1050-window movement module;
[0072] 101 - processor; 102 - memory; 103 - bus; 104 - communication interface. DETAILED DESCRIPTION
[0073] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described in combination with the embodiments below. Obviously, the described embodiments are 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 are within the scope of protection of the present invention.
[0074] Air-coupled ultrasonic surface densitometers are widely used in industrial inspections. However, due to the propagation characteristics of the air medium and the influence of environmental noise, the received ultrasonic data often contains a lot of noise, which affects the measurement accuracy and reliability. Although the traditional filtering method is effective, it is easy to lose signal characteristics when processing the spike noise of the received ultrasonic data. In addition, the existing sliding window filtering algorithm has some shortcomings when processing data. For example, the fixed sliding window size makes it impossible to dynamically adjust according to the changes in data. This means that when processing data with large fluctuations, the fixed window may lead to poor smoothing effect, while when processing data with small fluctuations, the fixed window may be over-smoothed and lose important signal characteristics. Moreover, it is difficult to effectively distinguish between signals and noise when processing complex noise, and it is easy to misjudge useful signals as noise, resulting in poor filtering effect. At the same time, single-scale filtering cannot effectively remove noise of different scales, resulting in incomplete filtering results; in some traditional filtering algorithms, the filtering parameters are fixed parameters, which cannot adapt to dynamically changing data, resulting in unstable filtering effects.
[0075] It can be seen that the general filtering algorithm in the prior art can only be processed for some specific application scenarios. Not only is the processing speed slow, but it is also unable to adapt well to the data characteristics in the scenario, resulting in unsatisfactory filtering control effect. Based on this, the present invention provides an adaptive filtering control method, system and electronic device, which has significant advantages in adaptability, noise identification and removal, multi-scale processing, real-time optimization mechanism, hardware acceleration and optimization for the characteristics of ultrasonic data. It can more effectively and accurately remove noise from ultrasonic data while retaining important signal characteristics. It is particularly suitable for the application scenario of filtering ultrasonic data in air-coupled ultrasonic surface densitometers.
[0076] To facilitate understanding of this embodiment, firstly, an adaptive filtering control method disclosed in an embodiment of the present invention is described in detail. The method is applied to the filtering control process of an air-coupled ultrasonic surface density meter. Figure 1 As shown, including:
[0077] Data preparation step S101: after obtaining ultrasonic data received by the air-coupled ultrasonic surface density meter, determining a sliding window corresponding to the ultrasonic data, and obtaining a window length corresponding to the sliding window;
[0078] Window division step S102: dividing the ultrasonic data into a plurality of sliding windows according to the window length, and sorting the ultrasonic data in each sliding window;
[0079] Median selection step S103: determining the median of the ultrasonic data in each sliding window using the sorting result of the ultrasonic data, and constructing a subset corresponding to the median based on the sorting result;
[0080] Average value calculation step S104: calculating the average value of all data points included in the subset, and replacing the values of all data points with the average value;
[0081] Window moving step S105: moving the sliding window along the time series according to a preset step length until all ultrasonic data are processed.
[0082] Specifically, the adaptive filtering control method first obtains the ultrasonic data received by the air-coupled ultrasonic surface density meter, and then divides the ultrasonic data into multiple sliding windows; then sorts the data in each sliding window; then selects a predetermined number of data points starting from the median to construct a subset corresponding to the ultrasonic data in each sliding window; then, calculates the average value of all data points in each subset, and replaces all data points in each sliding window with the average value; finally, controls the sliding window to move along the time series, and repeats the above process until the entire data set is processed. This method determines representative data points through local sorting and median selection, thereby calculating a more accurate filter value, combining median processing and average calculation, which not only retains the suppression effect of median filtering on spike noise, but also uses average calculation to improve the suppression effect on Gaussian noise.
[0083] Optionally, the data preparation step S101 is as follows: Figure 2 As shown, including:
[0084] Step S201, acquiring ultrasonic data received by an air-coupled ultrasonic surface density meter, and determining fluctuation parameters corresponding to the ultrasonic data;
[0085] Step S202, initializing the sliding window according to the size parameter corresponding to the ultrasonic data, and determining the initial length value of the sliding window;
[0086] Step S203, determining a size adjustment strategy for the sliding window based on the fluctuation parameter, and determining a window length corresponding to the sliding window after adjusting the initial length value using the size adjustment strategy.
[0087] The window length of the sliding window is fixed in some scenarios, and the window length of the sliding window is determined by the fluctuation parameters of the ultrasonic data. When the sliding window is initialized, the initial length value of the sliding window is first obtained by using the size parameter, and then the fluctuation parameter is used to adjust it. For a fixed window, the corresponding size adjustment strategy is to maintain the length value, while for a variable window, the corresponding size adjustment strategy is to change the initial length value.
[0088] Specifically, the sliding window size adjustment strategy is determined based on the fluctuation parameter, such as Figure 3 As shown, including:
[0089] Step S301, determining the variance value of the ultrasonic data in the sliding window using the fluctuation parameter;
[0090] Step S302: Obtain a preset variance threshold and a size adjustment value, and determine a size adjustment strategy for the sliding window based on a numerical relationship between the variance value and the variance threshold and using the size adjustment value.
[0091] When the size of the sliding window is variable, the size of the window is adjusted by detecting the variance value of the ultrasonic data in the sliding window to improve the filtering effect. In the specific implementation process, the variance of the data in each sliding window is first calculated. , and then obtain the set variance threshold T, which is used to determine the degree of data fluctuation. The size adjustment strategy of the sliding window is determined according to the numerical relationship between the variance value and the variance threshold. For example, the size adjustment strategy is as follows:
[0092] ;
[0093] when , increase the window size to L, when , reduce the window size to L. Among them, and are the maximum and minimum window sizes respectively.
[0094] Optionally, the median selection step S103 is as follows: Figure 4 As shown, including:
[0095] Step S401, determining the median according to the amount of ultrasonic data in each sliding window;
[0096] Step S402, obtaining the central data corresponding to the median position of the sorting result, and taking multiple data points before and after the central data according to a preset number value based on the sorting result to form a subset centered on the central data.
[0097] The median selection process first sorts the ultrasonic data in the sliding window. For each sliding window, the data in the window needs to be sorted, and then the sorted median M is found based on the sorting result. Then, n data points are taken from both sides of the median to form a subset containing 2n+1 data points. In the subsequent average calculation step, the average value of these 2n+1 data points is The results are as follows:
[0098] ;
[0099] in, Indicates that n data points are taken from the sorted median M to both sides. In actual scenarios, the above operations can be performed directly for larger sliding windows, that is, first perform local sorting, then select the median, and finally calculate the average value to achieve a coarse-scale filtering process. For fine-scale filtering, multi-level filtering processing is required, that is, the multi-level average value is obtained after local sorting, median selection and average value calculation. In the k-th level filter, the window size It can be expressed as:
[0100] ;
[0101] Wherein, k is the filtering level. In this case, the average value calculation step needs to be fused and calculated. Optionally, the average value calculation step S104, such as Figure 5 As shown, including:
[0102] Step S501, obtaining multiple size parameters corresponding to the sliding window, and determining multiple average values corresponding to the multiple size parameters;
[0103] Step S502, calculating the average value of the data points in the sliding window, and using the average value of the data points to calculate the average difference value of the data points in the sliding window;
[0104] Step S503, determining a weight value corresponding to the size parameter based on the average difference value of the data points, and calculating the average value of all data points in the subset using the weight value and the average value;
[0105] Step S504: replace the values of all data points with the average value.
[0106] In the above process, the average values calculated at different scales are weighted and fused. By calculating the difference between the average value of each scale and the window data point at that scale, a corresponding weight is assigned to each average value, thereby calculating the weighted average value. Specifically, after calculating the average values corresponding to multiple size parameters, the average value of the data points in the sliding window is calculated, and the average difference value of the data points in the sliding window is calculated using the average value of the data points; then, the weight value corresponding to the size parameter is determined based on the average difference value of the data points, and the average value of all data points in the subset is calculated using the weight value and the average value, and the values of all data points are replaced with the calculated average value.
[0107] Optionally, a weight value corresponding to the size parameter is determined based on the average difference value of the data points, and the average value of all data points in the subset is calculated using the weight value and the average value, such as step S503. Figure 6 As shown, including:
[0108] Step S601, obtaining the average difference value of data points;
[0109] The average difference value of the data point is calculated by the following formula:
[0110] ;
[0111] in, is the average difference value of the data points; is the size value of the sliding window corresponding to the size parameter; is a data point; is the average of the data points.
[0112] Step S602, calculating the weight value corresponding to the size parameter based on the inverse of the average difference value of the data points;
[0113] The weight value in this step is calculated by the following formula:
[0114] ;
[0115] Among them, Q is the number corresponding to the size parameter; is the weight value.
[0116] Step S603, using the weight value and the average value to calculate the average value of all data points in the subset.
[0117] The average value is calculated using the following formula:
[0118] ;
[0119] in, is the average value.
[0120] The adaptive filtering control method in a specific scenario can also dynamically adjust parameters through new data to maintain the stability and accuracy of the filtering effect of the relevant filter in the air-coupled ultrasonic surface density meter. Optionally, after calculating the weight value corresponding to the size parameter based on the inverse of the average difference value of the data point, the method also includes a weight adjustment step, such as Figure 7 As shown, the weight adjustment step includes:
[0121] Step S701, determining the filter level, gain matrix and error signal corresponding to the current weight value;
[0122] Step S702, calculating the dynamic weight value corresponding to the filter level, the gain matrix and the error signal based on the least square method, and updating the dynamic weight value to the weight value.
[0123] In the above steps, the weights of the filter can be continuously updated using the recursive least squares method through the online learning process; then the weights are updated to adjust the weights of the filter according to the new data. , and then adjust its parameters. By dynamically adjusting the filter parameters, such as step size S and window size L, the weight value is dynamically updated. The calculation process of the dynamic weight value is calculated by the following formula:
[0124] ;
[0125] Among them, K(k) is the gain matrix, e(k) is the error signal, and k is the filtering level.
[0126] Before calculating the average value, the machine learning model is used to identify and remove potential noise points to improve the accuracy of the filtering results. First, the model is used to predict which points may be noise points, and then these points are removed from the locally sorted data set before calculating the average value. Optionally, before the average value calculation step, the method also includes a data denoising step, such as Figure 8 As shown, the data denoising step includes:
[0127] Step S801, extracting historical feature data corresponding to the data points in the subset; the historical feature data at least includes the amplitude of the data point, the difference between adjacent points, and the frequency component;
[0128] Step S802, constructing training data corresponding to the subset using the historical feature data, and determining signal points and noise points corresponding to the data points based on the training data;
[0129] Step S803, using the initialized SVM model to train the signal points and the noise points, and obtaining the hyperparameters in the SVM model in real time, and stopping the training process of the SVM model when the hyperparameters meet the preset threshold conditions;
[0130] Step S804, inputting the current feature data of the data point into the trained SVM model, and judging whether the data point is a signal or noise according to the output result of the SVM model;
[0131] Step S805: remove the noisy book search data points from the subset.
[0132] In the above process, the feature extraction process is first performed to extract useful features from each data point, such as amplitude, difference between adjacent points, frequency components, etc. Then the data label is obtained, and labeled training data is prepared, which contains known signal points and noise points. SVM training is then performed: a suitable kernel function (such as linear kernel, polynomial kernel, RBF kernel) is selected, hyperparameters are tuned through cross-validation and other methods, and the SVM model is trained using training data. After the model training is completed, noise detection is performed, feature extraction is performed on new unlabeled data, and the trained SVM model is used to classify these data to predict whether each data point is a signal or noise. Then the noise removal process is performed to remove the data points classified as noise by the SVM model from the original data, and the remaining data points are subjected to subsequent filtering processing.
[0133] The data denoising step is mainly optimized for the following points:
[0134] Parameter adjustment: According to the characteristics of ultrasonic data, adjust the size L of the sliding window, the step size S and the number of selected data points n to better adapt to the characteristics of ultrasonic signals.
[0135] Noise model: Establish a specific noise model to more accurately identify and eliminate noise.
[0136] Signal enhancement: Combined with signal enhancement techniques, such as wavelet transform, the signal-to-noise ratio can be further improved.
[0137] like Fig. 9 The flowchart of another adaptive filtering control method shown in FIG. 1 comprises the following steps:
[0138] Step S901, data preparation: obtain the ultrasonic data received by the air-coupled ultrasonic surface density meter receiving board and determine the initial length of the sliding window ;
[0139] Step S902, window division: divide the ultrasonic data into multiple windows of length Sliding window of
[0140] Step S903, local sorting: for each sliding window, sort the data in the window;
[0141] Step S904, median selection: find the sorted median M, and take n data points on both sides of the median to form a subset containing 2n+1 data points;
[0142] Step S905, average value calculation: calculate the average value y of the 2n+1 data points;
[0143] Step S906, data replacement: use the calculated average value Replace all data points within the sliding window;
[0144] Step S907, window movement: move the sliding window along the time series by a step length S, and repeat steps S903 to S906 until all data are processed.
[0145] It can be seen that this method determines representative data points through local sorting and median selection, thereby calculating a more accurate filter value. It combines median processing and average calculation, which not only retains the median filter's suppression effect on spike noise, but also uses average calculation to improve the suppression effect on Gaussian noise. Through a series of improvement measures, the flexibility and efficiency of filtering are improved, which is particularly suitable for the application of air-coupled ultrasonic surface density meters.
[0146] From the adaptive filtering control method mentioned in the above embodiment, it can be seen that this method has significant advantages in adaptability, noise identification and removal, multi-scale processing, real-time optimization mechanism, hardware acceleration, and optimization for the characteristics of ultrasonic data. It can remove noise in ultrasonic data more effectively and accurately while retaining important signal characteristics.
[0147] Corresponding to the adaptive filtering control method provided in the above-mentioned embodiment, an embodiment of the present invention provides an adaptive filtering control system, which is applied to the filtering control process of an air-coupled ultrasonic surface density meter, such as Fig.10 As shown, the system includes:
[0148] The data preparation module 1010 is used to obtain the ultrasonic data received by the air-coupled ultrasonic surface density meter, determine the sliding window corresponding to the ultrasonic data, and obtain the window length corresponding to the sliding window;
[0149] A window division module 1020, for dividing the ultrasonic data into a plurality of sliding windows according to the window length, and sorting the ultrasonic data in each sliding window;
[0150] A median selection module 1030 is used to determine the median of the ultrasonic data in each sliding window by using the sorting result of the ultrasonic data, and to construct a subset corresponding to the median based on the sorting result;
[0151] An average value calculation module 1040 is used to calculate the average value of all data points included in the subset and replace the values of all data points with the average value;
[0152] The window moving module 1050 is used to move the sliding window along the time series according to a preset step length until all the ultrasonic data are processed.
[0153] The adaptive filtering control system can be set in a special hardware acceleration device, such as FPGA, to realize parallel processing of a large number of data points. The data processing speed can be accelerated by using FPGA for parallel processing. At the same time, the algorithms involved can be optimized to adapt to the parallel processing architecture, reduce data transmission delays, and ensure that the processing speed after hardware acceleration meets real-time requirements.
[0154] From the adaptive filtering control system mentioned in the above embodiments, it can be seen that the system has significant advantages in adaptability, noise identification and elimination, multi-scale processing, real-time optimization mechanism, hardware acceleration, and optimization based on the characteristics of ultrasonic data. It can remove noise in ultrasonic data more effectively and accurately while retaining important signal characteristics. It is particularly suitable for application scenarios in which ultrasonic data in air-coupled ultrasonic surface densitometers are filtered.
[0155] The adaptive filtering control system provided in the embodiment of the present invention has the same implementation principle and technical effects as those in the aforementioned adaptive filtering control method embodiment. For the sake of brief description, for matters not mentioned in the system embodiment, reference may be made to the corresponding contents in the aforementioned adaptive filtering control method embodiment.
[0156] This embodiment also provides an electronic device. The structural diagram of the electronic device is as follows: Fig.11 As shown, the device includes a processor 101 and a memory 102; wherein the memory 102 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the steps of the above-mentioned adaptive filtering control method.
[0157] Fig.11 The electronic device shown further includes a bus 103 and a communication interface 104 , and the processor 101 , the communication interface 104 and the memory 102 are connected via the bus 103 .
[0158] The memory 102 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The bus 103 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0159] The communication interface 104 is used to connect to at least one user terminal and other network units through a network interface, and send the encapsulated IPv4 message or IPv4 message to the user terminal through the network interface.
[0160] The processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 101. The above processor 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 102, and the processor 101 reads the information in the memory 102 and completes the steps of the method of the above embodiment in combination with its hardware.
[0161] An embodiment of the present invention further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the adaptive filtering control method in the above embodiment are executed.
[0162] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, equipment and methods can be implemented in other ways. The system embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, 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 through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0163] 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.
[0164] 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.
[0165] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that can be executed by a processor. Based on this understanding, the technical solution of the present invention can essentially or in other words, the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0166] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. An adaptive filtering control method, characterized in that: The method is applied to the filtering control process of an air-coupled ultrasonic surface density meter, and the method comprises: Data preparation step: after acquiring the ultrasonic data received by the air-coupled ultrasonic surface density meter, determining the sliding window corresponding to the ultrasonic data, and acquiring the window length corresponding to the sliding window; Window division step: dividing the ultrasonic data into a plurality of sliding windows according to the window length, and sorting the ultrasonic data in each sliding window; Median selection step: determining the median of the ultrasonic data in each of the sliding windows using the sorting result of the ultrasonic data, and constructing a subset corresponding to the median based on the sorting result; Average value calculation step: calculating the average value of all data points included in the subset, and replacing the values of all the data points with the average value; Window moving step: moving the sliding window along the time series according to a preset step length until all the ultrasonic data are processed; The average value calculation step comprises: Acquire multiple size parameters corresponding to the sliding window, and determine average values of multiple data points corresponding to the multiple size parameters; Calculating an average difference value of the data points in the sliding window using the average value of the data points; Get the average difference value of the data points; the average difference value of the data points is calculated by the following formula: in, is the average difference value of the data points; is the size value of the sliding window corresponding to the size parameter; is the data point; is the average value of the data points; h is the hth size parameter; The weight value corresponding to the size parameter is calculated based on the inverse of the average difference value of the data points; the weight value is calculated by the following formula: Wherein, Q is the quantity corresponding to the size parameter; is the weight value; The average value of all data points in the subset is calculated using the average value of the data points corresponding to the weight value and the size parameter, and is calculated by the following formula: in, is the average value; The values of all the data points are replaced by the mean value.
2. The adaptive filtering control method according to claim 1, characterized in that: The data preparation step includes: Acquire the ultrasonic data received by the air-coupled ultrasonic surface density meter, and determine the fluctuation parameters corresponding to the ultrasonic data; Initializing the sliding window according to the size parameter corresponding to the ultrasonic data, and determining an initial length value of the sliding window; A size adjustment strategy for the sliding window is determined based on the fluctuation parameter, and after the initial length value is adjusted using the size adjustment strategy, the window length corresponding to the sliding window is determined.
3. The adaptive filtering control method according to claim 2, characterized in that: Determining a size adjustment strategy for the sliding window based on the fluctuation parameter includes: Determining a variance value of the ultrasonic data within the sliding window using the fluctuation parameter; A preset variance threshold and a size adjustment value are obtained, and a size adjustment strategy for the sliding window is determined according to a numerical relationship between the variance value and the variance threshold and by using the size adjustment value.
4. The adaptive filtering control method according to claim 1, characterized in that: The median selection step comprises: Determine the median according to the amount of the ultrasonic data in each of the sliding windows; The central data corresponding to the median position of the sorting result is obtained, and a plurality of data points are respectively taken before and after the central data according to a preset quantity value based on the sorting result to form the subset centered on the central data.
5. The adaptive filtering control method according to claim 1, characterized in that: After calculating the weight value corresponding to the size parameter based on the inverse of the average difference value of the data points, the method further includes a weight adjustment step, including: Determine the filtering level, gain matrix and error signal corresponding to the current weight value; The dynamic weight value corresponding to the filter level, the gain matrix and the error signal is calculated based on the least square method, and the dynamic weight value is updated to the weight value; wherein the calculation process of the dynamic weight value is calculated by the following formula: ; Wherein, K(k) is the gain matrix, e(k) is the error signal, and k is the filtering level.
6. The adaptive filtering control method according to claim 1, characterized in that: Before the average value calculation step, the method further includes a data noise reduction step, including: Extracting historical feature data corresponding to the data points in the subset; the historical feature data at least includes the amplitude, adjacent point difference and frequency component of the data point; constructing training data corresponding to the subset using the historical feature data, and determining signal points and noise points corresponding to the data points based on the training data; The signal point and the noise point are trained using the initialized SVM model, and a hyperparameter in the SVM model is obtained in real time, and the training process of the SVM model is stopped when the hyperparameter meets a preset threshold condition; Inputting the current feature data of the data point into the trained SVM model, and judging whether the data point is a signal or noise according to the output result of the SVM model; The data points of the noise are removed from the subset.
7. An adaptive filtering control system, characterized in that: The system is applied to the filtering control process of an air-coupled ultrasonic surface density meter, and the system comprises: A data preparation module, used for obtaining the ultrasonic data received by the air-coupled ultrasonic surface density meter, determining the sliding window corresponding to the ultrasonic data, and obtaining the window length corresponding to the sliding window; A window division module, used for dividing the ultrasonic data into a plurality of sliding windows according to the window length, and sorting the ultrasonic data in each sliding window; A median selection module, used to determine the median of the ultrasonic data in each of the sliding windows by using the sorting result of the ultrasonic data, and to construct a subset corresponding to the median based on the sorting result; An average value calculation module, used to calculate the average value of all data points included in the subset, and replace the values of all the data points with the average value; A window moving module, used to move the sliding window along the time series according to a preset step length until all the ultrasonic data are processed; The average value calculation module is further used to: obtain multiple size parameters corresponding to the sliding window, and determine the average values of multiple data points corresponding to the multiple size parameters; The average value calculation module is further used to: calculate the average difference value of the data points in the sliding window using the average value of the data points; The average value calculation module is also used to obtain the average difference value of the data points; the average difference value of the data points is calculated by the following formula: in, is the average difference value of the data points; is the size value of the sliding window corresponding to the size parameter; is the data point; is the average value of the data points; h is the hth size parameter; the weight value corresponding to the size parameter is calculated based on the inverse of the average difference value of the data points; the weight value is calculated by the following formula: Wherein, Q is the quantity corresponding to the size parameter; is the weight value; the average value of all data points in the subset is calculated using the average value of the data points corresponding to the weight value and the size parameter, and is calculated by the following formula: in, is the average value; The average value calculation module is further used to: replace the values of all the data points with the average value.
8. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of the adaptive filtering control method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Numerical sorting weighted average-based ultrasonic image spatial filter method
CN102670251A
Signal control method and system of gas sensor
CN119064541A