Skip to content

Commit

Permalink
Only check Fl filter parameters if Fl_Mode > 0, fix example_05
Browse files Browse the repository at this point in the history
  • Loading branch information
dzalkind authored and nikhar-abbas committed Jun 29, 2021
1 parent 714f56d commit 1713360
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Examples/example_05.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
sim = ROSCO_sim.Sim(turbine,controller_int)

# Define a wind speed history
dt = 0.1
dt = 0.025
tlen = 1000 # length of time to simulate (s)
ws0 = 7 # initial wind speed (m/s)
t= np.arange(0,tlen,dt)
Expand Down
20 changes: 11 additions & 9 deletions ROSCO/src/ReadSetParameters.f90
Original file line number Diff line number Diff line change
Expand Up @@ -606,16 +606,18 @@ SUBROUTINE CheckInputs(LocalVar, CntrPar, avrSWAP, ErrVar, size_avcMSG)
ErrVar%ErrMsg = 'F_SSCornerFreq must be greater than zero.'
ENDIF

! F_FlCornerFreq(1) (frequency)
IF (CntrPar%F_FlCornerFreq(1) <= 0.0) THEN
ErrVar%aviFAIL = -1
ErrVar%ErrMsg = 'F_FlCornerFreq(1) must be greater than zero.'
ENDIF
IF (CntrPar%Fl_Mode > 0) THEN
! F_FlCornerFreq(1) (frequency)
IF (CntrPar%F_FlCornerFreq(1) <= 0.0) THEN
ErrVar%aviFAIL = -1
ErrVar%ErrMsg = 'F_FlCornerFreq(1) must be greater than zero.'
ENDIF

! F_FlCornerFreq(2) (damping)
IF (CntrPar%F_FlCornerFreq(2) <= 0.0) THEN
ErrVar%aviFAIL = -1
ErrVar%ErrMsg = 'F_FlCornerFreq(2) must be greater than zero.'
! F_FlCornerFreq(2) (damping)
IF (CntrPar%F_FlCornerFreq(2) <= 0.0) THEN
ErrVar%aviFAIL = -1
ErrVar%ErrMsg = 'F_FlCornerFreq(2) must be greater than zero.'
ENDIF
ENDIF

IF (CntrPar%Flp_Mode > 0) THEN
Expand Down
2 changes: 1 addition & 1 deletion Tune_Cases/NREL5MW.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ controller_params:
PC_ControlMode: 1 # Blade pitch control mode {0: No pitch, fix to fine pitch, 1: active PI blade pitch control}
Y_ControlMode: 0 # Yaw control mode {0: no yaw control, 1: yaw rate control, 2: yaw-by-IPC}
SS_Mode: 1 # Setpoint Smoother mode {0: no setpoint smoothing, 1: introduce setpoint smoothing}
WE_Mode: 0 # Wind speed estimator mode {0: One-second low pass filtered hub height wind speed, 1: Immersion and Invariance Estimator (Ortega et al.)}
WE_Mode: 2 # Wind speed estimator mode {0: One-second low pass filtered hub height wind speed, 1: Immersion and Invariance Estimator (Ortega et al.)}
PS_Mode: 1 # Pitch saturation mode {0: no pitch saturation, 1: peak shaving, 2: Cp-maximizing pitch saturation, 3: peak shaving and Cp-maximizing pitch saturation}
SD_Mode: 0 # Shutdown mode {0: no shutdown procedure, 1: pitch to max pitch at shutdown}
Fl_Mode: 0 # Floating specific feedback mode {0: no nacelle velocity feedback, 1: nacelle velocity feedback}
Expand Down

0 comments on commit 1713360

Please sign in to comment.