pes2014-debug2-laplace/solvefun.m

13 lines
482 B
Matlab
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function[Uangle,U] = solvefun(Busnum,Jacob,PQ,Uangle,U)
%**************************************************************************
% 程序功能 : 子函数——求解修正方程
% 编 者:
% 编制时间2010.12
%**************************************************************************
%% 计算修正方程
PQ = sparse(PQ);
X = (Jacob\-PQ')';
%% 更新电压变量
Uangle = Uangle+X(1:Busnum); % 更新电压相角
U = U+U.*X(Busnum+1:end); % 更新电压幅值
end