http://section.iaesonline.com/index.php/IJEEI/index Dynamic security assessment for the power system in the presence of wind

Info 2021 Dynamic security is an essential requirement for operating a modern power system. Due to the global increase in load demand, modern power systems witness several dramatic changes in terms of size and implementation of new renewable sources. At the same time, the deregulation process in power operation policy is being pushed to operate closer to its security boundary limits. Based on the combined Decision Tree (DT) algorithm, namely Random Forest (RF) and advance attribute selection technique, this paper presents an approach to address these challenges related to dynamic security assessment (DSA) in the modern power system. The performance of study approach is demonstrated on a modified version of IEEE 9 and 14-bus test system models with presence of two wind turbines (WTs) type WTG 3. Results show the superiority of RF compared to other DT algorithms that are used in this study. In addition, the attribute selection technique could significantly affect the number of attributes required for DSA. This makes DT classifier more effectiveness in the online application. Thus, this approach can provide control center with vital information with high accuracy results and less attributes about security state direction that will help operator to take the right and fast steps to remedy problems and prevent a blackout from


INTRODUCTION
The dynamic security is one of a significant issue in power system operation [1]. Therefore, control center aims to assess dynamic security behavior after each disturbance occurred in the power grid via DSA tool [2]. The target is to keep power system in the security state following disturbances and prevent system collapse and blackouts [3]. Recently, power system has witnessed dramatic changes related to deregulation and the installation of new devices and technologies such as renewable generation sources [4,5]. The deregulation pushed the security boundary to their limits, especially with non-stop load demand [5,6]. While renewable energy sources offer many advantages in terms of reducing Carbon Dioxide and using free natural energy sources like wind, solar and hydropower energy [4,7]. Implementation of these sources has increased every year in different countries such as Denmark and Germany for the WTs [4,8] or India and Saudi Arabia for solar photovoltage [9] and People's Republic of China for the hydropower plant [10]. However, these renewable sources bring new challenges to dynamic security behavior because of nature of these sources are and their inconsistency in terms of voltage and frequency that leads to alter the power system's dynamic operation  [11][12][13][14]. Therefore, it is necessary to solve these dynamic security challenges to protect power system form the insecure state and use their renewable sources to benefit the generation sector with fewer problems in the operating environment.
DSA is used for the evaluation of power system is ability to withstand sudden disturbances and to survive the transition to an acceptable steady state [3]. Traditionally, DSA has multiple differential-algebraic equations to solve step by step by a time-domain simulation in offline environments [2,15]. Conventional equations expression can be written as shown, where only generators dynamics are considered [16]: where t is time, Mi denotes the i th machine inertia constant, ωi and (  ) represent its angular speed and angle, respectively, Pmi and Pei are its mechanical input and electrical output powers, respectively, IGi and VGi are its generator current and voltage, which are related to algebraic power flow equations. In general, based on the above equations, time-domain simulations need to study rotor angle waveform at the contingency based on the change in angular speed with respect to time. This process is complex due to alteration in rotor angle waveform which is based on type and time for each contingency and the amount Pmi and Pei for synchronous generators. Moreover, Pmi depends on a friction that changes with time and Pei depends on voltage and current that change with time too [4,16].
Additionally, installation of a new device technologies such as a phasor measurement unit that could bring a real-time picture of power system operation and at the same time bring a big data stream that should be solved in a short time frame [17]. Moreover, with an increased penetration of wind turbine farms in electrical grid, the uncertainty of dynamic security is increased. Thus, traditional time-domain simulation is considered insufficiently fast for online DSA tool [18].
A state-of the-art intelligent system has been used to improve online DSA tool in term of assessment accuracy and speed especially with the benefits of distributed computing or high-performance computing. In the application for DSA, the intelligent system was utilized as a knowledge base to build a classifier model based on the offline training stage. Then, based on the testing stage result, classifier model could be re-trained to improve DSA accuracy. Comparing with time-domain simulation, intelligent system needs less input attributes data and could give an illustration of the relationship between input data and the output security state of the power system (i.e. secure and insecure) in a short time frame.
In the literature many researchers are dealing with the challenge of DSA tool via the different intelligent systems where various algorithms are used to build the DSA classifier such as Support Vector Machine (SVM) [19] , Fuzzy Logic (FL) [20] DT [19,20] and Artificial Neural Network (ANN) [21][22][23][24]. Each of these research in [16][17][18][19][20][21][22][23][24] used various power system or various disturbance scenarios and these algorithms could successfully build an intelligent DSA classifier via training/ test process that used system measurements data as input and assessment system state as output. Input measurements data directly collected after the occurrence of disturbance. Where the output state will be depended on the violation of grid limits. However, each technique from studies above shows different results in term of classified error and computational time depending on the ability of the algorithms to discover the relationship between input feed and out state.
Despite that these artificial intelligence methods, especially DT, show outperformance compared with the intelligent systems. However, with the massive data measurements stream that is coming from a huge and sprawling electrical grid, dealing with big data is a challenge. The technique for dataset minimization, such as attribute selection, should be considered before sending a dataset of intelligence classified to build a more robust DSA classifier model.
With the continuous implementation for WTs in the modern electrical grid, various studies has been assessed the impact of WTs on the stability of the power system. In [27], relationship among integration of offshore WTs in power grid and the transient stability analysis of rotor angle, frequency, and voltage has been deeply discussed under various types of the capacity of the WTs generators and fault location. In [28], with the presence of WTs, transient stability was studied via using a risk assessment approach where this research approach could give an accurate estimation of consequence of the insecure events on entire power system. The effect of variation in speed of WTs has been compared with behavior of traditional synchronous generator on the power system stability margin in [29]. In [30], effect of wind turbine type (FSIG) on dynamic stability has ISSN: 2089-3272  Dynamic security assessment for the power system in the presence… (Saraa Ismaeel Khalel et al) 565 been studied in the 3-machine test system model, the authors concluded that this type makes the test model vulnerable to faults due to voltage stability issue. Extreme Learning Machine (ELM) was used in [31] to develop an intelligent DSA with presence of DFIG which is a typical wind turbine with a maximum output of 2 MW and the results show an acceptable result but with a little bit high Root Mean Squared Error (RMSE).
In terms of control center decision, that could add a high cost to the operator, if any mistake happened, an accurate DSA result will play vital matters to reach the right decision for the control center. Thus, in this paper, to address the previous demerits and improve DSA result in a power grid with the presence of wind turbines. This study presented a robust approach based on the DT algorithm with advanced attribute selection where DT algorithm training on various disturbance scenarios with WTs making DSA classifier able to discover the difference in the patterns of measurement data where WTs could influence the whole system at disturbances events. Additionally, attribute selection technique could reduce number of attributes needed for the classification of the classification by removing irrelevant attributes form data, and this technique increases DSA accuracy and reduces time for data processing.
The rest of this paper is organized as follows, section 2 gives in details the proposed approach steps, flowchart, and explanation for it. Where section 3 provides details of the test system model. Then, results of this paper are demonstrated and discussed in section 4. Finally, the conclusion that summarize what has been done in this paper are presented in section 5.

