MATPOWER does not include any code to do that automatically, but it’s trivial 
to write. Suppose k is the vector of indices of buses to eliminate. The 
following code should eliminate the buses and the branches.

bn = mpc.bus(k, BUS_I);
i = find(mpc.branch(:, F_BUS) == bn);
j = find(mpc.branch(:, T_BUS) == bn);
mpc.branch(k, BUS_TYPE) = NONE;
mpc.branch([i; j], BR_STATUS) = 0;

Btw, you may need to eliminate generators too.

g = find(mpc.gen(:, GEN_BUS) == bn);
mpc.gen(g, GEN_STATUS) = 0;

Best regards,

    Ray



On Dec 6, 2021, at 11:56 AM, prem panigrahi 
<prempanigr...@outlook.com<mailto:prempanigr...@outlook.com>> wrote:

Dear Ray sir
    Yes you are right. I am facing problem during automate the process. 
Actually I need to remove approx.. 400 buses, and each time after removal I 
need to calculate total active power of biggest Island network. Each times 
identifying the transmission lines connected to a bus and mention them to 
remove a bus is quite tidious job. If is thier any process in matpower to 
directly remove a bus along with its branches then it can help me atleast.

On 6 Dec 2021 21:07, Ray Daniel Zimmerman 
<r...@cornell.edu<mailto:r...@cornell.edu>> wrote:
You’ve got the right idea. You can simply set the branch status to 0 and then 
use find_islands() and to find the isolated buses and set their BUS_TYPE  to 
NONE (4). You may then be left with multiple islands, also found via 
find_islands() or extract_islands(). To solve a power flow, each island needs 
its own reference bus (which may have been eliminated even for the main 
system). The load / generation mismatch could also be potential very large in 
some islands, and that would show up in the slack generation (negative, or 
unreasonably large positive).

So I think the main challenge in automating everything is in selecting a new 
reference bus for islands without one. I’d probably go with the first PV bus, 
and if there are no PV buses, then that whole island blacks out and you can set 
all its buses to type NONE.

Hope this helps,

   Ray



On Dec 4, 2021, at 12:58 PM, prem panigrahi 
<prempanigr...@outlook.com<mailto:prempanigr...@outlook.com>> wrote:

Dear Ray sir, is their any direct process to remove bus along with their 
branches . I am using mpc.branch method to remove a bus with its branches. But 
I am facing difficulties when I have to remove more than 100 buses.
mpc.branch([6161;7479;7480;7488;7489;7490], BR_STATUS) = 0;
results=rundcpf(mpc,opt)
[groups, isolated] = find_islands(mpc)
mpc_list = extract_islands(mpc)
[GROUPS, ISOLATED] = case_info(mpc)
mpc.bus([ISOLATED],BUS_TYPE)=4
results=rundcpf(mpc,opt)

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows




Reply via email to