diff --git a/Parameter_files/DTU10MW/DISCON.IN b/Parameter_files/DTU10MW/DISCON.IN index 1018c276..c65de160 100644 --- a/Parameter_files/DTU10MW/DISCON.IN +++ b/Parameter_files/DTU10MW/DISCON.IN @@ -55,5 +55,6 @@ 1.0 ! Y_omegaLPFast - Corner frequency fast low pass filter, 1.0 [Hz] 0.016667 ! Y_omegaLPSlow - Corner frequency slow low pass filter, 1/60 [Hz] 0.0034906 ! Y_Rate - Yaw rate [rad/s] -0.0349066 ! Z_PitchAmplitude - Amplitude of sine pitch excitation -0 ! Z_PitchFrequency - Frequency of sine pitch excitation \ No newline at end of file +0 ! Z_EnableSine - Enable/disable sine pitch excitation [-] +0.0349066 ! Z_PitchAmplitude - Amplitude of sine pitch excitation [rad] +0 ! Z_PitchFrequency - Frequency of sine pitch excitation [rad/s] \ No newline at end of file diff --git a/Source/Controllers.f90 b/Source/Controllers.f90 index 0baf0e2b..23ccf87e 100644 --- a/Source/Controllers.f90 +++ b/Source/Controllers.f90 @@ -65,12 +65,19 @@ SUBROUTINE PitchControl(avrSWAP, CntrPar, LocalVar, objInst) ELSE LocalVar%FA_PitCom = 0.0 ! THIS IS AN ARRAY!! END IF + + ! Sine excitation on pitch + IF (CntrPar%Z_EnableSine == 1) THEN + LocalVar%PC_SineExcitation = CntrPar%Z_PitchAmplitude*sin(CntrPar%Z_PitchFrequency*LocalVar%Time) + ELSE + LocalVar%PC_SineExcitation = 0 + END IF ! Combine and saturate all pitch commands: DO K = 1,LocalVar%NumBl ! Loop through all blades, add IPC contribution and limit pitch rate ! PitCom(K) = ratelimit(LocalVar%PC_PitComT_IPC(K), LocalVar%BlPitch(K), PC_MinRat, PC_MaxRat, LocalVar%DT) ! Saturate the overall command of blade K using the pitch rate limit LocalVar%PitCom(K) = saturate(LocalVar%PC_PitComT, CntrPar%PC_MinPit, CntrPar%PC_MaxPit) ! Saturate the overall command using the pitch angle limits - LocalVar%PitCom(K) = LocalVar%PitCom(K) + LocalVar%IPC_PitComF(K) + LocalVar%FA_PitCom(K) + LocalVar%PitCom(K) = LocalVar%PitCom(K) + LocalVar%IPC_PitComF(K) + LocalVar%FA_PitCom(K) + LocalVar%PC_SineExcitation END DO ! Command the pitch demanded from the last diff --git a/Source/DRC_Types.f90 b/Source/DRC_Types.f90 index 9f30dfe9..648f1f61 100644 --- a/Source/DRC_Types.f90 +++ b/Source/DRC_Types.f90 @@ -68,6 +68,10 @@ MODULE DRC_Types REAL(4) :: Y_omegaLPSlow ! Corner frequency slow low pass filter, 1/60 [Hz] REAL(4) :: Y_Rate ! Yaw rate [rad/s] + INTEGER(4) :: Z_EnableSine ! Enable/disable sine pitch excitation + REAL(4) :: Z_PitchAmplitude ! Amplitude of sine pitch excitation + REAL(4) :: Z_PitchFrequency ! Frequency of sine pitch excitation + REAL(4) :: PC_RtTq99 ! 99% of the rated torque value, using for switching between pitch and torque control, [Nm]. REAL(4) :: VS_MaxOMTq ! Maximum torque at the end of the below-rated region 2, [Nm] REAL(4) :: VS_MinOMTq ! Minimum torque at the beginning of the below-rated region 2, [Nm] @@ -109,6 +113,7 @@ MODULE DRC_Types REAL(4) :: PC_PitComT ! Total command pitch based on the sum of the proportional and integral terms, [rad]. REAL(4) :: PC_PitComT_IPC(3) ! Total command pitch based on the sum of the proportional and integral terms, including IPC term [rad]. REAL(4) :: PC_PwrErr ! Power error with respect to rated power [W] + REAL(4) :: PC_SineExcitation ! Sine contribution to pitch signal REAL(4) :: PC_SpdErr ! Current speed error (pitch control) [rad/s]. INTEGER(4) :: PC_State ! State of the pitch control system REAL(4) :: PitCom(3) ! Commanded pitch of each blade the last time the controller was called, [rad]. diff --git a/Source/ReadSetParameters.f90 b/Source/ReadSetParameters.f90 index e8ab4658..d1e51728 100644 --- a/Source/ReadSetParameters.f90 +++ b/Source/ReadSetParameters.f90 @@ -113,6 +113,11 @@ SUBROUTINE ReadControlParameterFileSub(CntrPar) READ(UnControllerParameters, *) CntrPar%Y_omegaLPSlow READ(UnControllerParameters, *) CntrPar%Y_Rate + !------------------- SINE PITCH EXCITATION ----------------------- + READ(UnControllerParameters, *) CntrPar%Z_EnableSine + READ(UnControllerParameters, *) CntrPar%Z_PitchAmplitude + READ(UnControllerParameters, *) CntrPar%Z_PitchFrequency + !------------------- CALCULATED CONSTANTS ----------------------- CntrPar%PC_RtTq99 = CntrPar%VS_RtTq*0.99 CntrPar%VS_MinOMTq = CntrPar%VS_Rgn2K*CntrPar%VS_MinOMSpd**2