Ask Your Question
0

Input data from Excel to PSSE

asked 2017-11-19 12:03:16 -0500

psse_user_88 gravatar image

Hello,

I want to create a snapshot of the power system from metering data, so basically I have all load, generation, in excel file and import it in pss/e to create the case. How can i do this using python? I mean a simple way to import all my loads/generation(MW/Mvar) to the correct locations in the columns of my case in PSS/E.

I can do it with copy paste, but i am asking for a automated way to do this.

Thank you in advance.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2017-12-22 01:34:08 -0500

SqFKYo gravatar image

If you want to do this with just python, you probably want to first read your Excel file with pandas (https://pandas.pydata.org/). When you have all the data read in, you need to use individual data changing commands (psspy.busdata3, branchdata3, etc.) to input it to your case.

edit flag offensive delete link more

Comments

I have same problem, I want to use pandas read excel file to existing psse network data. For example: I have excel file which has bus data, I want to import to the psse "savnw.sav" file, please give me some example code.

YI-WEI gravatar imageYI-WEI ( 2018-01-30 10:49:49 -0500 )edit
0

answered 2017-12-18 14:44:00 -0500

psse_user_88 gravatar image

Hi JConto,

I am not able to perform the actions you suggest, maybe you have some example or the script in IDV, because i tried running your example, but I can't get it how to enter the data in RDCH format, normally they should be imported from excel?

I have to say I am quite new in scripting and python ect, just used PSSE v.33 from its interface.

Thank you for your support

edit flag offensive delete link more

Comments

See my updated answer below.

jconto gravatar imagejconto ( 2017-12-19 13:38:44 -0500 )edit

Thank you JConto, I was able to run the idv file. My question now is how do I make the rdchtest.idv read from excel the columns of P and Q for the Load?

psse_user_88 gravatar imagepsse_user_88 ( 2017-12-20 03:33:39 -0500 )edit
0

answered 2017-11-19 18:14:41 -0500

jconto gravatar image

updated 2017-12-19 13:57:36 -0500

Consider the following (in PSSe v.33): - Create an text file with the load and gen data, in RDCH format. Adjust the columns in the source file (excel?) to match the RDCH columns sequence. Say it is saved as rdchtest.idv

RDCH template

@! RDCHtest.idv - PSSe v.33
rdch
@! enter 1= to change, 0= to replace
1
@!BEGIN BUS DATA
0 / END OF BUS DATA, BEGIN LOAD DATA
<enter load data in this section>

0 / END OF LOAD DATA, BEGIN FIXED SHUNT DATA
0 / END OF FIXED SHUNT DATA, BEGIN GENERATOR DATA
<enter generator data in this section>

0 / END OF GENERATOR DATA, BEGIN BRANCH DATA
0 / END OF BRANCH DATA, BEGIN TRANSFORMER DATA
0 / END OF TRANSFORMER DATA, BEGIN AREA DATA
0 / END OF AREA DATA, BEGIN TWO-TERMINAL DC DATA
0 / END OF TWO-TERMINAL DC DATA, BEGIN VSC DC LINE DATA
0 / END OF VSC DC LINE DATA, BEGIN IMPEDANCE CORRECTION DATA
0 / END OF IMPEDANCE CORRECTION DATA, BEGIN MULTI-TERMINAL DC DATA
0 / END OF MULTI-TERMINAL DC DATA, BEGIN MULTI-SECTION LINE DATA
0 / END OF MULTI-SECTION LINE DATA, BEGIN ZONE DATA
0 / END OF ZONE DATA, BEGIN INTER-AREA TRANSFER DATA
0 / END OF INTER-AREA TRANSFER DATA, BEGIN OWNER DATA
0 / END OF OWNER DATA, BEGIN FACTS DEVICE DATA
0 / END OF FACTS DEVICE DATA, BEGIN SWITCHED SHUNT DATA
0 / END OF SWITCHED SHUNT DATA, BEGIN GNE DATA
0 / END OF GNE DATA
Q

RCDHtest.idv example, to change bus 101 name and Pl & Ql of load at bus 153, id '1' in case savnw.sav, located in the "example" folder of the PSSe installation directory:

MENU,OFF
RDCH
1
   101,'NUCLEAR-A'
0 / END OF BUS DATA, BEGIN LOAD DATA
   153,'1 ',,,,   220.0,   110.0
0 / END OF LOAD DATA, BEGIN FIXED SHUNT DATA
Q
  • Create a text file as a python script with the command to run an idv. Saved it as rdchrun.py:

    psspy.runrspnsfile('rdchtest.idv')

  • Now, in PSSe load the case savnw.sav and run such py code. Changes should have made to the loaded case.

edit flag offensive delete link more

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

1 follower

Stats

Asked: 2017-11-19 12:03:16 -0500

Seen: 2,946 times

Last updated: Dec 22 '17