A Visualization Method for Classifying the Operating States of AC Contactors

Through the combination of modal similarity measurement and KNN classifier, the real-time visualization problem of AC contactor operating status classification is solved, high-precision online prediction is achieved, and the stability and reliability of the power system are improved.

CN115438744BActive Publication Date: 2025-07-22SHENYANG UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211155941.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-22
Publication Date
2025-07-22
Estimated Expiration
2042-09-22

AI Technical Summary

Technical Problem

The existing AC contactor operating status classification methods have problems such as sensitivity to missing data, long training time, and difficulty in programming implementation, making it difficult to achieve real-time and accurate state prediction and visualization.

Method used

Using a method based on modal similarity measurement and KNN classifier, feature parameters are extracted through time domain analysis, and dimensionality reduction is achieved using PCC method and PCA method to construct a visual model for the operation status classification of AC contactors to realize real-time online monitoring and prediction.

Benefits of technology

Real-time online prediction of the operating status of the AC contactor is realized, which improves the prediction accuracy and system safety and reliability, and avoids the power system paralysis caused by misjudgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115438744B_ABST
    Figure CN115438744B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of AC contactors, and particularly relates to a method for visualizing the classification of the operating states of AC contactors. For the first time, a classification visualization model in machine learning is applied to the problem of predicting the operating states of AC contactors, which can realize real-time online prediction of the operating states of AC contactors, with strong stability and high result accuracy. It includes: Step 1, build an online monitoring system for the operating states of AC contactors, and extract characteristic parameters affecting the operating states of AC contactors by time-domain analysis; Step 2, analyze the correlation of the characteristic parameters by the PCC method and the PCA method to generate a feature matrix after dimensionality reduction; Step 3, generate a characterization curve of the operating states of AC contactors based on modal similarity measurement and divide the state intervals according to the step points; Step 4, construct a classification visualization model of the operating states of AC contactors based on the KNN classifier; Step 5, train the KNN classification visualization model and verify the accuracy of its results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of AC contactors, and particularly relates to a method for visualizing the operation state classification of an AC contactor. Background Art

[0002] As a line control and protection device most widely used in low-voltage switch appliances, an AC contactor is often used to control the on-off of a large-current main circuit. At present, most of the contactors used in China still belong to the second-generation or third-generation electromagnetic AC contactors. As a very representative electromagnetic switch appliance, exploring the mechanism of the change in breaking capacity during the breaking process and related influencing factors, and realizing the dynamic identification of the current to near-future breaking capacity level and future degradation trend of the AC contactor, that is, real-time characterizing its operation state, is a key direction for the current intelligence of AC contactors.

[0003] By on-line monitoring various characteristic parameters that can reflect the real-time operation state of the AC contactor, a large amount of characteristic parameter data can be obtained. Using simple and feasible mathematical means, the huge amount of data is processed for dimensionality reduction, and a visualization model for the operation state classification of the AC contactor is established to accurately master its real-time operation state.

[0004] Machine learning models, especially supervised learning, can help intelligent systems make various judgments based on data, and directly build models for various characteristic parameters of the contactor monitored by sensors. This method does not depend on any physical model and rated parameter model related to the device, so the method based on machine learning has great application prospects for the visualization research of the operation state of switchgear.

[0005] There are many machine learning classification models, among which support vector machines, artificial neural networks, genetic algorithms, etc. are often used for the classification and recognition of the operating states of switching electrical appliances. However, for the problem of selecting a suitable operating state classifier for the data-driven diagnosis of the operating states of switching electrical appliances, a large amount of data processing and the timeliness of working conditions must be given top priority. The existing classification methods have the following defects. For the operating state classification based on support vector machines, this model is sensitive to missing data and only applicable to linear problems, and it cannot achieve an ideal classification effect well. For the operating state classification based on artificial neural networks, this model requires a large number of parameter adjustments and has a long learning time, and it cannot meet the real-time working condition requirements. For the operating state classification based on genetic algorithms, this model is difficult to implement programmatically, has a long training time, and is dependent on the selection of the initial population, and is greatly limited for the problem of the operating state classification of switching electrical appliances. Therefore, the present invention introduces the KNN classification algorithm. The KNN classification algorithm is the nearest neighbor algorithm, and its greatest advantage lies in being simple, intuitive, and easy to implement. The core idea of the KNN classification algorithm is to find the top K samples with the closest Euclidean distance to the measurement sample among the training samples as the similarity, select the K samples with the smallest distance to the sample to be classified as the K nearest neighbors of X, and detect which class most of these K samples belong to, then it is considered that the test sample category belongs to this class of samples. The KNN classifier avoids the high cost of other classification methods that need to start from scratch for retraining. For switching electrical appliances with a service life of hundreds of thousands or even millions of times, it can greatly reduce the training calculation time and the scale of the training set. At the same time, since the KNN method mainly relies on the limited surrounding neighboring samples rather than the method of discriminating the class domain to determine the belonging class, the KNN method is more suitable for the operating state sample set of AC contactors with more intersections or overlaps in the class domain.

