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

📄 numdiff.m

📁 这是一个很适合研究和学习用的电力系统仿真软件
💻 M
字号:
function numdiff(a,ffn,xa,Va,anga)

global NLA Settings DAE 

if ~a.n, return, end

% B matrix using numerical differentiation

fm_nrlf(Settings.lfmit,Settings.lftol,0);

incY = 0; 

for j = 1:a.n

  deltaU = max(NLA.tol,abs(NLA.tol*a.Vref(j)));
  old = a.Vref(j);
  a.Vref(j) = a.Vref(j)+deltaU;
  % update algebraic variables
  fm_nrlf(Settings.lfmit,Settings.lftol,0);
  a = fcall(a);
  ff = DAE.f;
  NLA.b_svc(:,j)=(ff-ffn)./deltaU;
  DAE.x = xa;
  DAE.a = anga;
  DAE.V = Va;   
  a.Vref(j) = old;
  
end

⌨️ 快捷键说明

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