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

📄 fex_lineflows.m

📁 基于PSAT 软件的多目标最优潮流计算用于中小型电力系统的分析和管理
💻 M
字号:
function [Ps,Qs,Pr,Qr,Is,Ir] = fex_lineflows% FEX_LINEFLOWS -> called by FEX_ABCD% compute line flows%% Author:  Alberto Del Rosso% Date:    June 2004% Update:% Version: preliminary version% E-mail:  adelrosso@mercadosenergeticos.com% % I M P O R T A N T   N O T E% ===========================% This external function is not part of the original PSAT software% package although it uses many of PSAT functions. It has not been% approved yet by Dr. Federico Milano to be distributed along with% PSAT files.global Fig Settings Snapshot Hdlglobal Bus File DAE Theme jay Upfc Sssc Tcscglobal Varout Line Path clpsatif Line.n  tps = Line.con(:,11).*exp(jay*Line.con(:,12)*pi/180);  VV = DAE.V.*exp(jay*DAE.a);  r = Line.con(:,8);  rx = Line.con(:,9);  chrg = Line.con(:,10)/2;  z = r + jay*rx;  y = ones(Line.n,1)./z;  MW_s = VV(Line.from).* ...         conj((VV(Line.from) - tps.*VV(Line.to)).*y ...              + VV(Line.from).*(jay*chrg))./(tps.*conj(tps));  Ps = real(MW_s); % active power P_sr  Qs = imag(MW_s); % reactive power Q_sr    MW_r = VV(Line.to).* ...         conj((VV(Line.to) - VV(Line.from)./tps).*y + ...              VV(Line.to).*(jay*chrg));  Pr = real(MW_r); % active power P_rs  Qr = imag(MW_r); % reactive power Q_rs    Is = abs((VV(Line.from) - tps.*VV(Line.to)).*y + VV(Line.from).*(jay*chrg))./(tps.*conj(tps));  Ir = abs((VV(Line.to) - VV(Line.from)./tps).*y + VV(Line.to).*(jay*chrg));end[Pr,Ps,Qr,Qs] = flows(Tcsc,Pr,Ps,Qr,Qs);if Sssc.n  V1 = DAE.V(Sssc.bus1);  V2 = DAE.V(Sssc.bus2);  cc = cos(DAE.a(Sssc.bus1)-DAE.a(Sssc.bus2));  den = max(sqrt(V1.^2+V2.^2-2.*V1.*V2.*cc),1e-6*ones(Sssc.n,1));  u = DAE.x(Sssc.vcs)./den;  Ps(Sssc.line) = (1+u).*Ps(Sssc.line);  Pr(Sssc.line) = (1+u).*Pr(Sssc.line);  Qs(Sssc.line) = (1+u).*Qs(Sssc.line);  Qr(Sssc.line) = (1+u).*Qr(Sssc.line);endif Upfc.n  V1 = DAE.V(Upfc.bus1);  V2 = DAE.V(Upfc.bus2);  theta = DAE.a(Upfc.bus1)-DAE.a(Upfc.bus2)+Upfc.gamma;  ss = sin(theta);  cc = cos(theta);  c1 = sqrt(DAE.x(Upfc.vp).^2+DAE.x(Upfc.vq).^2).*Upfc.y;  Ps(Upfc.line) = Ps(Upfc.line) + c1.*V2.*ss;  Pr(Upfc.line) = Pr(Upfc.line) - c1.*V2.*ss;  Qs(Upfc.line) = Qs(Upfc.line) + c1.*V1.*cos(Upfc.gamma)-DAE.x(Upfc.iq).*V1;  Qr(Upfc.line) = Qr(Upfc.line) - c1.*V2.*cc;end  

⌨️ 快捷键说明

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