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

📄 fcall.m

📁 电力系统分析计算程序
💻 M
字号:
function fcall(p)global DAE Settingsif ~p.n, return, endalpha = DAE.x(p.alpha);Pm = DAE.x(p.Pm);Vf = p.u.*DAE.y(p.v1).*exp(i*DAE.y(p.bus1));Vt = p.u.*DAE.y(p.v2).*exp(i*DAE.y(p.bus2));  y = admittance(p);m = p.con(:,15).*exp(i*alpha);errP = real(Vf.*conj((Vf-Vt.*m).*y))-Pm;Tm = p.con(:,7);Kp = p.con(:,8);Ki = p.con(:,9);Pref = p.u.*p.con(:,10);a_max = p.con(:,13);a_min = p.con(:,14);DAE.f(p.alpha) = Kp.*errP./Tm+Ki.*(Pm-Pref);DAE.f(p.Pm) = errP./Tm;% non-windup limitsidx = find(alpha >= a_max & (DAE.f(p.alpha) > 0 | ~Settings.init));if idx, DAE.f(p.alpha(idx)) = 0; endDAE.x(p.alpha) = min(DAE.x(p.alpha),a_max);idx = find(alpha <= a_min & (DAE.f(p.alpha) < 0 | ~Settings.init));if idx, DAE.f(p.alpha(idx)) = 0; endDAE.x(p.alpha) = max(DAE.x(p.alpha),a_min);

⌨️ 快捷键说明

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