Skip to content

Commit

Permalink
Account for pitch saturation in vs statemachine
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Feb 26, 2020
1 parent 6ea731f commit f3f24ac
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/ControllerBlocks.f90
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,14 @@ SUBROUTINE StateMachine(CntrPar, LocalVar)
END IF

! --- Torque control state machine ---
IF (LocalVar%PC_PitComT >= CntrPar%VS_Rgn3Pitch) THEN ! Region 3
IF (CntrPar%VS_ControlMode == 1) THEN
LocalVar%VS_State = 5 ! Constant power tracking
ELSE
LocalVar%VS_State = 4 ! Constant torque tracking
IF (LocalVar%PC_PitComT >= CntrPar%VS_Rgn3Pitch) THEN

IF (LocalVar%PC_PitComT >= LocalVar%PC_MinPit + CntrPar%PC_Switch) THEN ! Make sure we aren't implement pitch saturation
IF (CntrPar%VS_ControlMode == 1) THEN ! Region 3
LocalVar%VS_State = 5 ! Constant power tracking
ELSE
LocalVar%VS_State = 4 ! Constant torque tracking
END IF
END IF
ELSE
IF (LocalVar%GenArTq >= CntrPar%VS_MaxOMTq*1.01) THEN ! Region 2 1/2 - active PI torque control
Expand Down

0 comments on commit f3f24ac

Please sign in to comment.