Skip to content

Commit

Permalink
change rotor speed constraint to be epsilon
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Jul 1, 2021
1 parent 002f5c2 commit 874c760
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ROSCO/src/ControllerBlocks.f90
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,11 @@ SUBROUTINE WindSpeedEstimator(LocalVar, CntrPar, objInst, PerfData, DebugVar, Er
Q = RESHAPE((/0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0/),(/3,3/))
IF (LocalVar%iStatus == 0) THEN
! Initialize recurring values
om_r = max(LocalVar%RotSpeedF, CntrPar%VS_MinOMSpd)
om_r = max(LocalVar%RotSpeedF, EPSILON(1.0))
v_t = 0.0
v_m = LocalVar%HorWindV
v_h = LocalVar%HorWindV
lambda = max(LocalVar%RotSpeed, CntrPar%VS_MinOMSpd) * CntrPar%WE_BladeRadius/v_h
lambda = max(LocalVar%RotSpeed, EPSILON(1.0)) * CntrPar%WE_BladeRadius/v_h
xh = RESHAPE((/om_r, v_t, v_m/),(/3,1/))
P = RESHAPE((/0.01, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 1.0/),(/3,3/))
K = RESHAPE((/0.0,0.0,0.0/),(/3,1/))
Expand All @@ -258,7 +258,7 @@ SUBROUTINE WindSpeedEstimator(LocalVar, CntrPar, objInst, PerfData, DebugVar, Er
A_op = interp1d(CntrPar%WE_FOPoles_v,CntrPar%WE_FOPoles,v_h,ErrVar)

! TEST INTERP2D
lambda = max(LocalVar%RotSpeed, CntrPar%VS_MinOMSpd) * CntrPar%WE_BladeRadius/v_h
lambda = max(LocalVar%RotSpeed, EPSILON(1.0)) * CntrPar%WE_BladeRadius/v_h
Cp_op = interp2d(PerfData%Beta_vec,PerfData%TSR_vec,PerfData%Cp_mat, LocalVar%BlPitch(1)*R2D, lambda , ErrVar)
Cp_op = max(0.0,Cp_op)

Expand Down Expand Up @@ -292,7 +292,7 @@ SUBROUTINE WindSpeedEstimator(LocalVar, CntrPar, objInst, PerfData, DebugVar, Er


! Wind Speed Estimate
om_r = xh(1,1)
om_r = max(xh(1,1), EPSILON(1.0))
v_t = xh(2,1)
v_m = xh(3,1)
v_h = v_t + v_m
Expand Down

0 comments on commit 874c760

Please sign in to comment.