Skip to content

Commit

Permalink
Enforce F_NotchType = 2 if Fl_Mode = 1
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Jan 30, 2020
1 parent f301eb4 commit c575eb5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ROSCO_toolbox/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,17 +261,17 @@ def tune_controller(self, turbine):

# --- Floating feedback term ---
if self.Fl_Mode == 1: # Floating feedback
Kpf = (dtau_dv/dtau_dbeta)*turbine.TowerHt * Ng * 2.0 * pi;
self.Kpf = Kpf[len(v_below_rated)]
else:
self.Kpf = 0.0

# And check for .yaml input inconsistencies
if self.Fl_Mode > 0:
Kp_float = (dtau_dv/dtau_dbeta)*turbine.TowerHt * Ng * 2.0 * pi;
self.Kp_float = Kp_float[len(v_below_rated)]

# And check for .yaml input inconsistencies
if turbine.twr_freq == 0.0 or turbine.ptfm_freq == 0.0:
print('WARNING: twr_freq and ptfm_freq should be defined for floating turbine control!!')
# Turn on the notch filter if floating
self.F_NotchType == 1
self.F_NotchType = 2
else:
self.Kp_float = 0.0



class ControllerBlocks():
Expand Down

0 comments on commit c575eb5

Please sign in to comment.