From 8b13796f7c5f4dc981c1fef01bfca2cb989f9e5b Mon Sep 17 00:00:00 2001 From: Nikhar Abbas Date: Wed, 18 Sep 2019 15:56:04 -0600 Subject: [PATCH] Introduce pitch controller flag --- Source/ControllerBlocks.f90 | 7 +++---- Source/DRC_Types.f90 | 1 + Source/ReadSetParameters.f90 | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/ControllerBlocks.f90 b/Source/ControllerBlocks.f90 index a557bb45..5fe84029 100644 --- a/Source/ControllerBlocks.f90 +++ b/Source/ControllerBlocks.f90 @@ -51,11 +51,10 @@ SUBROUTINE StateMachine(CntrPar, LocalVar) ! Operational States ELSE - IF ((CntrPar%VS_ControlMode == 0) .AND. (LocalVar%GenTq >= CntrPar%PC_RtTq99)) THEN + ! Pitch controller state machine + IF (CntrPar%PC_ControlMode == 1) THEN LocalVar%PC_State = 1 - ELSEIF ((CntrPar%VS_ControlMode == 1) .AND. (LocalVar%GenArTq >= CntrPar%VS_ArSatTq*0.99)) THEN - LocalVar%PC_State = 2 - ELSE + ELSE LocalVar%PC_State = 0 END IF diff --git a/Source/DRC_Types.f90 b/Source/DRC_Types.f90 index a493577d..5d7a09ed 100644 --- a/Source/DRC_Types.f90 +++ b/Source/DRC_Types.f90 @@ -22,6 +22,7 @@ MODULE DRC_Types 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 {0: Disable}, [rad/s] + INTEGER(4) :: PC_ControlMode ! Blade pitch control mode {0: No pitch, fix to fine pitch, 1: active PI blade pitch control} INTEGER(4) :: PC_GS_n ! Amount of gain-scheduling table entries REAL(4), DIMENSION(:), ALLOCATABLE :: PC_GS_angles ! Gain-schedule table: pitch angles REAL(4), DIMENSION(:), ALLOCATABLE :: PC_GS_KP ! Gain-schedule table: pitch controller kp gains diff --git a/Source/ReadSetParameters.f90 b/Source/ReadSetParameters.f90 index d55104f9..d64fb223 100644 --- a/Source/ReadSetParameters.f90 +++ b/Source/ReadSetParameters.f90 @@ -31,6 +31,7 @@ SUBROUTINE ReadControlParameterFileSub(CntrPar) READ(UnControllerParameters, *) CntrPar%F_NotchType READ(UnControllerParameters, *) CntrPar%IPC_ControlMode READ(UnControllerParameters, *) CntrPar%VS_ControlMode + READ(UnControllerParameters, *) CntrPar%PC_ControlMode READ(UnControllerParameters, *) CntrPar%Y_ControlMode READ(UnControllerParameters, *)