Ask Your Question
0

Read variables during dynamic simulation

asked 2022-06-29 13:10:18 -0500

Moji gravatar image

Hi all,

I wonder if we can read value of variables during dynamic simulation? For example, checking line flow during dynamic simulation, and add some conditions based on that. Since we run simulation (psspy.run) up to a stop time, does psse provide this facility to have the variables values as real time output existed during simulation? ( to be clear, I am not talking about output retrieval from channel setup).

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2022-08-04 02:26:16 -0500

alexius gravatar image

Hi, I did it for a wind machine writing in Python code:

Add VAR as channels: Vref of PPC

ierr, ival = psspy.windmind(91003,"""S1""", 'WAUX','VAR') psspy.varchannel([-1,ival] ,"""Vref""") psspy.varchannel([-1,ival+1] ,"""Qref""") psspy.varchannel([-1,ival+7] ,"""Q/V deadband""") psspy.varchannel([-1,ival+5] ,"""Q line flow in MVar""")

Add STATE as channels:

ierr, ival = psspy.windmind(91003,"""S1""", 'WAUX','STATE') psspy.varchannel([-1,ival] ,"""Voltage measurement filter""") psspy.varchannel([-1,ival+2] ,"""PI Q""") psspy.var_channel([-1,ival+3] ,"""Lead lag in reactive power path""")

edit flag offensive delete link more

Comments

Well, Moji wrote that he is not talking about channels...

perolofl gravatar imageperolofl ( 2022-08-05 03:52:08 -0500 )edit

Sorry I misread... :(

alexius gravatar imagealexius ( 2022-08-05 06:02:32 -0500 )edit
0

answered 2022-06-30 02:36:20 -0500

perolofl gravatar image

You can use API to get the actual value at end of simulation (stop time). It is also possible to run the simulation in steps and get the value at each pause.

As I understand you want to retrieve the values for each time step during the simulation, and that is only possible via channels.

edit flag offensive delete link more

Comments

Thanks. Yes I want to read line flow at each time step and compare with rated value to find the overflow line to trip them. I made a loop for psspy.run stopping at each step, now how I can get the line flow at each step? Does ‘brnmsc’ give the value?

Moji gravatar imageMoji ( 2022-07-14 06:27:52 -0500 )edit

It is better to use model TIOCR1 to trip the line automatically at overcurrent.

perolofl gravatar imageperolofl ( 2022-07-15 11:35:08 -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

Stats

Asked: 2022-06-29 13:10:18 -0500

Seen: 624 times

Last updated: Aug 04 '22