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

📄 formmpd.m

📁 可以计算电力系统概率潮流
💻 M
字号:
function    M=formMpd(bus, line, nswing)

% form relationship matrix between Pline and Delta
% subroutine "proind" find the program index
glo_var

M=zeros(nline, nbus-1);

for i=1:nline
    
    frompos=line(i,1);
    topos=line(i,2);
    % line(i,6) is the reactance line(i,3) is the number of lines
    x=line(i,6)/line(i,3);
    
    startpos=FindPos(bus, frompos);
    if (startpos>nswing)
        M(i,startpos-1)=1.0/x;
    elseif (startpos<nswing)
        M(i,startpos)=1.0/x;
    end
    
    endpos=FindPos(bus, topos);
    if (endpos>nswing)    
        M(i,endpos-1)=-1.0/x;
    elseif(endpos<nswing)
        M(i,endpos)=-1.0/x;
    end
    
end

return

⌨️ 快捷键说明

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