## 2 Modelling and Theoretical Analysis for Power Flow Gradients
### Mathematical Model for all the PFG to CIVs  
In order to outline the power flow gradients at different representative points of the system, the Bus1, OSIV, Bus2, and the receiving end bus of the system are assumed as the four selected critical points (SCP). Then, SCP1 stands for the voltage \(V_{1}\) of Bus1, SCP2 denotes the voltage \(v_{12}\) of OSIV, SCP3 represents the voltage of Bus2, and SCP4 stands for the voltage \(v_{\rm r}\), all the SCPs have also been highlighted in (a) of Figure 1.  
First of all, the primary variables of the model are assumed as, \(V_{1}=1\)\(\lambda\)0, \(v_{12}=v_{12}\)\(\lambda\)\(\theta\), \(v_{r}=v_{r}\)\(\lambda\)\(\delta\), \(z_{r}=r_{r}+jx_{r}\). Based on the original power flow model of the UPFC embedded power system at different SCPs in Appendix A of [22], the PFG to each CIV at different SCP are derived out. Each equation is comprised of two parts containing the active power flow gradients (APFG) and reactive power flow gradients (RPFG) to each CIV, and all the equations are listed as below. Here, \(P_{\rm j}\), \(Q_{\rm j}\) specifies the active and reactive power flows at SCP\({}_{\rm j}\), and \(j\) stands for the number of SCP. \(dP_{\rm j}/d\
u_{12}\) and \(dQ_{\rm j}/d\
u_{12}\) stand for the APFG to CIV1 and RPFG to CIV1 at SCP\({}_{\rm j}\), respectively. \(dP_{\rm j}/d\theta\) and \(dQ_{\rm j}/d\theta\) mean the APFG to CIV2 and RPFG to CIV2 at SCP\({}_{\rm j}\), respectively, and \(dP_{\rm j}/d\delta\) and \(dQ_{\rm j}/d\delta\) represent the APFG to CIV3 and RPFG to CIV3 at SCP\({}_{\rm j}\), respectively. The PFG to each CIV at Bus1 (SCP1) are deduced as Equations (1)-(3),  
\[\left\{ \begin{array}{l}dP_{1}/d\
u_{12}=V_{1}(r_{r}\cos\theta+x_{r}\sin \theta)/z_{r}^{2}\\ dQ_{1}/d\
u_{12}=V_{1}(x_{r}\cos\theta-r_{r}\sin\theta)/z_{r}^{2}\end{array} \right. \tag{1}\]  
\[\left\{ \begin{array}{l}dP_{1}/d\theta=V_{1}v_{12}(x_{r}\cos\theta-r_{r}\sin \theta)/z_{r}^{2}\\ dQ_{1}/d\theta=-V_{1}v_{12}(r_{r}\cos\theta+x_{r}\sin\theta)/z_{r}^{2}\end{array} \right. \tag{2}\]  
\[\left\{ \begin{array}{l}dP_{1}/d\delta=V_{1}v_{r}(r_{r}\sin\delta-x_{r}\cos \delta)/z_{r}^{2}\\ dQ_{1}/d\delta=V_{1}v_{r}(r_{r}\cos\delta+x_{r}\sin\delta)/z_{r}^{2}\end{array} \right. \tag{3}\]  
The PFG to each CIV at SCP2 are derived out as Equations (4)-(6),  
\[\left\{ \begin{array}{l}dP_{12}/d\upsilon_{12}=V_{1}(r_{r}\cos\theta+x_{r} \sin\theta)/z_{r}^{2}\\ dQ_{12}/d\upsilon_{12}=V_{1}(x_{r}\cos\theta-r_{r}\sin\theta)/z_{r}^{2}\end{array} \right. \tag{4}\]  
\[\left\{ \begin{array}{l}dP_{12}/d\theta=-v_{12}[V_{1}(x_{r}\cos\theta+r_{r} \sin\theta)+v_{r}[r_{r}\sin(\delta-\theta)-x_{r}\cos(\delta-\theta)]]/z_{r}^{2 }\\ dQ_{12}/d\theta=-v_{12}[V_{1}(x_{r}\sin\theta-r_{r}\cos\theta)+v_{r}[r_{r} \cos(\delta-\theta)+x_{r}\sin(\delta-\theta)]]/z_{r}^{2}\end{array} \right. \tag{5}\]  
\[\left\{ \begin{array}{l}dP_{12}/d\delta=v_{12}v_{r}[r_{r}\sin(\delta-\theta) -x_{r}\cos(\delta-\theta)]/z_{r}^{2}\\ dQ_{12}/d\delta=v_{12}v_{r}[r_{r}\cos(\delta-\theta)+x_{r}\sin(\delta-\theta)] /z_{r}^{2}\end{array} \right. \tag{6}\]  
The PFG to each CIV at SCP3 are carried out as Equations (7)-(9),  
\[\left\{ \begin{array}{l}dP_{2}/d\theta=-v_{12}[2V_{1}r_{r}\sin\theta+v_{r}[r _{r}\sin(\delta-\theta)-x_{r}\cos(\delta-\theta)]]/z_{r}^{2}\\ dQ_{2}/d\theta=-v_{12}[2V_{1}x_{r}\sin\theta+v_{r}[r_{r}\cos(\delta-\theta)+x_{ r}\sin(\delta-\theta)]]/z_{r}^{2}\end{array} \right. \tag{7}\]  
\[\left\{ \begin{array}{l}dP_{2}/d\theta=-v_{12}[2V_{1}r_{r}\sin\theta+v_{r}[r _{r}\sin(\delta-\theta)-x_{r}\cos(\delta-\theta)]]/z_{r}^{2}\\ dQ_{2}/d\theta=-v_{12}[2V_{1}x_{r}\sin\theta+v_{r}[r_{r}\cos(\delta-\theta)+x_{ r}\sin(\delta-\theta)]]/z_{r}^{2}\end{array} \right. \tag{8}\]  
\[\left\{ \begin{array}{l}dP_{2}/d\delta=v_{r}[V_{1}(r_{r}\sin\delta-x_{r}\cos \delta)+v_{12}[r_{r}\sin(\delta-\theta)-x_{r}\cos(\delta-\theta)]]/z_{r}^{2}\\ dQ_{2}/d\delta=v_{r}[V_{1}(r_{r}\cos\delta+x_{r}\sin\delta)+v_{12}[r_{r}\cos( \delta-\theta)+x_{r}\sin(\delta-\theta)]]/z_{r}^{2}\end{array} \right.