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

📄 setx0.m

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

global Syn Pod Bus DAE PV

if ~a.n, return, end

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

% eliminate PV components used for initializing STATCOM's
global Syn
for i = 1:a.n
  idxg = find(Syn.bus == a.bus(i));
  if ~isempty(idxg)
    statcomwarn(a,i,[' STATCOM cannot be connected at the same bus as ' ...
                   'synchronous machines.'])
    continue
  end
  idx = findbus(PV,a.bus(i));
  PV = remove(PV,idx);
  if isempty(idx)
    statcomwarn(a,i,' no PV generator found at the bus.')
  end
end
DAE.x(a.ist) = Bus.Qg(a.bus)./V;
idx = find(DAE.x(a.ist) > ist_max);
if idx, statcomwarn(a,idx,' Ish is over its max limit.'), end
idx = find(DAE.x(a.ist) < ist_min);
if idx, statcomwarn(a,idx,' Ish is under its min limit.'), end
DAE.x(a.ist) = max(DAE.x(a.ist),ist_min);
DAE.x(a.ist) = min(DAE.x(a.ist),ist_max);

% reference voltages
a.Vref = DAE.x(a.ist)./Kr + V;

fm_disp('Initialization of STATCOMs completed.')

⌨️ 快捷键说明

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