Query regarding Var limits in CPF

2016-12-30 Thread Shruti Rao
Hi everyone,


I had a question about the CPF function in MATPOWER6.0 which I am using to
to check the limit induced bifurcation (LIB) points of different systems.

I noticed for case300, while the maximum generator var limits were being
respected, the minimum var limit of one generator was being violated at the
LIB. The generator at bus number 76 (generator status is 1), has a QG of 0
MVAr at the LIB whereas its minimum QG is 12 MVAr. Hence, the violation was
greater than the default tolerance for limit detection (0.01 MVAr).

Also, for an ERCOT test case, 33 generators were violating the max. var
limit, while 61 generators were violating the min. var limit out of 531
committed generators.


Here is a sample code I used:
mpcb=loadcase('case300');
mpct = mpcb; % set up target case with
mpct.bus(:, PD) = mpcb.bus(:, PD)*5; % and increased load
mpct.bus(:, QD) = mpcb.bus(:, QD)*5; % and increased load
mpct.gen(:, PG) = mpcb.gen(:, PG)*5; % and increased gen
mpopt = mpoption('cpf.stop_at', 'NOSE'*,'cpf.enforce_q_lims',1*,
'cpf.enforce_p_lims',0);
results = runcpf(mpcb, mpct, mpopt);


Am I doing something incorrectly or is there any additional options that I
should be setting?

Thank you and a happy new year to you!

Regards,
Shruti Dwarkanath Rao

Graduate Research Associate, Arizona State University
Tempe, AZ, 85281
650 996 0116


Re: reactive power limits of generators

2016-03-01 Thread Shruti Rao
Hi Juliane,

I don't have a lot of experience with this, but in one case when I
approximated the Var limits, a crass way I used was to approximate the
*Qgmax* was by ensuring that (*Pg*^2+*Qgmax*^2) be a reasonable percentage
of the MVA rating (say 80 or 90%). If you want it to be accurate, you would
probably have to use  use the generator capability curve to decide the
minimum and maximum Var limits.
[image: Inline image 4]

If you know the maximum allowable stator losses (or an estimate of this),
you can obtain *Qgmax* so as to ensure that, at rated voltage and the given
*P*, the losses are within limits.
 [image: Inline image 2]
And then, you could probably approximate *Qgmin* as *Qgmin* = - *Qgmax . * But
in reality, the magnitude of *Qgmin *is usually less than the magnitude of
*Qgmax*.

I hope this helps.

Shruti

On Tue, Mar 1, 2016 at 5:53 AM, Selle, Juliane Regina <
juliane.se...@campus.tu-berlin.de> wrote:

> Hi everyone,
>
>
> I am working on building up a specific transmission system model
> (220-450kV), so I need to write my own MATPOWER cases. I know the network
> structure, so building up the branch matrix is not a problem.
> I also know the installed capacities (power plants, renewables, ...) at
> each node, which gives me the active power generation (in % of the
> installed capacity). But I don't know how to set proper values for the
> reactive power generation! Does anybody have experience on how to fit the
> Q-limits to the active power generation? What is your suggestion?
>
> I don't have any data information on the reactive power by now at all and
> I have no idea how to assess realistic reactive power limits.
>
>
> Thanks,
>
> Juls
>



-- 
Regards,
Shruti Dwarkanath Rao

Graduate Research Associate, Arizona State University
Co-Vice-Chair: IEEE PES ASU Student Chapter
Tempe, AZ, 85281
650 996 0116


Re: save losses

2016-02-12 Thread Shruti Rao
Hi Fereshteh,

get_losses is an inbuilt MATPower function that computes the branch losses
and can also compute the reactive injections from line charging. It can
also compute the derivatives with respect to voltage etc. , the details can
be found in the manual in Chapter 9.


Shruti

On Fri, Feb 12, 2016 at 1:52 PM, Fereshteh Moghateli 
wrote:

> What do you mean by (get_losses)?
> thank you
>
> On Sat, Feb 13, 2016 at 12:05 AM, Ray Zimmerman  wrote:
>
>> I’m not sure what you mean by “save losses” and “50 PF iteration”. If you
>> mean something like record the value of total branch active power losses
>> for 50 different power flow runs, then you could do something like the
>> following:
>>
>> losses = zeros(50, 1);
>> mpc = loadcase();
>> for k = 1:50
>> 
>> r = runpf(mpc);
>> losses(k) = sum(get_losses(r));
>> end
>>
>> Then the losses will be stored in the losses vector.
>>
>>Ray
>>
>>
>>
>> On Feb 12, 2016, at 1:41 PM, Fereshteh Moghateli 
>> wrote:
>>
>> hi community
>> how to save losses in matpower in for example 50 PF iteration?
>>
>>
>>
>


-- 
Regards,
Shruti Dwarkanath Rao

Graduate Research Associate, Arizona State University
Co-Vice-Chair: IEEE PES ASU Student Chapter
Tempe, AZ, 85281
650 996 0116


Re: Different results with MATPOWER and PSAT

2015-11-19 Thread Shruti Rao
If the system parameters are the same, it could be because the tolerance
levels that were set for the different software were different i.e. the
default power balance mismatch tolerances are not always the same in all
software. Also probably if the VAR limits are active for PV buses,
different software often have slightly different algorithms for bus-type
switching and that could affect the solution maybe? Hope this helps.