[0006] The real-time operating state change of an AC contactor is the result of the superposition of many influencing factors. In addition, its entire operating process can be regarded as a long time series. Moreover, the purpose of visualizing its operating state is to obtain the real-time deterioration degree of the contactor and establish an interaction-friendly visual degradation stage. Therefore, the present invention uses the Euclidean distance between the operating state characteristic mode and the initial mode as the degree to which the AC contactor deviates from the initial state, and then based on the step points of the state representation curve, a clear phased evaluation and diagnosis of the deterioration degree of the entire AC contactor and even the health status of the entire electrical equipment can be obtained. Through the above analysis, the present invention uses a method of combining modal similarity measurement with KNN classification visualization to visually diagnose the real-time operating state of the AC contactor, and can obtain a relatively accurate classification visualization effect. Summary of the Invention

[0007] The present invention aims at the defects existing in the prior art and provides a visualization method for classifying the operating states of AC contactors. It is a visualization method for classifying the operating states of AC contactors based on the measurement of modal similarity and the KNN classifier.

[0008] To achieve the above object, the present invention adopts the following technical solutions, including:

[0009] Step 1: Build an on-line monitoring system for the operating states of AC contactors, and extract the characteristic parameters affecting the operating states of AC contactors by time-domain analysis.

[0010] Step 2: Analyze the correlation of the characteristic parameters by the PCC method and the PCA method to generate a feature matrix after dimensionality reduction.

[0011] Step 3: Generate a characterization curve for the operating states of AC contactors based on modal similarity measurement, and divide the state intervals according to the step points.

[0012] Step 4: Build a visualization model for classifying the operating states of AC contactors based on the KNN classifier.

[0013] Step 5: Train the KNN classification visualization model and verify the accuracy of its results.

[0014] Further, in Step 1, the building of the on-line monitoring system for the operating states of AC contactors and the extraction of the characteristic parameters affecting the operating states of AC contactors by time-domain analysis include: extracting the arcing time, arcing energy, average arcing power, release time, bounce time, opening phase angle, closing time, contact resistance, closing phase angle, contact opening speed, contact collision speed, contact overtravel and contact opening distance from the three-phase contact voltages and currents, coil voltages and currents, and vibration signals of the contact system during the breaking and closing processes of the AC contactor.

[0015] Further, in Step 2, the analysis of the correlation of the characteristic parameters by the PCC method and the PCA method to generate a feature matrix after dimensionality reduction includes:

[0016] Step 2.1: Pearson correlation analysis of the characteristic parameters.

[0017] After adopting the pearson correlation analysis, the result is taken as the absolute value; N low-correlation parameters are retained after retaining the arcing power; at the same time, the N characteristic parameters are normalized.

[0018] Normalization formula:

[0019]

[0020] Among them, x max , x min are respectively the maximum value and the minimum value of the characteristic parameter; xt is the actual value at time t; is the normalized value at time t, thus obtaining a feature matrix that can be used for dimensionality reduction by principal component analysis.

[0021] Step 2.2: Feature dimensionality reduction by principal component analysis method.

[0022] Use PCA to reduce the dimensionality of the dataset X = {x1, x2, x3,..., x n}, and the N-dimensional feature matrix is simplified to the first M principal components that can retain 95% of the contribution of the original features; where x i (i = 1, 2,..., n) is the N-dimensional feature parameter of a certain operating state of the AC contactor; that is:

[0023] A. Decentralization, that is, each eigenvalue is subtracted from its respective average value.

[0024] B. Calculate the covariance matrix

[0025] C. Use the eigenvalue decomposition method to find the eigenvalues and eigenvectors of the covariance matrix of.

[0026] D. Sort the eigenvalues from largest to smallest, select the largest K of them, and then use the corresponding K eigenvectors as vectors to form a feature matrix P respectively.

[0027] E. Convert the data into a new space constructed by K eigenvectors, that is, Y = PX.

[0028] Obtain the feature matrix as the input of the classification visualization model.

[0029] Furthermore, in step 3, the generation of the operating state characterization curve of the AC contactor based on modal similarity measurement and the division of the state interval according to the step points include:

[0030] Step 3.1: Construct the modal similarity measurement characterization curve of the operating state.

[0031] Use the first M principal components that retain 95% of the contribution of the original features as the modal basic quantities for describing the state curve on the time axis. At the same time, use the standardized Euclidean distance between the modal basic quantities of progressive time points and the modal basic quantity of the ground state in time series as the characterization form for measuring the operating state of the AC contactor.

[0032] For two N-dimensional vectors X1 = (x 11 , x 12 ,..., x 1n ) and X2 = (x 21 , x 22 ,..., x2n ) Standardized Euclidean distance formula.

[0033]

[0034] Where d 12 is the standardized Euclidean distance between X1 and X2, and s k is the standard deviation of the k-th principal component, and x 1k and x 2k are the k-th principal components in X1 and X2 respectively.

[0035] Take the change amount between the distance metric value of the operating state characteristic matrix of the AC contactor after each opening and the distance metric of the initial opening as the dependent variable, and the number of openings as the independent variable. After smoothing the obtained operating state curve, the operating state characterization curve is obtained.

