Feature selection improves ac contactor electrical life prediction method for gated recurrent unit

By improving the GRU neural network and feature selection method, the gradient vanishing problem in the prediction of AC contactor electrical life was solved, achieving higher prediction accuracy and stability, and promoting the intelligent development of power systems.

CN115130767BActive Publication Date: 2025-10-21SHENYANG UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210793814.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-07
Publication Date
2025-10-21
Estimated Expiration
2042-07-07

AI Technical Summary

Technical Problem

Existing deep learning methods suffer from the vanishing gradient problem in AC contactor electrical life prediction, making it difficult to effectively capture dependencies with large time step distances in time series, resulting in insufficient prediction accuracy.

Method used

An improved gated recurrent unit (GRU) neural network is used, combined with feature selection and correlation analysis, to construct an AC contactor electrical life prediction model. The prediction accuracy is improved by extracting the optimal feature subset and training it with GRU.

Benefits of technology

This improves the accuracy and stability of predicting the remaining electrical life of AC contactors, promotes the intelligent development of AC contactors, and enhances the safety and reliability of power systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115130767B_ABST
    Figure CN115130767B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of AC contactors, and particularly relates to an AC contactor electrical life prediction method of a feature selection improved gate recurrent unit. The method can effectively represent the optimal feature subset of the degradation trend of the AC contactor to predict the residual electrical life of the AC contactor and improve the prediction accuracy. The method comprises the following steps: step 1, collecting contactor voltage and current signals; step 2, extracting feature parameters affecting the electrical life of the AC contactor from the signals; step 3, performing NCA feature importance analysis on the feature parameters; step 4, performing Spearman correlation analysis on the feature parameters; step 5, selecting an optimal feature subset, performing normalization processing, and then constructing and dividing a data set; step 6, constructing a GRU residual electrical life prediction model of the AC contactor; step 7, training the GRU prediction model; step 8, selecting an Adam optimizer to optimize the model parameters; and step 9, evaluating the performance of the model by using an evaluation index.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of AC contactors, and in particular relates to a method for predicting the electrical life of an AC contactor by improving a gate-controlled cycle unit through feature selection. Background Art

[0002] With the widespread use of high-quality, affordable electricity, people's dependence on electricity continues to increase, raising higher standards for the safety and reliability of the power industry. This is where the concept of the smart grid comes in. Smart grids rely on the fundamental role of electrical equipment, which is the core hub for the stable operation of the entire power system. The trend toward intelligent grids inevitably leads to the intelligent development of electrical equipment. At the same time, smart appliances will directly promote the rapid development of smart grids.

[0003] The intelligent development of AC contactors is a crucial component of intelligent electrical equipment, but its development has been slower than that of other electrical equipment. This intelligent development not only includes the ability to sense, judge, and provide early warnings regarding basic electrical functions, including real-time monitoring and performance degradation assessment, but also includes the ability to process information for adaptive disconnection.

[0004] Machine learning was initially used as a research tool for intelligent electrical equipment. As network models grew in number and complexity, deep learning emerged. Deep learning, with its deep structure and highly nonlinear adaptive capabilities, effectively overcomes the inaccurate feature extraction limitations of shallow machine learning. While widely used in various fields, it is still in its infancy in the areas of electrical equipment life prediction and condition assessment. Deep learning methods, independent of traditional physical and statistical models, directly analyze the operating data of AC contactors to develop a prediction model for their electrical lifespan and predict their remaining lifespan. Therefore, deep learning methods offer strong adaptability and interpretability for predicting the remaining lifespan of complex equipment.

[0005] The entire life cycle of an AC contactor is a long time series. Among the many deep learning models, recurrent neural networks (RNNs) have shown strong adaptability to time series data analysis. In the time dimension, RNNs share model structures and parameters. By storing information in the current hidden layer and passing information to the hidden layer at the next moment through connections between hidden layers, the network has a "memory" function. However, when RNNs calculate gradients, when the number of time steps is large or the time steps are small, the RNN's gradient is prone to decay or explosion. Although clipping the gradient can address gradient explosion, it cannot solve the problem of gradient decay. Therefore, in practice, RNNs find it difficult to capture dependencies with large time step distances in time series.

[0006] Long Short-Term Memory (LSTM) is a variant of RNN. It introduces a "gate" structure to add or forget information to the cell state, which solves the problem of gradient disappearance to a certain extent. However, the structure of LSTM is relatively complex and the calculation is slow. Summary of the Invention

[0007] The present invention addresses the shortcomings of the existing technology and provides a method for predicting the electrical life of AC contactors using a gated recurrent unit (GRU) with improved feature selection. The GRU is a highly effective variant of the LSTM network. Its structure is simpler than that of the LSTM network, retaining the advantages of the LSTM while simplifying the calculation process and achieving excellent prediction results. The prediction method selects an optimal feature subset that effectively characterizes the degradation trend of the AC contactor to predict the remaining electrical life of the AC contactor, thereby improving the accuracy of the prediction.

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