Shruti

On Thu, Nov 19, 2015 at 9:12 PM, Yogess H Singh  wrote:

> Dear Fellow Member,
>
> I ran load flow analysis on a IEEE-14 bus system using MATPOWER, PSAT and
> PowerWorld. Voltage magnitudes as well as phases have slightly different
> values in all three tools. However, the difference is not much but I want
> to know what causes difference among results obtained with different
> software tool even if all the parameters are exactly same?
>
>
> Best Regards,
>
> *Yogesh Kumar*
> *Graduate Research Assistant*
> *NE 2042, EECS Department*
> *University of Toledo, OH 43507*
> *+1 (419)530-8295 <%2B1%20%28419%29450-2217>*
>



-- 
Regards,
Shruti Dwarkanath Rao

Graduate Research Assistant, Arizona State University
Vice Chair: IEEE PES ASU Student Chapter
Tempe, AZ, 85281
650 996 0116


Re: How to get MVA FLOW OF LINE

2015-11-01 Thread Shruti Rao
You can get the branch flows on each line from MATPOWER in the output
anyway in branch data. It will be displayed in output window as well as if
you save your results in a variable say results:
results = runpf(case);
The branch P and Q flows will be saved in results.branch. You can then
calculate the net MVA flowing on the line and your securiy index from this
data.

Shruti

2015-11-01 16:53 GMT-07:00 Umer Ali Alsedeeq Ibrahim :

> Dear All
>
> I would like to get MVA Fow of line after running power flow for any case
> in order to calculate security index. In security index I have to calculate
> the term MVA FLOW/RATING A. Your help is highly appreciated.
>
> Best regards
>
> Omer Ali
> [image: Logo]
>
> Disclaimer:
>
> This e-mail and any attachments may contain information which is
> confidential. They should not be distributed, disclosed or copied to anyone
> without the approval of the sender. If you are not one of the intended
> recipients of this e-mail, please delete the e-mail and any attachments,
> and all copies, and notify the sender by e-mail or telephone.
> Confidentiality is not waived or lost by mistaken communication. Before
> opening this e-mail or an attachment, you should check them for viruses.
> تنويه هام: هذه الرسالة الإلكترونية وأية ملحقات معها قد تحتوي على معلومات
> سرية، يجب أن لا يوزعا أو يكشف مضمونهما و/أو نسخهما لأي كان من دون موافقة
> المرسل. إذا لم تكن واحداً من الأشخاص الموجه لهم هذا البريد الإلكتروني ووصل
> إلى بريدك الإلكتروني عن طريق الخطاً، يرجى حذف الرسالة مع ملحقاتها فضلاً عن
> حذف جميع نسخها. وبعد ذلك، يرجى الإتصال بالمرسل عبر البريد الإلكتروني او
> الهاتف لإبلاغه بالخطأ الحاصل. لا تفقد سرية المعلومات أو يتنازل عنها بسبب
> خطأ ناجم عن إرسال وتوجيه البريد الالكتروني لأشخاص غير مقصودين. كما يتوجب
> على متلقي البريد الإلكتروني وملحقاته أن يتفحصوهما دوماً قبل الإطلاع عليهما،
> للتأكد من خلوهما من الفيروسات الإلكترونية الضارة.
> Qatar General Electricity & Water Corporation 
>
>


-- 
Regards,
Shruti Dwarkanath Rao

Graduate Research Assistant, Arizona State University
Vice Chair: IEEE PES ASU Student Chapter
Tempe, AZ, 85281
650 996 0116



Re: Question about sparsity-based implementation in MATPower

2015-10-23 Thread Shruti Rao
Thank you again, for taking the time out to respond to my enquiry.

Shruti

On Fri, Oct 23, 2015 at 3:06 AM, Jose Luis Marin <mari...@gridquant.com>
wrote:

> Hi Shruti,
>
> In that case I was refering to our C implementation of HELM, but yes, we
> do the factorization just once and save the triangular factors, in order to
> use them repeatedly.
>
> You can actually see how this is also done in MATPOWER, in the Fast
> Decoupled methods (fdpf.m). These methods factorize the matrices just once
> and keep them constant throughout the iterations.  The Matlab function
> you're looking for is lu(), see Lines 80--104 and 129--135 in
> http://www.pserc.cornell.edu//matpower/docs/ref/matpower5.1/fdpf.html
>
>
> Regards,
>
> --
> Jose L. Marin
> Gridquant España SL
> Grupo AIA
>
>
> On Fri, Oct 23, 2015 at 5:22 AM, Shruti Rao <sra...@asu.edu> wrote:
>
>> Greetings Dr. Marin,
>>
>> In the variant of HELM, do you use backslash as well? The reason I ask
>> this question is, one of the advantages of the HELM is that the matrix does
>> not change for a given static problem (not considering bus-type switching
>> and tap changing etc.). As far as I know and I might be wrong, but
>> backslash will perform the matrix factorization every time we use it. But
>> if the matrix does not change, won't we save a lot of computation time by
>> doing the factorization only once and then doing only forward and backward
>> substitutions for finding the higher order series terms?
>>
>>
>> Regards,
>> Shruti
>>
>> On Thu, Oct 22, 2015 at 1:01 AM, Jose Luis Marin <mari...@gridquant.com>
>> wrote:
>>
>>> Hello Shri,
>>>
>>> Most of the testing we did was on CHOLMOD, as the matrices in our
>>> problem (from a variant of our HELM algorithm) were symmetric. We found
>>> that the simplicial option was always much faster than the supernodal one,
>>> since the "supernodes" were always too small.  We never got around to test
>>> KLU properly, sorry.  What is the PETSc linear solver that you're comparing
>>> to? Is it direct or iterative?  What is the storage format for sparse
>>> matrices in PETSc?  One wild guess at why you may be seeing this large
>>> difference is that there could be an overhead in converting back and forth
>>> to the compressed-sparse-column format used by KLU.  Another easy thing to
>>> test is to just deactivate the BTF step in KLU, and see if it helps with
>>> power system matrices.  If I had the time I would like to also benchmark
>>> the LU solver from CXSparse, which seems to be the simplest, barebones
>>> implementation of a simplicial sparse solver.
>>>
>>> --
>>> Jose L. Marin
>>> Gridquant España SL
>>> Grupo AIA
>>>
>>>
>>>
>>> On Wed, Oct 21, 2015 at 3:19 AM, Abhyankar, Shrirang G. <abhy...@anl.gov
>>> > wrote:
>>>
>>>> I concur with Jose’s observations on KLU, but I don’t think MATLAB will
>>>> make KLU as its default solver. It’ll be great to have a KLU linear solver
>>>> option for mplinsolve()
>>>> <http://www.pserc.cornell.edu//matpower/docs/ref/matpower5.1/mplinsolve.html>
>>>>
>>>>
>>>> I recently added an interface to KLU in PETSc
>>>> <http://www.mcs.anl.gov/petsc/> and compared PETSc and KLU’s linear
>>>> solvers on a bunch of MATPOWER test cases. I was surprised to note that
>>>> PETSc’s linear solver was actually faster than KLU (on all the test cases)
>>>> by a factor of 1.5 - 3 times. I did experiment with the available solver
>>>> and reordering schemes available with KLU, but did not find any option that
>>>> beats PETSc. I’ll appreciate pointers from anyone who has used KLU on the
>>>> KLU options they’ve used for solving their application. My power flow
>>>> example code is available with the PETSc distribution
>>>> https://bitbucket.org/petsc/petsc.git in the directory
>>>> src/snes/examples/tutorials/network/pflow for anyone who wants to test it.
>>>>
>>>> I am not surprised that PARDISO was found to be slower than ‘\'. Most
>>>> of the power system test cases in MATPOWER are so small that having a
>>>> multi-threaded linear solver may not yield any appreciable speedup. The
>>>> thread launch and synchronization would most likely dominate. In addition,
>>>> one needs to be cognizant of issues such as thread affinity and first touch
>>>> when dealing with thr

Re: Question about sparsity-based implementation in MATPower

2015-10-22 Thread Shruti Rao
ally
>> trying to find denser blocks in order to use the BLAS, and power systems
>> matrices are just too sparse for that approach to pay off.  I hope Matlab
>> implements the KLU solver as an option some day, because my hunch is that
>> KLU is the fastest solver for power systems problems (it was used on Xyce,
>> a SPICE-like simulator).
>>
>>
>> --
>> Jose L. Marin
>> Gridquant España SL
>> Grupo AIA
>>
>>
>> On Mon, Oct 19, 2015 at 3:04 PM, Ray Zimmerman <r...@cornell.edu> wrote:
>>
>>> I would also mention, for those who are interested, that version 5.1 of
>>> MATPOWER includes a wrapper function mplinsolve()
>>> <http://www.pserc.cornell.edu//matpower/docs/ref/matpower5.1/mplinsolve.html>
>>>  that
>>> allows you to choose between different linear solvers for computing the
>>> Newton update step in the MIPS interior-point OPF algorithm. Currently this
>>> includes only Matlab’s built-in \ operator or the optional PARDISO.
>>>
>>> If I remember correctly, for the Newton-Raphson power flow, I stuck with
>>> using Matlab’s \ operator directly rather than mplinsolve()
>>> <http://www.pserc.cornell.edu//matpower/docs/ref/matpower5.1/mplinsolve.html>,
>>> because even for the largest systems I tried, there was little or no
>>> advantage to PARDISO, and the extra overhead was noticeable on small
>>> systems.
>>>
>>>Ray
>>>
>>>
>>> On Oct 19, 2015, at 1:05 AM, Shruti Rao <sra...@asu.edu> wrote:
>>>
>>> Thank you Dr. Abhyankar for the guidance. I appreciate your time and
>>> effort.
>>>
>>> Shruti
>>>
>>> On Sun, Oct 18, 2015 at 10:02 PM, Abhyankar, Shrirang G. <
>>> abhy...@anl.gov> wrote:
>>>
>>>> Shruti,
>>>>   MATPOWER does use “\” operator for the linear solves. However note
>>>> that, internally, MATLAB does perform some sort of matrix reordering to
>>>> reduce the fill-ins in the factored matrix. For instance, UMFPACK uses an
>>>> approximate minimum degree reordering scheme by default.
>>>>
>>>> Shri
>>>>
>>>> From: Shruti Rao <sra...@asu.edu>
>>>> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
>>>> Date: Sunday, October 18, 2015 at 8:31 PM
>>>> To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
>>>> Subject: Re: Question about sparsity-based implementation in MATPower
>>>>
>>>> Thank you Dr. Abhyakar,
>>>>
>>>> My main aim was to confirm that MATPower uses the inbuilt "\" to solve
>>>> the matrix equations and not Tinney or some other form of reordering  and
>>>> then LU factorization followed by forward,backward substitutions. From your
>>>> response I assume that it is true that MATpower uses "\" right?
>>>>
>>>> Thank you for your response.
>>>>
>>>>
>>>>
>>>> On Sun, Oct 18, 2015 at 6:27 PM, Abhyankar, Shrirang G. <
>>>> abhy...@anl.gov> wrote:
>>>>
>>>>> Hi Shruti,
>>>>>   The direct linear solver used by MATLAB depends on the symmetry of
>>>>> the Jacobian matrix. For MATPOWER test cases that have symmetric Jacobians
>>>>> (due to inactive taps), a Cholesky factorization is used (LL^T = A). For
>>>>> cases that lead to non-symmetric Jacobian, MATLAB uses UMFPACK for
>>>>> performing the linear solve.
>>>>>
>>>>> Shri
>>>>>
>>>>> From: Shruti Rao <sra...@asu.edu>
>>>>> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
>>>>> Date: Sunday, October 18, 2015 at 5:37 PM
>>>>> To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
>>>>> Subject: Question about sparsity-based implementation in MATPower
>>>>>
>>>>> Greetings MATPower community,
>>>>>
>>>>> I had a question about the way sparsity-based techniques are used in
>>>>> the Newton-Raphson solver of the power flow algorithm in MATPower.
>>>>>
>>>>> I ran the code step-by-step and from my understanding, the way the
>>>>> sparsity of the Jacobian matrix is exploited is that it is created as a
>>>>> MATLAB "sparse" matrix wherein only the non-zeros are stored with the
>>>>> res

