Hi Uriel,

 

I made the changes you suggested and I’m getting this “out of bound” error:

 

>> runpf('example1')

error: pv(1): out of bound 0 (dimensions are 0x1)

error: called from

    bustypes at line 43 column 13

    runpf at line 114 column 19

 

thank you,

russ

 

 

From: [email protected] 
[mailto:[email protected]] On Behalf Of Uriel Fernando 
Sandoval Pérez
Sent: Tuesday, December 8, 2020 7:18 PM
To: MATPOWER discussion forum
Subject: Re: infinite bus, 1 branch/1 gen

 

Hi,

 

 

It seems you are modelling de active/reactive power injections as a negative 
load. But,

then you also define a generator with P=149.6 and Q=49.104. You should delete 
de load ( set to zero Pd and Qd), fix the active power of the generator and set 
Qmax=Qmin=49.104

 

 

Hope this helps.

 

El mar., 8 de diciembre de 2020 16:02, Russ Patterson <[email protected]> 
escribió:

Hi,

 

I have a simple problem as shown below.  The upper bus is the infinite, slack 
bus.  For the specified P & Q, I want to solve for VX.  Per my hand 
calculations (iterations) the result will be VX=1.174pu @-3.3°.

 

Now, I am trying to model this in a simple load flow as my first ever attempt 
to use MATPOWER (attached, which fails miserably).  

 

 

I have the manual and understand all of the bus, generator, and branch data.  
What I don’t know is – what can be left out in solving this simple problem?   
The machine is rated 16kV, 176MVA but I’d prefer to leave that out and just 
work all in per unit (including data entry) if possible.

 

Thanks,

Russ

 


  _____  


Russell W. Patterson, P.E.

Chair – IEEE PSRC (http://pes-psrc.org) 

Office: 423-702-9981

 

 

 

 

 

function mpc = example1
%Example 1    
% Bus 1 is infinite and is 1.154 pu and zero degrees
% Bus 2 has a 176MVA generator, P=0.85pu and Q=0.279pu both flowing into bus 2
% Impedance between bus 1 & 2 is j0.0921 pu  
%
\%% MATPOWER Case Format : Version 2
mpc.version = '2';

\%%-----  Power Flow Data  -----\%%
\%% system MVA base
mpc.baseMVA = 176;

\%% 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.154 0 16 1 1.154 1.154;
  2 1 0 0 0 0 1 1 0 16 1 0 0;
];

\%% 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 = [
  2 149.6 49.104 49.104 49.104 1 176 0 0 0 0 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 .0921 0 0 0 0 0 0 1 10 -10;
];


Reply via email to