[0009] Step 1: (Build an AC contactor full life test platform,) collect contactor voltage and current signals;

[0010] Step 2: extracting characteristic parameters that affect the electrical life of the AC contactor from the signal of step 1;

[0011] Step 3: Perform NCA feature importance analysis on feature parameters;

[0012] Step 4: Perform Spearman correlation analysis on the characteristic parameters;

[0013] Step 5: Comprehensively consider the feature parameter importance analysis and correlation analysis, select the optimal feature subset, normalize it, and then construct and divide the data set;

[0014] Step 6: Construct a GRU residual electrical life prediction model for AC contactors;

[0015] Step 7: Train the GRU prediction model;

[0016] Step 8. Select Adam optimizer to optimize the model parameters;

[0017] Step 9: Use model evaluation indicators to evaluate the performance of the model.

[0018] Furthermore, collecting the contactor voltage and current signals includes: collecting voltage and current waveform data of the three-phase main contacts of the AC contactor and voltage and current waveform data of the coil through a high-speed data acquisition card.

[0019] (This data acquisition card can simultaneously collect signals from eight channels.) The voltage and current waveform data for the contactor's three-phase main contacts, as well as the coil's voltage and current waveform data, totaling eight channels of waveform data were collected. To more accurately reflect the waveform signals, the sampling rate for each acquisition channel was set to 1M / s. The sensors selected for the experiment feature high precision, fast response speed, and isolation protection, ensuring the authenticity and accuracy of the waveform signals during the test.)

[0020] Furthermore, the extraction of characteristic parameters affecting the electrical life of the AC contactor includes:

[0021] 1. Analyze the breaking process of the AC contactor and extract the arcing time, release time, arcing energy and average arcing power:

[0022] Arcing time:

[0023] t arc =t b -t a

[0024] (i.e., the time interval from arc generation to arc extinction); where, t arc is the arcing time, t b is the instant when the arc is extinguished, t a The instant when the arc is generated;

[0025] Release time:

[0026] t s =t a -t c

[0027] (i.e., the time interval from coil power-off to the separation of the moving and static contacts); where, t s is the contactor release time, t a is the instantaneous moment when the arc is generated, t c The moment when the coil is powered off;

[0028] Arcing energy: (i.e., the arcing energy generated by one arc;) The discretized formula is:

[0029]

[0030] Where Δt is the time interval between sampling points, f s is the sampling rate;

[0031] Average arc power:

[0032]

[0033] (i.e., the average power of the arc during the arcing period,) where N is the number of sampling points during the arcing period, and P is the average power;

[0034] 2. Analyze the closing process of the AC contactor and extract the bounce time and closing time;

[0035] Bounce time:

[0036] t t =t f -t e

[0037] (i.e. the time interval from the beginning of contact between the moving and static contacts to the stable attraction) where t t is the bounce time, t f is the moment when the contacts are stably closed, t e The moment when the moving and static contacts begin to contact;

[0038] Closing time:

[0039] t x =t e -t d

[0040] (i.e., the time interval from the coil being energized to the first contact between the moving and static contacts), where t x is the pull-in time, t e is the moment when the moving and static contacts begin to contact, t d The moment when the coil is energized;

[0041] 3. When the AC contactor is stably energized, there is contact resistance between the moving and static contacts;

[0042] The contact resistance: The contact resistance between the contactor contacts includes the contraction resistance, which is R n for:

[0043]

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

[0045] Furthermore, performing NCA feature importance analysis on the feature parameters includes:

