Keywords

1 Introduction

One of the very hard problems in power system networks is the optimal power flow (OPF) problem. During the span of time, many researches came into existence in OPF to reduce the optimization problems using different methods. In recent years, the OPF is a major task in renewable energy sources [1]. OPF problem is the main intention on three major conflicting objectives, i.e. minimization of generation cost, transmission losses, L-index [2]. In 1962, the OPF is first discussed in Carpentier. The power system network has to satisfy several constraints while maintaining generation costs as low as in an electrical network. There are two types of system constraints in a network: inequality and equality constraints [3]. An equality constraint is defined as to maintain the power balance equations, and the various inequality constraints of a power system network are required to maintain the system operating limits and security limits.

Predictable and artificial intelligence (AI) these is the solution of OPF problem methods. OPF is made up of a variety of universal techniques and has some drawbacks [4], i.e. continuous-time, slow convergence, and qualitative features are very weak in handling and operation is slow. Many authors are most preferred in artificial intelligence method since to get the optimal solution in global or approximate global. These approaches have a number of advantages, including the ability to deal with a variety of qualitative constraints, a single execution to obtain a large number of optimal solutions, the ability to solve multi-objective optimization problems, and the ability to find a global optimum solution [5]. The firefly algorithm is employed in this study to solve the multi-model optimization problem discovered by Xinshe Yang’s [6]. It stands on the flashing behaviour of the bugs, including light emission, light absorption and the mutual attraction. There are various types of meta-heuristic algorithms that are differential evolution (DE) algorithm, artificial bee colony (ABC) algorithm, particle swarm optimization (PSO), clonal selection (CS) algorithm which are also similar to the proposed firefly algorithm [7]. FA is more useful for controlling parameters and also local searching ability, robustness, fast convergence [8]. The latest crowd intelligence gathering that utilizes firefly algorithm (FA) is proffered to determine the solution of OPF problem.

Wang Yi-BO [9] this paper presents the under structure of analysing steady-state characteristics of photovoltaic (PV) system connected to the power grid. Basically, the PV system consists of power converters. A PV system is separated into three basic modules: alternative current (AC) module, direct current (DC) module and inverter module.

This chapter is structured into seven sections as follows. The mathematical modelling of OPF problem formulation is presented in second section. Modelling of solar energy system is discussed in Sect. 3. The concept of FA is explained in fourth section. Section 5 discusses how to include the FA into OPF. In Sect. 6, FFA results obtained with MATLAB program are discussed. In Sect. 7, valid conclusions are discussed, and the last one is references.

2 Mathematical Problem Formulation of OPF

In any power system network, some objectives are reduced, and they met inequality and equality constraints. The OPF is a disordered optimization problem. Below equation represents the basic form of OPF problem.

$$\begin{aligned} & {\text{Minimize}}:f\left( {l,m} \right) \\ & {\text{Subject to}}:\left\{ {\begin{array}{*{20}c} {g\left( {l,m} \right) \le 0} \\ {h\left( {l,m} \right) = 0} \\ \end{array} } \right\} \\ \end{aligned}$$
(1)

where m—Independent control variables; \(l\)—Dependent state variables; f (l, m)—OPF objective function; \(g\left( {l,m} \right)\)Inequality constraint; \(h\left( {l,m} \right)\)Equality constraints.

2.1 Dependent State Variables

These types of variables in a power network can be expressed by vector l as:

$$l = \left[ {P_{G_1 } ,E_{L_1 \ldots } E_{L_{{\text{NL}}} } ,Q_{G_1 \ldots } Q_{G_{{\text{NG}}} } ,D_{l_1 \ldots } D_{l_{{\text{nl}}} } } \right]$$
(2)

where\(P_{G_1 }\)Slack bus generator real power; \(Q_{G_i }\)—Generator reactive power at \(i{\text{th}}\) bus; \(E_{L_p }\)—Magnitude of bus voltage at pth bus (load bus); \(D_{l_q }\)—Line loading of qth line; NL—Total transmission lines; Nl—Total load buses.

2.2 Independent system Control Variables

In a network controlling, the power flow depends on the variables presented in the below equation.

$$m = \left[ {P_{G_2 \ldots } P_{G_{{\text{NG}}} , } E_{G_1 \ldots } E_{G_{{\text{NG}}} ,} Q_{c_1 \ldots } Q_{c_{{\text{NC}}} ,} T_{1 \ldots } T_{{\text{NT}}} } \right]$$
(3)

