Intelligent calibration system for voltage monitor
Through multi-module collaborative mechanisms such as ambient temperature control, internal reference purification, temperature compensation and adaptive segmented fitting, the measurement error problem caused by environmental and device aging in traditional voltage monitoring systems is solved, and high-precision, adaptive voltage calibration is achieved, ensuring the stability and reliability of the system in long-term operation.
Patent Information
- Application Number
- CN202511375214.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-09-25
AI Technical Summary
In long-term operation, traditional voltage monitoring systems suffer from large measurement errors, long calibration cycles, and the inability to make online adaptive adjustments due to factors such as ambient temperature fluctuations, circuit aging, and analog-to-digital converter drift. They lack a multi-level optimization mechanism and are unable to effectively identify and isolate noise or abnormal drift data, resulting in model overfitting or insufficient compensation.
It adopts environmental temperature control module, internal benchmark integrity detection module, temperature zone segment fitting module, multi-point automatic calibration module, drift prediction fine-tuning module and external benchmark closed-loop verification module, and realizes dynamic calibration and error correction through technical means such as proportional, integral and differential control, density screening, mesoscale anomaly elimination, singular value decomposition, forgetting factor weighted fitting, and recursive least squares algorithm.
It achieves high-precision calibration throughout the entire process from initial sampling to long-term operation, improves the robustness and universality of voltage measurement, ensures the stability, traceability and automatic recoverability of the system during long-term operation, and reduces the interference of outliers on the stability of the reference source.
Smart Images