[0046] For the dataset {X1,X2,…,X m There are m samples in total. Set the linear transformation matrix A and calculate the NCA feature selection as follows:

[0047] (1) Calculate the sample point X i and X jMahalanobis distance dist mah (X i ,X j ):

[0048]

[0049] Where i, j = 1, 2, ..., m, T represents transposition;

[0050] (2) Calculate the probability of correct classification of features:

[0051]

[0052] Where l does not include sample X i The sample set, P ij is a sample X j For sample X i Probability of impact, P i is a sample X i The accuracy of the leave-one-out method, W i Is with X i The subscript set of samples belonging to the same category, A is the transformation matrix;

[0053] (3) Derivative the objective function and optimize the linear transformation matrix A:

[0054]

[0055]

[0056] Where k = 1, 2, ..., m, X ij =X i -X j ;

[0057] (4) Perform feature importance analysis:

[0058]

[0059] Among them, X is the original feature parameter, is the characteristic parameter after selection;

[0060] Furthermore, performing Spearman correlation analysis on the characteristic parameters includes:

[0061] For two characteristic parameters X i With Y i The Spearman rank correlation coefficient calculation formula is:

[0062]

[0063] Where R i 、S i Ri 、S i Rank after sorting by size or quality, D i is the difference in the corresponding ranks of the two variables, and n is the sample size.

[0064] Furthermore, the step 5, comprehensively considering the importance analysis and correlation analysis of the feature parameters, selecting the optimal feature subset, normalizing it, and constructing and dividing the data set includes:

[0065] Based on NCA feature importance analysis and Spearman correlation analysis, contact resistance, arcing time, release time, pull-in time, and bounce time were selected as the optimal feature subsets. The optimal feature subsets and the remaining breaking times labels were used to construct a prediction data set, and the data was processed using zero-mean normalization:

[0066]

[0067] Where x t is the original data, is the mean value, s is the data variance, To standardize the data; after normalization, the data set is divided into 70% training set, 20% validation set, and 10% test set.

[0068] Furthermore, the construction of the GRU remaining electrical life prediction model of the AC contactor includes:

[0069] (1) Build reset gate and update gate:

[0070] Reset Gate and update gate The calculation of is as follows:

[0071] r t =σ(x t W xr +h t-1 W hr +b r )

[0072] z t =σ(x t W xz +h t-1 W hz +b z )

[0073] in, and is the weight parameter, is the bias parameter;

[0074] (2) Calculate candidate hidden states:

[0075] Candidate hidden states for the time step The calculation formula is:

[0076]

[0077] in, yes Weight parameters, is the bias parameter;

[0078] (3) Calculate the hidden state:

[0079] Hidden state at time step t The calculation uses the update gate z of the current time step t To the hidden state h of the previous time step t-1 and the candidate hidden state at the current time step To make a combination, the formula is as follows:

[0080]

[0081] Furthermore, the training of the GRU prediction model includes:

[0082] (1) The GRU prediction model performs forward propagation calculations, decomposes the spliced ​​training parameters, and calculates the output of the output layer;

[0083] (2) Use the backward error propagation algorithm to learn the network, calculate the partial derivative of the loss function with respect to each parameter, and then update the parameters by taking the partial derivative of each parameter and iterating sequentially to complete the training of the GRU prediction model;

[0084] (3) After the GRU prediction model training is completed, the test set data with the labels removed is input into the trained model for prediction.

[0085] Furthermore, the Adam optimizer is selected to optimize the model parameters, including: (adopting different strategies based on the training data to update the direction and learning rate of the gradient descent, while improving the model convergence speed and optimizing the loss function.) Using the mean square error function as the loss function Loss:

[0086]

[0087] Where n is the number of samples, y i is the actual value, is the predicted output value of the model.

[0088] Furthermore, the use of model evaluation indicators to evaluate the performance of the model includes:

[0089] Select root mean square error RMSE, mean absolute error MAE and goodness of fit R 2Three evaluation indicators are used to evaluate the prediction model. The formula is as follows:

[0090]

[0091]

[0092]

[0093] Where n is the number of samples, y i is the actual value, is the average of the actual values, is the predicted output value of the model;

[0094] For the established prediction model, the lower the root mean square error RMSE and mean absolute error MAE, the better the goodness of fit R 2 The higher it is, the better the prediction effect is and the better the performance of the model is.

[0095] Specifically, the root mean square error (RMSE) reflects the degree to which the data deviates from the true value and is sensitive to extreme values ​​in the data. It can well reflect the accuracy and robustness of the model. The mean absolute error (MAE) avoids positive and negative offsets by absolutizing the deviation value, and more effectively reflects the actual situation of the prediction value error. Goodness of fit R 2 It reflects the percentage of the dependent variable described by the fluctuation of the independent variable, reflects the degree to which the independent variable explains the dependent variable, and also indicates the degree of fit of the regression curve to the observed value.

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

[0097] (1) Compared with traditional machine learning, deep learning has more advantages in processing big data. In actual situations, there are many models of AC contactors, and the operating data is complex and huge. Traditional machine learning methods cannot effectively process big data, but the deep structure of deep learning can effectively extract and learn big data. At the same time, traditional machine learning algorithms rely on expert experience, and the algorithm design is carried out step by step, which is relatively cumbersome and not suitable for large-scale use. Deep learning has a high degree of integration and can solve the problem in one step based on accurate and large enough data. It has strong adaptability in actual use.

[0098] (2) By using NCA feature importance analysis to calculate the influence of feature parameters on the remaining electrical life, and using the Spearman rank correlation coefficient to calculate the correlation between feature parameters, the two are comprehensively considered, taking into account the correlation between feature parameters and the remaining electrical life and the correlation between feature parameters, and screening out the optimal feature subset that effectively characterizes the actual degradation state of the AC contactor, which is conducive to further improving the accuracy of the remaining electrical life prediction in the later stage.

[0099] (3) For the first time, the GRU neural network is applied to the problem of predicting the remaining electrical life of AC contactors. GRU is generally used in fields such as stock analysis and has achieved good prediction results. The present invention regards the full life of the AC contactor as a long time series, and uses the GRU prediction model to train a data set constructed from the optimal features of the AC contactor and predict the remaining number of interruptions. In the GRU prediction model, the reset gate helps capture short-term dependencies in the time series, and the update gate helps capture long-term relationships in the time series. It has a good memory of the historical hidden state of the AC contactor operating data, ensuring the reliability of the prediction.

[0100] The present invention applies the GRU prediction model improved by the optimal feature subset to the prediction problem of the remaining electrical life of AC contactors. Compared with the traditional prediction model of the remaining electrical life of AC contactors, it is not only conducive to the online prediction of the remaining electrical life of AC contactors, but also improves the stability and accuracy of the prediction, is conducive to the development of intelligent AC contactors, and greatly improves the stability and reliability of the power system. BRIEF DESCRIPTION OF THE DRAWINGS

[0101] The present invention is further described below with reference to the accompanying drawings and specific embodiments. The scope of protection of the present invention is not limited to the following description.

[0102] Figure 1 This is the principle block diagram of the test platform.

[0103] Figure 2 It is the AC contactor disconnecting process.

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

[0105] Figure 4 It is the GRU cycle structure.

[0106] Figure 5 This is the internal structure diagram of GRU.

[0107] Figure 6 This is the GRU prediction model training flow chart. DETAILED DESCRIPTION

[0108] like Figure 1-6As shown, the prediction method of the present invention first builds an AC contactor full-life test platform and extracts characteristic parameters that affect the electrical life of the AC contactor from the collected voltage and current signals. Then, through NCA feature importance analysis and Spearman correlation analysis, the optimal feature subset that effectively characterizes the degradation trend is screened out. After that, a prediction data set is constructed using the labels formed by the optimal feature subset and the remaining number of interruptions. After normalization, the data set is divided into 70% training set, 20% validation set, and 10% test set. Finally, the training set and validation set are input into the model as batch training sets for training, and the test set is used for prediction. During training, the model selects the Adam optimizer to optimize the training parameters, and the model is effectively evaluated through prediction evaluation indicators.

[0109] The present invention can not only realize online real-time prediction of the remaining electrical life of the AC contactor, but also improve the accuracy of the prediction, provide a scientific basis and judgment for equipment maintenance and planning decisions, realize equipment maintenance at the lowest cost, diagnose the equipment operating status in advance to avoid the occurrence of power accidents, and greatly improve the safety and reliability of the power system. Specific embodiment:

[0111] (1) Build a full-life test platform for AC contactors and extract characteristic parameters that represent the operating status.

[0112] According to the AC-4 operating conditions in GB 14048.4-2010, a full-life test platform for AC contactors was established using a data acquisition card and voltage and current sensors. By collecting the AC contactor opening and closing waveforms, characteristic parameters that effectively represent the degradation trend were extracted. For details, see Step 1.

[0113] Step 1: Build an AC contactor full life test platform to extract characteristic parameters that affect the electrical life of the AC contactor.

[0114] Step 1.1: Build an AC contactor full-life test platform.

[0115] The test platform was constructed and tested in accordance with the provisions of GB 14048.4-2010. In specific engineering applications, AC contactors primarily operate under AC-4 conditions, requiring circuit connection and disconnection at 1x the rated voltage and 6x the rated current, with a power factor of 0.35. The remaining electrical life of an AC contactor primarily depends on the degree of wear and welding of the main contacts. Therefore, during the full-life test of the AC contactor, it is necessary to measure the voltage and current signals of the main circuit and control coil, and extract characteristic parameters that characterize the contactor's operating status.

[0116] The test platform principle block diagram is as follows Figure 1As shown in the figure, the AC contactor full life test platform mainly includes the following modules: AC contactor coil current and voltage signal measurement and conversion module, main contact current and voltage signal measurement and conversion module, control on-off module and real-time communication module.

[0117] The voltage and current of the three-phase main contacts and the coil voltage and current of the AC contactor are collected using the X-series USB6356 synchronous data acquisition card from National Instruments (USA) and voltage and current sensors from LEM (Germany). The data acquisition card can synchronously collect signals from eight channels, and the high-precision sensors ensure the accuracy of the collected data.

[0118] Step 1.2: Extract characteristic parameters of the AC contactor.

[0119] The voltage and current parameters are collected through the AC contactor full life test platform, and characteristic parameters that effectively characterize the degradation trend of the AC contactor are extracted from them.

[0120] from Figure 2 The breaking process of the AC contactor can be used to extract the arcing time, release time, arcing energy and average arcing power. The calculation method is as follows:

[0121] (1) Arcing time: The time interval from the generation of the arc to the final extinction of the arc, which is expressed as:

[0122] t arc =t b -t a

[0123] Where, t arc is the arcing time, t b is the instant when the arc is extinguished, t a The instant when the arc is generated.

[0124] (2) Release time: The time interval from the coil power failure to the separation of the moving and static contacts. The formula is expressed as:

[0125] t s =t a -t c

[0126] Where, t s is the contactor release time, t a is the instantaneous moment when the arc is generated, t c The moment when the coil is powered off.

[0127] (3) Arc energy: The arc energy generated by an arc is discretized as follows:

[0128]

[0129] Where Δt is the time interval between sampling points, f s is the sampling rate.

[0130] (4) Average arc power: The average power of the arc during the arcing period, expressed as follows:

[0131]

[0132] Where N is the number of sampling points during the arcing period, and P is the average power.

[0133] from Figure 3 The bounce time and the pull-in time can be extracted from the AC contactor's pull-in process. The calculation method is as follows:

[0134] (5) Bounce time: The time interval from the beginning of contact between the moving and static contacts to the stable attraction, which can be expressed as:

[0135] t t =t f -t e

[0136] Where, t t is the bounce time, t f is the moment when the contacts are stably closed, t e The moment when the moving and static contacts begin to contact.

[0137] (6) Closing time: The time interval from the coil being energized to the first contact between the moving and static contacts. The formula is:

[0138] t x =t e -t d

[0139] Where, t x is the pull-in time, t e is the moment when the moving and static contacts begin to contact, t d The moment when the coil is energized.

[0140] When the AC contactor is stably energized, there is contact resistance between the moving and static contacts, which can be calculated as follows:

[0141] (7) Contact resistance: The contact resistance between the contactor contacts is mainly the contraction resistance, which can be expressed as follows:

[0142]

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

[0144] (2) Select the optimal feature subset through feature importance analysis and correlation analysis.

[0145] Through NCA feature importance analysis and Spearman rank correlation analysis, the correlation between the characteristic parameters and the remaining electrical life, as well as the correlation between the characteristic parameters, are comprehensively considered. Arcing time, contact resistance, release time, pull-in time, and bounce time are selected as the optimal feature subset of the model to effectively characterize the degradation trend of the AC contactor during actual operation. For details, see step 2.

[0146] Step 2: Select the optimal feature subset through importance analysis and correlation analysis to construct the prediction data set.

[0147] in:

[0148] Step 2.1, NCA feature importance analysis.

[0149] Neighborhood Component Analysis (NCA) is a non-parametric embedded feature selection method. The sample similarity calculation method is based on the Mahalanobis distance. By learning feature weights, the nearest neighbors are randomly selected to minimize the objective function. This objective function is achieved by learning the distance measure of the original dataset through the leave-one-out method to select features. The calculation steps of NCA feature selection are as follows:

[0150] (1) Set the linear transformation matrix A and calculate the Mahalanobis distance between features. m} There are n samples in total, sample point X i and X j The Mahalanobis distance calculation formula is expressed as:

[0151]

[0152] Where i, j = 1, 2,…, n.

[0153] (2) Calculate the probability that a single feature data is correctly classified. The calculation formula is expressed as:

[0154]

[0155] Where l does not include sample X i The sample set, P ij is a sample X j For sample X i Probability of impact, P i is a sample X i The accuracy of the leave-one-out method, W i Is with X i The subscript set of samples belonging to the same category.

[0156] (3) Optimize the linear transformation matrix A and derive the objective function.

[0157]

[0158]

[0159] Where k = 1, 2, ..., n, X ij =X i -X j .

[0160] (4) Use the optimized transformation matrix to select features from the original data X. Expressed as:

[0161]

[0162] Step 2.2, Spearman correlation analysis.

[0163] The Spearman rank correlation coefficient is used to measure the degree of correlation between the ranks of two variables. It is suitable for calculating the correlation between discrete data, categorical variables, or rank variables. The Spearman rank correlation coefficient is defined as the Pearson correlation coefficient between ranked variables. In correlation analysis, the Spearman rank correlation coefficient uses the order of data size instead of numerical values, using the ranking method to eliminate the dimension. i With Y i The Spearman rank correlation coefficient calculation formula is:

[0164]

[0165] Where R i 、S i R i 、S i Rank after sorting by size or quality, D i is the difference in the corresponding ranks of the two variables, and n is the sample size.