[0036] Step 3.2, Division of operating state intervals.

[0037] Divide the operating state discrimination points of the AC contactor at the points where the similarity distance metric changes: Define the first operating stage before the first step of the similarity distance metric of the operating state of the AC contactor, define the second operating stage from the first step to the second step of the similarity distance metric of the operating state of the AC contactor, and define the third operating stage from the second step of the similarity distance metric of the operating state of the AC contactor to the complete failure of the AC contactor.

[0038] Furthermore, in step 4, the construction of the visualization model for classifying the operating state of the AC contactor based on the KNN classifier includes.

[0039] (1) Determine the input and output of the model.

[0040] Input: Dataset P = {(X1, y1), (X2, y2),..., (X n , y n )}, where X i = {x1, x2,..., x6} is the actual feature vector, and y i = 0, 1, 2 are the actual operating state labels.

[0041] Output: The category to which X i = {x1, x2,..., x6} belongs, that is, the operating state stage.

[0042] (2) Select the parameter K.

[0043] The K value refers to making a decision based on the K nearest neighbor "data samples" of the test sample when making a decision; the selection of the K value generally uses the cross-validation method; the cross-validation method includes: dividing the data set into a training set and a test set; training the model using the training set; testing the classification accuracy of the model using the test set; and selecting the model with the highest classification accuracy.

[0044] (3) Calculate the distance between the unknown instance and all known instances.

[0045] If it is specified as the Euclidean distance metric in Minkowski, then the parameter P = 2.

[0046] (4) Select the K nearest known instances, and according to the voting rule of the minority obeying the majority, classify the unknown instance into the category with the largest number among the K nearest neighbor samples.

[0047] (5) Realize classification visualization.

[0048] The classification visualization model includes: First, define the class symbols, class colors, and decision functions in the visualization function; Second, determine the decision boundary according to the maximum and minimum values of the first two principal component values; Finally, visually plot the classification results in the decision graph.

[0049] Furthermore, in step 5, the training of the KNN classification visualization model and the verification of its result accuracy include: using a random function to train the built KNN classification visualization model with 70% of the feature matrix in the time series as the training set and 30% as the test set, and outputting the scatter plot of the state interval distribution and the relevant accuracy to verify the accuracy of the model.

[0050] Even further, there are four situations in classification.

[0051] If an instance is a positive class and is predicted as a positive class, it is a true positive class TP.

[0052] If an instance is a positive class but is predicted as a negative class, it is a false negative class FN.

[0053] If an instance is a negative class but is predicted as a positive class, it is a false positive class FP.

[0054] If an instance is a negative class and is predicted as a negative class, it is a true negative class TN.

[0055] Then:

[0056] (1) Accuracy rate:

[0057]

[0058] (2) Precision:

[0059]

[0060] (3) Recall rate:

[0061]

[0062] (4) F1 mechanism scoring:

[0063]

[0064] Compared with the prior art, the present invention has beneficial effects.

[0065] The present invention adopts an AC contactor operating state characterization and division method based on modal similarity measurement, which is more suitable for dealing with problems in the big data era than qualitative state division. In traditional state division methods, almost all features need to be re-determined by experts, while state characterization can learn features from data by itself. When solving problems, traditional state division usually divides the entire life process into several stages based on intuitive perceptual phenomena, and then recombines them after solving them one by one, while state characterization is a one-time, end-to-end solution.

[0066] The present invention adopts the KNN classification visualization model in machine learning. The KNN classification visualization model is a machine learning method with a very mature theory and simple ideas, which can handle nonlinear problems in classification problems. Compared with other machine learning methods, since the KNN method mainly relies on limited neighboring samples around, rather than relying on the method of distinguishing the class domain to determine the category, the KNN method is more suitable than other methods for the sample set to be classified with more cross-domain or overlapped class domains. In addition, the classification algorithm is more suitable for automatic classification of class domains with large sample capacity, and has no assumptions on the data, high accuracy, and is insensitive to abnormal points.

[0067] The present invention applies the KNN classification visualization model to the problem of visualization of the operating status of AC contactors for the first time. The KNN classification visualization model is generally used in the prediction of time series problems such as stock market forecasts and weather forecasts. The present invention first regards the entire life cycle of the AC contactor as a time series, takes the number of contactor disconnections as a label, and constructs an AC contactor operating status characterization and interval division model. Secondly, the first two principal components of the characteristic parameters are numerical boundaries, and a KNN classification visualization model is constructed. The KNN model is supervised and trained. The trained model only needs to input the characteristic matrix of the contactor's online working data to obtain its real-time operating status stage, thereby realizing online real-time prediction of the AC contactor's operating status, solving the problems of low prediction accuracy and difficulty in realizing online prediction in traditional methods.

[0068] In summary, the present invention first applies the classification visualization model in machine learning to the problem of predicting the operating state of AC contactors, which can achieve real-time online prediction of the operating state of AC contactors, with strong stability and high result accuracy. It greatly avoids the paralysis of the entire power system caused by misjudging the operating state of AC contactors, and significantly improves the safety and reliability of the power system. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] The present invention will be further described below in conjunction with the drawings and specific embodiments. The protection scope of the present invention is not limited to the description of the following content.