where \(P_{G_i }\)—Generator real power at ith bus; \(E_{G_m }\)—Voltage magnitude of PV bus; \(Q_{c_j }\)—shunt compensation at jth bus; \(T_i\)- ith branch transformer taps setting.

2.3 Constraints

Various types of constraints which are to be satisfied by this OPF problem are discussed in the following section.

2.3.1 Equality Constraints

These constraints are intertwined with both active and reactive power, as seen by the equations below.

$$P_{G_i } - P_{D_i } - E_i \mathop \sum \limits_{j = 1}^{{\text{NB}}} E_j \left[ {K_{{\text{ij}}} \cos \left( {\delta_{{\text{ij}}} } \right) + B_{{\text{ij}}} \sin \left( {\delta_{{\text{ij}}} } \right)} \right] = 0 \forall i \in {\text{NB}}$$
(4)
$$Q_{G_i } - Q_{D_i } - E_i \mathop \sum \limits_{j = 1}^{{\text{NB}}} E_j \left[ {K_{{\text{ij}}} \sin \left( {\delta_{{\text{ij}}} } \right) - B_{{\text{ij}}} \cos \left( {\delta_{{\text{ij}}} } \right)} \right] = 0 \forall i \in {\text{NB}}$$
(5)

where \(E_i - {\text{Voltage }}\) magnitude of bus i;\(\delta_{{\text{ij}}}\)—are the voltage angles between the buses j and i; NB—Total no. of buses; \(P_D\)—Load demand of active power; \(Q_D\)—Load demand of reactive power; \(K_{{\text{ij}}}\)—Transfer conductance which is connected to ith bus; \(B_{{\text{ij}}}\)—Susceptance which is connected to jth bus.

2.3.2 Inequality Constraints

It is represented to maintain sustainable limits in a power system as shown in below equations.

  1. (a)

    Generator Constraints: These constraints apply to both real and reactive power outputs, with the following upper and lower bounds limiting generator voltages:

    $$E_{G_l }^{\min } \le E_{G_l } \le E_{G_l }^{\max } \forall l \in {\text{NG}}$$
    (6)
    $$P_{G_n }^{\min } \le P_{G_n } \le P_{G_n }^{\max } \forall n \in {\text{NG}}$$
    (7)
    $$Q_{G_n }^{\min } \le Q_{G_n } \le Q_{G_n }^{\max } \forall n \in {\text{NG}}$$
    (8)
  2. (b)

    Transformer constraints: Minimum and maximum limits limited these constraints in a transformer setting, expressed as follows.

    $$T_i^{\min } \le T_i \le T_i^{\max } \forall i \in {\text{NG}}$$
    (9)
  3. (c)

    Shunt compensator constraints: These constraints are illustrated in reactive power injected at different buses and maintain upper and lower limits.

    $$Q_{c_j }^{\min } \le Q_{c_j } \le Q_{c_j }^{\max } \forall j \in {\text{NC}}$$
    (10)
  4. (d)

    Security constraints:

    $$E_{L_p }^{\min } \le E_{L_p } \le E_{L_p }^{\max } \forall p \in {\text{NL}}$$
    (11)
    $$S_{l_q } \le S_{l_q }^{\max } \forall q \in {\text{nl}}$$
    (12)

Equation (11) represents the voltage magnitudes at pth bus, and Eq. (12) represents the transmission line loading at qth bus.

2.3.3 Objective Functions

The following are the three major objective functions that were considered in this study in order to find the solution of the OPF problem:

  1. a.

    Minimize cost of generation: This aims to decrease the generation cost of interrelated generation units. The stranded quadratic expression is given as follows.

    $$f\left( {P_{G_k } } \right) = \mathop \sum \limits_{k = 1}^{{\text{Ng}}} \alpha_k + \beta_k P_{G_k } + \gamma_k P_{G_k }^2 \left[ {\$ /{\text{hr}}} \right]$$
    (13)

    where \(\alpha_k , \beta_k , \gamma_k\)—Cost coefficients of the kth generator.

    \(f\left( {P_{G_k } } \right)\)—Fuel cost function; \(P_{Gk}\)—Generator power output at kth bus.

    \(Ng\)—Total generators.

  2. b.

    Voltage Stability index (L-index): A power system to maintain voltage of load buses L-index is used to avoid the voltage fall down point. This can be attained by minimization of L-index [10], expressed as shown in below equation.

    $$L{ = }\min \{ E_j \quad j = {1}, \ldots F_{{\text{PQ}}} \}$$
    (14)

    where \(F_{{\text{pQ}}}\)—total load buses.

  3. c.

    Minimization of transmission losses: In this objective, to decrease the real power losses and it is denoted by \(P_{{\text{Loss}}}\).

    $$P_{{\text{Loss}}} = \mathop \sum \limits_{i = 1}^{N_L } \frac{r_k }{{r_k^2 + x_k^2 }}\left[ {E_i^2 + E_j^2 - 2E_i E_j {\text{cos}}\left( {\delta_i - \delta_j } \right)} \right]$$
    (15)