[0166] Step 2.3: Select the optimal feature subset and construct the AC contactor prediction dataset.

[0167] The feature parameters of the optimal feature subset have different dimensions, so normalization preprocessing is required before model training to form dimensionless data samples. Data normalization uses Z-score standardization, and the calculation formula is expressed as:

[0168]

[0169] Where x t is the original data, is the mean value, s is the data variance, For standardized data.

[0170] (3) Build and train a GRU prediction model to predict the remaining electrical life of the AC contactor.

[0171] The GRU neural network prediction model built by the present invention is specifically shown in step 3. The structure of the GRU prediction model is a GRU layer and a fully connected layer, wherein the number of input neurons is set to 5, corresponding to the 5 extracted feature parameters, and the number of output layer neurons is set to 1, which is the remaining electrical life of the AC contactor. The connection weights between each layer and the bias of each neuron are randomly initialized, and the sigmoid function and tanh function are selected for activation. The number of iterations (epoch) is set to 50 times, Dropout is set to 0.1, the loss function uses the mean square error function, and is optimized using the Adam optimizer.

[0172] Step 3: Build a GRU prediction model to predict the remaining electrical life of the AC contactor, where:

[0173] Step 3.1, build the GRU prediction model.

[0174] The cyclic structure of GRU is as follows Figure 4 As shown in the figure, the GRU unit learns and memorizes information to achieve long time series prediction. Based on LSTM, GRU simplifies the original input gate, forget gate and output gate into update gate and reset gate, reducing the computational complexity. The internal structure of GRU is as follows Figure 5 shown.

