Skip to content

Commit

Permalink
Tower velocity feedback filter
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Jan 7, 2020
1 parent 276c7bd commit 0604b2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ROSCO_toolbox/turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,13 @@ def load_from_fast(self, FAST_InputFile,FAST_directory, FAST_ver='OpenFAST',dev_
self.Ct = RotorPerformance(self.Ct_table,self.pitch_initial_rad,self.TSR_initial)
self.Cq = RotorPerformance(self.Cq_table,self.pitch_initial_rad,self.TSR_initial)

# Pull out some floating-related data
wave_tp = fast.fst_vt['HydroDyn']['WaveTp']
try:
self.wave_peak_period = 1/wave_tp # Will work if HydroDyn exists and a peak period is defined...
except:
self.wave_peak_period = 0.0 # Set as 0.0 when HydroDyn doesn't exist (fixed bottom)

# Load rotor performance data from CCBlade
def load_from_ccblade(self,fast):
'''
Expand Down
6 changes: 4 additions & 2 deletions ROSCO_toolbox/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,9 @@ def write_param_file(self, turbine, controller, param_file='DISCON.IN', txt_file
file.write('{:<13.2f} ! F_LPFCornerFreq - Corner frequency (-3dB point) in the low-pass filters, [rad/s]\n'.format(turbine.bld_edgewise_freq * 1/4))
file.write('{:<13.2f} ! F_LPFDamping - Damping coefficient [used only when F_FilterType = 2]\n'.format(controller.F_LPFDamping))
file.write('{:<13.2f} ! F_NotchCornerFreq - Natural frequency of the notch filter, [rad/s]\n'.format(0.0))
file.write('{:<6.1f}{:<13.1f} ! F_NotchBetaNumDen - Two notch damping values (numerator and denominator, resp) - determines the width and depth of the notch, [-]\n'.format(0.0,0.0))
file.write('{:<10.1f}{:<9.1f} ! F_NotchBetaNumDen - Two notch damping values (numerator and denominator, resp) - determines the width and depth of the notch, [-]\n'.format(0.0,0.0))
file.write('{:<014.6f} ! F_SSCornerFreq - Corner frequency (-3dB point) in the first order low pass filter for the setpoint smoother, [rad/s].\n'.format(controller.ss_cornerfreq))
file.write('{:<10.4f}{:<9.4f} ! F_FlCornerFreq - Corner frequency and damping in the second order low pass filter of the tower-top fore-aft motion for floating feedback control [rad/s, -].\n'.format(turbine.wave_peak_period*2*pi * 0.2, 0.7))
file.write('\n')
file.write('!------- BLADE PITCH CONTROL ----------------------------------------------\n')
file.write('{:<11d} ! PC_GS_n - Amount of gain-scheduling table entries\n'.format(len(controller.pitch_op_pc)))
Expand Down Expand Up @@ -525,7 +526,8 @@ def write_param_file(self, turbine, controller, param_file='DISCON.IN', txt_file
file.write('\n')
file.write('!------- SHUTDOWN -------------------------------------------\n')
file.write('{:<014.5f} ! SD_MaxPit - Maximum blade pitch angle to initiate shutdown, [rad]\n'.format(controller.sd_maxpit))
file.write('{:<014.5f} ! SD_CornerFreq - Cutoff Frequency for first order low-pass filter for blade pitch angle, [rad/s]'.format(controller.sd_cornerfreq))
file.write('{:<014.5f} ! SD_CornerFreq - Cutoff Frequency for first order low-pass filter for blade pitch angle, [rad/s]\n'.format(controller.sd_cornerfreq))
file.write('\n')
file.write('!------- Floating -------------------------------------------\n')
file.write('{:<014.5f} ! Fl_Kp - Nacelle velocity proportional feedback gain [s]\n'.format(controller.Kpf))
file.close()
Expand Down

0 comments on commit 0604b2c

Please sign in to comment.