Ask Your Question
2

Create consumer report

asked 2012-06-13 03:55:53 -0500

anonymous user

Anonymous

updated 2012-06-15 05:44:21 -0500

Hi, I work with an offshore distribution system and want to know if someone can point me to a python script that will create a load list? A load list will sort consumers according to the busbar that they are supplied from and show the power consumption of individual loads as well as the total load of the busbar.

The end report would look something like this

Report for Bus A

  • Motor 10 kW
  • Heater 20 kW
  • Tranformer to bus B 10 kW
  • Total for Bus A 40 kW

And then a new sections, or pages for the other buses (switchboards) in the case.

Best regards Bruce

edit retag flag offensive close merge delete

Comments

Sorry, I don't know of a script I can point to that is ready made. But here is how I'd start it off.

JervisW gravatar imageJervisW ( 2012-06-13 14:00:56 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
2

answered 2012-06-13 13:57:10 -0500

JervisW gravatar image

updated 2012-06-15 06:41:24 -0500

Hi Bruce,

You'd like a list of all of the loads grouped by bus number and their P and Q values. Is that close?

I'd use the subsystem data retrieval API to collect information about the loads. The subsystem API gives you all of the loads at once, rather than getting them one at time like with the single element data retrieval API.

Here is what it might look like to grab a list of the bus numbers and ids of all the loads in a case.

ierr, numbers_ids = psspy.aloadint(sid=-1, string=["NUMBER", "ID"])

sid=-1 is just a short-hand for "a subsystem that covers the entire case". The numbers_ids variable will be a list of lists:

[ [2002, 2003, 2004, 2004, 2005, ... ]
  [1, 1, 1, 2, 1, ...] ]

I'd do something similar to get the real and reactive power:

ierr, p_qs = psspy.aloadreal(sid=-1, string=["P", "Q"])

Now join the numbers, ids, P and Q values all together to make a list of four columns:

nums_ids_p_q = numbers_ids + p_qs

Transpose the list of four columns into rows because it is easier to work with:

loads = zip(*nums_ids_p_q)

Each row of the loads variable represents the number, id, P and Q value:

[ (2002, 1, 1.3, 0.8),
  (2003, 1, 1.04, 0.9),
  ... ]

Now your data is in a pretty standard looking format. Kind of like a spreadsheet in Excel. You could write little bits of code to sum up and give you totals per bus and per load.

Let me know how you get on with it. If you get some code working, but need some specific pointers, you can update your question pretty easily.

(edit)

The next step is to sum the total load flowing radially from a terminal station. And there are a couple of ways to do this.

1. Total load flowing from the terminal station. This is probably what you are looking for if you are sizing the bus at the terminal station.

2. Total load existing radially from the terminal station, excluding any losses. I'd sometimes use this method as a sanity check to see if my model is correct.

I'll take you through how to do number 1. It is far easier to calculate and answers your question (Let me know if it doesn't).

explanation of terms In our mock system, bus 2100 is the terminal station bus. Buses 2110, 2120 and 2130 are radial from the terminal station. Whereas buses 2240 and 2250 are not radial.

the method

  • List of all the P and Q branch flows in the case.

  • Select the P and Q branch flows from our target terminal (some radial, some will be back into the main system)

  • Identify which branches are radial

  • Sum those radial PQ values.

list all PQ flows in the case

ierr, from_to = psspy.aflowint(sid=-1, string=["FROMNUMBER", "TONUMBER"])
ierr, p_q = psspy.aflowreal(sid=-1, string=["P", "Q"])
from_to_p_q = from_to + p_q
branches = zip(*from_to_p_q)

branches from our ... (more)

edit flag offensive delete link more

Comments

1

I updated my question with an example report. Really appreciate the effort here!

Bruce gravatar imageBruce ( 2012-06-15 05:45:40 -0500 )edit

Cool, still going on it. Doing it in batches in case some of the edits don't come though

JervisW gravatar imageJervisW ( 2012-06-15 06:05:13 -0500 )edit

How did you go with it Bruce?

JervisW gravatar imageJervisW ( 2012-06-19 02:14:23 -0500 )edit

Thanks a lot for this. I don't have a model up in PSSE yet, but once I do I will try this out. Since the system is not 100 % radial I will need to check for direction of flow of power from the terminal to determine what are feeders and what are incomers. I like the check for island you did though.

Bruce gravatar imageBruce ( 2012-06-19 02:27:26 -0500 )edit

Checking the flow of power direction is a good solution.

JervisW gravatar imageJervisW ( 2012-06-19 04:59:19 -0500 )edit
2

answered 2012-06-14 03:29:51 -0500

Bruce gravatar image

Thanks for the reply. Yes, P and Q for each consumer is a good start. Is there an API to determine from which bus a load is powered from?

edit flag offensive delete link more

Comments

Can you expand on this further? Do you mean finding which transmission terminal station is supplying the load if it is radial?

JervisW gravatar imageJervisW ( 2012-06-14 05:50:16 -0500 )edit

Yes that's exactly right. Such a system is more radial and the purpose of the report to check that each bus (or switchboard) is correctly dimensioned, as well as to check the total load in order to size generators.

Bruce gravatar imageBruce ( 2012-06-14 14:38:42 -0500 )edit

I'll update my answer below

JervisW gravatar imageJervisW ( 2012-06-15 03:19:22 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Stats

Asked: 2012-06-13 03:55:53 -0500

Seen: 1,340 times

Last updated: Jun 19 '12