[0070] Figure 1 It is a schematic block diagram of the online monitoring system for AC contactors.

[0071] Figure 2 It is the breaking process of the AC contactor.

[0072] Figure 3 It is the closing process of the AC contactor.

[0073] Figure 4 It is the vibration signal during the closing-breaking process of the AC contactor.

[0074] Figure 5 It is the standard diagram of the correlation degree.

[0075] Figure 6 It is an example diagram of the KNN classification visualization output interface. SPECIFIC EMBODIMENTS

[0076] As Figure 1-6As shown in the specific embodiment, it includes: building an online monitoring system for the operating state of an AC contactor, obtaining the voltage and current waveforms of the three-phase main contacts and the exciting coil of the contactor during its operation, as well as the vibration waveform of the contact system, and extracting the original characteristic parameters that affect the operating state of the AC contactor from the waveforms; analyzing the correlation between the obtained original characteristic parameters by using the Pearson correlation coefficient method, removing the strongly correlated original characteristic parameters as the effective characteristic matrix representing the operating state of the contactor, using the principal component analysis method to reduce the dimension and simplify the effective characteristic matrix after normalization preprocessing, and using the principal components with a contribution rate to the original operating characteristics exceeding 95% as the characteristic matrix for classification; calculating the standard Euclidean distance of the characteristic matrix in the time series at each opening to characterize the operating state curve of the AC contactor, and dividing 2 - 3 operating state stages according to the step points of the operating state curve; building a classification visualization model for the operating state of the AC contactor based on the machine learning KNN classifier; performing model training, randomly selecting 70% of the characteristic matrix as the training set to train the model, and using the remaining 30% as the test set to verify the accuracy of the model. The present invention can realize the real-time visualization of the operating state of the AC contactor, more intuitively display the life stage of the contactor, and solve the problem that the traditional method can only qualitatively analyze the real-time operating state of the AC contactor. The staff can accurately obtain the real-time operating state of the AC contactor in the circuit system by using this method, take measures for the nodes close to failure, prevent the paralysis of the entire circuit system caused by the contactor failure, and effectively improve the stability and reliability of the operation of the power system.

[0077] Step 1: Build an online monitoring system for the operating state of the AC contactor, extract the original characteristic parameters that affect the operating state of the AC contactor, analyze the correlation between the original characteristics, and obtain the characteristic matrix by normalizing the effective characteristic matrix, and perform principal component analysis on the characteristic matrix to further simplify the characteristic matrix input into the classification visualization model; where:

[0078] Step 1.1: Build an online monitoring system for the operating state of the AC contactor.

[0079] The principle block diagram of the online monitoring system is as Figure 1 shown. The monitoring system uses a PXI high-speed embedded controller of the US National Instruments Corporation in cooperation with an X-series USB6356 high-speed synchronous data acquisition card. The PXI high-speed embedded controller sends on-off signals to the single-chip microcomputer control board through the interaction interface, and the single-chip microcomputer control board controls the solid-state relay to realize the on-off of the contactor coil; the data acquisition card collects nine signals after being measured by high-precision sensors and conditioned by the conditioning circuit, which are the voltage signals and current signals of the three-phase main contacts of the AC contactor, the voltage signals and current signals of the exciting coil, and the vibration signal of the contact system; the collected data is displayed as real-time waveforms on the interaction interface of the LABVIEW software supporting the PXI controller.

[0080] Step 1.2, extract the original feature parameters.

[0081] Analysis Figure 2 During the breaking process of the AC contactor, the arcing time, arcing energy, average arcing power, and opening phase angle characteristic parameters can be extracted. Their definitions and calculation methods are as follows.

[0082] (1) Arcing time: The time interval from the instant when the arc is generated to the instant when the arc finally extinguishes. For a certain phase contact of the contactor, let the moment when the arc is generated be t a , and the moment when the arc finally extinguishes be recorded as t b , then the arcing time t arc of this phase can be expressed as.

[0083] t arc = t b - t a .

[0084] (2) Arcing energy: The arcing energy E generated by one arc can be expressed as.

[0085]

[0086] In the formula, t a , t b are the starting and extinguishing moments of the arc, u(t) and i(t) are the voltage value and current value of the contact. In practice, the collected voltage and current signals are discrete, so the discretized processing of the arcing energy is expressed as.

[0087]

[0088] In the formula, Δt is the sampling point time interval, and f s is the sampling rate.

[0089] (3) Average arcing power: The average arcing power refers to the average power of the arc during the arcing period.

[0090]

[0091] In the formula, N is the number of sampling points during the arcing period.

[0092] (4) Opening phase angle: The opening phase angle is the ratio of the closing time of the first breaking contact to the time C (constant) corresponding to 1 / 2 cycle of the contact voltage of this phase. The opening phase angle α f is expressed as.

[0093]

[0094] Analysis Figure 3The bounce time, closing time, contact resistance, and closing phase angle can be extracted from the closing process of the AC contactor. Their definitions and calculation methods are as follows.

