Skip to content

Commit 033b3e8

Browse files
author
Sebastiaan Mulders
authored
Merge pull request #4 from nikhar-abbas/master
Input file organization
2 parents 2f2f63e + ebca4f2 commit 033b3e8

File tree

10 files changed

+759
-699
lines changed

10 files changed

+759
-699
lines changed

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1+
# Gitignore
12
~$README.docx
23
ControllerSchematic.pptx
4+
5+
# Compiled code, unnecessary for git
36
Source/Obj_win32
7+
Source/Obj_lin64
48
*.mod
59
Source/x64/
610
Source/Release/
7-
#Archive
11+
12+
# Archive
813
Scripts/CompileDISCONHereCopyRun\.cmd
914
\.vs/
15+
16+
# Temp Files
17+
*~

DISCON/DISCON_glin64.so

45.9 KB
Binary file not shown.

Parameter_files/DTU10MW/DISCON.IN

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1+
! Turbine: DTU fixed bottom wind turbine
2+
! NJA - Might want to make a more formal header for this
3+
4+
!------- DEBUG ------------------------------------------------------------
15
0 ! LoggingLevel - 0 = write no debug files, 1 = write standard output .dbg-file, 2 = write standard output .dbg-file and complete avrSWAP-array .dbg2-file
6+
7+
!------- CONTROLLER FLAGS -------------------------------------------------
28
2 ! F_LPFType - 1 = first-order low-pass filter, 2 = second-order low-pass filter
39
0 ! F_NotchType - 0 = disable, 1 = enable: notch on the measured generator speed,
10+
0 ! IPC_ControlMode - Turn Individual Pitch Control (IPC) for fatigue load reductions (pitch contribution) 0 = off / 1 = (1P reductions) / 2 = (1P+2P reductions)
11+
1 ! VS_ControlMode - Generator torque control mode in above rated conditions, 0 = constant torque / 1 = constant power
12+
0 ! Y_ControlMode - Yaw control mode: (0 = no yaw control, 1 = yaw rate control, 2 = yaw-by-IPC)
13+
14+
!------- FILTERS ----------------------------------------------------------
415
2.5132741 ! F_LPFCornerFreq - Corner frequency (-3dB point) in the low-pass filters, filtering generator speed and pitch control signals, [rad/s]
516
0.7 ! F_LPFDamping - Damping coefficient if F_FilterType = 2, unused otherwise
617
0 ! F_NotchCornerFreq - Natural frequency of the notch filter, [rad/s]
718
0 0 ! F_NotchBetaNumDen - These two notch damping values (numerator and denominator) determines the width and depth of the notch0.1 ! FA_HPF_LPFCornerFreq - Corner frequency (-3dB point) in the high-pass filter on the fore-aft acceleration signal [rad/s]
8-
0.1 ! FA_HPF_LPFCornerFreq - Corner frequency (-3dB point) in the high-pass filter on the fore-aft acceleration signal [rad/s]
9-
0.087266 ! FA_IntSat - Integrator saturation (maximum signal amplitude contribution to pitch from FA damper), [rad]
10-
-1 ! FA_KI - Integral gain for the fore-aft tower damper controller, -1 = off / >0 = on [rad s/m]
11-
0 ! IPC_ControlMode - Turn Individual Pitch Control (IPC) for fatigue load reductions (pitch contribution) 0 = off / 1 = (1P reductions) / 2 = (1P+2P reductions)
12-
0.087266 ! IPC_IntSat - Integrator saturation (maximum signal amplitude contribution to pitch from IPC), [rad]
13-
8E-10 0 ! IPC_KI - Integral gain for the individual pitch controller: first parameter for 1P reductions, second for 2P reductions [-]
14-
0.436332313 0 ! IPC_aziOffset - Phase offset added to the azimuth angle for the individual pitch controller, [rad].
15-
2.5 ! IPC_CornerFreqAct - Corner frequency of the first-order actuators model, to induce a phase lag in the IPC signal. Set 0 to disable. [rad/s]
19+
20+
!------- BLADE PITCH CONTROL ----------------------------------------------
1621
13 ! PC_GS_n - Amount of gain-scheduling table entries
1722
0 0.0349 0.0698 0.1047 0.1396 0.1745 0.2094 0.2443 0.2793 0.3142 0.3491 0.384 0.4189 ! PC_GS_angles - Gain-schedule table: pitch angles
1823
-0.0105 -0.0104 -0.0102 -0.0099 -0.0095 -0.0091 -0.0086 -0.0081 -0.0076 -0.0071 -0.0066 -0.0061 -0.0056 ! PC_GS_KP - Gain-schedule table: pitch controller kp gains
@@ -26,7 +31,17 @@
2631
50.26548 ! PC_RefSpd - Desired (reference) HSS speed for pitch controller, [rad/s].
2732
0.0 ! PC_FinePit - Record 5: Below-rated pitch angle set-point, [rad]
2833
0.034906 ! PC_Switch - Angle above lowest minimum pitch angle for switch [rad]
29-
1 ! VS_ControlMode - Generator torque control mode in above rated conditions, 0 = constant torque / 1 = constant power
34+
0 ! Z_EnableSine - Enable/disable sine pitch excitation, used to validate for dynamic induction control, will be removed later [-]
35+
0.0349066 ! Z_PitchAmplitude - Amplitude of sine pitch excitation [rad]
36+
0 ! Z_PitchFrequency - Frequency of sine pitch excitation [rad/s]
37+
38+
!------- INDIVIDUAL PITCH CONTROL -----------------------------------------
39+
0.087266 ! IPC_IntSat - Integrator saturation (maximum signal amplitude contribution to pitch from IPC), [rad]
40+
8E-10 0 ! IPC_KI - Integral gain for the individual pitch controller: first parameter for 1P reductions, second for 2P reductions [-]
41+
0.436332313 0 ! IPC_aziOffset - Phase offset added to the azimuth angle for the individual pitch controller, [rad].
42+
2.5 ! IPC_CornerFreqAct - Corner frequency of the first-order actuators model, to induce a phase lag in the IPC signal. Set 0 to disable. [rad/s]
43+
44+
!------- VS TORQUE CONTROL ------------------------------------------------
3045
0.944 ! VS_GenEff - Generator efficiency mechanical power -> electrical power, this should match the efficiency defined in the generator properties! [-]
3146
212900 ! VS_ArSatTq - Above rated generator torque PI control saturation, [Nm]
3247
150000.0 ! VS_MaxRat - Maximum torque rate (in absolute value) in torque controller, [Nm/s].
@@ -40,14 +55,17 @@
4055
1 ! VS_n - Number of controller gains
4156
-27338.24 ! VS_KP - Proportional gain for generator PI torque controller, used in the transitional 2.5 region, [1/(rad/s) Nm]
4257
-6134.68 ! VS_KI - Integral gain for generator PI torque controller, used in the transitional 2.5 region, [1/rad Nm]
58+
59+
!------- WIND SPEED ESTIMATOR ---------------------------------------------
4360
89.166 ! WE_BladeRadius - Blade length [m]
4461
4 ! WE_CP_n - Amount of parameters in the Cp array
4562
14.571319658214513 42.809556250371465 2.456512501523107 0.003127994078720 ! WE_CP - Parameters that define the parameterized CP(lambda) function XXX Needs to be updated, these are values of the NREL5MW XXX
4663
20 ! WE_Gamma - Adaption gain of the wind speed estimator algorithm [m/rad]
4764
50 ! WE_GearboxRatio - Gearbox ratio, >=1 [-]
4865
2.0E+08 ! WE_Jtot - Total drivetrain inertia, including blades, hub and casted generator inertia to LSS [kg m^2]
4966
1.225 ! WE_RhoAir - Air density [kg m^-3]
50-
0 ! Y_ControlMode - Yaw control mode: (0 = no yaw control, 1 = yaw rate control, 2 = yaw-by-IPC)
67+
68+
!------- YAW CONTROL ------------------------------------------------------
5169
1.745329252 ! Y_ErrThresh - Yaw error threshold. Turbine begins to yaw when it passes this. [rad^2 s]
5270
0.17453 ! Y_IPC_IntSat - Integrator saturation (maximum signal amplitude contribution to pitch from yaw-by-IPC), [rad]
5371
1 ! Y_IPC_n - Number of controller gains (yaw-by-IPC)
@@ -59,6 +77,8 @@
5977
1.0 ! Y_omegaLPFast - Corner frequency fast low pass filter, 1.0 [Hz]
6078
0.016667 ! Y_omegaLPSlow - Corner frequency slow low pass filter, 1/60 [Hz]
6179
0.0034906 ! Y_Rate - Yaw rate [rad/s]
62-
0 ! Z_EnableSine - Enable/disable sine pitch excitation, used to validate for dynamic induction control, will be removed later [-]
63-
0.0349066 ! Z_PitchAmplitude - Amplitude of sine pitch excitation [rad]
64-
0 ! Z_PitchFrequency - Frequency of sine pitch excitation [rad/s]
80+
81+
!------- TOWER FORE-AFT DAMPING -------------------------------------------
82+
-1 ! FA_KI - Integral gain for the fore-aft tower damper controller, -1 = off / >0 = on [rad s/m]
83+
0.1 ! FA_HPF_CornerFreq - Corner frequency (-3dB point) in the high-pass filter on the fore-aft acceleration signal [rad/s]
84+
0.087266 ! FA_IntSat - Integrator saturation (maximum signal amplitude contribution to pitch from FA damper), [rad]

