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

📄 setx0.m

📁 电力系统分析计算程序
💻 M
字号:
function a = setx0(a)global Syn Bus DAE PVif ~a.n, return, endV = DAE.y(a.vbus);Kr = a.con(:,5);Tr = a.con(:,6);ist_max = a.u.*a.con(:,7);ist_min = a.u.*a.con(:,8);% eliminate PV components used for initializing STATCOM'sfor i = 1:a.n  idxg = findbus(Syn,a.bus(i));  if ~isempty(idxg)    warn(a,i,[' STATCOM cannot be connected at the same bus as ' ...                     'synchronous machines.'])    continue  end  if a.u(i)    idx = findbus(PV,a.bus(i));    PV = remove(PV,idx);    if isempty(idx)      warn(a,i,' no PV generator found at the bus.')    end  endendDAE.x(a.ist) = a.u.*Bus.Qg(a.bus)./V;idx = find(DAE.x(a.ist) > ist_max);if idx, warn(a,idx,' Ish is over its max limit.'), endidx = find(DAE.x(a.ist) < ist_min);if idx, warn(a,idx,' Ish is under its min limit.'), endDAE.x(a.ist) = max(DAE.x(a.ist),ist_min);DAE.x(a.ist) = min(DAE.x(a.ist),ist_max);% reference voltagesa.Vref = DAE.x(a.ist)./Kr + V;DAE.y(a.vref) = a.Vref;fm_disp('Initialization of STATCOMs completed.')

⌨️ 快捷键说明

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