Digital multimeter reading calibration method
By combining the LSTM neural network with the Kalman filter, the problem of measurement results being greatly affected by noise and having low linearity due to poor hardware circuit performance was solved, achieving higher-precision calibration of digital multimeters.
Patent Information
- Application Number
- CN202411663083.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-11-20
AI Technical Summary
The existing calibration method is not suitable for digital multimeters with poor hardware circuit performance, resulting in measurement results being greatly affected by noise and having low linearity.
A calibration method based on LSTM neural network and Kalman filter is adopted to improve measurement accuracy by preprocessing the initial measurement values, constructing a training data set and iteratively training the calibration network, combined with an outlier detection mechanism.
It effectively removes measurement noise, improves the linearity and accuracy of measurement results, and is suitable for situations where hardware circuit performance is poor.
Smart Images

Figure CN119537792B_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 age, electronics and information technology have 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 example of the development of electronic measurement technology.
[0003] Calibration of a digital multimeter (DMM) is a crucial component of its operation. Existing calibration methods are mostly simple and suitable for applications with high hardware circuit performance, high linearity, and minimal noise impact. However, in applications with suboptimal hardware circuit performance, using existing calibration methods to calibrate a DMM cannot address the significant noise impact and relatively low linearity. Summary of the Invention
[0004] Aiming at the problem that existing calibration methods are not suitable for calibrating the readings of digital multimeters which are greatly affected by noise and have relatively low linearity over the full range, the present invention provides a method for calibrating the readings of digital multimeters.
[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 removing abnormal values from the filtered sliding average value based on the change trend and the change degree to obtain a filtered normal measurement value;
[0007] A training data set is constructed based on the filtered normal measurement value, the measurement signal type, and the measurement range. 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. The digital multimeter calibration network model parameters are saved to obtain a 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 the observation window N2. If the current δ1 is greater than α1, clear all the current sliding averages in the observation window N2 and clear 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 identity matrix.
[0025] According to the digital multimeter reading calibration method of the present invention, the method for obtaining the normal measurement value after filtering is:
[0026] Determine the filtered sliding average within the observation window N2 the changing trend of
[0027] Sliding average of the current filter Calculate the relative change δ2 of the first and last filtered sliding averages within 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 at the same time; otherwise, As the 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 output 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 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 uses the LSTM neural network 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 insufficient hardware circuit performance, and the linearity between the measured value and the true value is relatively low, and has a wider range of usage scenarios.
[0045] The method of the present invention utilizes LSTM neural network and Kalman filtering algorithm to process the measurement results, which can effectively remove measurement noise and improve 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 This is a model diagram of the digital multimeter calibration network. DETAILED DESCRIPTION
[0049] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making any creative efforts shall fall 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 with reference to 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 removing abnormal values from the filtered sliding average value based on the change trend and the change degree to obtain a filtered normal measurement value;
[0054] A training data set is constructed based on the filtered normal measurement value, the measurement signal type, and the measurement range. 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. The digital multimeter calibration network model parameters are saved to obtain a 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] After the current initial measurement value of the digital multimeter in measurement is preprocessed, a current normal measurement value after filtering is obtained; 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-term and short-term memory capabilities, making it particularly adept at processing sequential data. LSTM neural networks can handle complex nonlinear relationships and are more flexible than traditional linear fitting methods. Furthermore, the Kalman filter is a recursive filtering algorithm that continuously receives new measurements and updates estimates in real time, requiring minimal computation time and allowing for rapid computation on computers.
[0057] This embodiment performs exponential sliding average preprocessing on the initial measurement values; 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 intended to enable the output of the filter to 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 sliding 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 measurement values 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 the observation window N2. If the current δ1 is greater than α1, clear all the current sliding averages in the observation window N2 and clear the sliding averages in the sliding window N1. Otherwise, set the sliding average MA at time t. t As a normal sliding average.
[0066] Because the Kalman filter is a recursive filtering algorithm, when the filter input changes from one noisy value to another noisy value of a different magnitude, the filter output will slowly and continuously increase or decrease. This detection mechanism theoretically focuses on detecting the degree of change between two adjacent measurement results, allowing the filter output to sensitively change with changes in the measurement signal magnitude.
[0067] Methods for performing Kalman filtering on a sliding average value determined to be normal include:
[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 identity matrix.
[0077] Furthermore, the method for obtaining the normal measured value after filtering is:
[0078] Determine the filtered sliding average within the observation window N2 the changing trend of
[0079] Sliding average of the current filter Calculate the relative change δ2 of the first and last filtered sliding averages within 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 at the same time; otherwise, As the normal measurement value after filtering.
[0083] Combine Figure 1 As shown in the figure, in the step of judging the outlier by the degree of change of adjacent measured values, if there is an outlier 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 then the Kalman filter parameters are initialized before the next round of outlier detection is performed;
[0084] In the determination of outliers after filtering, if the filtered normal measurement value within the observation window N2 is determined to be an outlier, all current filtered sliding averages within the observation window N2 are cleared while the sliding averages within the sliding window N1 are cleared, and the Kalman filter parameters are initialized before the next round of outlier 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 significantly disturbed when the filter starts working, and the disturbance returns to normal, the filter output will also slowly increase or decrease. The second outlier detection mechanism is theoretically designed to detect the characteristics of the filtering result and to enable the filter output to quickly reach a stable state.
[0087] Going 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 measurement 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 output the calibrated value 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] Combine Figure 2 As shown in the figure, the input layer converts the measurement signal type and measurement range into 0 / 1, which serves as input data for the LSTM network. This conversion minimizes the impact on network training, allowing the model to best fit the mapping relationship between measured values and true values while taking into account signal type and range information. The LSTM network can capture any relationship between measured values and true values and further extract useful signals from noisy data, making it a significant advantage for calibrating digital multimeters.
[0102] The method of the present invention uses Kalman filtering to effectively remove noise from the measurement data, and then uses a constructed network to calibrate the filtered data; by using the first outlier detection mechanism, changes in the signal to be measured can be sensitively identified; by using the second outlier detection mechanism, outliers in the input of the front-end filter can be effectively identified; the use of the above two outlier detection mechanisms avoids the abnormal phenomenon of the filter output continuously increasing or continuously decreasing.
[0103] The method of the present invention is applicable to the situation where the initial measurement result contains noise and the full-scale 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 illustrative of the principles and applications of the invention. It should be understood that many modifications may be made to the illustrative embodiments, and that other arrangements may be devised, without departing from the spirit and scope of the invention as defined by the appended claims. It should be understood that the various dependent claims and features described herein may be combined in ways other than those described in the original claims. It should also be understood that features described in conjunction with individual embodiments may be used in conjunction with other described embodiments.
Claims
1. A digital multimeter reading calibration method, 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 removing abnormal values from the filtered sliding average value based on the change trend and the change degree to obtain a filtered normal measurement value; A training data set is constructed based on the filtered normal measurement value, the measurement signal type, and the measurement range. 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. The digital multimeter calibration network model parameters are saved to obtain a 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 measurement values 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 the observation window N2. If the current δ1 is greater than α1, clear all the current sliding averages in the observation window N2 and clear 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: Methods for performing Kalman filtering on a sliding average value determined to be normal include: 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 identity matrix.
5. The digital multimeter reading calibration method according to claim 4, characterized in that: The method to obtain the normal measurement value after filtering is: Determine the filtered sliding average within the observation window N2 the changing trend of Sliding average of the current filter Calculate the relative change δ2 of the first and last filtered sliding averages within 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 at the same time; otherwise, As the 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
Temperature measuring device for testing energy efficiency of water heater
CN118758444A