where \(N_L\)—Number of transmission lines;

\(r_k\)—Resistance of kth transmission line;

\(E_i\),\(E_j\)—Voltage at ith and jth bus;

\(\delta_i\),\(\delta_j\)—Angles at ith and jth bus.

3 Modelling of Solar Energy System

In the contemporary years, photovoltaic power generation is more developed in the power system network which reduces the pollution and PV generation has more vital social and economic advantages. One of the main boons of photovoltaic (PV) system is that it directly converts the solar irradiance into electricity. The PV system gradually improves the technology and reduces the cost and many countries adopted the PV generation system in order to reduce the harmful emissions which are dangerous for the environment. Commonly, PV system is integrated by power electronics converters.

One form of renewable energy source is solar energy, when sunlight energy is directly converted into the electricity using PV panels. When PV panels are made up on mostly semiconductor materials since this is more gain of sunlight energy comparison of insulator materials. For the calculation of AC circuit, output power by using the parallel–series and star/delta transformation is shown in Fig. 1. The PV panel power output is transformed from inverter, and output of the inverter can be further transformed into grid as shown in below equations.

Fig. 1
figure 1

Equivalent transformation of AC circuit

$$P_i = 3E_i \left[ {\frac{E_i }{{Z_{12} }}\cos \varphi_{12} + \frac{E_i }{{Z_{13} }}\cos \varphi_{13} - \frac{E_g }{{Z_{12} }}\cos \left( {\theta_g - \alpha - \varphi_{12} } \right)} \right]$$
(16)
$$Q_i = 3E_i \left[ {\frac{E_i }{{Z_{12} }}\sin \varphi_{12} + \frac{E_i }{{Z_{13} }}\sin \varphi_{13} + \frac{E_g }{{Z_{12} }}\sin \left( {\theta_g - \alpha - \varphi_{12} } \right)} \right].$$
(17)
$$P_g = 3E_g \left[ {\frac{E_i }{{Z_{12} }}\cos \left( {\alpha - \theta_g - \varphi_{12} } \right) - \frac{E_g }{{Z_{12} }}\cos \varphi_{12} - \frac{E_g }{{Z_{23} }}\cos \left( {\varphi_{23} } \right)} \right]$$
(18)
$$Q_g = 3E_g \left[ {\frac{E_i }{{Z_{12} }}\sin \left( {\alpha - \theta_g - \varphi_{12} } \right) + \frac{E_g }{{Z_{12} }}\sin \varphi_{12} + \frac{E_g }{{Z_{23} }}\sin \left( {\varphi_{23} } \right)} \right]$$
(19)

4 Firefly Algorithm

Several innovative algorithms for solving engineering optimization problems have been introduced in the last couple of decades. Among all these new algorithms, it has been expressed that firefly algorithm (FA) is the most appropriately planned in dealing with global optimization problem [6]. FA, which is based on the shining pattern and social interactions of fireflies, was created in 2007 and 2008 by XinShe Yang at Cambridge University, including light absorption, light emission and mutual attractiveness [8, 11]. For the flexibility of new meta-heuristic FA, three major idealized rules are indicated [12,13,14].

  1. (1)

    Generally, fireflies are unisexual; i.e. each firefly will be attracted to the other firefly in the group despite the sex.

  2. (2)

    Attractiveness α brightness, i.e. any two shinning fireflies, the firefly that is less luminous will approach the firefly that is brighter. As the distance between them grows, the brightness’s appeal reduces, and vice versa. If there isn’t a brighter firefly nearby, it will migrate at random.

  3. (3)

    The brightness of a firefly algorithm will be resoluted from the landscape of the objective function.

These three idealized principles are based on, and FA may be clarified in a step-by-step approach that can be presented as the pseudo-code [15].

5 Firefly Algorithm for Solving OPF Problem

This algorithm is mainly considered two major issues: The first one is a divergence in light intensity I, while the second is an expression of attraction β. Any brilliant firefly in a specific point z can be chosen at random as:

