📄 fex_lineflows.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 Hdl
global Bus File DAE Theme jay Upfc Sssc Tcsc
global Varout Line Path clpsat
if 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);
[Pr,Ps,Qr,Qs] = flows(Sssc,Pr,Ps,Qr,Qs);
[Pr,Ps,Qr,Qs] = flows(Upfc,Pr,Ps,Qr,Qs);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -