Skip to content

Commit

Permalink
Rename minimum speed for vs controller
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Nov 20, 2019
1 parent 0d9f225 commit 569f955
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions ROSCO_toolbox/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ def __init__(self, controller_params):
else:
self.max_pitch = 90*deg2rad # Default to 90 degrees max pitch

if controller_params['pc_minspd']:
self.pc_minspd = controller_params['pc_minspd']
if controller_params['vs_minspd']:
self.vs_minspd = controller_params['vs_minspd']
else:
self.pc_minspd = None
self.vs_minspd = None

if controller_params['ss_vsgain']:
self.ss_vsgain = controller_params['ss_vsgain']
Expand Down Expand Up @@ -215,11 +215,11 @@ def tune_controller(self, turbine):

# -- Define some setpoints --
# minimum rotor speed saturation limits
self.vs_minspd = (turbine.Cp.TSR_opt * turbine.v_min / turbine.rotor_radius) * Ng
if self.pc_minspd:
self.pc_minspd = np.maximum(self.pc_minspd, (turbine.Cp.TSR_opt * turbine.v_min / turbine.rotor_radius) * Ng)
if self.vs_minspd:
self.vs_minspd = np.maximum(self.vs_minspd, (turbine.Cp.TSR_opt * turbine.v_min / turbine.rotor_radius) * Ng)
else:
self.pc_minspd = (turbine.Cp.TSR_opt * turbine.v_min / turbine.rotor_radius) * Ng
self.vs_minspd = (turbine.Cp.TSR_opt * turbine.v_min / turbine.rotor_radius) * Ng
self.pc_minspd = self.vs_minspd

# max pitch angle for shutdown
if self.sd_maxpit:
Expand Down
2 changes: 1 addition & 1 deletion Tune_Cases/DTU10MW.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ controller_params:
# Optional - these can be defined, but do not need to be
max_pitch: # None # Maximum pitch angle [rad], {default = 90 degrees}
min_pitch: # None # Minimum pitch angle [rad], {default = 0 degrees}
pc_minspd: # None # Minimum rotor speed [rad/s], {default = 0 rad/s}
vs_minspd: # None # Minimum rotor speed [rad/s], {default = 0 rad/s}
ss_cornerfreq: # None # First order low-pass filter cornering frequency for setpoint smoother [rad/s]
ss_vsgain: # None # Torque controller setpoint smoother gain bias percentage [%, <= 1 ], {default = 100%}
ss_pcgain: # None # Pitch controller setpoint smoother gain bias percentage [%, <= 1 ], {default = 0.1%}
Expand Down
2 changes: 1 addition & 1 deletion Tune_Cases/IEA15MW.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ controller_params:
# Optional - these can be defined, but do not need to be
max_pitch: # None # Maximum pitch angle [rad], {default = 90 degrees}
min_pitch: # None # Minimum pitch angle [rad], {default = 0 degrees}
pc_minspd: 0.4817 # Minimum rotor speed [rad/s], {default = 0 rad/s}
vs_minspd: 0.5235 # Minimum rotor speed [rad/s], {default = 0 rad/s}
ss_cornerfreq: # None # First order low-pass filter cornering frequency for setpoint smoother [rad/s]
ss_vsgain: # None # Torque controller setpoint smoother gain bias percentage [%, <= 1 ], {default = 100%}
ss_pcgain: # None # Pitch controller setpoint smoother gain bias percentage [%, <= 1 ], {default = 0.1%}
Expand Down
2 changes: 1 addition & 1 deletion Tune_Cases/NREL5MW.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ controller_params:
# Optional - these can be defined, but do not need to be
max_pitch: # None # Maximum pitch angle [rad], {default = 90 degrees}
min_pitch: # None # Minimum pitch angle [rad], {default = 0 degrees}
pc_minspd: # None # Minimum rotor speed [rad/s], {default = 0 rad/s}
vs_minspd: # None # Minimum rotor speed [rad/s], {default = 0 rad/s}
ss_cornerfreq: # None # First order low-pass filter cornering frequency for setpoint smoother [rad/s]
ss_vsgain: # None # Torque controller setpoint smoother gain bias percentage [%, <= 1 ], {default = 100%}
ss_pcgain: # None # Pitch controller setpoint smoother gain bias percentage [%, <= 1 ], {default = 0.1%}
Expand Down

0 comments on commit 569f955

Please sign in to comment.