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

📄 gcall.m

📁 电力系统分析计算程序
💻 M
字号:
function p = gcall(p)global DAE Settings Bus PVif ~p.n, return, endidx = find(p.u);DAE.g(p.bus(idx)) = 0;if ~Settings.pv2pq   DAE.g(p.vbus(idx)) = 0;     returnend% ================================================% check reactive power limits% ================================================% find max mismatch errorif isempty(DAE.g)  prev_err = inf;else  prev_err = 2*max(abs(DAE.g));end% Q min% ================================================% Limit check improved by Lars L. 2006-01.[tmp,idx] = max(p.u.*(p.con(:,7) - DAE.g(p.vbus) - prev_err));  if tmp > 0 & ~PV.newpq  if ~p.dq(idx)    fm_disp(['Switch SW bus <', ...             Bus.names{p.bus(idx)}, ...             '> to theta-Q bus: Min Qg reached'])  end  p.qg(idx) = p.con(idx,7);      p.dq(idx) = 1;end% Q max% ================================================% Limit check improved by Lars L. 2006-01.[tmp,idx] = min(p.u.*(p.con(:,6) - DAE.g(p.vbus) + prev_err));if tmp < 0 & ~PV.newpq   if ~p.dq(idx)    fm_disp(['Switch SW bus <', ...             Bus.names{p.bus(idx)}, ...             '> to theta-Q bus: Max Qg reached'])  end  p.qg(idx) = p.con(idx,6);      p.dq(idx) = 1;end% Generator reactive powers% ================================================DAE.g(p.vbus) = DAE.g(p.vbus) - p.u.*p.qg;DAE.g(p.vbus(find(~p.dq & p.u))) = 0;

⌨️ 快捷键说明

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