A method and system for compensating for measurement errors under electromagnetic interference, and a metal electric energy metering box
By constructing a multi-dimensional electromagnetic environment sensing feature set and a causal decoupling error description set, and combining a deep kernel extreme learning machine model and a stochastic model predictive control algorithm, adaptive adjustment and error compensation of the composite shielding structure were achieved. This solved the problems of decreased shielding effectiveness and non-real-time error compensation under dynamic changes in the electromagnetic environment in existing technologies, and improved the measurement accuracy and stability of the metering instrument.
Patent Information
- Application Number
- CN202611513527.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-28
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies cannot adaptively adjust to dynamic changes in the electromagnetic environment, resulting in decreased shielding effectiveness and unreal-time compensation for measurement errors, especially in extreme electromagnetic environments where errors exceed the reliable range.
By constructing a multi-dimensional electromagnetic environment perception feature set, a causal decoupling error description set, and a shielding adjustment control vector, and combining a deep kernel extreme learning machine model and a stochastic model predictive control algorithm, stability constraint optimization and adaptive compensation of the composite shielding structure are achieved.
Multi-level coordinated suppression of measurement errors was achieved under extreme electromagnetic environments, which improved the measurement accuracy and stability of the measuring instruments, reduced the risk of control oscillations, and ensured the asymptotic stability of the system under conditions of random and sudden disturbances.
Smart Images

