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

Ask Your Question
1

Channels - tool to process outs files

asked Jun 10 '17

jconto gravatar image

updated Mar 16 '4

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.

Comments

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

SC gravatar imageSC (Jul 27 '17)

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 (Aug 18 '17)

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 (Aug 18 '17)

Thanks so much.

MattGood gravatar imageMattGood (Aug 19 '17)

Are numpy and matplotlib a requirement for Channels to work?

Type1_bus gravatar imageType1_bus (Sep 18 '0)

2 answers

Sort by » oldest newest most voted
0

answered Dec 11 '3

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

link

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 (Dec 12 '3)
0

answered Jun 23 '17

AmirN gravatar image

updated Jul 12 '17

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

link

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 (Oct 16 '18)

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

6 followers

Stats

Asked: Jun 10 '17

Seen: 3,089 times

Last updated: Mar 15 '24