PROPOSED SCHEME
The flowchart in Fig. 1, describes the proposed five steps scheme for this study. First, represent the test system model via simulation program, next apply disturbance scenarios to test the model, and collect all measurements to build the dataset. After that, train the intelligent system to build an intelligent system with the classifier model. Finally, demonstrate result of DSA based on the dataset for the test system model. The first stage includes representing the test system model via simulation program. In this paper, PowerWorld simulation has been used to represent process of all testing system components and the dynamic value for generators. PowerWorld has highly active power analysis software which has the ability to solve any power system model with 250 thousand buses [32][33][34]. To represent the effect of WTs on the DSA, the wind turbine type (WTG 3) model was used as distribution generators connected to test system model near the load buses. The second stage contains applied disturbance scenarios in the test system model. These scenarios were selected based on the frequent disturbances at different load that could happen during the normal operating day such as balanced three-phase faults that could happen due to a lightning strike, an open transmission lines, an open circuit breaker or a fault on maintenance purpose and so on. The reason to make the dataset generated near to the real world as possible. The details of these disturbance cases below, where different loads were used including 100 %, 110% and 120% of normal load. 1.
Apply balanced three-phase faults on the test system at normal load then clear it.

2.
Open one transmission line from the test system at 100% and 110% of normal load respectively. Open two transmission lines from the test system at 100%, 110% and 120% of normal load respectively. At the third stage, all of the measurements for the rotor angle in the generator, the bus frequency, and bus voltage for all buses are recorded after each disturbance. These measurements represent the stability criteria for the dynamic behavior power system [16]. Then, all these measurements were recorded in a dataset matrix where each row contains measurements for a disturbance scenario followed by the security state where "1" secure and "0" insecure. Classification of security state (i.e. 1 or 0) will depend on the stability criteria as shown in Table 1. After assigning security state for all types of disturbances, this dataset matrix used to build a DT classifiers stage number four through divide dataset into two different sets, the first set is called a training dataset and this section represents 66 % of the whole dataset. This set is used for training the DT classifier model to discover the relationship between input measurement (rotor angle, bus voltage, and bus frequency) and the output state for the DSA (secure or insecure). Then, classifier model is tested by the remaining datasets called a test dataset (i.e. 34 %) to calculate the DSA accuracy results. Finally, if DSA results are unsatisfactory this process (step number four) will be repeated again until it reaches the best performance for the DSA classifier model.

