Skip to content

Commit

Permalink
Pass IPC gains to DISCON.IN
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Sep 25, 2020
1 parent 41efacb commit 320d059
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion ROSCO_toolbox/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,9 @@ def tune_controller(self, turbine):
else:
self.Kp_float = 0.0


# --- Individual pitch control ---
self.Ki_ipc1p = 0.0

# Flap actuation
if self.Flp_Mode >= 1:
self.flp_angle = 0.0
Expand Down
6 changes: 3 additions & 3 deletions ROSCO_toolbox/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,9 +698,9 @@ def write_DISCON(self, turbine, controller, param_file='DISCON.IN', txt_filename
file.write('{:<014.5f} ! PC_Switch - Angle above lowest minimum pitch angle for switch, [rad]\n'.format(1 * deg2rad))
file.write('\n')
file.write('!------- INDIVIDUAL PITCH CONTROL -----------------------------------------\n')
file.write('{:<13.1f} ! IPC_IntSat - Integrator saturation (maximum signal amplitude contribution to pitch from IPC), [rad]\n'.format(0.0))
file.write('{:<6.1f}{:<13.1f} ! IPC_KI - Integral gain for the individual pitch controller: first parameter for 1P reductions, second for 2P reductions, [-]\n'.format(0.0,0.0))
file.write('{:<6.1f}{:<13.1f} ! IPC_aziOffset - Phase offset added to the azimuth angle for the individual pitch controller, [rad]. \n'.format(0.0,0.0))
file.write('{:<13.1f} ! IPC_IntSat - Integrator saturation (maximum signal amplitude contribution to pitch from IPC), [rad]\n'.format(0.087266)) # Hardcode to 5 degrees
file.write('{:<13.1e} {:<6.1f}! IPC_KI - Integral gain for the individual pitch controller: first parameter for 1P reductions, second for 2P reductions, [-]\n'.format(controller.Ki_ipc1p,0.0))
file.write('{:<13.1e} {:<6.1f}! IPC_aziOffset - Phase offset added to the azimuth angle for the individual pitch controller, [rad]. \n'.format(0.0,0.0))
file.write('{:<13.1f} ! IPC_CornerFreqAct - Corner frequency of the first-order actuators model, to induce a phase lag in the IPC signal {{0: Disable}}, [rad/s]\n'.format(0.0))
file.write('\n')
file.write('!------- VS TORQUE CONTROL ------------------------------------------------\n')
Expand Down

0 comments on commit 320d059

Please sign in to comment.