Skip to content

Commit

Permalink
Added necessary tuning parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Aug 29, 2019
1 parent cc4ce99 commit 69ce8a3
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions WTC_toolbox/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@ def read_param_file(self, param_file):
"""
Load the parameter files directly from a FAST input deck
"""
# Pitch Controller Parameters
self.PC_zeta = param_file.PC_zeta # Pitch controller damping ratio (-)
self.PC_om = param_file.PC_om # Pitch controller natural frequency (rad/s)

# Torque Controller Parameters
self.VS_zeta = param_file.VS_zeta # Torque controller damping ratio (-)
self.VS_om = param_file.VS_om # Torque controller natural frequency (rad/s)

# Setpoint Smoother Parameters
self.Kss_PC = param_file.Kss_PC # Pitch controller reference gain bias
self.Kss_VS = param_file.Kss_VS # Torque controller reference gain bias
self.Vmin = turbine.VS_Vmin # Cut-in wind speed (m/s)
self.Vrat = turbine.PC_Vrated # Rated wind speed (m/s)
self.Vmax = turbine.PC_Vmax # Cut-out wind speed (m/s), -- Does not need to be exact


def write_param_file(self, param_file):
"""
Expand All @@ -47,10 +62,7 @@ def tune_controller(self, turbine):
Ar = pi*R^2 # Rotor area (m^2)
Ng = turbine.GBRatio # Gearbox ratio (-)
RRspeed = turbine.RRSpeed # Rated rotor speed (rad/s)
Vmin = turbine.VS_Vmin # Cut-in wind speed (m/s)
Vrat = turbine.PC_Vrated # Rated wind speed (m/s)
Vmax = turbine.PC_Vmax # Cut-out wind speed (m/s), -- Does not need to be exact


# Cp Surface
CpSurf = turbine.CpSurf # Matrix of Cp surface values
CpBeta = turbine.CpBeta # Vector of blade pitch angles corresponding to Cp surface (rad)
Expand Down

0 comments on commit 69ce8a3

Please sign in to comment.