CASE STUDY
The proposed methodology is demonstrated in the modified IEEE-9 and 14 test systems model. The difference between the modified and the standard model is that there is an additional bus to connect a synchronous generator to the rest of the network via an ideal transformer [35]. Fig. 2 visualizes the modification process of the test system model. The IEEE 9-bus modified test system consists of 3 synchronous machines. There are 12 buses, 6 transmission lines, 6 transformers and 3 constant impedance loads. The total load demand is 315 MW and 115 MVAR. To represent the effect of a wind turbine in the test system, two wind turbine type (WTG 3) were added to bus 5 and 6 respectively near the load as shown in Fig. 3. While, the IEEE 14-bus modified test system consists of 5 synchronous machines, 19 buses, 17 transmission lines, and 8 transformers. The total load demand is 259 MW and 73.5 MVAR. As in test system above, two wind turbine type (WTG 3) were added to bus 12 and 14 respectively as explained in Fig. 4 that shows this modified 14-bus test with two WTs. Usually the power generation from a wind turbine is between 1-5 MW. In this paper, the value for each one is machines. The WTG3 model is represented for wind turbine doubly-fed generators. This model has a wider speed range with separate control of both real and reactive power. Moreover, exciter model type WT3E is used to model the reactive power control of WTG3 model, also Governor model type WT3T is used to model inertia of the wind turbine and its pitch control and finally, type WT3P model is used as a stabilizer [36].

THE RESULT AND DISCUSSION
Based on the methodology of this research, different types of disturbance scenarios were applied to the modified IEEE 9 and 14-bus test system model. The target is to build a dataset for the intelligent system classifier. The reason behind chosen modified IEEE 9 and 14-bus, was to show the effect of fluctuation of WTs on a small test system. Where, if choose a bigger system, the effect of WTs will be small on the whole network. To clarify the effect of disturbance on the test system model, take effect of the open transmission lines between bus 2-16 and bus 2-1 is measured for modified IEEE 14-bus test system model. disturbance on rotor angle where the rotor angle of generator connected to bus 16 is separated from the rest of generator and at time 1.5 second the difference was more than 180 due to disturbance, therefore, this case is considered insecure for the generators. Figure 5. Rotor angle responded after disturbance for modified IEEE 14-bus test system model At the same time, Fig. 6 shows value of the buses frequency up and down after disturbance then, the values of buses frequency will be out of security frequency limit mentioned in Table 1, also the bus voltage is out of limits (above and under 0.9-1.1 per-unit) as shown in Fig. 7, therefore, all security limits have been violated and system is considered insecure. While Fig. 8 shows affect of disturbance on the buses voltage that connected to WTs and these two buses still fluctuate for a while due to nature of wind turbines. Based on the 102 cases of disturbance scenarios for IEEE 9-bus result and the security criteria limits, there are 58 secure states and 44 numbers of insecure states. This dataset contains 29 attributes (5 attributes for rotor angle, 12 attributes for bus frequency, 12 attributes for bus voltage and 1 for security state) as a row and 102 column or instances representing all disturbance scenarios that are considered in this paper. As the same, for the IEEE 14-bus, there are 78 secure states and 54 numbers of insecure states. This dataset contains 46 attributes (7 attributes for rotor angle, 19 attributes for bus frequency, 19 attributes for bus voltage and 1 for security state) as a row and 132 columns representing all disturbance scenarios that assumed in this study.
As explained before this dataset is divided into two-part, the first part, 66 % of dataset is allocated for training purposes and 34 % for testing [37]. In general, choice for the training and testing set of data could be manual or random. Training stage will play an essential role in building a robust DSA classifier model, therefore, train the classifier based on the different state for power operation is very important, for example, WTs can be inactive for a while due to weak wind flow, therefore the classifier should be trained based on a dataset with and without a wind turbine. Also, in the online stage, for the new operational case that the classifier model could not give satisfactory DSA results, new tuning or training in a short time frame is essential to enhance classifier model result.
After collecting all measurements and put in one datasheet as explained in step number three of study methodology, the next step is build classifier. To build a DSA intelligent system, one of the most powerful DT algorithms that is RF was used to build DSA classifier. RF classifier can be used for both classification and regression tasks random forest. Another advantage for the RF is that it can handle the large dataset, missing values in the dataset and the RF won't overfit the classifier model. RF has various applications in distinct types of knowledge, such as application financial, business sector or in the game tools like Xbox Kinect.
In fact, in the DT algorithms, there are many types they share the main idea for DT, nevertheless, they have different ways to reach the classification target. Therefore, to compare the performance of the RF algorithm with other DT algorithms in term of DSA classifier result, another three DT algorithms namely J48, Logistic Model Tree (LMT), and Reduced Error Pruning (REP) algorithms are considered. These algorithms are widely implemented in various other fields such as weather prediction, image simulation, and medical application [34]. It is worth noting, Waikato Environment for Knowledge Analysis (WEKA) program [38] was used to build the DSA classifier. WEKA program provides implementations of learning algorithms that can be easily applied to any dataset.
After training/ test process and reach the optimal results for the above-mentioned DT algorithms, Table 2 shows the result of application of four DT algorithms on the same dataset for the IEEE 9 and 14-bus test system model where accuracy and RMSE for each algorithm is recorded. RMSE is a measure of the difference between each observed value and the predict model and any difference is an error. The Root mean squared is to take the error of each one of these observed value points, square it and add them together, then take the average and take the square root of that. The general formula for RMSE is: From the result, the RF outperforms the others of DT algorithms where the accuracy reaches up to 90 % for IEEE 9-bus with lower RMSE of 0.2646 and for IEEE 14-bus the accuracy 95.5556 % with less RMSE of 0.1921. This advantage for RF is due to the nature of this algorithm where RF has multiple trees are grown compared to single tree in other models to classify a new object. Each tree classifies the attributes and save its votes for a specific class. Then this algorithm chooses the classification that has the most votes over all the other trees in the forest. Another advantage for RF is that it can handle large dataset, missing values in the dataset and the RF won't overfit the classifier model.
On the other hand, accuracy of REP algorithm is equal to 85% and 88.8889% for IEEE 9 and 14-bus respectively. Where REP use a technique call (pruning) to decrease size of DT by extracting the insignificant sections of a root node that do not affect the classification of data then these insignificant sections of node are removed from the process. This process will decrease the time required to build the classifier tree however as result, this method has a little effect on accuracy. Where the lower accuracy in DSA means high cost for the system operator. In DT, branches at lower-levels of the tree become smaller and smaller that will lead to an increase in the number of terminal nodes that leads to a reduction in the accuracy as in J48 algorithm where accuracy is 84.3137% for IEEE 9-bus and 82.2222% for the IEEE 14-bus, therefore, LMT replaces terminal nodes of a lower level of the tree with logistic regression functions to find the linear relationship in the dataset that will enhance accuracy for IEEE 14-bus by 6.6667 % and reduce RMSE by 0.0921 compared with J48 as in Table 2. However, LMT algorithm approach affect the time need it for building the classifier model.
In order to improve the RF algorithm, attribute selection was used to reduce irrelevant attribute from dataset before applying DT algorithm. In general, this technique searches in the attributes of the matrix whose Relationships for each attribute (such as A) with another dataset attribute (such as B, C, and D).

