Same data repeat in dynamic simulation
I am aiming to observe the dynamic simulation result of changing the VAR of the BESS model, so I want to use a loop in python whenever the VAR value changed, let the dynamic simulation run to the same time step, but the problem occur when the simulation pause at 1 sec by using :
psspy.run(0,1,1,1,1)
Then continue run to 3 second by :
psspy.run(0,3,1,1,1)
(I have commented the "psspy.changewnmodvar" in my script, but it still happened, so I'll assume the problem is relate to "psspy.run")
According to the API document, the second parameter is the tpause(value of simulated time at which the simulation should next pause), in my case, the result data in outfile(1.output bar and 2.right click the figure>show editor>Data ) will be t=0~1(s) the continue to 1~3(s), the data at 1 sec will repeat, if the pause time is 1 、1.5、2(s), the data will repeat at all of this three points.
Compare with the dynamic simulation I have done before, the normal output file is suppose to have t=0~1(s) then continue to 3(s) the result at 1 (s) will not repeat.
(The code editor is vscode and the python version is 2.7, psse is V34, the delta time for dynamic simulation is 0.001(s) setting by "psspy.dynamicssolutionparam_2")
Any suggestion will be much appreciate! Thanks!
Edit:
I think the flat run means not considering the disturbance in the dynamic simulation, but I am going to change the VAR value in the model, is it still belongs to the "flat run"?
In the simulation, I want to use a loop to first change the var value in the model then run the dynamic simulation to certain time step, then change var of the model to another value, then run the dynamic simulation again, the code I except is as follow:
for i in range(1,3):
psspy.change_wnmod_var(rnbus,r"""1""",r"""REECCU1""",6, x[i])
psspy.run(1, t[i],1,1,1)
psspy.change_wnmod_var(rnbus,r"""1""",r"""REECCU1""",6, x[i+1])
psspy.run(1, t[i+1],1,1,1)
But right now, even I use only the following code will have the same problem:
for i in range(1,3):
psspy.run(1, t[i],1,1,1)
psspy.run(1, t[i+1],1,1,1)
t[0]=0.00244140625, t[1]=0.0048828125, t[2]=0.00732421875, delta time is 0.001
The output table is:(# is the Text number, X is time, Y value is not here because the value can be correspond active power or anything measured)
# X
0 0
1 0.001
2 0.002
3 0.003
4 0.003
5 0.004
6 0.005
7 0.005
8 0.006
9 0.007
10 0.008
When the simulation ...
The problem is not clear. Please elaborate further. Print statement is wrong; the right-paranthesis should be at the end.
Sorry for the unclear explanation, I have update the problem, thanks for your time!
Do you mean that the channel values are constant, i.e. a flat run?
Can you show the change_wnmod_var statement. What are you changing?