$$I\left( z \right) \propto \frac{1}{f\left( z \right)}$$
(20)

The firefly light intensity I is proportional to distance r. That is,

$$I\left( z \right) = I_o e^{ - \gamma r}$$
(21)

where\(I_o\)—Starting luminous intensity.

\(\gamma\)—Absorption ratio.

The light intensity observed by surrounding fireflies is related to the attraction of fireflies; i.e. a firefly’s attractiveness can be calculated as:

$$\beta \left( r \right) = \beta_o e^{ - \gamma m} m \ge 1$$
(22)

where

\(\beta_o\)—Attractiveness at distance r = 0; M—Total fireflies.

The firefly i that is less brilliant goes towards the firefly j that is less luminous. The updated position of firefly i can be represented as in Eq. (23):

$$z_i = z_i + \beta_0 e^{ - \gamma r_{{\text{ij}}}^2 } \left( {z_j - z_i } \right) + \alpha \left( {{\text{rand}} - 0.5} \right)$$
(23)

with

$$r_{{\text{ij}}} = \left| {z_i - z_j } \right|\sqrt {\mathop \sum \limits_{k = 1}^d (z_{i,k} - z_{j,k} )^2 }$$
(24)

where \(r_{{\text{ij}}}\)—Parting between the two fireflies j and i at locations \(z_j\) and \(z_i\).

\(\alpha\)—Randomness parameter.

6 Results and Discussions

The propounded FA method has been practised on a standard 30-bus IEEE system with a solar energy system for single-objective optimization problem. This test system included 41 branches, 6 generator buses and twenty-four load buses, 4 transformers, and 9 shunt compensations on various buses. The test system consists of six thermal generators (TG) which are placed on the 1st (Slack), 2nd, 3rd, 4th, 5th and 6th buses. Table 1 shows the minimum and maximum real power generating limits, and cost coefficients of total generators. Table 2 lists the minimum and maximum voltage magnitudes, transformer tap settings, and reactive power injections. The overall load demand is 283.4 MW and 126.2MVAR. This manuscript includes three conflicting objectives such as total cost, L-index and power loss for optimization. The proposed FA is applied to find a solution to single-objective optimization with and without solar energy system.

Table 1 Cost coefficients
Table 2 Best solution with FA when optimized separately without solar system (Case-1)

Case 1-Without solar energy system: Initially, without considering the solar energy system, each objective function was considered separately for single-objective optimization using the FA technique. Table 2 shows that the FA is successful in decreasing total fuel cost, L-index and real power loss. Table 2 shows the optimal settings for all control variables for 30-bus IEEE system without solar energy. Fig. 2 depicts the convergence plots of these objectives in the absence of a solar energy system.

Fig. 2
figure 2

Convergence curves without solar system (Case-1)

Case 2-With Solar energy system: In this part, the proposed FA is used to solve a single-objective OPF problem with the three objectives mentioned above and the incorporation of a solar energy system. At 7th bus of 30-bus IEEE system solar generator is placed. The optimal values of all the control variables obtained using FA when optimized separately with solar energy system are shown in Table 3. Figure 3 depicts the convergence curves of these objectives with a solar energy system.

Table 3 Best solution with FA when optimized separately with solar energy system (Case-2)
Fig. 3
figure 3

Convergence curves with solar system (Case-2)

The comparison of results both (without solar and with solar) by using the FA method is shown in Tables 2 and 3. The overall cost is lowered from 799.0345$/hr to 759.4226$/hr when a solar energy system. The L-index is slightly increased from 0.11012 to 0.11148 with solar energy system. Finally, with a solar energy system the total power loss is reduced from 2.8467 to 2.4 MW.

Table 4 shows that the proposed FA results for case 1 best among all other techniques currently available in the literature. However, the results obtained with incorporation of solar energy systems are not compared with the literature as there is no similar work found for case 2.

Table 4 FA results compared to prior research for the 30-bus IEEE system

7 Conclusion

In this paper, a current robust crowd intelligence built on FA with a solar energy system to work out the OPF problem. The FA was effectively implemented to solve the OPF problem to optimize the generation cost, L-index and active power loss. The proposed method is tested on standard 30-bus IEEE system. The FA results compared with and without solar energy system. The result analysis of the given test system shows that the proposed FA method is well suitable for handling single-objective OPF problems using solar power. The future scope of this research will be a multi-objective OPF problem combining solar and wind power.