Figure CN120847700A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of voltage calibration technology, specifically relating to an intelligent calibration system for a voltage monitor. Background Technology
[0002] In traditional voltage monitoring systems, issues such as analog-to-digital converter linear drift, measurement errors caused by temperature variations, and circuit aging often affect overall measurement accuracy. Especially under long-term operating conditions, the internal reference source and external sensing link are susceptible to interference from environmental temperature fluctuations, power supply fluctuations, and component aging, leading to significant deviations in voltage monitoring results. Therefore, how to dynamically correct errors caused by environmental and time factors while ensuring system accuracy has become a key technical challenge in voltage monitoring instrument design.
[0003] Current technologies typically employ periodic manual calibration, fixed temperature compensation coefficients, or simple linear fitting for calibration. However, these methods largely rely on single-point benchmarks, static parameters, or the stability of the external environment, making them ill-suited to dynamic changes and multi-source interference. Furthermore, traditional methods lack multi-level optimization mechanisms in outlier removal, temperature fitting, and inter-segment modeling, failing to effectively identify and isolate noise or anomalous drift data. This leads to model overfitting or insufficient compensation, severely impacting calibration results. Moreover, traditional methods lack closed-loop verification mechanisms based on external benchmarks, leaving a risk of accumulated errors that cannot be corrected. Summary of the Invention
[0004] This invention provides an intelligent calibration system for voltage monitors, which solves the technical problems in related technologies, such as large voltage measurement errors, long calibration cycles, and inability to adaptively adjust online, caused by factors such as ambient temperature fluctuations, circuit aging, analog-to-digital converter drift, and abnormal sampling interference.
[0005] This invention provides an intelligent calibration system for a voltage monitor, comprising:
[0006] The ambient temperature control module is used to acquire the ambient temperature deviation after power-on and drive the temperature control device based on proportional, integral and derivative control logic to keep the test ambient temperature within the preset range.
[0007] The internal reference integrity detection module is used to sample the internal reference voltage source in batches. It eliminates outliers by density screening, mesoscale anomaly removal, and extreme outlier identification to obtain the final sample set. It also uses covariance trace to determine stability. When multiple consecutive sampling batches are stable, it outputs the sampling gain parameter.
[0008] The temperature zone segmented fitting module is used to collect temperature and voltage samples, divide them into multiple temperature zones, perform matrix noise reduction and weighted fitting with forgetting factor on each temperature zone sample, and output temperature compensation coefficient vector through virtual sample enhancement and residual correlation analysis.
[0009] The multi-point automatic calibration module is used to correct the analog-to-digital converter readings based on the temperature compensation coefficient vector to obtain the correction voltage. It then combines the preset reference voltage and the correction residual to perform segmentation, feature extraction, and weighted fitting, and outputs the initial gain coefficient and initial bias parameters for each segment.
[0010] The drift prediction fine-tuning module is used to take the initial gain coefficient and initial bias parameter of the segment as the initial value of the recursive filter state, construct the observation residual based on the correction voltage and analog-to-digital converter reading, and use the recursive least squares algorithm to recursively update to obtain the adjusted gain coefficient and bias parameter.
[0011] The external reference closed-loop verification module is used to calculate the first correction voltage based on the adjusted gain coefficient and bias parameters, and compare it with the external reference voltage reading to determine whether the error is within the threshold. If it fails, it triggers recalibration; if it passes, it confirms that the calibration is valid.
[0012] Furthermore, the internal reference voltage source is sampled in batches, and outliers are eliminated through density screening, mesoscale anomaly removal, and extreme outlier identification to obtain the final sample set, including:
[0013] Step 201: The internal reference voltage source is continuously collected according to the preset batch capacity to form a batch sample set;
[0014] Step 202: Perform kernel density estimation on the batch sample set using a Gaussian kernel function, and remove samples with a density lower than a preset density threshold to obtain the first candidate sample set;
[0015] Step 203: Calculate the absolute median deviation based on the first candidate sample set, and remove samples with a deviation coefficient exceeding the mesoscale threshold according to the Hampel rule to obtain the second candidate sample set;
[0016] Step 204: Perform a generalized extreme studentized outlier test on the second candidate sample set to identify and remove extreme outliers, thus obtaining the final sample set.
[0017] Furthermore, step 203 specifically includes:
[0018] Step 301: Calculate the median of the first candidate sample set and the absolute value of the difference between each sample and the median, and use the median of the absolute deviations as the absolute deviation of the median.
[0019] Step 302: Convert the absolute deviation of the median into an equivalent standard deviation scale by a scaling factor, and divide the absolute value of the difference between each sample and the median by the equivalent standard deviation scale to obtain the deviation coefficient of each sample.
[0020] Step 303: Compare the bias coefficient with the preset mesoscale threshold, remove samples with bias coefficients greater than the mesoscale threshold, and retain the remaining samples to form the second candidate sample set.
[0021] Furthermore, stability is determined using covariance traces. When multiple consecutive sampling batches are stable, the sampling gain parameters are output, including:
[0022] Step 401: For each final sample set, calculate its covariance matrix using the minimum covariance determinant method, and calculate the trace value of the covariance matrix. If the trace value does not exceed a preset stability threshold, the batch of samples is determined to be a stable batch; wherein, the trace value is the sum of the diagonal elements of the covariance matrix.
[0023] Step 402: The mean values of multiple batches of samples determined to be stable batches are compiled into a mean list. After reaching the preset number of stable batches, the list is truncated, the maximum and minimum values are removed, and the arithmetic mean is calculated as the reference reference voltage.
[0024] Step 403: Calculate the ratio between the reference voltage and the preset reference voltage to obtain the sampling gain parameter.
[0025] Furthermore, the temperature and voltage samples have the same format as the final sample set and include time and temperature labels;
[0026] Matrix denoising and weighted fitting with a forgetting factor are performed on samples from each temperature zone. Virtual sample enhancement and residual correlation analysis are then used to output temperature compensation coefficients, including:
[0027] Step 501: Construct a design matrix containing first, second, and third temperature difference terms for each temperature zone sample, and perform singular value decomposition on the matrix; retain only the first three largest singular values and their corresponding singular vectors in the decomposition results to form a noise reduction design matrix.
[0028] Step 502: Based on the noise reduction design matrix, establish a weighted least squares model with a forgetting factor. First, multiply the noise reduction design matrix on the left by the weight matrix and multiply it by its own transpose; then, invert the resulting matrix; finally, multiply it on the right by the transpose of the noise reduction design matrix, the weight matrix, and the voltage column vector to obtain the temperature compensation coefficient vector corresponding to each temperature zone.
[0029] Step 503: A virtual sample is generated by mirroring the centroid of the temperature zone sample as the center of symmetry and added to the fitting. The virtual sample is assigned half the weight value of the real sample in the weight matrix.
[0030] Step 504: Construct a third-order polynomial prediction model based on the temperature compensation coefficient vector, calculate the sample predicted voltage, and use the difference between the actual sample voltage and the sample predicted voltage as the temperature compensation residual; then calculate the Spearman rank correlation coefficient between the temperature compensation residual and the temperature difference. If its absolute value exceeds the preset correlation threshold, add the product term of the temperature difference and the temperature zone reference temperature to the noise reduction design matrix as the temperature difference interaction term, and return to step 502 to refit.
[0031] Step 505: When the absolute value of the Spearman rank correlation coefficient is not greater than the preset correlation threshold, output the temperature compensation coefficient vector for each temperature zone.
[0032] Furthermore, the analog-to-digital converter reading is corrected based on the temperature compensation coefficient vector to obtain the corrected voltage. This corrected voltage is then combined with a preset reference voltage and the corrected residual for segmentation, feature extraction, and weighted fitting. The initial gain coefficients and initial bias parameters for each segment are output, including:
[0033] Step 601: Correct the analog-to-digital converter readings according to the third-order polynomial prediction model described in step 504 to obtain the corrected voltage. The difference between the corrected voltage and the preset reference voltage is used to determine the corrected residual, and a residual sequence is constructed.
[0034] Step 602: Construct a two-dimensional joint feature vector based on the corrected residual and the corrected voltage to form a sample set. Use Euclidean distance and Ward minimum variance hierarchical clustering algorithm to cluster the sample set. Use a genetic algorithm to determine the number of segments and divide the sample set into multiple sub-segment sample sets.
[0035] Step 603: For each sub-segment sample set, construct a two-dimensional joint matrix by the corrected voltage and the normalized reading of the analog-to-digital converter, and perform non-negative matrix decomposition to obtain two non-negative factor matrices, which represent the implicit structural components of the sub-segment sample set in the slope and bias directions, respectively; wherein, the normalized reading of the analog-to-digital converter is obtained by normalizing the analog-to-digital converter reading using the sampling gain parameter.
[0036] Step 604: Construct a weight matrix based on the corresponding corrected residual sequence in each sub-segment sample set, where the elements of the weight matrix are the reciprocals of the absolute value of the corrected residual plus a small constant; use the weighted least squares method to fit the linear relationship between the normalized reading of the analog-to-digital converter and the corrected voltage, construct a prediction relationship model, and obtain the initial gain coefficient and initial bias parameter of the sub-segment; where the prediction relationship model is: the corrected voltage is equal to the product of the initial gain coefficient of the sub-segment and the normalized reading of the analog-to-digital converter plus the initial bias parameter.
[0037] Furthermore, the number of segments is determined using a genetic algorithm, including:
[0038] Real-number encoding was used to set the pruning threshold to chromosomes, and an initial population was generated in the range of 0 to 1.
[0039] The fitness value is calculated for each chromosome in the population, where the fitness value is the sum of the weighted root mean square of the residuals and the segment number penalty term;
[0040] Parent individuals are selected using a roulette wheel method combined with an elite retention strategy, and arithmetic crossover is performed based on the weighted residual mean to generate offspring.
[0041] Adaptive Cauchy variation was applied to offspring chromosomes, and the variance of the variation decreased with the number of generations.
[0042] When the maximum number of generations is reached, the chromosome with the smallest fitness value is output, and the corresponding pruning threshold and the number of segments determined by the pruning threshold are obtained.
[0043] Furthermore, based on the corrected voltage and analog-to-digital converter readings, the observation residuals are constructed, and a recursive least squares algorithm is used for recursive updates to obtain the adjusted gain coefficients and bias parameters, including:
[0044] Step 701: Set the initial gain coefficient and initial bias parameter of each segment as the initial state value of the recursive filter, and set the initial value of the state covariance matrix.
[0045] Step 702: Obtain the corrected voltage based on the prediction relationship model, and calculate the difference between the corrected voltage and the predicted voltage to obtain the observation residual;
[0046] Step 703: Using the observation residuals as input, the gain coefficients and bias parameters of each segment are updated recursively using a recursive least squares algorithm with a forgetting factor to obtain the adjusted gain coefficients and bias parameters.
[0047] Furthermore, the external benchmark closed-loop verification module includes:
[0048] The first corrected voltage is calculated using a predictive relationship model based on the adjusted gain coefficient and bias parameters.
[0049] The absolute difference between the first correction voltage and the external reference voltage reading is taken as the error;
[0050] When the error is less than the preset error threshold, the calibration is confirmed to be effective; otherwise, the multi-point automatic calibration module is triggered to recalculate the initial gain coefficient and initial bias parameter of the segment.
[0051] The present invention also includes a coefficient solidification module, which is used to write the adjusted gain coefficient, bias parameter and calibration time information into the memory after calibration confirmation.
[0052] The beneficial effects of this invention are as follows: This invention integrates a multi-module collaborative mechanism including environmental temperature control, internal benchmark purification, temperature compensation, adaptive piecewise fitting, and recursive optimization to achieve high-precision calibration throughout the entire process from initial sampling to long-term operation; this invention ensures the high purity and representativeness of voltage samples through three-stage abnormal sample removal and covariance trace stability determination; the temperature compensation module, combined with singular value decomposition denoising, virtual sample enhancement, and residual correlation feedback, improves the robustness and universality of temperature drift fitting; the segment number adaptive determination mechanism based on genetic algorithm effectively balances model complexity and fitting accuracy; recursive least squares online update significantly enhances the model's adaptability to long-term drift; and the introduction of external benchmark closed-loop verification and calibration parameter solidification mechanisms ensures the stability, traceability, and automatic recoverability of the system during long-term operation. Attached Figure Description
[0053] Figure 1 This is a schematic diagram of a module of an intelligent calibration system for a voltage monitor according to the present invention. Detailed Implementation
[0054] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, features described in some examples may be combined in other examples.
[0055] like Figure 1 As shown, a voltage monitoring instrument intelligent calibration system includes:
[0056] The ambient temperature control module 101 is used to acquire the ambient temperature deviation after power-on and drive the temperature control device based on proportional, integral and derivative control logic to keep the test ambient temperature within a preset range.
[0057] The internal reference integrity detection module 102 is used to sample the internal reference voltage source in batches, and eliminate outliers by density screening, mesoscale anomaly removal and extreme outlier identification to obtain the final sample set; and uses covariance trace to determine stability. When multiple consecutive sampling batches are stable, the sampling gain parameter is output.
[0058] The temperature zone segment fitting module 103 is used to collect temperature and voltage samples, divide them into multiple temperature zones according to temperature, perform matrix noise reduction and weighted fitting with forgetting factor on each temperature zone sample, and output temperature compensation coefficient vector through virtual sample enhancement and residual correlation analysis.
[0059] The multi-point automatic calibration module 104 is used to correct the analog-to-digital converter reading based on the temperature compensation coefficient vector to obtain the correction voltage. It then combines the preset reference voltage and the correction residual to perform segmentation, feature extraction, and weighted fitting, and outputs the initial gain coefficient and initial bias parameter of each segment.
[0060] The drift prediction fine-tuning module 105 is used to take the initial gain coefficient and initial bias parameter of the segment as the initial value of the recursive filter state, construct the observation residual based on the correction voltage and analog-to-digital converter reading, and use the recursive least squares algorithm to recursively update to obtain the adjusted gain coefficient and bias parameter.
[0061] The external reference closed-loop verification module 106 is used to calculate the first correction voltage based on the adjusted gain coefficient and bias parameters, compare it with the external reference voltage reading, determine whether the error is within the threshold, trigger recalibration if it fails, and confirm the calibration is valid if it passes.
[0062] In one embodiment of the present invention, the environmental temperature control module, upon power-on, first acquires the current temperature of the test environment in real time via a temperature sensor and compares it with a preset target temperature to calculate the environmental temperature deviation between the two. Based on this temperature deviation, the module uses proportional, integral, and derivative control logic for calculation; this enables the test environment temperature to converge quickly and stably and remain within the preset temperature range, providing a consistent temperature reference for the voltage monitor calibration process and avoiding adverse effects on calibration accuracy due to environmental temperature fluctuations.
[0063] In one embodiment of the present invention, the internal reference voltage source is sampled in batches, and outliers are eliminated through density screening, mesoscale anomaly removal, and extreme outlier identification to obtain a final sample set, including:
[0064] Step 201: The internal reference voltage source is continuously collected according to the preset batch capacity to form a batch sample set; the internal reference voltage source refers to a standard and stable voltage reference source integrated or configured inside the voltage monitor, which is used to provide an accurate and stable voltage reference for the device.
[0065] Step 202: Perform kernel density estimation on the batch sample set using a Gaussian kernel function. By calculating the density distribution of each sample in the sample space, samples with densities lower than a preset density threshold are removed to obtain the first candidate sample set. The use of a Gaussian kernel function to perform kernel density estimation is a conventional technique and will not be elaborated here.
[0066] Step 203: Calculate the median absolute deviation based on the first candidate sample set, and remove samples with a deviation coefficient exceeding the mesoscale threshold according to Hampel's rule to obtain the second candidate sample set; specifically including:
[0067] Step 301: Calculate the median of the first candidate sample set and the absolute value of the difference between each sample and the median, and use the median of the absolute deviations as the absolute deviation of the median.
[0068] Step 302: Convert the absolute deviation of the median into an equivalent standard deviation scale by a scaling factor, and divide the absolute value of the difference between each sample and the median by the equivalent standard deviation scale to obtain the deviation coefficient of each sample.
[0069] Step 303: Compare the bias coefficient with the preset mesoscale threshold, remove samples with bias coefficients greater than the mesoscale threshold, and retain the remaining samples to form the second candidate sample set.
[0070] Step 204: Perform a generalized extreme studentized outlier test on the second candidate sample set to identify and remove extreme outliers, obtaining the final sample set. Specifically, this includes:
[0071] Set the maximum number of detectable outliers and the significance level, and calculate the mean and standard deviation based on the current sample set;
[0072] The ratio of the difference between the sample and the mean to the standard deviation is calculated to obtain the extreme studentized residual. In each iteration, the sample with the largest extreme studentized residual is identified, and multiple candidate elimination combinations are generated.
[0073] The extreme studentized residuals obtained in each iteration are compared with the critical value calculated based on the significance level to determine the number of outliers to be officially removed.
[0074] The samples that were not removed are ultimately retained as the final sample set.
[0075] This embodiment employs a three-tiered progressive screening mechanism—density screening, mesoscale anomaly removal, and extreme outlier identification—to progressively eliminate different types of anomalous samples, such as sparse noise, moderate bias, and extreme outliers. Compared to traditional single-threshold screening methods, this significantly improves the accuracy of sample purification. The resulting sample set more closely resembles the true output characteristics of the internal reference voltage source, providing a reliable data foundation for subsequent internal reference integrity testing and effectively reducing the interference of outliers on reference source stability determination and calibration parameter calculation.
[0076] In one embodiment of the present invention, stability is determined using covariance traces. When multiple consecutive sampling batches are stable, a sampling gain parameter is output, including:
[0077] Step 401: For each final sample set, calculate its covariance matrix using the minimum covariance determinant method, and calculate the trace value of the covariance matrix. If the trace value does not exceed a preset stability threshold, the batch of samples is determined to be a stable batch; wherein, the trace value is the sum of the diagonal elements of the covariance matrix.
[0078] Step 402: The mean values of multiple batches of samples determined to be stable batches are compiled into a mean list. After reaching the preset number of stable batches, the list is truncated, the maximum and minimum values are removed, and the arithmetic mean is calculated as the reference reference voltage.
[0079] Step 403: Calculate the ratio between the reference voltage and the preset reference voltage to obtain the sampling gain parameter. Preferably, the preset reference voltage is set to 10V.
[0080] This embodiment quantifies the sample dispersion by using the trace value of the covariance matrix, which can more comprehensively reflect the stability of the reference source output compared to the traditional single-value determination method. By combining multi-batch stability determination and truncated mean processing, the impact of single measurement fluctuations on the reference voltage is effectively reduced, and the representativeness of the reference voltage is improved.
[0081] In one embodiment of the present invention, the samples are divided into multiple temperature zones according to temperature, for example, into a low temperature zone, a medium temperature zone, and a high temperature zone; the temperature and voltage samples have the same format as the final sample set and have time and temperature labels.
[0082] Matrix denoising and weighted fitting with a forgetting factor are performed on samples from each temperature zone. Virtual sample enhancement and residual correlation analysis are then used to output temperature compensation coefficients, including:
[0083] Step 501: Construct a design matrix containing first, second, and third temperature difference terms for each temperature zone sample, and perform singular value decomposition on the matrix; retain only the three largest singular values and their corresponding singular vectors in the decomposition results to form a noise reduction design matrix; wherein, the design matrix is: Where n represents the number of samples. These represent the temperature difference from the first sample to the nth sample, where the temperature difference refers to the difference between the sample temperature and the reference temperature of its temperature zone. These represent the quadratic temperature differences from the first sample to the nth sample. These represent the three temperature differences from the first sample to the nth sample; singular value decomposition is a conventional technique and will not be elaborated upon here.
[0084] Step 502: Based on the noise reduction design matrix, establish a weighted least squares model with a forgetting factor. First, multiply the noise reduction design matrix on the left by the weight matrix and then multiply it by its transpose; then invert the resulting matrix; finally, multiply it on the right by the transpose of the noise reduction design matrix, the weight matrix, and the voltage column vector to obtain the temperature compensation coefficient vector corresponding to each temperature zone; wherein, the formula for the temperature compensation coefficient vector is: , The temperature compensation coefficient vector is represented as: , Represents a constant term. Denotes the coefficient of the linear term. Denotes the coefficient of the quadratic term. Denotes the coefficient of the cubic term. This represents the noise reduction design matrix. Let T denote the weight matrix, and T denote the transpose operation. denoted as the forgetting factor, preferably set to 0.98, and I represents the identity matrix.
[0085] Step 503: A virtual sample is generated by mirroring the centroid of the temperature zone sample as the center of symmetry and added to the fitting. The virtual sample is given half the weight value of the real sample in the weight matrix to avoid an overly strong dominant effect on the fitting model.
[0086] Step 504: Construct a third-order polynomial prediction model based on the temperature compensation coefficient vector, calculate the predicted voltage of the sample, and use the difference between the actual voltage and the predicted voltage as the temperature compensation residual; then calculate the Spearman rank correlation coefficient between the temperature compensation residual and the temperature difference. If its absolute value exceeds a preset correlation threshold, add the product of the temperature difference and the reference temperature of the temperature zone to the noise reduction design matrix as a temperature difference interaction term, and return to step 502 for refitting; where the temperature difference refers to the difference between the sample temperature and the reference temperature of its temperature zone; the third-order polynomial prediction model is: , Indicates the sample predicted voltage. , and These represent the first, second, and third temperature differences, respectively. The Spearman rank correlation coefficient is a standard technique and will not be elaborated upon here.
[0087] Step 505: When the absolute value of the Spearman rank correlation coefficient is not greater than the preset correlation threshold, output the temperature compensation coefficient vector for each temperature zone.
[0088] This embodiment achieves matrix denoising through singular value decomposition, effectively improving the data signal-to-noise ratio and providing a reliable foundation for coefficient fitting. The weighted fitting mechanism with a forgetting factor enables the model to dynamically adapt to slow changes in temperature characteristics, improving long-term stability. Virtual sample augmentation expands the sample size without increasing the cost of actual measurement, especially improving the fitting effect in extreme temperature regions. Residual correlation analysis and model iterative optimization ensure sufficient temperature compensation and significantly reduce temperature correlation errors over a wide temperature range.
[0089] In one embodiment of the present invention, the analog-to-digital converter reading is corrected according to the temperature compensation coefficient vector to obtain the corrected voltage. Then, segmentation, feature extraction, and weighted fitting are performed using a preset reference voltage and the corrected residual. The initial gain coefficient and initial bias parameters of each segment are output, including:
[0090] Step 601: Correct the analog-to-digital converter readings according to the third-order polynomial prediction model described in step 504 to obtain the corrected voltage. The difference between the corrected voltage and the preset reference voltage is used to determine the corrected residual, and a residual sequence is constructed.
[0091] Step 602: Based on the corrected residuals and corrected voltages, a two-dimensional joint feature vector is constructed to form a sample set. The sample set is then clustered using Euclidean distance and Ward's minimum variance hierarchical clustering algorithm. A genetic algorithm is used to determine the number of segments, dividing the sample set into multiple sub-segment sample sets. Specifically, Euclidean distance is used to calculate the similarity between the two-dimensional joint feature vectors in the sample set, and hierarchical clustering is performed based on the Ward minimum variance criterion. Initially, each sample is treated as an independent cluster. Subsequently, in each iteration, the intra-class variance increment generated after merging all possible cluster pairs is calculated, i.e., the difference in total intra-class variance before and after merging. The pair of clusters with the smallest variance increment is selected for merging, making the intra-class sample features of the merged cluster more consistent. This merging process is repeated until the number of clusters reaches the preset number of segments. This ensures higher consistency of internal features and more significant inter-class differences in the clustering results, effectively avoiding the unreasonable segmentation problem caused by simple threshold partitioning.
[0092] The determination of the number of segments using a genetic algorithm includes:
[0093] The pruning threshold is set to the chromosome using real-number encoding, and an initial population is generated in the range of 0 to 1; the pruning threshold is used to control the termination condition for cluster merging.
[0094] The fitness value is calculated for each chromosome in the population. The fitness value is the sum of the weighted root mean square of the residuals and the segment number penalty term. The fitness function is: ,in, Indicates the fitness value. This represents the i-th pruning threshold. Indicates the pruning threshold The corresponding number of segments, where k represents the segment index. Let k represent the sample set of the k-th sub-segment. This represents the corrected residual for sample j. This represents the weight coefficient of sample j. This represents the penalty coefficient, used to suppress overfitting caused by an excessive number of segments.
[0095] The parent individuals are selected using a roulette wheel selection method combined with an elite preservation strategy, and arithmetic crossover is performed based on the weighted residual mean to generate offspring; specifically, let the parent chromosomes be... and The mean residuals of the corresponding sub-segments are respectively and The cross weights in this step are: The offspring chromosomes are: ,in, For offspring chromosomes, This refers to cross weights.
[0096] Adaptive Cauchy mutation is applied to the offspring chromosomes, and the variance of the mutation decreases with the number of generations. Adaptive Cauchy mutation is a conventional technique and will not be elaborated here.
[0097] When the maximum number of generations is reached, the chromosome with the smallest fitness value is output, and the corresponding pruning threshold and the number of segments determined by the pruning threshold are obtained.
[0098] The above steps use a genetic algorithm to globally optimize the pruning threshold, which can adaptively determine the optimal number of segments. This avoids insufficient or excessive segments caused by fixed segments, and enhances the optimization accuracy through residual weighted crossover and adaptive mutation. The final number of segments balances data fitting accuracy and model simplicity.
[0099] Step 603: For each sub-segment sample set, construct a two-dimensional joint matrix by the corrected voltage and the normalized reading of the analog-to-digital converter, and perform non-negative matrix decomposition to obtain two non-negative factor matrices, which represent the implicit structural components of the sub-segment sample set in the slope and bias directions, respectively; wherein, the normalized reading of the analog-to-digital converter is obtained by normalizing the analog-to-digital converter reading using the sampling gain parameter.
[0100] Step 604: Construct a weight matrix based on the corresponding corrected residual sequence in each sub-segment sample set, where the elements of the weight matrix are the reciprocals of the absolute value of the corrected residual plus a small constant; use the weighted least squares method to fit the linear relationship between the normalized reading of the analog-to-digital converter and the corrected voltage to construct a predictive relationship model, obtaining the initial gain coefficient and initial bias parameter of the sub-segment; wherein, the predictive relationship model is: the corrected voltage equals the product of the initial gain coefficient of the sub-segment and the normalized reading of the analog-to-digital converter plus the initial bias parameter; expressed as: ,in, Indicates the corrected voltage. This represents the initial gain coefficient. This represents the normalized reading of the analog-to-digital converter. This represents the initial bias parameter.
[0101] This embodiment eliminates the influence of temperature on the analog-to-digital converter readings through temperature correction, providing a clean data foundation for range calibration; segmented clustering based on corrected residuals and corrected voltages weakens the nonlinear characteristics of the data within each segment, reducing the difficulty of fitting; the implicit structural components extracted by nonnegative matrix factorization provide prior features for linear fitting, improving the rationality of the model; weighted least squares reduces the interference of outliers on the fitting results by reducing the weight of large residual samples, ultimately making the initial gain and bias parameters of each segment more accurate.
[0102] In one embodiment of the present invention, an observation residual is constructed based on the corrected voltage and analog-to-digital converter readings, and a recursive least squares algorithm is used for recursive updating to obtain the adjusted gain coefficient and bias parameters, including:
[0103] Step 701: Set the initial gain coefficient and initial bias parameter of each segment as the initial state value of the recursive filter, and set the initial value of the state covariance matrix; wherein the initial value of the state covariance matrix is set as a diagonal matrix, and the diagonal elements are any values from 0 to 1.
[0104] Step 702: Obtain the corrected voltage based on the prediction relationship model, and calculate the difference between the corrected voltage and the predicted voltage to obtain the observation residual;
[0105] Step 703: Using the observation residuals as input, the gain coefficients and bias parameters of each segment are recursively updated using a recursive least squares algorithm with a forgetting factor to obtain the adjusted gain coefficients and bias parameters. Specifically, the recursive process of this step includes: calculating the gain matrix based on the current state vector and observation vector, then updating the state vector in combination with the observation residuals, and simultaneously updating the state covariance matrix. The state vector is a two-dimensional vector containing the gain coefficients and bias parameters of the segment to be segmented, and the observation vector is a two-dimensional vector including the normalized reading of the analog-to-digital converter and 1.
[0106] The formula for calculating the gain matrix is: Where M represents the gain matrix, Let h represent the state covariance matrix at the previous time step, and h represent the observation vector. The forgetting factor is denoted as 0.98 to 0.99, which can balance the sensitivity to new observation data and the stability of historical data. T represents the transpose operation.
[0107] Based on the gain matrix, the update formula for the state vector is: ,in, This represents the adjusted state vector. Let r represent the state vector at the previous time step, and r represent the observation residual. This represents the dot product of M and r.
[0108] The update formula for the state covariance matrix is: ,in, This represents the state covariance matrix at the current time step, used for recursive calculations at the next time step. This represents a second-order identity matrix.
[0109] In this embodiment, the recursive least squares algorithm with a forgetting factor can dynamically track the slow drift of parameters over time and continuously correct the gain and bias by observing the residuals in real time. Compared with the fixed parameter model, it significantly improves the system's ability to suppress long-term drift. The recursive update mechanism has low computational load and fast response speed, which can meet the requirements of online real-time calibration, enabling voltage measurement to maintain high accuracy in long-term use, and further enhancing the stability and reliability of the calibration system.
[0110] In one embodiment of the present invention, the external benchmark closed-loop verification module includes:
[0111] The first corrected voltage is calculated using a predictive relationship model based on the adjusted gain coefficient and bias parameters.
[0112] The absolute difference between the first corrected voltage and the external reference voltage reading is taken as the error; wherein the external reference voltage reading represents the standard voltage value obtained through a high-precision external reference source.
[0113] When the error is less than the preset error threshold, the calibration is confirmed to be effective; otherwise, the multi-point automatic calibration module is triggered to recalculate the initial gain coefficient and initial bias parameters of the segments. It should be noted that the preset error threshold can be dynamically adjusted according to the accuracy level of the voltage monitor. Preferably, its value ranges from 0.01% to 0.1% of the preset reference voltage to balance verification rigor and system stability.
[0114] This embodiment effectively avoids the cumulative errors that may exist in internal calibration by introducing an independent external reference voltage as a third-party reference, and significantly improves the reliability of calibration results. The closed-loop feedback mechanism can trigger recalibration in time when the parameter drift exceeds the allowable range, forming a dynamic optimization cycle of calibration, verification and correction, ensuring that the voltage monitor maintains a high-precision measurement state during long-term use.
[0115] In one embodiment of the present invention, a coefficient solidification module is further included, which is used to write the adjusted gain coefficient, bias parameter and corresponding calibration time information output by the drift prediction fine-tuning module into a non-volatile memory after the calibration is confirmed to be effective, so as to form a traceable calibration parameter record.
[0116] The non-volatile storage in this embodiment ensures that calibration parameters are not lost after the device is powered off, allowing the device to directly recall the latest calibration parameters upon the next startup without having to re-execute the complete calibration process, thus significantly shortening startup time. The recording of calibration time information provides time-dimensional data for parameter drift analysis, facilitating subsequent evaluation of the device's long-term stability by comparing historical parameters.
[0117] It should be noted that the interval and threshold sizes are set for ease of comparison. The size of the threshold depends on the amount of sample data and the base number set by those skilled in the art for each set of sample data, as long as it does not affect the proportional relationship between the parameter and the quantized value. Furthermore, the above formulas are all dimensionless calculations, and the formulas are derived from software simulations using a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0118] The embodiments of the present invention have been described above, but the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms based on the guidance of the present embodiments, all of which are within the protection scope of the present embodiments.
Claims
1. A smart calibration system for a voltage monitor, characterized in that, include: The ambient temperature control module is used to acquire the ambient temperature deviation after power-on and drive the temperature control device based on proportional, integral and derivative control logic to keep the test ambient temperature within the preset range. The internal reference integrity detection module is used to sample the internal reference voltage source in batches, and eliminate outliers through density screening, mesoscale anomaly removal and extreme outlier identification to obtain the final sample set; Stability is determined by covariance traces, and the sampling gain parameter is output when multiple consecutive sampling batches are stable. The temperature zone segmented fitting module is used to collect temperature and voltage samples, divide them into multiple temperature zones, perform matrix noise reduction and weighted fitting with forgetting factor on each temperature zone sample, and output temperature compensation coefficient vector through virtual sample enhancement and residual correlation analysis. The multi-point automatic calibration module is used to correct the analog-to-digital converter readings based on the temperature compensation coefficient vector to obtain the correction voltage. It then combines the preset reference voltage and the correction residual to perform segmentation, feature extraction, and weighted fitting, and outputs the initial gain coefficient and initial bias parameters for each segment. The drift prediction fine-tuning module is used to take the initial gain coefficient and initial bias parameter of the segment as the initial value of the recursive filter state, construct the observation residual based on the correction voltage and analog-to-digital converter reading, and use the recursive least squares algorithm to recursively update to obtain the adjusted gain coefficient and bias parameter. The external reference closed-loop verification module is used to calculate the first correction voltage based on the adjusted gain coefficient and bias parameters, and compare it with the external reference voltage reading to determine whether the error is within the threshold. If it fails, it triggers recalibration; if it passes, it confirms that the calibration is valid.
2. The intelligent calibration system for a voltage monitor according to claim 1, characterized in that, The internal reference voltage source was sampled in batches, and outliers were eliminated through density screening, mesoscale anomaly removal, and extreme outlier identification to obtain the final sample set, including: Step 201: The internal reference voltage source is continuously collected according to the preset batch capacity to form a batch sample set; Step 202: Perform kernel density estimation on the batch sample set using a Gaussian kernel function, and remove samples with a density lower than a preset density threshold to obtain the first candidate sample set; Step 203: Calculate the absolute median deviation based on the first candidate sample set, and remove samples with a deviation coefficient exceeding the mesoscale threshold according to the Hampel rule to obtain the second candidate sample set; Step 204: Perform a generalized extreme studentized outlier test on the second candidate sample set to identify and remove extreme outliers, thus obtaining the final sample set.
3. The intelligent calibration system for a voltage monitor according to claim 2, characterized in that, Step 203 specifically includes: Step 301: Calculate the median of the first candidate sample set and the absolute value of the difference between each sample and the median, and use the median of the absolute deviations as the absolute deviation of the median. Step 302: Convert the absolute deviation of the median into an equivalent standard deviation scale by a scaling factor, and divide the absolute value of the difference between each sample and the median by the equivalent standard deviation scale to obtain the deviation coefficient of each sample. Step 303: Compare the bias coefficient with the preset mesoscale threshold, remove samples with bias coefficients greater than the mesoscale threshold, and retain the remaining samples to form the second candidate sample set.
4. The intelligent calibration system for a voltage monitor according to claim 2, characterized in that, Stability is determined using covariance traces. When multiple consecutive sampling batches are stable, the sampling gain parameters are output, including: Step 401: For each final sample set, calculate its covariance matrix using the minimum covariance determinant method, and calculate the trace value of the covariance matrix. If the trace value does not exceed a preset stability threshold, the batch of samples is determined to be a stable batch; wherein, the trace value is the sum of the diagonal elements of the covariance matrix. Step 402: The mean values of multiple batches of samples determined to be stable batches are compiled into a mean list. After reaching the preset number of stable batches, the list is truncated, the maximum and minimum values are removed, and the arithmetic mean is calculated as the reference reference voltage. Step 403: Calculate the ratio between the reference voltage and the preset reference voltage to obtain the sampling gain parameter.
5. The intelligent calibration system for a voltage monitor according to claim 1, characterized in that, The temperature and voltage samples have the same format as the final sample set and include time and temperature labels. Matrix denoising and weighted fitting with a forgetting factor are performed on samples from each temperature zone. Virtual sample enhancement and residual correlation analysis are then used to output temperature compensation coefficients, including: Step 501: Construct a design matrix containing first, second, and third temperature difference terms for each temperature zone sample, and perform singular value decomposition on the matrix; retain only the first three largest singular values and their corresponding singular vectors in the decomposition results to form a noise reduction design matrix. Step 502: Based on the noise reduction design matrix, establish a weighted least squares model with a forgetting factor. First, multiply the noise reduction design matrix on the left by the weight matrix and multiply it by its own transpose; then, invert the resulting matrix; finally, multiply it on the right by the transpose of the noise reduction design matrix, the weight matrix, and the voltage column vector to obtain the temperature compensation coefficient vector corresponding to each temperature zone. Step 503: A virtual sample is generated by mirroring the centroid of the temperature zone sample as the center of symmetry and added to the fitting. The virtual sample is assigned half the weight value of the real sample in the weight matrix. Step 504: Construct a third-order polynomial prediction model based on the temperature compensation coefficient vector, calculate the sample predicted voltage, and use the difference between the actual sample voltage and the sample predicted voltage as the temperature compensation residual; then calculate the Spearman rank correlation coefficient between the temperature compensation residual and the temperature difference. If its absolute value exceeds the preset correlation threshold, add the product term of the temperature difference and the temperature zone reference temperature to the noise reduction design matrix as the temperature difference interaction term, and return to step 502 to refit. Step 505: When the absolute value of the Spearman rank correlation coefficient is not greater than the preset correlation threshold, output the temperature compensation coefficient vector for each temperature zone.
6. The intelligent calibration system for a voltage monitor according to claim 5, characterized in that, The analog-to-digital converter reading is corrected based on the temperature compensation coefficient vector to obtain the corrected voltage. Then, segmentation, feature extraction, and weighted fitting are performed using a preset reference voltage and the corrected residual. The initial gain coefficients and initial bias parameters for each segment are output, including: Step 601: Correct the analog-to-digital converter readings according to the third-order polynomial prediction model described in step 504 to obtain the corrected voltage. The difference between the corrected voltage and the preset reference voltage is used to determine the corrected residual, and a residual sequence is constructed. Step 602: Construct a two-dimensional joint feature vector based on the corrected residual and the corrected voltage to form a sample set. Use Euclidean distance and Ward minimum variance hierarchical clustering algorithm to cluster the sample set. Use a genetic algorithm to determine the number of segments and divide the sample set into multiple sub-segment sample sets. Step 603: For each sub-segment sample set, construct a two-dimensional joint matrix by the corrected voltage and the normalized reading of the analog-to-digital converter, and perform non-negative matrix decomposition to obtain two non-negative factor matrices, which represent the implicit structural components of the sub-segment sample set in the slope and bias directions, respectively; wherein, the normalized reading of the analog-to-digital converter is obtained by normalizing the analog-to-digital converter reading using the sampling gain parameter. Step 604: Construct a weight matrix based on the corresponding corrected residual sequence in each sub-segment sample set, where the elements of the weight matrix are the reciprocals of the absolute value of the corrected residual plus a small constant; use the weighted least squares method to fit the linear relationship between the normalized reading of the analog-to-digital converter and the corrected voltage, construct a prediction relationship model, and obtain the initial gain coefficient and initial bias parameter of the sub-segment; where the prediction relationship model is: the corrected voltage is equal to the product of the initial gain coefficient of the sub-segment and the normalized reading of the analog-to-digital converter plus the initial bias parameter.
7. The intelligent calibration system for a voltage monitor according to claim 6, characterized in that, The number of segments is determined using a genetic algorithm, including: Real-number encoding was used to set the pruning threshold to chromosomes, and an initial population was generated in the range of 0 to 1. The fitness value is calculated for each chromosome in the population, where the fitness value is the sum of the weighted root mean square of the residuals and the segment number penalty term; Parent individuals are selected using a roulette wheel method combined with an elite retention strategy, and arithmetic crossover is performed based on the weighted residual mean to generate offspring. Adaptive Cauchy variation was applied to offspring chromosomes, and the variance of the variation decreased with the number of generations. When the maximum number of generations is reached, the chromosome with the smallest fitness value is output, and the corresponding pruning threshold and the number of segments determined by the pruning threshold are obtained.
8. The intelligent calibration system for a voltage monitor according to claim 1, characterized in that, Based on the modified voltage and analog-to-digital converter readings, the observation residuals are constructed, and a recursive least squares algorithm is used for recursive updates to obtain the adjusted gain coefficients and bias parameters, including: Step 701: Set the initial gain coefficient and initial bias parameter of each segment as the initial state value of the recursive filter, and set the initial value of the state covariance matrix. Step 702: Obtain the corrected voltage based on the prediction relationship model, and calculate the difference between the corrected voltage and the predicted voltage to obtain the observation residual; Step 703: Using the observation residuals as input, the gain coefficients and bias parameters of each segment are updated recursively using a recursive least squares algorithm with a forgetting factor to obtain the adjusted gain coefficients and bias parameters.
9. The intelligent calibration system for a voltage monitor according to claim 1, characterized in that, The external benchmark closed-loop verification module includes: The first corrected voltage is calculated using a predictive relationship model based on the adjusted gain coefficient and bias parameters. The absolute difference between the first correction voltage and the external reference voltage reading is taken as the error; When the error is less than the preset error threshold, the calibration is confirmed to be effective; otherwise, the multi-point automatic calibration module is triggered to recalculate the initial gain coefficient and initial bias parameter of the segment.
10. The intelligent calibration system for a voltage monitor according to claim 1, characterized in that, It also includes a coefficient solidification module, which is used to write the adjusted gain coefficient, bias parameter and calibration time information into the memory after calibration confirmation.
Citation Information
Patent Citations
Automatic voltage accuracy correcting and adjusting method for voltage calibrating device
CN104360300A
Parameter determination method and calibration method of benchmark reference voltage and incubator
CN118860046A
IMU (Inertial Measurement Unit) dynamic calibration and compensation method and device, vehicle-mounted navigation equipment and storage medium
CN119357650A
Instrument metering detection and calibration method and system
CN120195608A
LCOS linearity correction method based on cubesat laser communication terminal
CN120415564A
Cited By
Data acquisition verification system of miniature data acquisition instrument
CN121278615A
Method and device for testing and evaluating high-precision reference voltage source chip
CN121878421A
A high-precision reference voltage source chip test evaluation method and device
CN121878421B