# Power Flow Calculation Methods for Power Systems with Novel Structure UPFC
## 3 Three Power Flow Calculation Methods  
### Power Mismatch Equations and Jacobian Matrix  
After the UPFC is considered, the power mismatch equations and the Jacobian matrix need to be modified. For the general structure UPFC, after the UPFC equivalent power injections are considered, the power mismatch equations of bus \(l\), bus \(m\) and bus \(n\) in polar coordinates become:  
\[\left\{ \begin{array}{l}\Delta P_{l}=P_{ls}-P_{lm}-u_{l}\underset{i\in l}{ \sum}u_{i}(G_{li}\cos\theta_{li}+B_{li}\sin\theta_{li})\\ \Delta Q_{l}=Q_{ls}-Q_{lm}-u_{l}\underset{i\in l}{\sum}u_{i}(G_{li}\sin\theta _{li}-B_{li}\cos\theta_{li})\\ \end{array} \right. \tag{13}\] \[\left\{ \begin{array}{l}\Delta P_{m}=P_{ms}-P_{ml}-u_{m}\underset{i \in m}{\sum}u_{i}(G_{mi}\cos\theta_{mi}+B_{mi}\sin\theta_{mi})\\ \Delta Q_{m}=Q_{ms}-Q_{ml}-u_{m}\underset{i\in m}{\sum}u_{i}(G_{mi}\sin\theta _{mi}-B_{mi}\cos\theta_{mi})\\ \end{array} \right.\] \[\left\{ \begin{array}{l}\Delta P_{n}=P_{ns}-P_{ne}-u_{n}\underset{i \in n}{\sum}u_{i}(G_{mi}\cos\theta_{ni}+B_{ni}\sin\theta_{ni})\\ \Delta Q_{n}=Q_{ns}-Q_{ne}-u_{n}\underset{i\in n}{\sum}u_{i}(G_{ni}\sin\theta _{ni}-B_{ni}\cos\theta_{ni})\\ \end{array} \right.\]  
For bus \(l\), bus \(m\) and bus \(n\), there are three items on the right side of their power mismatch equations. The first items (\(P_{ls}\), \(Q_{ls}\), \(P_{ms}\), \(Q_{ms}\), \(P_{ns}\) and \(Q_{ns}\)) are the nodal injection power without the UPFC line. The second items (\(P_{lm}\), \(Q_{lm}\), \(P_{ml}\), \(Q_{ml}\), \(P_{ne}\) and \(Q_{ne}\)) are the UPFC equivalent power injections. The third items are the power injected by the nodes into the network, which are the same as those of the system without the UPFC line. Except these UPFC buses (bus \(l\), bus \(m\) and bus \(n\)), the power mismatch equations of other buses are the same as those of the system without the UPFC line. According to Equations (8)-(11), \(P_{lm}\), \(Q_{lm}\), \(P_{ml}\), \(Q_{ml}\) and \(P_{ne}\) are only related to the voltages of UPFC buses. \(Q_{ne}\) is either a fixed value (when the shunt converter controls \(Q_{ne}\)) or does not need to participate in the iterations (when the shunt converter controls the voltage magnitude of bus \(n\)). Therefore, the Newton-Raphson matrix equations can be expressed as follows:  
\[\left[ \begin{array}{c}\Delta\mathbf{P_{1}}\\ \Delta\mathbf{P_{2}}\\ \Delta\mathbf{Q_{1}}\\ \Delta\mathbf{Q_{2}}\end{array} \right]=\left[ \begin{array}{cccc}\mathbf{H_{1 1}}&\mathbf{H_{12}}&\mathbf{N_{11}}&\mathbf{N_{12}}\\ \mathbf{H_{21}}&\mathbf{H_{22}}+\mathbf{H_{U}}&\mathbf{N_{21}}&\mathbf{N_{22}}+ \mathbf{N_{U}}\\ \mathbf{J_{11}}&\mathbf{J_{12}}&\mathbf{L_{11}}&\mathbf{L_{12}}\\ \mathbf{J_{21}}&\mathbf{J_{22}}+\mathbf{J_{U}}&\mathbf{L_{21}}&\mathbf{L_{22}}+ \mathbf{L_{U}}\end{array} \right]\left[ \begin{array}{c}\Delta\mathbf{\theta_ {1}}\\ \Delta\mathbf{\theta_{2}}\\ \Delta\mathbf{\theta_{1}}/\mathbf{U_{1}}\\ \Delta\mathbf{\theta_{2}}/\mathbf{U_{2}}\end{array} \right] \tag{14}\]  
where \(\mathbf{P_{1}}\), \(\mathbf{Q_{1}}\), \(\mathbf{\theta_{1}}\) and \(\mathbf{U_{1}}\) are variables of non-UPFC buses, \(P_{2}\), \(Q_{2}\), \(\mathbf{\theta_{2}}\) and \(\mathbf{U_{2}}\) are variables of UPFC buses. \(H_{ij}\), \(N_{ij}\), \(J_{ij}\) and \(L_{ij}\) (\(i=1,2;j=1,2\)) in the Jacobian matrix are the same as those of the system without the UPFC. \(H_{U}\), \(N_{U}\), \(J_{U}\) and \(L_{U}\) are the modifications of the Jacobian matrix required after considering the UPFC line. Figure 3: The equivalent model of the conventional structure UPFC. For the general structure UPFC, \(\mathbf{P_{2}}\), \(\mathbf{Q_{2}}\), \(\mathbf{\theta_{2}}\) and \(\mathbf{U_{2}}\) are:  
\[\left\{\begin{array}{l}\Delta\mathbf{P_{2}}=\left[