Figure CN123176646A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent sensing and control technology, and in particular to a method, system, and metal energy metering box for compensating for metering errors under electromagnetic interference. Background Technology
[0002] Measuring instruments are widely used in industries such as power, petrochemicals, and metallurgy, undertaking the task of accurately measuring physical quantities such as voltage, current, and power. With the large-scale deployment of power electronic equipment, the electromagnetic environment in industrial sites is becoming increasingly complex. Equipment such as frequency converters, switching power supplies, and high-power motors continuously generate broadband electromagnetic interference, posing a serious threat to the measurement accuracy of measuring instruments. To address these issues, existing technologies generally employ a fixed-parameter metal shielding housing combined with a back-end filtering circuit to suppress electromagnetic interference, supplemented by an offline calibration compensation table to correct system errors, thus mitigating the impact of steady-state electromagnetic interference on measurement accuracy to a certain extent.
[0003] However, the shielding structure parameters in existing technologies are fixed and cannot be adaptively adjusted with the dynamic changes in the electromagnetic environment. Electromagnetic interference in industrial environments often exhibits characteristics of multi-band coupling, strong pulse characteristics, and significant time-varying nature. The shielding effectiveness of fixed shielding structures drops significantly when interference intensity changes abruptly or frequency bands shift, causing the residual interference entering the instrument to fluctuate drastically with environmental changes. At the same time, existing compensation methods have failed to establish a quantitative causal relationship between interference characteristics and measurement errors. The compensation parameters are difficult to track the dynamic causes of errors in real time, and the problem of error compensation exceeding the reliable range is particularly prominent in extreme electromagnetic environments.
[0004] Therefore, how to construct a closed-loop method that can dynamically adjust the shielding effectiveness based on the real-time electromagnetic environment and further achieve precise error compensation on the basis of physical shielding has become a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0005] This invention provides a method, system, and metal energy metering box for compensating for measurement errors under electromagnetic interference, in order to overcome the deficiencies of the prior art.
[0006] The first aspect of this invention provides a method for compensating for measurement errors under electromagnetic interference, comprising: S1. Robust statistical quantization is performed on the multi-band electromagnetic field intensity data of the space where the measuring instrument is located to obtain a multi-dimensional electromagnetic environment sensing feature set. S2. Input the multi-dimensional electromagnetic environment perception feature set into the nonlinear mapping model to obtain the prediction measurement error component vector; S3. Perform causal decoupling on the predicted measurement error component vector to obtain the causal decoupling error description set; S4. Based on the causal decoupling error description set, the stability constraint optimization solution is performed on the shielding adjustment amount of each layer of the composite shielding structure to obtain the shielding adjustment control vector. After the shielding adjustment control vector is sent to the composite shielding structure for execution, the multi-dimensional electromagnetic environment sensing feature set is updated. Based on the updated prediction measurement error component vector, the shielding effectiveness adjustment residual vector is calculated. S5. Adjust the residual vector according to the shielding effectiveness, and adaptively compensate the original sampled output value of the metering instrument to obtain the compensated metering output value.
[0007] According to the method for compensating for measurement errors under electromagnetic interference provided by the present invention, step S1 further includes: S11. Electromagnetic field strength data of multiple key nodes inside and outside the metering instrument are synchronously collected through a wide-band electromagnetic field strength sensor array, and divided into low-frequency sub-band, mid-frequency sub-band and high-frequency sub-band according to frequency band to obtain raw field strength data of multiple sub-bands. S12. Fit the Alpha stable distribution of the original field strength data of multiple sub-bands to obtain multiple sub-band characteristic indices; S13. Based on multiple sub-band characteristic indices, the field strength statistical features of the original field strength data of multiple sub-bands are quantified by fractional low-order moments to obtain the field strength statistical feature quantities of multiple sub-bands. S14. The weight vector of the hierarchical analysis method is dynamically adjusted according to the characteristic index of multiple sub-bands. The statistical characteristic of field strength of multiple sub-bands, the time domain fluctuation coefficient and the main frequency offset are weighted and fused according to the dynamically adjusted weight vector to obtain the comprehensive shielding effectiveness state quantity. S15. Combine the statistical characteristic sequences of multiple sub-band field strengths, the characteristic index sequences of multiple sub-bands, and the comprehensive shielding effectiveness state quantity to obtain a multi-dimensional electromagnetic environment sensing feature set.
[0008] According to the measurement error compensation method under electromagnetic interference provided by the present invention, step S2 further includes: S21. Using the multidimensional electromagnetic environment perception feature set as input and the standard measurement error data under historical interference conditions as supervision labels, the nonlinear relationship between interference features and measurement error is trained through a deep kernel extreme learning machine model, the model parameters are solidified, and a nonlinear mapping model is obtained. S22. Input the multidimensional electromagnetic environment sensing feature set into the nonlinear mapping model to obtain the predicted measurement error component vector; the predicted measurement error component vector includes the amplitude error prediction value, the phase error prediction value, and the zero drift error prediction value.
[0009] According to the measurement error compensation method under electromagnetic interference provided by the present invention, in step S21, the training process of the deep kernel extreme learning machine model specifically includes: S211. Based on the numerical range of the comprehensive shielding effectiveness state quantity, the training samples are divided into strong interference range, medium interference range and weak interference range, and the corresponding kernel function parameter combinations are configured for each range. S212. Multiple sub-band feature index sequences are used as additional channels to access the first hidden layer of the deep kernel extreme learning machine model. Multi-layer random hidden layers are used to perform layer-by-layer kernel mapping on the multi-dimensional electromagnetic environment perception feature set to obtain a high-dimensional kernel feature representation. S213. The high-dimensional kernel feature representation is solved by kernel ridge regression to obtain the solidified nonlinear mapping model.
[0010] According to the measurement error compensation method under electromagnetic interference provided by the present invention, step S3 further includes: S31. Based on the historical multidimensional electromagnetic environment sensing feature set and the historical predicted measurement error component vector, a directed acyclic graph is constructed through a structural causal model algorithm; the directed acyclic graph uses multiple frequency band sub-band features as cause nodes, circuit coupling paths as hidden variable nodes, and each component of the predicted measurement error component vector as result nodes. S32. During online operation, for each error component in the predicted measurement error component vector, the Pearl interference quantifier is used to perform counterfactual intervention calculation on multiple interference source sub-bands in the directed acyclic graph to obtain the average causal effect of multiple interference sources on each error component. S33. Based on the average causal effect, the predicted measurement error component vector is decomposed into the magnetic field-dominated error component and the electric field-dominated error component, and a causal confidence matrix is generated. S34. Combine the magnetic field dominant error component, the electric field dominant error component, and the causal confidence matrix to obtain the causal decoupling error description set.
[0011] According to the measurement error compensation method under electromagnetic interference provided by the present invention, step S4 further includes: S41. Based on the causal confidence matrix in the causal decoupling error description set, determine the layer adjustment priority of the magnetic shielding layer and the electric shielding layer in the composite shielding structure within the current sampling period, and obtain the layer adjustment priority weight. S42. Using the sequence of statistical features of field strength of multiple sub-bands in the multidimensional electromagnetic environment sensing feature set as state feedback, and the causal decoupling error description set as the optimization objective, under the constraints of Lyapunov stability and the physical feasible domain of each layer of shielding adjustment, the weighted error norm in the finite time domain is minimized by the stochastic model predictive control algorithm to obtain the shielding adjustment control vector. S43. After the shielding adjustment control vector is sent to the composite shielding structure, the multi-dimensional electromagnetic environment sensing feature set is re-acquired and updated, and the updated prediction measurement error component vector is obtained by inputting it into the nonlinear mapping model again. The shielding effectiveness adjustment residual vector is obtained by subtracting the updated prediction measurement error component vector from the prediction measurement error component vector.
[0012] According to the measurement error compensation method under electromagnetic interference provided by the present invention, step S42 further includes: S421. When using a nonlinear mapping model to infer the predicted measurement error component vector, the confidence interval of the predicted measurement error component vector is output simultaneously, and the confidence interval is used to construct a probability-based set of uncertainty constraints. S422. Using the Lyapunov stability criterion as a hard constraint condition for the optimization problem, the system's generalized energy function is required to satisfy the monotonically decreasing condition in the next time step by masking and adjusting the control vector. The generalized energy function is constructed using the weighted norm of multiple components in the causal decoupling error description set. S423. Under the constraints of uncertainty set and Lyapunov stability, the worst-case perturbation corresponding to the lower bound of the confidence interval is used as the basis for robust optimization. The shielding adjustment control vector at the current time step is obtained by solving the quadratic programming method.
[0013] According to the measurement error compensation method under electromagnetic interference provided by the present invention, step S5 further includes: S51. Using the shielding effectiveness adjustment residual vector as input, the recursive update step size of the compensation parameter matrix is adjusted causally weighted according to the confidence of each column in the causal confidence matrix. The compensation parameter matrix is continuously updated by the recursive least squares algorithm with forgetting factor to obtain the updated compensation parameter matrix. S52. Perform the inner product calculation between the updated compensation parameter matrix and the shielding effectiveness adjustment residual vector to obtain the comprehensive error compensation amount; S53. The comprehensive error compensation amount is superimposed on the original sampling output value of the metering instrument to obtain the compensated metering output value.
[0014] A second aspect of the present invention provides a measurement error compensation system under electromagnetic interference, comprising: Quantization module: used to perform robust statistical quantization on multi-band electromagnetic field strength data of the space where the metering instrument is located, and obtain a multi-dimensional electromagnetic environment sensing feature set; Mapping module: used to input the multidimensional electromagnetic environment sensing feature set into the nonlinear mapping model to obtain the prediction measurement error component vector; Decoupling module: used to decouple the predictive measurement error component vectors causally to obtain a causal decoupling error description set; The update module is used to perform stability constraint optimization on the shielding adjustment amount of each layer of the composite shielding structure according to the causal decoupling error description set, obtain the shielding adjustment control vector, and send the shielding adjustment control vector to the composite shielding structure for execution. After that, it updates the multi-dimensional electromagnetic environment sensing feature set and calculates the shielding effectiveness adjustment residual vector based on the updated prediction measurement error component vector. Compensation module: Used to adjust the residual vector according to the shielding effectiveness, and adaptively compensate the original sampled output value of the metering instrument to obtain the compensated metering output value.
[0015] A third aspect of the present invention provides a metal energy metering box, comprising: Enclosure, composite shielding structure, wideband electromagnetic field strength sensor array and control unit; The enclosure is made of metal and is used to house measuring instruments. The composite shielding structure is set on the inner wall of the enclosure and includes a magnetic shielding layer and an electrical shielding layer. Both the magnetic shielding layer and the electrical shielding layer are connected to a shielding adjustment actuator, which is used to independently adjust the shielding adjustment amount of the magnetic shielding layer and the electrical shielding layer according to the shielding adjustment control vector. The wideband electromagnetic field strength sensor array is set at multiple key nodes on the inner and outer sides of the housing to synchronously collect electromagnetic field strength data in the low-frequency, mid-frequency and high-frequency bands. The control unit is located inside the enclosure and includes multiple functional modules in the electromagnetic interference measurement error compensation system. When multiple functional modules are invoked, the electromagnetic interference measurement error compensation method described above is executed to enable the composite shielding structure to perform stability constraint optimization adjustment of the shielding adjustment amount of each layer and to achieve adaptive compensation of the original sampled output value of the metering instrument.
[0016] This invention discloses a method, system, and metal energy metering box for compensating metering errors under electromagnetic interference. By constructing a complete closed-loop data flow between a multi-dimensional electromagnetic environment sensing feature set, a causal decoupling error description set, a shielding adjustment control vector, and the compensated metering output value, it organically integrates electromagnetic interference sensing, modeling, physical adjustment, and software compensation, bringing significant technological advancements at multiple levels. At the electromagnetic environment sensing level, Alpha stable distribution fitting and fractional low-order moment statistics are introduced to robustly quantify the original field strength data of each sub-band. The characteristic index of each sub-band can dynamically reflect the pulse strength of the interference, enabling the comprehensive shielding effectiveness state quantity to accurately characterize the degree of harm to the circuit under extreme pulse interference conditions such as inverter switching noise and lightning surges. This fundamentally overcomes the distortion problem of traditional root mean square statistics in heavy-tailed distribution scenarios. At the error modeling level, the deep kernel extreme learning machine model, combined with the design of partitioned kernel function parameters, enables the nonlinear mapping model to have a fine fitting capability for the response curves of different disturbance intensity ranges. The output predicted measurement error component vector simultaneously carries quantitative estimates of three types of errors: amplitude, phase, and zero drift, providing a comprehensive error state description for subsequent causal decoupling. At the causal decoupling level, a causal confidence matrix is generated through a directed acyclic graph and a counterfactual inference mechanism, decomposing the predicted measurement error component vector into magnetic field-dominated error components and electric field-dominated error components. This allows the shielding adjustment strategy to distinguish that the physical causes of the error do not solely depend on statistical correlation, thereby significantly reducing the risk of control oscillations caused by spurious correlation driving the controller to adjust the incorrect shielding layer. At the physical shielding adjustment level, the stochastic model predictive control algorithm introduces a set of Lyapunov stability hard constraints and uncertainty constraints, ensuring that the shielding adjustment control vector still guarantees the monotonically decreasing generalized energy function of the system under conditions of random disturbance mutations. This mathematically guarantees the asymptotic stability of the closed-loop system under extreme disturbance scenarios. At the residual compensation level, the recursive least squares algorithm with forgetting factor is combined with the hierarchical step size adjustment mechanism of the causal confidence matrix, which enables the compensation parameter matrix to continuously and adaptively converge under the condition of no reference. The resulting comprehensive error compensation amount is superimposed to output the compensated measurement output value, and is fed back to the perception layer and the causal decoupling layer in two ways, driving the overall closed loop to continuously optimize the error compensation process, and finally realizing the multi-level collaborative suppression of measurement error. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1A schematic flowchart of a measurement error compensation method under electromagnetic interference provided by the present invention; Figure 2 This invention provides a schematic diagram of a measurement error compensation system under electromagnetic interference. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, embodiments of this invention, and should not be construed as limiting the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention. In the description of this invention, it should be understood that the terminology used is for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0020] The embodiments of the present invention are described below with reference to the figures.
[0021] like Figure 1 As shown, the first aspect of the present invention provides a method for compensating for measurement errors under electromagnetic interference, comprising: S1. Robust statistical quantization is performed on the multi-band electromagnetic field strength data of the space where the measuring instrument is located to obtain a multi-dimensional electromagnetic environment sensing feature set.
[0022] Step S1 further includes: S11. Electromagnetic field strength data of multiple key nodes inside and outside the metering instrument are synchronously collected through a wide-band electromagnetic field strength sensor array, and divided into low-frequency sub-band, mid-frequency sub-band and high-frequency sub-band according to frequency band to obtain raw field strength data of multiple sub-bands.
[0023] Furthermore, during data acquisition, this invention first deploys wideband electromagnetic field strength sensor arrays on the outer and inner sides of the metering instrument's housing and at key nodes in the signal transmission link. These key nodes are locations that significantly affect measurement accuracy, such as the analog front-end input port, the vicinity of the sample-and-hold circuit, and the power inlet. During acquisition, the sensor arrays simultaneously acquire the electric and magnetic field strength components at these nodes, with an acquisition period set to 50ms. After acquisition, this invention divides the raw acquired data into sub-bands according to frequency range: 10kHz to 1MHz is divided into a low-frequency sub-band, 1MHz to 100MHz into a mid-frequency sub-band, and 100MHz to 1GHz into a high-frequency sub-band. Each sub-band stores the field strength numerical sequence for all sampling times within its corresponding frequency range, forming raw field strength data for the low-frequency sub-band, the mid-frequency sub-band, and the high-frequency sub-band—that is, multiple raw field strength data for each sub-band.
[0024] S12. Perform Alpha stable distribution fitting on the original field strength data of multiple sub-bands to obtain multiple sub-band characteristic indices.
[0025] Furthermore, the Alpha stable distribution is a statistical model capable of characterizing a heavy-tailed, impulsive probability distribution. Its core parameter is the characteristic exponent, which ranges from 0 to 2. When the characteristic exponent equals 2, the Alpha stable distribution degenerates into a Gaussian distribution; when the characteristic exponent is less than 2, the distribution exhibits heavy-tailed characteristics. The smaller the characteristic exponent, the stronger the impulsiveness of the distribution, and the higher the probability of extreme values occurring.
[0026] In step S12, the present invention performs Alpha stable distribution fitting on the original field strength data of each sub-band obtained in S11. During the fitting process, the present invention adopts a parameter estimation method based on sample feature functions to calculate the empirical feature function of the field strength numerical sequence in each sub-band. Then, by minimizing the weighted residual between the empirical feature function and the theoretical feature function, the feature index corresponding to each sub-band is estimated sequentially. The low-frequency sub-band, mid-frequency sub-band, and high-frequency sub-band each independently complete the above fitting process and output the corresponding feature index values respectively. The feature indices of the three sub-bands together constitute multiple sub-band feature indices for use in subsequent steps.
[0027] In S12, this invention performs Alpha stable distribution fitting on the original field strength data of each sub-band. Its core principle is to estimate the characteristic exponent by minimizing the weighted residual between the empirical characteristic function and the theoretical characteristic function. The mathematical expression for this fitting objective is:
[0028] in, For the first Subband characteristic index estimate, subscript Choose 1, 2, and 3, which correspond to the low-frequency sub-band, mid-frequency sub-band, and high-frequency sub-band, respectively; To optimize the variable, i.e. the characteristic index to be estimated; This represents the total number of discrete evaluation points for the characteristic function. For the first One evaluation frequency point; For the first Subband raw field strength data sequence at evaluation point The empirical characteristic function value at the location; For parameters Alpha is stably distributed at the evaluation point The theoretical characteristic function value at the location; As assessment point Frequency weighting coefficients at the specified points.
[0029] S13. Based on multiple sub-band characteristic indices, perform field strength statistical feature quantification on the original field strength data of multiple sub-bands using fractional low-order moments to obtain multiple sub-band field strength statistical feature quantities.
[0030] Furthermore, the fractional lower-order moments are statistical moments of order less than 2. They aim to suppress the sensitivity of statistics to extreme impulse values by limiting the calculation of characteristic exponents of alpha stable distributions, thereby reflecting the background level of field strength more robustly than the root mean square in heavy-tailed distribution scenarios.
[0031] In step S13, based on the characteristic indices of each sub-band obtained in S12, the present invention determines the fractional order for each sub-band. The value of the fractional order is strictly less than the characteristic index of the corresponding sub-band and greater than zero. Subsequently, for the original field strength data of each sub-band obtained in S11, fractional lower-order moments are calculated using the corresponding fractional order. Specifically, the present invention takes the absolute value of the field strength value at each sampling point within the sub-band, performs a fractional order power operation, calculates the average value over all sampling points, and then takes the reciprocal power of the fractional order to obtain the field strength statistical characteristic quantity of the sub-band.
[0032] The low-frequency sub-band, mid-frequency sub-band, and high-frequency sub-band each complete the above calculations and output the field strength statistical characteristics of the low-frequency sub-band, mid-frequency sub-band, and high-frequency sub-band respectively. These three together constitute multiple sub-band field strength statistical characteristics.
[0033] In S13, this invention quantifies the field strength statistical characteristics of the original field strength data of each sub-band using fractional low-order moments. The calculation formula is as follows:
[0034]
[0035] in, For the first Sub-band field strength statistical characteristics; For the first The total number of sampling points in the sub-band during the current sampling period; For the first Sub-belt The field strength value at each sampling point; For the first The fractional order of the subband; The first result obtained for S12 Subband characteristic index estimate.
[0036] S14. The weight vector of the hierarchical analysis method is dynamically adjusted according to the characteristic index of multiple sub-bands. The statistical characteristic quantities of field strength of multiple sub-bands, the time domain fluctuation coefficient and the main frequency offset are weighted and fused according to the dynamically adjusted weight vector to obtain the comprehensive shielding effectiveness state quantity.
[0037] In step S14, this invention introduces a dynamic adjustment mechanism based on the analytic hierarchy process (AHP). Specifically, based on the multiple sub-band characteristic indices obtained in S12, the weight allocation of each sub-band across the two evaluation dimensions of steady-state level and instantaneous peak value is adjusted. Specifically, when the characteristic index of a sub-band decreases, it indicates that the impulsiveness of the sub-band's interference is enhanced. This invention automatically reduces the weight of that sub-band in the steady-state level evaluation while increasing its weight in the instantaneous peak value evaluation. Conversely, when the characteristic index approaches 2, it indicates that the sub-band's interference is approaching a Gaussian distribution, and the weight configuration based primarily on steady-state level is restored. After dynamic adjustment, the weight coefficients of each of the three sub-bands in the weighted fusion constitute the dynamically adjusted weight vector, and the sum of the three weight coefficients remains 1.
[0038] Subsequently, this invention weights and fuses the statistical characteristics of the sub-band field strength obtained in S13, the time-domain fluctuation coefficient corresponding to each sub-band field strength sequence, and the main frequency offset of each sub-band interference signal according to a dynamically adjusted weight vector. The time-domain fluctuation coefficient reflects the severity of the sub-band field strength fluctuations on the time axis and is calculated as the ratio of the standard deviation to the mean of the sub-band field strength sequence. The main frequency offset reflects the shift of the main frequency of the interference signal within the sub-band relative to the previous sampling period and is calculated as the difference in peak frequencies of the sub-band power spectrum within adjacent sampling periods. After normalization, these three types of values are linearly superimposed according to their respective weight coefficients to obtain the comprehensive shielding effectiveness state quantity. The final output comprehensive shielding effectiveness state quantity is a dimensionless scalar between 0 and 1; the lower the value, the worse the current shielding effectiveness and the more severe the electromagnetic environment.
[0039] The expression for the overall shielding effectiveness state quantity in step S14 is:
[0040] in, The value range is the comprehensive shielding effectiveness state quantity. The smaller the value, the worse the current shielding effectiveness; For the first Subband based on characteristic index The dynamically adjusted weighting coefficients satisfy , its follow Decrease and tilt toward the instantaneous peak dimension, as It increases and recovers towards the steady-state dimension; For the first Statistical characteristics of field strength inside the sub-band; For the first Statistical characteristics of field strength on the outer side of the sub-band; Indicates the first The shielding attenuation rate of a sub-band reflects the relative attenuation of the field strength inside and outside the sub-band. For the first The time-domain fluctuation coefficient of a sub-band is calculated by the ratio of the standard deviation to the mean of the field strength sequence of that sub-band, reflecting the degree of time-domain fluctuation of the interference. For the first The sub-band steady-state correction coefficient is a positive real number preset based on the sub-band frequency characteristics, used to adjust the influence of the time-domain fluctuation coefficient on the overall shielding effectiveness state quantity. For the first The subband main frequency offset is calculated from the absolute value of the difference between the peak frequencies of the subband power spectrum in two adjacent sampling periods, reflecting the degree of dynamic drift of the main frequency of the interference signal. For the first i-subband frequency offset correction coefficient is a positive real number preset based on the subband bandwidth, used to normalize the magnitude of the frequency offset.
[0041] S15. Combine the statistical characteristic sequences of multiple sub-band field strengths, the characteristic index sequences of multiple sub-bands, and the comprehensive shielding effectiveness state quantity to obtain a multi-dimensional electromagnetic environment sensing feature set.
[0042] In step S15, the present invention arranges the multiple sub-band field strength statistical characteristic quantities obtained in S13 continuously on the time axis to form a sequence of multiple sub-band field strength statistical characteristic quantities; arranges the multiple sub-band characteristic indices obtained in S12 continuously on the time axis to form a sequence of multiple sub-band characteristic indices; and incorporates the current value of the comprehensive shielding effectiveness state quantity obtained in S14. Subsequently, the above three types of data, the sequence of multiple sub-band field strength statistical characteristic quantities, the sequence of multiple sub-band characteristic indices, and the comprehensive shielding effectiveness state quantity are concatenated column by column into a unified data structure, namely, a multi-dimensional electromagnetic environment sensing feature set.
[0043] S2. Input the multidimensional electromagnetic environment perception feature set into the nonlinear mapping model to obtain the prediction measurement error component vector.
[0044] Step S2 further includes: S21. Using a multi-dimensional electromagnetic environment perception feature set as input and standard measurement error data under historical interference conditions as supervision labels, a deep kernel extreme learning machine model is used to train the nonlinear relationship between interference features and measurement errors, solidify the model parameters, and obtain a nonlinear mapping model.
[0045] Furthermore, the Deep Kernel Extreme Learning Machine (DKLM) is a feedforward neural network model composed of multiple layers of random hidden layers and a top-level kernel ridge regression output layer. Unlike traditional deep neural networks that rely on backpropagation for iterative training, the weights of each hidden layer in the DKLM remain fixed after initialization, and only the top-level output weights are obtained once through analytical closure solutions. Therefore, the training speed is fast and there is no gradient vanishing problem. In step S21, this invention uses a multi-dimensional electromagnetic environment perception feature set as input features and standard metrological error data collected by metrology instruments under controlled laboratory conditions as supervision labels to construct a training dataset with no less than 1000 training samples, and then trains the DKLM model.
[0046] Specifically, step S21, the training process of the deep kernel extreme learning machine model, includes: S211. Based on the numerical range of the comprehensive shielding effectiveness state quantity, the training samples are divided into strong interference range, medium interference range and weak interference range, and the corresponding kernel function parameter combinations are configured for each range.
[0047] This invention first reads the comprehensive shielding effectiveness state value corresponding to each sample in the training dataset, and divides all training samples into three groups according to the value range. Specifically, samples with a comprehensive shielding effectiveness state value below 0.3 are classified into the strong interference range, samples with a comprehensive shielding effectiveness state value between 0.3 and 0.7 are classified into the medium interference range, and samples with a comprehensive shielding effectiveness state value above 0.7 are classified into the weak interference range.
[0048] For the strong interference, medium interference, and weak interference intervals, this invention configures different parameter combinations for the kernel function at the top layer of the deep kernel extreme learning machine. The kernel function parameter combinations include the kernel function type (such as a radial basis function kernel or a polynomial kernel) and its corresponding bandwidth parameter or polynomial order. The kernel function parameter combinations for the three intervals are independent of each other and are adapted to the error response curve shape within each interval. During training, each sample, based on the interval to which its comprehensive shielding effectiveness state variable belongs, calls the corresponding kernel function parameter combination to participate in the top-level weight calculation process.
[0049] S212. Multiple sub-band feature index sequences are used as additional channels to access the first hidden layer of the deep kernel extreme learning machine model. Multi-layer random hidden layers are used to perform layer-by-layer kernel mapping on the multi-dimensional electromagnetic environment perception feature set to obtain a high-dimensional kernel feature representation.
[0050] In step S212, for the input of the first hidden layer of the deep kernel extreme learning machine model, in addition to the main features of the multi-dimensional electromagnetic environment perception feature set, the present invention also synchronously inputs multiple sub-band feature index sequences obtained in S12 as additional channels, which are concatenated with the main features to form the input vector of the first hidden layer. The node weights of the first hidden layer and subsequent hidden layers are generated and fixed using an orthogonal random initialization method, and the activation function is a non-linear function (such as the sigmoid function).
[0051] The input vector is transformed linearly and activated nonlinearly in the first hidden layer to output the first hidden layer feature. This feature is then used as the input to the second hidden layer, and after the same random weight transformation and activation, the second hidden layer feature is obtained. This process is repeated layer by layer until the last hidden layer outputs a high-dimensional kernel feature representation.
[0052] The final output high-dimensional kernel feature representation has a dimension much higher than that of the input vector, which makes the interference-error relationship that was originally linearly inseparable in the low-dimensional space more separable in the high-dimensional kernel feature space, laying the foundation for the accurate solution of the top-level output weights.
[0053] S213. The high-dimensional kernel feature representation is solved by kernel ridge regression to obtain the solidified nonlinear mapping model.
[0054] In step S213, the present invention substitutes the high-dimensional kernel feature representation obtained in S212 and the corresponding standard measurement error supervision label into the normal equation of kernel ridge regression to calculate the top-level output weight matrix. Specifically, the solution process of the normal equation is as follows: the present invention first constructs the kernel matrix (i.e., the inner product matrix of the high-dimensional kernel feature representation), adds regularization coefficients to the diagonal of the kernel matrix and then inverts it, and then multiplies it with the supervision label matrix to directly obtain the output weight matrix.
[0055] At this point, all parameters of the deep kernel extreme learning machine model (random weights of each hidden layer and the top-level output weight matrix) have been determined, the model parameters are fixed, and the nonlinear mapping model is obtained.
[0056] S22. Input the multidimensional electromagnetic environment sensing feature set into the nonlinear mapping model to obtain the predicted measurement error component vector; the predicted measurement error component vector includes the amplitude error prediction value, the phase error prediction value, and the zero drift error prediction value.
[0057] In step S22, the present invention constructs an input vector from the multidimensional electromagnetic environment sensing feature set obtained in S15 according to the splicing method described in S212. After the input vector is transformed layer by layer by the hidden layers of the nonlinear mapping model, a high-dimensional kernel feature representation is obtained. The high-dimensional kernel feature representation is multiplied by the top-level output weight matrix to obtain the output value. The output value is a three-dimensional vector, and the three components correspond to the amplitude error prediction value, the phase error prediction value, and the zero drift error prediction value, respectively. The three components together constitute the prediction measurement error component vector.
[0058] Among them, the amplitude error prediction value reflects the measurement amplitude deviation caused by interference, the phase error prediction value reflects the phase angle shift caused by interference, and the zero drift error prediction value reflects the DC bias drift caused by interference. The three error components together describe the full quantization state of the meter output error under the current electromagnetic interference environment.
[0059] S3. Perform causal decoupling on the prediction measurement error component vector to obtain the causal decoupling error description set.
[0060] Step S3 further includes: S31. Based on the historical multidimensional electromagnetic environment sensing feature set and the historical predicted measurement error component vector, a directed acyclic graph is constructed through a structural causal model algorithm; the directed acyclic graph uses multiple frequency band sub-band features as cause nodes, circuit coupling paths as hidden variable nodes, and each component of the predicted measurement error component vector as result nodes.
[0061] In step S31, this invention, based on a large number of historical multidimensional electromagnetic environment sensing feature set samples and corresponding historical predicted measurement error component vector samples, automatically discovers the causal structure between variables from the data through a structural causal model algorithm (such as the FCI algorithm). Specifically, this invention uses the field strength statistical features of each frequency band sub-band in the multidimensional electromagnetic environment sensing feature set as cause nodes, the circuit coupling paths inside the instrument (including analog front-end common-mode paths, power supply coupling paths, and ground loop paths) as latent variable nodes, and the amplitude error prediction value, phase error prediction value, and zero drift error prediction value in the predicted measurement error component vector as result nodes, constructing a directed acyclic graph covering the three types of nodes.
[0062] The output directed acyclic graph (DAG) is a topological structure, meaning which cause nodes influence which result nodes through which latent variable nodes. This is automatically determined by the FCI algorithm during the offline phase based on conditional independence tests. Furthermore, the DAG triggers a structural update every time a preset number of new samples are accumulated, continuously refining the graph structure's description of the current instrument coupling path state.
[0063] S32. During online operation, for each error component in the predicted measurement error component vector, the Pearl interference quantifier is used to perform counterfactual intervention calculations on multiple interference source subbands in the directed acyclic graph to obtain the average causal effect of multiple interference sources on each error component.
[0064] Furthermore, the Pearl interference quantifier of this invention is a mathematical tool in causal inference theory used to calculate how the distribution of other variables changes after a certain variable is forcibly fixed to a specific value. The core operation is to delete all directed edges pointing to the node being interfered with in a directed acyclic graph, and then recalculate the conditional expectation of the target variable on the modified graph, thereby eliminating the interference of confounding factors and obtaining a pure causal effect estimate.
[0065] When the present invention is running online, it first applies Pearl interference quantifiers to each interference source sub-band node in the directed acyclic graph for each error component (amplitude error prediction value, phase error prediction value, zero drift error prediction value) in the predicted measurement error component vector, and constructs a counterfactual scenario, that is, if the field strength statistical characteristic of the sub-band is forcibly set to zero while keeping the field strength statistical characteristic of the other sub-bands unchanged, how much will the predicted value of the error component change.
[0066] Subsequently, for each combination of interference source sub-band and each error component, the expected change in the predicted value of the error component under the above counterfactual scenario is calculated, which is the average causal effect of the interference source on the error component. After the average causal effect of all interference source sub-bands and all error components is calculated, an average causal effect matrix is formed with interference source sub-bands as rows and error components as columns.
[0067] S33. Based on the average causal effect, the predicted measurement error component vector is decomposed into the magnetic field-dominated error component and the electric field-dominated error component, and a causal confidence matrix is generated.
[0068] In step S33, the present invention decomposes the predicted measurement error component vector based on the average causal effect matrix obtained in S32. For each component of the amplitude error prediction value, phase error prediction value, and zero drift error prediction value, the present invention compares the magnitude of the average causal effect of the low-frequency sub-band (corresponding to the magnetic field coupling path) and the mid-to-high frequency sub-band (corresponding to the electric field coupling path) on that component, extracts the part of the error component contributed by the magnetic field coupling path to form the magnetic field-dominated error component, and extracts the part contributed by the electric field coupling path to form the electric field-dominated error component.
[0069] Subsequently, the present invention generates a causal confidence matrix. The output causal confidence matrix is a 3-row, 2-column matrix. The 3 rows correspond to the predicted values of amplitude error, phase error, and zero drift error, respectively. The 2 columns correspond to the magnetic field coupling path and the electric field coupling path, respectively. The value of each element in the matrix is calculated as the proportion of the average causal effect of the corresponding interference source on the corresponding error component to the sum of the average causal effects of all interference sources on that error component. The value ranges from 0 to 1, representing the causal confidence degree of the corresponding error component dominated by the corresponding coupling path.
[0070] S34. Combine the magnetic field dominant error component, the electric field dominant error component, and the causal confidence matrix to obtain the causal decoupling error description set.
[0071] In step S34, the present invention merges the magnetic field dominant error component (three-dimensional vector), the electric field dominant error component (three-dimensional vector), and the causal confidence matrix (3-row 2-column matrix) obtained in S33 according to a unified data structure to form a causal decoupling error description set.
[0072] The obtained causal decoupling error description set retains the error quantification information of the prediction measurement error component vector, and adds the causal source attribution information of each error component, which is read by the stochastic model predictive control algorithm in S4 to determine the hierarchical adjustment priority and control weight of each layer of the composite shielding structure.
[0073] S4. Based on the causal decoupling error description set, the stability constraint optimization solution is performed on the shielding adjustment amount of each layer of the composite shielding structure to obtain the shielding adjustment control vector. After the shielding adjustment control vector is sent to the composite shielding structure for execution, the multi-dimensional electromagnetic environment sensing feature set is updated. Based on the updated prediction measurement error component vector, the shielding effectiveness adjustment residual vector is calculated.
[0074] Step S4 further includes: S41. Based on the causal confidence matrix in the causal decoupling error description set, determine the layered adjustment priority of the magnetic shielding layer and the electric shielding layer in the composite shielding structure within the current sampling period, and obtain the layered adjustment priority weight.
[0075] Furthermore, the composite shielding structure consists of three layers: an outer layer is an iron-based amorphous alloy magnetic shielding layer, whose permeability is adjusted by changing the bias magnetization current, primarily acting to shield low-frequency magnetic fields; a middle layer is a porous copper mesh electrical shielding layer, whose equivalent aperture is controlled by a switching matrix, primarily acting to shield mid-to-high-frequency electric fields; and an inner layer is a conductive polymer absorbing coating, whose complex permittivity is changed by applying an adjustable electric field, primarily acting to absorb high-frequency electromagnetic waves. The adjustment values corresponding to the above three shielding layers together constitute the three components of the shielding adjustment control vector, corresponding to the magnetic shielding layer adjustment value, the electrical shielding layer adjustment value, and the absorbing layer adjustment value, respectively.
[0076] In step S41, the present invention first reads the causal confidence matrix from the causal decoupling error description set obtained in S34. The causal confidence matrix is a three-row, two-column matrix. Subsequently, the present invention calculates the column mean of the causal confidence matrix to obtain the column mean of the magnetic field coupling path and the column mean of the electric field coupling path. The two column means reflect the combined dominance of the magnetic field coupling path and the electric field coupling path on all error components within the current sampling period.
[0077] Subsequently, based on the aforementioned composite shielding structure and the relationship between the average values of the two columns, the present invention determines the hierarchical adjustment priority: if the average value of the magnetic field coupling path column exceeds 0.6, the magnetic shielding layer is designated as the primary adjustment target, and a larger adjustment priority weight is assigned to it, while a smaller conservative weight is assigned to the electric shielding layer; if the average value of the electric field coupling path column exceeds 0.6, then conversely, the electric shielding layer is designated as the primary adjustment target, and a smaller weight is assigned to the magnetic shielding layer; if both are between 0.4 and 0.6, i.e., in the coupling ambiguity region, then equal adjustment priority weights are assigned to the magnetic shielding layer and the electric shielding layer.
[0078] The weight values of each layer determined under the above three scenarios together constitute the hierarchical adjustment priority weight. The hierarchical adjustment priority weight is a weight vector with the same dimension as the shielding adjustment control vector. Each component corresponds to the adjustment priority of the magnetic shielding layer, the electric shielding layer and the absorbing layer at the current time step, which is used by the stochastic model predictive control algorithm of S42 when constructing the objective function.
[0079] S42. Using the sequence of statistical features of field strength in multiple sub-bands in the multidimensional electromagnetic environment sensing feature set as state feedback and the causal decoupling error description set as the optimization objective, under the constraints of Lyapunov stability and the physical feasible domain of each layer of shielding adjustment, the weighted error norm in the finite time domain is minimized by the stochastic model predictive control algorithm to obtain the shielding adjustment control vector.
[0080] Furthermore, the stochastic model predictive control of this invention, based on standard model predictive control, incorporates the uncertainty of the predictive model output into the constraint construction process, replacing hard boundary constraints with probabilistic constraints, and ensuring system stability under worst-case perturbations. Specifically, the complete solution process of stochastic model predictive control is executed sequentially according to three sub-steps: S421, S422, and S423.
[0081] Step S42 further includes: S421. When using a nonlinear mapping model to infer the predicted measurement error component vector, the confidence interval of the predicted measurement error component vector is output simultaneously, and the set of probability-based uncertainty constraints is constructed using the confidence interval.
[0082] In step S421, when using the nonlinear mapping model obtained in S213 to infer the current multidimensional electromagnetic environment sensing feature set, the present invention employs the Monte Carlo Dropout method to simultaneously estimate the confidence interval of the predicted measurement error component vector. Specifically, in the nonlinear mapping model inference stage, the present invention first randomly masks some hidden layer nodes with a preset Dropout probability, and repeatedly performs forward propagation a preset number of times (e.g., 50 times) on the same input, obtaining slightly different output values each time due to the different randomly masked nodes.
[0083] Subsequently, the mean and standard deviation of each error component in the set of 50 output values are calculated separately. The mean is the point estimate of the predicted measurement error component vector. The mean plus or minus a certain number of standard deviations constitutes the upper and lower bounds of the confidence interval. The confidence intervals for the amplitude error prediction, phase error prediction, and zero drift error prediction are calculated independently. The three sets of confidence intervals together describe the uncertainty range of the nonlinear mapping model output.
[0084] Subsequently, this invention constructs an uncertainty constraint set based on three sets of confidence intervals: the uncertainty constraint set stipulates that in the subsequent optimization solution, the prediction error value corresponding to the masking adjustment control vector must fall within the confidence interval with a probability level not lower than the preset probability level (set to 95% in this invention), thereby incorporating the uncertainty of model prediction into the subsequent optimization problem in the form of probability constraints, rather than simply using point estimates as hard constraint boundaries.
[0085] S422. Using the Lyapunov stability criterion as a hard constraint for the optimization problem, the system's generalized energy function is required to satisfy the monotonically decreasing condition at the next time step by masking and adjusting the control vector. The generalized energy function is constructed using the weighted norm of multiple components in the causal decoupling error description set.
[0086] In step S422, this invention constructs a generalized energy function based on the dominant magnetic field error component, the dominant electric field error component, and each component of the causal confidence matrix in the causal decoupling error description set. Specifically, this invention concatenates the dominant magnetic field error component vector and the dominant electric field error component vector into a system state vector, and constructs a weighting matrix using the hierarchical adjustment priority weights obtained in S41 as diagonal elements. The value of the generalized energy function is calculated from the quadratic form of the system state vector and the weighting matrix, that is, the system state vector is multiplied on the left by the weighting matrix and then multiplied on the right by the transpose of the system state vector, resulting in a scalar.
[0087] Subsequently, this invention incorporates the Lyapunov stability criterion as a hard constraint condition into the constraint set of stochastic model predictive control for the optimization problem. Specifically, within the finite prediction time domain, for each prediction step, this invention requires that the generalized energy function value corresponding to the current step is strictly less than the generalized energy function value of the previous step, and the difference between the two is not less than the positive value of the square of the system state vector norm multiplied by a preset convergence rate coefficient. This hard constraint condition ensures that during the optimization process, any accepted candidate solution of the masked adjustment control vector must cause the generalized energy function to decrease monotonically in the next time step, mathematically eliminating control quantities that could lead to system state divergence.
[0088] In step S422, the mathematical expressions for the generalized energy function and its Lyapunov stability hard constraints defined in this invention are as follows:
[0089]
[0090] in, For the first The value of the generalized energy function at time t; For the first The system state vector at time t is formed by concatenating the magnetic field dominant error component (three-dimensional column vector) and the electric field dominant error component (three-dimensional column vector) obtained from S33, and has a total of six components; For the first The weighting matrix at time step is a sixth-order diagonal positive definite matrix. The diagonal elements are filled in by arranging the components of the hierarchical adjustment priority weight vector obtained from S41 in the order of the corresponding error components, and the off-diagonal elements are zero. For the first The generalized energy function value at time step 1 is obtained by predicting the system state vector at the next time step using the candidate solution of the current shielded control vector within the prediction time domain, as predicted by the stochastic model prediction control. The result is obtained by substituting into the generalized energy function formula; For stability convergence rate coefficient, which is a preset positive real number used to specify the minimum decrease in magnitude of the generalized energy function at each time step; The system state vector The square of the Euclidean norm.
[0091] S423. Under the constraints of uncertainty set and Lyapunov stability, the worst-case perturbation corresponding to the lower bound of the confidence interval is used as the basis for robust optimization. The shielding adjustment control vector at the current time step is obtained by solving the quadratic programming method.
[0092] Furthermore, in step S423, the present invention organizes the stochastic model predictive control problem into a standard quadratic programming form, that is, taking all components of the shielded regulation control vector at each time step in the finite prediction time domain as decision variables, taking the uncertainty constraint set obtained in S421 and the Lyapunov stability hard constraint conditions obtained in S422 as constraints, taking the physical feasible domain of the shielded regulation amount of each layer (i.e., the allowable range of current, voltage or aperture of each layer of driving circuit) and the limit of the rate of change of regulation amount in adjacent time steps as supplementary constraints, and taking the sum of the weighted norms of each component of the causal decoupling error description set at each time step in the finite prediction time domain as the objective function.
[0093] In terms of robust optimization, this invention uses the worst-case perturbation substitution point estimate corresponding to the lower bound of the confidence interval obtained in S421 to participate in the objective function calculation. That is, when constructing the objective function, the predicted value of each error component is taken as the lower bound of the confidence interval (corresponding to the most pessimistic case of the strongest disturbance), ensuring that even when the disturbance intensity undergoes random abrupt changes, the solved shielding adjustment control vector can still satisfy the stability constraint in the worst case.
[0094] Subsequently, the present invention substitutes the above objective function and all constraints into the quadratic programming solver to obtain the optimal decision variable sequence, and takes the shielding adjustment control vector component value corresponding to the first time step in the sequence as the shielding adjustment control vector output for the current time step.
[0095] S43. After the shielding adjustment control vector is sent to the composite shielding structure, the multi-dimensional electromagnetic environment sensing feature set is re-acquired and updated, and the updated prediction measurement error component vector is obtained by inputting it into the nonlinear mapping model again. The shielding effectiveness adjustment residual vector is obtained by subtracting the updated prediction measurement error component vector from the prediction measurement error component vector.
[0096] In step S43, the present invention sends the three components of the shielding adjustment control vector obtained in S423 to the corresponding drive circuits of the composite shielding structure. Specifically, the magnetic shielding layer adjustment amount is converted into a bias magnetization current command and sent to the drive circuit of the outer iron-based amorphous alloy magnetic shielding layer; the electrical shielding layer adjustment amount is converted into a switch matrix control signal and sent to the drive circuit of the middle porous copper mesh electrical shielding layer; and the absorbing layer adjustment amount is converted into an adjustable electric field strength command and sent to the drive circuit of the inner conductive polymer absorbing coating.
[0097] After the instructions are issued, the three-layer shielding structure completes its physical state adjustment according to the received adjustment instructions. Then, the sensor array synchronously collects the electromagnetic field strength data of each key node inside and outside the metering instrument with a collection period of 50ms. Subsequently, all the data processing steps described in S11 to S15 are executed again to obtain the updated multidimensional electromagnetic environment sensing feature set.
[0098] Subsequently, the updated multidimensional electromagnetic environment sensing feature set is input into the nonlinear mapping model obtained in S213. After layer-by-layer transformation of each hidden layer and multiplication of the top-level output weight matrix, the updated predicted measurement error component vector is obtained. The updated predicted measurement error component vector also contains three components: amplitude error prediction value, phase error prediction value, and zero drift error prediction value, reflecting the residual error estimation of the electromagnetic environment in which the instrument is located after the shielding regulation control vector is executed.
[0099] Subsequently, the present invention subtracts the three components corresponding to the predicted measurement error component vector obtained in S22 from the three components of the updated predicted measurement error component vector, and calculates the difference for each component to obtain the shielding effectiveness adjustment residual vector. The shielding effectiveness adjustment residual vector is a three-dimensional vector, and each component is the amplitude residual, phase residual, and zero drift residual, which are numerically equal to the difference between the corresponding error prediction values before and after shielding adjustment. It represents the estimated amount of remaining measurement error that has not been eliminated after active adjustment of physical shielding.
[0100] S5. Adjust the residual vector according to the shielding effectiveness, and adaptively compensate the original sampled output value of the metering instrument to obtain the compensated metering output value.
[0101] Step S5 further includes: S51. Using the shielding effectiveness adjustment residual vector as input, the recursive update step size of the compensation parameter matrix is adjusted causally weighted according to the confidence of each column in the causal confidence matrix. The compensation parameter matrix is continuously updated by the recursive least squares algorithm with forgetting factor to obtain the updated compensation parameter matrix.
[0102] Furthermore, in each sampling period, this invention first reads the mean values of two columns of the causal confidence matrix obtained in S34, namely the mean value of the magnetic field coupling path column and the mean value of the electric field coupling path column. For the recursive update step size of each component in the compensation parameter matrix, this invention performs weighted adjustment based on the causal confidence matrix value of the corresponding row of the error component. If the causal confidence of the magnetic field coupling path of the error component is high, indicating that the residual cause of the component is clearly the magnetic field coupling path, then the update step size of the compensation coefficient for that component is multiplied by an amplification factor greater than 1, making the compensation parameter matrix respond more actively to the residual change of that component. If the error component is in the causal confidence ambiguity region (i.e., the confidence of both the magnetic field and electric field coupling paths is close to 0.5), then the update step size of that component is multiplied by a conservative factor less than 1, reducing the parameter update amplitude. After causal weighted adjustment, the update step sizes of each component constitute a causal weighted step size vector.
[0103] Subsequently, the present invention uses the shielding effectiveness adjustment residual vector obtained in S43 as the current input observation, and the measured deviation between the original sampling output value of the metering instrument and the known benchmark calibration value as the current error observation (if there is no real-time benchmark, the current value of each component of the updated predicted metering error component vector is used as a soft label to replace it). Combining the causal weighted step size vector and the forgetting factor, the compensation parameter matrix is incrementally updated according to the recursive least squares update formula with forgetting factor to obtain the updated compensation parameter matrix.
[0104] In step S51, the expression for the causal weighted step size is:
[0105] in, For the first The causal weighted step size corresponding to each error component The values 1, 2, and 3 correspond to the amplitude error compensation coefficient, phase error compensation coefficient, and zero drift error compensation coefficient, respectively. The basic update step size is the initial value of the standard step size of the recursive least squares algorithm with forgetting factor when no causal weighting adjustment is applied. For the causal confidence matrix, the first... The element in the first column of the row, i.e. Causal confidence of error components dominated by magnetic field coupling paths; For the causal confidence matrix, the first... The element in the second column of the row, i.e. Causal confidence of error components dominated by electric field coupling paths; The square of the difference between the two confidence levels reflects the clarity of the causal attribution of the error component; the larger the difference, the clearer the causal source. The causal weighted adjustment coefficient is a preset positive real number that controls the strength of the influence of the difference in causal confidence on the step size amplification. The threshold for the fuzzy region of causal confidence is 0.6. For a sign function, when Exceed When the sign function returns a positive value of 1, the step size is multiplied by a magnification factor greater than 1; when it does not exceed... When the sign function returns a negative value of -1, the step size is multiplied by a conservative factor less than 1, reducing the parameter update magnitude.
[0106] S52. Perform inner product calculation between the updated compensation parameter matrix and the shielding effectiveness adjustment residual vector to obtain the comprehensive error compensation amount.
[0107] In step S52, the present invention performs an inner product calculation on the updated compensation parameter matrix obtained in S51 and the shielding effectiveness adjustment residual vector obtained in S43, that is, multiplying the corresponding components of the two vectors respectively and then summing them: multiplying the amplitude error compensation coefficient with the amplitude residual, multiplying the phase error compensation coefficient with the phase residual, and multiplying the zero drift error compensation coefficient with the zero drift residual. Then, the three products are added together to obtain a scalar, namely the comprehensive error compensation amount, which is used to reflect the correction magnitude that needs to be applied to the original sampled output value within the current sampling period.
[0108] S53. The comprehensive error compensation amount is superimposed on the original sampling output value of the metering instrument to obtain the compensated metering output value.
[0109] In step S52, the present invention algebraically superimposes the comprehensive error compensation amount obtained in S52 with the original sampling output value of the metering instrument in the current sampling period, that is, adds the comprehensive error compensation amount to the original sampling output value to obtain the compensated metering output value. The compensated metering output value is a scalar, and its dimensions are the same as those of the original sampling output value.
[0110] The compensated metering output value is transmitted along two feedback paths. The first path transmits the compensated metering output value back to S1, which participates in the update calculation of the comprehensive shielding effectiveness state quantity in the next sampling period. This allows the comprehensive shielding effectiveness state quantity to perceive the impact of the current compensation result on the overall error state, thereby driving the stochastic model predictive control of S42 to adjust the solution direction of the shielding adjustment control vector in the next time step. The second path transmits the deviation information between the compensated metering output value and the reference value back to S31, triggering the structure update count of the directed acyclic graph. After accumulating enough new samples, the description of the current instrument coupling path state by the directed acyclic graph is corrected, continuously correcting the basis for generating the causal decoupling error description set, and driving the overall error compensation process to continuously seek optimization.
[0111] like Figure 2 As shown, the present invention also provides a measurement error compensation system under electromagnetic interference, comprising: Quantization module 100: Used to perform robust statistical quantization on multi-band electromagnetic field strength data of the space where the metering instrument is located, and obtain a multi-dimensional electromagnetic environment sensing feature set; Mapping module 200: used to input the multi-dimensional electromagnetic environment sensing feature set into the nonlinear mapping model to obtain the prediction measurement error component vector; Decoupling module 300: used to perform causal decoupling on the prediction measurement error component vector to obtain a causal decoupling error description set; Update module 400: It is used to perform stability constraint optimization on the shielding adjustment amount of each layer of the composite shielding structure according to the causal decoupling error description set, obtain the shielding adjustment control vector, and send the shielding adjustment control vector to the composite shielding structure for execution. After execution, it updates the multi-dimensional electromagnetic environment sensing feature set and calculates the shielding effectiveness adjustment residual vector based on the updated prediction measurement error component vector. Compensation module 500: Used to adjust the residual vector according to the shielding effectiveness, and adaptively compensate the original sampled output value of the metering instrument to obtain the compensated metering output value.
[0112] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the measurement error compensation method under electromagnetic interference described in various embodiments or some parts of embodiments.
[0113] The present invention also provides a metal energy metering box, comprising: Enclosure, composite shielding structure, wideband electromagnetic field strength sensor array and control unit; The enclosure is made of metal and is used to house measuring instruments. The composite shielding structure is set on the inner wall of the enclosure and includes a magnetic shielding layer and an electrical shielding layer. Both the magnetic shielding layer and the electrical shielding layer are connected to a shielding adjustment actuator, which is used to independently adjust the shielding adjustment amount of the magnetic shielding layer and the electrical shielding layer according to the shielding adjustment control vector. The wideband electromagnetic field strength sensor array is set at multiple key nodes on the inner and outer sides of the housing to synchronously collect electromagnetic field strength data in the low-frequency, mid-frequency and high-frequency bands. The control unit is located inside the enclosure and includes multiple functional modules in the electromagnetic interference measurement error compensation system. When multiple functional modules are invoked, the electromagnetic interference measurement error compensation method described above is executed to enable the composite shielding structure to perform stability constraint optimization adjustment of the shielding adjustment amount of each layer and to achieve adaptive compensation of the original sampled output value of the metering instrument.
[0114] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0115] This invention enables real-time and accurate sensing of the operating status of metering instruments in complex and ever-changing electromagnetic interference environments, timely identification and location of the impact of various interference factors on measurement results. By combining active adjustment of shielding effectiveness with adaptive error compensation, it suppresses the intrusion of electromagnetic interference at the source, while effectively correcting residual errors, forming a complementary closed loop, significantly reducing measurement errors and improving the accuracy and reliability of measurement results. The entire compensation process requires no manual intervention and can automatically adjust with changes in the electromagnetic environment, exhibiting strong adaptability and robustness. It effectively ensures the fairness and accuracy of power metering under strong interference conditions, and has good engineering practical value and promotion prospects.
[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for compensating measurement errors under electromagnetic interference, characterized in that, include: S1. Robust statistical quantization is performed on the multi-band electromagnetic field intensity data of the space where the measuring instrument is located to obtain a multi-dimensional electromagnetic environment sensing feature set. S2. Input the multi-dimensional electromagnetic environment perception feature set into the nonlinear mapping model to obtain the prediction measurement error component vector; S3. Perform causal decoupling on the predicted measurement error component vector to obtain the causal decoupling error description set; S4. Based on the causal decoupling error description set, the stability constraint optimization solution is performed on the shielding adjustment amount of each layer of the composite shielding structure to obtain the shielding adjustment control vector. After the shielding adjustment control vector is sent to the composite shielding structure for execution, the multi-dimensional electromagnetic environment sensing feature set is updated. Based on the updated prediction measurement error component vector, the shielding effectiveness adjustment residual vector is calculated. S5. Adjust the residual vector according to the shielding effectiveness, and adaptively compensate the original sampled output value of the metering instrument to obtain the compensated metering output value.
2. The measurement error compensation method under electromagnetic interference according to claim 1, characterized in that, Step S1 further includes: S11. Electromagnetic field strength data of multiple key nodes inside and outside the metering instrument are synchronously collected through a wide-band electromagnetic field strength sensor array, and divided into low-frequency sub-band, mid-frequency sub-band and high-frequency sub-band according to frequency band to obtain raw field strength data of multiple sub-bands. S12. Fit the Alpha stable distribution of the original field strength data of multiple sub-bands to obtain multiple sub-band characteristic indices; S13. Based on multiple sub-band characteristic indices, the field strength statistical features of the original field strength data of multiple sub-bands are quantified by fractional low-order moments to obtain the field strength statistical feature quantities of multiple sub-bands. S14. The weight vector of the hierarchical analysis method is dynamically adjusted according to the characteristic index of multiple sub-bands. The statistical characteristic of field strength of multiple sub-bands, the time domain fluctuation coefficient and the main frequency offset are weighted and fused according to the dynamically adjusted weight vector to obtain the comprehensive shielding effectiveness state quantity. S15. Combine the statistical characteristic sequences of multiple sub-band field strengths, the characteristic index sequences of multiple sub-bands, and the comprehensive shielding effectiveness state quantity to obtain a multi-dimensional electromagnetic environment sensing feature set.
3. The method for compensating measurement errors under electromagnetic interference according to claim 1, characterized in that, Step S2 further includes: S21. Using the multidimensional electromagnetic environment perception feature set as input and the standard measurement error data under historical interference conditions as supervision labels, the nonlinear relationship between interference features and measurement error is trained through a deep kernel extreme learning machine model, the model parameters are solidified, and a nonlinear mapping model is obtained. S22. Input the multidimensional electromagnetic environment sensing feature set into the nonlinear mapping model to obtain the predicted measurement error component vector; the predicted measurement error component vector includes the amplitude error prediction value, the phase error prediction value, and the zero drift error prediction value.
4. The measurement error compensation method under electromagnetic interference according to claim 3, characterized in that, In step S21, the training process of the deep kernel extreme learning machine model specifically includes: S211. Based on the numerical range of the comprehensive shielding effectiveness state quantity, the training samples are divided into strong interference range, medium interference range and weak interference range, and the corresponding kernel function parameter combinations are configured for each range. S212. Multiple sub-band feature index sequences are used as additional channels to access the first hidden layer of the deep kernel extreme learning machine model. Multi-layer random hidden layers are used to perform layer-by-layer kernel mapping on the multi-dimensional electromagnetic environment perception feature set to obtain a high-dimensional kernel feature representation. S213. The high-dimensional kernel feature representation is solved by kernel ridge regression to obtain the solidified nonlinear mapping model.
5. The measurement error compensation method under electromagnetic interference according to claim 1, characterized in that, Step S3 further includes: S31. Based on the historical multidimensional electromagnetic environment sensing feature set and the historical predicted measurement error component vector, a directed acyclic graph is constructed through a structural causal model algorithm; the directed acyclic graph uses multiple frequency band sub-band features as cause nodes, circuit coupling paths as hidden variable nodes, and each component of the predicted measurement error component vector as result nodes. S32. During online operation, for each error component in the predicted measurement error component vector, the Pearl interference quantifier is used to perform counterfactual intervention calculation on multiple interference source sub-bands in the directed acyclic graph to obtain the average causal effect of multiple interference sources on each error component. S33. Based on the average causal effect, the predicted measurement error component vector is decomposed into the magnetic field-dominated error component and the electric field-dominated error component, and a causal confidence matrix is generated. S34. Combine the magnetic field dominant error component, the electric field dominant error component, and the causal confidence matrix to obtain the causal decoupling error description set.
6. The measurement error compensation method under electromagnetic interference according to claim 1, characterized in that, Step S4 further includes: S41. Based on the causal confidence matrix in the causal decoupling error description set, determine the layer adjustment priority of the magnetic shielding layer and the electric shielding layer in the composite shielding structure within the current sampling period, and obtain the layer adjustment priority weight. S42. Using the sequence of statistical features of field strength of multiple sub-bands in the multidimensional electromagnetic environment sensing feature set as state feedback, and the causal decoupling error description set as the optimization objective, under the constraints of Lyapunov stability and the physical feasible domain of each layer of shielding adjustment, the weighted error norm in the finite time domain is minimized by the stochastic model predictive control algorithm to obtain the shielding adjustment control vector. S43. After the shielding adjustment control vector is sent to the composite shielding structure, the multi-dimensional electromagnetic environment sensing feature set is re-acquired and updated, and the updated prediction measurement error component vector is obtained by inputting it into the nonlinear mapping model again. The shielding effectiveness adjustment residual vector is obtained by subtracting the updated prediction measurement error component vector from the prediction measurement error component vector.
7. The measurement error compensation method under electromagnetic interference according to claim 6, characterized in that, Step S42 further includes: S421. When using a nonlinear mapping model to infer the predicted measurement error component vector, the confidence interval of the predicted measurement error component vector is output simultaneously, and the confidence interval is used to construct a probability-based set of uncertainty constraints. S422. Using the Lyapunov stability criterion as a hard constraint condition for the optimization problem, the system's generalized energy function is required to satisfy the monotonically decreasing condition in the next time step by masking and adjusting the control vector. The generalized energy function is constructed using the weighted norm of multiple components in the causal decoupling error description set. S423. Under the constraints of uncertainty set and Lyapunov stability, the worst-case perturbation corresponding to the lower bound of the confidence interval is used as the basis for robust optimization. The shielding adjustment control vector at the current time step is obtained by solving the quadratic programming method.
8. The measurement error compensation method under electromagnetic interference according to claim 1, characterized in that, Step S5 further includes: S51. Using the shielding effectiveness adjustment residual vector as input, the recursive update step size of the compensation parameter matrix is adjusted causally weighted according to the confidence of each column in the causal confidence matrix. The compensation parameter matrix is continuously updated by the recursive least squares algorithm with forgetting factor to obtain the updated compensation parameter matrix. S52. Perform the inner product calculation between the updated compensation parameter matrix and the shielding effectiveness adjustment residual vector to obtain the comprehensive error compensation amount; S53. The comprehensive error compensation amount is superimposed on the original sampling output value of the metering instrument to obtain the compensated metering output value.
9. A measurement error compensation system under electromagnetic interference, characterized in that, include: Quantization module: used to perform robust statistical quantization on multi-band electromagnetic field strength data of the space where the metering instrument is located, and obtain a multi-dimensional electromagnetic environment sensing feature set; Mapping module: used to input the multidimensional electromagnetic environment sensing feature set into the nonlinear mapping model to obtain the prediction measurement error component vector; Decoupling module: used to decouple the predictive measurement error component vectors causally to obtain a causal decoupling error description set; The update module is used to perform stability constraint optimization on the shielding adjustment amount of each layer of the composite shielding structure according to the causal decoupling error description set, obtain the shielding adjustment control vector, and send the shielding adjustment control vector to the composite shielding structure for execution. After that, it updates the multi-dimensional electromagnetic environment sensing feature set and calculates the shielding effectiveness adjustment residual vector based on the updated prediction measurement error component vector. Compensation module: Used to adjust the residual vector according to the shielding effectiveness, and adaptively compensate the original sampled output value of the metering instrument to obtain the compensated metering output value.
10. A metal energy metering box, characterized in that, include: Enclosure, composite shielding structure, wideband electromagnetic field strength sensor array and control unit; The enclosure is made of metal and is used to house measuring instruments. The composite shielding structure is set on the inner wall of the enclosure and includes a magnetic shielding layer and an electrical shielding layer. Both the magnetic shielding layer and the electrical shielding layer are connected to a shielding adjustment actuator, which is used to independently adjust the shielding adjustment amount of the magnetic shielding layer and the electrical shielding layer according to the shielding adjustment control vector. The wideband electromagnetic field strength sensor array is set at multiple key nodes on the inner and outer sides of the housing to synchronously collect electromagnetic field strength data in the low-frequency, mid-frequency and high-frequency bands. The control unit is disposed inside the housing, and the control unit includes multiple functional modules in the measurement error compensation system under electromagnetic interference as described in claim 9; when multiple functional modules are called, the measurement error compensation method under electromagnetic interference as described in any one of claims 1 to 8 is executed, so that the composite shielding structure performs stability constraint optimization adjustment of the shielding adjustment amount of each layer, and realizes adaptive compensation of the original sampled output value of the metering instrument.
