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

📄 ybusaf.m

📁 市面上电力系统的范例 直得收藏学习的ㄧ本书
💻 M
字号:
% This function forms the bus admittance matrix including load
% admittances after removal of faulted line. The corresponding reduced
% bus admittance matrix is obtained for transient stability study.
%
% Copyright (c) 1998 by H. Saadat
function [Yaf]=ybusaf(linedata, yload, nbus1,nbust, nbrt);
global Pm f H E  Y th ngg

nl=linedata(:, 1);  nr=linedata(:, 2);
remove = 0;
while remove ~= 1
  fprintf('\nFault is cleared by opening a line. The bus to bus nos. of the\n')
  fprintf('line to be removed must be entered within brackets, e.g. [5, 7]\n')
  fline=input('Enter the bus to bus Nos. of line to be removed -> ');
  nlf=fline(1); nrf=fline(2);
     for k=1:nbrt
       if nl(k)==nlf & nr(k)==nrf
       remove = 1;
       m=k;
       else, end
    end
    if remove ~= 1
       fprintf('\nThe line to be removed does not exist in the line data. try again.\n\n')
    end
end
linedat2(1:m-1,:)= linedata(1:m-1,:);
linedat2(m:nbrt-1,:)=linedata(m+1:nbrt,:);

linedat0=linedata;
linedata=linedat2;
lfybus
for k=1:nbust
Ybus(k,k)=Ybus(k,k)+yload(k);
end
YLL=Ybus(1:nbus1, 1:nbus1);
YGG = Ybus(nbus1+1:nbust, nbus1+1:nbust);
YLG = Ybus(1:nbus1, nbus1+1:nbust);
Yaf=YGG-YLG.'*inv(YLL)*YLG;
linedata=linedat0;

⌨️ 快捷键说明

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