1 Introduction

In the information age, power electronic technology has been widely used in the fields of industry, military and aerospace, etc., is an indispensable part of power system, control system, etc.. Once the power electronic equipment failure, will bring serious consequences. Therefore, the fault diagnosis technology of power electronic circuits is getting more and more attention to [1,2].

Fault diagnosis of power electronic circuits can be divided into two kinds of parameters and hard faults of [1]. according to the two circuit fault form, current diagnostic methods can be divided into the method based on expert system, based on [3]. model method and artificial intelligence method in recent years, based on the method of signal processing, support vector machine (Support Vector Machine, SVM) received extensive attention, it is a learning machine based on the principle of structural risk minimization method based on statistical learning theory, has excellent learning performance and generalization ability, has been used in the fault diagnosis of power electronic circuits in [4,5]. according to the drawbacks of the traditional SVM in solving multi class classification problem, Thomas G Dietterich and GhulumBakiri ECOC for the first time in 1995 will be used to solve the multi class classification problem, the basic idea is to be a multi class classification problem is decomposed into A number of two classes of classification problems, and then use a combination of multiple two class classification techniques to deal with multi class problems [6-8].

In order to improve the fault diagnosis rate and realize the fast fault location, this paper proposes a new technology of power electronic circuit fault diagnosis based on improved SVM. Using the conventional o-v-r encoding method to construct the ECOC encoding matrix, using SVM as the framework of the two categories of classifiers, through training samples training ECOC framework. In the testing stage, the KNN model is pre classified, then the fault type of the sample is determined by the trained ECOC, and the fault location is realized.

2 ECOC algorithm based on KNN model

2.1 ECOC basic principles

ECOC algorithm is a kind of method to classify multi class classification problems into two kinds of classification problems. By using the code bit values of encoding matrix to classify the training samples, the two kinds of classifiers are constructed, and the corresponding sample sets and the outputs are independent. The specific algorithm of [5-7]. is as follows:

(1) building error correction encoding matrix. Defined error correction encoding matrix M, M of each line corresponds to a fault category, each column corresponds to a two class classifier. The elements in the matrix are {-1,0,1}, "1" and "-1", and "0" indicates that the sample is not involved in training. ECOC classification precision greatly depends on the error correction coding matrix, matrix code need to meet the following two conditions: separation, that does not exist in the same or complementary lines and try to make the maximum Hamming distance between lines; column separation, i.e., there is no identical or complementary column, and try to make the column and other columns, and other column the complement between the Hamming distance. Error correction encoding matrix usually has a variety of forms, including a pair of encoding, a pair of one (one-versus-one, o-v-o) encoding, a sparse random encoding, encoding and other dense random [9]. encoding Hadamard

(2) training phase. According to the pre construction of the error correction encoding matrix, respectively, two categories of training. Since the classifier on each code level is only two kinds of classification, SVM can be used as the two class classifier.

(3) test phase. Samples to be tested were input to all binary classifier, an output vector, after binarization after generating a codeword, then the error correction coding matrix of each line of code do distance operation (usually with Hamming distance and Euclidean distance function), take the shortest distance from a line of code corresponding category as the sample to be tested categories.

2.2 ECOC algorithm based on KNN model

In this paper, a ECOC algorithm based on KNN model is proposed, which improves the traditional ECOC algorithm. As shown in Figure 1 by a conventional encoding method error correction coding matrix is constructed, using known labels of the training sample set to train the ECOC framework constructed and trained SVM parameters stored, and calculate the center of all failure modes of training samples; in the testing phase, the KNN method, i.e., computing the sample to be measured to each type of fault sample training center distance, set appropriate K value, get the test samples are most likely belong to K fault categories. Finally, according to the results of KNN model output calculated ECOC corresponding SVM output, by hamming distance, measured sample fault classes.

2.2.1 基于 KNN 模型的故障检测

KNN 模型由 Peter He Q 首次提出应用在故障检测中，该方法简单、直观。基于 KNN 的故障检测方法由建立模型和故障检测两部分组成。在训练阶段，求出每个故障训练样本集的中心点，建立模型；故障检测时，计算待测样本与各故障样本集中心的点距离，距离最短的故障类别作为待测样本的故障类别。

2.2.2 算法实现

步骤 1:用 o-v-r 编码矩阵 M 以及有标签的训练样本集1 1 2 2{（ , ）， （ , ）， , （ , ）}l lL =x y x y x yL分别训练二类分类器，其中 l 为总训练样本数，lx 为其中一个训练样本，ly 为该训练样本对应的标签。在 o-v-r编码矩阵中，每个二类分类器都将其中一类作为正例，而其他所有类都作为反例，若有 m 类故障模式，则需要构建 m 个二类分类器。表 1 是一个 4 类 4 位的编码矩阵。

步骤 3:输入待测样本 X,通过 KNN 模型，计算 X 与各故障训练样本集的中心点 C （ j ）的距离[13],选出前 K（K 小于故障类别数）个最小距离对应的故障类别，得到该待测样本 X 最有可能所属的 K 个故障类别。根据选出的 K 个故障类别，形成新的纠错编码矩阵K ?KM ,将测试样本 X 输入到新的 ECOC框架中，得到输出向量1 2（ ） （ （ ）， （ ）， , （ ））KH x =h x h x h xL,其中， （ ）， 1,2th x t =KL为二类分类器 SVM 的输出，计算 H （ x ）与编码矩阵K ?KM 每一行编码的汉明距离，距离公式如式（2）所示，取码间汉明距离最小的编码对应的类别为待测样本 X 的最终故障类别[14].

3 experimental verification and analysis

In this chapter, the ECOC algorithm based on KNN model is compared with the conventional ECOC and conventional SVM, and the advantages of the improved algorithm are analyzed. In order to verify the feasibility and effectiveness of the algorithm is improved, buck circuit, three-phase bridge full control rectifying circuit and brushless DC motor drive circuit for example diagnosis, and at the same time, the o-v-r SVM (method 1), o-v-o SVM (method 2), o-v-rECOC algorithm (method 3) and o-v-o ECOC algorithm (method 4) were compared, to verify the improved algorithm superiority. In the process of the experiment, two kinds of kernel functions (SVM) were used to compare the results of the polynomial kernel function (PKF) and the radial basis function (RBF). In KNN model, the K value of the model needs to be repeated many times, according to the actual circuit fault conditions to select the appropriate K value.

3.1 fault diagnosis examples

Buck 3.1.1 circuit

Buck circuit is a kind of DC-DC converter, which is used for switching power supply. It is one of the basic topology of power electronic circuits. As shown in Figure 2, the Buck circuit is mainly composed of inductors, capacitors, switches and other components, with the increase of working time of the circuit, the phenomenon of aging components will appear, so as to affect the normal operation of the circuit. In this example, the parameters of the Buck circuit components are diagnosed. Using the parameters of the [15] in the fault setting method, through the Buck circuit output voltage and inductance L1 on the current waveform contains the fault information to determine the specific fault type. Parameters fault is a certain range of circuit parameters deviate from the normal value of the fault, which is relatively hard, the output waveform of the circuit is stable after the change is not obvious. This example uses the feature extraction method in the literature [16], the transient characteristics of the circuit is suitable for off-line fault diagnosis. That is, the output voltage and the peak time of the output voltage and the peak time of the output voltage and the peak time of the 4 information are used as the fault characteristics. KNN model of K=3, the specific diagnostic results are shown in Table 2

3.1.2 brushless DC motor drive circuit

Inverter circuit is connected to a variety of electric power drive mechanism (such as a variety of motor) and the bridge between the power, but also to achieve the main role of power conversion, circuit schematics, such as figure 3. The rated voltage of motor is 48V, rated current is 10A, the rated speed is 3 000r/min, the phase resistance is, the phase inductance is 0.93mH, the pole number is 4

