Dear All, dear Ray and Carlos,
Thanks very much for solving the issue last time.
It used to run well at that time, but recently, the runpf does not give me the
correct solution again, showing 0 (should be 0.017 according to PowerWorld)
loss in the network. And the system voltage profile is also not correct, almost
close to 1.0 for all the buses.
What I did is using my own code to call this MATPOWER package functions, such
as runpf, runopf functions, but I didn’t modify my case file, I always use
define_constants to write my data. Suspecting that I might have changed some of
the functions accidently, I even reinstalled MATPOWER on another PC and tried
to run this, still cannot get the right results.
Here is the case file that used to work. And I also attached the voltage
profile I get using PowerWorld. Hope anyone can give me a hint on where did I
do wrong.
Thank you and best wishes,
Tian
****************************
mpc = loadcase('caseSG');
results = runpf(mpc);
b = 1:1:14;
figure
plot(b,results.bus(:,8)')
****************************
****************************
function mpc = caseSG
%CASE SG Power flow data for A distribution network.
%% MATPOWER Case Format : Version 2
mpc.version = '2';
%%----- Power Flow Data -----%%
%% system MVA base
mpc.baseMVA = 1;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 3 0 0 0 0 1 1 0 0.4 1 1.1 0.9;
2 1 0 0 0 0 1 1 0 0.4 1 1.1 0.9;
3 1 0 0 0 0 1 1 0 0.4 1 1.1 0.9;
4 1 0 0 0 0 1 1 0 0.4 1 1.1 0.9;
5 1 0 0 0 0 1 1 0 0.4 1 1.1 0.9;
6 1 0.23 0.07 0 0 1 1 0 0.4 1 1.1 0.9;
7 1 0.2 0.06 0 0 1 1 0 0.4 1 1.1 0.9;
8 1 0.2 0.03 0 0 1 1 0 0.4 1 1.1 0.9;
9 1 0.13 0.06 0 0 1 1 0 0.4 1 1.1 0.9;
10 1 0.3 0.07 0 0 1 1 0 0.4 1 1.1 0.9;
11 1 0.2 0.05 0 0 1 1 0 0.4 1 1.1 0.9;
12 1 0.2 0.05 0 0 1 1 0 0.4 1 1.1 0.9;
13 1 0.17 0.05 0 0 1 1 0 0.4 1 1.1 0.9;
14 1 0.08 0.03 0 0 1 1 0 0.4 1 1.1 0.9;
];
%% generator data
% bus Pg Qg Qmax Qmin Vg mBase status Pmax Pmin Pc1 Pc2
Qc1min Qc1max Qc2min Qc2max ramp_agc ramp_10 ramp_30 ramp_q apf
mpc.gen = [
1 1.377 0.318 5 -5 1 1 1 10 -10 0 0 0
0 0 0 0 0 0 0 0;
];
%% branch data
% fbus tbus r x b rateA rateB rateC ratio angle status angmin
angmax
mpc.branch = [
1 2 0.000489 0.00064 0 5 5 5 0 0 1 -360 360;
1 3 0.000489 0.00064 0 5 5 5 0 0 1 -360 360;
2 4 0.094/55^2 1.34/55^2 0 1 1 1 0 0 1 -360 360;
3 5 0.094/55^2 1.34/55^2 0 1 1 1 0 0 1 -360 360;
4 6 5.876034/55^2 3.193497/55^2 0 1 1 1 0 0 1 -360 360;
4 7 5.208303/55^2 2.8306/55^2 0 1 1 1 0 0 1 -360 360;
4 8 6.343446/55^2 3.447525/55^2 0 1 1 1 0 0 1 -360 360;
4 9 8.179707/55^2 4.445493/55^2 0 1 1 1 0 0 1 -360 360;
4 10 7.678908/55^2 4.17332/55^2 0 1 1 1 0 0 1 -360 360;
5 11 6.677312/55^2 3.628974/55^2 0 1 1 1 0 0 1 -360 360;
5 12 6.343446/55^2 3.447525/55^2 0 1 1 1 0 0 1 -360 360;
5 13 3.639135/55^2 1.977791/55^2 0 1 1 1 0 0 1 -360 360;
5 14 5.876034/55^2 3.193497/55^2 0 1 1 1 0 0 1 -360 360;
];
%%----- OPF Data -----%%
%% generator cost data
% 1 startup shutdown n x1 y1 ... xn yn
% 2 startup shutdown n c(n-1) ... c0
mpc.gencost = [
2 0 0 2 1 0;
];
[cid:[email protected]]
From: [email protected]
[mailto:[email protected]] On Behalf Of Carlos
Gonzalez Almeida
Sent: Tuesday, February 24, 2015 17:40
To: MATPOWER discussion forum
Subject: Re: Convergence Issue for Distribution Network Power Flow Analysis
rem
On Tue, Feb 24, 2015 at 2:03 AM, #ZHANG TIAN#
<[email protected]<mailto:[email protected]>> wrote:
Hello!
Yes, by changing the LV impedances I can get the correct results. This is worth
noting that the data in the “Model Explorer” in PowerWorld Simulator is in per
unit based on the whole system, rather than its real value.
Many thanks.
Tian
From:
[email protected]<mailto:[email protected]>
[mailto:[email protected]<mailto:[email protected]>]
On Behalf Of Carlos E Murillo-Sanchez
Sent: Monday, February 23, 2015 22:56
To: MATPOWER discussion forum
Subject: Re: Convergence Issue for Distribution Network Power Flow Analysis
Hi;
You have used the TAP column of the branch table to indicate two transformers
with a 55:1 ratio, and then you used the LV impedances, I think, still in PU
with a base voltage of 22KV; they are pretty large. The TAP column should be
used to specify small variations about 1.0 for true tap-changing transformers.
All branch impedances should be specified using a single pu system. I believe
that the following is what you are actually trying to run:
define_constants;
mpc = loadcase('caseSG');
mpc.branch(3:end, BR_R:BR_X) = mpc.branch(3:end, BR_R:BR_X) / 55^2;
mpc.branch(3:4, TAP) = 0;
runpf(mpc);
#ZHANG TIAN# wrote:
Dear All,
I am using Matpower for a distribution network power flow analysis.
The data I used are taken from a real network, and the network is working fine
using PowerWorld simulator. Basically, it is a radial network with 14 buses.
Bus 1 is the connection point to the main grid, which I modelled it as a slack
bus (type 3).
However, when converting the model into a Matpower case, I can only get a
failure notification “Did NOT converge (0.01 seconds)”.
Does anyone have any idea about what might be the problem? Or what are the
options for me to debug?
I attached my case data in this email for your reference.
Thank you all very much.
Best regards,
Tian