[0175] (1) Build reset gate and update gate:

[0176] The inputs of the reset gate and update gate are both the current time step input x t and the hidden state h of the previous time step t-1 , the output is calculated by the fully connected layer whose activation function is the sigmoid function. If the number of hidden units is h, the mini-batch input of a given time step is (Number of samples is n, number of inputs is d) and the hidden state of the previous step . Reset Gate and update gate The calculation of is as follows:

[0177] r t =σ(x t W xr +h t-1 W hr +b r )

[0178] z t =σ(x t Wxz +h t-1 W hz +b z )

[0179] in, and is the weight parameter, is the bias parameter, and the sigmoid function transforms the value of the element to between 0 and 1.

[0180] (2) Calculate candidate hidden states:

[0181] The output of the reset gate of the current time step is multiplied by the hidden state of the previous time step. Then, the result of the element-wise multiplication is connected to the input of the current time step, and the candidate hidden state is calculated through the fully connected layer with the activation function tanh. The candidate hidden state of the time step The calculation formula is:

[0182]

[0183] in, yes Weight parameters, is the bias parameter.

[0184] (3) Calculate the hidden state:

[0185] Hidden state at time step t The calculation uses the update gate z of the current time step t To the hidden state h of the previous time step t-1 and the candidate hidden state at the current time step To make a combination, the formula is as follows:

[0186]

[0187] Step 3.2, GRU forward propagation calculation.

[0188] The forward propagation formula of the GRU network model is as follows:

[0189] r t =σ(W r ·[h t-1 ,x t ])

[0190] z t =σ(W z ·[h t-1 ,x t ])

[0191]

[0192]

[0193] y t =σ(Wo·h t )

[0194] Where [] is the vector connection, ⊙ is the matrix product. Parameter W r 、W z 、 and W o The processing process is as follows:

[0195] W r =W rx +W rh

[0196] W z =W zx +W zh

[0197]

[0198] Input to the output layer:

[0199]

[0200] Output of the output layer:

[0201]

[0202] Step 3.3, backward error propagation.

[0203] The backward error propagation algorithm is used to learn the network, so the partial derivatives of the loss function with respect to each parameter must be obtained first:

[0204]

[0205]

[0206]

[0207]

[0208]

[0209]

[0210]

[0211] The intermediate parameters are:

[0212]

[0213]

[0214]

[0215] δ t =δ h,t ·z t ·φ′

[0216]

[0217] The parameters are updated by taking partial derivatives of each parameter, and the loss function is calculated iteratively. Finally, the training of the GRU prediction model is completed, and the unlabeled test set is input into the model for prediction.

[0218] Step 3.4, optimize model training parameters.

[0219] During the prediction model training process, the Adam (Adaptive Moment Estimation) optimizer was selected to optimize the model parameters. The Adam optimizer combines the advantages of the adaptive gradient and mean square error propagation optimization algorithms, and uses different strategies to update the direction of gradient descent and learning rate based on the training data. This improves the model convergence speed while optimizing the loss function. The loss function reflects the degree to which the predicted value in the model differs from the actual value. The better the loss function, the better the model performance. The prediction model in this paper uses the mean square error function as the loss function, namely:

[0220]

[0221] Where n is the number of samples, y i is the actual value, is the predicted output value of the model.

[0222] Step 3.5: Use model evaluation indicators to judge the prediction model.

[0223] In order to effectively evaluate the model, this paper selects root mean square error (RMSE), mean absolute error (MAE), goodness of fit (R 2 ) Three evaluation indicators are used to evaluate the established prediction model. The following is an introduction to the three evaluation indicators:

[0224] (1) The root mean square error (RMSE) is the square root of the ratio of the sum of the squares of the deviations between the observed value and the true value to the number of observations. It is used to measure the deviation between the observed value and the true value. The root mean square error reflects to some extent the degree to which the data deviates from the true value. At the same time, the root mean square error is sensitive to the maximum and minimum errors in the data. Therefore, the root mean square error can well reflect the accuracy and robustness of the prediction. The root mean square error formula is expressed as:

[0225]

[0226] Where n is the number of samples, y i is the actual value, is the predicted output value of the model.

[0227] (2) When predicting the same label, we take the absolute value of the error between the actual value and the predicted value and average them. The result is called the mean absolute error (MAE), which is expressed as:

[0228]

[0229] Where n is the number of samples, y i is the actual value, is the predicted output value of the model. Compared with the average error, the mean absolute error is more accurate because the deviation value of the mean absolute error is absolutized and there is no positive or negative offset. Therefore, the mean absolute error can more effectively reflect the actual situation of the predicted value error.

[0230] (3) Goodness of fit R 2 The percentage of the dependent variable described by the fluctuation of the independent variable. The greater the goodness of fit, the higher the degree of explanation of the independent variable on the dependent variable, and the higher the percentage of the change caused by the independent variable in the total change. 2 The closer the value of R is to 1, the better the regression curve fits the observed value; on the contrary, 2 The smaller the value, the worse the regression curve fits the observed value. Goodness of fit R 2 The calculation formula is:

[0231]

[0232] Where n is the number of samples, y i is the actual value, is the average of the actual values, is the predicted output value of the model.

[0233] Figure 6 This is a flowchart for GRU construction and training. First, the optimal feature subset is dimensionlessly normalized and the AC contactor interruption counts are assigned in reverse order to form a dataset with labels. The dataset is then divided into training, validation, and test sets. The split window length is set, selecting 70% for training, 20% for validation, and 100% for testing. A batch training set is then constructed and fed into the GRU prediction model for training. The loss function is then calculated and the network is optimized. Finally, the test set data is fed into the model for lifespan prediction, and the performance of the prediction model is effectively evaluated using model evaluation metrics.

[0234] In practice, the processed operating data can be directly input into the trained model to predict the remaining electrical life of the AC contactor. As the training data continues to increase, the model's predictions will become more and more adapted to actual conditions.

[0235] It can be understood that the above specific description of the present invention is only used to illustrate the present invention and is not limited to the technical solutions described in the embodiments of the present invention. Those skilled in the art should understand that the present invention can still be modified or replaced by equivalents to achieve the same technical effects; as long as the use requirements are met, they are within the scope of protection of the present invention.

Claims

1. The AC contactor electrical life prediction method based on feature selection and improved gate-controlled cycle unit is characterized by: Step 1: Collect contactor voltage and current signals; Step 2: extracting characteristic parameters that affect the electrical life of the AC contactor from the signal of step 1; Step 3: Perform NCA feature importance analysis on feature parameters; Step 4: Perform Spearman correlation analysis on the characteristic parameters; Step 5: Comprehensively consider the feature parameter importance analysis and correlation analysis, select the optimal feature subset, normalize it, and then construct and divide the data set; Step 6: Construct a GRU residual electrical life prediction model for AC contactors; Step 7: Train the GRU prediction model; Step 8. Select Adam optimizer to optimize the model parameters; Step 9: Use model evaluation indicators to evaluate the performance of the model; The collecting of contactor voltage and current signals includes: collecting voltage and current waveform data of the three-phase main contacts of the AC contactor and voltage and current waveform data of the coil by a high-speed data acquisition card; The step 5, comprehensively considering the importance analysis and correlation analysis of the feature parameters, selecting the optimal feature subset, normalizing it, and constructing and dividing the data set includes: Based on NCA feature importance analysis and Spearman correlation analysis, contact resistance, arcing time, release time, pull-in time, and bounce time were selected as the optimal feature subsets. The optimal feature subsets and the remaining breaking times labels were used to construct a prediction data set, and the data was processed using zero-mean normalization: Where x t is the original data, is the mean value, s is the data variance, To standardize the data; after normalization, the data set is divided into 70% training set, 20% validation set, and 10% test set.

2. The AC contactor electrical life prediction method based on feature selection and improved gate control cycle unit according to claim 1 is characterized in that: The extraction of characteristic parameters that affect the electrical life of the AC contactor includes:

