⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fm_b.m

📁 电力系统的psat
💻 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-2005 Federico Milano%% This toolbox is free software; you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation; either version 2.0 of the License, or% (at your option) any later version.%% This toolbox is distributed in the hope that it will be useful, but% WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANDABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU% General Public License for more details.%% You should have received a copy of the GNU General Public License% along with this toolbox; if not, write to the Free Software% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,% USA.global Line Bus Shunt Settings% process line data and build admittance matrix Line.Bpts = exp(j*Line.con(:,12)*pi/180);% XB method: no line resistanceif Settings.pfsolver == 2,    y = -j./Line.con(:,9);else    y = 1./(Line.con(:,8) + j*Line.con(:,9));endLine.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.Bppchrg = Line.con(:,10);ts = Line.con(:,11);ts2= ts.*ts;% BX method: no line resistanceif Settings.pfsolver == 3,    y = -j./Line.con(:,9);else    y = 1./(Line.con(:,8) + j*Line.con(:,9));endLine.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 + -