2.
Relationships for each attribute with the class target (C). And if the relationships between attributes such as A & B are higher than the relationships between attribute A & target (T), that means that the attributes have a high correlation with each other and less correlation with the class target in other words, this attribute could be ignored because the target is less dependent on it. If the relationships between A & C are higher than A & B, that means the attributes have a high correlation with the class target and must be kept. The result will be only the worthy attributes for classification. This is a general idea for any attribute selection algorithms and the difference is how each one of them reaches the target by its own mathematical model. Success for each model depends on the ability of the mathematical model to discover this relationship between attributes and target.
From Table 3 attribute selection reduced the total number of attributes from 29 to 11 for the IEEE 9bus and 45 to 14 for IEEE 14-bus with enhanced accuracy by 1.4286 and 2.2222 % for the IEEE 9-bus and for IEEE 14-bus respectively. Due to the high-cost of the protection procedures, this accuracy increase is very important to make the control center choose the right steps to save the electrical grid form the insecure operation state. Moreover, this reduction is vital to reduce the processing time for the online DSA especially since the electrical grid includes massive measurements data stream that needs time to solve it. From the Table 3, the RMSE was increased by only 0.0133 for IEEE 9-bus and 0.0025 (around 1.3 %) for IEEE 14-bus and this percentage is accepted based on the definition of RMSA. Form the results, RF shows a better performance compared to other DT algorithm and this is due to the work idea of this algorithm. Where, to improve accuracy and reduce the errors of individual classifiers, RF use an ensemble technique with learning algorithms that use a weight-aware approach for individual classifies.
To compare study approach with other test case methods or Based on the liter review the applying of data mining technology could be highly efficient. To assess the security according to SVM ensemble and boosting learning model for DSA a method was proposed in [1]. The estimation precision for insecure state approaches 97% for the first presented method, which is tested on an altered New England 39 bus system. Nevertheless, the precision of performance indicators of the classifiers reduced to 95.2% when evaluating the proposed model in a larger system that is AC/DC hybrid power system of Shandong. In [39], a method for multiple contingencies to examine the security of the power system operation utilizing a multiway decision tree at both light and heavy loads for the part of the Brazilian Interconnected Power system is proposed. The method showed good results, but with differences in the accuracy of the results according to the adopted method and according to different load values. At the same time, this method suffered from a considerable computational complexity. This will present an important challenge for the work of DSA classifier. A twostage Bayesian learning-based method for the assessment of online dynamic security and preventive control is presented in [3]. This method was applied on the IEEE 39-bus test system model at various active power generation and load levels. Although this method gave better results than the traditional methods, however, these results of this DSA classifier may be less able to adapt in cases of unexpected changes in the system's topology and operating condition. A DSA method that uses ensemble-decision tree classification was presented in [40]. It was examined on two different cases: on IEEE 118-bus and IEEE 300-bus. The results of ensembledecision tree methods offered improved precision contrasted to different single learner methods that were utilized in this paper. Even though, the estimated precision dropped from 94.4% to 91.44% (3.13% deterioration) for the unobserved test instances for the IEEE 300-bus systems. IEEE 14-bus test system model with the employment of wind turbines was utilized to enhance the DSA tool via intense learning mechanism in [4]. The result of this study demonstrates 97.5 % precision, but the time required for tuning the classifier is above average. Compared to the previously reviewed studies in this research, the approach that was used in this paper demonstrates good performance for DSA with increased of test system. Furthermore, the realization of feature selection methods could eliminate other superfluous and non-relevant characteristic which influences the DT classifier result and make its performance better and make it good for the online DSA application.