From 066b118cac9347a87a8c613b4a54b9eb0e9bd8f1 Mon Sep 17 00:00:00 2001 From: Nikhar Abbas Date: Fri, 20 Sep 2019 10:54:15 -0600 Subject: [PATCH] Comment Cleanup --- Source/Controllers.f90 | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Source/Controllers.f90 b/Source/Controllers.f90 index 6c2fb800..bb099a74 100644 --- a/Source/Controllers.f90 +++ b/Source/Controllers.f90 @@ -28,30 +28,28 @@ SUBROUTINE PitchControl(avrSWAP, CntrPar, LocalVar, objInst) LocalVar%PC_MaxPitVar = CntrPar%PC_FinePit END IF - ! Compute the gain scheduling correction factor based on the previously - ! commanded pitch angle for blade 1: - LocalVar%PC_KP = interp1d(CntrPar%PC_GS_angles, CntrPar%PC_GS_KP, LocalVar%PC_PitComT) - LocalVar%PC_KI = interp1d(CntrPar%PC_GS_angles, CntrPar%PC_GS_KI, LocalVar%PC_PitComT) - LocalVar%PC_KD = interp1d(CntrPar%PC_GS_angles, CntrPar%PC_GS_KD, LocalVar%PC_PitComT) - LocalVar%PC_TF = interp1d(CntrPar%PC_GS_angles, CntrPar%PC_GS_TF, LocalVar%PC_PitComT) + ! Compute (interpolate) the gains based on previously commanded blade pitch angles and lookup table: + LocalVar%PC_KP = interp1d(CntrPar%PC_GS_angles, CntrPar%PC_GS_KP, LocalVar%PC_PitComT) ! Proportional gain + LocalVar%PC_KI = interp1d(CntrPar%PC_GS_angles, CntrPar%PC_GS_KI, LocalVar%PC_PitComT) ! Integral gain + LocalVar%PC_KD = interp1d(CntrPar%PC_GS_angles, CntrPar%PC_GS_KD, LocalVar%PC_PitComT) ! Derivative gain + LocalVar%PC_TF = interp1d(CntrPar%PC_GS_angles, CntrPar%PC_GS_TF, LocalVar%PC_PitComT) ! TF gains (derivative filter) !NJA - need to clarify - ! Integrate the error signal w.r.t. time; saturate the integral term using the pitch angle limits: - ! Compute the pitch commands associated with the proportional and integral - ! gains: + + ! Compute the collective pitch command associated with the proportional and integral gains: IF (LocalVar%iStatus == 0) THEN LocalVar%PC_PitComT = PIController(LocalVar%PC_SpdErr, LocalVar%PC_KP, LocalVar%PC_KI, CntrPar%PC_FinePit, LocalVar%PC_MaxPitVar, LocalVar%DT, LocalVar%PitCom(1), .TRUE., objInst%instPI) ELSE LocalVar%PC_PitComT = PIController(LocalVar%PC_SpdErr, LocalVar%PC_KP, LocalVar%PC_KI, CntrPar%PC_FinePit, LocalVar%PC_MaxPitVar, LocalVar%DT, CntrPar%PC_FinePit, .FALSE., objInst%instPI) END IF - ! Individual pitch control + ! Find individual pitch control contribution IF ((CntrPar%IPC_ControlMode >= 1) .OR. (CntrPar%Y_ControlMode == 2)) THEN CALL IPC(CntrPar, LocalVar, objInst) ELSE LocalVar%IPC_PitComF = 0.0 ! THIS IS AN ARRAY!! END IF - ! Fore-aft tower vibration damping control + ! Include tower fore-aft tower vibration damping control IF ((CntrPar%FA_KI > 0.0) .OR. (CntrPar%Y_ControlMode == 2)) THEN CALL ForeAftDamping(CntrPar, LocalVar, objInst) ELSE