A method for predicting the state of air switches under centralized controller based on K-Means algorithm

By using the K-Means algorithm to analyze the power data in the centralized controller, the problem of difficulty in judging the air switch state under the centralized controller is solved, and high-accurate switching state prediction is achieved.

CN116776176BActive Publication Date: 2025-05-02GUILIN HIVISION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310309675.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2025-05-02
Estimated Expiration
2043-03-28

AI Technical Summary

Technical Problem

The air switch status under the centralized controller cannot be effectively transmitted and reported for communication, resulting in no data or data reporting after turning on the light, and the power consumption of the current and load is easily misjudged.

Method used

Using the method based on the K-Means algorithm, the characteristics of the power data of the centralized controller are standardized and clustered, and the difference in current, power and energy consumption are used for classification and calculation to achieve accurate judgment of the air switch state.

Benefits of technology

This method can accurately predict the air switch state under different centralized controller equipment and load conditions, reduce the error judgment rate, and improve the prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116776176B_ABST
    Figure CN116776176B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for predicting the state of an air switch under a centralized controller based on a K-Means algorithm. This method is based on the fact that a Hall sensor is not installed under the centralized controller in current practical applications. The method takes the power data of the centralized controller and the data acquisition system as the object, and performs separate data normalization on the power data of different centralized controller devices. The K-means clustering algorithm is used to perform classification calculations in combination with current, power, and energy consumption differences, thereby overcoming the problem of achieving accurate prediction under different concentrator devices and different loads. The state prediction of the air switch of the centralized controller is realized based on the K-means clustering algorithm model. As the accumulated sample data of the equipment gradually increases, the model can automatically select the latest data to perform regular incremental training and model optimization on the trained model, thereby enhancing the generalization ability of the model and improving the switch state discrimination rate of the model. The method is simple and easy to implement, and has high engineering application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of computer technology, and in particular to a method for predicting the state of an air switch under a centralized controller based on a K-Means algorithm. Background Art

[0002] The centralized controller is a remote intelligent time-controlled switch with edge computing and cloud communication interface. It not only has the functions of timed switch lights, longitude and latitude sunrise and sunset switch lights, and light intensity control switch lights of traditional time controllers, but also has remote control function. Users can remotely control the switch status and set the switch time of each controller through the cloud management center, effectively reducing the operation and maintenance cost of the equipment system and improving management and maintenance efficiency.

[0003] Centralized controllers are usually installed in distribution cabinets, and different circuit breakers are mounted under the distribution cabinets. Currently, the switch status cannot be transmitted or reported by itself, and can only be judged by current and power consumption when loaded. Some centralized controllers are restricted by the installation environment and weak 4G network signals, resulting in no data or delayed data reporting after turning on the light. In addition, the current and load generated by each concentrator device are inconsistent. At the same time, judging whether the light is turned on on the same day by current and power consumption when loaded is prone to misjudgment. Summary of the invention

[0004] The purpose of the present invention is to solve the deficiencies described in the background technology and provide a method for predicting the state of an air switch under a centralized controller based on a K-Means algorithm to realize the judgment of the state of the air switch.

[0005] The technical solution for achieving the purpose of the present invention is:

[0006] A method for predicting the state of an air switch under a centralized controller based on a K-Means algorithm comprises the following steps:

[0007] 1) The historical operation data of the centralized controller data acquisition system is extracted to the offline data warehouse using the big data analysis engine, and then the voltage, current, power and energy consumption parameters in the historical time window operation time series state data sampled by the offline data warehouse are obtained;

[0008] 2) First, classify the equipment according to its unique name, and calculate the total current, total power, and energy consumption difference of each distribution box; A Indicates the A-phase voltage parameter of a concentrator device, V B Indicates its B phase voltage parameter, V C Indicates its C phase voltage parameter; I A Indicates the A-phase current parameter of a concentrator device, I B Indicates its B phase current parameter, IC represents its C phase current parameter; then:

[0009] P W = |V A * I A | + |V B * I B | + |V C * I C | (1)

[0010] In formula (1), P W Indicates its total active power;

[0011] X E = W T -W T-1 (2)

[0012] In formula (2), W T Represents the current energy consumption parameter, W T-1 Indicates the energy consumption parameters recorded at the last time point, X E Indicates the difference between the current energy consumption parameter and the previous energy consumption parameter;

[0013] I = I A + I B + I C (3)

[0014] In formula (3), I represents the total current;

