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

Ask Your Question
0

Read variables during dynamic simulation

asked Jun 29 '2

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

2 answers

Sort by » oldest newest most voted
0

answered Aug 4 '2

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

link

Comments

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

perolofl gravatar imageperolofl (Aug 5 '2)

Sorry I misread... :(

alexius gravatar imagealexius (Aug 5 '2)
0

answered Jun 30 '2

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.

link

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 (Jul 14 '2)

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

perolofl gravatar imageperolofl (Jul 15 '2)

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

Stats

Asked: Jun 29 '2

Seen: 712 times

Last updated: Aug 04 '22