Skip to content

Commit

Permalink
Included an option to include a first-order (actuator) phase delay on…
Browse files Browse the repository at this point in the history
… the IPC signal
  • Loading branch information
Unknown committed May 23, 2019
1 parent 3806f79 commit f2e1154
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Parameter_files/DTU10MW/DISCON.IN
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
0.087266 ! IPC_IntSat - Integrator saturation (maximum signal amplitude contrbution to pitch from IPC), [rad]
8E-10 0 ! IPC_KI - Integral gain for the individual pitch controller: first parameter for 1P reductions, second for 2P reductions [-]
0.436332313 0 ! IPC_aziOffset - Phase offset added to the azimuth angle for the individual pitch controller, [rad].
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]
13 ! PC_GS_n - Amount of gain-scheduling table entries
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
-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
Expand Down Expand Up @@ -38,7 +39,7 @@
-6134.68 ! VS_KI - Integral gain for generator PI torque controller, used in the transitional 2.5 region, [1/rad Nm]
89.166 ! WE_BladeRadius - Blade length [m]
4 ! WE_CP_n - Amount of parameters in the Cp array
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
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
20 ! WE_Gamma - Adaption gain of the wind speed estimator algorithm [m/rad]
50 ! WE_GearboxRatio - Gearbox ratio, >=1 [-]
2.0E+08 ! WE_Jtot - Total drivetrain inertia, including blades, hub and casted generator inertia to LSS [kg m^2]
Expand Down
3 changes: 2 additions & 1 deletion Parameter_files/NREL5MW/DISCON.IN
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
0.087266 ! IPC_IntSat - Integrator saturation (maximum signal amplitude contrbution to pitch from IPC), [rad]
1E-8 0 ! IPC_KI - Integral gain for the individual pitch controller: first parameter for 1P reductions, second for 2P reductions [-]
0.436332313 0 ! IPC_aziOffset - Phase offset added to the azimuth angle for the individual pitch controller, [rad].
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]
14 ! PC_GS_n - Amount of gain-scheduling table entries
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
-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
Expand Down Expand Up @@ -38,7 +39,7 @@
-2100 ! VS_KI - Integral gain for generator PI torque controller, used in the transitional 2.5 region, [1/rad Nm]
63.0 ! WE_BladeRadius - Blade length [m]
4 ! WE_CP_n - Amount of parameters in the Cp array
14.571319658214513 42.809556250371465 2.456512501523107 0.003127994078720 ! WE_CP - Parameters that define the parameterized CP(\lambda) function
14.571319658214513 42.809556250371465 2.456512501523107 0.003127994078720 ! WE_CP - Parameters that define the parameterized CP(lambda) function
20 ! WE_Gamma - Adaption gain of the wind speed estimator algorithm [m/rad]
97 ! WE_GearboxRatio - Gearbox ratio, >=1 [-]
4.0469564E+07 ! WE_Jtot - Total drivetrain inertia, including blades, hub and casted generator inertia to LSS [kg m^2]
Expand Down
12 changes: 10 additions & 2 deletions Source/Controllers.f90
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ SUBROUTINE IPC(CntrPar, LocalVar, objInst)
USE DRC_Types, ONLY : ControlParameters, LocalVariables, ObjectInstances

! Local variables
REAL(4) :: PitComIPC(3), PitComIPC_1P(3), PitComIPC_2P(3)
REAL(4) :: PitComIPC(3), PitComIPCF(3), PitComIPC_1P(3), PitComIPC_2P(3)
INTEGER(4) :: K ! Integer used to loop through turbine blades
REAL(4) :: axisTilt_1P, axisYaw_1P, axisYawF_1P ! Direct axis and quadrature axis outputted by Coleman transform, 1P
REAL(4), SAVE :: IntAxisTilt_1P, IntAxisYaw_1P ! Integral of the direct axis and quadrature axis, 1P
Expand Down Expand Up @@ -266,7 +266,15 @@ SUBROUTINE IPC(CntrPar, LocalVar, objInst)
! Sum nP IPC contrubutions and store to LocalVar data type
DO K = 1,LocalVar%NumBl
PitComIPC(K) = PitComIPC_1P(K) + PitComIPC_2P(K)
LocalVar%IPC_PitComF(K) = PitComIPC(K)

! Optionally filter the resulting signal to induce a phase delay
IF (CntrPar%IPC_CornerFreqAct > 0.0) THEN
LocalVar%PitComIPCF(K) = LPFilter(LocalVar%PitComIPC(K), LocalVar%DT, CntrPar%IPC_CornerFreqAct, LocalVar%iStatus, .FALSE., objInst%instLPF)
ELSE
LocalVar%PitComIPCF(K) = LocalVar%PitComIPC(K)
END IF

LocalVar%IPC_PitComF(K) = PitComIPCF(K)
END DO
END SUBROUTINE IPC

Expand Down
1 change: 1 addition & 0 deletions Source/DRC_Types.f90
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ MODULE DRC_Types
REAL(4) :: IPC_IntSat ! Integrator saturation (maximum signal amplitude contrbution to pitch from IPC)
REAL(4), DIMENSION(:), ALLOCATABLE :: IPC_KI ! Integral gain for the individual pitch controller, [-]. 8E-10
REAL(4), DIMENSION(:), ALLOCATABLE :: IPC_aziOffset ! Phase offset added to the azimuth angle for the individual pitch controller, [rad].
REAL(4) :: 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]

INTEGER(4) :: PC_GS_n ! Amount of gain-scheduling table entries
REAL(4), DIMENSION(:), ALLOCATABLE :: PC_GS_angles ! Gain-schedule table: pitch angles
Expand Down
9 changes: 8 additions & 1 deletion Source/ReadSetParameters.f90
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ SUBROUTINE ReadControlParameterFileSub(CntrPar)
ALLOCATE(CntrPar%IPC_aziOffset(2))
READ(UnControllerParameters,*) CntrPar%IPC_aziOffset

READ(UnControllerParameters, *) CntrPar%IPC_CornerFreqAct

!------------------- PITCH CONSTANTS -----------------------
READ(UnControllerParameters, *) CntrPar%PC_GS_n
ALLOCATE(CntrPar%PC_GS_angles(CntrPar%PC_GS_n))
Expand Down Expand Up @@ -182,10 +184,15 @@ SUBROUTINE Assert(LocalVar, CntrPar, avrSWAP, aviFAIL, ErrMsg, size_avcMSG)
ErrMsg = 'FilterType must be 1 or 2.'
ENDIF

IF (ABS(CntrPar%F_Damping) > 1.0) THEN
IF ((CntrPar%F_Damping > 1.0) .OR. (CntrPar%F_Damping < 0.0)) THEN
aviFAIL = -1
ErrMsg = 'Filter damping coefficient must be between [0, 1]'
ENDIF

IF (CntrPar%IPC_CornerFreqAct < 0.0) THEN
aviFAIL = -1
ErrMsg = 'Corner frequency of IPC actuator model must be positive, or set to 0 to disable.'
ENDIF

IF (CntrPar%F_CornerFreq <= 0.0) THEN
aviFAIL = -1
Expand Down

0 comments on commit f2e1154

Please sign in to comment.