2. Power system analysis methods

An electric power system is sometimes very complex to analyze using hand calculations especially, if there are nonlinear equations, and a high number of buses. Human can deal with little number of buses, and if the number of buses is high, the hand calculations are very complex. In the Newton-Raphson method, computer software may solve up to 100,000 or 150,000 buses in very short time, and more accurate when converging to the final solution obeying a specified level of tolerance. For the unbalanced faults, one must calculate the sequence and phase of voltages and currents depending on the type of fault, but computer software will calculate these values within few milliseconds and very accurately. Finally, for the economic dispatch, the value of the incremental cost and the generated powers will change as the value of the demand changes. Thus, the software performs several calculations as the load changes.

The MATLAB tool we are preparing performs several objectives through many power systems methods including: (i) the unsymmetrical faults analysis including line-to-ground fault, lineto-line fault, and double line-to-ground fault, (ii) the Newton-Raphson method, and (iii) the economic dispatch.

#### 2.1. Unsymmetrical faults analysis

Short circuits occur in three-phase power systems as follows, in order of frequency of occurrence: single line-to-ground, double line-to-ground, and balanced three-phase faults. The path of the fault current may have either zero impedance, which is called bolted short circuit, or nonzero impedance.

When an unbalanced fault occurs in an otherwise balanced system, the sequence networks are interconnected only at the fault location (Figure 1). As such, the computation of fault currents is greatly simplified by the use of sequence networks.

Figure 1. Schematic representation of unsymmetrical fault.

As in the case of balanced three-phase faults, unsymmetrical faults have two components of fault current: an AC or symmetrical components including sub-transient, transient, and steady-state currents, and a dc component [1, 2].

#### 2.1.1. Unbalanced faults analysis

engineering students in the Lebanese International University. Since its adoption, students show better understanding of these concepts. In addition, they were able to enhance their basic

An electric power system is sometimes very complex to analyze using hand calculations especially, if there are nonlinear equations, and a high number of buses. Human can deal with little number of buses, and if the number of buses is high, the hand calculations are very complex. In the Newton-Raphson method, computer software may solve up to 100,000 or 150,000 buses in very short time, and more accurate when converging to the final solution obeying a specified level of tolerance. For the unbalanced faults, one must calculate the sequence and phase of voltages and currents depending on the type of fault, but computer software will calculate these values within few milliseconds and very accurately. Finally, for the economic dispatch, the value of the incremental cost and the generated powers will change as the value of the demand

The MATLAB tool we are preparing performs several objectives through many power systems methods including: (i) the unsymmetrical faults analysis including line-to-ground fault, lineto-line fault, and double line-to-ground fault, (ii) the Newton-Raphson method, and (iii) the

Short circuits occur in three-phase power systems as follows, in order of frequency of occurrence: single line-to-ground, double line-to-ground, and balanced three-phase faults. The path of the fault current may have either zero impedance, which is called bolted short circuit, or

When an unbalanced fault occurs in an otherwise balanced system, the sequence networks are interconnected only at the fault location (Figure 1). As such, the computation of fault currents

changes. Thus, the software performs several calculations as the load changes.

knowledge and improve their way of thinking.

100 Science Education - Research and New Technologies

2. Power system analysis methods

economic dispatch.

nonzero impedance.

2.1. Unsymmetrical faults analysis

is greatly simplified by the use of sequence networks.

Figure 1. Schematic representation of unsymmetrical fault.


#### 2.1.2. Single line-to-ground (SLG) faults

Unbalanced faults will disturb the balancing of the network at the fault location. Therefore, the sequence network should be combined together with respect to the type of fault. A detailed derivation of these relationships will be discussed through this paragraph [3].

The terminal voltage at phase "a" can be transformed into its sequence components as:

$$V\_a = V\_a^0 + V\_a^+ + V\_a^- \tag{1}$$

$$I\_a^0 = \frac{V\_a}{\Im Z\_f} = \frac{V\_a^0 + V\_a^+ + V\_a^-}{\Im Z\_f} \tag{2}$$

