Skip to content

Commit

Permalink
Implemented collective sine excitation on pitch
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed May 1, 2019
1 parent 52de815 commit 3806f79
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Parameter_files/DTU10MW/DISCON.IN
Original file line number Diff line number Diff line change
Expand Up @@ -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
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]
9 changes: 8 additions & 1 deletion Source/Controllers.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions Source/DRC_Types.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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].
Expand Down
5 changes: 5 additions & 0 deletions Source/ReadSetParameters.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3806f79

Please sign in to comment.