Try running the following code. I think it should demonstrate what you are
looking for …
define_constants;
opt = mpoption('OUT_ALL', 0, 'VERBOSE', 0);
mpc = loadcase('case14');
mpc.branch(1, RATE_A) = 150;
r = runopf(mpc, opt);
MVAflow1 = sqrt(r.branch(1,PF)^2+r.branch(1,QF)^2)
saturation = MVAflow1 / r.branch(1, RATE_A)
LMP1 = r.bus(1, LAM_P)
LMP2 = r.bus(2, LAM_P)
LMP2_minus_LMP1 = r.bus(2, LAM_P) - r.bus(1, LAM_P)
mu1 = r.branch(1, MU_SF)
mpc.branch(1, RATE_A) = 125;
r = runopf(mpc, opt);
MVAflow1 = sqrt(r.branch(1,PF)^2+r.branch(1,QF)^2)
saturation = MVAflow1 / r.branch(1, RATE_A)
LMP1 = r.bus(1, LAM_P)
LMP2 = r.bus(2, LAM_P)
LMP2_minus_LMP1 = r.bus(2, LAM_P) - r.bus(1, LAM_P)
mu1 = r.branch(1, MU_SF)
--
Ray Zimmerman
Senior Research Associate
419A Warren Hall, Cornell University, Ithaca, NY 14853
phone: (607) 255-9645
On Apr 6, 2013, at 12:51 PM, Yahook K <[email protected]> wrote:
> Respected Sir,
>
> I changed the RATE_A column for the 14 bus case. But I realised no matter how
> drastic change I made (for example, in one experiment, I changed the RATE_A
> of one branch so that the saturation rate is 1.0088.), the LMP price (lamda
> p) still remains the same. In the 14 bus case, I know there is no congestion
> cost in the LMP price. I expect to add congestion cost by changing RATE_A.
>
> Could you shed light on me on how to achieve that and why the price remains
> the same?
>
> Thank you very much.
>
>
> From: Yahook K <[email protected]>
> To: MATPOWER discussion forum <[email protected]>
> Sent: Friday, April 5, 2013 3:44 PM
> Subject: Re: saturation of the branch
>
> Dear professor,
>
> Thanks for your reply. So in the 14 bus case, if I change 14 bus branch's
> RATE_A to a reasonable value, for example, around its branch injection, to
> create a binding, the saturation percentage will be meaningful in a 14 case.
> Am I right?
>
> Thanks in advance.
>
>
> From: Ray Zimmerman <[email protected]>
> To: MATPOWER discussion forum <[email protected]>
> Sent: Friday, April 5, 2013 3:23 PM
> Subject: Re: saturation of the branch
>
> RATE_A, RATE_B and RATE_C are the parameters that define the long-term,
> short-term and emergency MVA ratings of the lines. MATPOWER uses RATE_A to
> define the line limit for the sake of OPF calculations. Some data files, such
> as the 14-bus case did not include any real line flow limit data and the CDF
> to MATPOWER conversion program used to generate case14.m from the CDF file
> inserted 9900 for lines with no limits. So in such a case talking about
> saturation as a percentage of the (arbitrarily invented) limit is meaningless.
>
> With an OPF solution, unless a line constraint is binding (i.e. the flow is
> equal to the limit) it has no impact on the solution, including the nodal
> prices.
>
> --
> Ray Zimmerman
> Senior Research Associate
> 419A Warren Hall, Cornell University, Ithaca, NY 14853
> phone: (607) 255-9645
>
>
>
>
> On Apr 5, 2013, at 3:05 PM, Yahook K <[email protected]> wrote:
>
>> Dear professor,
>> I am not familiar with the conceptino of Rate_A Rate_B Rate_C . Can you give
>> me a clue where it is explained?
>>
>> When I check the mpc.branch(:,RATE_A) in a 14 bus case, I found its value is
>> all 9900 MVA. In your last email, you said the line limit (RATE_A) on lines
>> that are at 100% of their capacity. Do you mean that this capacity (9900
>> MVA) is so high that there is no congestion cost in the lamda P?
>>
>> Thank you in advance.
>>
>> From: Ray Zimmerman <[email protected]>
>> To: MATPOWER discussion forum <[email protected]>
>> Sent: Thursday, April 4, 2013 10:46 AM
>> Subject: Re: saturation of the branch
>>
>> There are an infinite number of ways to modify the inputs to an OPF to
>> achieve a desired change in the flow of power on a given branch. Each one
>> will result in different set of prices. I'm afraid your problem is not
>> well-defined.
>>
>> Maybe you really want to look at changing the line limit (RATE_A) on lines
>> that are at 100% of their capacity?
>>
>> --
>> Ray Zimmerman
>> Senior Research Associate
>> 419A Warren Hall, Cornell University, Ithaca, NY 14853
>> phone: (607) 255-9645
>>
>>
>>
>>
>> On Apr 3, 2013, at 6:00 PM, Yahook K <[email protected]> wrote:
>>
>>> Respected Sir,
>>>
>>> Thank you very much for your reply.
>>>
>>> My 3rd question is : I want to change the saturation percentage of a
>>> certain branch A (for example, from the original 50% to 120% or 98%)to see
>>> its influence to the LMP price of all the buses. That is, I want to see
>>> the transmission line congestion impacts on the LMP price.
>>>
>>> How to achieve that?
>>>
>>> In my opinion, to achieve that, I want to change the power demand
>>> quantity(PD) of a certain bus B, so that the saturation percentage of
>>> branch A will change to 120% or 98%. Then, I runopf to check the Lamda P
>>> price and compared the Lamda P price with the previous price when the
>>> saturation percentage of branch A is 50%. Am I right?
>>>
>>> Please shed light on me. Thanks.
>>>
>>>
>>> From: Ray Zimmerman <[email protected]>
>>> To: MATPOWER discussion forum <[email protected]>
>>> Sent: Wednesday, April 3, 2013 9:39 AM
>>> Subject: Re: saturation of the branch
>>>
>>> Table B-3 in the User's Manual (or help caseformat) describes the fields of
>>> the branch matrix. RATE_A is the limit used by runopf(). Please note that
>>> for an AC power flow model it is an MVA limit, and for DC power flow it is
>>> a MW limit. So that saturation percentage as you call it would be …
>>>
>>> define_constants;
>>> if <AC power flow>
>>> saturation = sqrt(results.branch(:, PF).^2 + results.branch(:, PT).^2) ./
>>> results.branch(:, RATE_A);
>>> else
>>> saturation = abs(results.branch(:, PF)) ./ results.branch(:, RATE_A);
>>> end
>>>
>>> I'm afraid I don't understand your 3rd question.
>>>
>>> --
>>> Ray Zimmerman
>>> Senior Research Associate
>>> 419A Warren Hall, Cornell University, Ithaca, NY 14853
>>> phone: (607) 255-9645
>>>
>>>
>>>
>>>
>>> On Apr 3, 2013, at 1:18 AM, Yahook K <[email protected]> wrote:
>>>
>>>> Respected Sir,
>>>>
>>>> From mpc.branch, I can get the From bus injection and the To bus injection
>>>> of each branch. But how can I calculate the saturation percentage of the
>>>> branch? For example, the branch has a limit of 15 MW, and there are 5 MW
>>>> flowing in this branch. I think to calculate the saturation percentage we
>>>> do 5/15=1/3
>>>>
>>>> Another question is where to find the limit for each branch?
>>>>
>>>> The third question would be if I wanna set the branch saturation
>>>> percentage to 50%, 90% 120%, break. How can I do it? Can you give me some
>>>> guidance?
>>>>
>>>> Please shed light on me. Thank you.
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
>
>
>
>