Keywords

1 Introduction

In the past decades, the increase in demand for electricity has led to an integrated power system with thermal and insulating limitations and issues such as the passage of power over unwanted routes and stability constraints. Experts and designers of power systems have proposed solutions to address these issues, such as the construction of a new line, Flexible Alternating Current Transmission Systems (FACTS) in transmission and distribution, and High Voltage Direct Current (HVDC). One of the disadvantages of building a new transmission line is environmental issues, and the disadvantages of HVDC are the high cost of this system. Therefore, to increase the capacity of the transmission line and improve the stability of the system, the appropriate solution is to use FACTS devices. The best solution is to use FACTS controllers to increase the capacity of distribution and transmission networks. FACTS controllers control important parameters of a transmission line (angle, voltage, current, active power, and reactive power). Applications of FACTS include improved transient stability, small signal stability improvement, voltage profile improvement, power losses reduction, and reduction of inrush currents caused by transformers. The important advantages of FACTS are shown in the Fig. 1 [1, 2].

Fig. 1
figure 1

Advantages of FACTS [1, 2]

The issue of FACTS devices is not new, as it has been built over the past 20 years using large-scale power technology and semiconductors. Today, the most important issue in FACTS controllers is the economic issue [1]. In addition to the applications mentioned above, these devices are also used to manage congestion, and reduce power losses. FACTS controllers are based on power electronics and are used in low voltage and transmission networks as series, parallel and series–parallel compensators to increase system controllability. For example, Static Synchronous Series Compensator (SSSC) and Thyristor Controlled Series Capacitor (TCSC) controllers are used as series compensators and Static Compensator (STATCOM) and Static Var Compensator (SVC) controllers are used as parallel compensators in the system. FACTS devices category will be presented later in the chapter [3].

At the beginning of the chapter, we will study the numerical techniques and solutions of MATLAB software, and in this section, we will explain the interval solution and open methods. We will then discuss the FACTS devices, the classification of FACTS controllers, the modeling, and the formulation of the optimal placement of FACTS devices. In the last part of this chapter, we will present a test system to analyze and simulate the optimal placement of SVC and UPFC controllers using Newton Raphson's numerical technique using MATLAB software.

Table 1 Cardiovascular parameters [4]

2 Numerical Technique

Numerical analysis is widely used in the analysis of nonlinear systems in the fields of electrical and mechanical engineering, so that the MATLAB software has designed its solvers based on numerical analysis. Choosing the appropriate numerical technique to design and analyze power systems has become an important research challenge. Therefore, it is important to know numerical methods to solve nonlinear problems. In this chapter, we examine the advantages and disadvantages of widely used numerical techniques in power systems and their application in power systems. Applications of these techniques include load flow studies, maximum power point tracking (MPPT), optimal DG placement, and optimal FACTS devices placement. The first step in better understanding of these methods is to classify them. Therefore, we categorize numerical techniques into four subdivisions, taking into account their application in power systems:

  1. 1.

    Interval solution methods

  2. 2.

    Open methods

  3. 3.

    Introspection

  4. 4.

    Numerical Integration.

In addition to the above classification, MATLAB software has also solvers based on numerical techniques to solve difficult and non-difficult problems so that the user can choose the appropriate solver according to the type of system. Table 1 shows the types of MATLAB solvers. Figure 2 shows the most widely used numerical techniques in the electrical industry. It is worth noting that in the studies of researchers, interval solution methods and open methods have received more attention. Therefore, the theoretical explanations of the methods of solving the interval and open methods will be discussed.

Fig. 2
figure 2

Numerical techniques used in electrical engineering

2.1 Bisection Method [5,6,7,8,9]

In this method, we assume that the numbers a and b are available in the following ways:

  1. (a)

    The function f in interval [a, b] is continuous

  2. (b)

    f(a) · f(b) < 0

  3. (c)

    f(x) = 0 has only one root (α) in the range (a, b).

In this method, we make the sequence {xn} as follows:

$$\mathop {\lim }\limits_{n \to \infty } X_{n} = \alpha$$
(1)

To build this sequence, we do the following:

We first X1 consider (a + b)/2, which divides [a, b] into two parts [a, X1] and [X1, b]. Now, assuming case C, α is necessarily in one of these two parts. To continue, we consider the part where α is located, where it is possible to select the desired range through the Bolzano theorem. After selecting the desired range, we take the X2 method in the same way and continue the same process until we reach the condition of stopping the problem. Note that in the bisection method, the sequence is constructed to converge to the root of the function, and it is easy to show that:

$$\left| {x_{n} - \alpha } \right| \le \frac{b - a}{{2^{n} }}$$
(2)

Disadvantages include the following:

  1. 1.

    This numerical technique is not suitable for finding double roots.

  2. 2.

    Slow dynamically answer.

  3. 3.

    Very slow performance when finding multiple roots.

Application of this numerical method in smart networks include operation studies in low voltage networks.

In the reference [10], a distributed bisection technique with the presence of the small-scale resources has proposed for the economic dispatch of load on the smart networks.

Another application of this technique in power systems is the discussion of the MPPT in renewable sources such as wind turbines and photovoltaic systems.

In other words, this method can be used to increase the extraction capacity of the mentioned resources [11]. In addition to electrical engineering, this technique has many applications in other branches of engineering such as mechanics. The bisection algorithm is shown in Fig. 3.

Fig. 3
figure 3

Bisection algorithm [8]

2.2 Regula Falsi Method [5,6,7,8,9]

Assume that the function f in [a, b] is continuous and that f(a)f(b) < 0 and the equation f(x) = 0 have only one root in (a, b). Now, to find an approximation of this root, which we call α, we action as follows. Connect the two points (a, f(a)) and (b, f(b)) with a straight line, we call the intersection of this line with the axis of the x¬ x1 which approximate of the desired root is α, now to find the value of x1, we place point (x1, 0) in the equation of the line connecting the two points (a, f(a)) and (b, f(b)), that is, in Eq. 3:

$$\frac{y - f(a)}{{x - a}} = \frac{f(b) - f(a)}{{b - a}}$$
(3)

We place the point (x1, 0), so we have:

$$\frac{0 - f(a)}{{x_{1} - a}} = \frac{f(b) - f(a)}{{b - a}}$$
(4)

After simplifying, we get to the following equation:

$$x_{1} = \frac{af(b) - bf(a)}{{f(b) - f(a)}}$$
(5)

Now to determine x2, do the following:

  1. 1-

    If f(a)f(x1) < 0, then according to Bolzano's theorem the root α is in (a, x1), so in formula 5 instead of b, we put x1 and we have:

    $$x_{2} = \frac{{af(x_{1} ) - x_{1} f(a)}}{{f(x_{1} ) - f(a)}}$$
    (6)
  2. 2-

    If f(a)f(x1) > 0, then the root is in (x1, b). So in formula 5, instead of a, we put x1 and we have:

    $$x_{2} = \frac{{x_{1} f(b) - bf(x_{1} )}}{{f(b) - f(x_{1} )}}$$
    (7)
  3. 3-

    If f(a)f(x1) = 0 then it is clear that x1 is the desired root and the problem is solved.

Thus, a sequence of numbers is obtained that converges to the root α. As you can see, the Regula Falsi method is convergent similar to the Bisection method. Sometimes it works even faster than the Bisection method. Of course, the operation of this method is more than the two-part method. See Fig. 4 for more details.

Fig. 4
figure 4

Details of Regula Falsi method [8]

2.3 Simple Repetition or Fixed Point Method [5,6,7,8,9]

In this method, by applying changes in the equation f(x) = 0 to x = g(x), if α is the root of f(x), then g(α) = α. In fact, the root of f will be a fixed point g.

Fixed point theorem:

Suppose that \(g:[a,b] \to [a,b]\) function is a continuous function (\(g \in c\left[ {a,b} \right]\)) in this case:

  1. (A)

    g has at least one fixed point in [a, b]. In addition, if g’ is present on the interval (a, b) and the number \(0 < L < 1\) is present so that we have \(\left| {g^{\prime } (x)} \right| \le L < 1\) for each x in (a, b), then the constant point g in [a, b] is unique.

  2. (B)

    The sequence produced by \(x_{n + 1} = g(x_{n} )\) that \(n = 0,1,2,3,...\) is convergent for each \(x_{0} \in [a,b]\) to the constant point g (root f). To better understand the fixed point technique, consider Fig. 5.

    Fig. 5
    figure 5

    Details of fixed point method [8]

2.4 Newton Raphson Method [5,6,7,8,9]

This numerical technique works faster than other methods mentioned above. However, in this method, the starting point of x0 must be close enough to the desired root α, which is one of the disadvantages of this method. After explaining how this method works, you will clearly see that there is a special case of the simple repetition method mentioned. Now, with the help of Fig. 6, we will describe this method.

Fig. 6
figure 6

Newton Raphson method [8]

If x0 is approximate to the desired root, α. As you can see in the figure, we draw the tangent line of the curve f(x) at point A to the coordinates (x0, f(x0)). We call the location of this line the axis of length x1. In fact, by placing a point (x1, 0) in Eq. 8 and continuing this process, we achieve a repetitive design of Newton method (9).

$$y - f(x_{0} ) = f^{\prime}(x_{0} )(x - x_{0} )$$
(8)

So we will have:

$$\begin{aligned} & x_{1} = x_{0} - \frac{{f(x_{0} )}}{{f^{\prime } (x_{0} )}} \\ & ... \\ & x_{n + 1} = x_{n} - \frac{{f(x_{n} )}}{{f^{\prime } (x_{n} )}} \\ \end{aligned}$$
(9)

Given the Eq. 10, it is clear that Newton's method is a special case of the simple repetition method.

$$g(x) = x - \frac{f(x)}{{f^{\prime } (x)}}$$
(10)

Newton Raphson method is shown in Fig. 7.

Fig. 7
figure 7

Newton Raphson algorithm [8]

2.5 Secant Method [5,6,7,8,9]

First, consider the Eq. 11, which is the derivative definition.

$$\mathop {\lim }\limits_{{x \to x_{n} }} \frac{{f(x_{n} ) - f(x)}}{{x_{n} - x}} = f^{\prime } (x_{n} )$$
(11)

If the value of x is close to the value of xn, for example, xn-1, then:

$$\frac{{f(x_{n} ) - f(x_{n - 1} )}}{{x_{n} - x_{n - 1} }} = f^{\prime } (x_{n} )$$
(12)

In the Newton formula, we use Eq. 12 instead of f ‘(xn), and after simplification, we will have:

$$x_{n + 1} = \frac{{x_{n - 1} f(x_{n} ) - x_{n} f(x_{n - 1} )}}{{f(x_{n} ) - f(x_{n - 1} )}}$$
(13)

Note that we need the values initial two of x0 and x1 in the Secant method for calculating xn. Then the rest of the sequence of sentences is easily obtained through Eq. 13. The Secant method is not necessarily convergent and is slower than Newton in terms of speed, but much faster than the Bisection method and the Regula Falsi technique. Note Fig. 8 for further explanation.

Fig. 8
figure 8

Secant method [8]

One of the most important issues in smart grids is the discussion of MPPT from renewable sources such as photovoltaic systems and wind turbine systems. Because the mentioned sources are facing uncertainties such as the amount of sunlight and wind speed. In recent years, many studies and researches have been done in the field of MPPT in low voltage networks.

The researcher in the reference [11] used numerical techniques to investigate the tracking of the MPPT in photovoltaic systems. Figure 9 shows the MPPT controller for a photovoltaic system and Fig. 10 shows the performance of numerical techniques.

Fig. 9
figure 9

MPPT controller for a photovoltaic system

Fig. 10
figure 10

Performance of numerical techniques [11]

Numerical optimization methods can ensure the global optimal solution. Also, used methods in [12,13,14,15] are to achieve global optimal.

3 FACTS Devices

The flow of active and reactive power (the flow of current leads to the flow of power.) In a transmission line between the two buses i and k shown in Fig. 11 of the Eqs. 14 and 15 are calculated [16]:

$$P_{ik} = - P_{ki} = \frac{{V_{i} V_{k} }}{{x_{ik} }}\sin (\delta_{i} - \delta_{k} )$$
(14)
$$Q_{ik} = \frac{1}{{x_{ik} }}[V_{i}^{2} - V_{i} V_{k} \cos (\delta_{i} - \delta_{k} )]$$
(15)
Fig. 11
figure 11

Active and reactive power flow

Vi and Vk:

The magnitudes of the bus voltages i and k.

Xik:

Reactor Transmission Line.

δik:

power transfer angle.

FACTS controllers are divided into three classes based on the type of compensation, series (injecting voltage into the system in series), parallel (their connection is parallel and at the connection point, the current is injected into the system) and series–parallel are classified. The effect of some FACTS controllers on Eq. 14 is shown in Fig. 12 [16].

Fig. 12
figure 12

Effect of FACTS controllers [16]

The classification of FACTS device controllers, the structure of the famous FACTS machines, and the use of the famous FACTS devices are shown in Figs. 13, 14 and 15, respectively. So, SSSC, Interline Power Flow Controller (IPFC), TCSC, Thyristor Switched Series Capacitor (TSSC), Thyristor Controlled Series Reactor (TCSR), Thyristor Switched Series Reactor (TSSR), SVC, Thyristor Controlled Reactor (TCR), Thyristor Switched Reactor (TSR), Thyristor Switched Capacitor (TSC), STATCOM, Static Synchronous Generator (SSG), Battery Energy Storage System (BESS), Superconducting Magnetic Energy Storage(SMES), UPFC, TCPST, Thyristor Controlled Phase Angle Regulator (TCPAR), Interphase Power Controller (IPC), Thyristor Controlled Voltage Limiter (TCVL) and TCVR are specified in the figures.

Fig. 13
figure 13

FACTS controllers’ classification [2]

Fig. 14
figure 14figure 14

The structure of the famous FACTS devices [17]

Fig. 15
figure 15

Application of well-known FACTS devices [17]

3.1 Power System Modeling

The first step in the study of power systems, such as the optimal placement of FACTS controllers, is to provide the correct model of the system under study. In other words, if the model is not presented correctly, the objectives of the studies will not be achieved.

The mathematical model of the power system shown in Fig. 16 is defined in Eqs. 1623 [18, 19].

$$\begin{aligned} & \dot{\delta }_{m} = \omega_{m} \\ & M\dot{\omega }_{m} = P_{m} - d_{m} \omega_{m} + E_{m}^{2} Y_{m} \,{\text{Sin}}\,\theta_{m} + E_{m} Y_{m} V\,{\text{Sin}}\,(\delta - \delta_{m} - \theta_{m} ) \\ \end{aligned}$$
(16)
$$k_{qw} \dot{\delta } = - k_{qV2} V^{2} - k_{qV} + Q(\delta_{m} ,\delta ,V) - Q_{0} - Q_{1}$$
(17)
$$\begin{aligned} Tk_{q\omega } k_{pv} \dot{V} & = k_{p\omega } k_{qv2} V^{2} + (k_{p\omega } k_{qv} - k_{q\omega } k_{pv} )V \\ & \quad + k_{qw} (P(\delta_{m} ,\delta ,V) - P_{0} - P_{1} ) \\ & \quad - k_{p\omega } ((Q(\delta_{m} ,\delta ,V) - Q_{0} - Q_{1} ) \\ \end{aligned}$$
(18)
$$\begin{aligned} P(\delta_{m} ,\delta ,V) & = (Y_{0}^{\prime } \,{\text{Sin}}\,\theta_{0}^{\prime } + Y_{m} \,{\text{Sin}}\,\theta_{m} )V^{2} \\ & \quad - E_{m} Y_{m} V\,{\text{Sin}}\,(\delta - \delta_{m} + \theta_{m} ) \\ & \quad - E_{0}^{\prime } Y_{0}^{\prime } V\,{\text{Sin}}\,(\delta + \theta_{0}^{\prime } ) \\ \end{aligned}$$
(19)
$$\begin{aligned} Q(\delta_{m} ,\delta ,V) & = - (Y_{0}^{\prime } \,{\text{Cos}}\,\theta_{0}^{\prime } + Y_{m} \,{\text{Cos}}\,\theta_{m} )V^{2} \\ & \quad + E_{m} Y_{m} V\,{\text{Cos}}\,(\delta - \delta_{m} + \theta_{m} ) \\ & \quad + E_{0}^{\prime } Y_{0}^{\prime } V\,{\text{Cos}}\,(\delta + \theta_{0}^{\prime } ) \\ \end{aligned}$$
(20)
$$E_{0}^{\prime } = [1 + C^{2} Y_{0}^{ - 2} - 2CY_{0}^{ - 1} \,{\text{Cos}}\,\theta_{0} ]^{{ - \frac{1}{2}}}$$
(21)
$$Y_{0}^{\prime } = Y_{0} [1 + C^{2} Y_{0}^{ - 2} - 2CY_{0}^{ - 1} \,{\text{Cos}}\,\theta_{0} ]^{\frac{1}{2}}$$
(22)
$$\theta_{0}^{\prime } = \theta_{0} + \tan^{ - 1} \left\{ {\frac{{CY_{0}^{ - 1} \,{\text{Sin}}\,\theta_{0} }}{{1 - CY_{0}^{ - 1} \,{\text{Cos}}\,\theta_{0} }}} \right\}$$
(23)
Fig. 16
figure 16

Power system model [18]

The mathematical model of the load is shown in Eq. 24 [18]:

$$\left\{ {\begin{array}{*{20}l} {P = P_{0} + P_{1} + k_{p\omega } \dot{\delta } + k_{pv} V + k_{qv2} V^{2} } \hfill \\ {Q = Q_{0} + Q_{1} + k_{q\omega } \dot{\delta } + k_{qv} V + k_{qv2} V^{2} } \hfill \\ \end{array} } \right.$$
(24)

C represents the constant capacitor, V represents the load voltage, δ represents the phase voltage of the load voltage, ωm the rotor speed, δm the phase angle of the generator, M the inertia of the generator, dm dumping and Pm express the mechanical power [18, 19].

3.2 SVC Modeling

In this device, changing of load and topology of the system will affect the bus voltage. Therefore, in case of improper control, the voltage will drop and may even lead to network collapse. Conventional devices such as capacitors, reactors (conventional devices controlled by mechanical switching), and rotating synchronous condenser can be used to adjust the voltage of the buses that are out of range. The injection or absorption of reactive power is automatically adjusted by the SVC and the rotating synchronous condenser to keep the voltage across the buses constant. SVC is a combination of capacitive and induction banks with thyristor control or mechanical switching control as shown in Fig. 7. To conduct numerical studies, SVC is classified into two models [20]:

  1. 1.

    shunt variable susceptance model

    susceptance is considered as a mode variable in a state-space equations and formulations. The shunt variable susceptance model is shown in Fig. 17 [21, 22].

    Fig. 17
    figure 17

    Variable susceptance model [21, 22]

  1. 2.

    Fire angle model

    Fire angle is considered as a mode variable in Eqs. and formulations. The fire angle model is shown in Fig. 18 [21, 22].

    Fig. 18
    figure 18

    Fire angle model [21, 22]

Figure 19 shows the dynamic characteristics and the steady-state voltage and current of the SVC controller. In the SVC controller, we only exchange reactive power. Therefore, the susceptance, current, and reactive power are changed to adjust the voltage according to a desirable characteristic with a suitable slope (slope value is usually considered between 1 and 5%) [21].

Fig. 19
figure 19

Dynamic characteristics, steady state mode voltage, and SVC current controller [21]

The amount of slope depends on the desired voltage (the optimum voltage is defined in the controllable area), the production of reactive power between different sources (considering optimal conditions for the system), and attention to other needs of the system. Figure 19 shows that the SVC compensates for the reactive power in the system in a capacitive region such as a shunt capacitor and in an inductive section such as a shunt reactor. In the following, we provide a numerical analysis of the fire angle model and the variable susceptance model of the SVC controller (considering sine voltage). The ISVC is defined according to Eq. 25 [21].

$$I_{SVC} = - jB_{SVC} V_{k}$$
(25)

XTCR is defined according to Eq. 26 [21, 22].

$$X_{TCR} = \frac{{\pi X_{L} }}{\sigma - \sin \sigma }$$
(26)

We know that \(X_{L} = \omega L\), now we have a Eq. by placing \(\sigma = 2(\pi - \alpha )\) [21, 22].

$$X_{TCR} = \frac{{\pi X_{L} }}{2(\pi - \alpha ) + \sin (2\alpha )}$$
(27)

In the Equations mentioned, σ indicates conductivity, and α indicates fire angles. If α = 90, the TCR will be fully conductive. In other words, XTCR will be equal to XL. If α = 180, the TCR conductivity will be zero, and the reactance will be infinite. SVC reactance is a combination of a capacitor and TCR reactance listed in Eq. 28 [21, 22].

$$X_{SVC} (\alpha ) = \frac{{\pi X_{C} X_{L} }}{{X_{C} [2(\pi - \alpha ) + \sin 2\alpha ] - \pi X_{L} }}$$
(28)

We know that \(X_{C} = \frac{1}{\omega C}\), then we define QK according to Eq. 29 [21, 22].

$$Q_{k} = - V_{{_{k} }}^{2} \left\{ {\frac{{X_{C} [2(\pi - \alpha ) + \sin 2\alpha }}{{\pi X_{C} X_{L} }}} \right\}$$
(29)

On the other hand, the SVC equivalent susceptance is defined according to Eq. 30 [21, 22]:

$$B_{SVC} = - \frac{1}{{X_{SVC} }}$$
(30)

3.2.1 Power Flow Model

The equations for the linearized power flow of the SVC controller are shown in Table 2 based on the shunts variable susceptance models and fire angle [20, 23].

Table 2 The shunt variable susceptance models and fire angle [20, 23]

3.2.2 SVC Controller Model

The SVC diagram block with a classic PI controller is shown in Fig. 20. XSVC is modified using fire angle control (this change is done with the help of a classical controller) to adjust the voltage within the allowable range [21, 22].

Fig. 20
figure 20

Dynamic characteristics and constant voltage mode—SVC current controller [21, 22]

According to the figure above, the state equations \(\dot{X}_{1SVC}\), \(\dot{X}_{2SVC}\), and \(\dot{X}_{3SVC}\) according to Eq. 31 are defined [21, 22].

$$\begin{aligned} & \dot{X}_{1SVC} = \frac{1}{{T_{m} }}\left[ {V_{SVC} (1 + KX_{3SVC} ) - X_{1SVC} } \right] \\ & \dot{X}_{2SVC} = K_{I} \left[ {V_{ref,SVC} - X_{1SVC} } \right] \\ & \dot{X}_{3SVC} = \frac{1}{{T_{c} }}\left[ {X_{2SVC} + K_{P} (V_{ref,SVC} - X_{1SVC} ) - X_{3SVC} } \right] \\ \end{aligned}$$
(31)

QSVC reactive power is expressed according to Eq. 32 [21]:

$$Q_{SVC} = V_{SVC}^{2} X_{3SVC}$$
(32)

In the following, we will perform the Eqs. 31 and 32 [21, 22]:

$$\begin{aligned} & \Delta Q_{SVC} = 2V_{SVC0} \Delta V_{SVC} X_{3SVC0} + V_{SVC0}^{2} \Delta X_{3SVC} \\ & \Delta \dot{X}_{1SVC} = \frac{1}{{T_{m} }}\left[ {\Delta V_{SVC} (1 + KX_{3SVC0} ) + V_{SVC0} K\Delta X_{3SVC} - \Delta X_{1SVC} } \right] \\ & \Delta \dot{X}_{2SVC} = K_{I} (\Delta V_{ref,SVC} - \Delta X_{1SVC} ) \\ & \Delta \dot{X}_{3SVC} = \frac{1}{{T_{C} }}\left[ {\Delta X_{2SVC} + K_{P} (\Delta V_{ref,SVC} - \Delta X_{1SVC} ) - \Delta X_{3SVC} } \right] \\ \end{aligned}$$
(33)

Finally, we will have the Eq. 34 [21, 22]:

$$\left[ {\begin{array}{*{20}l} {\Delta \dot{X}_{1SVC} } \hfill \\ {\Delta \dot{X}_{2SVC} } \hfill \\ {\Delta \dot{X}_{3SVC} } \hfill \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\frac{ - 1}{{T_{m} }}} & 0 & {\frac{{KV_{SVC0} }}{{T_{m} }}} \\ { - K_{I} } & 0 & 0 \\ {\frac{{ - K_{P} }}{{T_{C} }}} & {\frac{1}{{T_{C} }}} & {\frac{ - 1}{{T_{C} }}} \\ \end{array} } \right]\left[ {\begin{array}{*{20}l} {\Delta X_{1SVC} } \hfill \\ {\Delta X_{2SVC} } \hfill \\ {\Delta X_{3SVC} } \hfill \\ \end{array} } \right] + \left[ {\begin{array}{*{20}c} {\frac{1}{{T_{m} }}(1 + KX_{3SVC0} )} \\ 0 \\ 0 \\ \end{array} } \right]\left[ {\Delta V_{SVC} } \right]$$
(34)

Equation 34 can be summarized in the form of Eq. 35 [21, 22]:

$$\Delta \dot{X}_{SVC} = A_{SVC} \Delta X_{SVC} + B_{SVC} \Delta V_{SVC}$$
(35)

3.2.3 SVC Connection in Multi-machine Power Systems

Equilibrium power equations for the optimal placement of the SVC controller in multi-machine power systems are defined according to Eq. 36 [21, 22].

$$\begin{aligned} & P_{SVCi} + P_{Li} (V_{i} ) - \sum\limits_{k = 1}^{n} {V_{i} V_{K} } Y_{ik} \cos (\theta_{i} - \theta_{k} - \alpha_{ik} ) = 0 \\ & i = m + 1,...,n \\ & Q_{SVCi} + Q_{Li} (V_{i} ) - \sum\limits_{k = 1}^{n} {V_{i} V_{k} Y_{ik} \sin (} \theta_{i} - \theta_{k} - \alpha_{ik} ) = 0 \\ & i = m + 1,...,n \\ \end{aligned}$$
(36)

After the linearization of the above equations, the Eq. 37 is obtained [21, 22].

$$\begin{aligned} & D_{SVC} \Delta X_{SVC} + D_{1} \Delta V_{g} + D_{2SVC} \Delta V_{l} = 0 \\ & D_{2SVC} = C_{SVC} + D_{2} \\ \end{aligned}$$
(37)

Considering the SVC controller, the DAE model is defined according to Eq. 38 [21, 22]:

$$\begin{aligned} & \left[ {\begin{array}{*{20}c} {\Delta \dot{X}} \\ {\Delta \dot{X}_{SVC} } \\ 0 \\ 0 \\ \end{array} } \right] = \left[ {\begin{array}{*{20}l} {A_{1\bmod } } \hfill & {P_{1SVC} } \hfill & {A_{2new} } \hfill & {A_{3new} } \hfill \\ {P_{2SVC} } \hfill & {A_{SVC} } \hfill & {P_{3SVC} } \hfill & {B_{SVCnew} } \hfill \\ {K_{2} } \hfill & {P_{4SVC} } \hfill & {K_{1new} } \hfill & {C_{4new} } \hfill \\ {G_{1} } \hfill & {D_{SVC} } \hfill & {D_{1new\_SVC} } \hfill & {D_{2new\_SVC} } \hfill \\ \end{array} } \right]\left[ {\begin{array}{*{20}l} {\Delta X} \hfill \\ {\Delta X_{SVC} } \hfill \\ {\Delta z} \hfill \\ {\Delta v} \hfill \\ \end{array} } \right] + \left[ {\begin{array}{*{20}c} E \\ 0 \\ 0 \\ 0 \\ \end{array} } \right]\Delta U \\ & \Delta \dot{X}_{sys\_svc} = A_{sys\_svc} \Delta X_{sys\_svc} + E_{SVC} \Delta U \\ & A_{SYS\_SVC} = A_{SV1} - (A_{SV2} *(inv(A_{SV4} )*A_{SV3} ) \\ & A_{SV1} = \left[ {\begin{array}{*{20}l} {A_{1\bmod } } \hfill & {P_{1svc} } \hfill \\ {P_{2svc} } \hfill & {A_{SVC} } \hfill \\ \end{array} } \right],A_{SV2} = \left[ {\begin{array}{*{20}l} {A_{2new} } \hfill & {A_{3new} } \hfill \\ {P_{3svc} } \hfill & {B_{svcnew} } \hfill \\ \end{array} } \right] \\ & A_{SV3} = \left[ {\begin{array}{*{20}l} {K_{2} } \hfill & {P_{4svc} } \hfill \\ {G_{1} } \hfill & {D_{SVC} } \hfill \\ \end{array} } \right],A_{SV4} = \left[ {\begin{array}{*{20}l} {K_{1new} } \hfill & {C_{4new} } \hfill \\ {D_{1new\_svc} } \hfill & {D_{2new\_svc} } \hfill \\ \end{array} } \right] \\ \end{aligned}$$
(38)

3.3 TCSC Modeling

As mentioned in the FACTS devices, the TCSC controller is a series of compensators and increases the transmission capacity by changing the appearance impedance of the transmission line. The structure of the TCSC series controller is shown in Fig. 21. The XTCSC steady-state impedance is defined by Eq. 39 [21].

$$X_{TCSC} (\alpha ) = \frac{{X_{C} X_{L} (\alpha )}}{{X_{L} (\alpha ) - X_{C} }}$$
(39)
Fig. 21
figure 21

TCSC series controller structure [21]

XL (α) is defined according to Eq. 40 [21]:

$$X_{L} (\alpha ) = X_{L} \frac{\pi }{\pi - 2\alpha - \sin 2\alpha },\quad X_{L} \le X_{L} (\alpha ) \le \infty$$
(40)

3.3.1 TCSC Controller Model

The TCSC controller is very similar in structure to the FC-TCR SVC controller. Equivalent impedance is presented for this series compensator in Eq. 41 [21, 22].

$$X_{TCSC} = X_{C} \left[ {\begin{array}{*{20}l} {1 - \frac{k}{{k^{2} - 1}}.\frac{\sigma + \sin \sigma }{\pi } + } \hfill \\ {\frac{{4.k^{2} .\cos^{2} (\sigma /2)}}{{\pi (k^{2} - 1)^{2} }}.(k\tan \frac{k\sigma }{2} - \tan \frac{\sigma }{2}} \hfill \\ \end{array} } \right]$$
(41)
α::

Fire angle.

σ::

conductivity angle.

k::

TCSC ratio.

The TCSC controller usually operates in the capacitor area. A very important point in the series controllers is the resonance. Figures 22 and 23 show the equivalent reactance and susceptance of SVC and TCSC controllers, respectively. The resonance in the SVC controller does not appear to be a problem, but in the TCSC series controller, a range must be defined for the fire angle. Therefore, the fire angle range for the TCSC controller is defined by considering the resonance point according to Eq. 42 [22]:

$$\alpha_{res} \le \alpha \le 180^{\circ}$$
(42)
Fig. 22
figure 22

Equivalent reactance to the SVC controller [22]

Fig. 23
figure 23

Equivalent reactance to the TCSC controller [22]

3.3.2 TCSC Controller Model

As Fig. 24, the TCSC controller is located between bus k and m. If the TCSC controller losses are neglected, the power equilibrium and BTCSC equations are defined according to Eq. 43 [21].

$$\begin{aligned} & P_{k} = V_{k} V_{m} B_{TCSC} \sin (\theta_{k} - \theta_{m} ) \\ & Q_{k} = V_{k}^{2} B_{TCSC} - V_{k} V_{m} B_{TCSC} \cos (\theta_{k} - \theta_{m} ) \\ & P_{m} = V_{k} V_{m} B_{TCSC} \sin (\theta_{m} - \theta_{k} ) \\ & Q_{m} = V_{m}^{2} B_{TCSC} - V_{k} V_{m} B_{TCSC} \cos (\theta_{m} - \theta_{k} ) \\ & B_{TCSC} = - \pi (k^{4} - 2k^{2} + 1)\cos k(\pi - \alpha )/ \\ & \left[ {\begin{array}{*{20}l} {X_{C} (\pi k^{4} \cos k(\pi - \alpha )} \hfill \\ { - \pi \cos k(\pi - \alpha ) - } \hfill \\ {2k^{4} \alpha \cos k(\pi - \alpha )} \hfill \\ { + 2\alpha k^{2} \cos k(\pi - \alpha )} \hfill \\ { - k^{4} \sin 2\alpha \cos k(\pi - \alpha )} \hfill \\ { + k^{2} \sin 2\alpha \cos k(\pi - \alpha )} \hfill \\ { - 4k^{3} \cos^{2} \alpha \sin k(\pi - \alpha )} \hfill \\ { - 4k^{2} \cos \alpha \sin \alpha \cos k(\pi - \alpha )} \hfill \\ \end{array} } \right] \\ \end{aligned}$$
(43)
Fig. 24
figure 24

TCSC connection in multi-machine power systems [21]

Table 3 are shown 4 control strategies for TCSC in [21, 22].

Table 3 Control strategies for TCSC [21, 22]

Each of the strategies listed in the table above can be used to achieve TCSC controller goals. Here are some numerical studies of the power control strategy. Figure 25 shows the block diagram of the TCSC controller with the PI controller [21, 22].

Fig. 25
figure 25

Block diagram of the TCSC controller with the PI controller [21, 22]

\(X_{2TCSC}\), \(\dot{X}_{2TCSC}\) and \(\dot{X}_{1TCSC}\) are defined according to Eq. 44 [21, 22].

$$\begin{aligned} & X_{2TCSC} = \frac{{K_{I} }}{S}(P_{set} - P) \\ & \dot{X}_{2TCSC} = K_{I} P_{set} - K_{I} P \\ & \dot{X}_{1TCSC} = \frac{{ - X_{1TCSC} }}{{T_{C1} }} + \frac{{X_{2TCSC} }}{{T_{C1} }} + \frac{{K_{P} P_{set} }}{{T_{C1} }} - \frac{{K_{P} P}}{{T_{C1} }} + \frac{{\alpha_{0} }}{{T_{C1} }} \\ \end{aligned}$$
(44)

After linearization we will have [21, 22]:

$$\begin{aligned} & \Delta \dot{X}_{TCSC} = A_{TCSC} \Delta X_{TCSC} + B_{TCSC} \left[ {\begin{array}{*{20}l} {\Delta \theta_{k} } \hfill \\ {\Delta V_{k} } \hfill \\ {\Delta \theta_{m} } \hfill \\ {\Delta V_{m} } \hfill \\ \end{array} } \right] \\ & \left[ {\begin{array}{*{20}l} {\Delta P_{k} } \hfill \\ {\Delta Q_{k} } \hfill \\ {\Delta P_{m} } \hfill \\ {\Delta Q_{m} } \hfill \\ \end{array} } \right] = C_{TCSC} \Delta X_{1TCSC} + D_{TCSC} \left[ {\begin{array}{*{20}l} {\Delta \theta_{k} } \hfill \\ {\Delta V_{k} } \hfill \\ {\Delta \theta_{m} } \hfill \\ {\Delta V_{m} } \hfill \\ \end{array} } \right] \\ \end{aligned}$$
(45)

The DAE model of the TCSC controller is defined by Eq. 46 [21, 22].

$$\left[ {\begin{array}{*{20}l} {\Delta \dot{X}} \hfill \\ {\Delta \dot{X}_{TCSC} } \hfill \\ 0 \hfill \\ 0 \hfill \\ \end{array} } \right] = \left[ {\begin{array}{*{20}l} {A_{1\bmod } } \hfill & {P_{1TCSC} } \hfill & {A_{2new} } \hfill & {A_{new} } \hfill \\ {P_{2TCSC} } \hfill & {A_{TCSC} } \hfill & {B_{TCSC1new} } \hfill & {B_{TCSCnew} } \hfill \\ {K_{2} } \hfill & {P_{4TCSC} } \hfill & {K_{1new} } \hfill & {C_{4new} } \hfill \\ {G_{1} } \hfill & {C_{TCSC} } \hfill & {D_{1new\_TCSC} } \hfill & {D_{2new\_TCSC} } \hfill \\ \end{array} } \right]\left[ {\begin{array}{*{20}l} {\Delta X} \hfill \\ {\Delta X_{TCSC} } \hfill \\ {\Delta z} \hfill \\ {\Delta v} \hfill \\ \end{array} } \right] + \left[ {\begin{array}{*{20}l} E \hfill \\ 0 \hfill \\ 0 \hfill \\ \end{array} } \right] + \Delta U$$
(46)

As a result, we will have [21, 22].

$$\begin{aligned} & \Delta \dot{X}_{SYS\_TCSC} = A_{SYS\_TCSC} \Delta X_{SYS\_TCSC} + E_{TCSC} \Delta U \\ & A_{SYS\_TCSC} = A_{TC1} - (A_{TC2} *inv(A_{TC4} ))*A_{TC3} ) \\ & A_{TC1} = \left[ {\begin{array}{*{20}l} {A_{1\bmod } } \hfill & {P_{1TCSC} } \hfill \\ {P_{2TCSC} } \hfill & {A_{TCSC} } \hfill \\ \end{array} } \right] \\ & A_{TC2} = \left[ {\begin{array}{*{20}l} {A_{2new} } \hfill & {A_{new} } \hfill \\ {B_{TCSC1new} } \hfill & {B_{TCSCnew} } \hfill \\ \end{array} } \right] \\ & A_{TC3} = \left[ {\begin{array}{*{20}l} {K_{2} } \hfill & {P_{4TCSC} } \hfill \\ {G_{1} } \hfill & {C_{TCSC} } \hfill \\ \end{array} } \right] \\ & A_{TC4} = \left[ {\begin{array}{*{20}l} {K_{1new} } \hfill & {C_{4new} } \hfill \\ {D_{1new\_TCSC} } \hfill & {D_{2new\_TCSC} } \hfill \\ \end{array} } \right] \\ \end{aligned}$$
(47)

3.4 UPFC Modeling

As shown in Fig. 26, the UPFC Series–Parallel Controller consists of two series and parallel converters connected by a DC link [24].

Fig. 26
figure 26

UPFC structure [24]

In the following, we will study UPFC numerical studies using Newton Raphson method. According to Fig. 27, the UPFC equivalent circuit consists of two ideal voltage sources. Zser and Zsh represent the series and parallel impedance, respectively, and consist of a positive sequence of leakage resistance and inductance. The relationship between ideal voltage sources is expressed in Eq. 48 [24, 25].

$$\begin{aligned} & V_{ser} = V_{ser} (\cos \theta_{ser} + j\sin \theta_{ser} ) \\ & V_{sh} = V_{sh} (\cos \theta_{sh} + j\sin \theta_{sh} ) \\ \end{aligned}$$
(48)
Fig. 27
figure 27

UPFC injection model [24]

According to the injection model (equivalent circuit) UFPC, Eqs. 49 and 50 introduce the limitations of Vser and ϴser, respectively [24, 25]:

$$V_{ser\min } \le V_{ser} \le V_{ser\max }$$
(49)
$$0 \le \theta_{ser} \le 360$$
(50)

According to the UFPC equivalent circuit, Eqs. 51 and 52 show the constraints of Vsh and ϴsh, respectively [24, 25].

$$V_{sh\min } \le V_{sh} \le V_{sh\max }$$
(51)
$$0 \le \theta_{sh} \le 360$$
(52)

According to the above equations, the equations for active and reactive power of UPFC in node i are given in Eqs. 53 and 54, respectively [24, 25]:

$$\begin{aligned} P_{i} & = V_{i}^{2} G_{ii} + V_{i} V_{j} \left( {\begin{array}{*{20}l} {G_{ij} \cos (\delta_{i} - \delta_{j} )} \hfill \\ { + B_{ij} \sin (\delta_{i} - \delta_{j} )} \hfill \\ \end{array} } \right) + V_{i} V_{sh} \left( {\begin{array}{*{20}l} {G_{ij} \cos (\delta_{i} - \theta_{ser} )} \hfill \\ { + B_{ij} \sin (\delta_{i} - \theta_{ser} )} \hfill \\ \end{array} } \right) \\ & \quad + V_{i} V_{sh} \left( {\begin{array}{*{20}l} {G_{sh} \cos (\delta_{i} - \theta_{sh} )} \hfill \\ { + B_{sh} \sin (\delta_{i} - \theta_{sh} )} \hfill \\ \end{array} } \right) \\ \end{aligned}$$
(53)
$$\begin{aligned} Q_{i} & = - V_{i}^{2} B_{ii} + V_{i} V_{j} \left( {\begin{array}{*{20}l} {G_{ij} \sin (\delta_{i} - \delta_{j} )} \hfill \\ { - B_{ij} \cos (\delta_{i} - \delta_{j} )} \hfill \\ \end{array} } \right) + V_{i} V_{ser} \left( {\begin{array}{*{20}l} {G_{ij} \sin (\delta_{i} - \theta_{ser} )} \hfill \\ { - B_{ij} \cos (\delta_{i} - \theta_{ser} )} \hfill \\ \end{array} } \right) \\ & \quad + V_{i} V_{sh} \left( {\begin{array}{*{20}l} {G_{sh} \sin (\delta_{i} - \theta_{sh} )} \hfill \\ { - B_{sh} \cos (\delta_{i} - \theta_{sh} )} \hfill \\ \end{array} } \right) \\ \end{aligned}$$
(54)

The Eqs. of active and reactive power of UPFC in node j are also defined according to Eqs. 55 and 56 [24, 25].

$$P_{j} = V_{j}^{2} G_{jj} + V_{j} V_{i} \left( {\begin{array}{*{20}l} {G_{ij} \cos (\delta_{j} - \delta_{i} )} \hfill \\ { + B_{ij} \sin (\delta_{j} - \delta_{i} )} \hfill \\ \end{array} } \right) + V_{j} V_{ser} \left( {\begin{array}{*{20}l} {G_{jj} \cos (\delta_{j} - \theta_{ser} )} \hfill \\ { + B_{jj} \sin (\delta_{j} - \theta_{ser} )} \hfill \\ \end{array} } \right)$$
(55)
$$Q_{j} = - V_{j}^{2} B_{jj} + V_{j} V_{i} \left( {\begin{array}{*{20}l} {G_{ij} \sin (\delta_{j} - \delta_{i} )} \hfill \\ { - B_{ij} \cos (\delta_{j} - \delta_{i} )} \hfill \\ \end{array} } \right) + V_{j} V_{ser} \left( {\begin{array}{*{20}l} {G_{jj} \sin (\delta_{j} - \theta_{ser} )} \hfill \\ { - B_{jj} \cos (\delta_{j} - \theta_{ser} )} \hfill \\ \end{array} } \right)$$
(56)

The shunt converter reactive and active power relations are described in the following equation [24, 25].

$$P_{sh} = - V_{sh}^{2} G_{sh} + V_{sh} V_{i} \left( {\begin{array}{*{20}l} {G_{sh} \cos (\theta_{sh} - \delta_{i} )} \hfill \\ { + B_{sh} \sin (\theta_{sh} - \delta_{i} )} \hfill \\ \end{array} } \right)$$
(57)
$$Q_{sh} = V_{sh}^{2} B_{sh} + V_{sh} V_{i} \left( {\begin{array}{*{20}l} {G_{sh} \sin (\theta_{sh} - \delta_{i} )} \hfill \\ { - B_{sh} \cos (\theta_{sh} - \delta_{i} )} \hfill \\ \end{array} } \right)$$
(58)

The active power relation of the series converter is introduced in the following equation [24, 25]:

$$\begin{aligned} P_{ser} & = - V_{ser}^{2} G_{jj} + V_{ser} V_{i} \left( {\begin{array}{*{20}l} {G_{ij} \cos (\theta_{ser} - \delta_{i} )} \hfill \\ { + B_{ij} \sin (\theta_{ser} - \delta_{i} )} \hfill \\ \end{array} } \right) \\ & \quad + V_{ser} V_{j} \left( {\begin{array}{*{20}l} {G_{jj} \cos (\theta_{ser} - \delta_{j} )} \hfill \\ { + B_{jj} \sin (\theta_{ser} - \delta_{j} )} \hfill \\ \end{array} } \right) \\ \end{aligned}$$
(59)

The reactive power relative of the series converter is introduced in the following equation [24, 25]:

$$\begin{aligned} Q_{ser} & = - V_{ser}^{2} B_{jj} + V_{ser} V_{i} \left( {\begin{array}{*{20}l} {G_{ij} \sin (\theta_{ser} - \delta_{i} )} \hfill \\ { - B_{ij} \cos (\theta_{ser} - \delta_{i} )} \hfill \\ \end{array} } \right) \\ & \quad + V_{ser} V_{j} \left( {\begin{array}{*{20}l} {G_{jj} \sin (\theta_{ser} - \delta_{j} )} \hfill \\ { - B_{jj} \cos (\theta_{ser} - \delta_{j} )} \hfill \\ \end{array} } \right) \\ \end{aligned}$$
(60)

Yii, Yjj, Yij, and Yser admittances are defined according to the following equations: [24]:

$$\begin{aligned} & Y_{ii} = G_{ii} + jB_{ii} = Z_{ser}^{ - 1} + Z_{sh}^{ - 1} \\ & Y_{jj} = G_{jj} + jB_{jj} = Z_{ser}^{ - 1} \\ & Y_{ij} = Y_{ji} = G_{ij} + jB_{ij} = - Z_{ser}^{ - 1} \\ & Y_{ser} = G_{ser} + jB_{ser} = - Z_{sh}^{ - 1} \\ \end{aligned}$$
(61)

Assuming low switching losses of series and parallel converters, the following equation will be established [24, 25]:

$$P_{ser} + P_{sh} = 0$$
(62)

In the next step of the study, we must combine the linearized power equations of the FACTS controller with the linear equations of the system (the rest of the network). Therefore, the following equation is defined [24]:

$$f(x) = \left[ J \right]\left[ {\Delta x} \right]$$
(63)
$$\left[ {f(x)} \right] = \left[ {\begin{array}{*{20}l} {\Delta P_{i} } \hfill & {\Delta P_{j} } \hfill & {\Delta Q_{i} } \hfill & {\Delta Q_{j} } \hfill & {\Delta P_{ij} } \hfill & {\Delta Q_{ij} } \hfill & {\Delta P_{bb} } \hfill \\ \end{array} } \right]^{T}$$
(64)

In the mentioned relationship, [ΔX] the solution vector, [J] the Jacobin matrix and ΔPbb matrixes of the incompatibility of the power obtained from the Eq. 62. The solution vector is defined according to Eq. 65 [24].

$$[\Delta x] = \left[ {\begin{array}{*{20}l} {\Delta \delta_{i} } \hfill & {\Delta \delta_{j} } \hfill & {\frac{{\Delta V_{sh} }}{{V_{sh} }}} \hfill & {\frac{{\Delta V_{j} }}{{V_{j} }}} \hfill & {\Delta \theta_{ser} } \hfill & {\frac{{\Delta V_{ser} }}{{V_{ser} }}} \hfill & {\Delta \theta_{sh} } \hfill \\ \end{array} } \right]^{T}$$
(65)

Jacobin matrix is given according to [24, 25] in Eq. 66:

$$J = \left[ {\begin{array}{*{20}c} {\frac{{\partial P_{i} }}{{\partial \delta_{i} }}} & {\frac{{\partial P_{i} }}{{\partial \delta_{j} }}} & {\frac{{\partial P_{i} }}{{\partial V_{sh} }}V_{sh} } & {\frac{{\partial P_{i} }}{{\partial V_{j} }}V_{j} } & {\frac{{\partial P_{i} }}{{\partial \theta_{ser} }}} & {\frac{{\partial P_{i} }}{{\partial V_{ser} }}V_{ser} } & {\frac{{\partial P_{i} }}{{\partial \theta_{sh} }}} \\ {\frac{{\partial P_{j} }}{{\partial \delta_{i} }}} & {\frac{{\partial P_{j} }}{{\partial \delta_{j} }}} & 0 & {\frac{{\partial P_{j} }}{{\partial V_{j} }}V_{j} } & {\frac{{\partial P_{j} }}{{\partial \theta_{ser} }}} & {\frac{{\partial P_{j} }}{{\partial V_{ser} }}V_{ser} } & 0 \\ {\frac{{\partial Q_{i} }}{{\partial \delta_{i} }}} & {\frac{{\partial Q_{i} }}{{\partial \delta_{j} }}} & {\frac{{\partial Q_{i} }}{{\partial V_{sh} }}V_{sh} } & {\frac{{\partial Q_{i} }}{{\partial V_{j} }}V_{j} } & {\frac{{\partial Q_{i} }}{{\partial \theta_{ser} }}} & {\frac{{\partial Q_{i} }}{{\partial V_{ser} }}V_{ser} } & {\frac{{\partial Q_{i} }}{{\partial \theta_{sh} }}} \\ {\frac{{\partial Q_{j} }}{{\partial \delta_{i} }}} & {\frac{{\partial Q_{j} }}{{\partial \delta_{j} }}} & 0 & {\frac{{\partial Q_{j} }}{{\partial V_{j} }}V_{j} } & {\frac{{\partial Q_{j} }}{{\partial \theta_{ser} }}} & {\frac{{\partial Q_{j} }}{{\partial V_{ser} }}V_{ser} } & 0 \\ {\frac{{\partial P_{ij} }}{{\partial \delta_{i} }}} & {\frac{{\partial P_{ij} }}{{\partial \delta_{j} }}} & 0 & {\frac{{\partial P_{ij} }}{{\partial V_{j} }}V_{j} } & {\frac{{\partial P_{ij} }}{{\partial \theta_{ser} }}} & {\frac{{\partial P_{ij} }}{{\partial V_{ser} }}V_{ser} } & 0 \\ {\frac{{\partial Q_{ij} }}{{\partial \delta_{i} }}} & {\frac{{\partial Q_{ij} }}{{\partial \delta_{j} }}} & 0 & {\frac{{\partial Q_{ij} }}{{\partial V_{j} }}V_{j} } & {\frac{{\partial Q_{ij} }}{{\partial \theta_{ser} }}} & {\frac{{\partial Q_{ij} }}{{\partial V_{ser} }}V_{ser} } & 0 \\ {\frac{{\partial P_{bb} }}{{\partial \delta_{i} }}} & {\frac{{\partial P_{bb} }}{{\partial \delta_{j} }}} & {\frac{{\partial P_{bb} }}{{\partial V_{sh} }}V_{sh} } & {\frac{{\partial P_{bb} }}{{\partial V_{j} }}V_{j} } & {\frac{{\partial P_{bb} }}{{\partial \theta_{ser} }}} & {\frac{{\partial P_{bb} }}{{\partial V_{ser} }}V_{ser} } & {\frac{{\partial P_{bb} }}{{\partial \theta_{sh} }}} \\ \end{array} } \right]$$
(66)

The initial conditions of the series and parallel sources are shown in Eqs. 67 and 68, respectively [24].

$$\begin{aligned} & \theta_{ser}^{0} = \tan^{ - 1} \left( {\frac{{P_{jref} }}{CI}} \right) \\ & V_{ser}^{0} = \left( {\frac{{X_{ser} }}{{V_{j}^{0} }}} \right)\sqrt {P_{jref}^{2} + CI^{2} } \\ & CI = Q_{jref} - \frac{{V_{j} }}{{X_{ser} }}(V_{j}^{0} - V_{i}^{0} )\quad if\;V_{j}^{0} \ne V_{i}^{0} \\ & CI = Q_{jref} \quad if\;V_{j}^{0} = V_{i}^{0} \\ \end{aligned}$$
(67)
$$\theta_{sh}^{0} = - \sin^{ - 1} \left( {\frac{{(V_{i}^{0} - V_{j}^{0} )V_{ser}^{0} X_{sh} \sin (\theta_{ser} )}}{{V_{sh}^{0} V_{i}^{0} X_{ser} }}} \right)$$
(68)

4 Formulation the Problem of FACTS Devices Placement

To solve the problem of economic placement of FACTS controllers in power systems, the objective functions and constraints of the problem must first be determined. Therefore, we will describe the mentioned cases [26].

4.1 Objective Functions

Important objective functions in FACTS controller placement studies include voltage deviation, system overload, and active power losses. In other words, we are dealing with a multi-objective optimization problem when discussing the placement of FACTS devices. Formulation of a multi-objective optimization problem in Eq. 69 is given in which x is the decision variable, Ω is the solution range, Cj (x) is the equal constraint, Hk (x) is the unequal constraint, Fv (x) is the objective function of the voltage deviation, Fs (x) is the objective function of the system overload and FPL (x) is the objective function of active power losses [26].

$$\begin{aligned} & Min\;F(x) = [F_{V} (x),F_{S} (x),F_{PL} (x)] \\ & Subject\;to\;x \in \Omega \\ & C_{j} (x) = 0\quad j = 1,...,n \\ & H_{k} (x) \le 0\quad k = 1,...,p \\ & F_{V} = \sum\limits_{i} {\left| {V_{i} - V_{i}^{ref} \begin{array}{*{20}c} {} \\ \end{array} } \right|}^{2} \\ & F_{S} = \sum\limits_{j} {(\frac{{S_{j} }}{{S_{j}^{\max } }})^{2} } \\ & F_{PL} = \sum\limits_{i} {P_{Li} } \\ \end{aligned}$$
(69)

4.2 Constraints

Constraints on the optimal placement of FACTS controllers to two categories of equality constraints (e.g. active power equilibrium) and unequal constraints (e.g. allowable voltage range, reactive power output limit, FACTS devices limitations such as compensation range) Are divided [26].

4.2.1 Equality Constraints

In Eq. 70, the equilibrium of active and reactive power is mentioned [26]:

$$\begin{aligned} & P_{Gi} - P_{Di} - \sum\limits_{j = 1}^{N} {V_{j} [G_{ij} \cos (\theta_{ij} ) + B_{ij} \sin (\theta_{ij} } ) = 0 \\ & Q_{Gi} - Q_{Di} - \sum\limits_{j = 1}^{N} {V_{j} [G_{ij} \sin (\theta_{ij} ) - B_{ij} \cos (\theta_{ij} } ) = 0 \\ \end{aligned}$$
(70)

4.2.2 Inequality Constraints

In Eq. 71, the limitation of reactive power generation and in Eq. 72 the limitation of some FACTS controllers such as SVC, TCSC and UPFC are given [26].

$$Q_{Gi}^{\min } < Q_{Gi} < Q_{Gi}^{\max } \quad for\quad i = 1,\ominus ,N$$
(71)
$$\begin{aligned} For\quad & SVC\quad Q_{C}^{\min } < Q_{SVC} < Q_{C}^{\max } \\ For\quad & TCSC\quad r^{\min } < r_{TCSC} < r^{\max } \\ For\quad & UPFC\quad \gamma^{\min } < \gamma < \gamma^{\max } \\ & \quad and\quad Q_{C}^{\min } < Q_{conv1} < Q_{C}^{\max } \\ \end{aligned}$$
(72)

The objective functions used to optimally placement of FACTS devices in researchers’ studies are shown in Fig. 28 [17].

Fig. 28
figure 28

Objective functions for optimal placement of FACTS devices [17]

4.3 Optimal Placement of TCSC, SVC, and UPFC

The correct choice of bus and line in the system under study to optimal placement of the FACTS devices controllers such as SVC, TCSC, and UPFC depends on the network structure. For example, SVCs (TCR, TSR, and TSC) are used to correct the total reactive power flow between buses. TCSCs are commonly used to change line impedance to control the power flow in transmission lines. UPFC, as shown in Fig. 15, is a complete controller and is used to improve voltage and increase line capacity [27].

TCSCs are used as FACTS devices series controllers using the Lmn index specified in weak lines. Lmn is one of the appropriate indicators that can be analyzed in lines that are unstable. This indicator says that if Lmn is equal to one, the state of the critical line is. If Lmn is less than one, it indicates the stable state of the line. The Lmn index is given in Eq. 73 [27, 28].

$$Lmn = \frac{{4XQ_{r} }}{{[V_{s} {\text{Sin}} (\theta - \delta )]^{2} }}$$
(73)

x represents the line, Qr indicates the demand for reactive power, Vs indicates the bus voltage of the sending side, ϴ indicates the difference between the bus angles, and δ indicates the impedance angle. The optimal placement of the SVC controller, which is connected in parallel, is done by analyzing the PV curves. It should be noted that PV curves are made using the CPF technique. The predictive and correction scheme used in CPF is shown in Fig. 29. Optimal placement by UPFC is done on lines where the high active power flow has, it should also be noted that UPFCs are placed at the beginning of the buses to play their role as a complete FACTS devices series–parallel controller [27, 29].

Fig. 29
figure 29

Predictive and correction scheme used in CPF [29]

The objective functions and the optimal location and size limitations of FACTS devices [27] are shown in Table 4:

Table 4 The objective functions and the optimal location and size limitations of FACTS devices [27]

Example 1:

In the 14-bus distribution system is shown in Fig. 30, the 5 SVCs placement perform with a capacity of 5 MW. Then, the SVCs place in the selected locations. Compare the voltage profile with SVC mode. Perform the placement with the Newton Raphson method to improve the voltage profile. Select buses to be placed in buses without any power plant. Then place the SVC in the selected locations and use Newton Raphson method to check the system's performance in terms of voltage and power losses before and after the SVC.

Fig. 30
figure 30

IEEE 14-bus test system

Solution: In this example, the SVC was replaced to improve the voltage profile. The proposed method is that to placement the first bus voltages are obtained by Newton–Raphson method. Then, according to the obtained voltages, 5 buses with the lowest voltage are selected for SVC installation. The buses selected for placement are: 4-5-10-13-14. Then, to check the performance of SVC in the system, we put the information about SVC in the base system. By placing SVC in these buses and comparing the voltage before and after SVC as shown in Fig. 31, we see that the voltage has improved significantly that indicate suitable performance of in improving system voltage levels. The active and reactive power losses without SVC mode are 13,393 MW and 54.54 MVAR respectively. While the power losses after SVC installation are 13,345 MW and 54.22 MVAR. By adding SVC, 48 MW is reduced for the active power and 320 kVAR for reactive power, indicating suitable performance of SVC in reducing system power losses. To better check the voltage profile, we can check the voltage stability indices in offline in both cases using the following relationships:

$$VSF_{i + 1} = (2V_{i + 1} - V_{i} )$$
(74)
$$VSF = \frac{{\sum\limits_{i = 2}^{{N_{b} }} {VSF_{i + 1} } }}{{(N_{b} - 1)}}$$
(75)
Fig. 31
figure 31

Voltage profile before and after SVC placement

That VSF is: Voltage stability Factor. Considering the above two equations, we check the voltage stability in each case with and without SVC. without SVC mode, VSF is 1.0514 p.u. While in SVC mode, the VSF increases by 1.0625 p.u.

Example 2:

In Fig. 30, install one UPFC with the goal of improving the voltage profile. Then draw the voltage profile before and after the placement. Also determine the active and reactive power losses before and after the placement UPFC using the Newton Raphson method.

Solution: The optimal place for UPFC is selected in the line between buses 2 and 5. The voltage profile before and after placing the UPFC is shown in Fig. 32. The voltage is improved significantly after installing UPFC. The active and reactive power losses without UPFC mode are 13,393 MW and 54.54 MVAR respectively, While the power losses after installation of UPFC are 13,368 MW and 54.38 MVAR.

Fig. 32
figure 32

Voltage profile before and after UPFC placement

5 Conclusions

In this chapter, first the benefits of FACTS devices have been studied and proposed as a suitable solution for improvement of power system characteristics. Then mathematical modeling of some widely used FACTS devices such as SVC, TCSC and UPFC are described. In the following, numerical optimization methods for FACTS devices analysis are presented. Numerical optimization methods in many cases can ensure global optimization. Among the introduced methods, one of the most widely used methods in studies of power system is the Newton Raphson method. The important functions and constraints in the discussion of placement and modeling of FACTS devices are presented in this chapter for controlling power flow, regulating the bus voltage and reducing of power losses. The Newton Raphson method is considered for the equation solving of the objective functions. Finally, to demonstrate the advantage of FACTS devices, simulations for SVC and UPFC are performed on the IEEE 14 bus system. According to the results, optimal placement of FACTS devices improves most of the power system specifications.