Skip to content

Commit

Permalink
Revert "Fix setpoint smoother to use last gen pwr (#43)"
Browse files Browse the repository at this point in the history
This reverts commit a275d37.
  • Loading branch information
dzalkind authored Apr 22, 2021
1 parent a275d37 commit b3ecca9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/ControllerBlocks.f90
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ SUBROUTINE SetpointSmoother(LocalVar, CntrPar, objInst)
! ------ Setpoint Smoothing ------
IF ( CntrPar%SS_Mode == 1) THEN
! Find setpoint shift amount
DelOmega = ((LocalVar%PC_PitComT - CntrPar%PC_MinPit)/0.524) * CntrPar%SS_VSGain - ((LocalVar%VS_GenPwr - LocalVar%VS_LastGenPwr))/CntrPar%VS_RtPwr * CntrPar%SS_PCGain ! Normalize to 30 degrees for now
DelOmega = ((LocalVar%PC_PitComT - CntrPar%PC_MinPit)/0.524) * CntrPar%SS_VSGain - ((LocalVar%VS_GenPwr - LocalVar%VS_LastGenTrq))/CntrPar%VS_RtPwr * CntrPar%SS_PCGain ! Normalize to 30 degrees for now
DelOmega = DelOmega * CntrPar%PC_RefSpd
! Filter
LocalVar%SS_DelOmegaF = LPFilter(DelOmega, LocalVar%DT, CntrPar%F_SSCornerFreq, LocalVar%iStatus, .FALSE., objInst%instLPF)
Expand Down
1 change: 0 additions & 1 deletion src/Controllers.f90
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ SUBROUTINE VariableSpeedControl(avrSWAP, CntrPar, LocalVar, objInst)

! Reset the value of LocalVar%VS_LastGenTrq to the current values:
LocalVar%VS_LastGenTrq = LocalVar%GenTq
LocalVar%VS_LastGenPwr = LocalVar%VS_GenPwr

! Set the command generator torque (See Appendix A of Bladed User's Guide):
avrSWAP(47) = MAX(0.0, LocalVar%VS_LastGenTrq) ! Demanded generator torque, prevent negatives.
Expand Down
1 change: 0 additions & 1 deletion src/ROSCO_Types.f90
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ MODULE ROSCO_Types
REAL(8) :: TestType ! Test variable, no use
REAL(8) :: VS_MaxTq ! Maximum allowable generator torque [Nm].
REAL(8) :: VS_LastGenTrq ! Commanded electrical generator torque the last time the controller was called [Nm].
REAL(8) :: VS_LastGenPwr ! Commanded electrical generator torque the last time the controller was called [Nm].
REAL(8) :: VS_MechGenPwr ! Mechanical power on the generator axis [W]
REAL(8) :: VS_SpdErrAr ! Current speed error for region 2.5 PI controller (generator torque control) [rad/s].
REAL(8) :: VS_SpdErrBr ! Current speed error for region 1.5 PI controller (generator torque control) [rad/s].
Expand Down

0 comments on commit b3ecca9

Please sign in to comment.