亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fm_spf.m

?? 電力系統(tǒng)的psat
?? M
字號:
function fm_spf% FM_SPF solve standard power flow by means of the NR method%       and fast decoupled power flow (XB and BX variations)%       with either a single or distributed slack bus model.%% FM_SPF%%see the properties of the Settings structure for options.%%Author:    Federico Milano%Date:      11-Nov-2002%Update:    09-Jul-2003%Version:   1.0.1%%E-mail:    fmilano@thunderbox.uwaterloo.ca%Web-site:  http://thunderbox.uwaterloo.ca/~fmilano%% Copyright (C) 2002-2005 Federico Milano%% This toolbox is free software; you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation; either version 2.0 of the License, or% (at your option) any later version.%% This toolbox is distributed in the hope that it will be useful, but% WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANDABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU% General Public License for more details.%% You should have received a copy of the GNU General Public License% along with this toolbox; if not, write to the Free Software% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,% USA.fm_varfm_dispfm_disp('Newton-Raphson Method for Power Flow Computation')if Settings.show  fm_disp(['Data file "',Path.data,File.data,'"'])endnodyn = 0;% these computations are needed only the first time the power flow is runif ~Settings.init  check = fm_ncomp;     % bus type initialization  if ~check, return, end  % report components parameters to system bases  if Settings.conv, fm_base, end  fm_y                  % create Admittance Matrix                        % create the FM_CALL FUNCTION  if Settings.show, fm_disp('Writing file "fm_call" ...',1), end  fm_wcall;  Settings.refbus = SW.bus(1); % reference bus (for phase angle)  fm_dynlf; % indicization of components used in power flow computationsend% memory allocation for equations and Jacobiansif (DAE.n~=0)  DAE.f = ones(DAE.n,1);  % differential equations  DAE.x = ones(DAE.n,1);  % state variables  fm_xfirst;  if Settings.octave    DAE.Fx = zeros(DAE.n,DAE.n);   % df/dx    DAE.Fy = zeros(DAE.n,2*Bus.n); % df/dy    DAE.Gx = zeros(2*Bus.n,DAE.n); % dg/dx  else    DAE.Fx = sparse(DAE.n,DAE.n);   % df/dx    DAE.Fy = sparse(DAE.n,2*Bus.n); % df/dy    DAE.Gx = sparse(2*Bus.n,DAE.n); % dg/dx  endelse  % no dynamic elements  nodyn = 1;  DAE.n = 1;  DAE.f = 0;  DAE.x = 0;  DAE.Fx = 1;  if Settings.octave    DAE.Fy = zeros(1,2*Bus.n);    DAE.Gx = zeros(2*Bus.n,1);  else    DAE.Fy = sparse(1,2*Bus.n);    DAE.Gx = sparse(2*Bus.n,1);  endend% check PF solver methodFDPF = Settings.pfsolver;if FDPF > 1  if Mn.n, mn = sum(~Mn.con(:,8));  else, mn = 0; end  if Pl.n, pl = sum(~Pl.con(:,11)); else, pl = 0; end  ncload = mn + pl + Lines.n + (~nodyn) + Tcsc.n;  if ncload | Settings.distrsw,    FDPF = 1; % force using standard NR method  else    fm_b    no_sw = 1:Bus.n;    no_sw(SW.bus) = [];    no_g = 1:Bus.n;    no_g([SW.bus; PV.bus]) = [];    Bp = Line.Bp(no_sw,no_sw);    Bpp = Line.Bpp(no_g,no_g);    [Lp, Up, Pp] = lu(Bp);    [Lpp, Upp, Ppp] = lu(Bpp);  endendswitch FDPF case 1, fm_disp('PF solver: Newton-Raphson method') case 2, fm_disp('PF solver: XB fast decoupled power flow method') case 3, fm_disp('PF solver: BX fast decoupled power flow method')endif Settings.distrsw  Jkg = sparse(DAE.n+2*Bus.n,1);  Jrow = sparse(1,DAE.n+SW.bus,1,1,DAE.n+2*Bus.n+1);  DAE.kg = 0;  idx = find(SW.con(:,10) == 0);  if length(idx) > 1    fm_disp('More than one slack bus with zero power indication found.')    fm_disp('Single slack bus model will be used')    Setting.distrsw = 0;  end  if idx    SW.con(1,10) = sum(PQ.con(:,4))-sum(PV.con(:,4));    fm_disp('Slack bus with zero power direction found.')    fm_disp('P_slack = sum(P_load)-sum(P_gen) will be used.')    fm_disp('Only PQ loads and PV generators are used.')    fm_disp('If there are convergence problems, use the single slack bus model.')  end  if SW.n,    ksw = SW.con(:,11);    Jkg(DAE.n+SW.bus) = -ksw.*SW.con(:,10);  end  if PV.n,    kpv = PV.con(:,10);    Jkg(DAE.n+PV.bus) = -PV.con(:,10).*PV.con(:,4);  endendswitch Settings.distrsw case 1  fm_disp('Distributed slack bus model') case 0  fm_disp('Single slack bus model')endif FDPF > 1, fm_call('fdpf'), enditer_max = Settings.lfmit;if iter_max < 2, iter_max = 2; enditeration = 0;tol = Settings.lftol;err_max = tol+1;% Graphical settingsfm_status('pf','init',iter_max,{'r'},{'-'},{Theme.color11})%  Newton-Raphson routinet0 = clock;while (err_max > tol) & (iteration <= iter_max)  if Fig.main    if ~get(Fig.main,'UserData'), break, end  end  if FDPF == 1   % Standard NR technique    if Settings.octave      DAE.gp = zeros(Bus.n,1);      DAE.gq = zeros(Bus.n,1);      DAE.J11 = zeros(Bus.n,Bus.n);      DAE.J21 = zeros(Bus.n,Bus.n);      DAE.J12 = zeros(Bus.n,Bus.n);      DAE.J22 = zeros(Bus.n,Bus.n);    else      DAE.gp = sparse(Bus.n,1);      DAE.gq = sparse(Bus.n,1);      DAE.J11 = sparse(Bus.n,Bus.n);      DAE.J21 = sparse(Bus.n,Bus.n);      DAE.J12 = sparse(Bus.n,Bus.n);      DAE.J22 = sparse(Bus.n,Bus.n);    end    % component calls    if Settings.distrsw      fm_call('kgpf');      if SW.n        DAE.g(SW.bus) = DAE.g(SW.bus)-(1+DAE.kg*ksw).*SW.con(:,10);        DAE.g(Bus.n+SW.bus)=0;      end      Gbus = Bus.n+[SW.bus;PV.bus];      DAE.Jlfv(Gbus,:) = 0;      DAE.Jlfv(:,Gbus) = 0;      DAE.Jlfv(:,SW.bus) = 0;      if Settings.octave        DAE.Jlfv(Gbus,Gbus) = eye(PV.n+SW.n);      else        DAE.Jlfv(Gbus,Gbus) = speye(PV.n+SW.n);      end      DAE.Fy(:,SW.bus) = 0;      DAE.Gx(SW.bus,:) = 0;      if nodyn, DAE.Fx = 1; end      inc = -[[DAE.Fx, DAE.Fy; DAE.Gx, DAE.Jlfv],Jkg;Jrow]\[DAE.f; DAE.g; 0];      DAE.x = DAE.x + inc(1:DAE.n);      DAE.a = DAE.a + inc(1+DAE.n:Bus.n+DAE.n);      DAE.V = DAE.V + inc(DAE.n+Bus.n+1:DAE.n+2*Bus.n);      DAE.kg = DAE.kg + inc(end);    else      fm_call('l');      % complete Jacobian matrix      DAE.Fy(:,SW.bus) = 0;      DAE.Gx(SW.bus,:) = 0;      DAE.Fy(:,Bus.n+SW.bus) = 0;      DAE.Gx(Bus.n+SW.bus,:) = 0;      DAE.Fy(:,Bus.n+PV.bus) = 0;      DAE.Gx(Bus.n+PV.bus,:) = 0;      if nodyn, DAE.Fx = 1; end      inc = -[DAE.Fx, DAE.Fy; DAE.Gx, DAE.Jlfv]\[DAE.f; DAE.g];      DAE.x = DAE.x + inc(1:DAE.n);      DAE.a = DAE.a + inc(1+DAE.n:Bus.n+DAE.n);      DAE.V = DAE.V + inc(DAE.n+Bus.n+1:DAE.n+2*Bus.n);    end  else % Fast Decoupled Power Flow    % P-theta    da = -(Up\(Lp\(Pp*DAE.gp(no_sw))));    DAE.a(no_sw) = DAE.a(no_sw) + da;    Vc = DAE.V.*exp(j*DAE.a);    fm_call('fdpf')    normP = norm(DAE.gp,inf);    normQ = norm(DAE.gq,inf);    if normP < tol & normQ < tol, break, end    % Q-V    dV = -(Upp\(Lpp\(Ppp*DAE.gq(no_g))));    DAE.V(no_g) = DAE.V(no_g)+dV;    Vc = DAE.V.*exp(j*DAE.a);    fm_call('fdpf')    normP = norm(DAE.gp,inf);    normQ = norm(DAE.gq,inf);    if normP < tol & normQ < tol, break, end    inc = [normP; normQ];    % recompute Bpp if some PV bus has been switched to PQ bus    if Settings.pv2pq & strmatch('Switch',History.text{end})      fm_disp('Recomputing Bpp matrix for FDPF')      no_g = 1:Bus.n;      no_g([SW.bus; PV.bus]) = [];      Bpp = Line.Bpp(no_g,no_g);      [Lpp, Upp, Ppp] = lu(Bpp);    end  end  iteration = iteration + 1;  err_max = max(abs(inc));  fm_status('pf','update',[iteration, err_max],iteration)  if Settings.show    if err_max == Inf, err_max = 1e3; end     fm_disp(['Iteration = ', num2str(iteration), ...             '     Maximum Convergency Error = ', ...             num2str(err_max)],1)  endendSettings.lftime = etime(clock,t0);Settings.iter = iteration;if iteration > iter_max  fm_disp(['Reached Maximum number of iteration for NR Routine without ' ...           'Convergence'],2)end% Total power injection and adsorption at network buses% restore PV buses switched to PQ busesif Settings.pv2pq & PV.pq.n  PV.n = PV.n + PV.pq.n;  PV.bus = [PV.bus; PV.pq.bus];  PV.pq.con(:,5) = DAE.V(PV.pq.bus);  PV.con = [PV.con; PV.pq.con(:,[1:end-1])];  PV.pq.n = 0;  PV.pq.bus = [];  PV.pq.con = [];end% Pl and Ql computation (shunts only)DAE.gp = zeros(Bus.n,1);DAE.gq = zeros(Bus.n,1);fm_call('pq');Bus.Pl = DAE.gp;Bus.Ql = DAE.gq;%Pg and Qg computationif Line.n, fm_lf(1), endDAE.gp = zeros(Bus.n,1);DAE.gq = zeros(Bus.n,1);fm_call('1');Bus.Pg = DAE.gp + DAE.glfp;Bus.Qg = DAE.gq + DAE.glfq;% reset of global variables DAE.gp and DAE.gq%DAE.gp = zeros(Bus.n,1);%DAE.gq = zeros(Bus.n,1);% memory allocation for dynamic variables & state variables indicizationif nodyn == 1; DAE.x = []; DAE.f = []; DAE.n = 0; enddynordold = DAE.n;DAE.npf = DAE.n;fm_dynidx;if (DAE.n~=0)  DAE.f = [DAE.f; ones(DAE.n-dynordold,1)];  % differential equations  DAE.x = [DAE.x; ones(DAE.n-dynordold,1)];  % state variables  if Settings.octave    DAE.Fx = zeros(DAE.n,DAE.n); % state Jacobian df/dx    DAE.Fy = zeros(DAE.n,2*Bus.n); % state Jacobian df/dy    DAE.Gx = zeros(2*Bus.n,DAE.n); % algebraic Jacobian dg/dx  else    DAE.Fx = sparse(DAE.n,DAE.n); % state Jacobian df/dx    DAE.Fy = sparse(DAE.n,2*Bus.n); % state Jacobian df/dy    DAE.Gx = sparse(2*Bus.n,DAE.n); % algebraic Jacobian dg/dx  endend%  build cell arrays of variable namesif (Bus.n>0), fm_idx(1), endif (DAE.n>0), fm_idx(2), endif (Settings.vs == 1), fm_idx(3), end% initializations of state variables and componentsif Settings.static  fm_disp('* * * Dynamic components are not initialized * * *')endSettings.init = 1;fm_synitfm_excinfm_call('0');% start up of induction machinesif Mot.n > 0, fm_mot(5), end% power flow result visualizationfm_disp(['Power Flow completed in ',num2str(Settings.lftime),' s'])if Settings.showlf == 1 | Fig.stat  fm_stat;else  if Settings.beep, beep, endend% initialization of all equations & JacobiansDAE.gp = zeros(Bus.n,1);DAE.gq = zeros(Bus.n,1);if Settings.octave  DAE.J11 = zeros(Bus.n,Bus.n);  DAE.J21 = zeros(Bus.n,Bus.n);  DAE.J12 = zeros(Bus.n,Bus.n);  DAE.J22 = zeros(Bus.n,Bus.n);else  DAE.J11 = sparse(Bus.n,Bus.n);  DAE.J21 = sparse(Bus.n,Bus.n);  DAE.J12 = sparse(Bus.n,Bus.n);  DAE.J22 = sparse(Bus.n,Bus.n);endfm_call('i');% build structure "Snapshot"if isempty(Settings.t0) & Fig.main  hdl = findobj(Fig.main,'Tag','EditText3');  Settings.t0 = str2num(get(hdl,'String'));endif ~Settings.locksnap  Snapshot = struct('name','Power Flow Results', ...                    'time',Settings.t0, ...                    'V',DAE.V, ...                    'ang',DAE.a, ...                    'x',DAE.x,...                    'Y',Line.Y, ...                    'Pg',Bus.Pg, ...                    'Qg',Bus.Qg, ...                    'Pl',Bus.Pl, ...                    'Ql',Bus.Ql, ...                    'vfd',Syn.vf, ...                    'pmech',Syn.pm, ...                    'Jlf',DAE.Jlf, ...                    'Jlfv',DAE.Jlfv, ...                    'Fx',DAE.Fx, ...                    'Fy',DAE.Fy, ...                    'Gx',DAE.Gx, ...                    'Ploss',sum(DAE.glfp), ...                    'Qloss',sum(DAE.glfq), ...                    'it',1);endfm_status('pf','close')LIB.selbus = min(LIB.selbus,Bus.n);if Fig.lib,  set(findobj(Fig.lib,'Tag','Listbox1'), ...      'String',Varname.bus, ...      'Value',LIB.selbus);end

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产校园另类小说区| 亚洲美女视频一区| 欧美一级黄色大片| 欧美性生交片4| 91久久久免费一区二区| 91浏览器在线视频| 色噜噜狠狠成人中文综合| 91视频一区二区三区| 91视频国产观看| 91色在线porny| 欧美综合视频在线观看| 欧美视频在线一区| 制服丝袜中文字幕亚洲| 日韩一区二区精品葵司在线| 欧美一区二区播放| 精品国产91洋老外米糕| 久久久综合视频| 国产精品成人免费在线| 一区二区三区中文字幕| 亚洲一区在线看| 日本亚洲欧美天堂免费| 精久久久久久久久久久| 国产电影精品久久禁18| 91香蕉视频mp4| 在线观看不卡一区| 欧美一级高清片| 国产日韩欧美亚洲| 亚洲精品中文在线观看| 视频一区中文字幕国产| 国内精品伊人久久久久影院对白| 懂色av一区二区夜夜嗨| 色哟哟日韩精品| 91精品国产综合久久香蕉的特点| 久久午夜免费电影| 日韩美女久久久| 日本不卡123| 成人福利视频网站| 欧美亚洲国产一区二区三区va| 欧美一区三区四区| 中文字幕二三区不卡| 亚洲午夜av在线| 国产美女精品人人做人人爽| 91一区二区在线| 日韩午夜在线影院| 中文字幕在线观看一区| 日韩高清国产一区在线| 成人app网站| 欧美一区国产二区| 1024国产精品| 久久99国产精品免费网站| www.欧美精品一二区| 亚洲精品日韩专区silk| 奇米精品一区二区三区在线观看| 成人午夜av电影| 91精品国模一区二区三区| 国产精品成人免费在线| 久久国产生活片100| 色婷婷综合久久| 久久久亚洲午夜电影| 午夜伊人狠狠久久| 不卡一区二区三区四区| 日韩视频一区在线观看| 亚洲精品中文在线影院| 国产成人精品综合在线观看| 欧美人狂配大交3d怪物一区| 国产精品久久久久影视| 久久精品国产久精国产| 91福利精品视频| 国产欧美日韩另类一区| 美女久久久精品| 欧美日韩中文字幕一区| 亚洲欧洲www| 国产福利一区二区三区在线视频| 欧美日韩1区2区| 亚洲美女偷拍久久| 成人激情开心网| 久久久久国产精品麻豆ai换脸| 天堂蜜桃一区二区三区| 91精彩视频在线| 国产精品国产成人国产三级| 国内精品久久久久影院一蜜桃| 欧美日本国产视频| 亚洲影院免费观看| 色综合久久综合网97色综合| 欧美韩国日本不卡| 国产美女一区二区三区| 精品国产一区二区国模嫣然| 男人的j进女人的j一区| 欧美日韩一区二区在线观看视频| 国产精品久久久久久户外露出| 国产一区二区久久| 精品日韩欧美在线| 久久福利视频一区二区| 日韩三级av在线播放| 日韩影院精彩在线| 欧美福利电影网| 五月天亚洲精品| 欧美日韩极品在线观看一区| 亚洲精品少妇30p| 91传媒视频在线播放| 亚洲精选视频在线| 欧美在线免费视屏| 91丨porny丨蝌蚪视频| 国产精品美女www爽爽爽| 成人精品免费看| 中文字幕在线观看不卡| 97精品国产露脸对白| 亚洲免费大片在线观看| 在线观看国产日韩| 午夜精品免费在线| 91精品国模一区二区三区| 美女久久久精品| 久久综合色之久久综合| 粉嫩高潮美女一区二区三区 | 中文字幕国产一区| 成人性生交大片| 日韩久久一区二区| 91久久精品一区二区三区| 香蕉成人啪国产精品视频综合网| 欧美精品日韩综合在线| 欧美aa在线视频| www亚洲一区| 99久久综合精品| 亚洲国产精品一区二区久久恐怖片| 欧美麻豆精品久久久久久| 蜜桃av一区二区三区电影| 久久免费电影网| 99精品国产99久久久久久白柏| 亚洲综合一二三区| 日韩色在线观看| 国产成人a级片| 亚洲美腿欧美偷拍| 欧美一级欧美三级在线观看| 国产精品一区在线观看乱码| 国产精品第13页| 欧美日本一区二区在线观看| 精品在线视频一区| 日韩美女视频一区二区| 欧美一区三区二区| 懂色一区二区三区免费观看 | 97精品国产露脸对白| 日韩精品每日更新| 国产亚洲一区二区在线观看| 95精品视频在线| 日韩av一区二区在线影视| 国产无遮挡一区二区三区毛片日本| 国产精品久久久久天堂| 在线观看av不卡| 国产中文字幕精品| 亚洲激情自拍偷拍| 亚洲精品一区二区三区在线观看| a4yy欧美一区二区三区| 日韩国产精品久久| 成人欧美一区二区三区1314| 91精品国产一区二区三区| www.欧美色图| 麻豆91在线播放| 亚洲欧美激情插| 久久综合av免费| 欧美日韩欧美一区二区| 粉嫩蜜臀av国产精品网站| 日韩成人dvd| 亚洲天堂福利av| 久久综合九色综合欧美就去吻| 欧美综合在线视频| 粉嫩蜜臀av国产精品网站| 丝袜美腿亚洲综合| 1024成人网| 国产色爱av资源综合区| 欧美一区二区三区四区在线观看| av电影一区二区| 国产在线看一区| 日本亚洲天堂网| 亚洲国产日韩a在线播放性色| 国产女同互慰高潮91漫画| 日韩欧美一级精品久久| 欧美专区日韩专区| 99re这里只有精品6| 国产精品1区2区| 免费成人美女在线观看.| 亚洲成av人片一区二区| 亚洲免费观看高清| 国产精品久久久久久亚洲毛片| 精品国产a毛片| 欧美刺激午夜性久久久久久久| 欧美日韩国产色站一区二区三区| 99re热这里只有精品免费视频| 国产剧情一区二区| 激情综合五月天| 免费人成精品欧美精品| 亚洲成av人片一区二区| 一区二区三区成人| 亚洲精品乱码久久久久久久久 | 日韩av午夜在线观看| 一二三区精品视频| 亚洲视频精选在线| 中文字幕一区二区三区精华液| 欧美激情一区二区在线| 久久久久久久久久久黄色| 亚洲精品在线观|