• 大小: 1.21MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-07
  • 语言: Matlab
  • 标签: matlab  潮流计算  

资源简介

程序包含了绝大部分IEEE牛拉潮流计算的matlab程序

资源截图

代码片段和文件信息

function [ref pv pq] = bustypes(bus gen)
%BUSTYPES   Builds lists of each type of bus (ref pv pq).
%   [ref pv pq] = bustypes(bus gen)
%   Generators with “out-of-service“ status are treated as PQ buses with
%   zero generation (regardless of Pg/Qg values in gen).

%   MATPOWER
%   $Id: bustypes.mv 1.4 2004/08/23 20:55:59 ray Exp $
%   by Ray Zimmerman PSERC Cornell
%   Copyright (c) 1996-2004 by Power System Engineering Research Center (PSERC)
%   See http://www.pserc.cornell.edu/matpower/ for more info.
global refs pvs pqs;
%% constants
[PQ PV REF NONE BUS_I BUS_TYPE PD QD GS BS BUS_AREA VM ...
    VA base_KV ZONE VMAX VMIN LAM_P LAM_Q MU_VMAX MU_VMIN] = idx_bus;
[GEN_BUS PG QG QMAX QMIN VG Mbase ...
    GEN_STATUS PMAX PMIN MU_PMAX MU_PMIN MU_QMAX MU_QMIN] = idx_gen;

%% get generator status
% bus_gen_status = zeros(size(bus 1) 1);
% bus_gen_status(gen(: GEN_BUS)) = gen(: GEN_STATUS) > 0;
nb = size(bus 1);
ng = size(gen 1);
Cg = sparse(gen(: GEN_BUS) [1:ng]‘ gen(: GEN_STATUS) > 0 nb ng);  %% gen connection matrix
                                        %% element i j is 1 if generator j at bus i is ON
bus_gen_status = Cg * ones(ng 1);      %% number of generators at each bus that are ON


%% form index lists for slack PV and PQ buses
ref = find(bus(: BUS_TYPE) == REF & bus_gen_status);   %% reference bus index
pv  = find(bus(: BUS_TYPE) == PV  & bus_gen_status);   %% PV bus indices
pq  = find(bus(: BUS_TYPE) == PQ | ~bus_gen_status);   %% PQ bus indices
refs=ref;
pvs=pv;
pqs=pq;

%% pick a new reference bus if for some reason there is none (may have been shut down)
if isempty(ref)
    ref = pv(1);                %% use the first PV bus
    pv = pv(2:length(pv));      %% take it off PV list
end

return;

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1757  2009-09-04 15:58  14节点系统\14节点系统\bustypes.asv

     文件       1798  2009-09-07 15:48  14节点系统\14节点系统\bustypes.m

     文件      29354  2004-09-20 21:43  14节点系统\14节点系统\case118.m

     文件       4567  2009-09-15 10:36  14节点系统\14节点系统\case14.asv

     文件       4375  2009-12-26 14:03  14节点系统\14节点系统\case14.m

     文件       4493  2004-09-20 22:41  14节点系统\14节点系统\case30.m

     文件      62790  2004-09-20 21:45  14节点系统\14节点系统\case300.m

     文件       3881  2004-09-20 21:48  14节点系统\14节点系统\case30pwl.m

     文件       3914  2004-09-20 21:48  14节点系统\14节点系统\case30Q.m

     文件       5275  2004-09-20 21:48  14节点系统\14节点系统\case39.m

     文件       1135  2005-01-27 17:58  14节点系统\14节点系统\case4gs.m

     文件      12274  2004-09-20 21:47  14节点系统\14节点系统\case57.m

     文件       1796  2005-01-27 17:58  14节点系统\14节点系统\case6ww.m

     文件       1651  2004-09-20 21:48  14节点系统\14节点系统\case9.m

     文件       1743  2004-09-20 21:48  14节点系统\14节点系统\case9Q.m

     文件       4984  2004-12-15 17:44  14节点系统\14节点系统\caseformat.m

     文件       7016  2004-09-20 21:45  14节点系统\14节点系统\case_ieee30.m

     文件      10506  2004-09-23 18:53  14节点系统\14节点系统\cdf2matp.m

     文件       4167  2004-11-02 10:31  14节点系统\14节点系统\compare.m

     文件       5467  2004-09-07 14:27  14节点系统\14节点系统\consfmin.m

     文件      10278  2005-01-21 15:43  14节点系统\14节点系统\copf.m

     文件       3958  2004-08-23 16:56  14节点系统\14节点系统\costfmin.m

     文件       2764  2004-08-23 16:56  14节点系统\14节点系统\dAbr_dV.m

     文件      11511  2005-01-14 12:20  14节点系统\14节点系统\dcopf.m

     文件       1278  2004-08-23 16:56  14节点系统\14节点系统\dcpf.m

     文件      26272  2005-02-14 12:22  14节点系统\14节点系统\docs\CHANGES

     文件      26962  2005-02-14 12:22  14节点系统\14节点系统\docs\CHANGES.txt

     文件    1639985  2005-02-14 12:22  14节点系统\14节点系统\docs\manual.pdf

     文件       4124  2004-08-23 16:56  14节点系统\14节点系统\dSbr_dV.m

     文件       2247  2004-08-23 16:56  14节点系统\14节点系统\dSbus_dV.m

............此处省略100个文件信息

评论

共有 条评论