Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to change Vref in a REGCA1 model

Hello,

I have successfully built a script in Python that executes a bump test on a steady-state model and am now building code to run dynamic simulations. Specifically, I would like to adjust the Vref parameter in a REGCA1 model that is attached to one of my IBR generators. Here is what I have written so far:

''' psspy.case(CASE) psspy.fdns([0,0,0,1,1,0,99,0]) # apply fixed-slop Newton-Raphson powerflow

psspy.cong()

psspy.ordr() psspy.fact() psspy.tysl()

caseroot = os.path.splitext(CASE) [0] psspy.save(caseroot + "_C.sav")

psspy.dyre_new([1, 1, 1, 1],DYR, '', '', '')

psspy.branchmvachannel([-1,-1,-1,200,100],'1') psspy.branchpandqchannel([-1,-1,-1,200,100],'1')

psspy.strt(0, OUTFILE) psspy.run(tpause=10)

psspy.changeplmodvar(1000,1,REGCA1,1,115) psspy.run(tpause=20) ''' However, when I run this I receive the following error:

"NameError: name 'REGCA1' is not defined"

If I open PSS/E I can see that the model is, in fact, there. Perhaps I am doing something wrong on the initialization? Any help would be appreciated.

I should also note that I do have the code for the DMView; however, I do not have the code that changes the V and F (only other examples such as SCMVA and SCR2, etc.).

Thank you much!

How to change Vref in a REGCA1 model

Hello,

I have successfully built a script in Python that executes a bump test on a steady-state model and am now building code to run dynamic simulations. Specifically, I would like to adjust the Vref parameter in a REGCA1 model that is attached to one of my IBR generators. Here is what I have written so far:

''' psspy.case(CASE)

psspy.case(CASE)

psspy.fdns([0,0,0,1,1,0,99,0]) # apply fixed-slop Newton-Raphson powerflow

psspy.cong()

psspy.ordr() psspy.fact()

psspy.ordr()

psspy.fact()

psspy.tysl()

caseroot

case_root = os.path.splitext(CASE) [0] [0]

psspy.save(caseroot + "_C.sav")

"C.sav")

psspy.dyre_new([1, 1, 1, 1],DYR, '', '', '')

psspy.branchmvachannel([-1,-1,-1,200,100],'1') channel([-1,-1,-1,200,100],'1')

psspy.branchpandqchannel([-1,-1,-1,200,100],'1')

psspy.strt(0, OUTFILE) OUTFILE)

psspy.run(tpause=10)

psspy.changeplmodvar(1000,1,REGCA1,1,115) psspy.run(tpause=20) ''' var(1000,1,REGCA1,1,115)

psspy.run(tpause=20)

However, when I run this I receive the following error:

"NameError: name 'REGCA1' is not defined"

If I open PSS/E I can see that the model is, in fact, there. Perhaps I am doing something wrong on the initialization? Any help would be appreciated.

I should also note that I do have the code for the DMView; however, I do not have the code that changes the V and F (only other examples such as SCMVA and SCR2, etc.).

Thank you much!