Re: Question about sparsity-based implementation in MATPower

2015-10-19 Thread Shruti Rao
Thank you Dr. Zimmerman and Dr. Marin. I greatly appreciate your valuable
inputs.

Cheers!

Shruti

On Mon, Oct 19, 2015 at 10:15 AM, Jose Luis Marin <mari...@gridquant.com>
wrote:

>
> I'd like to add that Matlab keeps incorporating the latest sparse direct
> solvers coming from Tim Davis and his group from TAMU / U. of Florida (
> SuiteSparse <http://faculty.cse.tamu.edu/davis/suitesparse.html>) into
> their new versions.  I believe that if the Jacobian is symmetric, current
> versions of MATLAB will use CHOLMOD, while if it's not, they will use
> UMFPACK.
>
> This is great because these are solid, state of the art direct solvers;
> however, as far as I know, there is still no way in Matlab to tune the
> spparms in order to deactivate their multifrontal / supernodal variants and
> just use the "simplicial" variants instead.  In some testing we did a while
> ago on the C version of SuiteSparse, the multifrontal and supernodal
> approaches performed worse on the kind matrices that one typically obtains
> in power networks.  It made sense, because those techniques are essentially
> trying to find denser blocks in order to use the BLAS, and power systems
> matrices are just too sparse for that approach to pay off.  I hope Matlab
> implements the KLU solver as an option some day, because my hunch is that
> KLU is the fastest solver for power systems problems (it was used on Xyce,
> a SPICE-like simulator).
>
>
> --
> Jose L. Marin
> Gridquant España SL
> Grupo AIA
>
>
> On Mon, Oct 19, 2015 at 3:04 PM, Ray Zimmerman <r...@cornell.edu> wrote:
>
>> I would also mention, for those who are interested, that version 5.1 of
>> MATPOWER includes a wrapper function mplinsolve()
>> <http://www.pserc.cornell.edu//matpower/docs/ref/matpower5.1/mplinsolve.html>
>>  that
>> allows you to choose between different linear solvers for computing the
>> Newton update step in the MIPS interior-point OPF algorithm. Currently this
>> includes only Matlab’s built-in \ operator or the optional PARDISO.
>>
>> If I remember correctly, for the Newton-Raphson power flow, I stuck with
>> using Matlab’s \ operator directly rather than mplinsolve()
>> <http://www.pserc.cornell.edu//matpower/docs/ref/matpower5.1/mplinsolve.html>,
>> because even for the largest systems I tried, there was little or no
>> advantage to PARDISO, and the extra overhead was noticeable on small
>> systems.
>>
>>Ray
>>
>>
>> On Oct 19, 2015, at 1:05 AM, Shruti Rao <sra...@asu.edu> wrote:
>>
>> Thank you Dr. Abhyankar for the guidance. I appreciate your time and
>> effort.
>>
>> Shruti
>>
>> On Sun, Oct 18, 2015 at 10:02 PM, Abhyankar, Shrirang G. <abhy...@anl.gov
>> > wrote:
>>
>>> Shruti,
>>>   MATPOWER does use “\” operator for the linear solves. However note
>>> that, internally, MATLAB does perform some sort of matrix reordering to
>>> reduce the fill-ins in the factored matrix. For instance, UMFPACK uses an
>>> approximate minimum degree reordering scheme by default.
>>>
>>> Shri
>>>
>>> From: Shruti Rao <sra...@asu.edu>
>>> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
>>> Date: Sunday, October 18, 2015 at 8:31 PM
>>> To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
>>> Subject: Re: Question about sparsity-based implementation in MATPower
>>>
>>> Thank you Dr. Abhyakar,
>>>
>>> My main aim was to confirm that MATPower uses the inbuilt "\" to solve
>>> the matrix equations and not Tinney or some other form of reordering  and
>>> then LU factorization followed by forward,backward substitutions. From your
>>> response I assume that it is true that MATpower uses "\" right?
>>>
>>> Thank you for your response.
>>>
>>>
>>>
>>> On Sun, Oct 18, 2015 at 6:27 PM, Abhyankar, Shrirang G. <abhy...@anl.gov
>>> > wrote:
>>>
>>>> Hi Shruti,
>>>>   The direct linear solver used by MATLAB depends on the symmetry of
>>>> the Jacobian matrix. For MATPOWER test cases that have symmetric Jacobians
>>>> (due to inactive taps), a Cholesky factorization is used (LL^T = A). For
>>>> cases that lead to non-symmetric Jacobian, MATLAB uses UMFPACK for
>>>> performing the linear solve.
>>>>
>>>> Shri
>>>>
>>>> From: Shruti Rao <sra...@asu.edu>
>>>> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu&g

Question about sparsity-based implementation in MATPower

2015-10-18 Thread Shruti Rao
Greetings MATPower community,

I had a question about the way sparsity-based techniques are used in the
Newton-Raphson solver of the power flow algorithm in MATPower.

I ran the code step-by-step and from my understanding, the way the sparsity
of the Jacobian matrix is exploited is that it is created as a MATLAB
"sparse" matrix wherein only the non-zeros are stored with the respective
matrix positions and then the MATLAB operator "\" is invoked while
calculating dx = -(J \ F); where J is the Jacobian and F is the vector of
mismatches.

MATLAB "\" by default exploits the sparsity of the matrix by using a LU
solver. The kind of solver "\" uses actually depends on the matrix
structure if it is diagonal/tridiagonal/banded and so on (Flowchart
obtained from Mathworks website attached in the email). I assume based on
the typical  structure of the Jacobian that an LU solver is most likely to
be chosen.

Is my understanding correct or am I missing something out? Thank you for
your time and effort.


-- 
Best Regards,
Shruti Dwarkanath Rao

Graduate Research Assistant
School of Electrical, Computer and Energy Engineering
Arizona State University
Tempe, AZ, 85281
650 996 0116


Re: Question about sparsity-based implementation in MATPower

2015-10-18 Thread Shruti Rao
Thank you Dr. Abhyakar,

My main aim was to confirm that MATPower uses the inbuilt "\" to solve the
matrix equations and not Tinney or some other form of reordering  and then
LU factorization followed by forward,backward substitutions. From your
response I assume that it is true that MATpower uses "\" right?

Thank you for your response.



On Sun, Oct 18, 2015 at 6:27 PM, Abhyankar, Shrirang G. <abhy...@anl.gov>
wrote:

> Hi Shruti,
>   The direct linear solver used by MATLAB depends on the symmetry of the
> Jacobian matrix. For MATPOWER test cases that have symmetric Jacobians (due
> to inactive taps), a Cholesky factorization is used (LL^T = A). For cases
> that lead to non-symmetric Jacobian, MATLAB uses UMFPACK for performing the
> linear solve.
>
> Shri
>
> From: Shruti Rao <sra...@asu.edu>
> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
> Date: Sunday, October 18, 2015 at 5:37 PM
> To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
> Subject: Question about sparsity-based implementation in MATPower
>
> Greetings MATPower community,
>
> I had a question about the way sparsity-based techniques are used in the
> Newton-Raphson solver of the power flow algorithm in MATPower.
>
> I ran the code step-by-step and from my understanding, the way the
> sparsity of the Jacobian matrix is exploited is that it is created as a
> MATLAB "sparse" matrix wherein only the non-zeros are stored with the
> respective matrix positions and then the MATLAB operator "\" is invoked
> while calculating dx = -(J \ F); where J is the Jacobian and F is the
> vector of mismatches.
>
> MATLAB "\" by default exploits the sparsity of the matrix by using a LU
> solver. The kind of solver "\" uses actually depends on the matrix
> structure if it is diagonal/tridiagonal/banded and so on (Flowchart
> obtained from Mathworks website attached in the email). I assume based on
> the typical  structure of the Jacobian that an LU solver is most likely to
> be chosen.
>
> Is my understanding correct or am I missing something out? Thank you for
> your time and effort.
>
>
> --
> Best Regards,
> Shruti Dwarkanath Rao
>
> Graduate Research Assistant
> School of Electrical, Computer and Energy Engineering
> Arizona State University
> Tempe, AZ, 85281
> 650 996 0116
>
>


-- 
Best Regards,
Shruti Dwarkanath Rao

Graduate Research Assistant
School of Electrical, Computer and Energy Engineering
Arizona State University
Tempe, AZ, 85281
650 996 0116


Re: Question about sparsity-based implementation in MATPower

2015-10-18 Thread Shruti Rao
Thank you Dr. Abhyankar for the guidance. I appreciate your time and effort.

Shruti

On Sun, Oct 18, 2015 at 10:02 PM, Abhyankar, Shrirang G. <abhy...@anl.gov>
wrote:

> Shruti,
>   MATPOWER does use “\” operator for the linear solves. However note that,
> internally, MATLAB does perform some sort of matrix reordering to reduce
> the fill-ins in the factored matrix. For instance, UMFPACK uses an
> approximate minimum degree reordering scheme by default.
>
> Shri
>
> From: Shruti Rao <sra...@asu.edu>
> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
> Date: Sunday, October 18, 2015 at 8:31 PM
> To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
> Subject: Re: Question about sparsity-based implementation in MATPower
>
> Thank you Dr. Abhyakar,
>
> My main aim was to confirm that MATPower uses the inbuilt "\" to solve the
> matrix equations and not Tinney or some other form of reordering  and then
> LU factorization followed by forward,backward substitutions. From your
> response I assume that it is true that MATpower uses "\" right?
>
> Thank you for your response.
>
>
>
> On Sun, Oct 18, 2015 at 6:27 PM, Abhyankar, Shrirang G. <abhy...@anl.gov>
> wrote:
>
>> Hi Shruti,
>>   The direct linear solver used by MATLAB depends on the symmetry of the
>> Jacobian matrix. For MATPOWER test cases that have symmetric Jacobians (due
>> to inactive taps), a Cholesky factorization is used (LL^T = A). For cases
>> that lead to non-symmetric Jacobian, MATLAB uses UMFPACK for performing the
>> linear solve.
>>
>> Shri
>>
>> From: Shruti Rao <sra...@asu.edu>
>> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
>> Date: Sunday, October 18, 2015 at 5:37 PM
>> To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
>> Subject: Question about sparsity-based implementation in MATPower
>>
>> Greetings MATPower community,
>>
>> I had a question about the way sparsity-based techniques are used in the
>> Newton-Raphson solver of the power flow algorithm in MATPower.
>>
>> I ran the code step-by-step and from my understanding, the way the
>> sparsity of the Jacobian matrix is exploited is that it is created as a
>> MATLAB "sparse" matrix wherein only the non-zeros are stored with the
>> respective matrix positions and then the MATLAB operator "\" is invoked
>> while calculating dx = -(J \ F); where J is the Jacobian and F is the
>> vector of mismatches.
>>
>> MATLAB "\" by default exploits the sparsity of the matrix by using a LU
>> solver. The kind of solver "\" uses actually depends on the matrix
>> structure if it is diagonal/tridiagonal/banded and so on (Flowchart
>> obtained from Mathworks website attached in the email). I assume based on
>> the typical  structure of the Jacobian that an LU solver is most likely to
>> be chosen.
>>
>> Is my understanding correct or am I missing something out? Thank you for
>> your time and effort.
>>
>>
>> --
>> Best Regards,
>> Shruti Dwarkanath Rao
>>
>> Graduate Research Assistant
>> School of Electrical, Computer and Energy Engineering
>> Arizona State University
>> Tempe, AZ, 85281
>> 650 996 0116
>>
>>
>
>
> --
> Best Regards,
> Shruti Dwarkanath Rao
>
> Graduate Research Assistant
> School of Electrical, Computer and Energy Engineering
> Arizona State University
> Tempe, AZ, 85281
> 650 996 0116
>
>


-- 
Best Regards,
Shruti Dwarkanath Rao

Graduate Research Assistant
School of Electrical, Computer and Energy Engineering
Arizona State University
Tempe, AZ, 85281
650 996 0116


Re: questions on mpoption

2015-09-20 Thread Shruti Rao
> Hi,
> By setting it to 1, you will check for generator Var limits and bus-type
switching will take place accordingly with simultaneous conversions. The
option 2 switches only one bus at a time. By default (option 0) generator
Var limits are not checked.
>
> Regards,
> Shruti
>
> On Sep 20, 2015 1:38 AM, "rainy chung"  wrote:
>>
>> hi everyone,
>>
>> when using mpoption to define the power flow running manner, what's the
difference between setting mpopt=mpoption(mpopt,'pf.enforce_q_lims',1) and
without specifying it. Thanks!


Re: questions on mpoption

2015-09-20 Thread Shruti Rao
The VAR limits should remain what you specified in the data file. If
turning the check on did not make any changes to bus-types, then the VAR
limits are not being violated. It is possible that the max VAR limit you
set is too high and the min VAR limit too low. Also, during CPF MATPower
does not check for VAR limits even if you turn this option to 1 or 2.

Hope this helps.

Shruti

On Sun, Sep 20, 2015 at 1:51 AM, rainy chung <chunyu...@gmail.com> wrote:

> I made an experiment, it seemed the VAR limits with and without specifying
> this are the same.
>
> 2015-09-20 16:43 GMT+08:00 Shruti Rao <sra...@asu.edu>:
>
>>
>> > Hi,
>> > By setting it to 1, you will check for generator Var limits and
>> bus-type switching will take place accordingly with simultaneous
>> conversions. The option 2 switches only one bus at a time. By default
>> (option 0) generator Var limits are not checked.
>> >
>> > Regards,
>> > Shruti
>> >
>> > On Sep 20, 2015 1:38 AM, "rainy chung" <chunyu...@gmail.com> wrote:
>> >>
>> >> hi everyone,
>> >>
>> >> when using mpoption to define the power flow running manner, what's
>> the difference between setting mpopt=mpoption(mpopt,'pf.enforce_q_lims',1)
>> and without specifying it. Thanks!
>>
>
>


-- 
Best Regards,
Shruti Dwarkanath Rao

Graduate Research Assistant
School of Electrical, Computer and Energy Engineering
Arizona State University
Tempe, AZ, 85281
650 996 0116


Re: PV curve using CPF

2015-08-09 Thread Shruti Rao
Hi,

I think irrespective of for which bus the P-V curve is plotted, the maximum
lambda represents the voltage collapse point for the entire system.

On Sun, Aug 9, 2015 at 9:23 PM, nilesh patel nk2...@rediffmail.com wrote:


 Sir,
 When we run continuation power flow for particular system, we get p-v
 curve for selected bus. using this p-v curve, we can find Voltage stability
 Margin (in MW) on that bus by difference of operating point to nose point
 lamda.
   I agree lambda at nose point provides maximum loading value but
 that is for that bus only for which p-v curve is plotted.

 My question is How to find Voltage Stability Margin for whole Network
 using P-V curve ? I mean how to find maximum lamda for whole network using
  p-v curve?

 Thanks.

 From: Abhyankar, Shrirang G. abhy...@anl.gov
 Sent: Fri, 07 Aug 2015 22:31:31
 To: MATPOWER discussion forum matpowe...@list.cornell.edu
 Subject: Re: PV curve using CPF
 I donⴠquite understand your question, can you please elaborate.

 The maximum value of loading scaling parameter ᬡmbda⠧ives a measure of how
 much power can be transferred for a given transfer direction. So, lambda is
 also a measure of the nose point for the whole network.

 Shri

 From: nilesh patel nk2...@rediffmail.com
 Reply-To: MATPOWER discussion forum matpowe...@list.cornell.edu
 Date: Friday, August 7, 2015 at 8:46 AM
 To: matpower-l matpowe...@list.cornell.edu, MATPOWER-L 
 MATPOWER-L@cornell.edu
 Subject: PV curve using CPF

 Dear Sir,
 P-V curve solution using continuation power flow gives nose point (maximum
 loading point) for individual bus.

 My question is - How to get nose point for whole network (all buses) using
 PV curve ?  I want to find network voltage stability margin rather than
 individual bus margin using CPF.

 Thanks.


 Nilesh Patel

 Get your own *FREE* website, *FREE* domain  *FREE* mobile app with
 Company email.
 *Know More *
 //www.rediffmail.com/cgi-bin/red.cgi?red=http%3A%2F%2Ftrack%2Erediff%2Ecom%2Fclick%3Furl%3D%5F%5F%5Fhttp%3A%2F%2Fbusinessemail%2Erediff%2Ecom%3Fsc%5Fcid%3Dsign%2D1%2D10%2D13%5F%5F%5F%26amp%3Bcmp%3Dhost%26amp%3Blnk%3Dsign%2D1%2D10%2D13%26amp%3Bnsrv1%3DhostisImage=0BlockImage=0rediffng=0rogue=387537254f7eee557c3b17544bd037e8098bd82e
 https://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?



 https://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?
 Get your own *FREE* website, *FREE* domain  *FREE* mobile app with
 Company email.
 *Know More *
 http://track.rediff.com/click?url=___http://businessemail.rediff.com?sc_cid=sign-1-10-13___cmp=hostlnk=sign-1-10-13nsrv1=host




-- 
Best Regards,
Shruti Dwarkanath Rao

Graduate Research Assistant
School of Electrical, Computer and Energy Engineering
Arizona State University
Tempe, AZ, 85281
650 996 0116


Question regarding scaling the loads and generation in MATPower

2015-04-13 Thread Shruti Rao
Hi all,

I was trying to scale the loads and generation in MATPower using the
following lines:

clc;clear all;
define_constants;
mpcb = loadcase('case118'); % load base case
mpct = mpcb; % set up target case with
mpct.bus(:, VM) = 1;
mpct.bus(:, VA) = 0;
mpct.gen(:, VG) = 1;
mpopt = mpoption('pf.tol', 1e-3,'pf.nr.max_it',
100,'pf.enforce_q_lims',1,'out.all', 1, 'verbose', 3);
mpct.gen(:,PG)=mpct.gen(:,PG)*1.82736;
mpct.gen(:,QG)=mpct.gen(:,QG)*1.82736;
mpct.bus(:, PD) = mpcb.bus(:, PD)*1.82736; % and increased load
mpct.bus(:, QD) = mpcb.bus(:, PD)*1.82736; % and increased load
results = runpf(mpct, mpopt);

The above code said that the power flow did not converge at that scaled
loading level. However, on changing the order of the scaling (with the rest
of the code remaining same) as follows, I got a solution:

mpct.bus(:,PD)=mpcb.bus(:,PD)*1.82736;
mpct.gen(:,PG)=mpcb.gen(:,PG)*1.82736;
mpct.bus(:,QD)=mpcb.bus(:,QD)*1.82736;
mpct.gen(:,QG)=mpcb.gen(:,QG)*1.82736;

 I have attached my published MATLAB code with the results.

Why should the two codes give different results? Is there a reason behind
having to follow a particular order? Which order should we follow?

Thank you!
-- 
Best Regards,
Shruti Dwarkanath Rao

Graduate Research Assistant
School of Electrical, Computer and Energy Engineering
Arizona State University
Tempe, AZ, 85281
650 996 0116


MATPower_Conflicting_solutions.pdf
Description: Adobe PDF document


Re: Question regarding scaling the loads and generation in MATPower

2015-04-13 Thread Shruti Rao
I am extremely sorry about this. Thank you!

On Mon, Apr 13, 2015 at 4:48 PM, Ray Zimmerman r...@cornell.edu wrote:

 I almost started to become superstitious …

 … then I noticed a typo in the last line before the call to runpf().
 Left-hand side has QD, right-hand side has PD.

Ray


 On Apr 13, 2015, at 3:58 PM, Shruti Rao sra...@asu.edu wrote:

 Hi all,

 I was trying to scale the loads and generation in MATPower using the
 following lines:

 clc;clear all;
 define_constants;
 mpcb = loadcase('case118'); % load base case
 mpct = mpcb; % set up target case with
 mpct.bus(:, VM) = 1;
 mpct.bus(:, VA) = 0;
 mpct.gen(:, VG) = 1;
 mpopt = mpoption('pf.tol', 1e-3,'pf.nr.max_it',
 100,'pf.enforce_q_lims',1,'out.all', 1, 'verbose', 3);
 mpct.gen(:,PG)=mpct.gen(:,PG)*1.82736;
 mpct.gen(:,QG)=mpct.gen(:,QG)*1.82736;
 mpct.bus(:, PD) = mpcb.bus(:, PD)*1.82736; % and increased load
 mpct.bus(:, QD) = mpcb.bus(:, PD)*1.82736; % and increased load
 results = runpf(mpct, mpopt);

 The above code said that the power flow did not converge at that scaled
 loading level. However, on changing the order of the scaling (with the rest
 of the code remaining same) as follows, I got a solution:

 mpct.bus(:,PD)=mpcb.bus(:,PD)*1.82736;
 mpct.gen(:,PG)=mpcb.gen(:,PG)*1.82736;
 mpct.bus(:,QD)=mpcb.bus(:,QD)*1.82736;
 mpct.gen(:,QG)=mpcb.gen(:,QG)*1.82736;

  I have attached my published MATLAB code with the results.

 Why should the two codes give different results? Is there a reason behind
 having to follow a particular order? Which order should we follow?

 Thank you!
 --
 Best Regards,
 Shruti Dwarkanath Rao

 Graduate Research Assistant
 School of Electrical, Computer and Energy Engineering
 Arizona State University
 Tempe, AZ, 85281
 650 996 0116
  MATPower_Conflicting_solutions.pdf





-- 
Best Regards,
Shruti Dwarkanath Rao

Graduate Research Assistant
School of Electrical, Computer and Energy Engineering
Arizona State University
Tempe, AZ, 85281
650 996 0116


Re: Is a flat start used to get the initial estimate when solving the power flow problem?

2015-02-19 Thread Shruti Rao
Dr. Zimmerman,

Thank you very much for your response.

Regards,
Shruti

On Thu, Feb 19, 2015 at 8:42 AM, Ray Zimmerman r...@cornell.edu wrote:

 MATPOWER uses the voltage values from the bus and gen matrices to create
 the starting point, so if you want a flat start …

 define_constants;
 mpc = loadcase(your case file);
 mpc.bus(:, VM) = 1;
 mpc.bus(:, VA) = 0;
 mpc.gen(:, VG) = 1;
 results = runpf(mpc);

 — Ray


 On Feb 18, 2015, at 8:37 PM, Shruti Rao sra...@asu.edu wrote:

 Hi all,

 Does MATPower use flat start to get the initial estimate when solving the
 power flow problem (The function runpf).  I tried to find the answer to
 this question in the manual but could not get an answer. If it does not use
 flat start by default, is there a way I can make it use flat start? I was
 not able to find any such option in the user manual that would force
 MATPower to use flat start for getting the initial estimate.

 I appreciate your time and advice.

 Thank you,
 Shruti Rao,
 Arizona State University





-- 
Best Regards,
Shruti Dwarkanath Rao

Graduate Research Assistant
School of Electrical, Computer and Energy Engineering
Arizona State University
Tempe, AZ, 85281
650 996 0116


Re: Query regarding handling VAR limits in the new CPF function added to MATPOWER

2014-11-02 Thread Shruti Rao
Dear sir,

Thank you for your response.

Best Regards,
Shruti

On Sun, Nov 2, 2014 at 9:10 AM, Abhyankar, Shrirang G. abhy...@mcs.anl.gov
wrote:

  Currently, fhere is no support in CPF to enforce generator reactive
 power limits. I've started working on it, but I don't know when it will be
 done and eventually incorporated in MATPOWER.

  Shri

 On Oct 31, 2014, at 6:56 PM, Shruti Rao sra...@asu.edu wrote:

   Hi,

  I wanted to know if the CPF function added to the new version of
 MATPOWER also checks for VARlimits?

  I used the option of 'pf.enforce_q_lims',1 in my mpopt option, however I
 can see from the results that the VAR limits were violated. Is there a way
 to check for VAR limits while doing CPF in MATPOWER?

  Thank you!
 --
 Best Regards,
 Shruti Dwarkanath Rao

  Graduate Research Assistant
 School of Electrical, Computer and Energy Engineering
 Arizona State University
 Tempe, AZ, 85281
 650 996 0116




-- 
Best Regards,
Shruti Dwarkanath Rao

Graduate Research Assistant
School of Electrical, Computer and Energy Engineering
Arizona State University
Tempe, AZ, 85281
650 996 0116