# Optimal Management of High-Voltage Line Congestions Using Power Source Redispatching
## 3 Description of the Research Methodology
\begin{array}{l}P_{\mathrm{G}i}-P_{\mathrm{L}i}-f_{\mathrm{P}}(\mathbf{U},\mathbf{ \delta})\text{=}0\\ Q_{\mathrm{G}i}-Q_{\mathrm{L}i}-f_{\mathrm{G}}(\mathbf{U},\mathbf{\delta})\text{=}0\\ P_{\mathrm{G}\mathrm{min}}\leq P_{\mathrm{G}}\leq P_{\mathrm{G}\mathrm{max}} \\ Q_{\mathrm{G}\mathrm{min}}\leq Q_{\mathrm{G}}\leq Q_{\mathrm{G}\mathrm{max}} \\ U_{\mathrm{min}}\leq U\leq U_{\mathrm{max}}\\ I\leq I_{\mathrm{max}}\\ S_{\mathrm{T}}\leq S_{\mathrm{nT}}\end{array}  \tag{9}\]During the calculations, both equality and inequality constraints are taken into account. The equality constraints assume the maintenance of the power balance in the network and fulfill the basic nodal equations when determining the power flows. These equations take into account the active and reactive powers generated (\(P_{\text{G}i}\), \(Q_{\text{G}i}\)) and consumed (\(P_{\text{L}i}\), \(Q_{\text{L}i}\)), as well as the voltages and their angles (\(\mathbf{U}\), \(\delta\)), which are the result of solving the power flow problem (according to the functions \(f_{\text{P}}(\mathbf{U}\), \(\delta\)) and \(f_{\text{Q}}(\mathbf{U}\), \(\delta\))), using the Newton-Raphson method. The inequality constraints are the minimum and maximum values of voltages in nodes (\(U_{\text{min}}\), \(U_{\text{max}}\)), the minimum and maximum values of power generated in sources (\(P_{\text{G}\text{min}}\), \(P_{\text{G}\text{max}}\), \(Q_{\text{G}\text{min}}\), \(Q_{\text{G}\text{max}}\)), and the permissible load capacities of lines and transformers (\(I<I_{\text{max}}\), \(S_{\text{T}}<S_{\text{nt}}\)). To solve the optimization problem, the metaheuristic Algorithm of the Innovative Gunner (AIG) [62] was used. To determine new solutions of vector \(\mathbf{x}\), in the next \(k\)-iteration, the AIG algorithm uses the following relationship [62]:  
\[x_{l}^{(k+1)}=x_{l}^{(k)}\cdot g_{l}(\xi) \tag{10}\]  
where \(x_{l}^{(k+1)}\) denotes the value of the variable \(x_{l}\) of vector \(\mathbf{x}\) in iteration (\(k+1\)), \(x_{l}^{(k)}\) denotes the value of the variable \(x_{l}\) of vector \(\mathbf{x}\) in iteration (k), and \(g_{l}(\xi)\) denotes special multipliers, the number of which (in the AIG algorithm) is 2. These are special functions that have the form \(g_{\text{I1}}(\xi_{1})=\cos\alpha\) when \(\alpha<0\) and \(g_{\text{I1}}(\xi_{1})=(\cos\alpha)^{-1}\), when \(\alpha>0\) and \(g_{\text{I2}}(\xi_{2})=\cos\beta\), when \(\beta<0\), and \(g_{\text{I2}}(\xi_{2})=(\cos\beta)^{-1}\) when \(\beta>0\). \(\alpha\) and \(\beta\) are the so-called correction angles, drawn from the variable interval (\(-\alpha_{\text{max}}\), \(\alpha_{\text{max}}\)) and (\(-\beta_{\text{max}}\), \(\beta_{\text{max}}\)) using the normal distribution. Therefore, the generation of new solutions is carried out using the following relationship [62]:  
\[x_{l}^{(k+1)}=x_{l}^{(k)}\cdot g_{\text{I1}}(\xi_{1})\cdot g_{\text{I2}}(\xi_ {2}) \tag{11}\]  
The block diagram of the algorithm is shown in Figure 2.  
The maximum adopted number of iterations is 1000. The size of the AIG algorithm population corresponds to the number of decision variables. In each iteration, the power flow problem is solved. As mentioned earlier, during the optimization process, the power in RES is reduced in order to eliminate the resulting line overloads. The resulting loss of generated power \(\Delta P_{\text{G}}\) in the system should be supplemented by an increase in generation in conventional sources (their number is \(L\)). This is conducted by dividing the power deficit \(\Delta P_{\text{G}}\) into conventional sources. These sources are assigned appropriate \(p_{\text{fi}}\) (participation factor) coefficients. For each source \(k\) that takes part in covering the power imbalance, the participation coefficient \(w_{k}\) is determined according to the following equation:  
\[w_{k}=\frac{p_{\text{f}k}}{\sum\limits_{i=1}^{L}p_{\text{fi}}} \tag{12}\]  
The maximum adopted number of iterations is 1000. The size of the AIG algorithm population corresponds to the number of decision variables.