📄 fm_b.m
字号:
function fm_b
% FM_B build admittance matrix B' and B" for fast decoupled
% power flow solution (FDPF)
%
% FM_B
%
%see also FM_Y and Settings
%
%Author: Federico Milano
%Date: 11-Nov-2002
%Version: 1.0.0
%
%E-mail: fmilano@thunderbox.uwaterloo.ca
%Web-site: http://thunderbox.uwaterloo.ca/~fmilano
%
% Copyright (C) 2002-2006 Federico Milano
global Line Bus Shunt Settings
% process line data and build admittance matrix Line.Bp
ts = exp(j*Line.con(:,12)*pi/180);
% XB method: no line resistance
if Settings.pfsolver == 2,
y = -j./Line.con(:,9);
else
y = 1./(Line.con(:,8) + j*Line.con(:,9));
end
Line.Bp = sparse(Line.from, Line.to, -y./conj(ts), Bus.n, Bus.n) + ...
sparse(Line.to, Line.from, -y./ts, Bus.n, Bus.n) + ...
sparse(Line.from, Line.from, y./ts, Bus.n, Bus.n) + ...
sparse(Line.to, Line.to, y, Bus.n, Bus.n);
Line.Bp = -imag(Line.Bp);
% process line data and build admittance matrix Line.Bpp
chrg = Line.con(:,10);
ts = Line.con(:,11);
ts2= ts.*ts;
% BX method: no line resistance
if Settings.pfsolver == 3,
y = -j./Line.con(:,9);
else
y = 1./(Line.con(:,8) + j*Line.con(:,9));
end
Line.Bpp = sparse(Line.from, Line.to, -y./conj(ts), Bus.n, Bus.n) + ...
sparse(Line.to, Line.from, -y./ts, Bus.n, Bus.n) + ...
sparse(Line.from, Line.from, (y+j*chrg)./ts2, Bus.n, Bus.n) + ...
sparse(Line.to, Line.to, y+j*chrg, Bus.n, Bus.n) + ...
sparse(1:Bus.n,1:Bus.n,2*(Shunt.g+j*Shunt.b),Bus.n,Bus.n);
Line.Bpp = -imag(Line.Bpp);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -