Re: power flow

2016-04-12 Thread Mounika Vanjarapu
thank u

On Tue, Apr 12, 2016 at 2:45 PM, Deep Kiran  wrote:

> Dear Mounika,
>
> for example of case5.m
>
> Write the code as:
>
> mpc = loadcase(case5);
> mpc.branch('branch number',6) = 'specify your line limit for the branch of
> your choice';
>
> I hope this helps!
>
> Regards,
> Deep Kiran
>
>
>
> On 12 April 2016 at 14:15, Mounika Vanjarapu 
> wrote:
>
>> can anyone say how to change the power flow limits by writing the code
>> but not by editing the limits.like setting the limits to my wish for some
>> branches
>>
>
>


Re: Query for Lagrange multiplier correspond to Qg limits

2016-04-12 Thread Deep Kiran
Wow, its been 2 years of using Matpower and I was unaware of this setting.
Thank you Sir.

Best regards,
Deep Kiran

On 8 April 2016 at 19:37, Ray Zimmerman  wrote:

> Your understanding is correct. However, with numerical algorithms such as
> the primal-dual interior point method used by MATPOWER’s default OPF
> solver, depending on the numerical termination criteria for the algorithm,
> some non-binding constraints may still have small non-zero values for their
> multipliers. MATPOWER attempts to screen these out with a threshold of 1e-4
> required to display a constraint, but in this case that threshold is too
> small.
>
> Decreasing the termination tolerance eliminates the problem.
>
> mpopt = mpoption('opf.ac.solver', 'MIPS', 'mips.comptol', 1e-7);
> r = runopf(m,mpopt);
>
> Best regards,
>
> Ray
>
>
>
> On Apr 8, 2016, at 3:50 AM, Deep Kiran  wrote:
>
> Dear Matpower community,
>
> I was doing some interpretation for pattern of Lagrange multiplier
> correspond to Qg limits on case5.m.
>
> I have done some modification on the network which are as follows:
>
> m = loadcase(case5);
> m.bus(:,[3,4]) = m.bus(:,[3,4])*0.65;
> m.bus(:,[4]) = m.bus(:,[4])*-2;
> r = runopf(m);
>
> With the above modification, I get the following result for reactive power
> limit of generator at bus 4.
>
> Gen   Bus Reactive Power Limits
>   # # Qmin mu Qmin   Qg   QmaxQmax mu
>   -   ---         ---
>4 4  0.001   -150.00   -145.20150.00  -
>
> From the above result, Qg(=-145.20)  is still within its limits
> [-150,150]. My understanding of Lagrange multiplier is that it remains zero
> for the inequality constraint that is < or > 0. Its value will be non-zero
> only if the inequality constraint is = 0. Although, the Qmin mu(=0.001) is
> small, however, Qg is 4.8 off from its lower bound.
>
> Am I missing some obvious link here?
>
> Thank you in advance.
>
> Best regards,
> Deep Kiran
> Research Scholar,
> IIT Delhi,
> India
>
>
>


Re: power flow

2016-04-12 Thread Deep Kiran
Dear Mounika,

for example of case5.m

Write the code as:

mpc = loadcase(case5);
mpc.branch('branch number',6) = 'specify your line limit for the branch of
your choice';

I hope this helps!

Regards,
Deep Kiran



On 12 April 2016 at 14:15, Mounika Vanjarapu 
wrote:

> can anyone say how to change the power flow limits by writing the code but
> not by editing the limits.like setting the limits to my wish for some
> branches
>


power flow

2016-04-12 Thread Mounika Vanjarapu
can anyone say how to change the power flow limits by writing the code but
not by editing the limits.like setting the limits to my wish for some
branches


Re: Matpower 5.1 and constant impedance loads

2016-04-12 Thread Jose Luis Marin
Hello Jaroslaw,

I may be completely off, as I do not know the RTDS system you're using, but
I couldn't help noticing this sounds as if RTDS is using the "ZIP" (in your
case just Z,P) load model components *only for transients*, not for static
powerflow.  But this is to be expected, because using load modeling schemes
such as ZIP usually does not make much sense in static powerflow studies.


-- 
Jose L. Marin
Grupo AIA



On Tue, Apr 12, 2016 at 6:47 AM, Jaroslaw Krata  wrote:

> Dear Ray,
>
>
> thank  you for your reply.
>
> I have updated shunt load with voltage coefficient.
>
> However, I am still finding some issues with final results.
>
>
> I have replicated my system in two independent software platforms.
>
> One is the Matpower and the second is the RTDS (real-time digital power
> system simulator).
>
>
> When I set my system loads to be 100% constant power loads, the power flow
> results from both simulators are nearly identical.
>
> Newton's method power flow converges in 4 iterations and the voltages
> differences between RTDS and Matpower is only approx. 0.1% and it is
> consistent at all buses.
>
> I consider it as an extremely good result and I am very happy with it.
>
>
> However, when I add some portion of a constant impedance loads (ratio
> 70/30 or 80/20), the voltage error increase to 0.6%-0.8% (and shunt power
> accordingly).
>
> It is 7x bigger error caused only by changing the proportions of constant
> impedance to constant power loads.
>
> At the each investigated case, Matpower calculated higher value of
> voltages.
>
>
> Do you have any idea what might the source of the error (bearing in mind
> that for fully constant power loads the error is almost non-existent)?
>
> How can I possibly eliminate the issue?
>
>
> BR,
>
> Jaroslaw
>
>
> --
> *From:* bounce-120338215-75504...@list.cornell.edu <
> bounce-120338215-75504...@list.cornell.edu> on behalf of Ray Zimmerman <
> r...@cornell.edu>
> *Sent:* 06 April 2016 00:27
> *To:* MATPOWER discussion forum
> *Subject:* Re: Matpower 5.1 and constant impedance loads
>
> Hi Jarek,
>
> I don’t think any code changes should be necessary for solving the problem
> you want to solve. That is, if you put the constant impedance loads in the
> GS and BS columns of the bus matrix, the calculations should be correct,
> including all of the resulting voltages and flows. The only issue is that
> the power delivered to these elements is not reported anywhere as “load”,
> so you’ll have to do that manually after the fact, but that is a trivial
> calculation once you have the bus voltages. For example, if the nominal
> (i.e. at 1 p.u. voltage) active and reactive constant impedance loads are
> given in the nb x 1 vectors Pdz0 and Qdz0, then you can calculate the
> constant impedance loads at the solution as follows ...
>
> define_constants;
> mpc = loadcase(...);
> mpc.bus(:, GS) = mpc.bus(:, GS) + Pdz0;
> mpc.bus(:, BS) = mpc.bus(:, BS) - Qdz0;
>
> r = runpf(mpc);
>
> Pdz = Pdz0 ./ r.bus(:, VM) .^ 2;
> Qdz = Qdz0 ./ r.bus(:, VM) .^ 2;
>
> The constant power loads can be found using total_load() …
>
> [Pds, Qds] = total_load(r.bus, r.gen, 'bus');
>
> So, no need for any of your steps beyond a) under #2, except I suppose f)
> could be done by simply doing …
>
> r.bus(:, PD) = r.bus(:, PD) + Pdz;
> r.bus(:, QD) = r.bus(:, QD) + Qdz;
>
>
> Ray
>
>
>
> On Apr 5, 2016, at 1:43 AM, Jaroslaw Krata  wrote:
>
> Dear Matpower authors,
>
> I wish to use the Matpower software in my PhD research.
> I need to calculate power flow for the distribution system that consists
> of many constant impedance and constant power loads.
>
> After I read in the manual that " (...) the constant impedance portions
> can be modeled as a shunt element (...)",
> I  thought naively that it's gonna be easy ;-).
> I went through other messages from this mailing list and I understand that
> I need to changes the code of the Power Flow calculation.
>
> In particular, I was trying use this advise
> https://www.mail-archive.com/matpower-l%40cornell.edu/msg03254.html
> but it seems that since 2014 the code of Matpower has changed and this
> advice is not easy applicable to the newest version of the Matpower.
>
> Thus, I would like to ask you for help of the required code changes in the
> Matpower 5.1.
> I wish to achieve two targets:
> 1. correct power flow calculation assuming const P and const Z loads
> 2. output branch and power matrices showing updated (real) values of power
> from const Z loads.
>
> I started as follows:
> a) I assume that whole constant power loads are assigned to the bus matrix
> - Pd and Qd columns
> while all constant impedance loads are assigned to Gs and Bs columns
>
> b) I modified makeSbus() function by adding lines related to const P and Z
> line1:  [Sbus, Sbus_gen, Sbus_constP, Sbus_constZ] = makeSbus(baseMVA,
> bus, gen)  %adding Sbus_gen, Sbus_consP and Sbus_constZ vectors
> line36 to 38:
>