From a9d49d8edd4c85d74266e129d058c5340148f702 Mon Sep 17 00:00:00 2001 From: facat Date: Sun, 1 Sep 2013 17:30:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=94=B5=E6=B5=81=EF=BC=8C?= =?UTF-8?q?=E6=9C=89=E5=8A=9F=EF=BC=8C=E6=97=A0=E5=8A=9F=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E5=85=AC=E5=BC=8F=E3=80=82=E5=BC=80=E5=A7=8B=E8=80=83=E8=99=91?= =?UTF-8?q?=E6=8E=A5=E5=9C=B0=E6=94=AF=E8=B7=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: facat --- BranchI.m | 4 +-- BranchP.m | 2 +- BranchQ.m | 2 +- run.m | 9 ++++-- 鍏紡/鍏紡.tex | 80 ++++++++++++++++++++++++++++++++++++++++++++------- 5 files changed, 79 insertions(+), 18 deletions(-) diff --git a/BranchI.m b/BranchI.m index 8e53f36..bff13ef 100644 --- a/BranchI.m +++ b/BranchI.m @@ -1,5 +1,5 @@ -function [ output_args ] = BranchI( V,lineI,lineJ,lineR,lineX ) -output_args=(V(lineI)-V(lineJ))./(lineR+1j*lineX); +function [ output_args ] = BranchI( V,lineI,lineJ,lineR,lineX,lineB2 ) +output_args=(V(lineI)-V(lineJ))./(lineR+1j*lineX)+V(lineI).*lineB2; end diff --git a/BranchP.m b/BranchP.m index 5028e94..3e6a78e 100644 --- a/BranchP.m +++ b/BranchP.m @@ -1,4 +1,4 @@ function [ output_args ] = BranchP( V,I,lineI,lineB2 ) -output_args=real((V(lineI)).*conj(I))+real(V(lineI) .*conj(1j*lineB2.*V(lineI) ) ); +output_args=real((V(lineI)).*conj(I)); end diff --git a/BranchQ.m b/BranchQ.m index 5aafde9..c2d1e28 100644 --- a/BranchQ.m +++ b/BranchQ.m @@ -1,4 +1,4 @@ function [ output_args ] = BranchQ( V,I,lineI,lineB2 ) -output_args=imag((V(lineI)).*conj(I))+imag(V(lineI) .*conj(1j*lineB2.*V(lineI) ) ); +output_args=imag((V(lineI)).*conj(I)); end diff --git a/run.m b/run.m index 823edb0..82c2039 100644 --- a/run.m +++ b/run.m @@ -2,7 +2,7 @@ clear clc % yalmip('clear') addpath('.\Powerflow') -[~, ~, ~, ~,Volt,Vangle,Y,Yangle,r,c,newwordParameter,PG,QG,PD,QD,Balance]=pf('s1047.dat', '0'); +[~, ~, ~, ~,Volt,Vangle,Y,Yangle,r,c,newwordParameter,PG,QG,PD,QD,Balance]=pf('ieee14.dat', '0'); %% 开始生成量测量 sigma=0.03;% 标准差 %% 电压 @@ -27,7 +27,7 @@ lineX=newwordParameter.line.lineX; lineB2=newwordParameter.line.lineB2; lineG=real(1./(lineR+1j*lineX)); lineB=imag(1./(lineR+1j*lineX)); -cmpBranchI=BranchI( cmpV,lineI,lineJ,lineR,lineX );%复数支路电流 +cmpBranchI=BranchI( cmpV,lineI,lineJ,lineR,lineX,lineB2 );%复数支路电流 rBranchI=abs(cmpBranchI);% 支路电流幅值 mBranchI=rBranchI.*(normrnd(0,sigma,length(rBranchI),1)+1);%支路电流量测量 %% 支路功率 @@ -232,13 +232,16 @@ while max(abs(optimalCondition))>eps % nodePQ=[nodeP;nodeQ]; % c=nodePQ(zerosInjectionIndex); %% 进入迭代 + % 一阶导数 H=[dV_dV,dV_dTyta; dLPij_dVi+dLPij_dVj,dLPij_dThetai+dLPij_dThetaj ; dLQij_dVi+dLQij_dVj,dLQij_dThetai+dLQij_dThetaj ; dTPij_dVi+dTPij_dVj,dTPij_dThetai+dTPij_dThetaj; dTQij_dVi+dTQij_dVj,dTQij_dThetai+dTQij_dThetaj];%jacobi + % 二阶导数 - SEBranchI=BranchI( SEVolt.*exp(1j*SEVAngle),lineI,lineJ,lineR,lineX );%复数支路电流 + + SEBranchI=BranchI( SEVolt.*exp(1j*SEVAngle),lineI,lineJ,lineR,lineX,lineB2 );%复数支路电流 SEBranchP=BranchP( SEVolt.*exp(1j*SEVAngle),SEBranchI,lineI,lineB2 ); SEBranchQ=BranchQ( SEVolt.*exp(1j*SEVAngle),SEBranchI,lineI,lineB2 ); SETransP=TransPower( newwordParameter,SEVolt,SEVAngle ); diff --git a/鍏紡/鍏紡.tex b/鍏紡/鍏紡.tex index 45d7cb5..a04c7b1 100644 --- a/鍏紡/鍏紡.tex +++ b/鍏紡/鍏紡.tex @@ -61,11 +61,25 @@ Q_{ij}&=-[V_1^2-V_1V_2cos(\theta_1 - \theta_2)]B_{ij}-V_1V_2sin (\theta_1 - \the &=-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} +鑰冭檻鎺ュ湴鏀矾鍚(鍒╃敤Ali Abur 涔︿笂鐨勫叕寮) +\newline +鏈夊姛浼犺緭鍔熺巼 +\begin{equation} +\begin{aligned} +P_{ij}&=V_1^2(G_{ij}+G_{is})-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(B_{ij}+B_{is})-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}] +2V_1(G_{ij}+G_{is})-V_2[cos(\theta_1 - \theta_2)G_{ij}+sin (\theta_1 - \theta_2)B_{ij}] \end{aligned} \end{equation} @@ -94,7 +108,7 @@ Q_{ij}&=-[V_1^2-V_1V_2cos(\theta_1 - \theta_2)]B_{ij}-V_1V_2sin (\theta_1 - \the \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}] +-2V_1(B_{12}+B_{is})-V_2[sin(\theta_1 - \theta_2)G_{ij}-cos (\theta_1 - \theta_2)B_{ij}] \end{aligned} \end{equation} @@ -206,20 +220,21 @@ ps.宸叉楠岃繃绾胯矾鐨勫叕寮忋 浠ヤ笂鍏紡宸茬粡鍙互瀹屾垚鐘舵佷及璁★紝鑻ヨ瀹炵幇鏇村ソ鐨勬敹鏁涙э紝闇瑕佸埄鐢ㄤ簩闃跺鏁般 \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} +\frac{2}{k^2}(G_{12}+G_{1s})\\ +&=\frac{2 (G_{12}+G_{1s} ) } {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{-1}{k}[cos(\theta_1 - \theta_2)G_{ij}+sin (\theta_1 - \theta_2)B_{ij}] \\ &= -\frac{-[sin(\theta_1 - \theta_2)G_{ij}-cos (\theta_1 - \theta_2)B_{ij}]}{k} +\frac{-[cos(\theta_1 - \theta_2)G_{ij}+sin (\theta_1 - \theta_2)B_{ij}]}{k} \end{aligned} \end{equation} @@ -232,26 +247,69 @@ ps.宸叉楠岃繃绾胯矾鐨勫叕寮忋 \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}] +\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 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}] \\ +\frac{V_1}{k} V_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}] +- \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 P_{12}}{\partial \theta_2^2}&= --V_1V_2[-cos(\theta_1 - \theta_2)G_{ij}-sin (\theta_1 - \theta_2)B_{ij}] \\ +- \frac{V_1}{k} V_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}] +\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^2 Q_{12}}{\partial V_1 \partial V_1}&= +-2\frac{( B_{12}+B_{1s})}{k^2} \end{aligned} \end{equation} +\begin{equation} +\begin{aligned} +\frac{\partial^2 Q_{12}}{\partial V_1 \partial V_2}&= +-\frac{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^2 Q_{12}}{\partial V_2^2}&=0 +\end{aligned} +\end{equation} + +\begin{equation} +\begin{aligned} +\frac{\partial^2 Q_{12}}{\partial \theta_1^2}&= +-\frac{V_1}{k}V_2[-sin(\theta_1 - \theta_2)G_{ij}+cos (\theta_1 - \theta_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} + +\begin{equation} +\begin{aligned} +\frac{\partial^2 Q_{12}}{\partial \theta_1 \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} + +\begin{equation} +\begin{aligned} +\frac{\partial^2 Q_{12}}{\partial \theta_2^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} +浠ヤ笂鍏紡瀵圭嚎璺拰娌℃湁璁″強鎺ュ湴鏀矾鐨勫彉鍘嬪櫒閫傜敤锛屽彧鏄嚎璺腑鍙樻瘮$k$涓1. + \end{document}