Ask Your Question
1

Channels - tool to process outs files

asked 2017-06-10 10:12:42 -0500

jconto gravatar image

updated 2024-03-15 22:03:41 -0500

Channels is a python code that uses dyntools to process out files from a PSSe dynamic simulation. It runs in PSSe v33, v34 & v35. The tool allows to export any type of channels the user select to an excel file; request information about channels names & numbers; plot selected channels, plotting same channels from multiple outs files (=compare channels performance); and rank channel performance based on user criteria with option to plot (which voltage channels goes below a certain threshold...).

You can download the channels tool with a demo set from [copy the link into your browser if it does not connect when clicking on it]:JConto_google drive

Once you select “channelsxxxxx.zip”, an icon on the top-center screen will perform the download.

Once downloaded & unzipped, rename *.tab to *.bat, open a DOS window on the channels' folder and run the following [it will export volt channels to a excel file]: c:..>channels chan_V_exp

Follow the instruction in the read.me file to run the other demos included.

edit retag flag offensive close merge delete

Comments

Jconto, excellent example and effort! Thanks. I have also done some data mining using the channels out module.

SC gravatar imageSC ( 2017-07-27 13:52:26 -0500 )edit

jconto. Excellent utility! Where can I find the PDF file you refer to "CHANNELS_tool_PSEE_UGM_2017_v2.pdf"? Thank you. Matt

MattGood gravatar imageMattGood ( 2017-08-18 16:28:37 -0500 )edit

I added to the channels's zip file, and I did re-posted it. Also I put a copy on the folder "Papers & Presentations" within my google_drive folder.

jconto gravatar imagejconto ( 2017-08-18 17:45:31 -0500 )edit

Thanks so much.

MattGood gravatar imageMattGood ( 2017-08-18 23:54:59 -0500 )edit

Are numpy and matplotlib a requirement for Channels to work?

Type1_bus gravatar imageType1_bus ( 2020-09-17 23:21:35 -0500 )edit

2 answers

Sort by » oldest newest most voted
0

answered 2017-06-23 07:19:40 -0500

AmirN gravatar image

updated 2017-07-12 06:35:17 -0500

Copying of all channels into matlab workspace (as possibility for matlab users)

Download matlab function and example of using:

https://drive.google.com/drive/folder...

function [numberchannels,nameschannels,tomatlab]=pssout2matlab(inputfile)

nameschannels=[];

channelsdata=[];

numberchannels=[];

tekst=[];

if nargin==0

[filename]=uigetfile('*.out','PSSE .out files'); % select file from disk (without inputfile in function call)

fid=fopen(filename);

else

fid=fopen(inputfile');

end

setstr(fread(fid,4,'char')');

setstr(fread(fid,4,'char')');

setstr(fread(fid,4,'char')');

numberchannels=fread(fid,1,'float32');

fread(fid,1,'float32');

nameschannels=setstr(fread(fid,[32, numberchannels] ,'char'))';

nameschannels=strvcat(strcat('Time',blanks(28)),nameschannels);

tekst=setstr(fread(fid,[60, 2] ,'char'))';

channelsdata=fread(fid,Inf,'float32');

kolona=(size(channelsdata,1)-2)/(numberchannels+2);

rezultat=reshape(channelsdata(1:kolona*(numberchannels+2)),numberchannels+2,kolona)';

tomatlab=rezultat(:,2:size(rezultat,2));

fclose(fid);

numberchannels=numberchannels+1;

nameschannels=strcat(num2str([1:numberchannels]','%06.f'),'-',nameschannels);

end

edit flag offensive delete link more

Comments

@AmirN when use pssout2matlab for psse33.10 and psse34 (.out) there is the error: rezultat=reshape(channelsdata(1:kolona*(numberchannels+2)),numberchannels+2,kolona)'; how can I do ? Thank you.

Gloria.Z gravatar imageGloria.Z ( 2018-10-16 04:05:23 -0500 )edit
0

answered 2023-12-11 12:12:51 -0500

Thank you for your wonderful tool jconto! After adding the necessary libraries, all of the example functions in "testall.bat" were able to run except the damping ratio example "chanPe_dmp.ini". I found that the reason for this was the version of the Pandas library. I had installed Pandas using "pip install pandas", which installed the most recent version (v2.1.4). However, the Channels tool relies on the pandas "append" attribute which is depreciated in Pandas 2.x, which uses the attribute "concat" instead of "append" (https://stackoverflow.com/questions/7...). I uninstalled Pandas, then reinstalled using "pip install pandas==1.5.3" and then the damping ratio example worked. Posting here so that others can resolve the issue more quickly than I did.

Thanks again for sharing your hard work!

Jeff Eggebraaten

edit flag offensive delete link more

Comments

1

Jeff, thanks for sharing your experience with Channels. I will look into the pandas version issue and update the tools as needed.

jconto gravatar imagejconto ( 2023-12-11 18:09:10 -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

6 followers

Stats

Asked: 2017-06-10 10:12:42 -0500

Seen: 2,953 times

Last updated: Mar 15