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

📄 setx0.m

📁 电力系统分析计算程序
💻 M
字号:
function a = setx0(a)global DAE PQif ~a.n, return, endV1 = DAE.y(a.vbus);t1 = DAE.y(a.bus); for k = 1:a.n  idx = findbus(PQ,a.bus(k));  if isempty(idx)    warn(a,idx,'No PQ load found for initialization.')    a.con(k,6) = 0;    a.con(k,10) = 0;  else    P = a.u(k)*PQ.P0(idx)*sum(a.con(k,6))/100;    Q = a.u(k)*PQ.Q0(idx)*sum(a.con(k,10))/100;    PQ = pqsub(PQ,idx,P,Q);    a.con(k,6) = a.con(k,6)*PQ.P0(idx)/100;    a.con(k,10) = a.con(k,10)*PQ.Q0(idx)/100;    PQ = remove(PQ,idx,'zero');  endend%check time constantsidx = find(a.con(:,13) == 0);if idx  warn(a,idx, 'Time constant Tfv cannot be zero. Tfv = 0.001 s will be used.'),enda.con(idx,13) = 0.001;idx = find(a.con(:,14) == 0);if idx  warn(a,idx, 'Time constant Tft cannot be zero. Tft = 0.001 s will be used.'),enda.con(idx,14) = 0.001;%variable initializationDAE.x(a.x) = -a.u.*V1./a.con(:,13);x = DAE.x(a.x);DAE.x(a.y) = 0;y = DAE.x(a.y);a.dat(:,1) = V1;a.dat(:,2) = t1;%check limitsfm_disp('Initialization of mixed loads completed.')

⌨️ 快捷键说明

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