1. Analyzing the breaking process of the AC contactor to extract arcing time, release time, arcing energy and average arcing power: Arcing time: t arc =t b -t a Where, t arc is the arcing time, t b is the instant when the arc is extinguished, t a The instant when the arc is generated; Release time: t s =t a -t c Where, t s is the contactor release time, t a is the instantaneous moment when the arc is generated, t c The moment when the coil is powered off; Arcing energy: The discretized formula is: Where Δt is the time interval between sampling points, f s is the sampling rate; Average arc power: Where N is the number of sampling points during the arcing period, and P is the average power; 2. Analyze the closing process of the AC contactor and extract the bounce time and closing time; Bounce time: t t =t f -t e Where, t t is the bounce time, t f is the moment when the contacts are stably closed, t e The moment when the moving and static contacts begin to contact; Closing time: t x =t e -t d Where, t x is the pull-in time, t e is the moment when the moving and static contacts begin to contact, t d The moment when the coil is energized; 3. When the AC contactor is stably energized, there is contact resistance between the moving and static contacts; The contact resistance: The contact resistance between the contactor contacts includes the contraction resistance, which is R n for: Where u n is the contact voltage in one cycle when the two contacts are stably closed and energized, i n is the contact current in the same cycle, and N is the number of points collected in the cycle.

3. The AC contactor electrical life prediction method based on feature selection and improved gate control cycle unit according to claim 1 is characterized in that: The NCA feature importance analysis of the feature parameters includes: For the dataset {X1,X2,…,X m There are m samples in total. Set the linear transformation matrix A and calculate the NCA feature selection as follows: (1) Calculate the sample point X i and X j Mahalanobis distance dist mah (X i ,X j ): Where i, j = 1, 2, ..., m, T represents transposition; (2) Calculate the probability of correct classification of features: Where l does not include sample X i The sample set, P ij is a sample X j For sample X i Probability of impact, P i is a sample X i The accuracy of the leave-one-out method, W i Is with X i The subscript set of samples belonging to the same category, A is the transformation matrix; (3) Derivative the objective function and optimize the linear transformation matrix A: Where k = 1, 2, ..., m, X ij =X i -X j ; (4) Perform feature importance analysis: Among them, X is the original feature parameter, is the characteristic parameter after selection; Furthermore, performing Spearman correlation analysis on the characteristic parameters includes: For two characteristic parameters X i With Y i The Spearman rank correlation coefficient calculation formula is: Where R i 、S i R i 、S i Rank after sorting by size or quality, D i is the difference in the corresponding ranks of the two variables, and n is the sample size.

4. The method for predicting the electrical life of an AC contactor using a feature-selected improved gate-controlled cycle unit according to claim 1, characterized in that: The construction of the GRU residual electrical life prediction model of the AC contactor includes: (1) Build reset gate and update gate: Reset Gate and update gate The calculation is as follows: r t =σ(x t W xr +h t-1 W hr +b r ) z t =σ(x t W xz +h t-1 W hz +b z ) in, and is the weight parameter, is the bias parameter; (2) Calculate candidate hidden states: Candidate hidden states for the time step The calculation formula is: in, yes Weight parameters, is the bias parameter; (3) Calculate the hidden state: Hidden state at time step t The calculation uses the update gate z of the current time step t To the hidden state h of the previous time step t-1 and the candidate hidden state at the current time step To make a combination, the formula is as follows:

5. The AC contactor electrical life prediction method based on feature selection and improved gate control cycle unit according to claim 1 is characterized in that: The training of the GRU prediction model includes: (1) The GRU prediction model performs forward propagation calculations, decomposes the spliced ​​training parameters, and calculates the output of the output layer; (2) Use the backward error propagation algorithm to learn the network, calculate the partial derivative of the loss function with respect to each parameter, and then update the parameters by taking the partial derivative of each parameter and iterating sequentially to complete the training of the GRU prediction model; (3) After the GRU prediction model training is completed, the test set data with the labels removed is input into the trained model for prediction.

6. The AC contactor electrical life prediction method based on feature selection and improved gate control cycle unit according to claim 1 is characterized in that: The Adam optimizer is selected to optimize the model parameters, including: using the mean square error function as the loss function Loss: Where n is the number of samples, y i is the actual value, is the predicted output value of the model.

7. The method for predicting the electrical life of an AC contactor using a feature-selected improved gate-controlled cycle unit according to claim 1, characterized in that: The performance of the model evaluated by the model evaluation index includes: Select root mean square error RMSE, mean absolute error MAE and goodness of fit R 2 Three evaluation indicators are used to evaluate the prediction model. The formula is as follows: Where n is the number of samples, y i is the actual value, is the average of the actual values, is the predicted output value of the model; For the established prediction model, the lower the root mean square error RMSE and mean absolute error MAE, the better the goodness of fit R 2 The higher it is, the better the prediction effect is and the better the performance of the model is.