0

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])

psspy.cong()

psspy.ordr()

psspy.fact()

psspy.tysl()

case_root = 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!

Bosco's avatar
1
Bosco
asked 2023-06-17 00:36:32 -0500, updated 2023-06-17 00:39:31 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

You have entered variable name REGCA1, which is not defined in the code, instead of string 'REGCA1'.

However, the voltage reference shall be changed with api change_vref!

The voltage setpoint is defined in REECA1 and not in REGCA1!

Do you really want to change the setpoint to 115 pu?

perolofl's avatar
3.8k
perolofl
answered 2023-06-18 03:11:55 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer