Intelligent switch self-calibration method and device and intelligent switch
By establishing a switch identification model and performing parameter calibration, the problem of time-consuming, labor-intensive and low accuracy of traditional manual calibration methods is solved, efficient and accurate calibration of intelligent switches is achieved, and the stability and reliability of the power system are improved.
Patent Information
- Application Number
- CN202411701969.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-26
AI Technical Summary
Traditional manual calibration methods are time-consuming and labor-intensive and susceptible to human factors, resulting in a decrease in monitoring accuracy of current transformers in smart switches, affecting the accuracy and reliability of the circuit breaker.
By obtaining the original data of the current sensor in the smart switch, performing feature extraction and annotation, establishing and training the switch identification model, inputting the original data of the smart switch to be tested to obtain theoretical sampling parameters, and calibrating the sampling parameters based on this.
It improves the calibration accuracy and efficiency of smart switches, reduces manual intervention, enhances the intelligence and adaptability of calibration, and ensures the stable operation of the power system.
Smart Images

Figure CN119511181A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of low-voltage circuit breakers, and in particular to an intelligent switch self-calibration method, device and intelligent switch. Background Art
[0002] As an important power equipment, circuit breakers play an important role in the power system. The accuracy and efficiency of their calibration are crucial to the stable operation of the power system.
[0003] The current transformer (CT) in the circuit breaker is a key component for monitoring current. It works based on Faraday's law of electromagnetic induction and cooperates with the circuit breaker's control system to protect the circuit from overload and short circuit damage. CT is also used for current measurement and monitoring to improve energy management and fault diagnosis efficiency. Its accuracy and reliability are crucial to the performance of the circuit breaker. However, with the long-term use of the circuit breaker, the accuracy of the CT monitoring current in the circuit breaker will decrease, thereby affecting the accuracy and reliability of the circuit breaker. Therefore, it is necessary to calibrate the current transformer inside the circuit breaker. The traditional manual calibration method requires a manual inspection mode, which is not only time-consuming and labor-intensive, but also easily affected by human factors, resulting in inaccurate calibration results. Summary of the invention
[0004] The present invention provides an intelligent switch self-calibration method, device and intelligent switch, so as to improve the calibration accuracy and efficiency of the intelligent switch.
[0005] In a first aspect, an embodiment of the present invention provides a smart switch self-calibration method, the method comprising:
[0006] Acquire raw data of current sensors in multiple intelligent switches; wherein the raw data includes current values detected by the current sensors at multiple time points;
[0007] Extracting features from the raw data to obtain a feature set; annotating the feature set according to sampling parameters of the intelligent switch to obtain a data set; establishing and training a switch recognition model according to the data set;
[0008] Inputting the original data of the current sensor in the intelligent switch to be tested into the switch identification model to obtain the theoretical sampling parameters of the intelligent switch to be tested;
[0009] The sampling parameters of the intelligent switch to be tested are calibrated based on the theoretical sampling parameters.
[0010] Furthermore, the feature extraction is performed on the original data to obtain a feature set, and the feature set is labeled according to the sampling parameters of the intelligent switch to obtain a data set, including:
[0011] Performing feature extraction on the original data to obtain current peak value, mean value, variance and spectrum characteristics of the current value in the original data as the feature set;
[0012] The sampling parameters of each of the intelligent switches are marked in the corresponding feature set to obtain the data set; wherein, the current sensor in the intelligent switch is a current transformer, and the sampling parameters of the intelligent switch include the current specification of the intelligent switch and the transformation ratio of the current transformer.
[0013] Furthermore, the feature extraction is performed on the original data to obtain the current peak value, mean value, variance and spectrum characteristics of the current value in the original data as the feature set, including:
[0014] Traversing the original data, finding the maximum current value in the original data as the current peak value;
[0015] Adding all current values in the raw data and dividing the sum by the number of current values in the raw data to obtain the mean value;
[0016] Calculating the deviation of the current value at each time point in the original data from the mean value, adding the squares of the deviations and dividing the sum by the number of current values in the original data to obtain the variance;
[0017] Performing Fourier transform or wavelet transform on the original data to obtain the frequency spectrum characteristics;
[0018] The current peak value, the mean value, the variance, and the spectrum feature are used as the feature set.
[0019] Furthermore, establishing and training a switch recognition model according to the data set includes:
[0020] Dividing the data set into a training set, a validation set, and a test set;
[0021] Establishing a deep learning model, and training the deep learning model by using the training set to obtain an untested switch recognition model;
[0022] The untested switch identification model is verified and tested by using the verification set and the test set to obtain the verified and tested switch identification model.
[0023] Furthermore, the raw data of the current sensor in the intelligent switch to be tested is input into the switch identification model to obtain the theoretical sampling parameters of the intelligent switch to be tested, including:
[0024] Acquire raw data of a current sensor in the intelligent switch to be tested;
[0025] The original data of the current sensor in the intelligent switch to be tested is input into the switch identification model to obtain the theoretical current specification of the intelligent switch to be tested and the theoretical transformation ratio of the current transformer in the intelligent switch to be tested.
[0026] Furthermore, the calibrating the sampling parameters of the intelligent switch to be tested based on the theoretical sampling parameters includes:
[0027] Based on the theoretical current specification of the intelligent switch to be tested and the theoretical transformation ratio of the current transformer in the intelligent switch to be tested, the control parameters in the intelligent switch to be tested are adjusted so that the sampling parameters of the intelligent switch to be tested are equal to the theoretical sampling parameters.
[0028] Furthermore, after calibrating the sampling parameters of the intelligent switch to be tested based on the theoretical sampling parameters, the method further includes:
[0029] Obtaining a current sampling value of a current sensor in the intelligent switch to be tested after calibration, and obtaining an actual current value of a circuit in which the intelligent switch to be tested is located through a standard current transformer;
[0030] If the difference between the current sampling value and the actual current value is less than a preset threshold, it is determined that the calibration of the intelligent switch to be tested is successful;
[0031] If the difference between the current sampling value and the actual current value is greater than or equal to the preset threshold, the control parameters in the intelligent switch to be tested are adjusted according to the difference between the current sampling value and the actual current value so that the difference between the current sampling value and the actual current value is less than the preset threshold.
[0032] Furthermore, after calibrating the sampling parameters of the intelligent switch to be tested based on the theoretical sampling parameters, the method further includes:
[0033] The control parameters in the intelligent switch to be tested, the theoretical sampling parameters corresponding to the intelligent switch to be tested, and the calibrated sampling parameters of the intelligent switch to be tested are recorded.
[0034] In a second aspect, an embodiment of the present invention further provides an intelligent switch self-calibration device, the intelligent switch self-calibration device is used to execute the intelligent switch self-calibration method according to any embodiment of the present invention, the device comprising:
[0035] An acquisition module, used to acquire raw data of current sensors in multiple intelligent switches; wherein the raw data includes current values detected by the current sensors at multiple time points;
[0036] A model building module is used to extract features from the raw data to obtain a feature set; annotate the feature set according to the sampling parameters of the intelligent switch to obtain a data set; and establish and train a switch recognition model according to the data set;
[0037] A parameter determination module, used for inputting the original data of the current sensor in the intelligent switch to be tested into the switch identification model to obtain the theoretical sampling parameters of the intelligent switch to be tested;
[0038] A calibration module is used to calibrate the sampling parameters of the intelligent switch to be tested based on the theoretical sampling parameters.
[0039] In a third aspect, an embodiment of the present invention further provides an intelligent switch, wherein the intelligent switch includes the intelligent switch self-calibration device described in any embodiment of the present invention.
[0040] The present invention provides a smart switch self-calibration method, device and smart switch, which obtain the original data of current sensors in multiple smart switches; extract features from the original data to obtain a feature set; annotate the feature set according to the sampling parameters of the smart switch to obtain a data set; establish and train a switch recognition model according to the data set, and according to the switch recognition model, accurate calibration of any smart switch to be tested can be achieved, thereby improving the intelligence and adaptability of the calibration process, and improving the calibration accuracy and efficiency of the smart switch. The theoretical sampling parameters of the smart switch to be tested are obtained by inputting the original data of the current sensor in the smart switch to be tested into the switch recognition model; the sampling parameters of the smart switch to be tested are calibrated based on the theoretical sampling parameters to achieve calibration of the accuracy of the smart switch to be tested, and the smart switch to be tested is calibrated through the switch recognition model, thereby improving the calibration accuracy and efficiency of the smart switch. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 The present invention provides a flowchart of a self-calibration method for an intelligent switch.
[0042] Figure 2 A flow chart of establishing a switch identification model provided by an embodiment of the present invention.
[0043] Figure 3 A flow chart of another intelligent switch self-calibration method provided by an embodiment of the present invention.
[0044] Figure 4 A schematic diagram of the structure of an intelligent switch self-calibration device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0046] An embodiment of the present invention provides a smart switch self-calibration method. This embodiment is applicable to application scenarios where a smart switch is calibrated. The method can be executed by a smart switch self-calibration device, which can be implemented in the form of hardware and / or software. Figure 1 A flowchart of a smart switch self-calibration method provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the smart switch self-calibration method includes:
[0047] S110, acquiring original data of current sensors in multiple intelligent switches; wherein the original data includes current values detected by the current sensors at multiple time points.
[0048] The intelligent switch is provided with a medium current sensor, and the reliability of the intelligent switch can be improved by calibrating the internal current sensor in the intelligent switch. Optionally, the current sensor is a current transformer; the intelligent switch is a low-voltage intelligent switch, and can also be called a low-voltage intelligent circuit breaker.
[0049] Specifically, after the smart switch is started and initialized, a high-precision analog-to-digital converter is used to collect the current value output by the current sensor, and the current values detected by the current sensor at multiple time points are obtained as the raw data of the current sensor. The raw data of the current sensors in multiple smart switches are obtained to establish a switch recognition model. In addition, the raw data can be pre-processed by using methods such as sliding average filtering or Kalman filtering to reduce noise interference in the process of obtaining the raw data.
[0050] S120, extracting features from the original data to obtain a feature set; labeling the feature set according to sampling parameters of the intelligent switch to obtain a data set; and establishing and training a switch recognition model according to the data set.
[0051] Specifically, feature extraction is performed on the collected raw data, such as current peak value, mean, variance, spectral features, etc., to obtain a feature set. Then, the corresponding feature set is labeled according to the sampling parameters of each intelligent switch to obtain multiple labeled data sets. The sampling parameters can be the current specifications and CT ratio of the intelligent switch, so that the deep learning model is trained using the labeled data sets to obtain a switch recognition model. During the training process, strategies such as cross-validation and early stopping can be used to prevent overfitting. In addition, in order to improve the generalization ability of the switch recognition model, samples with different noise levels can be added to the data set for training. At the same time, data enhancement techniques such as rotation and scaling can be used to increase the diversity of the data set. Through this switch recognition model, accurate calibration of any intelligent switch to be tested can be achieved, thereby improving the intelligence and adaptability of the calibration process, and improving the calibration accuracy and efficiency of the intelligent switch.
[0052] S130 , inputting the original data of the current sensor in the intelligent switch to be tested into the switch identification model to obtain theoretical sampling parameters of the intelligent switch to be tested.
[0053] Specifically, the switch identification model can realize accurate calibration of any intelligent switch to be tested. When calibrating the intelligent switch to be tested, the original data of the current sensor in the intelligent switch to be tested is input into the switch identification model, that is, the current values detected by the current sensor in the intelligent switch to be tested at multiple time points are input into the switch identification model, so as to obtain the theoretical sampling parameters of the intelligent switch to be tested. Exemplarily, the theoretical sampling parameters may include the theoretical current specification and theoretical CT ratio of the intelligent switch to be tested. According to the theoretical sampling parameters of the intelligent switch to be tested, the actual sampling parameters of the intelligent switch to be tested can be calibrated so that the actual sampling parameters of the intelligent switch to be tested are close to or equal to the theoretical sampling parameters, thereby realizing the calibration of the intelligent switch to be tested.
[0054] S140: Calibrate sampling parameters of the intelligent switch to be tested based on theoretical sampling parameters.
[0055] Specifically, based on the theoretical sampling parameters, the parameters of the sampling module or control module of the intelligent switch to be tested can be adaptively adjusted through the reinforcement learning algorithm, and the calibration error can be minimized by continuously trying and adjusting the parameters, so that the actual sampling parameters of the intelligent switch to be tested are close to or equal to the theoretical sampling parameters, thereby realizing the calibration of the intelligent switch to be tested. The calibration process of the intelligent switch through the switch identification model avoids the errors caused by manual participation in the calibration of the intelligent switch, thereby improving the reliability of the intelligent switch, and calibrating the intelligent switch to be tested through the switch identification model improves the calibration accuracy and efficiency of the intelligent switch.
[0056] It should be noted that due to the limitations of calibration algorithms and hardware equipment, the calibration accuracy of traditional automated calibration technology often cannot meet high-precision requirements, which may cause errors in the actual operation of intelligent switches and affect the stability and safety of the power system. In addition, traditional calibration methods can often only calibrate low-voltage intelligent switches of specific models or specifications, and lack the ability to intelligently identify different current specifications and CT ratios. This leads to the need for manual judgment and manual setting of calibration parameters in actual applications, which is not only inefficient but also prone to errors. In addition, traditional calibration methods lack sufficient adaptive capabilities when facing complex and changeable power system environments. When power system parameters change, traditional calibration methods may not be able to make adjustments in time, resulting in inaccurate calibration results. Traditional manual calibration methods require professionals to detect and adjust switches one by one, which is a cumbersome and time-consuming process, which not only increases operation and maintenance costs, but also reduces the reliability and availability of the power system. In the embodiment of the present invention, a deep learning model is introduced to perform feature extraction and pattern recognition on the data of the current sensor, and a switch recognition model is established to realize the recognition of intelligent switches with different current specifications and CT ratios, so that the specifications and CT ratio of the current switch can be automatically determined based on the switch recognition model, and the calibration parameters are adjusted accordingly; the parameters of the intelligent switch to be tested are adaptively adjusted using the theoretical sampling parameters of the intelligent switch to be tested identified by the switch recognition model to minimize the calibration error, and the optimal calibration strategy can be found using the reinforcement learning algorithm through continuous attempts and adjustment of parameters, thereby improving the calibration accuracy; by combining the advantages of deep learning and reinforcement learning, the embodiment of the present invention can realize real-time perception and dynamic adjustment of the power system environment, the switch recognition model can derive the theoretical sampling parameters of the intelligent switch to be tested, and the reinforcement learning algorithm can adjust the calibration parameters according to the theoretical sampling parameters of the intelligent switch to be tested, thereby realizing adaptive calibration of the intelligent switch to be tested in different power system environments, greatly improving the calibration accuracy and calibration efficiency of the intelligent switch.
[0057] The embodiment of the present invention provides a self-calibration method for an intelligent switch, which obtains the original data of current sensors in multiple intelligent switches; extracts features from the original data to obtain a feature set; annotates the feature set according to the sampling parameters of the intelligent switch to obtain a data set; establishes and trains a switch recognition model according to the data set, and according to the switch recognition model, accurate calibration of any intelligent switch to be tested can be achieved, thereby improving the intelligence and adaptability of the calibration process, and improving the calibration accuracy and efficiency of the intelligent switch. The theoretical sampling parameters of the intelligent switch to be tested are obtained by inputting the original data of the current sensor in the intelligent switch to be tested into the switch recognition model; the sampling parameters of the intelligent switch to be tested are calibrated based on the theoretical sampling parameters to achieve calibration of the accuracy of the intelligent switch to be tested, and the intelligent switch to be tested is calibrated by the switch recognition model, thereby improving the calibration accuracy and efficiency of the intelligent switch.
[0058] In order to further improve the calibration accuracy of the intelligent switch, the embodiment of the present invention provides a specific process for determining and establishing a switch identification model. Figure 2 A flow chart of establishing a switch identification model provided by an embodiment of the present invention, such as Figure 2 As shown, feature extraction is performed on the original data to obtain a feature set; the feature set is labeled according to the sampling parameters of the intelligent switch to obtain a data set; a switch recognition model is established and trained according to the data set, including:
[0059] S210 , extracting features from the original data to obtain current peak value, mean value, variance and frequency spectrum features of the current value in the original data as a feature set.
[0060] Specifically, by designing a feature extraction algorithm, feature extraction is performed on the collected raw data, including the current peak value, mean value, variance, spectrum characteristics, etc. of the current value in the raw data.
[0061] Optionally, feature extraction is performed on the original data to obtain current peak value, mean value, variance and spectrum features of the current value in the original data as a feature set, including:
[0062] Traverse the original data to find the maximum current value in the original data as the current peak value; add all current values in the original data and divide it by the number of current values in the original data to get the mean; calculate the deviation of the current value at each time point in the original data from the mean, add the square of the deviation and divide it by the number of current values in the original data to get the variance; perform Fourier transform or wavelet transform on the original data to get the spectrum characteristics; take the current peak value, mean, variance, and spectrum characteristics as the feature set.
[0063] Specifically, the current peak is the maximum value of the current signal at a certain point in time. The current peak extraction usually involves the following steps: first, the original current signal is sampled to obtain a series of discrete current values, that is, the original data in the embodiment of the present invention, and the original data is traversed to find the maximum value of the current value in the original data as the current peak. The mean is the average level of the current signal within a certain period of time. The method for extracting the mean includes data sampling and mean calculation. The mean is obtained by adding all current values in the original data and dividing it by the number of current values in the original data. The variance reflects the discreteness or fluctuation of the current signal. The variance is obtained by calculating the deviation of the current value at each time point in the original data from the mean (that is, the current value at each time point minus the mean), adding the squares of all deviations and dividing them by the number of current values in the original data. The spectrum feature describes the characteristics of the current signal in the frequency domain. The method for extracting the spectrum feature usually involves signal processing techniques such as Fourier transform or wavelet transform. When using Fourier transform processing technology, the current value in the original data is Fourier transformed to convert it from the time domain to the frequency domain, and the spectrum characteristics of the current value signal, such as power spectrum density, frequency components, etc., are analyzed in the frequency domain as spectrum features. These spectrum features can reflect the frequency composition and distribution of the current signal; when using wavelet transform processing technology, the current value in the original data is wavelet transformed to decompose it into wavelet coefficients of different scales, and the characteristics reflecting the time domain and frequency domain characteristics of the current signal are extracted from the wavelet coefficients, such as the mean, variance, energy, etc. of the wavelet coefficients, as spectrum features. Finally, the current peak, mean, variance, and spectrum features are used as feature sets to establish and train the switch recognition model.
[0064] In addition, in the acquisition of the raw data of the current sensors in the multiple intelligent switches in the embodiment of the present invention, the following sliding average filtering or Kalman filtering method can be used to pre-process the raw data. The sliding average filtering method process is as follows: establish a sampling window and a filtering window, set the sampling window length for storing continuous data samples, set the filtering window length, which is usually the same as or slightly smaller than the sampling window length, for calculating the average value, data accumulation and average value calculation, when the number of data sample points does not fill the sampling window, the data in the sampling window is accumulated and the average value is calculated, when the number of data sample points has filled the sampling window, the data in the filtering window is sorted (optional step, used to remove extreme values), and then the average value is calculated, when a new data sample arrives, remove the earliest point in the sampling window, add a new data sample, repeat the data accumulation and average value calculation, and obtain the filtered raw data. The process of the Kalman filtering method is as follows: the first step is to define the system state and observation equations: determine the system state vector, including the variables that need to be estimated, define the state transfer matrix, control input matrix and observation matrix to describe the change of the system state and the relationship between the observation value and the state; the second step is to initialize the filter parameters: set the initial state estimate and the initial state estimate variance, set the process noise covariance matrix and the observation noise covariance matrix; prediction step: according to the state transfer matrix and the control input matrix, use the state estimate at the previous moment to predict the state estimate at the current moment (a priori estimate), and calculate the variance of the a priori estimate; update step: calculate the Kalman gain, which is used to weigh the weight between the a priori estimate and the observation value; use the observation value and the Kalman gain to update the state estimate at the current moment (a posteriori estimate) and update the variance of the state estimate; iterative processing: for each new observation value, repeat the prediction step and the update step to obtain continuous filtered data.
[0065] S220, marking the sampling parameters of each intelligent switch in the corresponding feature set to obtain a data set; wherein the current sensor in the intelligent switch is a current transformer, and the sampling parameters of the intelligent switch include the current specification of the intelligent switch and the transformation ratio of the current transformer.
[0066] Among them, the current specification of the smart switch refers to the current value that the smart switch can withstand. The transformation ratio of the current transformer of the smart switch is the ratio between the converted currents on both sides of the current transformer, that is, the ratio of the primary side current to the secondary side current. For example, from 5000A to 5A, the current transformer ratio is 5000 / 5.
[0067] Specifically, in order to enable the switch recognition model to identify the sampling parameters corresponding to the smart switch according to the corresponding feature set, the sampling parameters of each smart switch can be annotated in the corresponding feature set to obtain a data set, and a large number of annotated data sets can be used to train the deep learning model to obtain the switch recognition model. In addition, in order to improve the generalization ability of the model, samples with different noise levels can be added to the data set for training. At the same time, data enhancement techniques such as rotation and scaling can be used to increase the diversity of the data set.
[0068] S230: Establish and train a switch recognition model according to the data set.
[0069] Optionally, establishing and training a switch recognition model based on a data set includes the following process:
[0070] S310, dividing the data set into a training set, a validation set, and a test set.
[0071] Specifically, the labeled data set is divided into a training set, a validation set, and a test set. Usually, the training set is used for model learning, the validation set is used to adjust model parameters and select hyperparameters, and the test set is used to evaluate the performance of the final model. The division ratio can be determined according to the specific task and the amount of data. Generally, the training set accounts for 60%-80% of the total data, and the validation set and the test set each account for 10%-20%. In addition, the labeled data set can also be preprocessed, such as standardizing, normalizing, scaling, etc., to ensure the consistency and availability of the data and extract features that are beneficial to model training.
[0072] S320: Establish a deep learning model, and train the deep learning model using a training set to obtain an untested switch recognition model.
[0073] Specifically, the deep learning model is trained through the training set to obtain the untested switch recognition model. The specific steps are as follows: Step 1, select the deep learning model. Select and establish the appropriate deep learning model structure according to the task requirements, such as convolutional neural network, recurrent neural network, long short-term memory network, etc. Step 2, initialize the model parameters, such as the weights and biases (parameters) of the initialized model. Common initialization methods include random initialization and loading with pre-trained models. Step 3, select the loss function: select the appropriate loss function according to the task type, such as mean square error for regression tasks and cross entropy loss for classification tasks. Select the optimizer: select a suitable optimization algorithm, such as stochastic gradient descent, to update the model parameters to reduce the loss function. The fourth step is model training and cross-validation. The model is trained on the training set. The input data is forward propagated through the model to calculate the loss, and then the gradient is calculated through back-propagation. Finally, the optimizer is used to update the model parameters. The training process is iterated for multiple cycles, and all the data in the training set are traversed in each cycle; the training set is divided into K subsets, and one subset is set aside each time as the validation set, and the remaining K-1 subsets are used to train the model; the training process is repeated K times, and different subsets are used as validation sets each time. Record the accuracy, loss and other indicators of each validation, and calculate the average value as the final evaluation indicator. Cross-validation can help evaluate the stability and generalization ability of the model and avoid overfitting of the model. The fifth step is to prevent overfitting through early stopping. During the training process, the model performance is evaluated on the validation set at regular intervals. Stop training conditions: When the performance on the validation set (such as accuracy, loss, etc.) begins to decline, stop training; this indicates that the model has begun to overfit, and continued training will only make the model perform better on the training set, but worse on the validation set and test set; Save the best model: During the training process, record the model parameters with the best performance on the validation set, and save the model after the training stops.
[0074] S330 , verifying and testing the untested switch recognition model by using the verification set and the test set to obtain a verified and tested switch recognition model.
[0075] Specifically, an independent test set is used to evaluate the performance of the untested switch recognition model. The test set is usually independent of the training set and the validation set, and is used to evaluate the generalization ability of the model. When the model meets the performance requirements, it can be deployed in actual applications. The deployment process includes steps such as integrating the model into the application, performing performance testing and optimization. The untested switch recognition model is verified and tested using the validation set and the test set to obtain a verified and tested switch recognition model. An independent test set is used to evaluate the performance of the final model. The test set is usually independent of the training set and the validation set, and is used to evaluate the generalization ability of the switch recognition model. When the switch recognition model meets the performance requirements, it can be deployed in actual applications. The deployment process includes steps such as integrating the switch recognition model into the application, performing performance testing and optimization. The switch recognition model can be used to accurately calibrate any smart switch to be tested, thereby improving the intelligence and adaptability of the calibration process, and improving the calibration accuracy and efficiency of the smart switch.
[0076] In the embodiment of the present invention, optionally, raw data of a current sensor in the smart switch to be tested is input into the switch identification model to obtain theoretical sampling parameters of the smart switch to be tested, including:
[0077] The original data of the current sensor in the intelligent switch to be tested is obtained; the original data of the current sensor in the intelligent switch to be tested is input into the switch identification model to obtain the theoretical current specification of the intelligent switch to be tested and the theoretical transformation ratio of the current transformer in the intelligent switch to be tested.
[0078] Specifically, by acquiring the original data of the current sensor in the smart switch to be tested, that is, the current values detected by the current sensor in the smart switch to be tested at multiple time points, the original data of the current sensor in the smart switch to be tested is input into the switch identification model, and the switch identification model can output the theoretical current specification of the smart switch to be tested and the theoretical transformation ratio of the current transformer in the smart switch to be tested. The sampling parameters of the smart switch to be tested can be calibrated according to the theoretical current specification of the smart switch to be tested and the theoretical transformation ratio of the current transformer in the smart switch to be tested.
[0079] Furthermore, the sampling parameters of the intelligent switch to be tested are calibrated based on the theoretical sampling parameters, including:
[0080] Based on the theoretical current specification of the intelligent switch to be tested and the theoretical transformation ratio of the current transformer in the intelligent switch to be tested, the control parameters in the intelligent switch to be tested are adjusted so that the sampling parameters of the intelligent switch to be tested are equal to the theoretical sampling parameters.
[0081] Specifically, based on the theoretical sampling parameters, the parameters of the sampling module or control module of the intelligent switch to be tested can be adaptively adjusted through the reinforcement learning algorithm, and the calibration error can be minimized by continuously trying and adjusting the parameters, so that the actual sampling parameters of the intelligent switch to be tested are close to or equal to the theoretical sampling parameters, thereby realizing the calibration of the intelligent switch to be tested. The calibration process of the intelligent switch through the switch identification model avoids the errors caused by manual participation in the calibration of the intelligent switch, thereby improving the reliability of the intelligent switch, and calibrating the intelligent switch to be tested through the switch identification model improves the calibration accuracy and efficiency of the intelligent switch.
[0082] It should be noted that the intelligent switch to be tested is provided with a sampling or control module. According to the specific requirements of the sampling or control module, the state space, action space and reward function of reinforcement learning are defined. The state space includes current specifications, CT ratio, current state of the system, etc. The action space includes parameters that can be adjusted by the sampling or control module, such as sampling frequency, control gain, etc. The reward function is designed to guide the agent to learn appropriate parameter adjustment strategies according to system performance (such as stability, accuracy, etc.) and preset goals. The reinforcement learning algorithm is selected. According to the complexity of the problem and specific requirements, the appropriate reinforcement learning algorithm is selected. The reinforcement learning model is trained using historical data or a simulated environment. The agent selects actions according to the current state and observes the feedback of the environment (i.e., rewards and new states). The parameters of the deep neural network are updated through the back propagation algorithm and the gradient descent optimization method to minimize the error between the agent's behavior in the environment and the accumulated rewards. In practical applications, the reinforcement learning model dynamically adjusts the parameters of the sampling or control module according to the real-time system state information and the recognition results of the deep learning model. Through continuous learning and adjustment, the agent gradually learns how to select appropriate parameter adjustment strategies under different states to achieve system performance optimization.
[0083] In addition, the adjustment effect of the reinforcement learning model can be evaluated based on the actual performance of the system (such as the accuracy of current measurement). According to the evaluation results, the switch recognition model is adjusted and optimized to improve the adaptability and performance of the switch recognition model.
[0084] In another embodiment of the present invention, in order to speed up the training speed of the switch recognition model and improve the training effect, and to improve the calibration accuracy when adjusting and calibrating the sampling parameters of the intelligent switch to be tested based on the theoretical sampling parameters through reinforcement learning, strategies such as experience replay and target network can be adopted. At the same time, reasonable reward functions and termination conditions can be set to ensure that the reinforcement learning algorithm can find the optimal calibration strategy. The specific process is as follows: 1. Experience replay, experience replay is a technology for storing and reusing past experience, which reduces the correlation between training data and improves the utilization efficiency of data, thereby accelerating the convergence speed of the algorithm and improving stability. In reinforcement learning, the intelligent agent interacts with the environment, observes the state of the environment and the actions taken, and learns according to the feedback of the environment. The core idea of experience replay is to store the interaction experience between the intelligent agent and the environment in the experience pool, and randomly extract experience for training during the learning process. Specifically, the workflow of experience replay is as follows: When the agent interacts with the environment, it stores the experience of each step (including state, action, reward, next state, and whether it is terminated) in a data structure called the experience pool. Each time the policy is updated, a small batch of experience is randomly sampled from the experience pool to update the value function or policy. The advantages of experience replay are: it breaks the time correlation between samples, making the learning process more stable. It improves the efficiency of data utilization and reduces the dependence on new samples. Second, the target network is another commonly used strategy in reinforcement learning. It is used to stabilize the learning process and avoid parameter oscillation problems during training. The structure and parameters of the target network are the same as those of the network used for real-time learning (usually called the online network or Q network), but the parameter update frequency is lower. During training, the target network is used to calculate the target Q value, while the online network is used to calculate the predicted Q value and update the parameters by minimizing the error between the predicted Q value and the target Q value. The use of the target network can significantly improve the stability of training because it avoids using the latest network parameters to calculate the target Q value every time the parameters are updated, thereby reducing fluctuations during training.
[0085] Furthermore, after calibrating the sampling parameters of the intelligent switch to be tested based on the theoretical sampling parameters, the method further includes:
[0086] The current sampling value of the current sensor in the intelligent switch to be tested is obtained after calibration, and the actual current value of the circuit where the intelligent switch to be tested is located is obtained through a standard current transformer.
[0087] If the difference between the current sampling value and the actual current value is less than the preset threshold, it is determined that the calibration of the intelligent switch to be tested is successful. If the difference between the current sampling value and the actual current value is greater than or equal to the preset threshold, the control parameters in the intelligent switch to be tested are adjusted according to the difference between the current sampling value and the actual current value so that the difference between the current sampling value and the actual current value is less than the preset threshold.
[0088] Specifically, by setting the size of the preset threshold, the calibration accuracy and efficiency of the smart switch to be tested can be improved. When the preset threshold is set small enough, the error of the current value measured by the current transformer in the smart switch to be tested is small enough, thereby achieving accurate calibration of the smart switch.
[0089] It should be noted that after adjusting and calibrating the sampling parameters of the intelligent switch to be tested, the system uses a high-precision current source or a standard current transformer to verify the accuracy. By comparing the difference between the current sampling value and the actual current value, it is determined whether the calibration is successful. If the accuracy does not meet the requirements, feedback adjustment is performed according to the error size and direction until the requirements are met. In addition, an accuracy verification algorithm can be designed, which uses a high-precision current source or a standard current transformer to generate a standard actual current value and compare it with the current sampling value. If the error exceeds the allowable range, the parameters are adjusted according to the error size and direction, and the next round of calibration is performed. In order to reduce the impact of accidental errors, the method of taking the average value of multiple measurements can be used for comparison. At the same time, a reasonable error threshold and number of iterations can be set to ensure the accuracy and stability of the calibration results.
[0090] Furthermore, after calibrating the sampling parameters of the intelligent switch to be tested based on the theoretical sampling parameters, the method further includes:
[0091] The control parameters in the intelligent switch to be tested, the theoretical sampling parameters corresponding to the intelligent switch to be tested, and the sampling parameters of the intelligent switch to be tested after calibration are recorded.
[0092] Specifically, the control parameters in the intelligent switch to be tested, the theoretical sampling parameters corresponding to the intelligent switch to be tested, and the sampling parameters of the calibrated intelligent switch to be tested are recorded and stored in a non-volatile memory. In order to establish a query function for providing calibration results later, it is convenient for subsequent data analysis and processing. During the implementation process, a data storage algorithm can be designed, which stores the calibration results in a non-volatile memory in a specific format (such as JSON, XML, etc.). At the same time, a query interface is provided for querying the calibration results. In order to ensure the integrity and security of the data, data checksums, data encryption and other technologies can be used to protect the data. At the same time, reasonable storage strategies and query permissions can be set to ensure the readability and maintainability of the data.
[0093] In order to further briefly explain the calibration process of the smart switch self-calibration method of the embodiment of the present invention, the embodiment of the present invention also provides another smart switch self-calibration method. Figure 3 A flowchart of another intelligent switch self-calibration method provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, including:
[0094] S1. Initialization and data collection.
[0095] In this step, after the intelligent switch is started and initialized, a high-precision analog-to-digital converter is used to collect the current value output by the current sensor to obtain the current values detected by the current sensor at multiple time points as the original data of the current sensor.
[0096] S2. Feature extraction and deep learning model training.
[0097] In this step, the feature set is obtained by extracting features from the original data, and the feature set is labeled according to the sampling parameters of the intelligent switch to obtain a data set. The features are trained using a deep learning model (such as a convolutional neural network CNN or a recurrent neural network RNN) to obtain a model that can identify intelligent switches of different current specifications and CT ratios according to current values, that is, a switch recognition model.
[0098] S3. Reinforcement learning adaptive control.
[0099] In this step, the original data of the current sensor in the smart switch to be tested is input into the switch identification model to obtain the theoretical sampling parameters of the smart switch to be tested, which may include the theoretical current specification and theoretical CT ratio of the smart switch to be tested. The optimal calibration strategy of the smart switch to be tested can be found through reinforcement learning and adaptive control algorithms (such as Q-learning, policy gradient and other reinforcement learning algorithms), so that the sampling parameters of the smart switch to be tested are adjusted and calibrated based on the theoretical sampling parameters using the optimal calibration strategy, thereby improving the calibration accuracy of the smart switch to be tested.
[0100] S4. Accuracy verification and feedback adjustment.
[0101] In this step, after adjusting and calibrating the sampling parameters of the intelligent switch to be tested, the system uses a high-precision current source or a standard current transformer to verify the accuracy. By comparing the actual current value with the sampled value, it is determined whether the calibration is successful. If the accuracy does not meet the requirements, feedback adjustment is performed according to the error size and direction until the requirements are met. In addition, an accuracy verification algorithm can be designed, which uses a high-precision current source or a standard current transformer to generate a standard current value and compare it with the sampled value. If the error exceeds the allowable range, the parameters are adjusted according to the error size and direction, and the next round of calibration is performed. In order to reduce the impact of accidental errors, the method of taking the average value of multiple measurements can be used for comparison. At the same time, a reasonable error threshold and number of iterations can be set to ensure the accuracy and stability of the calibration results.
[0102] S5. Record and store the calibration results.
[0103] In this step, the calibration results and the data during the calibration process are recorded and stored in a non-volatile memory. At the same time, a query of the calibration results can also be provided to facilitate subsequent data analysis and processing.
[0104] By using the switch identification model to calibrate the intelligent switch, errors caused by manual participation in the intelligent switch calibration are avoided, thereby improving the reliability of the intelligent switch. In addition, by calibrating the intelligent switch to be tested through the switch identification model, the calibration accuracy and efficiency of the intelligent switch are improved.
[0105] The embodiment of the present invention provides a smart switch self-calibration method, which can realize accurate calibration of any smart switch to be tested according to the switch identification model, thereby improving the intelligence and adaptability of the calibration process and improving the calibration accuracy and efficiency of the smart switch.
[0106] The embodiment of the present invention also provides an intelligent switch self-calibration device, Figure 4 Schematic diagram of the structure of an intelligent switch self-calibration device provided in an embodiment of the present invention. The intelligent switch self-calibration device in the embodiment of the present invention is used to execute the intelligent switch self-calibration method in any embodiment of the present invention, such as Figure 4 As shown, the intelligent switch self-calibration device includes:
[0107] The acquisition module 110 is used to acquire raw data of current sensors in multiple intelligent switches; wherein the raw data includes current values detected by the current sensors at multiple time points.
[0108] The model building module 120 is used to extract features from the original data to obtain a feature set; annotate the feature set according to the sampling parameters of the intelligent switch to obtain a data set; and build and train a switch recognition model according to the data set.
[0109] The parameter determination module 130 is used to input the original data of the current sensor in the intelligent switch to be tested into the switch identification model to obtain the theoretical sampling parameters of the intelligent switch to be tested.
[0110] The calibration module 140 is used to calibrate the sampling parameters of the intelligent switch to be tested based on the theoretical sampling parameters.
[0111] Specifically, after the intelligent switch is started and initialized, the acquisition module 110 uses a high-precision analog-to-digital converter to collect the current value output by the current sensor, obtains the current value detected by the current sensor at multiple time points, and uses it as the original data of the current sensor. By acquiring the original data of the current sensors in multiple intelligent switches, a switch identification model is established. The model establishment module 120 extracts features from the collected original data, such as current peak value, mean value, variance, spectrum features, etc., to obtain a feature set. Then, the corresponding feature set is annotated according to the sampling parameters of each intelligent switch to obtain multiple annotated data sets. The sampling parameters can be the current specifications and CT ratio of the intelligent switch, so as to train the deep learning model using the annotated data sets to obtain a switch identification model. The parameter determination module 130 inputs the original data of the current sensor in the intelligent switch to be tested into the switch identification model, that is, inputs the current values detected by the current sensor in the intelligent switch to be tested at multiple time points into the switch identification model, thereby obtaining the theoretical sampling parameters of the intelligent switch to be tested. Exemplarily, the theoretical sampling parameters can include the theoretical current specifications and theoretical CT ratio of the intelligent switch to be tested. According to the theoretical sampling parameters of the intelligent switch to be tested, the actual sampling parameters of the intelligent switch to be tested can be calibrated so that the actual sampling parameters of the intelligent switch to be tested are close to or equal to the theoretical sampling parameters, thereby realizing the calibration of the intelligent switch to be tested. The calibration module 140 can adaptively adjust the parameters of the sampling module or control module of the intelligent switch to be tested through a reinforcement learning algorithm based on the theoretical sampling parameters, and minimize the calibration error by continuously trying and adjusting the parameters, so that the actual sampling parameters of the intelligent switch to be tested are close to or equal to the theoretical sampling parameters, thereby realizing the calibration of the intelligent switch to be tested. The calibration process of the intelligent switch through the switch identification model avoids the error caused by manual participation in the calibration of the intelligent switch, thereby improving the reliability of the intelligent switch, and calibrating the intelligent switch to be tested through the switch identification model improves the calibration accuracy and efficiency of the intelligent switch.
[0112] In addition, the intelligent switch self-calibration device of the embodiment of the present invention includes but is not limited to the above modules. The intelligent switch self-calibration device of the embodiment of the present invention can adaptively set relevant functional modules according to the intelligent switch self-calibration method in any embodiment of the present invention to achieve the function and technical effect of the intelligent switch self-calibration method in any embodiment of the present invention.
[0113] The embodiment of the present invention provides a self-calibration device for an intelligent switch, which obtains the original data of current sensors in multiple intelligent switches through an acquisition module; extracts features from the original data through a model building module to obtain a feature set; annotates the feature set according to the sampling parameters of the intelligent switch to obtain a data set; establishes and trains a switch recognition model based on the data set, and can realize accurate calibration of any intelligent switch to be tested according to the switch recognition model, thereby improving the intelligence and adaptability of the calibration process, and improving the calibration accuracy and efficiency of the intelligent switch. The original data of the current sensor in the intelligent switch to be tested is input into the switch recognition model through a parameter determination module to obtain the theoretical sampling parameters of the intelligent switch to be tested; the calibration module calibrates the sampling parameters of the intelligent switch to be tested based on the theoretical sampling parameters to realize the calibration of the accuracy of the intelligent switch to be tested, and the intelligent switch to be tested is calibrated through the switch recognition model, thereby improving the calibration accuracy and efficiency of the intelligent switch.
[0114] An embodiment of the present invention further provides an intelligent switch, which includes the intelligent switch self-calibration device in the above embodiment, thereby achieving the function and technical effect of the intelligent switch self-calibration device in the above embodiment.
[0115] The smart switch provided in the embodiment of the present invention can be calibrated using the smart switch self-calibration method in the above embodiment. The smart switch can be a low-voltage smart switch. Exemplarily, the low-voltage smart switch is a low-voltage smart circuit breaker. The smart switch can achieve self-calibration and has high reliability, thereby providing a guarantee for the stable operation of the power system. The smart switch does not require manual calibration, thereby reducing the calibration cost.
[0116] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A self-calibration method for an intelligent switch, characterized in that: The method comprises: Acquire raw data of current sensors in multiple intelligent switches; wherein the raw data includes current values detected by the current sensors at multiple time points; Extracting features from the raw data to obtain a feature set; annotating the feature set according to sampling parameters of the intelligent switch to obtain a data set; establishing and training a switch recognition model according to the data set; Inputting the original data of the current sensor in the intelligent switch to be tested into the switch identification model to obtain the theoretical sampling parameters of the intelligent switch to be tested; The sampling parameters of the intelligent switch to be tested are calibrated based on the theoretical sampling parameters.
2. The intelligent switch self-calibration method according to claim 1, characterized in that: The extracting features from the original data to obtain a feature set, and labeling the feature set according to the sampling parameters of the intelligent switch to obtain a data set, include: Performing feature extraction on the original data to obtain current peak value, mean value, variance and spectrum characteristics of the current value in the original data as the feature set; The sampling parameters of each of the intelligent switches are marked in the corresponding feature set to obtain the data set; wherein, the current sensor in the intelligent switch is a current transformer, and the sampling parameters of the intelligent switch include the current specification of the intelligent switch and the transformation ratio of the current transformer.
3. The intelligent switch self-calibration method according to claim 2, characterized in that: The feature extraction of the original data to obtain the current peak value, mean value, variance and spectrum characteristics of the current value in the original data as the feature set includes: Traversing the original data, finding the maximum current value in the original data as the current peak value; Adding all current values in the raw data and dividing the sum by the number of current values in the raw data to obtain the mean value; Calculating the deviation of the current value at each time point in the original data from the mean value, adding the squares of the deviations and dividing the sum by the number of current values in the original data to obtain the variance; Performing Fourier transform or wavelet transform on the original data to obtain the frequency spectrum characteristics; The current peak value, the mean value, the variance, and the spectrum feature are used as the feature set.
4. The intelligent switch self-calibration method according to claim 1, characterized in that: The step of establishing and training a switch recognition model according to the data set includes: Dividing the data set into a training set, a validation set, and a test set; Establishing a deep learning model, and training the deep learning model by using the training set to obtain an untested switch recognition model; The untested switch identification model is verified and tested by using the verification set and the test set to obtain the verified and tested switch identification model.
5. The intelligent switch self-calibration method according to claim 1, characterized in that: Inputting the original data of the current sensor in the intelligent switch to be tested into the switch identification model to obtain the theoretical sampling parameters of the intelligent switch to be tested includes: Acquire raw data of a current sensor in the intelligent switch to be tested; The original data of the current sensor in the intelligent switch to be tested is input into the switch identification model to obtain the theoretical current specification of the intelligent switch to be tested and the theoretical transformation ratio of the current transformer in the intelligent switch to be tested.
6. The intelligent switch self-calibration method according to claim 5, characterized in that: The step of calibrating the sampling parameters of the intelligent switch to be tested based on the theoretical sampling parameters includes: Based on the theoretical current specification of the intelligent switch to be tested and the theoretical transformation ratio of the current transformer in the intelligent switch to be tested, the control parameters in the intelligent switch to be tested are adjusted so that the sampling parameters of the intelligent switch to be tested are equal to the theoretical sampling parameters.
7. The intelligent switch self-calibration method according to claim 6, characterized in that: After calibrating the sampling parameters of the intelligent switch to be tested based on the theoretical sampling parameters, the method further includes: Obtaining a current sampling value of a current sensor in the intelligent switch to be tested after calibration, and obtaining an actual current value of a circuit in which the intelligent switch to be tested is located through a standard current transformer; If the difference between the current sampling value and the actual current value is less than a preset threshold, it is determined that the calibration of the intelligent switch to be tested is successful; If the difference between the current sampling value and the actual current value is greater than or equal to the preset threshold, the control parameters in the intelligent switch to be tested are adjusted according to the difference between the current sampling value and the actual current value so that the difference between the current sampling value and the actual current value is less than the preset threshold.
8. The intelligent switch self-calibration method according to claim 6, characterized in that: After calibrating the sampling parameters of the intelligent switch to be tested based on the theoretical sampling parameters, the method further includes: The control parameters in the intelligent switch to be tested, the theoretical sampling parameters corresponding to the intelligent switch to be tested, and the calibrated sampling parameters of the intelligent switch to be tested are recorded.
9. An intelligent switch self-calibration device, characterized in that: The intelligent switch self-calibration device is used to execute the intelligent switch self-calibration method according to any one of claims 1 to 8, and the device comprises: An acquisition module, used to acquire raw data of current sensors in multiple intelligent switches; wherein the raw data includes current values detected by the current sensors at multiple time points; A model building module is used to extract features from the raw data to obtain a feature set; annotate the feature set according to the sampling parameters of the intelligent switch to obtain a data set; and establish and train a switch recognition model according to the data set; A parameter determination module, used for inputting the original data of the current sensor in the intelligent switch to be tested into the switch identification model to obtain the theoretical sampling parameters of the intelligent switch to be tested; A calibration module is used to calibrate the sampling parameters of the intelligent switch to be tested based on the theoretical sampling parameters.
10. An intelligent switch, characterized in that: The intelligent switch comprises the intelligent switch self-calibration device as described in claim 9 above.
Citation Information
Patent Citations
Self-calibration method of low-frequency standard current transformer
CN115629350A
Automatic adjusting and calibrating method for current transformer
CN117805716A
Remote self-calibration method for electromagnetic current transformer
CN118914956A
System for self-calibration of a translation error for miniature current transformers
DE112012001418T5