fxcall.m

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

M
25
字号
function Fxcall(a)

global DAE Bus Pod

if ~a.n, return, end

V = DAE.V(a.bus);
ist = DAE.x(a.ist);
Kr = a.con(:,5);
Tr = a.con(:,6);
ist_max = a.con(:,7);
ist_min = a.con(:,8);

DAE.Fx = DAE.Fx + sparse(a.ist,a.ist,-1./Tr,DAE.n,DAE.n);     

u = (ist <= ist_max & ist >= ist_min);

DAE.Gx = DAE.Gx - sparse(Bus.n+a.bus,a.ist,u.*V,2*Bus.n,DAE.n);
DAE.Fy = DAE.Fy - sparse(a.ist,Bus.n+a.bus,u.*Kr./Tr, ...
                         DAE.n,2*Bus.n);
if a.pod
  DAE.Fx(a.ist(a.pod),Pod.Vs(Pod.statcom)) = ...
      Pod.u(Pod.statcom).*u(a.pod).*Kr(a.pod)./Tr(a.pod);
end

⌨️ 快捷键说明

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