BPSO&1-NN algorithm-based variable selection for power system stability identification

Due to the very high nonlinearity of the power system, traditional analytical methods take a lot of time to solve, causing delay in decision-making. Therefore, quickly detecting power system instability helps the control system to make timely decisions become the key factor to ensure stable operation of the power system. Power system stability identification encounters large data set size problem. The need is to select representative variables as input variables for the identifier. This paper proposes to apply wrapper method to select variables. In which, Binary Particle Swarm Optimization (BPSO) algorithm combines with K-NN (K=1) identifier to search for good set of variables. It is named BPSO&1-NN. Test results on IEEE 39-bus diagram show that the proposed method achieves the goal of reducing variables with high accuracy. Keywords— Identification, Power system, BPSO, Variable selection, K-NN.


I. INTRODUCTION
Modern power systems suffer from operating pressure very close to a stable boundary limit, while power systems are always faced with abnormal agitation that can easily cause instability (Makarov, Reshetov, Stroev, & Voropai, 2005). Due to the very high nonlinearity of the power system, traditional analytical methods take a lot of time to solve, causing delay in decision-making. Therefore, quickly detecting power system instability helps the control system to make timely decisions become the key factor to ensure stable operation of the power system.
In recent years, the identification method has been applied as an alternative to solving difficult problems that traditional methods of analysis cannot solve in terms of computational ( . By learning the database, the nonlinear input/output relationship between the electrical system operating parameters and stability can be quickly calculated. However, if the identifier works fast, the number of input variables must be characteristic variables. Therefore, the selected variables must be characteristic, eliminate redundant variables and cause noise. The selection of variables of previously published works mainly applies the filter method that has to go through many stages (Dong et al., 2012;Kalyani & Swarup, 2013;Swarup, 2008). With this method, the first is based on the statistical criteria to filter out the good variables first, then ask the identifier to evaluate the accuracy to find the appropriate set of variables. This article recommends a wrapper method to select variables. In which, BPSO (Binary Particle Swarm Optimization) algorithm combined with K-NN (K=1) identifier to perform the process of searching for good set of variables. It is named BPSO&1-NN. This helps to reduce the step of finding the variable set compared to the filter method and improves the automation of the process of finding the variable set. Test results on IEEE 39-bus diagram show that the proposed method achieves the goal of variable reduction with high accuracy.

II. VARIABLE SELECTION
In the design stages of a stable diagnostic model of the power system using the identification method, the selection of characteristic variables is very important because it directly affects the diagnostic accuracy of the model. This also helps to reduce the number of measurement sensors, reducing computation time for the model. This step defines a specific set of variables that represent the database for training. These initial characteristic variables are the input variable representing the operating parameters of the power system and covering the operating status of the power system. The characteristic variable of the power system in transient mode or dynamic mode is the change in generator

Filter method:
The Filter method applies the search algorithm with the statistical standard function such as Fisher, Divergence, ... to guide the search strategy for the best set of variables to achieve the target value (J) (Dong et al., 2012;Kalyani & Swarup, 2013;Swarup, 2008). The process of searching for the set of variables by the filter method is presented as Figure 1. This method shows that the result is a set of variables meeting statistical standards but does not show the identification accuracy and the number of necessary variables. Therefore, the filter method needs to add an identification accuracy assessment to select the last set of variables.

Fig. 1: Diagram of Filter method
Wrapper method:

Fig. 2: Diagram of Wrapper method
The Wrapper method is presented as in Figure 2. However, this method differs from the Filter method in that the target function considering the identity accuracy. Thus, this method results in a set of variables to be selected with a specific identification accuracy.
The fitness function for selecting variables is presented in formulas (1), (2), and (3). where: Finess is the objective function.
AccsF is the identification accuracy of the selected set of variables.
AccSample is the number of the correct identifier. TotalSample is the total number of samples.
TotalF: the total number of variables in the data set.
sF is the number of selected variables.
ErrsF is the identification error of the selected variable.

III. BPSO ALGORITHM IN VARIABLE SELECTION
PSO (Particle Swarm Optimization) is the optimal search algorithm proposed by Kennedy and Eberhart (Kennedy & Eberhart, 1995). In the PSO, each candidate answer of the problem is encoded as an instance that moves through the search space. The whole herd seeks the optimal solution by updating the position of each individual based on their own experience and on neighboring individuals.
Generally, the vector xi = (xi1, xi2, ..., xiD) used in the PSO represents the position of the i th instance. The vector vi = (vi1, vi2,…, viD) is used in the PSO to represent the velocity of the i th instance. D is the size of the search space. During the search, the best position for each previous individual was recorded as pbest. The best location of the herd is the gbest. The herd was randomly generated from the population. Finding the best solution by updating the velocity and position of each individual according to equations (4) and (5).  (4) is still used to update the velocity while xid, pid get the value 0 or 1. The function sigmoid s(vid) is used to convert the value of vid into a range of values (0,1). The BPSO updates each instance's position using equations (6) and (7).
The function rand() is a random function whose value is distributed in (0,1).

BPSO Begin
Data set, kfold; D: dimensionality of search space N : the population size; T : maximum iterations; c1, c2, vmax, w Randomly initialise the position and velocity of each particle; while t ≤T evaluate fitness of each particle according to Equation (1); for i=1 to N update the pbest of particle i; update the gbest of particle i; end for i=1 to N for d=1 to D update the velocity of particle i according to Equation (4); update the position of particle i according to Equations (6) and (7);

Features and samples:
The study was tested on the IEEE 39-bus scheme. It includes 39 buses, 19 loads, 10 generators. The diagram IEEE 39-bus scheme is shown as Fig. 2. It was used in many published works. The off-line simulation was implemented to collect data for training. Load levels are (20,30,…,120)% normal load. The setting fault clearing time (FCT) is 50ms (Glover, Sarma, & Overbye, 2012). In this paper, all kinds of faults such as single phase to ground, double phase to ground, three phases to ground and phase-to-phase short-circuit are considered. Faults are tested in any buses and in each of 5% distances of long transmission lines of the test systems. For each of the considered load samples, the generator samples have been got accordingly by running optimal power flow (OPF) tool of Power-World software.
The input and output feature are x{delVbus,delPLoad,delPflow} and y{1,0}. Total of input features is 104, x{104(39+19+46)}. The number of output feature is one, y{1,0}. From simulating results, there are 1167 samples that include 834 S samples and 783 U samples. The K-NN (K=1) is used as a classifier for evaluating accurate classification because of its simplicity. Assessment of classification error is a cross-assessment method. It is a 10-fold cross-validation. The convergence characteristics of BPSO&1-NN variable selection algorithm are shown as Fig. 3 to Fig. 8. The results of the selected number of variables, the value of the best fitness function and the test error are presented in Table 1.

V. CONCLUSION
The paper successfully applied BPSO algorithm combined with 1-NN identifier in the variable selection approach to the problem of identifying stability of power system. Test results on IEEE-39 bus diagram showed that the number of variables decreased significantly, but the test accuracy still met expectations. This achieved result will be the driving force for the research and application of evolutionary algorithms to select variables for the problem of identifying stability of power systems.