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

📄 chp7ex10.m

📁 市面上电力系统的范例 直得收藏学习的ㄧ本书
💻 M
字号:
clear
basemva = 100;  accuracy = 0.0001;  maxiter = 10;

%        Bus Bus  Voltage Angle   ---Load---- -------Generator----- Static Mvar
%        No  code Mag.    Degree  MW    Mvar  MW  Mvar Qmin Qmax    +Qc/-Ql
busdata=[1   1    1.06    0.0      0     0     0   0    10   50      0
         2   2    1.045   0.0     20    10    40  30    10   50      0
         3   2    1.03    0.0     20    15    30  10    10   40      0
         4   0    1.00    0.0     50    30     0   0     0    0      0
         5   0    1.00    0.0     60    40     0   0     0    0      0];

%                                        Line code
%         Bus bus   R      X     1/2 B   = 1 for lines
%         nl  nr  p.u.   p.u.   p.u.     > 1 or < 1 tr. tap at bus nl
linedata=[1   2   0.02   0.06   0.030     1
          1   3   0.08   0.24   0.025     1
          2   3   0.06   0.18   0.020     1
          2   4   0.06   0.18   0.020     1
          2   5   0.04   0.12   0.015     1
          3   4   0.01   0.03   0.010     1
          4   5   0.08   0.24   0.025     1];

cost = [200  7.0    0.008
        180  6.3    0.009
        140  6.8    0.007];

mwlimits =[10  85
           10  80
           10  70];

lfybus                     % form the bus admittance matrix
lfnewton     % Power flow solution by Newton-Raphson method
busout       % Prints the power flow solution on the screen
bloss                % Obtains the loss formula coefficients
gencost           % Computes the total generation cost $/h
dispatch           % Obtains optimum dispatch of generation
       % dpslack is the difference (absolute value) between
       % the scheduled slack generation determined from the
         % coordination equation, and the slack generation,
                   % obtained from the power flow solution.

while dpslack > 0.001                % Test for convergence
lfnewton                          % New power flow solution
bloss                       % Loss coefficients are updated
dispatch % Optimum dispatch of gen. with new B-coefficients
end
busout               % Prints the final power flow solution
gencost   % Generation cost with optimum scheduling of gen.

⌨️ 快捷键说明

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