\documentclass[10pt,a4paper,final]{report}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{fontspec}%使用xetex
\usepackage[top=1in, bottom=1in, left=1.0in, right=1.0in]{geometry}
\setmainfont[BoldFont=黑体]{宋体}               % 使用系统默认字体
\XeTeXlinebreaklocale "zh"                      % 针对中文进行断行
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt  % 给予TeX断行一定自由度
\linespread{1.5}                                % 1.5倍行距

\begin{document}
线路功率（不考虑接地导纳）
\begin{equation}
\begin{aligned}
\dot{I}_{12}&=(V_1e^{j \theta_1} - V_2e^{j \theta_2})
(G_{ij}+jB_{ij})
\end{aligned}
\end{equation}
共轭后
\begin{equation}
\begin{aligned}
\dot{I}^*_{12}&=(V_1e^{-j \theta_1} - V_2e^{-j \theta_2})
(G_{ij}-jB_{ij})
\end{aligned}
\end{equation}
\begin{equation}
\begin{aligned}
\dot{S}_{12}&=V_1e^{j \theta_1}
\dot{I}^*_{12} \\
&=V_1e^{j \theta_1}
(V_1e^{-j \theta_1} - V_2e^{-j \theta_2})
(G_{ij}-jB_{ij}) \\
&=(V_1e^{j \theta_1}V_1e^{-j \theta_1}
-V_1e^{j \theta_1}V_2e^{-j \theta_2}
)
(G_{ij}-jB_{ij}) \\
&=[V_1^2-V_1V_2e^{j (\theta_1 - \theta_2) }
]
(G_{ij}-jB_{ij}) \\
&=\{V_1^2-V_1V_2[cos(\theta_1 - \theta_2)+jsin (\theta_1 - \theta_2) ]\}
(G_{ij}-jB_{ij}) \\
&=[V_1^2-V_1V_2cos(\theta_1 - \theta_2)]G_{ij} \\
&+[V_1^2-V_1V_2cos(\theta_1 - \theta_2)](-jB_{ij}) \\
&-jV_1V_2sin (\theta_1 - \theta_2)G_{ij} \\
&-jV_1V_2sin (\theta_1 - \theta_2)(-jB_{ij}) \\
&=[V_1^2-V_1V_2cos(\theta_1 - \theta_2)]G_{ij}-V_1V_2sin (\theta_1 - \theta_2)B_{ij} \\
&-j[V_1^2-V_1V_2cos(\theta_1 - \theta_2)]B_{ij}-jV_1V_2sin (\theta_1 - \theta_2)G_{ij}
\end{aligned}
\end{equation}
有功传输功率
\begin{equation}
\begin{aligned}
P_{ij}&=[V_1^2-V_1V_2cos(\theta_1 - \theta_2)]G_{ij}-V_1V_2sin (\theta_1 - \theta_2)B_{ij} \\
&=V_1^2G_{ij}-V_1V_2[cos(\theta_1 - \theta_2)G_{ij}+sin (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}
无功传输功率
\begin{equation}
\begin{aligned}
Q_{ij}&=-[V_1^2-V_1V_2cos(\theta_1 - \theta_2)]B_{ij}-V_1V_2sin (\theta_1 - \theta_2)G_{ij} \\
&=-V_1^2B_{ij}-V_1V_2[sin(\theta_1 - \theta_2)G_{ij}-cos (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}
线路有功功率Jacobi
\begin{equation}
\begin{aligned}
\frac{\partial P_{ij}}{\partial V_1}=
2V_1G_{ij}-V_2[cos(\theta_1 - \theta_2)G_{ij}+sin (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial P_{12}}{\partial V_2}=
-V_1[cos(\theta_1 - \theta_2)G_{ij}+sin (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial P_{12}}{\partial \theta_1}&=
-V_1V_2[-sin(\theta_1 - \theta_2)G_{ij}+cos (\theta_1 - \theta_2)B_{ij}] \\
&=V_1V_2[sin(\theta_1 - \theta_2)G_{ij}-cos (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial P_{12}}{\partial \theta_2}&=
-V_1V_2[sin(\theta_1 - \theta_2)G_{ij}-cos (\theta_1 - \theta_2)B_{ij}] \\
\end{aligned}
\end{equation}
线路无功功率Jacobi
\begin{equation}
\begin{aligned}
\frac{\partial Q_{12}}{\partial V_1}&=
-2V_1B_{12}-V_2[sin(\theta_1 - \theta_2)G_{ij}-cos (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial Q_{12}}{\partial V_2}&=
-V_1[sin(\theta_1 - \theta_2)G_{ij}-cos (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial Q_{12}}{\partial \theta_1}&=
-V_1V_2[cos(\theta_1 - \theta_2)G_{ij}+sin (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial Q_{12}}{\partial \theta_2}&=
-V_1V_2[-cos(\theta_1 - \theta_2)G_{ij}-sin (\theta_1 - \theta_2)B_{ij}] \\
&=V_1V_2[cos(\theta_1 - \theta_2)G_{ij}+sin (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}
变压器支路功率
\newline 
变压器模型为
\newline
\begin{center}
----k:1----z----高压侧 \\
or \\
i----k:1----z----j \\
\end{center}
变压器支路功率
\newline
变压器有功输送功率
\begin{equation}
\begin{aligned}
P_{ij}&=\frac{V_1^2}{k^2} G_{ij}-\frac{V_1}{k} V_2[cos(\theta_1 - \theta_2)G_{ij}+sin (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}
变压器无功输送功率
\begin{equation}
\begin{aligned}
Q_{ij}&=-\frac{V_1^2}{k^2}B_{ij}-\frac{V_1}{k} V_2[sin(\theta_1 - \theta_2)G_{ij}-cos (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}
变压器输送有功功率Jacobi
\begin{equation}
\begin{aligned}
\frac{\partial P_{ij}}{\partial V_1}=
2\frac{V_1}{k^2}G_{ij}-\frac{V_2}{k}[cos(\theta_1 - \theta_2)G_{ij}+sin (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial P_{12}}{\partial V_2}=
-\frac{V_1}{k}[cos(\theta_1 - \theta_2)G_{ij}+sin (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial P_{12}}{\partial \theta_1}
&=\frac{V_1}{k}V_2[sin(\theta_1 - \theta_2)G_{ij}-cos (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial P_{12}}{\partial \theta_2}&=
-\frac{V_1}{k}V_2[sin(\theta_1 - \theta_2)G_{ij}-cos (\theta_1 - \theta_2)B_{ij}] \\
\end{aligned}
\end{equation}

变压器输送无功功率Jacobi

\begin{equation}
\begin{aligned}
\frac{\partial Q_{12}}{\partial V_1}&=
-2\frac{V_1}{k^2}B_{12}-\frac{V_2}{k}[sin(\theta_1 - \theta_2)G_{ij}-cos (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial Q_{12}}{\partial V_2}&=
-\frac{V_1}{k}[sin(\theta_1 - \theta_2)G_{ij}-cos (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial Q_{12}}{\partial \theta_1}&=
-\frac{V_1}{k}V_2[cos(\theta_1 - \theta_2)G_{ij}+sin (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial Q_{12}}{\partial \theta_2}
&=\frac{V_1}{k}V_2[cos(\theta_1 - \theta_2)G_{ij}+sin (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}


推导电流量测的公式
之前已经有
\begin{equation}
	\begin{aligned}
		\dot{I}_{12}&=(V_1e^{j \theta_1} - V_2e^{j \theta_2})
		(G_{ij}+jB_{ij})
	\end{aligned}
\end{equation}
将其写成完全极坐标形式
 \begin{equation}
 	\begin{aligned}
 	\dot{I}_{12}=(V_1e^{j \theta_1} - V_2e^{j \theta_2})
    Y_{12}e^{j \alpha}
 	\end{aligned}
 \end{equation}
 
 \begin{equation}
 \begin{aligned}
 \dot{I}_{12}=V_1e^{j \theta_1}Y_{12}e^{j \alpha} - V_2e^{j \theta_2}Y_{12}e^{j \alpha} 
 \end{aligned}
 \end{equation}
 
  \begin{equation}
  \begin{aligned}
  \dot{I}_{12}=V_1Y_{12}e^{j \theta_1 + \alpha} - V_2eY_{12}^{j \theta_2+\alpha}
  \end{aligned}
  \end{equation}

\begin{equation}
\begin{aligned}
\dot{I}_{12}=V_1Y_{12}[cos(\theta_1 + \alpha) +1jsin(\theta_1 + \alpha)]
-V_2Y_{12}[cos(\theta_2 + \alpha) +1jsin(\theta_2 + \alpha)]
\end{aligned}
\end{equation}    

  电流实部为
  
\begin{equation}
\begin{aligned}
I_{r12}=V_1Y_{12}cos(\theta_1 + \alpha)
-V_2Y_{12}cos(\theta_2 + \alpha)
\end{aligned}
\end{equation}   

电流虚部为

\begin{equation}
\begin{aligned}
I_{i12}=V_1Y_{12}sin(\theta_1 + \alpha)
-V_2Y_{12}sin(\theta_2 + \alpha)
\end{aligned}
\end{equation} 

对电流实部求导

\begin{equation}
\frac{\partial I_{r12}}{\partial V_1}=
Y_{12}cos(\theta_1 +\alpha)
\end{equation}

\begin{equation}
\frac{\partial I_{r12}}{\partial V_2}=
-Y_{12}cos(\theta_2 +\alpha)
\end{equation}

\begin{equation}
\frac{\partial I_{r12}}{\partial \theta_1}=
-V_1Y_{12}sin(\theta_1 +\alpha)
\end{equation}

\begin{equation}
\frac{\partial I_{r12}}{\partial \theta_2}=
V_2Y_{12}sin(\theta_2 +\alpha)
\end{equation}

对电流虚部求导

\begin{equation}
\frac{\partial I_{i12}}{\partial V_1}=
Y_{12}sin(\theta_1 +\alpha)
\end{equation}

\begin{equation}
\frac{\partial I_{i12}}{\partial V_2}=
-Y_{12}sin(\theta_2 +\alpha)
\end{equation}

\begin{equation}
\frac{\partial I_{i12}}{\partial \theta_1}=
V_1Y_{12}cos(\theta_1 +\alpha)
\end{equation}

\begin{equation}
\frac{\partial I_{i12}}{\partial \theta_2}=
-V_2Y_{12}cos(\theta_2 +\alpha)
\end{equation}

状态估计中用得更多的是电流幅值的平方，即

\begin{equation}
I^2_{12}=I_{r12}^2+I_{i12}^2
\end{equation}
对其求导

\begin{equation}
\frac{\partial I^2_{12}}{\partial V_1}=
2\frac{\partial I_{r12}}{\partial V_1}
+
2\frac{\partial I_{i12}}{\partial V_1}
\end{equation}


为了推潮流公式，先从简单的开始推起。

\begin{equation}
\Delta P =diag ( \left[
\begin{array}{c}
V_1\\
V_2
\end{array}
\right]
)
\left[ 
\begin{array}{cc}
a & b \\
c & d
\end{array}	
\right]
\left[
\begin{array}{c}
V_1\\
V_2
\end{array}	
\right]
\end{equation}

\begin{equation}
\Delta P =
\left[
\begin{array}{c}
aV_1^2+bV_1V_2 \\
cV_1V_2+dV_2^2
\end{array}
\right]
\end{equation}
所以
\begin{equation}
\begin{array}{cc}
\dfrac{\Delta P}{\partial V}&=
\left[
\begin{array}{cc}
2aV_1+bV_2 & bV_1\\
cV_2 & cV_1+2dV_2
\end{array}
\right] \\
&=diag(
\left[
\begin{array}{c}
V_1\\
V_2
\end{array}
\right]
)
\left[
\begin{array}{cc}
a & b\\
c & d
\end{array}
\right]
+diag(
\left[
\begin{array}{cc}
a & b\\
c & d
\end{array}
\right]
\left[
\begin{array}{c}
V_1\\
V_2
\end{array}
\right]
)
\end{array}
\end{equation}

再看
\begin{equation}
\Delta P =diag ( \left[
\begin{array}{c}
V_1\\
V_2
\end{array}
\right]
)
\left[ 
\begin{array}{cc}
cos(t_1-t_1) & cos(t_1-t_2) \\
cos(t_2-t_1) & cos(t_2-t_2)
\end{array}	
\right]
\left[
\begin{array}{c}
V_1\\
V_2
\end{array}	
\right]
\end{equation}


\begin{equation}
\Delta P=
diag(
\left[
\begin{array}{c}
V_1 \\
V_2
\end{array}
\right]
)
\left[
\begin{array}{c}
V_1cos(t_1-t_1)+V_2cos(t_1-t_2) \\
V_1cos(t_2-t_1)+V_2cos(t_2-t_2) \\
\end{array}
\right]
\end{equation}

\begin{equation}
\frac{\Delta P}{\partial t}=
diag(
\left[
\begin{array}{c}
V_1 \\
V_2
\end{array}
\right]
)
\left[
\begin{array}{cc}
-V_2sin(t_1-t_2) & V_2sin(t_1-t_2) \\
V_1sin(t_2-t_1) & -V_1sin(t_2-t_1) \\
\end{array}
\right]
\end{equation}
\begin{equation}
\frac{\Delta P}{\partial t}=
\begin{array}{c}
diag(
\left[
\begin{array}{c}
V_1 \\
V_2
\end{array}
\right]
)
\\
\left[
\begin{array}{cc}
V_1sin(t_1-t_1)-V_2sin(t_1-t_2)-V_1sin(t_1-t_1) & V_2sin(t_1-t_2) \\
V_1sin(t_2-t_1) & V_2sin(t_2-t_2)-V_2sin(t_2-t_2)-V_1sin(t_2-t_1)
\end{array}
\right]
\end{array}
\end{equation}
\begin{equation}
\frac{\Delta P}{\partial t}=
diag(
\left[
\begin{array}{c}
V_1 \\
V_2
\end{array}
\right]
)
\left\{
\left[
\begin{array}{cc}
sin(t_1-t_1) & sin(t_1-t_2) \\
sin(t_2-t_1) & sin(t_2-t_2)
\end{array}
\right]
diag(
\left[
\begin{array}{c}
V_1 \\
V_2
\end{array}
\right]
)
-
diag(
\left[
\begin{array}{cc}
sin(t_1-t_1) & sin(t_1-t_2) \\
sin(t_2-t_1) & sin(t_2-t_2)
\end{array}
\right]
\left[
\begin{array}{c}
V_1\\
V_2
\end{array}
\right]
)
\right\}
\end{equation}

接下来推导潮流无功公式
\begin{equation}
\Delta Q =diag ( \left[
\begin{array}{c}
V_1\\
V_2
\end{array}
\right]
)
\left[ 
\begin{array}{cc}
sin(t_1-t_1) & sin(t_1-t_2) \\
sin(t_2-t_1) & sin(t_2-t_2)
\end{array}	
\right]
\left[
\begin{array}{c}
V_1\\
V_2
\end{array}	
\right]
\end{equation}

\begin{equation}
\Delta Q=
diag(
\left[
\begin{array}{c}
V_1 \\
V_2
\end{array}
\right]
)
\left[
\begin{array}{c}
V_1sin(t_1-t_1)+V_2sin(t_1-t_2) \\
V_1sin(t_2-t_1)+V_2sin(t_2-t_2) \\
\end{array}
\right]
\end{equation}

\begin{equation}
\dfrac{\partial \Delta Q}{\partial t}=
diag(
\left[
\begin{array}{c}
V_1 \\
V_2
\end{array}
\right]
)
\left[
\begin{array}{cc}
V_2cos(t_1-t_2) & -V_2cos(t_1-t_2) \\
-V_1cos(t_2-t_1) & V_1cos(t_2-t_1)
\end{array}
\right]
\end{equation}

\begin{equation}
\dfrac{\partial \Delta Q}{\partial t}=
\begin{array}{c}
diag(
\left[
\begin{array}{c}
V_1 \\
V_2
\end{array}
\right]
)\\
\left[
\begin{array}{cc}
-V_1cos(t_1-t_1) & -V_2cos(t_1-t_2) \\
-V_1cos(t_2-t_1) & -V_2cos(t_2-t_2)
\end{array}
\right]
+
\left[
\begin{array}{cc}
V_1cos(t_1-t_1)+V_2cos(t_1-t_2) & 0  \\
0 & V_1cos(t_2-t_1)+V_2cos(t_2-t_2)
\end{array}
\right]

\end{array}
\end{equation}

\begin{equation}
\dfrac{\partial \Delta Q}{\partial t}=
diag(
\left[
\begin{array}{c}
V_1 \\
V_2
\end{array}
\right]
)
\left\{
-
\left[
\begin{array}{cc}
cos(t_1-t_1) & cos(t_1-t_2) \\
cos(t_2-t_1) & cos(t_2-t_2)
\end{array}
\right]
diag(
\left[
\begin{array}{c}
V_1 \\
V_2
\end{array}
\right]
)
+diag(
\left[
\begin{array}{cc}
cos(t_1-t_1) & cos(t_1-t_2) \\
cos(t_2-t_1) & cos(t_2-t_2)
\end{array}
\right]
\left[
\begin{array}{c}
V_1 \\
V_2
\end{array}
\right]
)
\right\}
\end{equation}


潮流方程有功的公式为
\begin{equation}
\Delta P=diag(V)[Y.*cos(\theta e^T -e \theta^T-\alpha)]V+P_{D}-P_{G}=0
\end{equation}

\begin{equation}
\frac{\partial P}{\partial V}=
\end{equation}

ps.已检验过线路以及变压器支路的公式。
\par
以上公式已经可以完成状态估计，若要实现更好的收敛性，需要利用二阶导数。
\par
线路支路功率二阶导数
\begin{equation}
\begin{aligned}
\frac{\partial^2 P_{12}}{\partial V_1^2}&=
\frac{-2}{k^2}B_{12}\\
&=\frac{-2B_{12}}{k^2}
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial^2 P_{12}}{\partial V_1 \partial V_2 }&=
\frac{-1}{k}[sin(\theta_1 - \theta_2)G_{ij}-cos (\theta_1 - \theta_2)B_{ij}] \\
&=
\frac{-[sin(\theta_1 - \theta_2)G_{ij}-cos (\theta_1 - \theta_2)B_{ij}]}{k}
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial^2 P_{12}}{\partial V_2^2}&=0
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial P_{12}}{\partial \theta_1^2}&=
V_1V_2[cos(\theta_1 - \theta_2)G_{ij}+sin (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial P_{12}}{\partial \theta_1 \partial \theta_2}&=
V_1V_2[-cos(\theta_1 - \theta_2)G_{ij}-sin (\theta_1 - \theta_2)B_{ij}] \\
&=
-V_1V_2[cos(\theta_1 - \theta_2)G_{ij}+sin (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial P_{12}}{\partial \theta_2^2}&=
-V_1V_2[-cos(\theta_1 - \theta_2)G_{ij}-sin (\theta_1 - \theta_2)B_{ij}] \\
&=
V_1V_2[cos(\theta_1 - \theta_2)G_{ij}+sin (\theta_1 - \theta_2)B_{ij}]
\end{aligned}
\end{equation}

\end{document}
