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

Ask Your Question
1

How can I export Load and Transformers data from PSS/E

asked Aug 30 '13

Lam Nguyen gravatar image

updated Sep 11 '13

JervisW gravatar image

I use python to export Bus, Branches, Machines from PSS/E; I write code similar to:

istrings = ['number', 'type', 'area', 'zone', 'status']
ierr, idata = psspy.agenbusint(1,1,istrings)

rstrings = ['base', 'pu', 'kv', 'angle', 'pgen', 'qgen', 'mva', 'percent', 'pmax', 'pmin', 'qmax', 'qmin']
ierr, rdata = psspy.agenbusreal(1,1,rstrings)

cstrings = ['name', 'exname']
ierr, cdata = psspy.agenbuschar(1,1,cstrings)

But I don't know how to export Load and Transformers data from PSS/E.

Comments

You can do basically the exact same routine for loads and transformers. Use ALodBusInt, ALodBusChar, etc. for loads and ATrnInt and ATrnChar for transformers.

nyga0082 gravatar imagenyga0082 (Aug 30 '13)

I've already tried to use AlodBusInt and AlodBusReal, they have many argument but most of them in MVA, i want export P (MW) and Q (MVAr). Thanks!

Lam Nguyen gravatar imageLam Nguyen (Aug 31 '13)
1

If you use aLodBusCplx along with the string “MVAACT”, you will get the load outputted in the form “real”-“cplx”j (i.e. 14.13-7.989 j). From there you can just strip the “j”, split the string on the “-“ character, and it will give you your MW and MVAr.

nyga0082 gravatar imagenyga0082 (Sep 3 '13)
1

@nyga0082 The aLodBusCplx function should give you an array of complex values, so you shouldn't have to split anything, just use the .real and .imag prop. ie;err, value = psspy.alodbuscplx(...), to get the real and imaginary values of the first bus you would just use value[0].real and value[0].imag

EBahr gravatar imageEBahr (Sep 5 '13)

1 answer

Sort by » oldest newest most voted
1

answered Aug 30 '13

EBahr gravatar image

updated Aug 30 '13

I suggest looking through the API a little more in Chapter 7 - Single Element Data Retrieval and Chapter 8 - Subsystem Data Retrieval. In there you will find exactly what you are looking for and detailed documentation on how to use each function.

If you are using the subsystem data retrieval, look at chapters 8.6, 8.13, 8.14, and 8.15 for functions to grab load and transformer data. (I am referring to the 32.0.5 API, so it may be different in different releases)

Another option is the caspy python package. For more information on that tool, try:

import caspy
help(caspy)

And take a look at the Saved Case Data Extraction Subroutines for what information is available.

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 30 '13

Seen: 1,602 times

Last updated: Sep 11 '13