The only way that these two constraints can be satisfied is by coupling the sequence networks in series as shown in Figure 2.

#### 2.1.3. Line-to-line (LL) faults

The second most common fault is line-to-line, which occurs when two of the conductors come in contact with each other [3].

Figure 2. Coupling sequence network for line-to-ground fault.

$$V\_a^+ = V\_a^- + I\_a^+ Z\_f \tag{3}$$

To satisfy: I � <sup>a</sup> ¼ �I þ <sup>a</sup> , V<sup>þ</sup> <sup>a</sup> ¼ V� <sup>a</sup> þ I þ <sup>a</sup> Zf , I<sup>0</sup> <sup>a</sup> ¼ 0, the positive and negative sequence networks must be connected in parallel (Figure 3).

#### 2.1.4. Double line-to-ground (DLG) faults

With a double line-to-ground (DLG) fault, two line conductors come in contact both with each other and ground [3] as shown in Figure 4.

$$V\_a^0 - V\_a^+ = \Im I\_a^0 Z\_f \tag{4}$$

To satisfy: Ia ¼ I 0 <sup>a</sup> þ I þ <sup>a</sup> þ I � <sup>a</sup> ¼ 0, and V<sup>þ</sup> <sup>a</sup> ¼ V� <sup>a</sup> , the three symmetrical circuits during a double line-to-ground fault are connected as follows:

#### 2.2. Power flow problem

The estimation of the power flow problem can be expressed using an adequate series of nonlinear equations. These equations represent both Kirchhoff's Voltage Law and network operation limits. The assessment of the power flow problem is based on four variables for each "i" bus (network node) [4]:


Figure 3. Coupling sequence network for line-to-line fault.

Figure 4. Coupling sequence network for a double line-to-ground fault.

Depending on which of the above four variables are known (given) and which ones are unknown (to be calculated), two basic types of buses can be defined:


PQ buses are normally used to represent load buses without voltage control, and PV buses are used to represent generation buses with voltage control in power flow calculations. A third bus is also needed:

• Vδ bus: Vi and δ<sup>i</sup> are specified; Pi and Qi are calculated.

The Vδ bus, also called reference bus or slack bus, has double functions in the basic formulation of the power flow problem:

• It serves as the voltage angle reference.

V<sup>þ</sup> <sup>a</sup> ¼ V�

V0 <sup>a</sup> � V<sup>þ</sup>

<sup>a</sup> ¼ V�

To satisfy: I

To satisfy: Ia ¼ I

node) [4]:

� <sup>a</sup> ¼ �I þ <sup>a</sup> , V<sup>þ</sup>

<sup>a</sup> ¼ V�

must be connected in parallel (Figure 3).

102 Science Education - Research and New Technologies

2.1.4. Double line-to-ground (DLG) faults

0 <sup>a</sup> þ I þ <sup>a</sup> þ I �

2.2. Power flow problem

• Vi: voltage magnitude

• δi: voltage angle

• Pi: net active power

• Qi: net reactive power

other and ground [3] as shown in Figure 4.

line-to-ground fault are connected as follows:

Figure 3. Coupling sequence network for line-to-line fault.

Figure 4. Coupling sequence network for a double line-to-ground fault.

<sup>a</sup> þ I þ <sup>a</sup> Zf , I<sup>0</sup>

<sup>a</sup> ¼ 0, and V<sup>þ</sup>

<sup>a</sup> þ I þ

With a double line-to-ground (DLG) fault, two line conductors come in contact both with each

The estimation of the power flow problem can be expressed using an adequate series of nonlinear equations. These equations represent both Kirchhoff's Voltage Law and network operation limits. The assessment of the power flow problem is based on four variables for each "i" bus (network

<sup>a</sup> ¼ 3I 0

<sup>a</sup> Zf ð3Þ

<sup>a</sup>Zf ð4Þ

<sup>a</sup> , the three symmetrical circuits during a double

<sup>a</sup> ¼ 0, the positive and negative sequence networks

• Since the active power losses are unknown in advance, the active power generation of Vδ bus is used to balance generation, load, and losses [5, 6].

