Ask Your Question
0

How to change Vref in a REGCA1 model

asked 2023-06-17 00:36:32 -0600

Bosco gravatar image

updated 2023-06-17 00:39:31 -0600

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!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2023-06-18 03:11:55 -0600

perolofl gravatar image

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?

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

1 follower

Stats

Asked: 2023-06-17 00:36:32 -0600

Seen: 600 times

Last updated: Jun 18 '23