CURENT / andes

Python toolbox / library for power system transient dynamics simulation with symbolic modeling and numerical analysis 🔥
https://ltb.curent.org
Other
241 stars 113 forks source link

Problems in the simulation of generator frequency #443

Closed Cmt111 closed 1 year ago

Cmt111 commented 1 year ago

I encountered problems in the simulation of generator frequency. I used the file ” ss = andes.load(andes.get_case("ieee14/ieee14_full.xlsx"), setup=False, default_config=True)”. I increased the active power of the GENROU3 by 0.2p.u. at 7s. It can be seen from the figure that the frequency of the GENROU3 increased. I am expecting to see that the frequency of five generators will be consistent. But it is strange that the frequency of GENROU3 will not be reduced to be consistent with the other four generators. Can you help me find out what is the reason for this?

WINDOWS ANDES Version 1.8.7

image

Cmt111 commented 1 year ago

Here is the program.

import andes import matplotlib import matplotlib.pyplot as plt ss = andes.load(andes.get_case("ieee14/ieee14_full.xlsx"), setup=False, default_config=True) ss.setup() ss.PQ.config.p2p = 1 ss.PQ.config.q2q = 1 ss.PQ.config.p2z = 0 ss.PQ.config.q2z = 0 ss.PQ.pq2z = 0 ss.PFlow.run() ss.TDS.config.tf = 7 ss.TDS.config.criteria = 0 ss.TDS.run() ss.GENROU.set(src='u', idx='GENROU_3', attr='v', value=0.6)

ss.TDS.config.tf = 55 ss.TDS.config.criteria = 0 ss.TDS.run()

matplotlib.use('TkAgg')

ss.TDS.load_plotter() ss.TDS.plt.plot(ss.GENROU.omega,a=(0, 1, 2, 3, 4), ylabel="Generator Frequency(Hz)",grid=True,ytimes=60) ss.TDS.run()

jinningwang commented 1 year ago

I don't think this is a bug. You might need to check ss.GENROU.set(src='u', idx='GENROU_3', attr='v', value=0.6). I am confused about this.

Cmt111 commented 1 year ago

I don't think this is a bug. You might need to check ss.GENROU.set(src='u', idx='GENROU_3', attr='v', value=0.6). I am confused about this.

Thank you for your response. Maybe my expression is wrong. I use “ss.GENROU.set(src='u', idx='GENROU_3', attr='v', value=0.6)” to achieve the GENROU3 to increase the active power of 0.2p.u. at 7s(The original active power of the GENROUr is 0.4p.u.). How to achieve it, please?

cuihantao commented 1 year ago

u is connectivity status that should only be 0 or 1. Setting u to non-binary values will lead to unexpected results.

Cmt111 commented 1 year ago

u is connectivity status that should only be 0 or 1. Setting u to non-binary values will lead to unexpected results.

Thank you for your response. What statement should be used to change the active power of the GENROU at a certain moment, please?

jinningwang commented 1 year ago

Check this example, https://docs.andes.app/en/latest/_examples/ex9.html

cuihantao commented 1 year ago

See the link Jinning shared. I'd like to add that active power output is a dependent variable of the stator voltages and currents. One cannot directly change the power output; it has to go through the references, either by changing the setpoint at turbine governors or at the generator (only when turbine governor is not connected for that generator).

cuihantao commented 1 year ago

Closing the issue for now due to lack of activity. Feel free to re-open it or post updates to Discussions.