## 2 Forward and Backward Contribution Matrix
### Bus Current and Bus Power  
For a power network, the bus voltage and bus injection-current can be written in the rectangular form as \(\overline{V}_{i}=e_{i}+jf_{i}\) and \(\overline{I}_{i}=I_{i,R}+jI_{i,I}\). Let \(\overline{S_{i}}=p_{i}+jq_{i}\) be the complex-power injection of bus \(i\). The equivalent-current-injection for real and imaginary current on bus k can be calculated by:  
\[\overline{I}_{k}=I_{k,R}+jI_{k,I}=\left(\frac{\overline{S}_{k}}{\overline{V}_ {k}}\right)^{*}=\left(\frac{p_{k}+jq_{k}}{e_{k}+jf_{k}}\right)^{*} \tag{1}\]where \(p_{k}\) and \(q_{k}\) are the active and reactive power injections on bus \(k\). Equation (1) can be also calculated by:  
\[ \begin{array}{l}I_{k,R}=\frac{e_{k}}{e_{k}^{2}+f_{k}^{2}}p_{i}+\frac{f_{k}}{e_{ k}^{2}+f_{k}^{2}}q_{k}\\ I_{k,I}=\frac{f_{k}}{e_{k}^{2}+f_{k}^{2}}p_{k}+\frac{-e_{k}}{e_{k}^{2}+f_{k}^{2}} q_{k}\end{array}  \tag{2}\]  
For a network, all above elements can be found from the converged AC load flow solution. For a N-bus system, Equation (2) can be written in the matrix form as:  
\[ \begin{bmatrix}I_{R}\\ -\\ I_{I}\end{bmatrix} _{2N\times 1}=\left[T\right]_{2N\times 2N}\cdot \begin{bmatrix}P \\ -\\ Q\end{bmatrix} _{2N\times 1}=\begin{bmatrix}T_{1}&\mid&T_{2}\\ -&-&--  
the forward line current \(I_{ij}\), and \(E\) and \(F\) for the real and imaginary vectors of bus voltages, we have the matrix form for an M-line section and N-Bus network:  
\[ \begin{bmatrix}I^{f}_{line,R}\\ --\\ I^{f}_{line,I}\end{bmatrix} _{2M\times 1}= \begin{bmatrix}Y^{f}_{c}\\ \end{bmatrix} _{2M\times 2\text{N}}\cdot \begin{bmatrix}V\end{bmatrix} _{2\text{N} \times 1}= \begin{bmatrix}Y^{f}_{c,G}&|&-Y^{f}_{c,B}\\ --&-&--\\ Y^{f}_{c,B}&|&Y^{f}_{c,G}\end{bmatrix} _{2\text{M}\times 2\text{N}}\cdot \begin{bmatrix}E\\ -\\ F\end{bmatrix} _{2\text{N}\times 1} \tag{5}\]  
where \(Y_{c}\) is the original admittance matrix. Similarly, the current from bus \(j\) to \(i\), \(I_{ji}\), is defined as the \"backward\" current. Note that it is not equal to \(I_{ij}\) when the shunt element is considered. A similar matrix can be written for the backward current by:  
\[ \begin{bmatrix}I^{b}_{line,R}\\ -\\ I^{b}_{line,I}\end{bmatrix} _{2M\times 1}= \begin{bmatrix}Y^{b}_{c}\\ \end{bmatrix} _{2M\times 2\text{N}}\cdot \begin{bmatrix}V\end{bmatrix} _{2 \text{N}\times 1}= \begin{bmatrix}Y^{b}_{c,G}&|&-Y^{b}_{c,B}\\ --&-&-\\ Y^{b}_{c,B}&|&Y^{b}_{c,G}\end{bmatrix} _{2M\times 2N}\cdot \begin{bmatrix}E\\ -\\ F\end{bmatrix} _{2N\times 1} \tag{6}\]  
For the \(m^{th}\) line, the forward and backward power flow can be found by:  
\[\overline{S_{ij}}=P_{ij}+jQ_{ij}=\overline{V}_{i}\cdot\overline{I}^{*}_{ij}= \left(e_{i}+jf_{i}\right)\cdot\left(I_{ij,R}+jI_{ij,I}\right)^{*}=\left(e_{i }\cdot I_{ij,R}+f_{i}\cdot I_{ij,I}\right)+j\big{(}f_{i}\cdot I_{ij,R}-e_{i} \cdot I_{ij,I}\big{)} \tag{7}\]  
\[\overline{S_{ji}}=P_{ji}+jQ_{ji}=\overline{V}_{j}\cdot\overline{I}^{*}_{ji}= \left(e_{j}+jf_{j}\right)\cdot\left(I_{ij,R}+jI_{ij,I}\right)^{*}=\left(e_{j }\cdot I_{ji,R}+f_{j}\cdot I_{ji,I}\right)+j\big{(}f_{j}\cdot I_{ji,R}-e_{j} \cdot I_{ji,I}\big{)} \tag{8}\]  
where \(P_{ij}\) and \(Q_{ij}\) are called the \"forward\" active and reactive power flow, while \(P_{ji}\) and \(Q_{ji}\) are the \"backward\" active and reactive line power flow, and the \"forward\" or \"backward\" direction can be chosen arbitrarily. The matrix form of Equations (7) and (8), i.e., the line power for the M-line section network, can now be formulated by:  
\[ \begin{bmatrix}P^{f}_{line}\\ --\\ Q^{f}_{line}\end{bmatrix} _{2M\times 1}= \begin{bmatrix}H^{f}\end{bmatrix} _{2M \times 2M} \begin{bmatrix}I^{f}_{line,R}\\ --\\ I^{f}_{line,I}\end{bmatrix} _{2M\times 1}= \begin{bmatrix}E^{f}&|&F^{f}\\ --&--\\ F^{f}&|&-E^{f}\end{bmatrix} _{2M\times 2M} \begin{bmatrix}I^{f}_{line,R}\\ --\\ I^{f}_{line,I}\end{bmatrix} _{2M\times 1} \tag{9}\]  
\[ \begin{bmatrix}P^{b}_{line}\\ --\\ Q^{b}_{line}\end{bmatrix} _{2M\times 1}= \begin{bmatrix}H^{b}\end{bmatrix} _{2M \times 2M} \begin{bmatrix}I^{b}_{line,R}\\ --\\ I^{b}_{line,I}\end{bmatrix} _{2M\times 1}=