Hi, We have a network with the following configuration:
*%% system MVA base*
mpc.baseMVA = 100;
*%% system voltage levels (kV)*
mpc.V_levels = [
0.4 15.0 30.0 60.0
];
*%% system summary*
% number of buses: 41 (1 REF | 1 PV)
% number of branches: 41 (8 transformers)
% number of loads: 21 (including Pd/Qd = 0)
% number of generators: 2
% number of capacitors: 2
We use get_lossses, in this case:
%%% *compute the losses*
losses = get_losses(powerflow);
%%% *the active losses*
active_losses = sum(abs(real(losses)));
The balance between the injected active power and the Loads/Gen's is not
equal to the result of the get_lossses procedure described.
Follows attached the case (run test_file.m with test_network.mat in the same dir)
Thanks in advance, -- INESC TEC *José Paulos* Centro de Sistemas de Energia Centre for Power and Energy Systems *INESC TEC* Campus da FEUP Rua Dr Roberto Frias 4200-465 Porto Portugal T +351 91 424 1519 F +351 22 209 4050 [email protected] <mailto:[email protected]> www.inesctec.pt <http://www.inesctec.pt>
%%%%%%%%%%%%%% TEST FILE %%%%%%%%%%%%%
clear; clc
%% load case
load test_network
%%% dont output results and comments on console
mpopt = mpoption('verbose', 0, 'out.all',0);
%% Run the PF
powerflow = runpf(test_network, mpopt);
%%% the injected power at ref
injected_ref = powerflow.gen(1,2);
%%% the total load
loads = sum(powerflow.bus(:,3));
%%% compute the losses
losses = get_losses(powerflow);
%%% the active losses
active_losses = sum(abs(real(losses)));
%%% calculated losses
calculated_losses = injected_ref - loads;
fprintf('Injected Power @ Ref = %.3f MW\n', injected_ref);
fprintf('Total Loads Balance = %.3f MW\n', loads);
fprintf('Active Losses (GetLosses) = %.3f MW\n', active_losses);
fprintf('Difference Injected/Loads = %.3f MW\n', calculated_losses);
test_network.mat
Description: Binary data
