Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Nov 4, 2019
1 parent 4acc5eb commit 8f26775
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
68 changes: 34 additions & 34 deletions Tune_Cases/DISCON.IN
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
! Controller parameter input file for the OpenFAST_5MW wind turbine
! - File written using NREL Reference OpenSource Controller tuning logic on 10/31/19
! Controller parameter input file for the IEA-15-240-RWT wind turbine
! - File written using NREL Reference OpenSource Controller tuning logic on 11/04/19

!------- DEBUG ------------------------------------------------------------
1 ! LoggingLevel - {0: write no debug files, 1: write standard output .dbg-file, 2: write standard output .dbg-file and complete avrSWAP-array .dbg2-file}

!------- CONTROLLER FLAGS -------------------------------------------------
1 ! F_LPFType - {1: first-order low-pass filter, 2: second-order low-pass filter}, [rad/s] (currently filters generator speed and pitch control signals
2 ! F_LPFType - {1: first-order low-pass filter, 2: second-order low-pass filter}, [rad/s] (currently filters generator speed and pitch control signals
0 ! F_NotchType - Notch on the measured generator speed {0: disable, 1: enable}
0 ! IPC_ControlMode - Turn Individual Pitch Control (IPC) for fatigue load reductions (pitch contribution) {0: off, 1: 1P reductions, 2: 1P+2P reductions}
2 ! VS_ControlMode - Generator torque control mode in above rated conditions {0: constant torque, 1: constant power, 2: TSR tracking PI control}
1 ! PC_ControlMode - Blade pitch control mode {0: No pitch, fix to fine pitch, 1: active PI blade pitch control}
0 ! Y_ControlMode - Yaw control mode {0: no yaw control, 1: yaw rate control, 2: yaw-by-IPC}
1 ! SS_Mode - Setpoint Smoother mode {0: no setpoint smoothing, 1: introduce setpoint smoothing}
2 ! WE_Mode - Wind speed estimator mode {0: One-second low pass filtered hub height wind speed, 1: Immersion and Invariance Estimator (Ortega et al.)}
1 ! PS_Mode - Peak shaving mode {0: no peak shaving, 1: implement peak shaving}
0 ! PS_Mode - Peak shaving mode {0: no peak shaving, 1: implement peak shaving}

!------- FILTERS ----------------------------------------------------------
1.57 ! F_LPFCornerFreq - Corner frequency (-3dB point) in the low-pass filters, [rad/s]
0.00 ! F_LPFDamping - Damping coefficient [used only when F_FilterType = 2]
0.85 ! F_LPFCornerFreq - Corner frequency (-3dB point) in the low-pass filters, [rad/s]
0.70 ! F_LPFDamping - Damping coefficient [used only when F_FilterType = 2]
0.00 ! F_NotchCornerFreq - Natural frequency of the notch filter, [rad/s]
0.0 0.0 ! F_NotchBetaNumDen - Two notch damping values (numerator and denominator, resp) - determines the width and depth of the notch, [-]
0.628319000000 ! F_SSCornerFreq - Corner frequency (-3dB point) in the first order low pass filter for the setpoint smoother, [rad/s].

!------- BLADE PITCH CONTROL ----------------------------------------------
27 ! PC_GS_n - Amount of gain-scheduling table entries
0.059999 0.087088 0.108614 0.127859 0.144840 0.161163 0.175942 0.190159 0.204314 0.216979 0.229469 0.242120 0.254317 0.265260 0.276444 0.287914 0.299653 0.309477 0.319290 0.329399 0.339820 0.350541 0.361041 0.369471 0.378187 0.387196 0.396499 ! PC_GS_angles - Gain-schedule table: pitch angles
-0.017648 -0.015483 -0.013719 -0.012253 -0.011017 -0.009959 -0.009044 -0.008245 -0.007541 -0.006916 -0.006358 -0.005856 -0.005402 -0.004990 -0.004614 -0.004269 -0.003953 -0.003661 -0.003390 -0.003139 -0.002906 -0.002688 -0.002484 -0.002293 -0.002114 -0.001946 -0.001787 ! PC_GS_KP - Gain-schedule table: pitch controller kp gains
-0.007782 -0.006989 -0.006342 -0.005805 -0.005352 -0.004965 -0.004629 -0.004336 -0.004079 -0.003849 -0.003645 -0.003461 -0.003295 -0.003143 -0.003006 -0.002879 -0.002763 -0.002656 -0.002557 -0.002465 -0.002380 -0.002300 -0.002225 -0.002155 -0.002090 -0.002028 -0.001970 ! PC_GS_KI - Gain-schedule table: pitch controller ki gains
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ! PC_GS_KD - Gain-schedule table: pitch controller kd gains
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ! PC_GS_TF - Gain-schedule table: pitch controller tf gains (derivative filter)
28 ! PC_GS_n - Amount of gain-scheduling table entries
0.061023 0.088728 0.110709 0.129568 0.146445 0.161934 0.176370 0.190004 0.203003 0.215506 0.227434 0.239015 0.250364 0.261283 0.271993 0.282525 0.292717 0.302879 0.312675 0.322456 0.332012 0.341376 0.350893 0.359802 0.368910 0.377960 0.386550 0.395338 ! PC_GS_angles - Gain-schedule table: pitch angles
-0.763672 -0.634653 -0.529588 -0.442373 -0.368814 -0.305938 -0.251574 -0.204104 -0.162294 -0.125189 -0.092037 -0.062239 -0.035310 -0.010854 0.011453 0.031884 0.050666 0.067990 0.084020 0.098895 0.112737 0.125648 0.137721 0.149033 0.159655 0.169648 0.179067 0.187959 ! PC_GS_KP - Gain-schedule table: pitch controller kp gains
-0.040165 -0.036055 -0.032708 -0.029930 -0.027587 -0.025584 -0.023852 -0.022339 -0.021008 -0.019825 -0.018769 -0.017820 -0.016962 -0.016183 -0.015473 -0.014822 -0.014223 -0.013671 -0.013161 -0.012687 -0.012246 -0.011835 -0.011450 -0.011090 -0.010751 -0.010433 -0.010133 -0.009850 ! PC_GS_KI - Gain-schedule table: pitch controller ki gains
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ! PC_GS_KD - Gain-schedule table: pitch controller kd gains
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ! PC_GS_TF - Gain-schedule table: pitch controller tf gains (derivative filter)
1.570800000000 ! PC_MaxPit - Maximum physical pitch limit, [rad].
0.000000000000 ! PC_MinPit - Minimum physical pitch limit, [rad].
0.087270000000 ! PC_MaxRat - Maximum pitch rate (in absolute value) in pitch controller, [rad/s].
-0.08727000000 ! PC_MinRat - Minimum pitch rate (in absolute value) in pitch controller, [rad/s].
122.6055600000 ! PC_RefSpd - Desired (reference) HSS speed for pitch controller, [rad/s].
0.785000000000 ! PC_RefSpd - Desired (reference) HSS speed for pitch controller, [rad/s].
0.000000000000 ! PC_FinePit - Record 5: Below-rated pitch angle set-point, [rad]
0.017450000000 ! PC_Switch - Angle above lowest minimum pitch angle for switch, [rad]
0 ! Z_EnableSine - Enable/disable sine pitch excitation, used to validate for dynamic induction control, will be removed later, [-]
Expand All @@ -47,38 +47,38 @@
0.0 ! IPC_CornerFreqAct - Corner frequency of the first-order actuators model, to induce a phase lag in the IPC signal {0: Disable}, [rad/s]

!------- VS TORQUE CONTROL ------------------------------------------------
98.00000000000 ! VS_GenEff - Generator efficiency mechanical power -> electrical power, [should match the efficiency defined in the generator properties!], [-]
41613.45266000 ! VS_ArSatTq - Above rated generator torque PI control saturation, [Nm]
1500000.000000 ! VS_MaxRat - Maximum torque rate (in absolute value) in torque controller, [Nm/s].
45774.79792000 ! VS_MaxTq - Maximum generator torque in Region 3 (HSS side), [Nm].
93.00000000000 ! VS_GenEff - Generator efficiency mechanical power -> electrical power, [should match the efficiency defined in the generator properties!], [-]
20546537.90836 ! VS_ArSatTq - Above rated generator torque PI control saturation, [Nm]
4500000.000000 ! VS_MaxRat - Maximum torque rate (in absolute value) in torque controller, [Nm/s].
22601191.69920 ! VS_MaxTq - Maximum generator torque in Region 3 (HSS side), [Nm].
0.000000000000 ! VS_MinTq - Minimum generator (HSS side), [Nm].
34.57519000000 ! VS_MinOMSpd - Optimal mode minimum speed, cut-in speed towards optimal mode gain path, [rad/s]
89507028.38948 ! VS_Rgn2K - Generator torque constant in Region 2 (HSS side), [N-m/(rad/s)^2]
5000000.000000 ! VS_RtPwr - Wind turbine rated power [W]
41613.45266000 ! VS_RtTq - Rated torque, [Nm].
122.6055600000 ! VS_RefSpd - Rated generator speed [rad/s]
0.232380000000 ! VS_MinOMSpd - Optimal mode minimum speed, cut-in speed towards optimal mode gain path, [rad/s]
400890321502.96570 ! VS_Rgn2K - Generator torque constant in Region 2 (HSS side), [N-m/(rad/s)^2]
15000000.00000 ! VS_RtPwr - Wind turbine rated power [W]
20546537.90836 ! VS_RtTq - Rated torque, [Nm].
0.785000000000 ! VS_RefSpd - Rated generator speed [rad/s]
1 ! VS_n - Number of generator PI torque controller gains
-1019.38725000 ! VS_KP - Proportional gain for generator PI torque controller [1/(rad/s) Nm]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2)
-188.881010000 ! VS_KI - Integral gain for generator PI torque controller [1/rad Nm]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2)
7.50 ! VS_TSRopt - Power-maximizing region 2 tip-speed-ratio [rad].
-55658480.77564 ! VS_KP - Proportional gain for generator PI torque controller [1/(rad/s) Nm]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2)
-3915087.15770 ! VS_KI - Integral gain for generator PI torque controller [1/rad Nm]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2)
9.30 ! VS_TSRopt - Power-maximizing region 2 tip-speed-ratio [rad].