[0015] X A Represents its current parameter, X W Represents its power parameter, X E Represents the energy consumption parameter. According to the above formulas (1), (2) and (3), the total active power P of a certain device is obtained. W , energy consumption difference X E , total current I; the voltage, current, power and energy consumption parameters are characterized and standardized, and the formula for characteristic standardization is as follows:

[0016] (4)

[0017] In formula (4), P W , X E , I replaces the x Value, where mean represents the average value of each column of data of the device, σ represents the standard deviation of each column (considering the stability of the data), and represents the normalized value of each column feature;

[0018] 3) Dividing the standardized parameters into a training set and a test set; wherein the ratio of the training set to the test set is 8:2.

[0019] 4) Input the training set into the K-Means clustering algorithm model, train the model, and obtain the optimal iteration parameters of the model;

[0020] In step 4), the K-Means clustering algorithm is used to find the classes in the data set and cluster the samples into 2 clusters. The specific steps are as follows:

[0021] 4-1) Randomly select 2 cluster centroids, which means there are 2 clusters c (k) ,in μ 1、 μ 2、 ...、 μ k ∈ R n ;

[0022] 4-2) For each x (i) , calculate its relative position to each centroid μ j The distance x (i) It belongs to the centroid closest to it μ j Cluster c (j) :

[0023] (2)

[0024] 4-3) For each cluster c (j) , recalculate the value of the cluster centroid, the calculation formula is as follows:

[0025] (3)

[0026] 4-4) Use the sum of squared errors to get the optimal number of iterations. The calculation formula is as follows:

[0027] (4)

[0028] Repeat steps 4-2), 4-3) and 4-4) until the K-Means clustering algorithm converges and the optimal number of iterations is obtained;

[0029] 5) Use the test set to test the trained K-Means clustering algorithm model. If the test result is consistent with the expected result, save the trained K-Means clustering algorithm model parameters;

[0030] 6) The program sets a timing strategy to automatically load model parameters every week, selects the latest 30 days of historical data as the training set for training, and saves the model to the distributed file storage system; at the same time, the data to be predicted is loaded and normalized, and then input into the K-Means clustering algorithm model for prediction to obtain the prediction results.

[0031] Compared with the prior art, the present invention has the following beneficial effects:

[0032] 1. Based on the current practical application where the Hall sensor is not installed under the centralized controller, the present invention takes the power data of the centralized controller and the data acquisition system as the object, and provides a method for accurately judging the switch state. For different centralized controller devices, their power data are normalized separately, and the K-means clustering algorithm is used to combine the current, power, and energy difference for classification and calculation, thus overcoming the problem of different concentrator devices and different loads to achieve accurate prediction.

[0033] 2. The present invention realizes the state prediction of the air switch of the centralized controller based on the K-means clustering algorithm model. As the accumulated sample data of the equipment gradually increases, the model can automatically select the latest data to perform regular incremental training and model optimization on the trained model, enhance the generalization ability of the model, and improve the switch state recognition rate of the model. The method is simple and easy to implement, and has high engineering application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 This is a flow chart of a method for predicting the state of an air switch under a centralized controller based on a K-Means algorithm of the present invention;

[0035] Figure 2 A schematic diagram of the operation data information of a centralized controller and data acquisition system equipment;

[0036] Figure 3 A schematic diagram of normalized data information of current, active power and energy consumption of a centralized controller;

[0037] Figure 4 A 3D distribution point diagram of the current, active power and energy consumption data of a centralized controller;

[0038] Figure 5 A schematic diagram of the information of the results of using the K-Means clustering algorithm to predict the status of the air switch for a centralized controller;

[0039] Figure 6This is a display interface diagram of the prediction results of the air switch of a centralized controller;

[0040] Figure 7 The present invention is a flowchart for implementing a method for predicting the status of air switches under a centralized controller based on the K-Means algorithm. Implementation

[0041] The present invention is further described in detail below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.

[0042] A method for predicting the state of the air switch under the centralized controller based on the K-Means algorithm in the above technical solution is adopted. The method flow is as follows: Figure 1 and Figure 7 As shown, the test is carried out in combination with specific data, including the following steps:

[0043] Step 1: Figure 2 The historical operation data of the centralized controller data acquisition system shown is extracted to the offline data warehouse using the big data analysis engine Apache Spark, and then the Spark On Hive technology is used to obtain the voltage, current, power and energy consumption parameters in the historical time window operation time series state data sampled by the offline data warehouse;

[0044] Step 2: Calculate the power parameters of a device, namely, phase A voltage, phase B voltage, phase C voltage, phase A current, phase B current, and phase C current, according to formula (1) to obtain the total active power parameter P W The energy consumption difference X is calculated by using formula (2) for the energy consumption at two adjacent time points. E The total current I is calculated by using formula (3) for the current of phase A, phase B and phase C. The total active power parameter P of a certain device has been calculated. W , energy consumption difference X E , the total current I is used as the input signal for data normalization. Repeat step (2) until the characteristic information of all equipment operating parameters is extracted. For data details, please refer to Figure 3 , Figure 4 .

[0045] Iteration data volume Iterations Error sum of squares 369963 2 6771.501005330078 369963 3 6771.500989119438 369963 4 6771.500989119437 369963 5 6771.500989119438 369963 6 6771.500989119438 369963 7 6771.500989119438

[0046] Step 4: According to the parameter optimization results in the table, regularly vectorize the feature information in step (2) and put it into the K-Means model for training, and save the latest model to the distributed file storage system. Get the latest power data set, repeat step (2) to obtain the power data feature information, and then load the K-Means model to calculate the prediction results.

[0047] Using the above method and data, the prediction results are as follows Figure 5and Figure 6 As shown, through Figure 5 and Figure 6 It can be seen that the method of the present invention can achieve accurate prediction with high precision.

Claims

1. A method for predicting the state of air switches under a centralized controller based on a K-Means algorithm, characterized in that: The steps include: 1) The historical operation data of the centralized controller data acquisition system is extracted to the offline data warehouse using the big data analysis engine, and then the voltage, current, power and energy consumption parameters in the historical time window operation time series state data sampled by the offline data warehouse are obtained; 2) First, classify the equipment according to its unique name, and calculate the total current, total power, and energy consumption difference of each distribution box; A Indicates the A-phase voltage parameter of a concentrator device, V B Indicates its B phase voltage parameter, V C Indicates its C phase voltage parameter; I A Indicates the A-phase current parameter of a concentrator device, I B Indicates its B phase current parameter, I C represents its C phase current parameter; then: P W = |V A *I A | + |V B *I B | + |V C *I C | (1) In formula (1), P W Indicates its total active power; X E = W T - W T-1 (2) In formula (2), W T Represents the current energy consumption parameter, W T-1 Indicates the energy consumption parameters recorded at the last time point, X E Indicates the difference between the current energy consumption parameter and the previous energy consumption parameter; I = I A + I B + I C (3) In formula (3), I represents the total current; X A Represents its current parameter, X W Represents its power parameter, X E Represents the energy consumption parameter. According to the above formulas (1), (2) and (3), the total active power P of a certain device is obtained. W , energy consumption difference X E , total current I; the voltage, current, power and energy consumption parameters are characterized and standardized, and the formula for characteristic standardization is as follows: (4) In formula (4), P W , X E , I replaces the x Value, where mean represents the average value of each column of data of the device, σ represents the standard deviation of each column, and represents the normalized value of each column feature; 3) Divide the standardized parameters into training set and test set; 4) Input the training set into the K-Means clustering algorithm model, train the model, and obtain the optimal iteration parameters of the model; 5) Use the test set to test the trained K-Means clustering algorithm model. If the test result is consistent with the expected result, save the trained K-Means clustering algorithm model parameters; 6) The program sets a timing strategy to automatically load model parameters every week, selects the latest 30 days of historical data as the training set for training, and saves the model to the distributed file storage system; at the same time, the data to be predicted is loaded and normalized, and then input into the K-Means clustering algorithm model for prediction to obtain the prediction results.

2. According to claim 1, a method for predicting the state of an air switch under a centralized controller based on a K-Means algorithm is characterized in that: In step 3), the ratio of the training set to the test set is 8:

2.

3. The method for predicting the state of the air switch under the centralized controller based on the K-Means algorithm according to claim 1 is characterized in that: In step 4), the K-Means clustering algorithm is used to find the classes in the data set and cluster the samples into 2 clusters. The specific steps are as follows: 4-1) Randomly select 2 cluster centroids, which means there are 2 clusters c (k) ,in μ 1、 μ 2、 ...、 μ k ∈ R n ; 4-2) For each x (i) , calculate its relative position to each centroid μ j The distance x (i) It belongs to the centroid closest to it μ j Cluster c (j) : (2) 4-3) For each cluster c (j) , recalculate the value of the cluster centroid, the calculation formula is as follows: (3) 4-4) Use the sum of squared errors to get the optimal number of iterations. The calculation formula is as follows: (4) Repeat steps 4-2), 4-3) and 4-4) until the K-Means clustering algorithm converges and the optimal number of iterations is obtained.

Citation Information

Patent Citations

  • Method and device for determining federated clustering model based on KMeans, equipment and medium

    CN116304771A