Skip to content

Commit

Permalink
Move peak shaving to ControllerBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Sep 27, 2019
1 parent 26d3117 commit 82daa5f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 16 additions & 0 deletions Source/ControllerBlocks.f90
Original file line number Diff line number Diff line change
Expand Up @@ -253,5 +253,21 @@ SUBROUTINE SetpointSmoother(LocalVar, CntrPar, objInst)

END SUBROUTINE SetpointSmoother
!-------------------------------------------------------------------------------------------------------------------------------
REAL FUNCTION PeakShaving(LocalVar, CntrPar)
! PeakShaving defines a minimum blade pitch angle based on a lookup table provided by DISON.IN
! SS_Mode = 0, No setpoint smoothing
! SS_Mode = 1, Implement setpoint smoothing
USE DRC_Types, ONLY : LocalVariables, ControlParameters
IMPLICIT NONE
! Inputs
TYPE(ControlParameters), INTENT(IN) :: CntrPar
TYPE(LocalVariables), INTENT(INOUT) :: LocalVar
! Allocate Variables

! Define minimum blade pitch angle as a function of estimated wind speed
PeakShaving = interp1d(CntrPar%PS_WindSpeeds, CntrPar%PS_BldPitchMin,LocalVar%WE_Vw)

END FUNCTION PEAKSHAVING
!-------------------------------------------------------------------------------------------------------------------------------

END MODULE ControllerBlocks
16 changes: 0 additions & 16 deletions Source/Functions.f90
Original file line number Diff line number Diff line change
Expand Up @@ -461,21 +461,5 @@ SUBROUTINE Debug(LocalVar, CntrPar, avrSWAP, RootName, size_avcOUTNAME)
END IF
END SUBROUTINE Debug
!-------------------------------------------------------------------------------------------------------------------------------
REAL FUNCTION PeakShaving(LocalVar, CntrPar)
! PeakShaving defines a minimum blade pitch angle based on a lookup table provided by DISON.IN
! SS_Mode = 0, No setpoint smoothing
! SS_Mode = 1, Implement setpoint smoothing
USE DRC_Types, ONLY : LocalVariables, ControlParameters
IMPLICIT NONE
! Inputs
TYPE(ControlParameters), INTENT(IN) :: CntrPar
TYPE(LocalVariables), INTENT(INOUT) :: LocalVar
! Allocate Variables

! Define minimum blade pitch angle as a function of estimated wind speed
PeakShaving = interp1d(CntrPar%PS_WindSpeeds, CntrPar%PS_BldPitchMin,LocalVar%WE_Vw)

END FUNCTION PEAKSHAVING
!-------------------------------------------------------------------------------------------------------------------------------

END MODULE Functions

0 comments on commit 82daa5f

Please sign in to comment.