!------- SETPOINT SMOOTHER ---------------------------------------------
1.00000 ! SS_VSGain - Variable speed torque controller setpoint smoother gain, [-].
0.00100 ! SS_PCGain - Collective pitch controller setpoint smoother gain, [-].

!------- WIND SPEED ESTIMATOR ---------------------------------------------
63.000 ! WE_BladeRadius - Blade length [m]
120.000 ! WE_BladeRadius - Blade length [m]
1 ! WE_CP_n - Amount of parameters in the Cp array
0.0 0.0 0.0 0.0 ! WE_CP - Parameters that define the parameterized CP(lambda) function
0.0 ! WE_Gamma - Adaption gain of the wind speed estimator algorithm [m/rad]
96.8 ! WE_GearboxRatio - Gearbox ratio [>=1], [-]
44209949.92748 ! WE_Jtot - Total drivetrain inertia, including blades, hub and casted generator inertia to LSS, [kg m^2]
1.0 ! WE_GearboxRatio - Gearbox ratio [>=1], [-]
391508715.77000 ! WE_Jtot - Total drivetrain inertia, including blades, hub and casted generator inertia to LSS, [kg m^2]
1.225 ! WE_RhoAir - Air density, [kg m^-3]
"Cp_Ct_Cq.NREL5MW.txt" ! PerfFileName - File containing rotor performance tables (Cp,Ct,Cq)
52 24 ! PerfTableSize - Size of rotor performance tables, first number refers to number of blade pitch angles, second number referse to number of tip-speed ratios
"Cp_Ct_Cq.IEA15MW.txt" ! PerfFileName - File containing rotor performance tables (Cp,Ct,Cq)
104 48 ! PerfTableSize - Size of rotor performance tables, first number refers to number of blade pitch angles, second number referse to number of tip-speed ratios
44 ! WE_FOPoles_N - Number of first-order system poles used in EKF
3.00 3.50 4.00 4.50 5.00 5.50 6.00 6.50 7.00 7.50 8.00 8.50 9.00 9.50 10.00 10.50 11.00 11.90 12.40 12.90 13.40 13.90 14.40 14.90 15.40 15.90 16.40 16.90 17.40 17.90 18.40 18.90 19.40 19.90 20.40 20.90 21.40 21.90 22.40 22.90 23.40 23.90 24.40 24.90 ! WE_FOPoles_v - Wind speeds corresponding to first-order system poles [m/s]
-0.01748748 -0.02040206 -0.02331664 -0.02623122 -0.02914580 -0.03206038 -0.03497496 -0.03788954 -0.04080412 -0.04371869 -0.04663327 -0.04954785 -0.05246243 -0.05537701 -0.05829159 -0.06120617 -0.06412075 -0.05598597 -0.06682738 -0.07866942 -0.09231394 -0.10538023 -0.12078921 -0.13477157 -0.15013009 -0.16776621 -0.18237924 -0.19867240 -0.21736726 -0.23579548 -0.25106514 -0.26879031 -0.28902598 -0.31162550 -0.32699698 -0.34332081 -0.36199787 -0.38318873 -0.40688830 -0.43360214 -0.46421748 -0.49745234 -0.53336317 -0.57196615 ! WE_FOPoles - First order system poles
3.00 3.50 4.00 4.50 5.00 5.50 6.00 6.50 7.00 7.50 8.00 8.50 9.00 9.50 10.00 10.50 11.20 11.70 12.20 12.70 13.20 13.70 14.20 14.70 15.20 15.70 16.20 16.70 17.20 17.70 18.20 18.70 19.20 19.70 20.20 20.70 21.20 21.70 22.20 22.70 23.20 23.70 24.20 24.70 ! WE_FOPoles_v - Wind speeds corresponding to first-order system poles [m/s]
-0.01652455 -0.01927864 -0.02203273 -0.02478682 -0.02754091 -0.03029500 -0.03304909 -0.03580318 -0.03855727 -0.04131136 -0.04406545 -0.04681955 -0.04957364 -0.05232773 -0.05508182 -0.05783591 -0.03839496 -0.04208232 -0.04920271 -0.05806176 -0.06804687 -0.07884353 -0.09027971 -0.10224776 -0.11469131 -0.12761248 -0.14067971 -0.15415367 -0.16815889 -0.18221582 -0.19667817 -0.21157533 -0.22645645 -0.24201891 -0.25739043 -0.27341165 -0.28948686 -0.30571797 -0.32294693 -0.33909947 -0.35640507 -0.37404429 -0.39090433 -0.40892667 ! WE_FOPoles - First order system poles

!------- YAW CONTROL ------------------------------------------------------
0.0 ! Y_ErrThresh - Yaw error threshold. Turbine begins to yaw when it passes this. [rad^2 s]
Expand All @@ -100,5 +100,5 @@

!------- PEAK SHAVING -------------------------------------------
44 ! PS_BldPitchMin_N - Number of values in minimum blade pitch lookup table (should equal number of values in PS_WindSpeeds and PS_BldPitchMin)
3.00 3.50 4.00 4.50 5.00 5.50 6.00 6.50 7.00 7.50 8.00 8.50 9.00 9.50 10.00 10.50 11.00 11.90 12.40 12.90 13.40 13.90 14.40 14.90 15.40 15.90 16.40 16.90 17.40 17.90 18.40 18.90 19.40 19.90 20.40 20.90 21.40 21.90 22.40 22.90 23.40 23.90 24.40 24.90 ! PS_WindSpeeds - Wind speeds corresponding to minimum blade pitch angles [m/s]
-0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01043930 0.01752641 0.03876018 0.05579366 0.07636280 0.08850549 0.10004206 0.11162711 0.12254282 0.13376138 0.14425013 0.15478810 0.16572605 0.17554639 0.18554307 0.19595332 0.20612251 0.21529640 0.22488312 0.23488900 0.24529504 0.25394261 0.26268712 0.27181488 0.28132974 0.29122769 0.30098555 0.30880015 0.31693135 0.32539084 0.33418433 ! PS_BldPitchMin - Minimum blade pitch angles [rad]
3.00 3.50 4.00 4.50 5.00 5.50 6.00 6.50 7.00 7.50 8.00 8.50 9.00 9.50 10.00 10.50 11.20 11.70 12.20 12.70 13.20 13.70 14.20 14.70 15.20 15.70 16.20 16.70 17.20 17.70 18.20 18.70 19.20 19.70 20.20 20.70 21.20 21.70 22.20 22.70 23.20 23.70 24.20 24.70 ! PS_WindSpeeds - Wind speeds corresponding to minimum blade pitch angles [m/s]
-0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.01745329 -0.00636653 0.02375196 0.04640148 0.06455777 0.07631998 0.08713215 0.09760887 0.10780839 0.11780039 0.12760432 0.13724933 0.14675543 0.15614649 0.16545391 0.17455359 0.18358457 0.19260414 0.20142771 0.21021228 0.21896842 0.22754168 0.23618802 0.24460419 0.25308762 0.26143972 0.26969809 0.27814403 0.28611180 0.29431006 0.30249705 0.31032376 0.31837339 ! PS_BldPitchMin - Minimum blade pitch angles [rad]
4 changes: 2 additions & 2 deletions Tune_Cases/DTU10MW.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ turbine_params:
v_min: 4.0 # Cut-in wind speed [m/s]
v_rated: 11.4 # Rated wind speed [m/s]
v_max: 25.0 # Cut-out wind speed [m/s], -- Does not need to be exact (JUST ASSUME FOR NOW)
max_pitch_rate: 10. # Maximum blade pitch rate [deg/s]
max_pitch_rate: 10. # Maximum blade pitch rate [deg/s]
max_torque_rate: 5000000. # Maximum torque rate [Nm/s], {~1/4 VS_RtTq/s}
rated_power: 10000000. # Rated Power [W]
bld_edgewise_freq: 4.519 # Blade edgewise first natural frequency [rad/s]
Expand All @@ -31,7 +31,7 @@ controller_params:
PC_ControlMode: 1 # Blade pitch control mode {0: No pitch, fix to fine pitch, 1: active PI blade pitch control}
Y_ControlMode: 0 # Yaw control mode {0: no yaw control, 1: yaw rate control, 2: yaw-by-IPC}
SS_Mode: 1 # Setpoint Smoother mode {0: no setpoint smoothing, 1: introduce setpoint smoothing}
WE_Mode: 2 # Wind speed estimator mode {0: One-second low pass filtered hub height wind speed, 1: Immersion and Invariance Estimator (Ortega et al.)}
WE_Mode: 2 # Wind speed estimator mode {0: One-second low pass filtered hub height wind speed, 1: Immersion and Invariance Estimator 2: Extended Kalman Filter}
PS_Mode: 1 # Peak shaving mode {0: no peak shaving, 1: implement peak shaving}
# Controller parameters
zeta_pc: 0.8 # Pitch controller desired damping ratio [-]
Expand Down
2 changes: 1 addition & 1 deletion Tune_Cases/tune_ROSCO.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#-------------------------------- LOAD INPUT PARAMETERS ---------------------------------#
# Change this for your turbine
parameter_filename = 'NREL5MW.yaml' # Name of .yaml input file for the specific turbine
parameter_filename = 'IEA15MW.yaml' # Name of .yaml input file for the specific turbine



Expand Down

0 comments on commit 8f26775

Please sign in to comment.