Ask Your Question
0

How to output in a readable format the monitoring in PSS/E

asked 2019-05-04 12:49:20 -0500

toderesa97 gravatar image

I have this script:

CASE = r'''C:\\Program Files (x86)\\PTI\\PSSE34\\EXAMPLE\\savnw.sav'''
psspy.case(CASE)

# Convert loads (3 step process):
psspy.conl(-1,1,1)
psspy.conl(-1,1,2,[0,0],[100,0,0,100])
psspy.conl(-1,1,3)

# Convert generators:
psspy.cong()

# Solve for dynamics
psspy.ordr()
psspy.fact()
psspy.tysl()

# Add dynamics data
psspy.dyre_new(dyrefile="C:\\Program Files (x86)\\PTI\\PSSE34\\EXAMPLE\\savnw.dyr")

# Add channels by subsystem
#   BUS VOLTAGE
psspy.chsb(sid=0,all=1, status=[-1,-1,-1,1,13,0])

# Initialize
psspy.strt(outfile="test.out")   <----------------------------------------------
simtime = 1
#psspy.run(tpause=simtime)
psspy.run(0,simtime,99,19,0)

but turns out that the test.out file is in binary and hence, cannot be interpreted directly but just for PSS/E. I was wondering whether there is a way to output such content in a readable format, such as .csv, .xlxs,... to treat it. If not, could you come up with an idea to deal with this situation?

Thanks for your time.

Tomás.

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2019-05-07 14:38:11 -0500

jconto gravatar image

Check the python code "dyntools_demo.py" located in the "example" folder, to extract (all or selected) channels in an *.out file. To get a description of the functions available in "dyntools.pyc", run the following code:

#display help in module dyntools.pyc
import psse33
import dyntools
help(dyntools)
edit flag offensive delete link more
0

answered 2019-05-06 04:11:08 -0500

perolofl gravatar image

You can export to Excel in the GUI:

  1. Open .out file
  2. Right click the file in Plot Tree View and select "Export to Excel"
  3. All channels are now written to a .xlsx file.

Unfortunately, there is no API to perform the action from python.

edit flag offensive delete link more

Comments

Thank you for replying. Unfortunately, that's not a valid solution for me. Do you know if there is a way to ask for the monitoring data through the python API?

toderesa97 gravatar imagetoderesa97 ( 2019-05-06 10:24:46 -0500 )edit

You can open the .out file with dyntools and write the channel values to .csv or an excel file using for example excelpy.

perolofl gravatar imageperolofl ( 2019-05-06 14:10:51 -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

1 follower

Stats

Asked: 2019-05-04 12:49:20 -0500

Seen: 567 times

Last updated: May 07 '19