Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Get the dynamic response in the workspace

psspy.chsb(2,0,[-1,-1,-1,1,13,0]) #13=Volt psspy.chsb(2,0,[-1,-1,-1,1,7,0]) #12=bus PU freq deviation , 7=speed

psspy.chsb(0,1,[-1,-1,-1,1,16,0]) #16= flow P and Q

psspy.chsb(2,0,[-1,-1,-1,1,2,0]) #2=Machine P psspy.chsb(2,0,[-1,-1,-1,1,3,0]) #3=Machine Q psspy.cong(0) psspy.conl(0,1,1,[0,0],[ 100,0,0,100]) psspy.conl(0,1,2,[0,0],[ 100,0,0,100]) psspy.conl(0,1,3,[0,0],[ 100,0,0,100]) psspy.progressoutput(6,'',[]) # turn off all screen messages psspy.alertoutput(6,'',[]) # turn off all screen messages psspy.promptoutput(6,'',[]) # turn off all screen messages # setup simulation time step = Resolution/N, where N=5 psspy.dynamicssolutionparam2([i,i,i,i,i,i,i,i],[f,f, Resolution/5,f,f,f,f,_f]) psspy.strt(0,OutFile) psspy.run(0,150,1,1,0)

psspy.run(0,2,1,1,0)

psspy.pssehalt2() ch = dyntools.CHNF(OutFile)
short
title, chaniddict, chandatadict = ch.get_data()

Hi everyone, here is last part of my code and I run dynamic simulation for one generator. How can I get the P and Q of the generator( I don't need it in excel). I want to save the data in a matrix. Can anyone help me with this problem? Thank you so much

click to hide/show revision 2
No.2 Revision

Get the dynamic response in the workspace

psspy.chsb(2,0,[-1,-1,-1,1,13,0])    #13=Volt
psspy.chsb(2,0,[-1,-1,-1,1,7,0])      #12=bus PU freq deviation , 7=speed

psspy.chsb(0,1,[-1,-1,-1,1,16,0]) 7=speed #psspy.chsb(0,1,[-1,-1,-1,1,16,0]) #16= flow P and Q

Q psspy.chsb(2,0,[-1,-1,-1,1,2,0]) #2=Machine P psspy.chsb(2,0,[-1,-1,-1,1,3,0]) #3=Machine Q psspy.cong(0) psspy.conl(0,1,1,[0,0],[ 100,0,0,100]) psspy.conl(0,1,2,[0,0],[ 100,0,0,100]) psspy.conl(0,1,3,[0,0],[ 100,0,0,100]) psspy.progressoutput(6,'',[]) psspy.progress_output(6,'',[]) # turn off all screen messages psspy.alertoutput(6,'',[]) psspy.alert_output(6,'',[]) # turn off all screen messages psspy.promptoutput(6,'',[]) psspy.prompt_output(6,'',[]) # turn off all screen messages # setup simulation time step = Resolution/N, where N=5 psspy.dynamicssolutionparam2([i,i,i,i,i,i,i,i],[f,f, Resolution/5,f,f,f,f,_f]) psspy.dynamics_solution_param_2([_i,_i,_i,_i,_i,_i,_i,_i],[_f,_f, Resolution/5,_f,_f,_f,_f,_f]) psspy.strt(0,OutFile) psspy.run(0,150,1,1,0)

psspy.run(0,2,1,1,0)

psspy.pssehalt2() psspy.run(0,150,1,1,0) #psspy.run(0,2,1,1,0) psspy.pssehalt_2() ch = dyntools.CHNF(OutFile)
short
title, chaniddict, chandatadict short_title, chanid_dict, chandata_dict = ch.get_data()

ch.get_data()

Hi everyone, here is last part of my code and I run dynamic simulation for one generator. How can I get the P and Q of the generator( I don't need it in excel). I want to save the data in a matrix. Can anyone help me with this problem? Thank you so much