Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Well I realize the OP does not use python, but I thought I would provide a solution in case he/she wants to learn (or in case anyone else is struggling with this same problem). Driving PSS/e using the python API is really the best way to go. You can control PSS/e during your simulation with ease by writing simple scripts to do what you want. The power of automation via scripts is invaluable when dealing with large sets of data like power systems data. (Same reason Matlab has scripting capability! Matlab would not even be Matlab without it...)

I digress, anyway, since you are adding removing branches and buses, the best way to do this is with the specified API commands -- this is because these commands should update the admittance matrix in PSS/e working memory so that when you export the new admittance matrix it is fully updated and does not have a free floating bus in the case (theoretically 0-rows or 0-columns in the admittance matrix should not exist in a power network.) Some of those API functions can be found in API chapters 1 and 2:

psspy.purgbrn( SomeArguements )    ## Purge a branch from working memory
psspy.extr( SomeArguements )       ## Purge specified buses and all branches connected to them.
psspy.bus_data_3( SomeArguements ) ## Change or add bus data to the working memory.
psspy.load_data_4( SomeArguements ) ## Change or Add Load data.
psspy.branch_data( SomeArguements ) ## modify or add branches.
psspy.branch_chng( SomeArguements ) ## modify exiting branches

Using these functions and others like them should update the admittance matrix properly because you are directly changing the case data that is stored in PSS/e's RAM memory -- setting you up to use the following command to output the admittance matrix to a .OUT file

psspy.output_y_matrix(#someArguements)  ## outputs Y matrix to a .out file.

That output file looks like the following:

 .....
 ToBus,     FromBus,     RealAdmit,      ImagAdmit,  
 ToBus,     FromBus,     RealAdmit,      ImagAdmit,  
 ToBus,     FromBus,     RealAdmit,      ImagAdmit,  
 .....

It would then be feasible to write a quick and dirty python script (or even matlab script if you so choose) to read the text in this file into a Matlab matrix or whatever program you so choose to manipulate it with. ( like Python! ;) )

Hope this is helpful to someone!