The polar form of the power flow equations is given by:

$$P\_i = \sum\_{n=1}^{N} |Y\_{in} V\_i V\_n| \cos \left(\Theta\_{in} + \delta\_n - \delta\_i\right) \tag{5}$$

$$Q\_i = -\sum\_{n=1}^{N} |Y\_{in} V\_i V\_n| \sin\left(\theta\_{in} + \delta\_n - \delta\_i\right) \tag{6}$$

For each line, numerical values for the series impedance Z and the total line-charging admittance Y are necessary so that the computer can determine all the elements of the N � N bus admittance matrix of which the typical element Yij is:

$$Y\_{\vec{\eta}} = |Y\_{\vec{\eta}}| \theta\_{\vec{\eta}} = |Y\_{\vec{\eta}}| \cos \theta\_{\vec{\eta}} + j|Y\_{\vec{\eta}}| \sin \theta\_{\vec{\eta}} = G\_{\vec{\eta}} + jB\_{\vec{\eta}} \tag{7}$$

The voltage at any bus of the system is given by:

$$|V\_i| = |V\_i|\delta\_i = |V\_i|(\cos\delta\_i + j\sin\delta\_i) \tag{8}$$

The net current injected to bus i is given by:

$$I\_i = Y\_{i1}V\_1 + Y\_{i2}V\_2 + \dots + Y\_{iN}V\_N = \sum\_{n=1}^{N} Y\_{in}V\_n \tag{9}$$

The net scheduled power being injected into the network at bus i is:

$$P\_{i,shed} = P\_{gi} - P\_{di} \tag{10}$$

where Pgi is the scheduled power being generated at bus i, and Pdi is the scheduled power demand.

The mismatch value of the power is given by:

$$
\Delta P\_i = P\_{i,s;hed} - P\_{i,\text{calc.}} \tag{11}
$$

Similarly, for the reactive power at bus i:

$$
\Delta Q\_i = Q\_{i,shed} - Q\_{i,calc.} \tag{12}
$$

Table 1 lists the general number of equations and the state variables in function of the number of buses.

#### 2.2.1. Newton-Raphson method applied to power flow study

In all realistic cases, the power flow problem cannot be solved analytically, and hence iterative solutions implemented in computers must be used. Here, we are going to discuss the Newton-Raphson method.

To apply the Newton-Raphson method to the solution of the power flow equations, we express bus voltages and line admittances in polar form as follows:

$$P\_i = |V\_i|^2 \mathcal{G}\_{ii} + \sum\_{n=1 \atop n \neq i}^{N} |V\_i V\_n Y\_{in}| \cos \left(\theta\_{in} + \delta\_n - \delta\_i \right) \tag{13}$$

$$Q\_i = -|V\_i|^2 \mathcal{B}\_{ii} + \sum\_{\substack{n=1 \\ n \neq i}}^N |V\_i V\_n Y\_{in}| \sin \left(\Theta\_{in} + \delta\_n - \delta\_i\right) \tag{14}$$

Collecting all the mismatch equations into vector-matrix form yields:

∂P<sup>2</sup> ∂δ<sup>2</sup> <sup>⋯</sup> <sup>∂</sup>P<sup>2</sup> ∂δ<sup>n</sup> ⋮ J<sup>11</sup> ⋮ ∂Pn ∂δ<sup>2</sup> <sup>⋯</sup> <sup>∂</sup>Pn ∂δ<sup>n</sup> BBBBBBB@ CCCCCCCA <sup>j</sup>V2<sup>j</sup> <sup>∂</sup>P<sup>2</sup> <sup>∂</sup>jV2<sup>j</sup> <sup>⋯</sup> <sup>j</sup>Vn<sup>j</sup> <sup>∂</sup>P<sup>2</sup> ∂jVnj ⋮ J<sup>12</sup> ⋮ <sup>j</sup>V2<sup>j</sup> <sup>∂</sup>Pn <sup>∂</sup>jV2<sup>j</sup> <sup>⋯</sup> <sup>j</sup>Vn<sup>j</sup> <sup>∂</sup>Pn ∂jVnj BBBBBBBB@ CCCCCCCCA ∂Q<sup>2</sup> ∂δ<sup>2</sup> <sup>⋯</sup> <sup>∂</sup>Q<sup>2</sup> ∂δ<sup>n</sup> ⋮ J<sup>21</sup> ⋮ ∂Qn ∂δ<sup>2</sup> <sup>⋯</sup> <sup>∂</sup>Qn ∂δ<sup>n</sup> BBBBBBB@ CCCCCCCA <sup>j</sup>V2<sup>j</sup> <sup>∂</sup>Q<sup>2</sup> <sup>∂</sup>jV2<sup>j</sup> <sup>⋯</sup> <sup>j</sup>Vn<sup>j</sup> <sup>∂</sup>Q<sup>2</sup> ∂jVnj ⋮ J<sup>22</sup> ⋮ jV2j ∂Qn <sup>∂</sup>jV2<sup>j</sup> <sup>⋯</sup> <sup>j</sup>Vn<sup>j</sup> <sup>∂</sup>Qn ∂jVnj BBBBBBBB@ CCCCCCCCA Jacobian Δδ<sup>2</sup> ⋮ ⋮ Δδ<sup>n</sup> ΔjV2j jV2j ⋮ ΔjVnj jVnj Corrections ΔP<sup>2</sup> ⋮ ⋮ ΔPn ΔQ<sup>2</sup> ⋮ ⋮ ΔQn Mismatches ð15Þ


Table 1. The number of equations and state variables of power flow problem.

The mismatch value of the power is given by:

2.2.1. Newton-Raphson method applied to power flow study

bus voltages and line admittances in polar form as follows:

Pi ¼ jVij 2

Qi ¼ �jVij

0

BBBBBBBB@

0

BBBBBBBB@

Gii <sup>þ</sup> <sup>X</sup> N

2

Collecting all the mismatch equations into vector-matrix form yields:

<sup>j</sup>V2<sup>j</sup> <sup>∂</sup>P<sup>2</sup>

<sup>j</sup>V2<sup>j</sup> <sup>∂</sup>Pn

<sup>j</sup>V2<sup>j</sup> <sup>∂</sup>Q<sup>2</sup>

∂Qn

jV2j

Jacobian

n ¼ 1 n 6¼ i

Bii <sup>þ</sup> <sup>X</sup> N

> n ¼ 1 n 6¼ i

<sup>∂</sup>jV2<sup>j</sup> <sup>⋯</sup> <sup>j</sup>Vn<sup>j</sup> <sup>∂</sup>P<sup>2</sup>

<sup>∂</sup>jV2<sup>j</sup> <sup>⋯</sup> <sup>j</sup>Vn<sup>j</sup> <sup>∂</sup>Pn

<sup>∂</sup>jV2<sup>j</sup> <sup>⋯</sup> <sup>j</sup>Vn<sup>j</sup> <sup>∂</sup>Q<sup>2</sup>

<sup>∂</sup>jV2<sup>j</sup> <sup>⋯</sup> <sup>j</sup>Vn<sup>j</sup> <sup>∂</sup>Qn

⋮ J<sup>22</sup> ⋮

⋮ J<sup>12</sup> ⋮

∂jVnj

1

CCCCCCCCA

1

CCCCCCCCA

∂jVnj

∂jVnj

∂jVnj

Similarly, for the reactive power at bus i:

104 Science Education - Research and New Technologies

of buses.

Raphson method.

∂P<sup>2</sup> ∂δ<sup>2</sup>

0

BBBBBBB@

0

BBBBBBB@

∂Pn ∂δ<sup>2</sup>

∂Q<sup>2</sup> ∂δ<sup>2</sup>

∂Qn ∂δ<sup>2</sup>

<sup>⋯</sup> <sup>∂</sup>P<sup>2</sup> ∂δ<sup>n</sup>

1

CCCCCCCA

1

CCCCCCCA

