fm_b.m

来自「这是一个很适合研究和学习用的电力系统仿真软件」· M 代码 · 共 52 行

M
52
字号
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 + =
减小字号Ctrl + -
显示快捷键?