[0095] (5) Bounce time: When the contacts close, there is a bounce. The time from the first contact of the moving and static contacts to the stable closing of the contacts. Denote the moment of the first contact of the moving and static contacts as t e , and the moment when the two contacts are stably closed as t f , then the bounce time is denoted as t t and can be expressed as.

[0096] t t = t f - t e .

[0097] (6) Closing time: The closing time refers to the time from energizing the coil to the first contact of the moving and static contacts. Denote the moment of energizing the coil as t d , and the moment of the first contact of the moving and static contacts as t e , then the closing time is denoted as t x and can be expressed as.

[0098] t x = t e - t d .

[0099] (7) Contact resistance: When the AC contactor is connected to the circuit and energized stably, there is a contact resistance between the moving and static contacts. The definition and calculation method are as follows.

[0100]

[0101] In the formula, u n is the contact voltage in one cycle when the two contacts are stably closed and energized, i n is the magnitude of the contact current in the same cycle, and N is the number of points collected in the cycle.

[0102] (8) Closing phase angle: The closing phase angle is the ratio of the closing time of the first closing phase to the time C (constant) corresponding to 1 / 2 cycle of the contact voltage of this phase. The closing phase angle α c is expressed as.

[0103]

[0104] Analysis Figure 4 The opening speed of the contact system, the contact collision speed, the overtravel of the A-phase contact, and the opening distance of the A-phase contact can be extracted from the opening-segment vibration signal of the AC contactor. Their definitions and calculation methods are as follows:

[0105] (9) Contact opening speed: The contact opening speed refers to the speed of the main contact at the moment when the main contact arcs. The arcing time of the main contact is Tqh Then the opening speed V fz can be expressed as follows.

[0106] V fz = V(T qh ).

[0107] (10) Contact collision speed: The contact collision speed refers to the speed of the moving contact of the main circuit at the moment of the first collision between the moving contact and the static contact. The first contact time of the contacts is T cp , then the contact collision speed V cp can be expressed as follows.

[0108] V cp = V(T cp ).

[0109] (11) Contact overtravel: The overtravel refers to the displacement of the contacts from the moment when the moving and static contacts of the main circuit first come into contact until the contacts are stably closed. The first contact time of the contacts is T cp , and the time when the contacts are stably closed is T wb , then the overtravel can be expressed as follows.

[0110]

[0111] (12) Contact opening distance: The opening distance refers to the displacement of the contacts from the moment when the main contact starts to arc until the end of the sampling time. The arcing time of the main contact is T qh , and the sampling end time is T end , then the opening distance L kj can be expressed as follows.

[0112]

[0113] Step 2: Analyze the correlation of feature parameters using the PCC method and the PCA method to generate a feature matrix after dimensionality reduction.

[0114] Among them:

[0115] Step 2.1: Analyze the correlation of the original features and obtain the normalized feature matrix.

[0116] There may be overlapping implicit information among the feature parameters obtained from the online monitoring system. Therefore, it is necessary to analyze their correlation. After performing the correlation analysis of the original feature parameters using the most common Pearson correlation analysis method, a correlation heat map is drawn. Keep one of the parameters with strong correlation with a correlation coefficient above 0.8.

[0117] The Pearson correlation coefficient can calculate the correlation between two parameters X and Y. The Pearson correlation coefficient is widely used to measure the degree of correlation between two variables, and its value is between -1 and 1. The calculation method is as follows.

[0118] Let the two sets of characteristic parameters be X{x1, x2, …, x n}, Y{y1, y2, …, y n}. Their means are respectively

[0119]

[0120] The covariance is:

[0121]

[0122] Then the Pearson correlation coefficient is:

[0123]

[0124] Where σ X and σ Y are the standard deviations of X and Y respectively, and their expressions are respectively:

[0125]

[0126]

[0127] The value of the Pearson correlation coefficient is between -1 and 1, and its correlation standard is as Figure 5 shown.

[0128] At the same time, the dimensions of the N retained characteristic parameters are not consistent, so they need to be normalized.

[0129] Normalization formula:

[0130]

[0131] In this way, the feature matrix that can be input into the classification visualization model is obtained.

[0132] Step 2.2, use principal component analysis to obtain the feature matrix input into the classification visualization model.

[0133] Use the principal component analysis method (PCA) to simplify the dataset X = {x1, x2, x3,..., x n}, an N-dimensional feature matrix, into the first M principal components that can retain 95% of the contribution of the original features.

[0134] (1) Decentralize, that is, subtract each eigenvalue from its respective average value.

[0135] (2) Calculate the covariance matrix

[0136] (3) Use the eigenvalue decomposition method to find the covariance matrix Eigenvalues and eigenvectors.

[0137] (4) Sort the eigenvalues from largest to smallest, select the largest K of them, and then use the corresponding K eigenvectors as vectors to form the eigenmatrix P.

[0138] (5) Convert the data into the new space constructed by K eigenvectors, i.e., Y = PX.

[0139] In this way, we obtain the eigenmatrix that can be used as the input of the classification visualization model.

[0140] Step 3: Generate the operating state characterization curve of the AC contactor based on modal similarity measurement and divide the state interval according to the step points, where:

[0141] Step 3.1: Characterization of the operating state of the AC contactor based on modal similarity.

[0142] Use the first M principal components that retain 95% contribution of the original features as the basic quantities describing the state curve on the time axis. At the same time, use the standardized Euclidean distance between the basic quantities of the progressive time points and the basic quantity of the base state in time series as the characterization form for measuring the operating state of the AC contactor.

[0143] For two N-dimensional vectors X1 = (x 11 , x 12 ,..., x 1n ) and X2 = (x 21 , x 22 ,..., x 2n ) standardized Euclidean distance formula.

[0144]

[0145] In the formula, d 12 is the standardized Euclidean distance between X1 and X2, s k is the standard deviation of the k-th principal component, and x 1k and x 2k are the k-th principal components in X1 and X2 respectively.

[0146] Take the change amount between the distance measurement value of the operating state eigenmatrix of the AC contactor after each opening and the distance measurement of the initial opening as the dependent variable, and the number of openings as the independent variable. After smoothing the obtained operating state curve, the operating state characterization curve is obtained.

[0147] Step 3.2: Division of the operating state interval.

[0148] Since the operating state of the AC contactor is characterized by the modal similarity distance metric, the mutation of the distance must be caused by the change in the internal state of the AC contactor, especially the state of the contact system of the contactor. Based on this, the present invention divides the operating state division point of the AC contactor at the point where the similarity distance metric mutates. By analyzing the operating characterization curve of the AC contactor based on the modal similarity metric and the change characteristics of the original characteristic parameters, the step point of the modal similarity distance metric value during the opening and closing process of the contactor is found. Thus, the first stage before the first step of the modal similarity distance metric of the operating state of the AC contactor is defined as the first operating stage, in which the distance metric value shows a small growth rate and slight fluctuations; the stage from the first step to the second step of the modal similarity distance metric of the operating state of the AC contactor is defined as the second operating stage, in which the distance metric value still shows an increasing trend and the fluctuations are larger than those in the first operating stage; the stage from the second step of the modal similarity distance metric of the operating state of the AC contactor to the complete failure of the AC contactor is defined as the third operating stage, in which the distance metric value increases rapidly and the fluctuations are greater than those in the previous two stages

[0149] Step 4: Construct a classification visualization model based on the machine learning KNN classifier.

[0150] In the previous work of the present invention, a detailed study was conducted on the operating state classification method based on machine learning. Through comparative analysis, for the visualization problem of the operating state classification and recognition of switching electrical appliances, the KNN method has the best effect and the highest classification accuracy, so this method is adopted hereby.

[0151] (6) Determine the input and output of the model.

[0152] Input: Dataset P = {(X1, y1), (X2, y2),..., (X n , y n )}, where X i = {x1, x2,..., x6} is the actual feature vector, and y i = 0, 1, 2 are the actual operating state labels.

[0153] Output: The category to which X i = {x1, x2,..., x6} belongs, that is, the operating state stage.

[0154] (7) Select the parameter K.

[0155] The selection of the K value is the key to the KNN algorithm, and the selection of the K value has a significant impact on the result of the nearest neighbor algorithm. The specific meaning of the K value is that when making a decision, it is based on the K nearest neighbor "data samples" of the test sample for decision-making. The selection of the K value generally uses the cross-validation method. The steps of the cross-validation method are as follows: Divide the dataset into a training set and a test set; Use the training set to train the model; Use the test set to test the classification accuracy of the model; Select the model with the maximum classification accuracy.

[0156] (8) Calculate the distances between the unknown instance and all known instances.

[0157] If it is specified as the Euclidean distance metric in Minkowski, then the parameter P = 2.

[0158] (9) Select the K nearest known instances. According to the majority-voting rule, classify the unknown instance into the category with the largest number among the K nearest neighbor samples.

[0159] (10) Realize the classification visualization.

[0160] The realization of the classification visualization model has the following steps: First, define the class symbols, class colors, and decision functions in the visualization function; second, determine the decision boundary according to the maximum and minimum values of the first two principal component values; finally, visually plot the classification results in the decision graph. The example diagram of the output result is as Figure 6 shown.

[0161] Step 5: Train the KNN classification visualization model of the AC contactor and verify its accuracy, where:

[0162] Step 5.1: Divide the training set and the test set for training.

[0163] The function used for dividing the training set and the test set is:

[0164] (x1, y1, x2, y2) = train_test_split(X, y, test_size = 0.3, random_state = 1).

[0165] This function can randomly divide the sample data set into a training set and a test set with a specified ratio, ensuring the accuracy and effectiveness of the training.

[0166] Step 5.2: Calculate the overall accuracy (Accuracy), precision, recall, and F1 score.

[0167] In the classification, there are the following four situations: If an instance is a positive class and is predicted as a positive class, it is a true positive (TP); if an instance is a positive class but is predicted as a negative class, it is a false negative (FN); if an instance is a negative class but is predicted as a positive class, it is a false positive (FP); if an instance is a negative class and is predicted as a negative class, it is a true negative (TN). Thus, there is:

