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

Ask Your Question
0

How to calculate data in PSS/E and export it to Excel?

asked Apr 22 '15

Yasmine gravatar image

Hello, I am using an IEEE 39 bus system for my purpose. I want to calculate some data after disturbance like voltage(PU), the rate of change of frequency, Ymatrix, inertiaconstants, load_present, angles of voltages & admittance ....to export from PSS/E to Excel. Yes I should use Python but I don't Know enough about it, so what the suitable scripts ? And what do you advice me to be greater in PSS/E and Python? Please help me,I'm very confused where to look. Kind Regards

1 answer

Sort by » oldest newest most voted
0

answered Apr 30 '15

tiagosantos gravatar image

updated Apr 30 '15

To extract data from .out files to excel datasheet I use this script in python: (simply copy the code between the lines made of '#' to a .py extension file and run it, you should change the path to pss/e bin path and should run it from the same folder of your .out file, alse change the variable "name" to the name of your .out (in this case the file was "x.out" ))

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

import os,sys

sys.path.insert(0,'C:\Program Files (x86)\PTI\PSSEXplore33\PSSBIN')

os.environ['PATH'] = 'C:\Program Files (x86)\PTI\PSSEXplore33\PSSBIN'+';'+os.environ['PATH']

import excelpy

import dyntools

import time

name='x';

data=str(time.localtime().tmmday)+" do "+str(time.localtime().tmmon);

outfile = dyntools.CHNF(name+'.out')

shorttitle, chaniddict, chandatadict = outfile.getdata()

xlsfile=name+'.xlsx';

xl = excelpy.workbook(xlsfile, mode='w');

outfile.xlsout(sheet=name,overwritesheet=True);

xl.close();

xl.save();

xl.close();

# # # # # # # # # # # # # # # # # # # # # # # # # #

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: Apr 22 '15

Seen: 1,854 times

Last updated: Apr 30 '15