fxcall.m

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

M
22 行
字号
function Fxcall(a)

global DAE Bus Settings

if ~a.n, return, end

V = DAE.V(a.bus);
P0 = a.con(:,2);
Q0 = a.con(:,5);
ap = a.con(:,3);
aq = a.con(:,6);
bp = a.con(:,4);
bq = a.con(:,7);

DAE.Fx = DAE.Fx + sparse(a.x,a.x,-1./a.con(:,8),DAE.n,DAE.n);
DAE.Fy = DAE.Fy + sparse(a.x,a.bus,-1./a.con(:,8)./ ...
                         a.con(:,8)/Settings.rad,DAE.n,2*Bus.n);
DAE.Gx = DAE.Gx + sparse(a.bus,a.x,P0.*V.^ap.*bp.* ...
                         (1+a.Dw).^(bp-1),2*Bus.n,DAE.n);
DAE.Gx = DAE.Gx + sparse(a.bus+Bus.n,a.x,Q0.*V.^aq.*bq.* ...
                         (1+a.Dw).^(bq-1),2*Bus.n,DAE.n);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?