[0168] Accuracy:

[0169]

[0170] Precision:

[0171]

[0172] Recall:

[0173]

[0174] F1 Score:

[0175]

[0176] Specifically:

[0177] (1) Construct a representation curve of the operating state based on modal similarity measurement.

[0178] Figure 2 Waveform diagrams of the contact voltage, contact current, and contactor coil voltage during the opening process of the AC contactor. It can be seen from the figure that the contactor coil loses power at point c, and the electromagnetic suction of the coil rapidly decreases, causing the contacts to separate. At point a, the voltage between the moving and static contacts suddenly rises, and an arc is generated between the two contacts. As the moving contact separates, the arc is gradually elongated. According to the principle of AC arc extinction, the arc extinguishes at the zero crossing. It can be seen from the figure that the arc finally extinguishes at point b, and the current between the two contacts is 0 at this time, realizing the circuit cut-off. The arc burning time, arc energy, average arc power, release time, and opening phase angle characteristic parameters can be extracted from it.

[0179] Figure 3 Waveform diagrams of the contact voltage, contact current, and coil current during the closing process of the AC contactor. Since the value of the coil current is too small compared to the other two curves and is not easy to observe, it is magnified 100 times. It can be seen from the figure that the contactor coil is energized at point d, and the electromagnetic suction gradually increases. At point e, a current appears between the contacts, indicating that the moving and static contacts first come into contact and conduct electricity. It can be seen from the figure that the voltage between the contacts fluctuates after point e, which is caused by the contact bounce during closing. After point f, the contact voltage is stable, the moving and static contacts are stably attracted, and the main circuit is connected and conducts electricity. The bounce time, closing time, closing phase angle, and contact resistance can be extracted from it.

[0180] Figure 4The vibration signal measured by the acceleration sensor during the closing-segmentation process of the AC contactor. First, the host computer issues a closing command, and the coil is energized. The contact system jitters until the first closing occurs. At this time, the moving and static contacts collide and bounce, gradually closing smoothly and reaching a stable closing state under the holding voltage. Again, the host computer issues a breaking command, and the moving contact obtains the acceleration in the breaking direction until it can complete the breaking. There is a certain bouncing phenomenon of the moving contact under the action of inertia.

[0181] Through correlation analysis, based on Figure 5 the standard diagram of the correlation degree for feature selection to obtain the effective feature matrix. Perform principal component analysis on the normalized effective feature matrix, and use the principal components with a contribution rate greater than 95% to obtain the feature matrix that can be input into the model. Calculate the characterization curve of the operating state of the AC contactor, and then the operating state stage can be divided.

[0182] (2) Build a KNN classification visualization model.

[0183] The visualization model for classifying the operating state of the AC contactor based on the KNN classifier built in the present invention has the first M principal components retaining the feature information as the input. The nearest neighbor coefficient K is selected through cross-validation to obtain the K value that can achieve the highest classification accuracy. The Minkowski coefficient P = 2, and the output is an interval distribution scatter plot with the first two principal components as the horizontal and vertical coordinates. The example diagram of the output result is as Figure 6 shown.

[0184] (3) Train the model and output the ideal result.

[0185] Use a random function to train the built KNN classification visualization model with 70% of the feature matrix in the time series as the training set and 30% as the test set, and output the interval distribution scatter plot of the state and the relevant accuracy to verify the accuracy of the model.

[0186] In solving practical problems, only need to input the real-time operation data of the AC contactor into the model after the above data processing of the present invention, and the real-time operating state with specific labels and actual state meanings can be obtained.

[0187] It can be understood that the above specific description of the present invention is only for explaining the present invention and is not limited to the technical solutions described in the embodiments of the present invention. Those of ordinary skill in the art should understand that the present invention can still be modified or equivalently replaced to achieve the same technical effects; as long as it meets the usage requirements, it is within the protection scope of the present invention.

Claims

1. A visualization method for classifying the operating states of AC contactors, characterized in that: Step 1: Build an online monitoring system for the operating states of AC contactors, and use time-domain analysis to extract the characteristic parameters affecting the operating states of AC contactors; Step 2: Analyze the correlation of the characteristic parameters by using the PCC method and the PCA method to generate a reduced-dimensional characteristic matrix; Step 3: Generate a representation curve for the operating states of AC contactors based on modal similarity measurement and divide the state intervals according to the step points; Step 4: Construct a visualization model for classifying the operating states of AC contactors based on the KNN classifier; Step 5: Train the KNN classification visualization model and verify the accuracy of its results; Step 3 includes: Step 3.1: Construct a representation curve for modal similarity measurement of the operating states; Use the first M principal components that retain 95% of the contribution of the original features as the modal basic quantities for describing the state curve on the time axis. At the same time, use the standardized Euclidean distance between the modal basic quantities of progressive time points and the modal basic quantity of the base state in time series as the representation form for measuring the operating states of AC contactors; For two N-dimensional vectors X1 = (x 11 , x 12 ,..., x 1n ) and X2 = (x 21 , x 22 ,..., x 2n ), the standardized Euclidean distance formula is: where d 12 is the standardized Euclidean distance between X1 and X2, s k is the standard deviation of the k-th principal component, x 1k and x 2k are the k-th principal components in X1 and X2, respectively; Take the change amount between the distance measurement value of the operating state characteristic matrix after each opening and closing of the AC contactor and the distance measurement at the first opening as the dependent variable, and the number of opening and closing times as the independent variable, and smooth the obtained operating state curve to obtain the operating state representation curve; Step 3.2: Division of the operating state intervals; Divide the distinguishing points of the operating states of the AC contactor at the points where the similarity distance measurement changes suddenly: Define the first time before the modal similarity distance measurement of the operating state of the AC contactor as the first operating stage, define the period from the first step of the modal similarity distance measurement of the operating state of the AC contactor to the second step as the second operating stage, and define the period from the second step of the modal similarity distance measurement of the operating state of the AC contactor to the complete failure of the AC contactor as the third operating stage; Step 4 includes: (1) Determine the input and output of the model: Input: Dataset P = {(X1, y1), (X2, y2),..., (X n , y n )}, where X i = {x1, x2,..., x6} is the actual feature vector, and y i = 0, 1, 2 are the actual operating status labels; Output: X i = the category to which {x1, x2,..., x6} belongs, i.e., the operating state phase; (2) Select the parameter K: The value of K refers to making a decision judgment based on the K nearest neighbor "data samples" of the test sample when making a decision; The selection of the value of K generally uses the cross-validation method; The cross-validation method includes: dividing the data set into a training set and a test set; training the model with the training set; testing the classification accuracy rate of the model with the test set; selecting the model with the maximum classification accuracy rate; (3) Calculate the distances between the unknown instance and all known instances: Specify the Euclidean distance metric in Minkowski, then the parameter P = 2; (4) Select the nearest K known instances, and according to the voting rule of the minority obeying the majority, classify the unknown instance into the category with the largest number among the K nearest neighbor samples; (5) Realization of classification visualization: The classification visualization model includes: First, define the category symbols, category colors, and decision functions in the visualization function; Secondly, determine the decision boundary according to the maximum and minimum values of the first two principal component values; Finally, visually plot the classification results in the decision graph.

2. A visualization method for classifying the operating states of an AC contactor according to claim 1, characterized in that: In Step 1, the building of the online monitoring system for the operating states of AC contactors and the use of time-domain analysis to extract the characteristic parameters affecting the operating states of AC contactors include: Extract the arcing time, arcing energy, average arcing power, release time, bounce time, opening phase angle, closing time, contact resistance, closing phase angle, contact opening speed, contact collision speed, contact overtravel, and contact opening distance from the three-phase contact voltages and currents, coil voltages and currents, and vibration signals of the contact system during the opening and closing processes of the AC contactor.

3. A visualization method for classifying the operating states of an AC contactor according to claim 1, characterized in that: In step 2, the analysis of the correlation of feature parameters using the PCC method and the PCA method to generate the feature matrix after dimensionality reduction includes: Step 2.1: Pearson correlation analysis of feature parameters: After performing pearson correlation analysis, the absolute value of the result is taken; N parameters with low correlation are retained after the arcing power; at the same time, the N feature parameters are normalized; Normalization formula: where x max , x min are the maximum and minimum values of the characteristic parameter respectively; x t is the actual value at time t; is the normalized value at time t; Step 2.2: Feature dimensionality reduction by principal component analysis: Use PCA to reduce the dimensionality of the dataset X = {x1, x2, x3,..., x n}, and simplify the N-dimensional feature matrix to the first M principal components that can retain 95% of the contribution of the original features; where x i (i = 1, 2,..., n) is the N-dimensional characteristic parameter of a certain operating state of the AC contactor; that is: A. Decentralization, that is, each eigenvalue is subtracted from its respective average value; B. Calculate the covariance matrix C. Use the eigenvalue decomposition method to find the eigenvalues and eigenvectors of the covariance matrix ; D. Sort the eigenvalues from largest to smallest, select the largest K of them, and then use the corresponding K eigenvectors as vectors to form the feature matrix P; E. Convert the data into a new space constructed by K eigenvectors, that is, Y = PX; Obtain the feature matrix as the input of the classification visualization model.

4. A visualization method for classifying the operating states of an AC contactor according to claim 1, characterized in that: In step 5, the training of the KNN classification visualization model and the verification of its result accuracy include: Using a random function, 70% of the feature matrix in the time series is used as the training set, and 30% is used as the test set to train the built KNN classification visualization model, and output the scatter plot of the state interval distribution and the relevant accuracy to verify the accuracy of the model.

5. A visualization method for classifying the operating states of an AC contactor according to claim 4, characterized in that: There are four situations in classification: If an instance is a positive class and is predicted as a positive class, it is a true positive class TP; If an instance is a positive class but is predicted as a negative class, it is a false negative class FN; If an instance is a negative class but is predicted as a positive class, it is a false positive class FP; If an instance is a negative class and is predicted as a negative class, it is a true negative class TN; Then: (1) Accuracy rate: (2) Precision: (3) Recall rate: (4) F1 mechanism score: