Electric energy meter verification simulation method based on virtual-real linkage
Through the virtual and real-life verification simulation method, data cleaning and simulation prediction are used to clean and simulate and predict data through adaptive abnormality detection and deep generation models, the problems of low efficiency and low intelligence of traditional verification methods are solved, and efficient and accurate power meter verification is achieved. and fault identification improve the reliability and safety of the power meter.
Patent Information
- Application Number
- CN202411097785.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-05
AI Technical Summary
Traditional power meter verification methods are inefficient and costly, cannot effectively remove abnormal data and noise, cannot dynamically adjust, have low intelligence level, and cannot identify and handle faults in advance, resulting in the accuracy and reliability of the verification results being affected.
Using the power meter verification simulation method based on virtual and real linkage, multimodal signal data is collected in real time through sensors, data cleaning and denoising is cleaned and denoised using adaptive anomaly detection algorithm and adaptive multi-scale wavelet transformation, and a hybrid depth structure generation model is designed for simulation prediction. , and optimize model parameters through adaptive filters to achieve dynamic adjustment and real-time correction.
It improves the efficiency and accuracy of power meter verification, can simulate multiple verification conditions in a short time, accurately capture data characteristics, identify potential faults, improves the reliability and safety of power meter, and reduces the verification cost.
Smart Images

Figure CN118897955A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of electric energy meters, and in particular relates to an electric energy meter verification simulation method based on virtual-real linkage. Background Art
[0002] With the continuous development of modern power systems, the performance and accuracy of electric energy meters, as key equipment for power measurement, directly affect the fairness and accuracy of power measurement. The wide application of electric energy meters not only involves residential households, but also includes industrial enterprises, commercial users and other fields. With the diversification and complexity of electricity demand, electric energy meters need to maintain high accuracy and stability in various complex environments and different working conditions. Therefore, the calibration of electric energy meters has become particularly important. Ensuring the accuracy and reliability of electric energy meters in long-term operation is one of the core tasks in the field of power measurement.
[0003] The traditional method of electric energy meter calibration mainly relies on physical equipment and manual operation. This method has many challenges in terms of calibration efficiency and cost control. There are also the following technical problems: the existing calibration process of electric energy meters often takes a long time and has high labor costs. Abnormal data and noise data are difficult to effectively remove in the traditional calibration process, which affects the accuracy of the calibration results; the calibration system often cannot be dynamically adjusted according to the changes in actual working conditions, resulting in large errors in the calibration results under different environmental conditions; it is impossible to identify and handle possible faults and abnormalities in advance, the intelligence level is low, and the calibration cost is high.
[0004] Therefore, with the rapid development of technologies such as the Internet of Things, big data, and artificial intelligence, how to use these advanced technologies to improve the efficiency and accuracy of electricity meter calibration has become a hot topic and difficulty in current research. Especially in the context of smart grid and smart city construction, the demand for intelligent calibration of electricity meters is more urgent, and a new and intelligent calibration method is urgently needed to cope with the increasingly complex power metering environment. Summary of the invention
[0005] In order to solve the above problems existing in the prior art, a simulation method for electric energy meter calibration based on virtual-real linkage is provided.
[0006] The technical solution adopted by the present invention to solve its technical problem is:
[0007] This technical solution proposes an electric energy meter verification simulation method based on virtual-real linkage, which includes the following steps:
[0008] S1: Collect multimodal signal data in real time through sensors, clean the original signal data based on the adaptive anomaly detection algorithm, denoise the cleaned signal data based on the adaptive multi-scale wavelet transform, and then normalize the denoised signal data;
[0009] S2: Design a hybrid deep structure generation model, take the normalized signal data as input, simulate and predict the working status, possible problems and performance of the electric energy meter under different working conditions, and customize the loss function based on the simulation prediction results;
[0010] S3: The gradient of the loss function is input into the adaptive filter as the observation value. The adaptive filter is used to continuously correct the hybrid deep structure generation model through prediction and update steps, generate model parameters, and optimize the verification process and parameter settings.
[0011] Preferably, in S1, the data cleaning method includes: removing outliers and missing values in signal data based on an adaptive anomaly detection algorithm, dynamically adjusting filter parameters according to the statistical characteristics of the signal based on an adaptive filter and a time-frequency analysis algorithm, converting the signal to the frequency domain through Fourier transform, detecting outliers of the frequency components, and restoring the cleaned time domain signal through inverse transform. The formula of the adaptive anomaly detection algorithm is as follows:
[0012]
[0013] In the formula, x clean (t) is the signal data after cleaning, the value at time t, x(t) is the original data collected at time t, and a k is the amplitude of the kth component, f k is the frequency of the kth component, φ k is the phase of the kth component, n is the number of components, indicating the number of harmonic components used to represent the signal;
[0014] Based on the adaptive anomaly detection algorithm (1), the abnormal frequency components in the signal are removed and the normal signal part is retained.
[0015] Preferably, in S1, the data denoising method includes: performing denoising processing on the cleaned signal based on an adaptive multi-scale wavelet transform, and adaptively selecting an optimal scale and threshold to eliminate noise through a multi-scale analysis method;
[0016] First, the cleaned signal is decomposed by wavelet, and then according to the different characteristics of the signal and noise, the threshold is adaptively selected to perform hard threshold processing of the wavelet coefficients, and finally wavelet reconstruction is performed to obtain the denoised signal. The wavelet denoising formula is as follows:
[0017]
[0018] In the formula, is the wavelet coefficient, representing x clean (t) in scale and location The wavelet transform result on is: and are the scale and translation parameters, Used to control the expansion or compression of wavelets, It is used to control the position of the wavelet on the time axis, ψ is the mother wavelet function;
[0019] Remove high-frequency noise from signal data, retain useful information, and The hard threshold and soft threshold processing methods are used to perform threshold processing to eliminate noise components.
[0020] Preferably, the hard threshold processing method includes: directly setting the coefficients of the wavelet coefficients whose absolute values are less than the threshold to zero, and retaining the coefficients whose absolute values are greater than the threshold, the formula is as follows:
[0021]
[0022] The soft threshold processing method includes: on the basis of the hard threshold, the retained wavelet coefficients are reduced to make them close to zero value, and the formula is as follows:
[0023]
[0024] Where λ is the threshold, which is determined according to the noise level and the statistical characteristics of the signal.
[0025] Preferably, the wavelet coefficients after threshold processing Perform inverse wavelet transform to obtain the denoised signal. The formula for inverse wavelet transform is:
[0026]
[0027] In the formula, is the denoised signal, is the Fourier transform of the mother wavelet function ψ, f is the frequency component of the signal, is the normalization factor, is an integral measure.
[0028] Preferably, in S2, a hybrid deep structure generation model is designed, combining the adversarial network, the spatiotemporal convolutional neural network and the adaptive recurrent neural network for data modeling;
[0029] The normalized multimodal data is input into the hybrid deep structure generation model. The data is in the form of time series, and the input vector is:
[0030] X t =[v t ,i t ,T t ,h t ,s t] (6)
[0031] Where, X t is the normalized multimodal data set, v t is the voltage, i t is the current, T t is the temperature, h t is the humidity, s t is stress;
[0032] The generative adversarial network consists of a generator and a discriminator, which compete with each other to generate high-dimensional features. The generator is used to generate realistic data, and the discriminator is used to distinguish between real data and generated data. The generator formula is as follows:
[0033] z t =σ(W g X t +b g ) (7)
[0034] The discriminator formula is as follows:
[0035] D(z t )=σ(W d z t +b d ) (8)
[0036] In the formula, z t is the generator output, D(z t ) is the discriminator output, W g and b g is the weight matrix and bias vector of the generator, W d and b d is the weight matrix and bias vector of the discriminator, and σ is the activation function.
[0037] Preferably, the generated high-dimensional features are subjected to spatiotemporal convolution to capture the spatial and temporal features in the data and obtain spatiotemporal features. The convolution layer formula is as follows:
[0038] h t =ReLU(W c *z t +b c ) (9)
[0039] In the formula, h t is the output of the convolutional layer at time t, W c is the convolution kernel, * indicates the convolution operation, b c is the bias vector;
[0040] An adaptive recursive neural network layer is used to recursively process spatiotemporal features to capture long-term and short-term dependencies in time series. The formula of the adaptive recursive neural network layer is as follows:
[0041]
[0042] In the formula, i t is the value of the input gate at time t, f t is the value of the forget gate at time t, o t is the value of the output gate at time t, c t is the value of the neuron state at time t, h t is the value of the hidden state at time t, σ is the Sigmoid function, ⊙ represents element-wise multiplication, W i , W f , W o , W c , are the weight matrices of input gate, forget gate, output gate, and neuron state respectively;
[0043] U i , U f , U o , U c They are the weight matrices of the input gate, forget gate, output gate, and neuron state to the hidden state at the previous moment, b i , b f , b o , b c , are the bias vectors of input gate, forget gate, output gate, and neuron state, respectively, and tanh is the hyperbolic tangent activation function;
[0044] The recursively processed features are output through the fully connected layer. The output layer formula is as follows:
[0045] y t =g(W y h t +b y ) (11)
[0046] In the formula, y t is the output of the output layer, which indicates the prediction result for the future moment, W y and b y is the weight matrix and bias vector of the fully connected layer, g is the activation function, and the fully connected layer integrates the features after recursive processing to generate the final prediction result.
[0047] Preferably, the hybrid deep structure generation model extracts useful features from multimodal data for time series prediction, combines the loss of the generative adversarial network and the time series prediction error of the recurrent network, and customizes the loss function. The loss function formula is as follows:
[0048]
[0049] Where L represents the loss function, ∥·∥ 2represents the Euclidean distance, α1 and α2 are weight coefficients for balancing reconstruction error, prediction error, and generation adversarial loss, Represents the actual data, the value at time t.
[0050] Preferably, in S3, the hybrid deep structure generation model correction method includes: initializing the state vector θ0, initializing the covariance matrix P0, and predicting the state and covariance at the next moment:
[0051]
[0052] In the formula, is the prior state estimate at time t, θ t-1 is the state vector at time t-1, representing the estimated value of the model parameters at time t-1, φ t-1 is the process noise, assumed to be zero-mean Gaussian noise, P t|t-1 is the prior covariance matrix at time t, P t-1 is the covariance matrix at time t-1, indicating the uncertainty of the model parameter estimate at time t-1, and Q is the process noise covariance matrix.
[0053] Preferably, the gradient of the loss function with respect to the model parameters is calculated
[0054]
[0055] Update the state and covariance using the observations:
[0056]
[0057] In the formula, K t is the Kalman gain at time t, R is the observation noise covariance matrix, and I is the identity matrix;
[0058] Using the gradient of the loss function as the observation, use the updated model parameters θ t Perform simulation prediction, predict the state of the next time step based on the updated state and covariance, compare the error between the predicted value and the true value, and use the prediction error to perform real-time correction on the hybrid deep structure generation model.
[0059] Compared with the prior art, the present invention has the following advantages:
[0060] 1. This application collects multimodal data in real time through sensors, combines edge computing and wireless transmission technology to achieve rapid data collection and processing, analyzes and predicts data through a hybrid deep structure generation model, and can simulate multiple calibration conditions in a short time, thereby improving the overall efficiency of electricity meter calibration.
[0061] 2. This application uses an adaptive anomaly detection algorithm and an adaptive multi-scale wavelet transform to clean and denoise the data, ensuring the quality of the input data; the hybrid deep structure generation model combines the generative adversarial network, the spatiotemporal convolutional neural network and the adaptive recurrent neural network to accurately capture the spatiotemporal characteristics in the data and provide high-precision simulation results; the adaptive filtering further optimizes the model parameters to ensure the accuracy of the simulation output.
[0062] 3. Through self-learning and iterative optimization technology, this application can dynamically adjust model parameters according to feedback from actual operation, ensuring the real-time responsiveness and dynamic adaptability of the simulation system under various working conditions. The real-time correction and feedback mechanism enables the system to be continuously optimized and maintain an efficient calibration process.
[0063] 4. The simulation system proposed in this application can not only simulate the working status of the electric energy meter under different working conditions, but also predict possible problems. By analyzing the simulation results, potential faults or abnormalities can be identified, and preventive measures can be taken in advance to avoid problems in actual operation, thereby improving the reliability and safety of the electric energy meter. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0065] Figure 1 It is the overall flow chart of the present invention. DETAILED DESCRIPTION
[0066] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0067] Embodiment 1
[0068] like Figure 1 As shown, this embodiment proposes an electric energy meter verification simulation method based on virtual-real linkage, comprising the following steps:
[0069] S1: Collect multimodal signal data in real time through sensors, clean the original signal data based on the adaptive anomaly detection algorithm, denoise the cleaned signal data based on the adaptive multi-scale wavelet transform, and then normalize the denoised signal data;
[0070] The acquisition method includes: arranging sensors at various key nodes of the electric energy meter and its verification system, including voltage sensors, current sensors, temperature sensors, environmental sensors and stress sensors. The sampling frequency of the sensors is set to 1000 times per second.
[0071] Distributed sensing technology uses edge computing nodes to preliminarily process and compress the signals collected by each sensor, and then transmits them to the central data processing unit through wireless transmission. After the signal is collected, the original signal is preprocessed.
[0072] S2: Design a hybrid deep structure generation model, take the normalized signal data as input, simulate and predict the working status, possible problems and performance of the electric energy meter under different working conditions, and customize the loss function based on the simulation prediction results;
[0073] S3: The gradient of the loss function is input into the adaptive filter as the observation value. The adaptive filter is used to continuously correct the hybrid deep structure generation model through prediction and update steps, generate model parameters, and optimize the verification process and parameter settings.
[0074] In S1, the data cleaning method includes: removing outliers and missing values in signal data based on an adaptive anomaly detection algorithm, dynamically adjusting filter parameters according to the statistical characteristics of the signal based on an adaptive filter and a time-frequency analysis algorithm, converting the signal to the frequency domain through Fourier transform, detecting outliers of the frequency components, and restoring the cleaned time domain signal through inverse transform. The formula of the adaptive anomaly detection algorithm is as follows:
[0075]
[0076] In the formula, x clean (t) is the signal data after cleaning, the value at time t, x(t) is the original data collected at time t, and a k is the amplitude of the kth component, f k is the frequency of the kth component, φ k is the phase of the kth component, n is the number of components, indicating the number of harmonic components used to represent the signal;
[0077] Based on the adaptive anomaly detection algorithm (1), the abnormal frequency components in the signal are removed and the normal signal part is retained.
[0078] In S1, the data denoising method includes: denoising the cleaned signal based on an adaptive multi-scale wavelet transform, and adaptively selecting the optimal scale and threshold for noise elimination through a multi-scale analysis method;
[0079] First, the cleaned signal is decomposed by wavelet, and then according to the different characteristics of the signal and noise, the threshold is adaptively selected to perform hard threshold processing of the wavelet coefficients, and finally wavelet reconstruction is performed to obtain the denoised signal. The wavelet denoising formula is as follows:
[0080]
[0081] In the formula, is the wavelet coefficient, representing x clean (t) in scale and location The wavelet transform result on is: and are the scale and translation parameters, Used to control the expansion or compression of wavelets, It is used to control the position of the wavelet on the time axis, ψ is the mother wavelet function;
[0082] Remove high-frequency noise from signal data, retain useful information, and The hard threshold and soft threshold processing methods are used to perform threshold processing to eliminate noise components.
[0083] The hard threshold processing method includes: setting the coefficients whose absolute values are less than the threshold in the wavelet coefficients directly to zero, and retaining the coefficients whose absolute values are greater than the threshold. The formula is as follows:
[0084]
[0085] The soft threshold processing method includes: on the basis of the hard threshold, the retained wavelet coefficients are reduced to make them close to zero value, and the formula is as follows:
[0086]
[0087] Where λ is the threshold, which is determined according to the noise level and the statistical characteristics of the signal.
[0088] The wavelet coefficients after threshold processing Perform inverse wavelet transform to obtain the denoised signal. The formula for inverse wavelet transform is:
[0089]
[0090] In the formula, is the denoised signal, is the Fourier transform of the mother wavelet function ψ, f is the frequency component of the signal, is the normalization factor, ensuring that wavelet functions of different scales have the same energy, is an integration measure that ensures a weighted summation of the wavelet coefficients at all scales and locations.
[0091] Convert data of different dimensions to a unified scale. For example, standardize data such as voltage, current, and temperature to a range of 0 to 1. Normalization can eliminate the dimensional differences between different physical quantities, facilitating subsequent modeling and analysis.
[0092] In S2, a hybrid deep structured generative model is designed, combining generative adversarial networks (GANs), spatiotemporal convolutional neural networks (ST-CNNs), and adaptive recurrent neural networks (ARNNs) for data modeling.
[0093] The working status of the energy meter under different working conditions refers to simulating the operation of the energy meter under various voltage, current, temperature, humidity and stress conditions, and predicting its output and behavior; for example, predicting whether the current output of the energy meter is within the normal range under specific voltage and temperature conditions.
[0094] A possible problem is to identify possible faults or abnormalities of the energy meter under certain operating conditions by analyzing the prediction results; for example, in a high temperature or high humidity environment, the model may predict an increase in the error rate of the energy meter, indicating possible calibration or maintenance needs.
[0095] Performance prediction is to predict the long-term performance and reliability of the energy meter by generating high-dimensional features and performing spatiotemporal convolution and recursive processing; for example, predicting the performance degradation of the energy meter under long-term high-load operation, thereby helping to formulate maintenance and replacement plans.
[0096] The normalized multimodal data is input into the hybrid deep structure generation model. The data is in the form of time series, and the input vector is:
[0097] X t =[v t ,i t ,T t ,h t ,s t ] (6)
[0098] Where, X t is the normalized multimodal data set, v t is the voltage, i t is the current, T t is the temperature, h t is the humidity, s t is stress, and all variables take values at time t;
[0099] The generative adversarial network consists of a generator and a discriminator, which compete with each other to generate high-dimensional features. The generator is used to generate realistic data, and the discriminator is used to distinguish between real data and generated data. The generator formula is as follows:
[0100] zt =σ(W g X t +b g ) (7)
[0101] The discriminator formula is as follows:
[0102] D(z t )=σ(W d z t +b d ) (8)
[0103] In the formula, z t is the generator output, D(z t ) is the discriminator output, W g and b g is the weight matrix and bias vector of the generator, W d and b d is the weight matrix and bias vector of the discriminator, and σ is the activation function (such as ReLU).
[0104] Perform spatiotemporal convolution on the generated high-dimensional features to capture the spatial and temporal features in the data and obtain spatiotemporal features. The convolution layer formula is as follows:
[0105] h t =ReLU(W c *z t +b c ) (9)
[0106] In the formula, h t is the output of the convolutional layer at time t, W c is the convolution kernel, * indicates the convolution operation, b c is the bias vector;
[0107] An adaptive recursive neural network layer is used to recursively process spatiotemporal features to capture long-term and short-term dependencies in time series. The formula of the adaptive recursive neural network layer is as follows:
[0108]
[0109] In the formula, i t is the value of the input gate at time t, f t is the value of the forget gate at time t, o t is the value of the output gate at time t, c t is the value of the neuron state at time t, h t is the value of the hidden state at time t, σ is the Sigmoid function, ⊙ represents element-wise multiplication, W i , W f , W o , W c, are the weight matrices of input gate, forget gate, output gate, and neuron state respectively;
[0110] U i , U f , U o , U c They are the weight matrices of the input gate, forget gate, output gate, and neuron state to the hidden state at the previous moment, b i , b f , b o , b c , are the bias vectors of input gate, forget gate, output gate, and neuron state, respectively, and tanh is the hyperbolic tangent activation function;
[0111] Adaptive recurrent neural networks can adaptively adjust model parameters according to the dynamic changes of input data and improve the predictive ability of the model.
[0112] The recursively processed features are output through the fully connected layer. The output layer formula is as follows:
[0113] y t =g(W y h t +b y ) (11)
[0114] In the formula, y t is the output of the output layer, which indicates the prediction result for the future moment, W y and b y is the weight matrix and bias vector of the fully connected layer, g is the activation function, and the fully connected layer integrates the features after recursive processing to generate the final prediction result.
[0115] The hybrid deep structure generation model extracts useful features from multimodal data for time series prediction, combines the loss of the generative adversarial network and the time series prediction error of the recurrent network, and customizes the loss function. The loss function formula is as follows:
[0116]
[0117] Where L represents the loss function, ∥·∥ 2 represents the Euclidean distance, α1 and α2 are weight coefficients for balancing reconstruction error, prediction error, and generation adversarial loss, Represents the actual data, the value at time t. At the same time, the parameters of the generator, discriminator and adaptive recurrent neural network are optimized to improve the comprehensive performance of the hybrid deep structure generation model.
[0118] In S3, after the loss function is calculated, in order to further optimize the parameters of the hybrid deep structure generation model, make the simulation model gradually approach the actual system, and ensure the real-time and accuracy of the model, an adaptive filter is used to continuously correct the model parameters through prediction and update steps, so that the model output is closer to the true value. Specifically, the gradient of the loss function is input into the adaptive filter as an observation value.
[0119] The hybrid deep structure generation model correction method includes: initializing the state vector θ0, that is, the guessed value of the initial model parameters, where θ represents the parameters of the hybrid deep structure generation model, initializing the covariance matrix P0, that is, the uncertainty of the initial model parameter estimation, and predicting the state and covariance at the next moment:
[0120]
[0121] P t|t-1 =P t-1 +Q
[0122] In the formula, is the prior state estimate at time t, that is, the prediction of the state at time t based on the information at time t-1, θ t-1 is the state vector at time t-1, representing the estimated value of the model parameters at time t-1, φ t-1 is the process noise, assumed to be zero-mean Gaussian noise, P t|t-1 is the prior covariance matrix at time t, that is, the covariance prediction at time t based on the information at time t-1, P t-1 is the covariance matrix at time t-1, indicating the uncertainty of the model parameter estimate at time t-1, and Q is the process noise covariance matrix.
[0123] Calculate the gradient of the loss function with respect to the model parameters
[0124]
[0125] Update the state and covariance using the observations (gradient of the loss function):
[0126]
[0127] In the formula, K t is the Kalman gain at time t, R is the observation noise covariance matrix, and I is the identity matrix;
[0128] By using the gradient of the loss function as the observation value, adaptive filtering can dynamically adjust the model parameters so that it can be optimized in continuous iterations to achieve real-time and high-precision effects.
[0129] Use the updated model parameters θ tPerform simulation prediction, predict the state of the next time step based on the updated state and covariance, compare the error between the predicted value and the true value, and use the prediction error to perform real-time correction on the hybrid deep structure generation model.
[0130] Through self-learning and iterative optimization technology, the real verification process is simulated under various verification conditions, potential problems are predicted and the verification process is optimized. The specific optimization steps include simulating the real verification process under different voltage, current, temperature and other conditions, analyzing the verification results under various conditions; using simulation data to predict possible problems (such as equipment failure, error deviation) and take preventive measures in advance; adjusting the verification process according to the simulation results, optimizing the verification strategy, and improving the verification efficiency and accuracy. For example, by optimizing the verification steps and parameter settings, the verification time and resource consumption can be reduced.
[0131] Embodiment 2
[0132] like Figure 1 As shown, this embodiment proposes an electric energy meter verification simulation method based on virtual-real linkage, and the design method of the hybrid deep structure generation model includes:
[0133] Design a hybrid deep structure generation model, generate a generator of the adversarial network, and input the normalized multimodal data X t =[v t ,i t ,T t ,h t ,s t ], data example: [0.501, 0.102, 0.301, 0.402, 0.202], calculation process:
[0134] Hidden layer 1: z1 = ReLU (W g1 ·X t +b g1 );
[0135] Hidden layer 2: z2 = ReLU (W g2 ·z1+b g2 );
[0136] Output layer: z t =σ(W g3 X t +b g3 );
[0137] Specific data example: t =[0.510,0.112,0.311,0.412,0.212];
[0138] The input of the discriminator is the output z of the generator t , D(z t)=σ(W d z t +b d )=0.85;
[0139] High-dimensional features z generated by generative adversarial networks t Input into the spatiotemporal convolutional neural network, design 3 convolutional layers, and use the convolutional layer formula h t =ReLU(W c *z t +b c );
[0140] The calculation results are h3 = [0.520, 0.122, 0.321, 0.422, 0.222].
[0141] Input the output of the spatiotemporal convolutional neural network into the adaptive recurrent neural network, and calculate the values of the input gate, forget gate, output gate, and unit state respectively;
[0142] Finally, the hidden state is obtained: h t =[0.530,0.132,0.331,0.432,0.232];
[0143] The output of the adaptive recurrent neural network is input into the output layer of the hybrid deep structure generation model to obtain y t =[0.540,0.142,0.341,0.442,0.242];
[0144] The model parameters are optimized using adaptive filters and continuously corrected through prediction and update steps.
[0145] initialization:
[0146] Initial state vector: [0.5, 0.5, 0.5, 0.5, 0.5];
[0147] Initial covariance matrix: [[0.1,0,0,0,0],[0,0.1,0,0,0],[0,0,0.1,0,0],[0,0,0,0.1,0,0],[0,0,0,0.1,0],[0,0,0,0,0.1]];
[0148] Forecast and Updates:
[0149] Predict the next moment state and covariance.
[0150] Update the state and covariance using the observations (gradient of the loss function).
[0151] Updated state vector: [0.505, 0.506, 0.507, 0.508, 0.509];
[0152] Updated covariance matrix: [[0.09,0,0,0,0],[0,0.09,0,0,0],[0,0,0.09,0,0],[0,0,0,0.09,0],[0,0,0,0.09,0],[0,0,0,0,0.09]];
[0153] Simulation prediction:
[0154] Use the updated model parameters to perform simulation predictions.
[0155] Example of forecast data:
[0156] Predicted voltage signal: [0.505, 0.506, 0.507, 0.508, 0.509];
[0157] Predicted current signal: [0.105, 0.106, 0.107, 0.108, 0.109].
[0158] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. The electric energy meter verification simulation method based on virtual-real linkage is characterized by: The following steps are involved: S1: Collect multimodal signal data in real time through sensors, clean the original signal data based on the adaptive anomaly detection algorithm, denoise the cleaned signal data based on the adaptive multi-scale wavelet transform, and then normalize the denoised signal data; S2: Design a hybrid deep structure generation model, take the normalized signal data as input, simulate and predict the working status, possible problems and performance of the electric energy meter under different working conditions, and customize the loss function based on the simulation prediction results; S3: The gradient of the loss function is input into the adaptive filter as the observation value. The adaptive filter is used to continuously correct the hybrid deep structure generation model through prediction and update steps, generate model parameters, and optimize the verification process and parameter settings.
2. The electric energy meter verification simulation method based on virtual-real linkage according to claim 1 is characterized in that: In S1, the data cleaning method includes: removing outliers and missing values in signal data based on an adaptive anomaly detection algorithm, dynamically adjusting filter parameters according to the statistical characteristics of the signal based on an adaptive filter and a time-frequency analysis algorithm, converting the signal to the frequency domain through Fourier transform, detecting outliers of the frequency components, and restoring the cleaned time domain signal through inverse transform. The formula of the adaptive anomaly detection algorithm is as follows: In the formula, x clean (t) is the signal data after cleaning, the value at time t, x(t) is the original data collected at time t, and a k is the amplitude of the kth component, f k is the frequency of the kth component, φ k is the phase of the kth component, n is the number of components, indicating the number of harmonic components used to represent the signal; Based on the adaptive anomaly detection algorithm (1), the abnormal frequency components in the signal are removed and the normal signal part is retained.
3. The electric energy meter verification simulation method based on virtual-real linkage according to claim 1 is characterized in that: In S1, the data denoising method includes: performing denoising processing on the cleaned signal based on an adaptive multi-scale wavelet transform, and adaptively selecting an optimal scale and threshold to eliminate noise through a multi-scale analysis method; First, the cleaned signal is decomposed by wavelet, and then according to the different characteristics of the signal and noise, the threshold is adaptively selected to perform hard threshold processing of the wavelet coefficients, and finally wavelet reconstruction is performed to obtain the denoised signal. The wavelet denoising formula is as follows: In the formula, is the wavelet coefficient, representing x clean (t) in scale and location The wavelet transform result on is: and are the scale and translation parameters, Used to control the expansion or compression of wavelets, It is used to control the position of the wavelet on the time axis, ψ is the mother wavelet function; Remove high-frequency noise from signal data, retain useful information, and The hard threshold and soft threshold processing methods are used to perform threshold processing to eliminate noise components.
4. The electric energy meter verification simulation method based on virtual-real linkage according to claim 3 is characterized in that: The hard threshold processing method includes: setting the coefficients whose absolute values are less than the threshold in the wavelet coefficients directly to zero, and retaining the coefficients whose absolute values are greater than the threshold. The formula is as follows: The soft threshold processing method includes: on the basis of the hard threshold, the retained wavelet coefficients are reduced to make them close to zero value, and the formula is as follows: Where λ is the threshold, which is determined according to the noise level and the statistical characteristics of the signal.
5. The electric energy meter verification simulation method based on virtual-real linkage according to claim 4 is characterized in that: The wavelet coefficients after threshold processing Perform inverse wavelet transform to obtain the denoised signal. The formula for inverse wavelet transform is: In the formula, is the denoised signal, is the Fourier transform of the mother wavelet function ψ, f is the frequency component of the signal, is the normalization factor, is an integral measure.
6. The electric energy meter verification simulation method based on virtual-real linkage according to claim 1 is characterized in that: In S2, a hybrid deep structured generative model is designed, combining generative adversarial networks, spatiotemporal convolutional neural networks, and adaptive recurrent neural networks for data modeling; The normalized multimodal data is input into the hybrid deep structure generation model. The data is in the form of time series, and the input vector is: X t =[v t ,i t ,T t ,h t ,s t ] (6) Where, X t is the normalized multimodal data set, v t is the voltage, i t is the current, T t is the temperature, h t is the humidity, s t is stress; The generative adversarial network consists of a generator and a discriminator, which compete with each other to generate high-dimensional features. The generator is used to generate realistic data, and the discriminator is used to distinguish between real data and generated data. The generator formula is as follows: z t =σ(W g X t +b g ) (7) The discriminator formula is as follows: D(z t )=σ(W d With t +b d ) (8) In the formula, z t is the generator output, D(z t ) is the discriminator output, W g and b g is the weight matrix and bias vector of the generator, W d and b d is the weight matrix and bias vector of the discriminator, and σ is the activation function.
7. The electric energy meter verification simulation method based on virtual-real linkage according to claim 6 is characterized in that: Perform spatiotemporal convolution on the generated high-dimensional features to capture the spatial and temporal features in the data and obtain spatiotemporal features. The convolution layer formula is as follows: h t =ReLU(W c *With t +b c ) (9) In the formula, h t is the output of the convolutional layer at time t, W c is the convolution kernel, * indicates the convolution operation, b c is the bias vector; An adaptive recursive neural network layer is used to recursively process spatiotemporal features to capture long-term and short-term dependencies in time series. The formula of the adaptive recursive neural network layer is as follows: i t =σ(W i h t +U i h t-1 +b i ) f t =σ(W f h t +U f h t-1 +b f ) from t =σ(W o h t +U o h t-1 +b o ) (10) c t =f t ⊙c t-1 +i t ⊙tanh(W c h t +U c h t-1 +b c ) h t =o t ⊙tanh(c t ) In the formula, i t is the value of the input gate at time t, f t is the value of the forget gate at time t, o t is the value of the output gate at time t, c t is the value of the neuron state at time t, h t is the value of the hidden state at time t, σ is the Sigmoid function, ⊙ represents element-wise multiplication, W i , W f , W o , W c , are the weight matrices of input gate, forget gate, output gate, and neuron state respectively; U i , U f , U o , U c They are the weight matrices of the input gate, forget gate, output gate, and neuron state to the hidden state at the previous moment, b i , b f , b o , b c , are the bias vectors of input gate, forget gate, output gate, and neuron state respectively, and tanh is the hyperbolic tangent activation function; The recursively processed features are output through the fully connected layer. The output layer formula is as follows: y t =g(W y h t +b y ) (11) In the formula, y t is the output of the output layer, which indicates the prediction result for the future moment, W y and b y is the weight matrix and bias vector of the fully connected layer, g is the activation function, and the fully connected layer integrates the features after recursive processing to generate the final prediction result.
8. The electric energy meter verification simulation method based on virtual-real linkage according to claim 7 is characterized in that: The hybrid deep structure generation model extracts useful features from multimodal data for time series prediction, combines the loss of the generative adversarial network and the time series prediction error of the recurrent network, and customizes the loss function. The loss function formula is as follows: Where L represents the loss function, ∥·∥ 2 represents the Euclidean distance, α1 and α2 are weight coefficients for balancing reconstruction error, prediction error, and generation adversarial loss, Represents the actual data, the value at time t.
9. The electric energy meter verification simulation method based on virtual-real linkage according to claim 1 is characterized in that: In S3, the hybrid deep structure generation model correction method includes: initializing the state vector θ0, initializing the covariance matrix P0, and predicting the state and covariance at the next moment: P t|t-1 =P t-1 +Q In the formula, is the prior state estimate at time t, θ t-1 is the state vector at time t-1, representing the estimated value of the model parameters at time t-1, φ t-1 is the process noise, assumed to be zero-mean Gaussian noise, P t|t-1 is the prior covariance matrix at time t, P t-1 is the covariance matrix at time t-1, indicating the uncertainty of the model parameter estimate at time t-1, and Q is the process noise covariance matrix.
10. The electric energy meter verification simulation method based on virtual-real linkage according to claim 9 is characterized in that: Calculate the gradient of the loss function with respect to the model parameters Update the state and covariance using the observations: In the formula, K t is the Kalman gain at time t, R is the observation noise covariance matrix, and I is the identity matrix; Using the gradient of the loss function as the observation, use the updated model parameters θ t Perform simulation prediction, predict the state of the next time step based on the updated state and covariance, compare the error between the predicted value and the true value, and use the prediction error to perform real-time correction on the hybrid deep structure generation model.
Citation Information
Cited By
Field data verification device based on money-free clamp buckle type single-phase electric energy meter
CN119780823A
Electric energy meter PCB function test method and device, medium and equipment
CN119846541A
