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

📄 psat.m

📁 基于PSAT 软件的多目标最优潮流计算用于中小型电力系统的分析和管理
💻 M
📖 第 1 页 / 共 2 页
字号:
  Comp.funct{ncomp+2}  = 'fm_sw';  Comp.number{ncomp+2} = 'SW.n';  Comp.prop(ncomp+2,:) = [1 1 0 0 0 1 0 0];  Comp.n = ncomp+2;endif ~command_line_psat  set(hdlp,'XData',8+idx+[0 0 33 33 0])  idx = idx + 33;  pause(0.1)endif ~isunix & Settings.hostver >= 7 & sum(Theme.color09) < 0.3  Theme.color09 = [0 0 0];end% Differential Algebraic Equations structureDAE = struct('a',[], ...             'V',[], ...             'kg',0, ...             'x',[], ...             'n',0, ...             'npf',0, ...             'g',[], ...             'gp',[], ...             'gq',[], ...             'f',[], ...             'glfp',[], ...             'glfq',[], ...             'J11',[], ...             'J12',[], ...             'J21',[], ...             'J22',[], ...             'Jlf',[], ...             'Jlfv',[], ...             'Jlfd',[], ...             'Fx',[], ...             'Fy',[], ...             'Fl',[], ...             'Fk',[], ...             'Gx',[], ...             'Gl',[], ...             'Gk',[], ...             'Ac',[], ...             'tn',[], ...	     't', -1);% Small Signal Stability Analysis (SSSA) paramtersSSSA = struct('neig',1,'method',1,'map',1,'matrix',4, ...              'report',[],'eigs',[],'pf',[]);% Limit-induced bifurcation (LIB) parametersLIB = struct('type',1,'init',0,'selbus',1, ...             'slack',0,'lambda',0,'dldp',[],'bus',[]);% Saddle-node bifurcation (SNB) parametersSNB = struct('slack',0,'init',0,'lambda',0,'dldp',[], ...             'bus',[]);% Continuation Power Flow structureCPF = struct('method',1,'flow',1,'type',1,'sbus',1, ...             'vlim',0,'ilim',0,'qlim',0,'init',0, ...             'tolc',1e-5,'tolf',0.01,'tolv',5e-3, ...             'step',0.5,'nump',50,'show',1,'linit',0, ...             'lambda',0,'kg',0,'hopf',0,'stepcut',1,...             'negload',0,'onlynegload',0);% Optimal Power Flow structureOPF = struct('method',2, ...             'flow',1, ...             'type',1, ...             'deltat',30, ...             'lmin',0.1, ...             'lmax',0.8, ...             'sigma',0.2, ...             'gamma',0.95, ...             'eps_mu',1e-10, ...             'eps1',1e-4, ...             'eps2',5e-3, ...             'omega',0, ...             'omega_s','0', ...             'lmin_s','0.1', ...             'fun','', ...             'flatstart',1, ...             'conv',0, ...             'guess',[], ...             'report',[], ...             'show',1, ...             'init',0, ...             'w',0, ...             'wp',[], ...             'atc',0, ...             'line',0, ...             'tiebreak',0, ...             'basepg',1, ...             'basepl',1, ...             'enflow',1, ...             'envolt',1, ...             'enreac',1, ...             'vmin', 0.8, ...             'vmax', 1.2, ...             'obj',0, ...             'ms',0, ...             'dy',0, ...             'dF',0, ...             'dG',0, ...             'NCP', [], ...             'iter',0, ...             'gpc',[], ...             'gqc',[]);PMU = struct('method',1, ...             'number',0, ...             'report','', ...             'measv',0, ...             'measc',0, ...             'pseudo',0, ...             'noobs',0, ...             'voltage', '', ...             'angle', '', ...             'location', '');% GAMS interface structureGAMS = struct('method',2, ...              'type',1, ...              'flow',1, ...              'flatstart',1, ...              'lmin', 0.1, ...              'lmin_s','0.1', ...              'omega',0, ...              'omega_s','0', ...              'lmax',0.8, ...              'libinclude', 0, ...              'loaddir',1, ...              'basepl',1, ...              'basepg',1, ...              'line',0, ...              'show',1);GAMS.ldir = ['ldir ',char(92),'~/psat/gams'];% UWPFLOW interfaceUWPFLOW = struct('opt',[],'method',1,'file','psatuw', ...                 'command','','status',0);% Structures for contributed functionsNLA = struct('tol',1e-8);% Bus StructureBus = struct('con',[],'n',0,'int',[],'Pg',[], ...             'Qg',[],'Pl',[],'Ql',[],'island',[]);% Area StructureArea = struct('con',[],'n',0,'slack',[]);% Line structureLine = struct('con',[],'n',0,'Y',[],'Bp',[], ...              'Bpp',[],'from',[],'to',[]);Shunt = struct('con',[],'bus',[],'g',[],'b',[]);Twt = struct('con',[]);% Component structuresSW = SWclass;PV = PVclass;PQ = PQclass;Demand = DMclass;Supply = SUclass;Tg = TGclass;Tcsc = TCclass;Svc = SVclass;PQgen = struct('con',[]);% Polinomial Load  structurePl = struct('con',[],'n',0,'bus',[],'init',[]);% Monomial Load  structureMn = struct('con',[], ...            'n',0, ...            'bus',[], ...            'init',[]);% Frequency Dependent LoadFl = struct('con',[], ...            'n',0, ...            'bus',[], ...            'a0',[], ...            'Dw',[], ...            'x',[]);% Transmission Line structureLines = struct('con',[],'n',0,'bus1',[],'bus2',[]);if ~command_line_psat  set(hdlp,'XData',8+idx+[0 0 33 33 0])  idx = idx + 33;  pause(0.1)end% Synchronous Machine  structureSyn = struct('con',[], ...             'n',0, ...             'bus',[], ...             'Id',[], ...             'Iq',[], ...             'Pg',[], ...             'Qg',[], ...             'J11',[], ...             'J12',[], ...             'J21',[], ...             'J22',[], ...             'delta',[], ...             'omega',[], ...             'e1q',[], ...             'e1d',[], ...             'e2q',[], ...             'e2d',[], ...             'psiq',[], ...             'psid',[], ...             'pm',[], ...             'vf',[], ...             'Pg0',[], ...             'Gp',[], ...             'Gq',[], ...             'c1',[], ...             'c2',[], ...             'c3',[], ...             'cluster',[]);% Excitation Control  structureExc = struct('con',[], ...             'n',0, ...             'bus',[], ...             'syn',[], ...             'vrif',[], ...             'vrif0',[], ...             'vr1',[], ...             'vr2',[], ...             'vr3',[], ...             'vm',[], ...             'vf',[], ...             'cluster',[]);% Subtransmission Area Equivalents  structureSAE1 = struct('con',[], ...              'n',0, ...              'm',[]);SAE2 = struct('con',[], ...              'n',0, ...              'm1',[], ...              'm2',[]);SAE3 = struct('con',[], ...              'n',0, ...              'm1',[], ...              'm2',[], ...              'm3',[]);% Fault  structureFault = struct('con',[], ...               'n',0, ...               'bus',[], ...               'dat',[], ...               'ang',[]);Breaker = struct('con',[], ...                 'n',0, ...                 'bus',[]);% Tap changer & load  structureTap = struct('con',[], ...             'n',0, ...             'bus',[], ...             'm',[]);% Asynchronous Motor  structureMot = struct('con',[], ...             'n',0, ...             'bus',[], ...             'dat',[], ...             'slip',[], ...             'e1r',[], ...             'e1m',[], ...             'e2r',[], ...             'e2m',[]);% Thermostatically controlled loadThload = struct('con',[], ...                'n',0, ...                'bus',[], ...                'T',[], ...                'G',[]);% On Load Tap Changer  structureLtc = struct('con',[], ...             'n',0, ...             'bus1',[], ...             'bus2',[], ...             'dat',[], ...             'm',[]);if ~command_line_psat  set(hdlp,'XData',8+idx+[0 0 33 33 0])  idx = idx + 33;  pause(0.1)end% Over Excitation Limiter  structureOxl = struct('con',[], ...             'n',0, ...             'bus',[], ...             'syn',[], ...             'exc',[], ...             'v',[], ...             'If',[]);% Power system stabilizer  structurePss = struct('con',[], ...             'n',0, ...             'bus',[], ...             'syn',[], ...             'exc',[], ...             'v1',[], ...             'v2',[], ...             'v3',[], ...             'va',[], ...             'vss',[], ...             'Vs',[], ...             's1',[]);% HVDC  structureHvdc = struct('con',[], ...              'n',0, ...              'bus1', [], ...              'bus2',[], ...              'dat',[], ...              'Id',[], ...              'xr',[], ...              'xi',[]);% StatCom structureStatcom = struct('con',[], ...                 'n',0, ...                 'bus',[], ...                 'pod',[], ...                 'ist',[], ...                 'Vref',[]);% SSSC structureSssc = struct('con',[], ...              'n',0, ...              'bus1',[], ...              'bus2',[], ...              'line',[], ...              'pod',[], ...              'vcs',[], ...              'vpi',[], ...              'xcs',[], ...              'Cp',[], ...              'V0',[], ...              'Pref',[], ...              'y',[]);% UPFC structureUpfc = struct('con',[], ...              'n',0, ...              'bus1',[], ...              'bus2',[], ...              'line',[], ...              'pod',[], ...              'vp',[], ...              'vq',[], ...              'iq',[], ...              'xcs',[], ...              'Cp',[], ...              'gamma',[], ...              'vp0',[], ...              'vq0',[], ...              'Vref',[], ...              'y',[]);if ~command_line_psat  set(hdlp,'XData',8+idx+[0 0 33 33 0])  idx = idx + 33;  pause(0.1)end% Mass structureMass = struct('con',[], ...              'syn',[], ...              'n',0, ...              'delta_HP',[], ...              'omega_HP',[], ...              'delta_IP',[], ...              'omega_IP',[], ...              'delta_LP',[], ...              'omega_LP',[], ...              'delta_EX',[], ...              'omega_EX',[]);% SSR structureSSR = struct('con',[], ...             'bus',[], ...             'n',0, ...             'Id',[], ...             'Iq',[], ...             'If',[], ...             'Edc',[], ...             'Eqc',[], ...             'Tm',[], ...             'Efd',[], ...             'delta_HP',[], ...             'omega_HP',[], ...             'delta_IP',[], ...             'omega_IP',[], ...             'delta_LP',[], ...             'omega_LP',[], ...             'delta', [], ...             'omega', [], ...             'delta_EX',[], ...             'omega_EX',[]);% Voltage stability & Market structureRsrv = struct('con',[], ...              'n',0, ...              'bus',[]);Rmpg = struct('con',[], ...              'n',0, ...              'sup',[], ...              'bus',[]);Rmpl = struct('con',[], ...              'n',0, ...              'dem',[], ...              'bus',[]);Vltn = struct('con',[], ...              'n',0, ...              'bus',[]);Ypdp = struct('con',[], ...              'day',[], ...              'week',[], ...              'year',[], ...              'd',1, ...              'w',1, ...              'y',1, ...              'len', 0);% Supplemtary Stabilizing Control LoopPod = struct('con',[], ...             'n',0, ...             'svc',[],...             'statcom',[],...             'sssc',[],...             'upfc',[],...             'tcsc',[],...             'idx',[], ...             'type',[], ...             'v1',[], ...             'v2',[], ...             'v3',[], ...             'Vs',[], ...             'u',[]);% load PSAT Simulink libraryload_system('fm_lib')if ~command_line_psat  set(hdlp,'XData',8+idx+[0 0 33 33 0],'FaceColor',[0.85 0.2 0])  hold off  pause(0.1)endif failed,  disp(' '), disp('PSAT is not properly initialized.')else,  if ~command_line_psat, fm_main, endendif ~command_line_psat, close(hdl), endclear failed hdl hdlp idx a count fid nname sline tipi ncompclear psatver psatdate psatdir lipdir command_line_psat% ----------------------------------------------------------- %%                       W A R N I N G                         %% ----------------------------------------------------------- %% Following lines were written by the UDM build utility.      %% This utility requires you do NOT change anything beyond     %% this point in order to be able to correctly install and     %% uninstall UDMs.                                             %% ----------------------------------------------------------- %% Sofc - Fuel Cell ModelSofc = struct('con',[],'n',0,'bus',[],'Ik',[],'Vk',[],'pH2',[],'pH20',[],'pO2',[],'qH2',[],'m',[]);% Cac - Central Area ControllerCac = struct('con',[],'n',0,'bus',[],'q1',[],'q',[]);% Cluster - Cluster ControllersCluster = struct('con',[],'n',0,'exc',[],'syn',[],'svc',[],'bus',[],'cac',[],'Vs',[],'u',[],'dVsdQ',[]);% Exload - Exponential recovery loadExload = struct('con',[],'n',0,'dat',[],'bus',[],'xp',[],'xq',[]);% Phs - Phase Shifting TransformerPhs = struct('con',[],'n',0,'bus1',[],'bus2',[],'alpha',[],'Pm',[]);% Wind speedWind = struct('con',[],'n',0,'speed',[],'vwa',[],'vw',[]);% Constant speed wind turbineCswt = struct('con',[],'n',0,'bus',[],'wind',[],'dat',[],'omega_wr',[], ...              'omega_m',[],'gamma',[],'e1r',[],'e1m',[]);% Doubly fed induction generatorDfig = struct('con',[],'n',0,'bus',[],'wind',[],'dat',[], ...              'omega_m',[],'theta_p',[],'idr',[],'iqr',[]);% Direct drive synchronous generatorDdsg = struct('con',[],'n',0,'bus',[],'wind',[],'dat',[], ...              'omega_m',[],'theta_p',[],'ids',[],'iqs',[],'idc',[]);% Busfreq - Bus frequency measurementBusfreq = struct('con',[],'n',0,'dat',[],'bus',[],'x',[],'w',[]);% Pmu - Phasor measurement unitPmu = struct('con',[],'n',0,'bus',[],'dat',[],'vm',[],'thetam',[]);% Jimma - Jimma's loadJimma = struct('con',[],'n',0,'dat',[],'bus',[],'x',[]);% Mixed - Mixed loadMixed = struct('con',[],'n',0,'dat',[],'bus',[],'x',[],'y',[]);

⌨️ 快捷键说明

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