albertjlguo / sfcNordic

Leeds bachelor final project: Centralized control algorithms for Nordic Smart Grid operation (Python x MATLAB).
GNU General Public License v3.0
3 stars 1 forks source link

AGC time-step mistake #1

Open apetros opened 5 years ago

apetros commented 5 years ago

The modification to have a different time step than 1 second in the AGC has a mistake. The integration is correct but the simulation is still fixed at 1 second step:

def agc(ram, start_time, t, comp_type, monitor, obs_name, nominal_frequency, errSum, agcTimeStep, kp, ki, list_of_gens, weight_of_gens, td):
    for i in np.arange(start_time+1,t+1):  # ending time will be include the 't' sec

This will generate wrong results for and agcTimeStep different than 1.

albertjlguo commented 5 years ago

Thx @apetros , i have fixed it to:

def agc(ram, start_time, t, comp_type, monitor, obs_name, nominal_frequency, errSum, agcTimeStep, kp, ki, list_of_gens, weight_of_gens, td):
    for i in np.arange(start_time+1,t+1,agcTimeStep):  # ending time will be include the 't' sec
apetros commented 5 years ago

Great,I would even suggest to start from start_time instead start_time+1.

albertjlguo commented 5 years ago

I have updated this issue~