Skip to content

Commit

Permalink
call shutdown routine last (WISDEM#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas authored Jun 11, 2021
1 parent ce0510b commit 72e7076
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/Controllers.f90
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,18 @@ SUBROUTINE PitchControl(avrSWAP, CntrPar, LocalVar, objInst, DebugVar)
LocalVar%PC_MinPit = CntrPar%PC_FinePit
ENDIF

! Shutdown
IF (CntrPar%SD_Mode == 1) THEN
LocalVar%PC_PitComT = Shutdown(LocalVar, CntrPar, objInst)
ENDIF


! FloatingFeedback
IF (CntrPar%Fl_Mode == 1) THEN
LocalVar%Fl_PitCom = FloatingFeedback(LocalVar, CntrPar, objInst)
LocalVar%PC_PitComT = LocalVar%PC_PitComT + LocalVar%Fl_PitCom
ENDIF


! Shutdown
IF (CntrPar%SD_Mode == 1) THEN
LocalVar%PC_PitComT = Shutdown(LocalVar, CntrPar, objInst)
ENDIF

! Saturate collective pitch commands:
LocalVar%PC_PitComT = saturate(LocalVar%PC_PitComT, LocalVar%PC_MinPit, CntrPar%PC_MaxPit) ! Saturate the overall command using the pitch angle limits
LocalVar%PC_PitComT = ratelimit(LocalVar%PC_PitComT, PitComT_Last, CntrPar%PC_MinRat, CntrPar%PC_MaxRat, LocalVar%DT) ! Saturate the overall command of blade K using the pitch rate limit
Expand Down

0 comments on commit 72e7076

Please sign in to comment.