parent
4b44a7684f
commit
ce9a59ec09
|
|
@ -0,0 +1,104 @@
|
||||||
|
\documentclass[10pt,a4paper,final]{report}
|
||||||
|
\usepackage[utf8]{inputenc}
|
||||||
|
\usepackage{amsmath}
|
||||||
|
\usepackage{amsfonts}
|
||||||
|
\usepackage{amssymb}
|
||||||
|
\usepackage{fontspec}%使用xetex
|
||||||
|
\setmainfont[BoldFont=黑体]{宋体} % 使用系统默认字体
|
||||||
|
\XeTeXlinebreaklocale "zh" % 针对中文进行断行
|
||||||
|
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt % 给予TeX断行一定自由度
|
||||||
|
\linespread{1.5} % 1.5倍行距
|
||||||
|
\begin{document}
|
||||||
|
由于之前的Gauss-Newton对1047节点收敛性不好(dX为0的时候,最优条件不为0),准备改用内点法求解。
|
||||||
|
\begin{equation}
|
||||||
|
f(x)=[z-h(x)]^T W [z-h(x)]
|
||||||
|
\end{equation}
|
||||||
|
最优条件等价为
|
||||||
|
\begin{equation}
|
||||||
|
\bigtriangledown f(x)=J^T W [z-h(x)]=0
|
||||||
|
\end{equation}
|
||||||
|
其中$J$是$h(x)$的$Jacobi$矩阵
|
||||||
|
\newline
|
||||||
|
对于线路功率
|
||||||
|
线路有功功率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}
|
||||||
|
|
||||||
|
|
||||||
|
利用Newton法对上式进行展开,写成元素形式。以两个变量为例
|
||||||
|
\begin{equation}
|
||||||
|
\bigtriangledown f= [ \bigtriangledown f_1\,, ... \,,\bigtriangledown f_n]^T
|
||||||
|
\end{equation}
|
||||||
|
\begin{equation}
|
||||||
|
\begin{aligned}
|
||||||
|
\bigtriangledown^2 f_1=(\omega_1 \frac{ \partial f_1 }{\partial x_1} \frac{ \partial f_1 }{\partial x_1}
|
||||||
|
+\omega_2 \frac{ \partial f_2 }{\partial x_1} \frac{ \partial f_2 }{\partial x_1} ) \Delta x_1 \\
|
||||||
|
+ (\omega_1 \frac{ \partial f_1 }{\partial x_1} \frac{ \partial f_1 }{\partial x_2}
|
||||||
|
+\omega_2 \frac{ \partial f_2 }{\partial x_1} \frac{ \partial f_2 }{\partial x_2} ) \Delta x_2 \\
|
||||||
|
+( \omega_1 f_1 \frac{ \partial ^2 f_1 }{ \partial x_1 \partial x_1 } + \omega_2 f_2 \frac{ \partial ^2 f_2 }{ \partial x_1 \partial x_1 } ) \Delta x_1 \\
|
||||||
|
+ ( \omega_1 f_1 \frac{ \partial ^2 f_1 }{ \partial x_1 \partial x_2 } + \omega_2 f_2 \frac{ \partial ^2 f_2 }{ \partial x_1 \partial x_2 } ) \Delta x_2
|
||||||
|
\end{aligned}
|
||||||
|
\end{equation}
|
||||||
|
利用matlab的语句可以表示为
|
||||||
|
\begin{equation}
|
||||||
|
J ^T W J + \tilde{Q}
|
||||||
|
\end{equation}
|
||||||
|
其中
|
||||||
|
\begin{equation}
|
||||||
|
J ^T W J=
|
||||||
|
(\omega_1 \frac{ \partial f_1 }{\partial x_1} \frac{ \partial f_1 }{\partial x_1}
|
||||||
|
+\omega_2 \frac{ \partial f_2 }{\partial x_1} \frac{ \partial f_2 }{\partial x_1} ) \Delta x_1 \\
|
||||||
|
+ (\omega_1 \frac{ \partial f_1 }{\partial x_1} \frac{ \partial f_1 }{\partial x_2}
|
||||||
|
+\omega_2 \frac{ \partial f_2 }{\partial x_1} \frac{ \partial f_2 }{\partial x_2} ) \Delta x_2
|
||||||
|
\end{equation}
|
||||||
|
|
||||||
|
\begin{equation}
|
||||||
|
\label{非矢量化二阶导数}
|
||||||
|
\tilde{Q}=
|
||||||
|
( \omega_1 f_1 \frac{ \partial ^2 f_1 }{ \partial x_1 \partial x_1 } + \omega_2 f_2 \frac{ \partial ^2 f_2 }{ \partial x_1 \partial x_1 } ) \Delta x_1 \\
|
||||||
|
+ ( \omega_1 f_1 \frac{ \partial ^2 f_1 }{ \partial x_1 \partial x_2 } + \omega_2 f_2 \frac{ \partial ^2 f_2 }{ \partial x_1 \partial x_2 } ) \Delta x_2
|
||||||
|
\end{equation}
|
||||||
|
式(\ref{非矢量化二阶导数})可以用Matlab语言在不需要循环的情况下处理好。因为
|
||||||
|
% 线路功率二阶导数
|
||||||
|
\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}
|
||||||
|
利用
|
||||||
|
sparse([1 1],[1 1],[$ \omega_1 f_1 \frac{ \partial ^2 f_1 }{ \partial x_1 \partial x_1 } \quad \omega_2 f_2 \frac{ \partial ^2 f_2 }{ \partial x_1 \partial x_1 } $] ) 可以表示
|
||||||
|
$
|
||||||
|
\omega_1 f_1 \frac{ \partial ^2 f_1 }{ \partial x_1 \partial x_1 } + \omega_2 f_2 \frac{ \partial ^2 f_2 }{ \partial x_1 \partial x_1 }
|
||||||
|
$
|
||||||
|
在海森矩阵中与 $\Delta x_1$ 对应的元素,也就是第一行第一列的元素,其他的类似。用这种办法可以不利用矢量化公式任然依靠Matlab语句实现矢量化运算。
|
||||||
|
|
||||||
|
\end{document}
|
||||||
|
|
||||||
Loading…
Reference in New Issue