Skip to content

Commit

Permalink
control of the batteries
Browse files Browse the repository at this point in the history
  • Loading branch information
Edoardo De Din committed Dec 14, 2020
1 parent 0f37eb7 commit 3f5551f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Control_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@ def api_cntr_input(data, uuid, name, *args):
[reactive_power, active_power] = control.control_(pv_input, reactive_power, active_power, v_gen)
active_power_ESS = control_ESS.control_(active_power_ESS, v_ess)

# active_power = [0.0]*num_pv
active_power = [0.0]*num_pv
reactive_power = [0.0]*num_pv
active_power_ESS = [0.0]*len(active_ESS)

k = 0
for key in pv_active:
#updating dictionaries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def Voltage_Control(self, p_batt, v_bat, alpha_P):
# DEFINE LIM (DYNAMIC)
# =============================================================
for i in range(len(self.n_battery)):
self.PMIN[i] = -(3.5/10)
self.PMAX[i] = (3.5/10)
self.PMIN[i] = -(0.8)
self.PMAX[i] = (0.8)


self.VMAX_BATT = [self.V_MAX2] * int(len(self.n_battery))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def initialize_control(self):

# Control Parameters
# ==============================================================
self.K = 40 # iterations of the voltage control
self.K = 10 # iterations of the voltage control

self.alpha_p = [1]* int(len(self.c))
self.lamda_p_max = [0.0]* int(len(self.c))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, grid_data, num_pv):

# Control Parameters
# ==============================================================
self.K = 40 # iterations of the voltage control
self.K = 10 # iterations of the voltage control

self.alpha = [0.3]* int(len(self.c)) # this value is not the one used. It is calculated in Quadratic Control
self.lamda_max = [0.0]* int(len(self.c))
Expand Down

0 comments on commit 3f5551f

Please sign in to comment.