Digital multimeter reading calibration method
By combining LSTM neural network and Kalman filtering, reading calibration of digital multi-purpose tables is solved, and the problem of high noise influence and low linearity in the prior art is solved, achieving higher measurement accuracy.
Patent Information
- Application Number
- CN202411663083.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-20
AI Technical Summary
The existing digital multi-meter calibration method is not suitable for situations where hardware circuit performance is poor, and it cannot effectively solve the problem that measurement results are greatly affected by noise and have low linearity.
The initial measurement value of the digital multi-user table is preprocessed and calibrated using a combination of LSTM neural network and Kalman filtering. Specific steps include exponential sliding average processing, Kalman filtering and outlier clearance, and then constructing a training data set and iteratively training the digital multi-table calibration network until the preset number is reached.
This method can effectively remove measurement noise and improve measurement accuracy. It is suitable for scenarios where measurement results are greatly affected by noise and have low linearity due to poor hardware circuit performance.
Smart Images

Figure CN119537792A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a digital multimeter reading calibration method, and belongs to the technical field of digital multimeter calibration. Background Art
[0002] In the digital and intelligent era, electronic and information technology has deeply penetrated into all walks of life. Electronic measurement is one of the supporting technologies for the development of the electronic information industry and the source of electronic information technology. The development of digital multimeters is a typical representative of the development of electronic measurement technology.
[0003] The calibration method of a digital multimeter is an important part of the digital multimeter. Most of the existing calibration methods are relatively simple, which are suitable for situations where the hardware circuit performance is relatively good, the linearity of the measurement results is relatively high, and the influence of noise is relatively small. However, when the hardware circuit performance is not good enough, the digital multimeter calibrated by the existing calibration method cannot solve the problem that the measurement results are greatly affected by noise and the linearity is relatively low. Summary of the invention
[0004] Aiming at the problem that the existing calibration method is not suitable for calibrating the readings of a digital multimeter which is greatly affected by noise and has a relatively low linearity over the full range, the present invention provides a method for calibrating the readings of a digital multimeter.
[0005] A digital multimeter reading calibration method of the present invention comprises:
[0006] Preprocessing the initial measurement value of the digital multimeter includes: performing quasi-exponential sliding average processing on the initial measurement value of the digital multimeter to obtain a sliding average value; removing abnormal values from the sliding average value based on the degree of change of adjacent measurement values, performing Kalman filtering on the sliding average value determined to be normal to obtain a filtered sliding average value; and then removing abnormal values from the filtered sliding average value based on the change trend and the degree of change to obtain a filtered normal measurement value;
[0007] A training data set is constructed based on the normal measurement value after filtering, the measurement signal type and the measurement range, and the digital multimeter calibration network is iteratively trained in combination with the true value of the measurement signal until the number of iterations reaches a preset number, and the digital multimeter calibration network model parameters are saved to obtain the trained digital multimeter calibration network; the digital multimeter calibration network sequentially includes an input layer, an LSTM network, three fully connected layers and an output layer;
[0008] The current initial measurement value of the digital multimeter in measurement is preprocessed to obtain the current normal measurement value after filtering; the current normal measurement value after filtering is input into the trained digital multimeter calibration network to obtain the current output calibration value of the digital multimeter.
[0009] According to the digital multimeter reading calibration method of the present invention, the sliding average value at time t is expressed as MA t :
[0010]
[0011] Where N1 is the sliding window, MA t-1 is the sliding average at time t-1, x t is the initial measurement value at time t.
[0012] According to the digital multimeter reading calibration method of the present invention, the method for calculating the degree of change of adjacent measured values is:
[0013]
[0014] In the formula is the normal measurement value after filtering at time t-1, and δ1 represents the degree of change of adjacent measurement values;
[0015] Set the abnormal change threshold α1 and observation window N2. If the current δ1 is greater than α1, clear all the current sliding averages in the observation window N2 and the sliding averages in the sliding window N1. Otherwise, set the sliding average MA at time t. t As a normal sliding average.
[0016] According to the digital multimeter reading calibration method of the present invention, the method of performing Kalman filtering on the sliding average value determined to be normal includes:
[0017] Based on the normal measurement value after filtering at time t-1 And the corresponding covariance P t-1 Calculate the prior estimate of the sliding mean after filtering at time t and the covariance estimate P at time t t - :
[0018]
[0019] Calculate the Kalman gain coefficient K at time t t :
[0020] K t =P t - (P t - +R) -1 ,
[0021] Where R is the measurement noise covariance;
[0022] Then calculate the sliding average after filtering at time t And the corresponding covariance Pt :
[0023]
[0024] Where I is the unit matrix.
[0025] According to the digital multimeter reading calibration method of the present invention, the method for obtaining the normal measured value after filtering is:
[0026] Determine the sliding average after filtering within the observation window N2 ;
[0027] Sliding average of the current filter Calculate the relative change degree δ2 of the first and last filtered sliding averages in the observation window N2:
[0028]
[0029] Where Range is the measurement range;
[0030] The abnormal change threshold α2 is preset. If the change trend is monotonically increasing or monotonically decreasing, and δ2 is greater than α2, all filtered sliding averages in the current observation window N2 are cleared as abnormal values, and the sliding averages in the sliding window N1 are cleared; otherwise, As normal measurement value after filtering.
[0031] According to the digital multimeter reading calibration method of the present invention, the input layer output data is X t :
[0032]
[0033] Where f represents the input layer and Type is the measurement signal type.
[0034] According to the digital multimeter reading calibration method of the present invention, the time step of the LSTM network is N3, and the input layer input data at N3 time points The output of the LSTM network is y1:
[0035]
[0036] Where Φ1 represents the LSTM network.
[0037] According to the digital multimeter reading calibration method of the present invention, three fully connected layers process the output y1 of the LSTM network, and the output is y2:
[0038]
[0039] Where Φ2 represents three fully connected layers.
[0040] According to the digital multimeter reading calibration method of the present invention, the loss function used in the digital multimeter calibration network training process is the mean square error loss function L:
[0041]
[0042] Where N is the number of samples in the training data set, y true is the true value of the measured signal.
[0043] According to the digital multimeter reading calibration method of the present invention, the input layer converts the measurement signal type and the measurement range into 0 / 1 as the input data of the LSTM network.
[0044] Beneficial effects of the present invention: The method of the present invention calibrates the readings of a digital multimeter based on an LSTM neural network and a Kalman filter, and adopts two abnormal point detection mechanisms, one of which theoretically focuses on detecting the degree of change of two adjacent measurement results, and the other is for detecting the characteristics of the filtering results, both of which are for making the output of the filter quickly reach a stable state; and then the LSTM neural network is used to calibrate the results after Kalman filtering, and the input of the network model includes all important factors that can affect the mapping relationship between the measured value and the true value, such as measurement data, range information, and signal type information. The method of the present invention can be applied to scenarios where the measurement results are greatly affected by noise due to the poor performance of the hardware circuit, and the linearity between the measured value and the true value is relatively low, and the usage scenarios are more extensive.
[0045] The method of the present invention utilizes LSTM neural network and Kalman filtering algorithm to process the measurement results, which can effectively remove the measurement noise and improve the measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is a flow chart of the digital multimeter reading calibration method of the present invention;
[0047] Figure 2 It is a schematic diagram of the format of the output data of the input layer;
[0048] Figure 3 It is a model diagram of the calibration network of a digital multimeter. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.
[0050] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0051] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.
[0052] Specific implementation method 1. Combination Figures 1 to 3 As shown, the present invention provides a digital multimeter reading calibration method, comprising:
[0053] Preprocessing the initial measurement value of the digital multimeter includes: performing quasi-exponential sliding average processing on the initial measurement value of the digital multimeter to obtain a sliding average value; removing abnormal values from the sliding average value based on the degree of change of adjacent measurement values, performing Kalman filtering on the sliding average value determined to be normal to obtain a filtered sliding average value; and then removing abnormal values from the filtered sliding average value based on the change trend and the degree of change to obtain a filtered normal measurement value;
[0054] A training data set is constructed based on the normal measurement value after filtering, the measurement signal type and the measurement range, and the digital multimeter calibration network is iteratively trained in combination with the true value of the measurement signal until the number of iterations reaches a preset number, and the digital multimeter calibration network model parameters are saved to obtain the trained digital multimeter calibration network; the digital multimeter calibration network sequentially includes an input layer, an LSTM network, three fully connected layers and an output layer;
[0055] The current initial measurement value of the digital multimeter in measurement is preprocessed to obtain the current normal measurement value after filtering; the current normal measurement value after filtering, the measurement signal type and the measurement range are input into the trained digital multimeter calibration network to obtain the current output calibration value of the digital multimeter.
[0056] LSTM is a type of recurrent neural network with long and short-term memory capabilities and is good at processing sequence data. LSTM neural networks can handle complex nonlinear relationships and are more flexible than traditional linear fitting methods. In addition, Kalman filtering is a recursive filtering algorithm that can continuously receive new measurements and update estimates in real time. It has a short calculation time and can be quickly calculated on a computer.
[0057] This implementation method performs exponential sliding average preprocessing on the initial measurement value; before filtering, an outlier detection mechanism that focuses on detecting the degree of change between two adjacent measurement results is used, and after filtering, another detection mechanism that focuses on detecting the characteristics of the filtering results is used, both of which are for the purpose of making the output of the filter quickly reach a stable state.
[0058] In this embodiment, the sliding average at time t is expressed as MA t :
[0059]
[0060] Where N1 is the sliding window, MA t-1 is the sliding average at time t-1, x t is the initial measurement value at time t.
[0061] The purpose of using a quasi-exponential moving average is to smooth the input measurement results while being more sensitive to new measured data, while retaining the impact of past measurements on the current with a certain weight.
[0062] The method for calculating the degree of change of adjacent measurements is:
[0063]
[0064] In the formula is the normal measurement value after filtering at time t-1, and δ1 represents the degree of change of adjacent measurement values;
[0065] Set the abnormal change threshold α1 and observation window N2. If the current δ1 is greater than α1, clear all the current sliding averages in the observation window N2 and the sliding averages in the sliding window N1. Otherwise, set the sliding average MA at time t. t As a normal sliding average.
[0066] Since Kalman filtering is a recursive filtering algorithm, when the filter input changes from a noisy value to another noisy value of a different size, the filter output will slowly and continuously increase or decrease. In theory, this detection mechanism focuses on detecting the degree of change between two adjacent measurement results, so that the filter output can change sensitively with the change of the measurement signal size.
[0067] The method of performing Kalman filtering on the sliding average value determined to be normal includes:
[0068] Assume that all noise is measurement noise, the system input is zero, and the system is assumed to be a one-dimensional dynamic system;
[0069] Based on the normal measurement value after filtering at time t-1 And the corresponding covariance P t-1 Calculate the prior estimate of the sliding mean after filtering at time t and the covariance estimate P at time t t - :
[0070]
[0071] Calculate the Kalman gain coefficient K at time t t :
[0072] Kt =P t - (P t - +R) -1 ,
[0073] Where R is the measurement noise covariance;
[0074] Then calculate the sliding average after filtering at time t And the corresponding covariance P t :
[0075]
[0076] Where I is the unit matrix.
[0077] Further, the method to obtain the normal measured value after filtering is:
[0078] Determine the sliding average after filtering within the observation window N2 ;
[0079] Sliding average of the current filter Calculate the relative change degree δ2 of the first and last filtered sliding averages in the observation window N2:
[0080]
[0081] Where Range is the measurement range;
[0082] The abnormal change threshold α2 is preset. If the change trend is monotonically increasing or monotonically decreasing, and δ2 is greater than α2, all filtered sliding averages in the current observation window N2 are cleared as abnormal values, and the sliding averages in the sliding window N1 are cleared; otherwise, As normal measurement value after filtering.
[0083] Combination Figure 1 As shown, in the step of judging the abnormal value by the degree of change of adjacent measured values, if there is an abnormal value in the sliding average value in the sliding window N1, all current sliding average values in the sliding window N1 are cleared and the filtered sliding average value in the observation window N2 is cleared, and the Kalman filter parameters are initialized before the next round of abnormal value detection;
[0084] In the determination of abnormal values after filtering, if the normal measured values after filtering in the observation window N2 are determined to have abnormal values, all the current sliding average values after filtering in the observation window N2 are cleared and the sliding average values in the sliding window N1 are cleared at the same time, and the Kalman filter parameters are initialized before the next round of abnormal value detection is performed.
[0085] When the general As an outlier clearing, clear the saved N2 filtering results, initialize the filter parameters, and re-filter and save according to the subsequent input data.
[0086] If the measured value is greatly disturbed when the filter starts working, and the disturbance of the measured value returns to normal, the output of the filter will also increase or decrease slowly. The second abnormal point detection mechanism is theoretically to detect the characteristics of the filtering result, so that the output of the filter can quickly reach a stable state.
[0087] Going a step further, combined Figure 2 and Figure 3 As shown, the input layer output data is X t :
[0088]
[0089] Where f represents the input layer and Type is the measurement signal type.
[0090] The input layer is used to integrate the normal measured value after filtering, the measurement signal type and the measurement range to obtain X t , and then input into the LSTM network.
[0091] The time step of the LSTM network is N3, and the input layer input data at N3 time points The output of the LSTM network is y1:
[0092]
[0093] Where Φ1 represents the LSTM network.
[0094] Add a fully connected layer after the LSTM network. The three fully connected layers process the output y1 of the LSTM network and the output calibration value is y2:
[0095]
[0096] Where Φ2 represents three fully connected layers.
[0097] Since the measured value is still roughly linearly related to the true value, the fully connected layer does not use an activation function to reduce the nonlinearity of the network.
[0098] In this embodiment, the loss function used in the training process of the digital multimeter calibration network is the mean square error loss function L:
[0099]
[0100] Where N is the number of samples in the training data set, y true is the true value of the measured signal.
[0101] Combination Figure 2 As shown in the figure, the input layer converts the measurement signal type and measurement range into 0 / 1 as the input data of the LSTM network. The input layer converts the measurement signal type and measurement range into 0 / 1 to reduce the impact on network training, so that the model can fit the mapping relationship between the measurement value and the true value to the greatest extent, while taking into account the signal type and range information. The LSTM network can capture any relationship between the measurement value and the true value, and can further extract useful signals from noisy data, which has great advantages for the calibration of digital multimeters.
[0102] The method of the present invention uses Kalman filtering to effectively remove noise in the measurement data, and then uses the constructed network to calibrate the filtered data; by using the first anomaly point detection mechanism, the change of the signal to be measured can be sensitively identified; by using the second anomaly point detection mechanism, the input of the front-end filter can be effectively identified as having an abnormal value; the use of the above two anomaly point detection mechanisms avoids the abnormal phenomenon that the output of the filter continues to increase or decrease.
[0103] The method of the present invention is applicable to the situation where the initial measurement result contains noise and the full-range linearity is relatively low, and can improve the calibration accuracy.
[0104] Although the present invention is described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the present invention. It should therefore be understood that many modifications may be made to the exemplary embodiments and that other arrangements may be devised without departing from the spirit and scope of the present invention as defined by the appended claims. It should be understood that the various dependent claims and features described herein may be combined in a manner different from that described in the original claims. It should also be understood that the features described in conjunction with a single embodiment may be used in other described embodiments.
Claims
1. A method for calibrating digital multimeter readings, characterized in that: include: Preprocessing the initial measurement value of the digital multimeter includes: performing quasi-exponential sliding average processing on the initial measurement value of the digital multimeter to obtain a sliding average value; removing abnormal values from the sliding average value based on the degree of change of adjacent measurement values, performing Kalman filtering on the sliding average value determined to be normal to obtain a filtered sliding average value; and then removing abnormal values from the filtered sliding average value based on the change trend and the degree of change to obtain a filtered normal measurement value; A training data set is constructed based on the normal measurement value after filtering, the measurement signal type and the measurement range, and the digital multimeter calibration network is iteratively trained in combination with the true value of the measurement signal until the number of iterations reaches a preset number, and the digital multimeter calibration network model parameters are saved to obtain the trained digital multimeter calibration network; the digital multimeter calibration network sequentially includes an input layer, an LSTM network, three fully connected layers and an output layer; The current initial measurement value of the digital multimeter in measurement is preprocessed to obtain the current normal measurement value after filtering; the current normal measurement value after filtering is input into the trained digital multimeter calibration network to obtain the current output calibration value of the digital multimeter.
2. The digital multimeter reading calibration method according to claim 1, characterized in that: The moving average at time t is expressed as MA t : Where N1 is the sliding window, MA t-1 is the sliding average at time t-1, x t is the initial measurement value at time t.
3. The digital multimeter reading calibration method according to claim 2, characterized in that: The method for calculating the degree of change of adjacent measurements is: In the formula is the normal measurement value after filtering at time t-1, and δ1 represents the degree of change of adjacent measurement values; Set the abnormal change threshold α1 and observation window N2. If the current δ1 is greater than α1, clear all the current sliding averages in the observation window N2 and the sliding averages in the sliding window N1. Otherwise, set the sliding average MA at time t. t As a normal sliding average.
4. The digital multimeter reading calibration method according to claim 3, characterized in that: The method of performing Kalman filtering on the sliding average value determined to be normal includes: Based on the normal measurement value after filtering at time t-1 And the corresponding covariance P t-1 Calculate the prior estimate of the sliding mean after filtering at time t and the covariance estimate at time t Calculate the Kalman gain coefficient K at time t t : Where R is the measurement noise covariance; Then calculate the sliding average after filtering at time t And the corresponding covariance P t : Where I is the unit matrix.
5. The digital multimeter reading calibration method according to claim 4, characterized in that: The method to obtain the normal measured value after filtering is: Determine the sliding average after filtering within the observation window N2 ; Sliding average of the current filter Calculate the relative change degree δ2 of the first and last filtered sliding averages in the observation window N2: Where Range is the measurement range; The abnormal change threshold α2 is preset. If the change trend is monotonically increasing or monotonically decreasing, and δ2 is greater than α2, all filtered sliding averages in the current observation window N2 are cleared as abnormal values, and the sliding averages in the sliding window N1 are cleared; otherwise, As normal measurement value after filtering.
6. The digital multimeter reading calibration method according to claim 5, characterized in that: The input layer output data is X t : Where f represents the input layer and Type is the measurement signal type.
7. The digital multimeter reading calibration method according to claim 6, characterized in that: The time step of the LSTM network is N3, and the input layer input data at N3 time points The output of the LSTM network is y1: Where Φ1 represents the LSTM network.
8. The digital multimeter reading calibration method according to claim 7, characterized in that: The three fully connected layers process the output y1 of the LSTM network and the output is y2: Where Φ2 represents three fully connected layers.
9. The digital multimeter reading calibration method according to claim 8, characterized in that: The loss function used in the DMM calibration network training process is the mean square error loss function L: Where N is the number of samples in the training data set, y true is the true value of the measured signal.
10. The digital multimeter reading calibration method according to claim 1, characterized in that: The input layer converts the measurement signal type and measurement range into 0 / 1 as input data for the LSTM network.
Citation Information
Patent Citations
Calibration method for digital multimeter
CN103969614A
High-precision breather valve detector cardinal number calibration method
CN118408734A
Anti-vibration high-precision gradienter data processing method
CN118410297A
Temperature measuring device for testing energy efficiency of water heater
CN118758444A
Lithium battery electric quantity monitoring and low electric quantity early warning system
CN118938019A