First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

How to change Vref in a REGCA1 model

asked Jun 17 '3

Bosco gravatar image

updated Jun 17 '3

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!

1 answer

Sort by » oldest newest most voted
1

answered Jun 18 '3

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?

link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: Jun 17 '3

Seen: 637 times

Last updated: Jun 18 '23