Parameter_files/NREL5MW/DISCON.IN

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1+
! Turbine: NREL 5MW fixed bottom wind turbine
2+
! NJA - Might want to make a more formal header for this
3+
4+
!------- DEBUG ------------------------------------------------------------
15
0 ! LoggingLevel - 0 = write no debug files, 1 = write standard output .dbg-file, 2 = write standard output .dbg-file and complete avrSWAP-array .dbg2-file
2-
1 ! F_LPFType - 1 = first-order low-pass filter, 2 = second-order low-pass filter
3-
0 ! F_NotchType - 0 = disable, 1 = enable: notch on the measured generator speed,
4-
1.570796326 ! F_LPFCornerFreq - Corner frequency (-3dB point) in the low-pass filters, filtering generator speed and pitch control signals, [rad/s]
5-
0 ! F_LPFDamping - Damping coefficient if F_FilterType = 2, unused otherwise
6+
7+
!------- CONTROLLER FLAGS -------------------------------------------------
8+
1 ! F_LPFType - 1 = first-order low-pass filter, 2 = second-order low-pass filter, filtering generator speed and pitch control signals, [rad/s]
9+
0 ! F_NotchType - 0 = disable, 1 = enable: notch on the measured generator speed
10+
0 ! IPC_ControlMode - Turn Individual Pitch Control (IPC) for fatigue load reductions (pitch contribution) 0 = off / 1 = (1P reductions) / 2 = (1P+2P reductions)
11+
1 ! VS_ControlMode - Generator torque control mode in above rated conditions, 0 = constant torque / 1 = constant power
12+
0 ! Y_ControlMode - Yaw control mode: (0 = no yaw control, 1 = yaw rate control, 2 = yaw-by-IPC)
13+
14+
!------- FILTERS ----------------------------------------------------------
15+
1.570796326 ! F_LPFCornerFreq - Corner frequency (-3dB point) in the low-pass filters
16+
0 ! F_LPFDamping - Damping coefficient if F_FilterType = 2, unused otherwise
617
0 ! F_NotchCornerFreq - Natural frequency of the notch filter, [rad/s]
718
0 0 ! F_NotchBetaNumDen - These two notch damping values (numerator and denominator) determines the width and depth of the notch
8-
0.1 ! FA_HPF_LPFCornerFreq - Corner frequency (-3dB point) in the high-pass filter on the fore-aft acceleration signal [rad/s]
9-
0.087266 ! FA_IntSat - Integrator saturation (maximum signal amplitude contribution to pitch from FA damper), [rad]
10-
-1 ! FA_KI - Integral gain for the fore-aft tower damper controller, -1 = off / >0 = on [rad s/m]
11-
0 ! IPC_ControlMode - Turn Individual Pitch Control (IPC) for fatigue load reductions (pitch contribution) 0 = off / 1 = (1P reductions) / 2 = (1P+2P reductions)
12-
0.087266 ! IPC_IntSat - Integrator saturation (maximum signal amplitude contribution to pitch from IPC), [rad]
13-
1E-8 0 ! IPC_KI - Integral gain for the individual pitch controller: first parameter for 1P reductions, second for 2P reductions [-]
14-
0.436332313 0 ! IPC_aziOffset - Phase offset added to the azimuth angle for the individual pitch controller, [rad].
15-
2.5 ! IPC_CornerFreqAct - Corner frequency of the first-order actuators model, to induce a phase lag in the IPC signal. Set 0 to disable. [rad/s]
19+
20+
!------- BLADE PITCH CONTROL ----------------------------------------------
1621
14 ! PC_GS_n - Amount of gain-scheduling table entries
1722
0.00000 0.03491 0.06981 0.10472 0.13963 0.17453 0.20944 0.24435 0.27925 0.31416 0.34907 0.38397 0.41888 0.45379 ! PC_GS_angles - Gain-schedule table: pitch angles
1823
-0.018827 -0.014292 -0.011517 -0.009645 -0.008296 -0.007278 -0.006483 -0.005844 -0.005320 -0.004882 -0.004511 -0.004192 -0.003916 -0.003673 ! PC_GS_KP - Gain-schedule table: pitch controller kp gains
@@ -26,28 +31,41 @@
2631
122.90957 ! PC_RefSpd - Desired (reference) HSS speed for pitch controller, [rad/s].
2732
0.0 ! PC_FinePit - Record 5: Below-rated pitch angle set-point, [rad]
2833
0.003490658 ! PC_Switch - Angle above lowest minimum pitch angle for switch [rad]
29-
1 ! VS_ControlMode - Generator torque control mode in above rated conditions, 0 = constant torque / 1 = constant power
34+
0 ! Z_EnableSine - Enable/disable sine pitch excitation, used to validate for dynamic induction control, will be removed later [-]
35+
0.0349066 ! Z_PitchAmplitude - Amplitude of sine pitch excitation [rad]
36+
0 ! Z_PitchFrequency - Frequency of sine pitch excitation [rad/s]
37+
38+
!------- INDIVIDUAL PITCH CONTROL -----------------------------------------
39+
0.087266 ! IPC_IntSat - Integrator saturation (maximum signal amplitude contribution to pitch from IPC), [rad]
40+
1E-8 0 ! IPC_KI - Integral gain for the individual pitch controller: first parameter for 1P reductions, second for 2P reductions [-]
41+
0.436332313 0 ! IPC_aziOffset - Phase offset added to the azimuth angle for the individual pitch controller, [rad].
42+
2.5 ! IPC_CornerFreqAct - Corner frequency of the first-order actuators model, to induce a phase lag in the IPC signal. Set 0 to disable. [rad/s]
43+
44+
!------- VS TORQUE CONTROL ------------------------------------------------
3045
0.944 ! VS_GenEff - Generator efficiency mechanical power -> electrical power, this should match the efficiency defined in the generator properties! [-]
3146
43093.55 ! VS_ArSatTq - Above rated generator torque PI control saturation, [Nm]
3247
150000.0 ! VS_MaxRat - Maximum torque rate (in absolute value) in torque controller, [Nm/s].
3348
48000.00 ! VS_MaxTq - Maximum generator torque in Region 3 (HSS side), [Nm].
3449
0.0 ! VS_MinTq - Minimum generator (HSS side), [Nm].
3550
91.2109 ! VS_MinOMSpd - Optimal mode minimum speed, cut-in speed towards optimal mode gain path [rad/s]
36-
2.33228 ! VS_Rgn2K - Generator torque constant in Region 2 (HSS side), N-m/(rad/s)^2
51+
2.33228 ! VS_Rgn2K - Generator torque constant in Region 2 (HSS side), [N-m/(rad/s)^2]
3752
5.0E+06 ! VS_RtPwr - Wind turbine rated power [W]
3853
43093.55 ! VS_RtTq - Rated torque, [Nm].
3954
120.113 ! VS_RefSpd - Rated generator speed [rad/s]
40-
1 ! VS_n - Number of controller gains
55+
1 ! VS_n - Number of generator PI torque controller gains
4156
-4200 ! VS_KP - Proportional gain for generator PI torque controller, used in the transitional 2.5 region, [1/(rad/s) Nm]
4257
-2100 ! VS_KI - Integral gain for generator PI torque controller, used in the transitional 2.5 region, [1/rad Nm]
58+
59+
!------- WIND SPEED ESTIMATOR ---------------------------------------------
4360
63.0 ! WE_BladeRadius - Blade length [m]
4461
4 ! WE_CP_n - Amount of parameters in the Cp array
4562
14.571319658214513 42.809556250371465 2.456512501523107 0.003127994078720 ! WE_CP - Parameters that define the parameterized CP(lambda) function
4663
20 ! WE_Gamma - Adaption gain of the wind speed estimator algorithm [m/rad]
4764
97 ! WE_GearboxRatio - Gearbox ratio, >=1 [-]
4865
4.0469564E+07 ! WE_Jtot - Total drivetrain inertia, including blades, hub and casted generator inertia to LSS [kg m^2]
4966
1.225 ! WE_RhoAir - Air density [kg m^-3]
50-
0 ! Y_ControlMode - Yaw control mode: (0 = no yaw control, 1 = yaw rate control, 2 = yaw-by-IPC)
67+
68+
!------- YAW CONTROL ------------------------------------------------------
5169
1.745329252 ! Y_ErrThresh - Yaw error threshold. Turbine begins to yaw when it passes this. [rad^2 s]
5270
0.17453 ! Y_IPC_IntSat - Integrator saturation (maximum signal amplitude contribution to pitch from yaw-by-IPC), [rad]
5371
1 ! Y_IPC_n - Number of controller gains (yaw-by-IPC)
@@ -59,6 +77,10 @@
5977
1.0 ! Y_omegaLPFast - Corner frequency fast low pass filter, 1.0 [Hz]
6078
0.016667 ! Y_omegaLPSlow - Corner frequency slow low pass filter, 1/60 [Hz]
6179
0.0034906 ! Y_Rate - Yaw rate [rad/s]
62-
0 ! Z_EnableSine - Enable/disable sine pitch excitation, used to validate for dynamic induction control, will be removed later [-]
63-
0.0349066 ! Z_PitchAmplitude - Amplitude of sine pitch excitation [rad]
64-
0 ! Z_PitchFrequency - Frequency of sine pitch excitation [rad/s]
80+
81+
!------- TOWER FORE-AFT DAMPING -------------------------------------------
82+
-1 ! FA_KI - Integral gain for the fore-aft tower damper controller, -1 = off / >0 = on [rad s/m] - !NJA - Make this a flag
83+
0.1 ! FA_HPF_CornerFreq - Corner frequency (-3dB point) in the high-pass filter on the fore-aft acceleration signal [rad/s]
84+
0.087266 ! FA_IntSat - Integrator saturation (maximum signal amplitude contribution to pitch from FA damper), [rad]
85+
86+

Scripts/compileDISCON_linux.bash

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ mkdir ../DISCON
33
cd ../Source
44

55
# Set options to 64 bits
6-
sed -i '13s/.*/#BITS = 32/' makefile
7-
sed -i '14s/.*/BITS = 64/' makefile
6+
sed -i '' '13s/.*/#BITS = 32/' makefile
7+
sed -i '' '14s/.*/BITS = 64/' makefile
88

99
# Build code
1010
rm -f ../DISCON/DISCON_glin64.so
1111
rm -f ../DISCON_x64_DRC.so
1212
make clean
1313
make all
14-
mv ../DISCON/DISCON_glin64.so ../DISCON_x64_DRC.so
15-
echo 'The output file is: "../DISCON_x64_DRC.so".'
14+
# cp ../DISCON/DISCON_glin64.so ../DISCON_x64_DRC.so
15+
# echo 'The output file is: "../DISCON_x64_DRC.so".'
1616

1717
# Return to initial directory
1818
cd ../Scripts

0 commit comments

Comments
 (0)