I’m not sure I understand what you want to do. You could certainly create a new
function with the appropriate inputs and outputs, that wraps the code below and
use it to compute ATC.
Ray
> On Apr 6, 2015, at 1:06 AM, Aruna Dharmala <[email protected]>
> wrote:
>
> Respected sir,
> how to add the given below program to existing inbuilt
> opf code in matpower software.....?
> % get indices of generators
> ga = find(ismember(mpc.gen(:, GEN_BUS), mpc.bus(a, BUS_I))); % area A gens
> gb = find(ismember(mpc.gen(:, GEN_BUS), mpc.bus(b, BUS_I))); % area B gens
> gother = find(~ismember((1:ng)', [ga; gb])); % remaining gens
>
> % fix dispatches of all gens outside areas A and B
> mpc.gen(gother, PMIN) = mpc.gen(gother, PG);
> mpc.gen(gother, PMAX) = mpc.gen(gother, PG);
>
> % scale down prices in area A by factor of 10
> % scale up prices in area B by factor of 10
> % (important thing is to make everything in A cheaper than
> % everything in B to maximize transfer from A to B)
> mpc.gencost(ga, :) = modcost(mpc.gencost(ga, :), 0.1);
> mpc.gencost(gb, :) = modcost(mpc.gencost(gb, :), 10);
>
> % re-run the OPF and compute ATC as total decrease in area B dispatch
> r = runopf(mpc);
> ATC = sum(mpc.gen(gb, PG)) - sum(r.gen(gb, PG));
>
>
> On Thu, Apr 2, 2015 at 1:52 PM, Ray Zimmerman <[email protected]
> <mailto:[email protected]>> wrote:
> I’ll assume you have a base case power flow (or OPF) solution in a MATPOWER
> case struct mpc and want to find the maximum additional power that can be
> transferred from area A to area B without violating constraints, where the
> areas are defined via two vectors of bus indices (a and b), possibly by using
> a = find(mpc.bus(:, BUS_AREA) == A), etc. Then you’ll just modify the case,
> something like this …
>
> % get indices of generators
> ga = find(ismember(mpc.gen(:, GEN_BUS), mpc.bus(a, BUS_I))); % area A gens
> gb = find(ismember(mpc.gen(:, GEN_BUS), mpc.bus(b, BUS_I))); % area B gens
> gother = find(~ismember((1:ng)', [ga; gb])); % remaining gens
>
> % fix dispatches of all gens outside areas A and B
> mpc.gen(gother, PMIN) = mpc.gen(gother, PG);
> mpc.gen(gother, PMAX) = mpc.gen(gother, PG);
>
> % scale down prices in area A by factor of 10
> % scale up prices in area B by factor of 10
> % (important thing is to make everything in A cheaper than
> % everything in B to maximize transfer from A to B)
> mpc.gencost(ga, :) = modcost(mpc.gencost(ga, :), 0.1);
> mpc.gencost(gb, :) = modcost(mpc.gencost(gb, :), 10);
>
> % re-run the OPF and compute ATC as total decrease in area B dispatch
> r = runopf(mpc);
> ATC = sum(mpc.gen(gb, PG)) - sum(r.gen(gb, PG));
>
> Hope this helps,
>
> Ray
>
>
>> On Apr 2, 2015, at 12:10 AM, Aruna Dharmala <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> Respected sir,
>> I am doing ATC computation by optimal power flow
>> method..
>> By using matpower software i run the load flow
>> solution by optimal power flow.by <http://flow.by/> doing load flow i am not
>> geting how to take a group of buses as an area and how to interface between
>> areas for available transfer capability calculation..?
>>
>> On Wed, Apr 1, 2015 at 6:34 PM, Ray Zimmerman <[email protected]
>> <mailto:[email protected]>> wrote:
>> Another possible approach is to use an OPF and shift the prices down for the
>> sending group of generators and up for the receiving group.
>>
>> Ray
>>
>>
>>> On Apr 1, 2015, at 8:02 AM, Abhyankar, Shrirang G. <[email protected]
>>> <mailto:[email protected]>> wrote:
>>>
>>> Although Matpower does not have a function for ATC, it has all the required
>>> building blocks for doing the calculations You can take a look at the
>>> continuation power flow feature in the MatPower manual as a starting point.
>>>
>>> Shri
>>>
>>> On Apr 1, 2015, at 5:07 AM, "Aruna Dharmala" <[email protected]
>>> <mailto:[email protected]>> wrote:
>>>
>>>> Respected sir,
>>>> can we do available transfer capability calculation
>>>> using matpower it is possible..?
>>>> if it possible in this software how the
>>>> interfacing between two areas of available transfer capability takes place
>>>> for group of buses
>>
>>
>
>