First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

Can you tell if a branch is a transformer or non-transformer based on "fromBus", "toBus" info?

asked Aug 25 '14

ypwang gravatar image

updated Aug 25 '14

Hi all,

Now I have a list of interesting branches that contain only the "fromBus", "toBus" and "ckt id" for each branch. I wonder if there is any API can tell is a particular branch is a transformer or not just based the above information.

My intention to do this is to trip each branch in the list using appropriate "data change" function, i.e. non-transformer branch should use "branch_chng" and two winding transformer needs to use "two_winding_chng_4".

So currently I think of a "OKAY" solution that works as follows: 1) first pretend the currently considered branch is a non-transformer and try to trip it (change its status from 1 to 0) using "branch_chng" API and if ierr = 0, then proceed to next step, if ierr =3 (if all input options were good, deal with the exception case, i.e. errors other than 0 and 3), it means it is a transformer branch, then switch to "two_winding_chng_4" API.

Yaping

2 answers

Sort by » oldest newest most voted
4

answered Aug 26 '14

amaity gravatar image

updated Aug 26 '14

Use the subsystem_info function described here. The full listing is available here. This little function saves you the bother of distinguishing lines from transformers. This is how I use it:

branchinfo = subsystem_info('brn', ['FROMNUMBER', 'TONUMBER', 'MVA', 'P'], sid=1)
#print branchinfo
trfinfo = subsystem_info('trn', ['FROMNUMBER', 'TONUMBER', 'MVA', 'P'], sid=1)
#print trfinfo

Hope that helps.

link

Comments

Thanks a lot, those are great functions. So I need to register as GitHub member to see the complete code of function "subsystem_info"? Since I didn't see the options 'brn' and 'trn'.

ypwang gravatar imageypwang (Aug 26 '14)

Not at all. I don't think you need to register to access the public folders in github. Folks correct me if I am wrong. How you can adapt the function for your needs has been explained in the function description. Just plug 'trn' or 'brn' in place of 'bus'. HTH.

amaity gravatar imageamaity (Aug 26 '14)

Sorry I didn't look into your first link, which also called "here" :-) I will check out the first post. Thanks very much!

ypwang gravatar imageypwang (Aug 26 '14)
1

answered Aug 27 '14

rimux gravatar image

updated Aug 27 '14

Nice solution from amaity.

Another possibility - use abrncount, abrnint and other API commands for retrieving all branch data for defined subsystem at once. Just use right option FLAG, e.g. FLAG = 1 for only in-service non-transformer branches and FLAG = 5 for only in-service two-winding transformers.

Also if need to check just one branch if it is line or transformer - just get the base voltages form both sides of a branch (by using psspy.busdat(bus,"BASE")) and compare them - if voltages are different - this is transformer.

link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: Aug 25 '14

Seen: 23,821 times

Last updated: Aug 27 '14