Ask Your Question
0

I want to change the active power of a certain generator, namely changing the variable "PGEN" in sav file, how can I achieve that through psspy?

asked 2021-05-20 08:08:55 -0500

snapshot gravatar image

Actually I want to conduct multiple-run dynamic simulation within PSSE, and during every single run the PGEN needs to be changed, so I want to know is there any corresponding functions of psspy ?

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
1

answered 2021-05-21 01:05:18 -0500

maryam gravatar image

updated 2021-05-21 01:05:53 -0500

The general way is the way which @perolofl said, you can also record the changes in the .dyr and all the changes in your simulation. In especial case: for example, if you want to change the active and reactive power of the generator at bus 10 to 30 and 50, you can use the following code

psspy.machine_chng_2(10,r"""1""",[_i,_i,_i,_i,_i,_i],[_f, 50.0,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) #change the Q to 50 psspy.machine_chng_2(10,r"""1""",[_i,_i,_i,_i,_i,_i],[ 30.0,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) #change the P to 30 Based on the above codes, each of the _i, and -f are as follows:

Bus Number, Bus Name, Id, Term Node Num , Term Node Name, Area Num , Area Name, Zone Num ,Zone Name, Code VSched (up), Remote Bus Number, In Service PGen (MW), PMax (MW), PMin (MW), QGen (Mvar), QMax (Mvar), QMin (Mvar), Mbase (MVA), R Source (up), X Source (up), RTran (pu)

edit flag offensive delete link more

Comments

Thank you so much!!!

snapshot gravatar imagesnapshot ( 2021-05-25 21:28:50 -0500 )edit
0

answered 2021-05-20 10:07:25 -0500

perolofl gravatar image

The best way to find the API for data changing in PSSE is to do the following.

  1. Start recording of a python script.

  2. Apply the change manually via PSSE GUI.

  3. Stop recording.

  4. Open the created python script in a text editor and check the content. You will then see the API with its arguments.

edit flag offensive delete link more

Comments

Thank you so much!!! it did help a lot

snapshot gravatar imagesnapshot ( 2021-05-25 21:29:13 -0500 )edit

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: 2021-05-20 08:08:55 -0500

Seen: 846 times

Last updated: May 21 '21