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

📄 setx0.m

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

global Bus DAE PQ

if ~a.n, return, end

V1 = DAE.V(a.bus);

for k = 1:a.n
  idx = findbus(PQ,a.bus(k));
  if isempty(idx)
    jimmawarn(a,k,'No PQ load found.')
    a.con(k,6) = 0;
    a.con(k,7) = 0;
    a.con(k,8) = 0;
    a.con(k,9) = 0;
    a.con(k,10) = 0;
    a.con(k,11) = 0;
  else
    P = PQ.P0(idx)*sum(a.con(k,[6:8]))/100;
    Q = PQ.Q0(idx)*sum(a.con(k,[9:11]))/100;
    PQ = pqsub(PQ,idx,P,Q);
    a.con(k,6) = a.con(k,6)*PQ.P0(idx)/100;
    a.con(k,7) = a.con(k,7)*PQ.P0(idx)/100;
    a.con(k,8) = a.con(k,8)*PQ.P0(idx)/100;
    a.con(k,9) = a.con(k,9)*PQ.Q0(idx)/100;
    a.con(k,10) = a.con(k,10)*PQ.Q0(idx)/100;
    a.con(k,11) = a.con(k,11)*PQ.Q0(idx)/100;
    PQ = remove(PQ,idx,'zero');
  end
end

%check time constants
idx = find(a.con(:,5) == 0);
if idx
  jimmawarn(a,idx,'Tf cannot be zero. Tf = 0.001 s will be used.')
  a.con(idx,5) = 0.001;
end

%variable initialization
DAE.x(a.x) = -V1./a.con(:,5);
a.dat(:,1) = V1;

%check limits
fm_disp('Initialization of Jimma''s loads completed.')

⌨️ 快捷键说明

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