<sup>⋯</sup> <sup>∂</sup>Pn ∂δ<sup>n</sup>

<sup>⋯</sup> <sup>∂</sup>Q<sup>2</sup> ∂δ<sup>n</sup>

<sup>⋯</sup> <sup>∂</sup>Qn ∂δ<sup>n</sup>

⋮ J<sup>11</sup> ⋮

⋮ J<sup>21</sup> ⋮

ΔPi ¼ Pi,sched � Pi, calc: ð11Þ

ΔQi ¼ Qi,sched � Qi, calc: ð12Þ

jViVnYinj cos ðθin þ δ<sup>n</sup> � δiÞ ð13Þ

jViVnYinj sin ðθin þ δ<sup>n</sup> � δiÞ ð14Þ

ΔP<sup>2</sup>

⋮

⋮

ΔPn

ΔQ<sup>2</sup>

ð15Þ

⋮

⋮

ΔQn

Mismatches

Δδ<sup>2</sup>

⋮

⋮

Δδ<sup>n</sup>

ΔjV2j jV2j ⋮

¼

ΔjVnj jVnj

Corrections

Table 1 lists the general number of equations and the state variables in function of the number

In all realistic cases, the power flow problem cannot be solved analytically, and hence iterative solutions implemented in computers must be used. Here, we are going to discuss the Newton-

To apply the Newton-Raphson method to the solution of the power flow equations, we express

The solution of the above equation is found by an iterative method as follows [4–6]:


$$
\delta\_i^{(1)} = \delta\_i^{(0)} + \Delta \delta\_i^{(0)} \tag{16}
$$

$$|V\_i|^{(1)} = |V\_i|^{(0)} + \Delta |V\_i|^{(0)} = |V\_i|^{(0)} \left( 1 + \frac{\Delta |V\_i|^{(0)}}{|V\_i|^{(0)}} \right) \tag{17}$$

Use the new values δ ð Þ1 <sup>i</sup> and jVij ð Þ<sup>1</sup> as starting values for iteration and then continue. In more general terms, the updated formulas for starting values of the state variables are:

$$
\delta\_i^{(k+1)} = \delta\_i^{(k)} + \Delta \delta\_i^{(k)} \tag{18}
$$

$$|V\_i|^{(k+1)} = |V\_i|^{(k)} + \Delta |V\_i|^{(k)} = |V\_i|^{(k)} \left( 1 + \frac{\Delta |V\_i|^{(k)}}{|V\_i|^{(k)}} \right) \tag{19}$$

#### 2.3. Economic dispatch

This section is dedicated to study the economic dispatch concept. For this reason, we consider the system configuration shown is Figure 5. This configuration based on N thermal units serving as a source of generation that would deliver the suitable electric power to the load.

Figure 5. Thermal units committed to serve electrical load.

Each unit has the cost rate F as an input and its electrical power generated as an output. Therefore, the total system cost is represented by FT, which is the sum of each unit cost rate. The fundamental condition of this system considers that the total output powers should be equal to total power demand.

The main objective from the economic dispatch concept is to minimize FTwith respect to the considered constraints. Note that any transmission losses are neglected and any operating limits are not explicitly stated when formulating this problem [7, 8]. That is,

$$F\_T = F\_1 + F\_2 + F\_3 + \dots + F\_N \tag{20}$$

$$F\_T = \sum\_{i=1}^{N\_{gm}} F\_i(P\_i) \tag{21}$$

$$\mathfrak{D} = 0 = P\_{load} - \sum\_{i=1}^{N\_{gm}} P\_i \tag{22}$$

This type of optimization system is solved using the Lagrange concept. The extreme value condition of the objective function is determined using the multiplication of the constraint by a constant and adding this factor to the objective function as shown below:

$$L = F\_T + \lambda \mathfrak{Q} \tag{23}$$

The paramount conditions needed to determine the highest value of the objective function are based on the derivative of the Lagrange function with respect to the independent variables of each unit. These derivatives should be equal to 0. Consequently, there will be N þ l variables (value of Pi for each N units and λ). In addition, the constraint equation is obtained by the derivative of the Lagrange function by Pi with respect to λ [9–11]:

$$\frac{\partial L}{\partial P\_i} = \frac{dF\_i(P\_i)}{dP\_i} - \lambda = 0\tag{24}$$

or

Each unit has the cost rate F as an input and its electrical power generated as an output. Therefore, the total system cost is represented by FT, which is the sum of each unit cost rate. The fundamental condition of this system considers that the total output powers should be

The main objective from the economic dispatch concept is to minimize FTwith respect to the considered constraints. Note that any transmission losses are neglected and any operating

> FT <sup>¼</sup> <sup>X</sup> Ngen

> > i¼1

Ngen

i¼1

<sup>∅</sup> <sup>¼</sup> <sup>0</sup> <sup>¼</sup> Pload �<sup>X</sup>

This type of optimization system is solved using the Lagrange concept. The extreme value condition of the objective function is determined using the multiplication of the constraint by a

The paramount conditions needed to determine the highest value of the objective function are based on the derivative of the Lagrange function with respect to the independent variables of each unit. These derivatives should be equal to 0. Consequently, there will be N þ l variables

FT ¼ F<sup>1</sup> þ F<sup>2</sup> þ F<sup>3</sup> þ … þ FN ð20Þ

FiðPiÞ ð21Þ

L ¼ FT þ λ∅ ð23Þ

Pi ð22Þ

limits are not explicitly stated when formulating this problem [7, 8]. That is,

constant and adding this factor to the objective function as shown below:

equal to total power demand.

Figure 5. Thermal units committed to serve electrical load.

106 Science Education - Research and New Technologies

$$0 = \frac{dF\_i}{dP\_i} - \lambda \tag{25}$$

With respect to the above-mentioned condition, the minimum operating cost is established when all incremental unit cost are equal to λ. The final step for this procedure is pointed out by the addition of the power demand constraint and the limitation value (minimum and maximum) of each power output unit (inequality constraint) [12].

These constraints are summarized below:

$$\frac{dF\_i}{dP\_i} = \lambda \quad \dots N\_{\text{gen}} \text{ equations} \tag{26}$$

$$P\_{i,\min} \le P\_i \le P\_{i,\max} \qquad \dots \text{2N}\_{\text{gen}} \text{ equations} \tag{27}$$

$$\sum\_{i=1}^{N} P\_i = P\_{load} \qquad \text{1 constraint} \tag{28}$$

When we recognize the inequality constraints, then the necessary conditions may be expanded slightly as shown in the set of equations:

$$\frac{dF\_i}{dP\_i} = \lambda \quad \text{for } P\_{i,\min} \le P\_i \le P\_{i,\max} \tag{29}$$

$$\frac{dF\_i}{dP\_i} \le \lambda \quad \text{for } P\_i = P\_{i,\text{max}} \tag{30}$$

$$\frac{dF\_i}{dP\_i} \ge \lambda \quad \text{for } P\_i = P\_{i,\text{min}} \tag{31}$$

#### 3. Flow chart

#### 3.1. Unsymmetrical faults case

The implementation of the unsymmetrical faults analysis in MATLAB is based on the following flow chart (Figure 6):


Figure 6. Flow chart for the unsymmetrical faults.


#### 3.2. Power flow case

Power flow solution is estimated using the Newton-Raphson method. The fulfillment of this method is achieved using an adequate flowchart (Figure 7):

• Define the number of buses.

Figure 7. Flow chart for the power flow calculation.

• Select the type of fault.

Figure 6. Flow chart for the unsymmetrical faults.

108 Science Education - Research and New Technologies

• Save all results in a text file.

• Define the number of buses.

3.2. Power flow case

• Calculate the admittance and impedance matrices of the power system.

• Calculate the phase voltages and currents for all buses or the faulted buses.

Power flow solution is estimated using the Newton-Raphson method. The fulfillment of this

• Calculate the sequence current and voltage for the selected fault.

method is achieved using an adequate flowchart (Figure 7):

Figure 8. Flow chart for the economic dispatch.

