Micro-grid is a part of power system that contains large number of sources and loads. Most of the sources used in micro-grid are among the renewable resources connected to the micro-grid via power electronic devices (such as inverters and converters) . A micro-grid can operate in two states: connected to and disconnected from the main power grid. Micro-grid is connected to and disconnected from the main power grid by means of a fast semiconductor switch referred to as “static switch”. Static switch is an element which must act against all short circuits in microgrid and disconnect the micro-grid from the main network . Fig. 1 illustrates position of static switch in the microgrid with respect to the main power grid.
Fig. 1.General scheme of a micro-grid and static switch
Single-phase-to-ground and two-phase faults are respectively detected from zero and negative sequence components of current [3-4]. Nevertheless, the micro-grid contains imbalanced single-phase and three-phase loads in general conditions [3-6] and zero and negative sequence components of current are also non-zero under normal operation conditions of micro-grid. Zero sequence components also can be used for detecting ground faults . In order to detect fault on the feeder, equality of currents in initial and terminal breakers of feeder are used . In some large micro-grids, over-current relays are coordinated for over-current protection and detecting the faults [9-11].
Over-current relays are used for detecting symmetrical faults (3-phase faults) with symmetrical current components method for identifying the asymmetric faults. The protective systems proposed in the aforementioned references are not highly precise in detection of asymmetrical faults and also detection of fault in load imbalance state. Also, incapability of differentiating power swings from short circuit can be mentioned as their greatest weak point. Incorrect detection of fault in load imbalance states is resolved by using zero and negative sequences of current .
In this paper, a new ANN based method is proposed for detecting all short-circuits in both balanced and imbalanced load states and power swings based on micro-grid impedance and the rate of impedance variations in PCC bus. In this method, reduction of micro-grid impedance below a certain level reflects occurrence of short circuit and/or power swings in the micro-grid. Then, based on impedance variation rate and also application of a neural network, power swings are distinguished from short circuit. Therefore incorrect performance of the static switch in disconnection of micro-grid from the main power grid in the event of power swings is reduced.
2. Detection of Short-circuit Using Sequence Components and Over Current Relays
Symmetrical components of current or voltage in any 3-phase power system can be derived through Eqs. (1) and (2):
Where; k0, k+, and k− respectively represent parameters of zero, positive, and negative sequence components, and, ka, kb, and kc are respectively different 3-phase sequence component parameters, and, a = 1∠120° . This equation is briefly written in the form of Eq. (2):
Where; k0+− are symmetrical components, A is conversion matrix, and kabc is 3-phase components vector.
In normal performance condition of a power grid, values of zero and negative sequence components are zero or negligible for the network voltage or current vector, and, value of the positive component is the same as to the value of the 3-phase voltage. In the event of any contingency in the system (such as short circuit, imbalance in loads, power swings, and so on), negative and zero components of current and/or voltage are dependent on the fluctuation level; the more intense power swings will result in zero and negative components with higher amplitudes and positive components with lower amplitude.
Using amplitudes of zero, negative and positive components, the over current relay are detected as single-phase- to-ground, two-phase, and three-phase short circuits, respectively. In certain cases, imbalance might occur in 3-phase currents due to presence of single-phase loads leading to increase in amplitude of zero and negative components of the current. For preventing from improper performance of protective relays due to load imbalance, some percentage is assigned to amplitudes of zero and negative components of the current. This percentage is assumed equal to 20% in . This is not a reliable method to be used in fault detection. The same statement is true for transient swings as well.
3. Detection of Short Circuit by Using Impedance Variation
This paper proposed a detection method of short circuit in micro-grid based on impedance variation. The equivalent positive sequence impedance of a micro-grid is evaluated using Eq. (3):
In Eq. (3), I, V and Z respectively represent the equivalent current, voltage and impedance of the network.
In normal performance condition of micro-grid, magnitude of this impedance is greater than or equal to minimal equivalent impedance, which is the Thevenin impedance at the PCC point when minimum amount of load are connected to the micro-grid.
Current and voltage of micro-grid respectively increases and decreases when short circuit happens, and consequently, the equivalent impedance of the micro-grid will decline. If fault detection is based on amplitude variations of current sequence component, only one parameter is effective for fault detection. But, in the case that fault detection is based on amplitude variations of network impedance, the decisions are made based on variations of two parameters of the network (current and voltage) and have higher reliability and more precise detection compared to single-parameter state. Load imbalance creates mistaken detection in identifying the faults using components of zero and negative sequences.
Generally, load imbalance that usually occurs in micro-grids causes an error on detection of short circuit faults in micro-grids. One the advantages of the impedance based method is that the load imbalance does not result to have an error on the short circuit fault detection. The main reason is that this method is not sensitive to components of zero and negative sequences. Likewise, by using this technique, the protection system is able to detect variety of symmetric and asymmetric faults by means of a mechanism.
4. Power Swings
Power system contingencies such as generator disconnection, connection of induction motor to the grid, and sudden large load change are the main causes of power swings. During power swings, variation in voltage and current is high, and normally, voltage and current respectively undergo severe reduction or increase, and their values might exceed the permissible limit, activating the protective system. Also, during power swings, the equivalent impedance of the power system decreases as well, and in most cases leads to improper performance of the distance relays in power grids .
It is highly significant to differentiate power swings from occurrence of short circuit in the power system so as to prevent from improper performance of the system, enhancement of reliability, and reduction of reasonless power outages.
Detection of power swing might be based on the detection of the impedance crossing of a band surrounding the distance trip characteristic. Obviously, the duration at which the relay detects power swing depends on the size and shape of the distance trip characteristic as well as characteristics of the system contingency .
The most common way to detect the power swings is to measure the impedance of positive sequence. Under normal operation conditions, the measured impedance is equal to the load impedance whose locus is away from the distance relay protection zone. In the event of any fault on the protected line, the measured impedance immediately moves to the distance relay protection zone whereas the measured impedance moves slowly in the impedance plane during a power swing.
Accordingly, the conventional method of detecting the power swing is to use the difference between rate of impedance variations during a fault and during a power swing to differentiate between a fault and a swing. The derivative of impedance function is taken as follows: if the impedance characteristic of a sample position is represented by two concentric circles in Fig. 2 separated by ΔZ impedance from the other, the duration elapsed for the impedance to pass through these circles is measured using a timer. It means that as the impedance position moves into the outer zone, the transition time begins to be calculated until it reaches to the inner zone .
Fig. 2.Conventional blinder schemes for power swing detection
In micro-grid also, items such as connection and disconnection of larger loads, induction motors and so on can cause power swing, which leads to errors in performance of the protective system which operates based on impedance reduction. The reason is that impedance of power grid undergoes severe reduction and the protective system works improperly in power swing state similar to short-circuit occurrence (due to increase in current and voltage reduction in certain cases). Some measures are always taken into account in such protective systems for power swing blocking. In large power systems, power swing blocking systems are designed through determining domains based on long power transmission lines coupled with considering variation rate of impedance. However, it is not possible to implement power swing blocking systems (which are designed and used in large power grids) in micro-grids because of their small-scale network, low voltage level, and also absence of long transmission lines.
5. Artificial Neural Network
ANN is a sort of computational model highly capable of non-linear reflection, and for the same reason, is applied in different fields, including: pattern recognition, automatic control and etc.
For comprehensive evaluation, it is needed to determine the precise model of system, and evaluation is based on certain sample data which might be precise. Except for this advantage, the complete model of a system for evaluation of the ANN presents the evaluation in optimal states and shorter duration.
Furthermore, neural networks have good features such as self-organization and self-compatibility; they are capable of making decisions among several uncertain environments even in contradictory sciences. Ann’s are multi-layered networks in which many simple and interrelated neurons are used for simulation of human brain’s structure and function. At present, the back-propagation (BP) neural network is the most popular choice among other neural networks; these networks usually consist of input layer, several hidden layers, and output layer. The two-layered structure of a BP neural network is illustrated in Fig. 3. 
Fig. 3.Structure of two-layer BP network
The learning process of BP network is described as follow:
Step 1: Use of small random numbers for initial values of networks weights (Wji and Vkj) and threshold (γk and θi).
Step 2: Entry of the first sample under study.
Step 3: Calculation of neuron (Uj) input and output (Hj) for the hidden layer by using Eqs. (4) and (5) as follow:
In the formula, Wji is the weight of input to the hidden layers. Ii is the input value from the input layer and also the value of the sample under study. θj is the threshold of hidden layers, function “f ” is the sigmoid function, and: f(U)=1/(1+exp(−U)).
Step 4: Calculation of neuron input (Sk) and output (Ok) from the hidden layer:
In the above equations, Vkj is weight of the hidden layers to the output layer, Hj is the output of hidden layers, γk is threshold of the output layer.
Step 5: Calculation of error in the output layer:
In this equation, Ok is the output value of the output layer. Tk is the mathematical expectation of the sample under study.
Step 6: Calculating the, σj error of the hidden layer
Step 7: Adjustment of Wji weight and θj threshold of the hidden layer and Vkj weight and γk threshold of the output layer neuron as follow:
α and β are constants.
Step 8: Entry of the next sample under study for training until all the samples are trained.
Step 9: Calculation of sum of errors of all samples under study:
In this equation, n represents number of samples.
If the sum of the differences E is given less than the error interval, the training process will be stopped, otherwise the training must be iterated again .
6. Application of ANN in Power Swing Detection
As stated in Section 4, it will not be possible in micro-grid to determine minimal and maximal domains for the micro-grid impedance due to lack of long transmission lines. Impedance variation rate at the time of short circuit occurrence is more intense than the variation rate at the time of power swing occurrence. This paper proposed a method based on ANN recognition for differentiating power swings from short circuit in micro-grid and at this voltage level.
Derivative of equivalent micro-grid impedance in terms of time represents impedance variation rate. Impedance variation amplitude at the time of short circuit occurrence is larger than impedance derivative amplitude in power swing occurrences. Therefore, based on analysis of impedance derivative amplitude, occurrence of power swings is differentiated from short circuit. For this purpose, an interval must be considered for derivative amplitude in order to distinguish power swings from short circuit occurrences. Yet, due to absence of long power transmission lines in the micro-grid, these intervals cannot be determined like the operation domains of distance relays in large-scale power grids.
Here, an ANN network was applied for differentiating power swings from short circuit in order to solve the problem of determining domain of impedance variation rate. The equivalent impedance derivative of micro-grid in the time interval of 1 millisecond is used under all three states of short circuit, power swings and normal operation as the training model of the ANN.
Derivative of equivalent micro-grid impedance in the time interval of 1 millisecond is fed to the ANN to differentiate between two states of occurrence and nonoccurrence of short circuit (i.e. the grid either working under normal operation condition or power swing occurrence).
If the network output is one, the detection will be short circuit occurrence, and, if the output of neural network is zero, the micro-grid will have normal operation condition or power swing.
This two-layered ANN contains 15 and 1 neurons in the first and second layers, respectively.
The maximum of epoch is 100, and weights adjusting parameter are: α=0.5, β=0.6.
Back-Propagation algorithm is used for ANN training. Number of training patterns is 60; 45 training patterns were applied for training of the network, among which 15 patterns belong to impedance derivative in short circuit state, 15 patterns are impedance derivative in power swing occurrence state, and 15 patterns apply to the normal operation conditions of the micro-grid. Each training pattern has 27 features which represent impedance derivative vector of the micro-grid in the time interval of 1 millisecond. The ANN is trained using Eqs. (4) through (18) and the procedures explained in Section 5. The remaining 15 patterns were used for testing the neural network. After training, the ANN fault was obtained equal to 3.06×10−3 . Thus, this method is proved to be efficient. The error decrease during training condition of the ANN is shown in Fig. 4.
Fig. 4.BP ANN error during training process
In addition, a bidirectional sigmoid function and a linear bidirectional function are used for Layers I and II, respectively.
Performance of fault detection system based on ANN is shown as a flowchart in Fig. 5. Current and voltage of PCC point is measured in any moment, and in the next step, the equivalent impedance of the micro-grid is evaluated using Eq. (3). The variation rate of impedance will be computed if the calculated impedance is less than the minimal equivalent impedance of micro-grid. Then, variation rate of impedance is input to the fault detector which has been designed based on ANN. If the detector recognizes that this impedance reduction is due to short circuit occurrence, the static switch is commanded to open, and, the protective systems will be prevented from operation if the device realizes this impedance reduction as a result of power swing occurrence.
Fig. 5.Flowchart of performance of fault detection system based on neural network
To obtain training patterns for the neural network, the variation of the impedance is measured in the following three steps:
Variation of short circuit impedance for different locations and levels. Variation of impedance values for different loads with power fluctuations. Variation of impedance for normal operation modes with different load values.
7. Test system
The micro-grid illustrated in Fig. 5 is used in this study . MATLAB software for implementation of the proposed protection method is employed. As observed in Fig. 5, the micro-grid is a 380 V distribution feeder connected to the 22.9 KV distribution grid through transformer and static switch. The system consists of two diesel generators (DG1 and DG2), one photovoltaic cell (PV), a wind turbine (WT), four loads, three short distribution lines, and a static switch (SS or STS) . DG1 and DG2, wind turbine and PV cells are modeled based on [18, 17] and  respectively.
The micro-grid specification in grid connected mode is shown in Table 1.
Table 1.The micro-grid specification
8. Simulation Results
The simulation results of the proposed method are presented in this section. Current and voltage waveforms at PCC point of the system in connection-to-grid in normal operations states are demonstrated in Fig. 7. The static switch is regarded as one of the protective parts. Hence, it must be disconnected from the main power grid in the event of short circuits in the micro-grid. Protective decisions are made based on the current and voltage waveforms. Fig. 8 illustrates the equivalent micro-grid impedance from PCC point. This impedance is derived using Eq. (3).
Fig. 6.Single line diagram of the test system
Fig. 7.Current and voltage waveforms at PCC point for normal performance of micro-grid in grid connection mode: (a) Current waveform; (b) Voltage waveform
Fig. 8.The equivalent impedance of micro-grid in the normal state
The shown impedance in Fig. 8 can be calculated by division of the measured voltage divided by the current measured at the PCC for all operation statuses including both normal operation and short circuits. Owing to normal operation of micro-grid, the impedance is also equal to a constant value. The impedance value will remain constant and in the form of a straight line nearly parallel to Y axis versus time as long as no changes occur in the power system and micro-grid.
The equivalent impedance of any power grid in its normal performance condition varies within a certain range. Here, the short circuit is detected using this impedance range. Initially, the positive components of the current and voltage at PCC point are evaluated via Eq. (1), and then, the equivalent impedance of micro-grid is obtained through substituting these values into Eq. (3). The equivalent impedance of micro-grid is almost constant in the steady state and this impedance increases or decreases in the event of any variation in the system.
In short circuit occurrences, the equivalent impedance of system decreases severely due to increase in current and reduction in voltage. At t = 16 sec, micro-grid undergoes 3-phase short circuit which is cleared after 0.04 second and then returns to its normal operation state. Figs. 9 demonstrate current reduction and voltage increase during short circuit occurrence; the system is shown to recover its normal performance state following the short circuit. Fig. 10 shows the variations of magnitude of equivalent microgrid impedance during occurrence of single-phase, twophase and three phase short circuits in t = 14s, t =15s and t =16s respectively. Before the short circuit, magnitude of the equivalent impedance is almost equal to a constant value and suddenly declines after short circuit occurrence and returns to the former value after alleviation of short circuit.
Fig. 9.Current and voltage waveforms in three-phase short circuit state: (a) Current waveform; (b) Voltage waveform
Fig. 10.Variations of micro-grid impedance after short circuit occurrence
In addition to the time of short circuit occurrence, the equivalent impedance of the micro-grid declines in the event of power swings and the protective system shall not work. For instance, the equivalent micro-grid impedance also decreases if a large part of micro-grid load or an induction motor is connected to or disconnected from the micro-grid. Fig. 11 demonstrates impedance variations and static switch performance during sudden 20% micro-grid nominal load increase at t= 14s, connection of an 80 KVA induction motor to the bus attached to the diesel generator 1at t=15s and also, short circuit at t= 16s.
Fig. 11.Variations of micro-grid impedance in short circuit (SC) states and variety of power swings (PS)
In Fig. 13, impedance is observed to decrease in three times: t1=14 sec when 20% is added to the micro-grid load, t2=15 sec when the induction motor is connected to the bus attached to the diesel engine, and t3=16 sec when short circuit occurs. The protective system issues the “open static switch” command in both t1 and t2 times because of improper detection.
Fig. 13.Differentiation of normal operation state and power swing (PS) occurrence from short circuit (SC) by using the proposed method
Taking into account the problem of fault detection method based on impedance reduction technique in power swing occurrences, the variation rate of impedance is monitored as a solution. Impedance variation rate is in fact the derivative of impedance variation curve. Differentiation from the diagram of Fig. 11 will yield the variation rate of impedance according to Fig. 12.
Fig. 12.The rate of impedance variation of the micro-grid
In impedance reduction method, power fluctuations have significant impact on short-circuit fault detection. Fig. 12 shows the impedance variations based on power fluctuations and short circuit fault.
As observed in Fig. 12, rate of impedance variation in short circuit occurrences is more intense than during power swing occurrences. In Fig. 12, derivative of the equivalent impedance variations at times t =14 and 15 seconds have a smaller amplitude compared to t =16 sec when short circuit has occurred. Accordingly, using the same impedance variation rate, occurrence of short circuit can be differentiated from power swing occurrences in the micro-grid. Since no limited range can be theoretically determined such that higher impedance variation rate is recognized as short circuit and lower impedance variation rate is identified as non-occurrence of short circuit, a neural network was used to resolve this problem. The training pattern is obtained from vectors of derivative of equivalent impedance variation in time interval of one millisecond for any contingencies in micro-grid. This ANN differentiates the normal operation state and power swing occurrences from short circuit with an error of 8.3*10(−4). Proper performance of the proposed method for static switch operation is illustrated in Fig. 13.
Fig. 13 illustrates proper performance of the proposed method for correct detection of power swings from short circuit. The proposed method does not trigger “open static switch” in the event of power swings, and, the static switch still remains in the close state. But, “open static switch” command is triggered at t=16 sec when short circuit occurs to disconnect the micro-grid from the main power grid.
It should be stated that occurrence of a short circuit isolates the micro- grid from gird. Therefore, in order to balance the micro-gird, load shedding should be applied by the micro-grid load management system.
Static switch is among the protective parts of micro-grid which undertakes the duty of disconnecting the micro-grid from the main power grid. This paper proposed an ANN base static switch control in micro-grid. This method is able to differentiate short circuit from power swings by measuring impedance and the rate of impedance variations in PCC bus. The proposed method also detects the transient states of very short swings such as sudden load increasing and induction motor starting occurring in the system which are not faults but cause instantaneous current increase and instantaneous voltage reduction and prevents from operation of protective systems under such circumstances. Simulation results show the ability and higher reliability compared to the fault detection methods based on symmetrical sequence components and over-current relays.