Ask Your Question
0

Plotting help

asked 2024-03-04 06:04:10 -0600

VAAJKAPOOR gravatar image

updated 2024-03-04 06:26:08 -0600

Hello I am trying to run the below script in Python.

### Initialize PSSE ###

import os
import sys
sys_path_PSSE=r'C:\Program Files\PTI\PSSE35\35.4\PSSPY39'
sys.path.append(sys_path_PSSE)
os_path_PSSE=r'C:\Program Files\PTI\PSSE35\35.4\PSSBIN'
os.environ['PATH'] += ';' + os_path_PSSE
os.environ['PATH'] += ';' + sys_path_PSSE
import psse3504
import pssplot
import pssarrays
import redirect
import dyntools
import matplotlib.pyplot as plt
import bsntools
import excelpy
import psspy
import redirect
redirect.psse2py()
psspy.psseinit()

### Open .raw file ###

psspy.read(0,'./test.raw')

### Run load flow ###

psspy.fnsl([0,0,0,1,1,0,99,0])

### View Bus Based Report ###

# psspy.report_output(2,'./Bus Based Report.txt',[0])
# psspy.lamp(0,1)

### Save as .sav file ###

psspy.save('./test.sav')

### Convert Load and Generators and Solve for dynamics ###

## Convert generators ##
psspy.cong(0)

## Convert Loads ##

# psspy.conl(-1,1,1)
# psspy.conl(-1,1,2,[0,0],[100,0,0,100])
# psspy.conl(-1,1,3)

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

### Save the converted .sav file ###

psspy.save('./test_conv.sav')

### Open .dyr file ###

psspy.dyre_new([1,1,1,1],'./test.dyr',"","","")

### DOCU ###

# psspy.report_output(2,'./DOCU.txt',[0])
# psspy.docu(0,1,[0,3,1])
# psspy.docu(0,1,[0,4,0])

### Setup Channels ###

## Channel Output Wizard ## 

psspy.chsb(0,1,[-1,-1,-1,1,1,0])
psspy.chsb(0,1,[-1,-1,-1,1,2,0])
psspy.chsb(0,1,[-1,-1,-1,1,3,0])
psspy.chsb(0,1,[-1,-1,-1,1,4,0])
psspy.chsb(0,1,[-1,-1,-1,1,5,0])
psspy.chsb(0,1,[-1,-1,-1,1,6,0])
psspy.chsb(0,1,[-1,-1,-1,1,7,0])
psspy.chsb(0,1,[-1,-1,-1,1,8,0])
psspy.chsb(0,1,[-1,-1,-1,1,9,0])
psspy.chsb(0,1,[-1,-1,-1,1,11,0])
psspy.chsb(0,1,[-1,-1,-1,1,12,0])
psspy.chsb(0,1,[-1,-1,-1,1,13,0])
psspy.chsb(0,1,[-1,-1,-1,1,16,0])
psspy.chsb(0,1,[-1,-1,-1,1,17,0])

## STATE Channels ##

psspy.state_channel([-1,1],'DELTA SPEED_GENCLS')
psspy.state_channel([-1,2],'ANGLE RADIANS_GENCLS')
psspy.state_channel([-1,3],'E-_Q_GENROU')
psspy.state_channel([-1,4],'E-_Q_GENROU')
psspy.state_channel([-1,5],'PHI_K_D_GENROU')
psspy.state_channel([-1,6],'PHI_K_Q_GENROU')
psspy.state_channel([-1,7],'DELTA SPEED PU_GENROU')
psspy.state_channel([-1,8],'ANGLE RADIANS_GENROU')
psspy.state_channel([-1,9],'SENSED VT_AC7B')
psspy.state_channel([-1,10],'INTEGRAL CHANNEL 1_AC7B')
psspy.state_channel([-1,11],'DERIVATIVE CHANNEL 1_AC7B')
psspy.state_channel([-1,12],'INTEGRAL CHANNEL 2_AC7B')
psspy.state_channel([-1,13],'VE_AC7B')
psspy.state_channel([-1,14],'RATE FEEDBACK_AC7B')

## VAR Channels ##

psspy.var_channel([-1,1],'VR_AC7B')
psspy.var_channel([-1,2],'VA_AC7B')

# Set solution time step to 0.001 s
# psspy.dynamics_solution_param_2(realar3=0.001)

## Save .snp file ##

psspy.snap([43,14,8,8,14],'./test.snp')

## Run Simulation ##

psspy.set_chnfil_type(0)     # 1 for OUTX format, 0 for (old) OUT format
psspy.strt_2([0,0],'./test.out')
psspy.run(tpause=50.0)
psspy ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2024-03-04 11:42:59 -0600

perolofl gravatar image

I get the same problem when calling pssplot.channelfileexcelexport() in rev 35.6. It seems to be a bug, contact Siemens PTI.

edit flag offensive delete link more

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

Stats

Asked: 2024-03-04 06:04:10 -0600

Seen: 1,172 times

Last updated: Mar 04