Taking a single power tube as an example, a total of 7 kinds of failure modes, F0 (no fault code), F2, F3, F4, F5, F6 and [17], are used in the F1 model,, K=5, KNN, 3.

3.1.3 three phase bridge controlled rectifier circuit

Three phase bridge controlled rectifier circuit has important function in modern power electronic technology, it is a kind of circuit which is used in all the rectifying circuit, and its principle is shown in Figure 4. In this circuit, the circuit fault of thyristor is an example, according to the fault information contained in the output voltage of the rectifier circuit Ud to determine the specific fault type. Common three-phase bridge full control rectifying circuit fault can be classified into five categories, 22 small fault: thyristor tube without fault F0, a thyristor tube fault f1~f6 and bridge arm two thyristor tube fault f7~f12, bridge arm of a thyristor tube fault f13~f15 and half bridge two thyristor tube occurs fault f16~f21. used in the literature [18] fault settings and features extraction method, K=11 KNN model in the table 4 for each algorithm diagnosis results.

3.2 results analysis

SVM o-v-r, SVM o-v-o, ECOC o-v-r, ECOC ECOC and o-v-o are used in this paper. The fault diagnosis of the Buck circuit, the brushless DC motor drive circuit and the three-phase bridge controlled rectifier circuit are carried out. The test results were compared with the diagnostic rate of different test methods and the test time of two key indicators, the results of the table 2~ Table 4

For 3 circuits with different fault types, the method of this paper and the other 4 methods have higher fault diagnosis rate. Method 3 and the method of this paper uses o-v-r error correction encoding matrix, table 3, table 2 results show that the improved method of the fault diagnosis of the fault diagnostic rate compared to the method 3 are improved. Compared with the method 1, method 2 and method 4, the fault diagnosis rate of this method is similar, but the KNN model is used to pre process the test phase, and the fault category range is determined.

In the experimental results of fault diagnosis of 3 kinds of circuits, PKF is used as an example, the test time is shortened by 47%~72%, 47%~81% and 50%~93%, respectively. The diagnostic rate of circuit fault is greatly improved. Therefore, the improved algorithm proposed in this paper can significantly improve the efficiency of fault diagnosis of power electronic circuits.

4 conclusions

In this paper, a new method of fault diagnosis for power electronic circuits is presented by using KNN model to improve the traditional ECOC model. Experiments show that this method is significantly improved compared with the conventional SVM and conventional ECOC, in the case of similar diagnostic rate, the diagnostic rate is significantly improved.

In addition, the improved algorithm is easy to implement, simple structure and can be applied to fault diagnosis of power electronic circuits. In addition, how to improve the rate of fault diagnosis, the fusion of other strategies to improve the fault diagnosis rate is the direction of our next research.

Reference

[1] Li Ning, Li Yinghui, Ying, et. Hybrid system theory and open circuit fault diagnosis application [J]. Proceedings of the CSEE the three-phase inverter circuit, 2014, 29 (6): 114-119.

Ning Li, Yinghui Li, Xihua Zhu, al. Fault DIAGNOSISFOR power electronic circuits based on mixed logicdynamic model and incident identification vector[J]. et

Of the CSEE Proceedings, 2014, 29 (6): 114-119.

[2] Ye Yinzhong, Chen Danjiang. Fault diagnosis method for three level inverter based on multi neural network [J]. (), 2013,28 (6): 120-126.

Danjiang Ye, Yinzhong. Fault Diagnosis of threelevel inverter based on multi neural network[J]. Chen

Of China Electrotechnical Society 2013,28, Transactions (6): 120-126.

[3] Liu Yufei. Reliability analysis of power electronic circuits based on complex network theory [D]. Guangdong: South China University of Technology, 2013