diff --git a/Matlab_Toolbox/rosco_filters.m b/Matlab_Toolbox/rosco_filters.m index 83a824af8..3804d5f0b 100644 --- a/Matlab_Toolbox/rosco_filters.m +++ b/Matlab_Toolbox/rosco_filters.m @@ -2,23 +2,64 @@ clear; -%% Notch Filter +dbg = ROSCOout2Matlab('/Users/dzalkind/Tools/ROSCO1/Examples/examples_out/26_MHK/5_low_ws_debug/RM1_MHK/power_curve/base/RM1_MHK_0.RO.dbg2'); + + +%% -DT = 0.01; -omega = 2.4; -BetaNum = 0.1; -BetaDen = 0.65; -K = 2.0/DT; -b2 = (K^2.0 + 2.0*omega*BetaNum*K + omega^2.0)/(K^2.0 + 2.0*omega*BetaDen*K + omega^2.0); -b1 = (2.0*omega^2.0 - 2.0*K^2.0) / (K^2.0 + 2.0*omega*BetaDen*K + omega^2.0); -b0 = (K^2.0 - 2.0*omega*BetaNum*K + omega^2.0) / (K^2.0 + 2.0*omega*BetaDen*K + omega^2.0); -a1 = (2.0*omega^2.0 - 2.0*K^2.0) / (K^2.0 + 2.0*omega*BetaDen*K + omega^2.0); -a0 = (K^2.0 - 2.0*omega*BetaDen*K + omega^2.0)/ (K^2.0 + 2.0*omega*BetaDen*K + omega^2.0); +%% -notch_filt = tf([b2,b1,b0],[1,a1,a0],DT) +num2 = 0.001; +den2 = 0.1; +num1 = 0.001; +den1 = 0.1; + +NF1 = notch(1,num1,den1,0.01); +NF2 = notch(2.42,num2,den2,0.01); figure(1); -bode(notch_filt) +bode(NF1) +bode(NF2) +bode(NF1*NF2) + +% BS = fdesign.bandstop( + + + + +y = lsim(NF1*NF2,dbg.GenSpeed,dbg.Time); +% % +% % +figure(2); +plot(dbg.Time,dbg.GenSpeed) +hold on; +plot(dbg.Time,dbg.GenSpeedF) +plot(dbg.Time,y) +% % +% % +hold off + +%% Notch Filter + +function notch_filt = notch(omega,BetaNum,BetaDen,DT) + +% DT = 0.01; +% +% omega = 1; +% BetaNum = 0.01; +% BetaDen = 0.25; + + K = 2.0/DT; + b2 = (K^2.0 + 2.0*omega*BetaNum*K + omega^2.0)/(K^2.0 + 2.0*omega*BetaDen*K + omega^2.0); + b1 = (2.0*omega^2.0 - 2.0*K^2.0) / (K^2.0 + 2.0*omega*BetaDen*K + omega^2.0); + b0 = (K^2.0 - 2.0*omega*BetaNum*K + omega^2.0) / (K^2.0 + 2.0*omega*BetaDen*K + omega^2.0); + a1 = (2.0*omega^2.0 - 2.0*K^2.0) / (K^2.0 + 2.0*omega*BetaDen*K + omega^2.0); + a0 = (K^2.0 - 2.0*omega*BetaDen*K + omega^2.0)/ (K^2.0 + 2.0*omega*BetaDen*K + omega^2.0); + + notch_filt = tf([b2,b1,b0],[1,a1,a0],DT); + +end + diff --git a/ROSCO/rosco_registry/rosco_types.yaml b/ROSCO/rosco_registry/rosco_types.yaml index 9eb8b3b2d..43a19afc4 100644 --- a/ROSCO/rosco_registry/rosco_types.yaml +++ b/ROSCO/rosco_registry/rosco_types.yaml @@ -293,6 +293,9 @@ ControlParameters: VS_TSRopt: <<: *real description: Power-maximizing region 2 tip-speed ratio [rad] + VS_PwrFiltF: + <<: *real + description: Cut-off frequency of filter on generator power for power-based tsr tracking control # Setpoint Smoother SS_Mode: @@ -898,6 +901,9 @@ LocalVariables: VS_GenPwr: <<: *real description: Generator power [W] + VS_GenPwrF: + <<: *real + description: Generator power [W] GenSpeed: <<: *real description: Generator speed (HSS) [rad/s] @@ -966,6 +972,9 @@ LocalVariables: <<: *real description: Tower fore-aft vibration damping pitch contribution [rad] size: 3 + VS_RefSpd: + <<: *real + description: Torque control generator speed set point [rad/s] RotSpeedF: <<: *real description: Filtered LSS (generator) speed [rad/s]. diff --git a/ROSCO/src/ControllerBlocks.f90 b/ROSCO/src/ControllerBlocks.f90 index 4497698bd..a02374ea8 100644 --- a/ROSCO/src/ControllerBlocks.f90 +++ b/ROSCO/src/ControllerBlocks.f90 @@ -46,39 +46,40 @@ SUBROUTINE ComputeVariablesSetpoints(CntrPar, LocalVar, objInst) LocalVar%PC_SpdErr = PC_RefSpd - LocalVar%GenSpeedF ! Speed error LocalVar%PC_PwrErr = CntrPar%VS_RtPwr - LocalVar%VS_GenPwr ! Power error - + ! ----- Torque controller reference errors ----- ! Define VS reference generator speed [rad/s] IF (CntrPar%VS_ControlMode == 2) THEN - VS_RefSpd = (CntrPar%VS_TSRopt * LocalVar%We_Vw_F / CntrPar%WE_BladeRadius) * CntrPar%WE_GearboxRatio + LocalVar%VS_RefSpd = (CntrPar%VS_TSRopt * LocalVar%We_Vw_F / CntrPar%WE_BladeRadius) * CntrPar%WE_GearboxRatio ELSEIF (CntrPar%VS_ControlMode == 3) THEN - VS_RefSpd = (LocalVar%VS_GenPwr/CntrPar%VS_Rgn2K)**(1./3.) ! Genspeed reference that doesnt depend on wind speed estimate (https://doi.org/10.2172/1259805) + LocalVar%VS_GenPwrF = LPFilter(LocalVar%VS_GenPwr, LocalVar%DT,CntrPar%VS_PwrFiltF, LocalVar%FP, LocalVar%iStatus, LocalVar%restart, objInst%instLPF) ! 30 second time constant + LocalVar%VS_RefSpd = (LocalVar%VS_GenPwrF/CntrPar%VS_Rgn2K)**(1./3.) ! Genspeed reference that doesnt depend on wind speed estimate (https://doi.org/10.2172/1259805) ELSE - VS_RefSpd = CntrPar%VS_RefSpd + LocalVar%VS_RefSpd = CntrPar%VS_RefSpd ENDIF - VS_RefSpd = saturate(VS_RefSpd,CntrPar%VS_MinOMSpd, CntrPar%VS_RefSpd) + LocalVar%VS_RefSpd = saturate(LocalVar%VS_RefSpd,CntrPar%VS_MinOMSpd, CntrPar%VS_RefSpd) ! Implement setpoint smoothing IF (LocalVar%SS_DelOmegaF > 0) THEN - VS_RefSpd = VS_RefSpd - LocalVar%SS_DelOmegaF + LocalVar%VS_RefSpd = LocalVar%VS_RefSpd - LocalVar%SS_DelOmegaF ENDIF ! Force zero torque in shutdown mode IF (LocalVar%SD) THEN - VS_RefSpd = CntrPar%VS_MinOMSpd + LocalVar%VS_RefSpd = CntrPar%VS_MinOMSpd ENDIF ! Force minimum rotor speed - VS_RefSpd = max(VS_RefSpd, CntrPar%VS_MinOmSpd) + LocalVar%VS_RefSpd = max(LocalVar%VS_RefSpd, CntrPar%VS_MinOmSpd) ! TSR-tracking reference error IF ((CntrPar%VS_ControlMode == 2) .OR. (CntrPar%VS_ControlMode == 3)) THEN - LocalVar%VS_SpdErr = VS_RefSpd - LocalVar%GenSpeedF + LocalVar%VS_SpdErr = LocalVar%VS_RefSpd - LocalVar%GenSpeedF ENDIF ! Define transition region setpoint errors - LocalVar%VS_SpdErrAr = VS_RefSpd - LocalVar%GenSpeedF ! Current speed error - Region 2.5 PI-control (Above Rated) + LocalVar%VS_SpdErrAr = LocalVar%VS_RefSpd - LocalVar%GenSpeedF ! Current speed error - Region 2.5 PI-control (Above Rated) LocalVar%VS_SpdErrBr = CntrPar%VS_MinOMSpd - LocalVar%GenSpeedF ! Current speed error - Region 1.5 PI-control (Below Rated) ! Region 3 minimum pitch angle for state machine diff --git a/ROSCO/src/ROSCO_IO.f90 b/ROSCO/src/ROSCO_IO.f90 index b598f08f7..a711e9f22 100644 --- a/ROSCO/src/ROSCO_IO.f90 +++ b/ROSCO/src/ROSCO_IO.f90 @@ -42,6 +42,7 @@ SUBROUTINE WriteRestartFile(LocalVar, CntrPar, ErrVar, objInst, RootName, size_a WRITE( Un, IOSTAT=ErrStat) LocalVar%n_DT WRITE( Un, IOSTAT=ErrStat) LocalVar%Time_Last WRITE( Un, IOSTAT=ErrStat) LocalVar%VS_GenPwr + WRITE( Un, IOSTAT=ErrStat) LocalVar%VS_GenPwrF WRITE( Un, IOSTAT=ErrStat) LocalVar%GenSpeed WRITE( Un, IOSTAT=ErrStat) LocalVar%RotSpeed WRITE( Un, IOSTAT=ErrStat) LocalVar%NacHeading @@ -72,6 +73,7 @@ SUBROUTINE WriteRestartFile(LocalVar, CntrPar, ErrVar, objInst, RootName, size_a WRITE( Un, IOSTAT=ErrStat) LocalVar%FA_PitCom(1) WRITE( Un, IOSTAT=ErrStat) LocalVar%FA_PitCom(2) WRITE( Un, IOSTAT=ErrStat) LocalVar%FA_PitCom(3) + WRITE( Un, IOSTAT=ErrStat) LocalVar%VS_RefSpd WRITE( Un, IOSTAT=ErrStat) LocalVar%RotSpeedF WRITE( Un, IOSTAT=ErrStat) LocalVar%GenSpeedF WRITE( Un, IOSTAT=ErrStat) LocalVar%GenTq @@ -322,6 +324,7 @@ SUBROUTINE ReadRestartFile(avrSWAP, LocalVar, CntrPar, objInst, PerfData, RootNa READ( Un, IOSTAT=ErrStat) LocalVar%n_DT READ( Un, IOSTAT=ErrStat) LocalVar%Time_Last READ( Un, IOSTAT=ErrStat) LocalVar%VS_GenPwr + READ( Un, IOSTAT=ErrStat) LocalVar%VS_GenPwrF READ( Un, IOSTAT=ErrStat) LocalVar%GenSpeed READ( Un, IOSTAT=ErrStat) LocalVar%RotSpeed READ( Un, IOSTAT=ErrStat) LocalVar%NacHeading @@ -352,6 +355,7 @@ SUBROUTINE ReadRestartFile(avrSWAP, LocalVar, CntrPar, objInst, PerfData, RootNa READ( Un, IOSTAT=ErrStat) LocalVar%FA_PitCom(1) READ( Un, IOSTAT=ErrStat) LocalVar%FA_PitCom(2) READ( Un, IOSTAT=ErrStat) LocalVar%FA_PitCom(3) + READ( Un, IOSTAT=ErrStat) LocalVar%VS_RefSpd READ( Un, IOSTAT=ErrStat) LocalVar%RotSpeedF READ( Un, IOSTAT=ErrStat) LocalVar%GenSpeedF READ( Un, IOSTAT=ErrStat) LocalVar%GenTq @@ -643,7 +647,7 @@ SUBROUTINE Debug(LocalVar, CntrPar, DebugVar, ErrVar, avrSWAP, RootName, size_av '[rad/s]', '[rad/s]', '[m/s]', '[rad]', '[rad]', & '[N/A]', '[N/A]', '[N/A]', '[N/A]', '[rad/s]', & '[deg]', '[deg]', '[deg]', '[N/A]'] - nLocalVars = 108 + nLocalVars = 110 Allocate(LocalVarOutData(nLocalVars)) Allocate(LocalVarOutStrings(nLocalVars)) LocalVarOutData(1) = LocalVar%iStatus @@ -652,130 +656,133 @@ SUBROUTINE Debug(LocalVar, CntrPar, DebugVar, ErrVar, avrSWAP, RootName, size_av LocalVarOutData(4) = LocalVar%n_DT LocalVarOutData(5) = LocalVar%Time_Last LocalVarOutData(6) = LocalVar%VS_GenPwr - LocalVarOutData(7) = LocalVar%GenSpeed - LocalVarOutData(8) = LocalVar%RotSpeed - LocalVarOutData(9) = LocalVar%NacHeading - LocalVarOutData(10) = LocalVar%NacVane - LocalVarOutData(11) = LocalVar%HorWindV - LocalVarOutData(12) = LocalVar%rootMOOP(1) - LocalVarOutData(13) = LocalVar%rootMOOPF(1) - LocalVarOutData(14) = LocalVar%BlPitch(1) - LocalVarOutData(15) = LocalVar%BlPitchCMeas - LocalVarOutData(16) = LocalVar%Azimuth - LocalVarOutData(17) = LocalVar%OL_Azimuth - LocalVarOutData(18) = LocalVar%AzUnwrapped - LocalVarOutData(19) = LocalVar%AzError - LocalVarOutData(20) = LocalVar%GenTqAz - LocalVarOutData(21) = LocalVar%AzBuffer(1) - LocalVarOutData(22) = LocalVar%NumBl - LocalVarOutData(23) = LocalVar%FA_Acc - LocalVarOutData(24) = LocalVar%NacIMU_FA_Acc - LocalVarOutData(25) = LocalVar%FA_AccHPF - LocalVarOutData(26) = LocalVar%FA_AccHPFI - LocalVarOutData(27) = LocalVar%FA_PitCom(1) - LocalVarOutData(28) = LocalVar%RotSpeedF - LocalVarOutData(29) = LocalVar%GenSpeedF - LocalVarOutData(30) = LocalVar%GenTq - LocalVarOutData(31) = LocalVar%GenTqMeas - LocalVarOutData(32) = LocalVar%GenArTq - LocalVarOutData(33) = LocalVar%GenBrTq - LocalVarOutData(34) = LocalVar%IPC_PitComF(1) - LocalVarOutData(35) = LocalVar%PC_KP - LocalVarOutData(36) = LocalVar%PC_KI - LocalVarOutData(37) = LocalVar%PC_KD - LocalVarOutData(38) = LocalVar%PC_TF - LocalVarOutData(39) = LocalVar%PC_MaxPit - LocalVarOutData(40) = LocalVar%PC_MinPit - LocalVarOutData(41) = LocalVar%PC_PitComT - LocalVarOutData(42) = LocalVar%PC_PitComT_Last - LocalVarOutData(43) = LocalVar%PC_PitComTF - LocalVarOutData(44) = LocalVar%PC_PitComT_IPC(1) - LocalVarOutData(45) = LocalVar%PC_PwrErr - LocalVarOutData(46) = LocalVar%PC_SpdErr - LocalVarOutData(47) = LocalVar%IPC_AxisTilt_1P - LocalVarOutData(48) = LocalVar%IPC_AxisYaw_1P - LocalVarOutData(49) = LocalVar%IPC_AxisTilt_2P - LocalVarOutData(50) = LocalVar%IPC_AxisYaw_2P - LocalVarOutData(51) = LocalVar%axisTilt_1P - LocalVarOutData(52) = LocalVar%axisYaw_1P - LocalVarOutData(53) = LocalVar%axisYawF_1P - LocalVarOutData(54) = LocalVar%axisTilt_2P - LocalVarOutData(55) = LocalVar%axisYaw_2P - LocalVarOutData(56) = LocalVar%axisYawF_2P - LocalVarOutData(57) = LocalVar%IPC_KI(1) - LocalVarOutData(58) = LocalVar%IPC_KP(1) - LocalVarOutData(59) = LocalVar%IPC_IntSat - LocalVarOutData(60) = LocalVar%PC_State - LocalVarOutData(61) = LocalVar%PitCom(1) - LocalVarOutData(62) = LocalVar%PitComAct(1) - LocalVarOutData(63) = LocalVar%SS_DelOmegaF - LocalVarOutData(64) = LocalVar%TestType - LocalVarOutData(65) = LocalVar%Kp_Float - LocalVarOutData(66) = LocalVar%VS_MaxTq - LocalVarOutData(67) = LocalVar%VS_LastGenTrq - LocalVarOutData(68) = LocalVar%VS_LastGenPwr - LocalVarOutData(69) = LocalVar%VS_MechGenPwr - LocalVarOutData(70) = LocalVar%VS_SpdErrAr - LocalVarOutData(71) = LocalVar%VS_SpdErrBr - LocalVarOutData(72) = LocalVar%VS_SpdErr - LocalVarOutData(73) = LocalVar%VS_State - LocalVarOutData(74) = LocalVar%VS_Rgn3Pitch - LocalVarOutData(75) = LocalVar%WE_Vw - LocalVarOutData(76) = LocalVar%WE_Vw_F - LocalVarOutData(77) = LocalVar%WE_VwI - LocalVarOutData(78) = LocalVar%WE_VwIdot - LocalVarOutData(79) = LocalVar%VS_LastGenTrqF - LocalVarOutData(80) = LocalVar%Fl_PitCom - LocalVarOutData(81) = LocalVar%NACIMU_FA_AccF - LocalVarOutData(82) = LocalVar%FA_AccF - LocalVarOutData(83) = LocalVar%PtfmTDX - LocalVarOutData(84) = LocalVar%PtfmTDY - LocalVarOutData(85) = LocalVar%PtfmTDZ - LocalVarOutData(86) = LocalVar%PtfmRDX - LocalVarOutData(87) = LocalVar%PtfmRDY - LocalVarOutData(88) = LocalVar%PtfmRDZ - LocalVarOutData(89) = LocalVar%PtfmTVX - LocalVarOutData(90) = LocalVar%PtfmTVY - LocalVarOutData(91) = LocalVar%PtfmTVZ - LocalVarOutData(92) = LocalVar%PtfmRVX - LocalVarOutData(93) = LocalVar%PtfmRVY - LocalVarOutData(94) = LocalVar%PtfmRVZ - LocalVarOutData(95) = LocalVar%PtfmTAX - LocalVarOutData(96) = LocalVar%PtfmTAY - LocalVarOutData(97) = LocalVar%PtfmTAZ - LocalVarOutData(98) = LocalVar%PtfmRAX - LocalVarOutData(99) = LocalVar%PtfmRAY - LocalVarOutData(100) = LocalVar%PtfmRAZ - LocalVarOutData(101) = LocalVar%CC_DesiredL(1) - LocalVarOutData(102) = LocalVar%CC_ActuatedL(1) - LocalVarOutData(103) = LocalVar%CC_ActuatedDL(1) - LocalVarOutData(104) = LocalVar%StC_Input(1) - LocalVarOutData(105) = LocalVar%Flp_Angle(1) - LocalVarOutData(106) = LocalVar%RootMyb_Last(1) - LocalVarOutData(107) = LocalVar%ACC_INFILE_SIZE - LocalVarOutData(108) = LocalVar%AWC_complexangle(1) + LocalVarOutData(7) = LocalVar%VS_GenPwrF + LocalVarOutData(8) = LocalVar%GenSpeed + LocalVarOutData(9) = LocalVar%RotSpeed + LocalVarOutData(10) = LocalVar%NacHeading + LocalVarOutData(11) = LocalVar%NacVane + LocalVarOutData(12) = LocalVar%HorWindV + LocalVarOutData(13) = LocalVar%rootMOOP(1) + LocalVarOutData(14) = LocalVar%rootMOOPF(1) + LocalVarOutData(15) = LocalVar%BlPitch(1) + LocalVarOutData(16) = LocalVar%BlPitchCMeas + LocalVarOutData(17) = LocalVar%Azimuth + LocalVarOutData(18) = LocalVar%OL_Azimuth + LocalVarOutData(19) = LocalVar%AzUnwrapped + LocalVarOutData(20) = LocalVar%AzError + LocalVarOutData(21) = LocalVar%GenTqAz + LocalVarOutData(22) = LocalVar%AzBuffer(1) + LocalVarOutData(23) = LocalVar%NumBl + LocalVarOutData(24) = LocalVar%FA_Acc + LocalVarOutData(25) = LocalVar%NacIMU_FA_Acc + LocalVarOutData(26) = LocalVar%FA_AccHPF + LocalVarOutData(27) = LocalVar%FA_AccHPFI + LocalVarOutData(28) = LocalVar%FA_PitCom(1) + LocalVarOutData(29) = LocalVar%VS_RefSpd + LocalVarOutData(30) = LocalVar%RotSpeedF + LocalVarOutData(31) = LocalVar%GenSpeedF + LocalVarOutData(32) = LocalVar%GenTq + LocalVarOutData(33) = LocalVar%GenTqMeas + LocalVarOutData(34) = LocalVar%GenArTq + LocalVarOutData(35) = LocalVar%GenBrTq + LocalVarOutData(36) = LocalVar%IPC_PitComF(1) + LocalVarOutData(37) = LocalVar%PC_KP + LocalVarOutData(38) = LocalVar%PC_KI + LocalVarOutData(39) = LocalVar%PC_KD + LocalVarOutData(40) = LocalVar%PC_TF + LocalVarOutData(41) = LocalVar%PC_MaxPit + LocalVarOutData(42) = LocalVar%PC_MinPit + LocalVarOutData(43) = LocalVar%PC_PitComT + LocalVarOutData(44) = LocalVar%PC_PitComT_Last + LocalVarOutData(45) = LocalVar%PC_PitComTF + LocalVarOutData(46) = LocalVar%PC_PitComT_IPC(1) + LocalVarOutData(47) = LocalVar%PC_PwrErr + LocalVarOutData(48) = LocalVar%PC_SpdErr + LocalVarOutData(49) = LocalVar%IPC_AxisTilt_1P + LocalVarOutData(50) = LocalVar%IPC_AxisYaw_1P + LocalVarOutData(51) = LocalVar%IPC_AxisTilt_2P + LocalVarOutData(52) = LocalVar%IPC_AxisYaw_2P + LocalVarOutData(53) = LocalVar%axisTilt_1P + LocalVarOutData(54) = LocalVar%axisYaw_1P + LocalVarOutData(55) = LocalVar%axisYawF_1P + LocalVarOutData(56) = LocalVar%axisTilt_2P + LocalVarOutData(57) = LocalVar%axisYaw_2P + LocalVarOutData(58) = LocalVar%axisYawF_2P + LocalVarOutData(59) = LocalVar%IPC_KI(1) + LocalVarOutData(60) = LocalVar%IPC_KP(1) + LocalVarOutData(61) = LocalVar%IPC_IntSat + LocalVarOutData(62) = LocalVar%PC_State + LocalVarOutData(63) = LocalVar%PitCom(1) + LocalVarOutData(64) = LocalVar%PitComAct(1) + LocalVarOutData(65) = LocalVar%SS_DelOmegaF + LocalVarOutData(66) = LocalVar%TestType + LocalVarOutData(67) = LocalVar%Kp_Float + LocalVarOutData(68) = LocalVar%VS_MaxTq + LocalVarOutData(69) = LocalVar%VS_LastGenTrq + LocalVarOutData(70) = LocalVar%VS_LastGenPwr + LocalVarOutData(71) = LocalVar%VS_MechGenPwr + LocalVarOutData(72) = LocalVar%VS_SpdErrAr + LocalVarOutData(73) = LocalVar%VS_SpdErrBr + LocalVarOutData(74) = LocalVar%VS_SpdErr + LocalVarOutData(75) = LocalVar%VS_State + LocalVarOutData(76) = LocalVar%VS_Rgn3Pitch + LocalVarOutData(77) = LocalVar%WE_Vw + LocalVarOutData(78) = LocalVar%WE_Vw_F + LocalVarOutData(79) = LocalVar%WE_VwI + LocalVarOutData(80) = LocalVar%WE_VwIdot + LocalVarOutData(81) = LocalVar%VS_LastGenTrqF + LocalVarOutData(82) = LocalVar%Fl_PitCom + LocalVarOutData(83) = LocalVar%NACIMU_FA_AccF + LocalVarOutData(84) = LocalVar%FA_AccF + LocalVarOutData(85) = LocalVar%PtfmTDX + LocalVarOutData(86) = LocalVar%PtfmTDY + LocalVarOutData(87) = LocalVar%PtfmTDZ + LocalVarOutData(88) = LocalVar%PtfmRDX + LocalVarOutData(89) = LocalVar%PtfmRDY + LocalVarOutData(90) = LocalVar%PtfmRDZ + LocalVarOutData(91) = LocalVar%PtfmTVX + LocalVarOutData(92) = LocalVar%PtfmTVY + LocalVarOutData(93) = LocalVar%PtfmTVZ + LocalVarOutData(94) = LocalVar%PtfmRVX + LocalVarOutData(95) = LocalVar%PtfmRVY + LocalVarOutData(96) = LocalVar%PtfmRVZ + LocalVarOutData(97) = LocalVar%PtfmTAX + LocalVarOutData(98) = LocalVar%PtfmTAY + LocalVarOutData(99) = LocalVar%PtfmTAZ + LocalVarOutData(100) = LocalVar%PtfmRAX + LocalVarOutData(101) = LocalVar%PtfmRAY + LocalVarOutData(102) = LocalVar%PtfmRAZ + LocalVarOutData(103) = LocalVar%CC_DesiredL(1) + LocalVarOutData(104) = LocalVar%CC_ActuatedL(1) + LocalVarOutData(105) = LocalVar%CC_ActuatedDL(1) + LocalVarOutData(106) = LocalVar%StC_Input(1) + LocalVarOutData(107) = LocalVar%Flp_Angle(1) + LocalVarOutData(108) = LocalVar%RootMyb_Last(1) + LocalVarOutData(109) = LocalVar%ACC_INFILE_SIZE + LocalVarOutData(110) = LocalVar%AWC_complexangle(1) LocalVarOutStrings = [CHARACTER(15) :: 'iStatus', 'Time', 'DT', 'n_DT', 'Time_Last', & - 'VS_GenPwr', 'GenSpeed', 'RotSpeed', 'NacHeading', 'NacVane', & - 'HorWindV', 'rootMOOP', 'rootMOOPF', 'BlPitch', 'BlPitchCMeas', & - 'Azimuth', 'OL_Azimuth', 'AzUnwrapped', 'AzError', 'GenTqAz', & - 'AzBuffer', 'NumBl', 'FA_Acc', 'NacIMU_FA_Acc', 'FA_AccHPF', & - 'FA_AccHPFI', 'FA_PitCom', 'RotSpeedF', 'GenSpeedF', 'GenTq', & - 'GenTqMeas', 'GenArTq', 'GenBrTq', 'IPC_PitComF', 'PC_KP', & - 'PC_KI', 'PC_KD', 'PC_TF', 'PC_MaxPit', 'PC_MinPit', & - 'PC_PitComT', 'PC_PitComT_Last', 'PC_PitComTF', 'PC_PitComT_IPC', 'PC_PwrErr', & - 'PC_SpdErr', 'IPC_AxisTilt_1P', 'IPC_AxisYaw_1P', 'IPC_AxisTilt_2P', 'IPC_AxisYaw_2P', & - 'axisTilt_1P', 'axisYaw_1P', 'axisYawF_1P', 'axisTilt_2P', 'axisYaw_2P', & - 'axisYawF_2P', 'IPC_KI', 'IPC_KP', 'IPC_IntSat', 'PC_State', & - 'PitCom', 'PitComAct', 'SS_DelOmegaF', 'TestType', 'Kp_Float', & - 'VS_MaxTq', 'VS_LastGenTrq', 'VS_LastGenPwr', 'VS_MechGenPwr', 'VS_SpdErrAr', & - 'VS_SpdErrBr', 'VS_SpdErr', 'VS_State', 'VS_Rgn3Pitch', 'WE_Vw', & - 'WE_Vw_F', 'WE_VwI', 'WE_VwIdot', 'VS_LastGenTrqF', 'Fl_PitCom', & - 'NACIMU_FA_AccF', 'FA_AccF', 'PtfmTDX', 'PtfmTDY', 'PtfmTDZ', & - 'PtfmRDX', 'PtfmRDY', 'PtfmRDZ', 'PtfmTVX', 'PtfmTVY', & - 'PtfmTVZ', 'PtfmRVX', 'PtfmRVY', 'PtfmRVZ', 'PtfmTAX', & - 'PtfmTAY', 'PtfmTAZ', 'PtfmRAX', 'PtfmRAY', 'PtfmRAZ', & - 'CC_DesiredL', 'CC_ActuatedL', 'CC_ActuatedDL', 'StC_Input', 'Flp_Angle', & - 'RootMyb_Last', 'ACC_INFILE_SIZE', 'AWC_complexangle'] + 'VS_GenPwr', 'VS_GenPwrF', 'GenSpeed', 'RotSpeed', 'NacHeading', & + 'NacVane', 'HorWindV', 'rootMOOP', 'rootMOOPF', 'BlPitch', & + 'BlPitchCMeas', 'Azimuth', 'OL_Azimuth', 'AzUnwrapped', 'AzError', & + 'GenTqAz', 'AzBuffer', 'NumBl', 'FA_Acc', 'NacIMU_FA_Acc', & + 'FA_AccHPF', 'FA_AccHPFI', 'FA_PitCom', 'VS_RefSpd', 'RotSpeedF', & + 'GenSpeedF', 'GenTq', 'GenTqMeas', 'GenArTq', 'GenBrTq', & + 'IPC_PitComF', 'PC_KP', 'PC_KI', 'PC_KD', 'PC_TF', & + 'PC_MaxPit', 'PC_MinPit', 'PC_PitComT', 'PC_PitComT_Last', 'PC_PitComTF', & + 'PC_PitComT_IPC', 'PC_PwrErr', 'PC_SpdErr', 'IPC_AxisTilt_1P', 'IPC_AxisYaw_1P', & + 'IPC_AxisTilt_2P', 'IPC_AxisYaw_2P', 'axisTilt_1P', 'axisYaw_1P', 'axisYawF_1P', & + 'axisTilt_2P', 'axisYaw_2P', 'axisYawF_2P', 'IPC_KI', 'IPC_KP', & + 'IPC_IntSat', 'PC_State', 'PitCom', 'PitComAct', 'SS_DelOmegaF', & + 'TestType', 'Kp_Float', 'VS_MaxTq', 'VS_LastGenTrq', 'VS_LastGenPwr', & + 'VS_MechGenPwr', 'VS_SpdErrAr', 'VS_SpdErrBr', 'VS_SpdErr', 'VS_State', & + 'VS_Rgn3Pitch', 'WE_Vw', 'WE_Vw_F', 'WE_VwI', 'WE_VwIdot', & + 'VS_LastGenTrqF', 'Fl_PitCom', 'NACIMU_FA_AccF', 'FA_AccF', 'PtfmTDX', & + 'PtfmTDY', 'PtfmTDZ', 'PtfmRDX', 'PtfmRDY', 'PtfmRDZ', & + 'PtfmTVX', 'PtfmTVY', 'PtfmTVZ', 'PtfmRVX', 'PtfmRVY', & + 'PtfmRVZ', 'PtfmTAX', 'PtfmTAY', 'PtfmTAZ', 'PtfmRAX', & + 'PtfmRAY', 'PtfmRAZ', 'CC_DesiredL', 'CC_ActuatedL', 'CC_ActuatedDL', & + 'StC_Input', 'Flp_Angle', 'RootMyb_Last', 'ACC_INFILE_SIZE', 'AWC_complexangle' & + ] ! Initialize debug file IF ((LocalVar%iStatus == 0) .OR. (LocalVar%iStatus == -9)) THEN ! .TRUE. if we're on the first call to the DLL IF (CntrPar%LoggingLevel > 0) THEN @@ -790,8 +797,8 @@ SUBROUTINE Debug(LocalVar, CntrPar, DebugVar, ErrVar, avrSWAP, RootName, size_av CALL GetNewUnit(UnDb2, ErrVar) OPEN(unit=UnDb2, FILE=TRIM(RootName)//'.RO.dbg2') WRITE(UnDb2, *) 'Generated on '//CurDate()//' at '//CurTime()//' using ROSCO-'//TRIM(rosco_version) - WRITE(UnDb2, '(109(a20,TR5:))') 'Time', LocalVarOutStrings - WRITE(UnDb2, '(109(a20,TR5:))') + WRITE(UnDb2, '(111(a20,TR5:))') 'Time', LocalVarOutStrings + WRITE(UnDb2, '(111(a20,TR5:))') END IF IF (CntrPar%LoggingLevel > 2) THEN @@ -854,7 +861,7 @@ SUBROUTINE Debug(LocalVar, CntrPar, DebugVar, ErrVar, avrSWAP, RootName, size_av END DO ! Write debug files - FmtDat = "(F20.5,TR5,108(ES20.5E2,TR5:))" ! The format of the debugging data + FmtDat = "(F20.5,TR5,110(ES20.5E2,TR5:))" ! The format of the debugging data IF ( MOD(LocalVar%n_DT, CntrPar%n_DT_Out) == 0) THEN IF(CntrPar%LoggingLevel > 0) THEN WRITE (UnDb, FmtDat) LocalVar%Time, DebugOutData diff --git a/ROSCO/src/ROSCO_Types.f90 b/ROSCO/src/ROSCO_Types.f90 index cfc48f854..778549623 100644 --- a/ROSCO/src/ROSCO_Types.f90 +++ b/ROSCO/src/ROSCO_Types.f90 @@ -13,7 +13,6 @@ MODULE ROSCO_Types REAL(DbKi) :: DT_Out ! Output time step INTEGER(IntKi) :: n_DT_Out ! output every this many steps INTEGER(IntKi) :: F_LPFType ! Low pass filter on the rotor and generator speed {1 - first-order low-pass filter, 2 - second-order low-pass filter}, [rad/s] - INTEGER(IntKi) :: F_NotchType ! Notch on the measured generator speed {0 - disable, 1 - enable} REAL(DbKi) :: F_LPFCornerFreq ! Corner frequency (-3dB point) in the first-order low-pass filter, [rad/s] REAL(DbKi) :: F_LPFDamping ! Damping coefficient [used only when F_FilterType = 2] INTEGER(IntKi) :: F_NumNotchFilts ! Number of notch filters @@ -72,6 +71,7 @@ MODULE ROSCO_Types REAL(DbKi), DIMENSION(:), ALLOCATABLE :: VS_KP ! Proportional gain for generator PI torque controller, used in the transitional 2.5 region REAL(DbKi), DIMENSION(:), ALLOCATABLE :: VS_KI ! Integral gain for generator PI torque controller, used in the transitional 2.5 region REAL(DbKi) :: VS_TSRopt ! Power-maximizing region 2 tip-speed ratio [rad] + REAL(DbKi) :: VS_PwrFiltF ! Cut-off frequency of filter on generator power for power-based tsr tracking control INTEGER(IntKi) :: SS_Mode ! Setpoint Smoother mode {0 - no setpoint smoothing, 1 - introduce setpoint smoothing} REAL(DbKi) :: SS_VSGain ! Variable speed torque controller setpoint smoother gain, [-]. REAL(DbKi) :: SS_PCGain ! Collective pitch controller setpoint smoother gain, [-]. @@ -242,6 +242,7 @@ MODULE ROSCO_Types INTEGER(IntKi) :: n_DT ! number of timesteps since start REAL(DbKi) :: Time_Last ! Last time [s] REAL(DbKi) :: VS_GenPwr ! Generator power [W] + REAL(DbKi) :: VS_GenPwrF ! Generator power [W] REAL(DbKi) :: GenSpeed ! Generator speed (HSS) [rad/s] REAL(DbKi) :: RotSpeed ! Rotor speed (LSS) [rad/s] REAL(DbKi) :: NacHeading ! Nacelle heading of the turbine w.r.t. north [deg] @@ -263,6 +264,7 @@ MODULE ROSCO_Types REAL(DbKi) :: FA_AccHPF ! High-pass filtered fore-aft acceleration [m/s^2] REAL(DbKi) :: FA_AccHPFI ! Tower velocity, high-pass filtered and integrated fore-aft acceleration [m/s] REAL(DbKi) :: FA_PitCom(3) ! Tower fore-aft vibration damping pitch contribution [rad] + REAL(DbKi) :: VS_RefSpd ! Torque control generator speed set point [rad/s] REAL(DbKi) :: RotSpeedF ! Filtered LSS (generator) speed [rad/s]. REAL(DbKi) :: GenSpeedF ! Filtered HSS (generator) speed [rad/s]. REAL(DbKi) :: GenTq ! Electrical generator torque, [Nm]. diff --git a/ROSCO/src/ReadSetParameters.f90 b/ROSCO/src/ReadSetParameters.f90 index d5d5abb0e..f05961132 100644 --- a/ROSCO/src/ReadSetParameters.f90 +++ b/ROSCO/src/ReadSetParameters.f90 @@ -226,6 +226,7 @@ SUBROUTINE SetParameters(avrSWAP, accINFILE, size_avcMSG, CntrPar, LocalVar, obj ENDIF LocalVar%VS_LastGenTrq = LocalVar%GenTq LocalVar%VS_MaxTq = CntrPar%VS_MaxTq + LocalVar%VS_GenPwr = LocalVar%GenTq * LocalVar%GenSpeed ! Initialize variables LocalVar%CC_DesiredL = 0 @@ -426,6 +427,7 @@ SUBROUTINE ReadControlParameterFileSub(CntrPar, LocalVar, zmqVar, accINFILE, acc CALL ParseAry( FileLines, 'VS_KP', CntrPar%VS_KP, CntrPar%VS_n, accINFILE(1), ErrVar, .FALSE., UnEc) CALL ParseAry( FileLines, 'VS_KI', CntrPar%VS_KI, CntrPar%VS_n, accINFILE(1), ErrVar, .FALSE., UnEc) CALL ParseInput(FileLines, 'VS_TSRopt', CntrPar%VS_TSRopt, accINFILE(1), ErrVar, CntrPar%VS_ControlMode < 2, UnEc) + CALL ParseInput(FileLines, 'VS_PwrFiltF', CntrPar%VS_PwrFiltF, accINFILE(1), ErrVar, CntrPar%VS_ControlMode .NE. 3, UnEc) IF (ErrVar%aviFAIL < 0) RETURN !------- Setpoint Smoother -------------------------------- diff --git a/ROSCO_toolbox/controller.py b/ROSCO_toolbox/controller.py index 5b127a799..63f1adc90 100644 --- a/ROSCO_toolbox/controller.py +++ b/ROSCO_toolbox/controller.py @@ -323,7 +323,8 @@ def tune_controller(self, turbine): self.vs_gain_schedule.second_order_PI(self.zeta_vs, self.omega_vs,A_vs,B_tau[0:len(v_below_rated)],linearize=False,v=v_below_rated) # -- Find K for Komega_g^2 -- - self.vs_rgn2K = (pi*rho*R**5.0 * turbine.Cp.max) / (2.0 * turbine.Cp.TSR_opt**3 * Ng**3)/ (turbine.GBoxEff/100) + self.vs_rgn2K = (pi*rho*R**5.0 * turbine.Cp.max * turbine.GBoxEff/100 * turbine.GenEff/100) / \ + (2.0 * turbine.Cp.TSR_opt**3 * Ng**3) self.vs_refspd = min(turbine.TSR_operational * turbine.v_rated/R, turbine.rated_rotor_speed) * Ng # -- Define some setpoints -- diff --git a/ROSCO_toolbox/inputs/toolbox_schema.yaml b/ROSCO_toolbox/inputs/toolbox_schema.yaml index 5d4d73591..6ef5f3a80 100644 --- a/ROSCO_toolbox/inputs/toolbox_schema.yaml +++ b/ROSCO_toolbox/inputs/toolbox_schema.yaml @@ -765,7 +765,7 @@ properties: units: rad/s VS_Rgn2K: type: number - description: Generator torque constant in Region 2 (HSS side) + description: Generator torque constant in Region 2 (HSS side). Only used in VS_ControlMode = 1,3 units: Nm/(rad/s)^2 VS_RtPwr: type: number @@ -791,8 +791,13 @@ properties: units: s VS_TSRopt: type: number - description: Power-maximizing region 2 tip-speed-ratio + description: Power-maximizing region 2 tip-speed-ratio. Only used in VS_ControlMode = 2. units: rad + VS_PwrFiltF: + type: number + description: Low pass filter on power used to determine generator speed set point. Only used in VS_ControlMode = 3. + units: rad + default: 0.314 SS_VSGain: type: number description: Variable speed torque controller setpoint smoother gain diff --git a/ROSCO_toolbox/ofTools/case_gen/CaseLibrary.py b/ROSCO_toolbox/ofTools/case_gen/CaseLibrary.py index 2823ab8a3..a99e0f5f9 100644 --- a/ROSCO_toolbox/ofTools/case_gen/CaseLibrary.py +++ b/ROSCO_toolbox/ofTools/case_gen/CaseLibrary.py @@ -34,7 +34,7 @@ def set_channels(): "NcIMUTAxs", "NcIMUTAys", "NcIMUTAzs", "NcIMURAxs", "NcIMURAys", "NcIMURAzs", \ "NacYaw", "Wind1VelX", "Wind1VelY", "Wind1VelZ", "LSSTipMxa","LSSTipMya",\ "LSSTipMza","LSSTipMxs","LSSTipMys","LSSTipMzs","LSShftFys","LSShftFzs", \ - "TipRDxr", "TipRDyr", "TipRDzr","RtVAvgxh","RtAeroFxh"]: + "TipRDxr", "TipRDyr", "TipRDzr","RtVAvgxh","RtAeroFxh", "RtTSR"]: channels[var] = True return channels diff --git a/ROSCO_toolbox/utilities.py b/ROSCO_toolbox/utilities.py index f7cd95314..0052dd6a6 100644 --- a/ROSCO_toolbox/utilities.py +++ b/ROSCO_toolbox/utilities.py @@ -169,14 +169,15 @@ def write_DISCON(turbine, controller, param_file='DISCON.IN', txt_filename='Cp_C file.write('{:<014.5f} ! VS_MaxTq - Maximum generator torque in Region 3 (HSS side), [Nm].\n'.format(rosco_vt['VS_MaxTq'])) file.write('{:<014.5f} ! VS_MinTq - Minimum generator torque (HSS side), [Nm].\n'.format(rosco_vt['VS_MinTq'])) file.write('{:<014.5f} ! VS_MinOMSpd - Minimum generator speed [rad/s]\n'.format(rosco_vt['VS_MinOMSpd'])) - file.write('{:<014.5f} ! VS_Rgn2K - Generator torque constant in Region 2 (HSS side), [Nm/(rad/s)^2]\n'.format(rosco_vt['VS_Rgn2K'])) + file.write('{:<014.5f} ! VS_Rgn2K - {}\n'.format(float(rosco_vt['VS_Rgn2K']),input_descriptions['VS_Rgn2K'])) file.write('{:<014.5f} ! VS_RtPwr - Wind turbine rated power [W]\n'.format(rosco_vt['VS_RtPwr'])) file.write('{:<014.5f} ! VS_RtTq - Rated torque, [Nm].\n'.format(rosco_vt['VS_RtTq'])) file.write('{:<014.5f} ! VS_RefSpd - Rated generator speed [rad/s]\n'.format(rosco_vt['VS_RefSpd'])) file.write('{:<11d} ! VS_n - Number of generator PI torque controller gains\n'.format(int(rosco_vt['VS_n']))) file.write('{:<014.5f} ! VS_KP - Proportional gain for generator PI torque controller [-]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2)\n'.format(rosco_vt['VS_KP'])) file.write('{:<014.5f} ! VS_KI - Integral gain for generator PI torque controller [s]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2)\n'.format(rosco_vt['VS_KI'])) - file.write('{:<13.2f} ! VS_TSRopt - Power-maximizing region 2 tip-speed-ratio [rad].\n'.format(rosco_vt['VS_TSRopt'])) + file.write('{:<13.2f} ! VS_TSRopt - {}\n'.format(float(rosco_vt['VS_TSRopt']),input_descriptions['VS_TSRopt'])) + file.write('{:<014.5f} ! VS_PwrFiltF - {}\n'.format(float(rosco_vt['VS_PwrFiltF']),input_descriptions['VS_PwrFiltF'])) file.write('\n') file.write('!------- SETPOINT SMOOTHER ---------------------------------------------\n') file.write('{:<13.5f} ! SS_VSGain - Variable speed torque controller setpoint smoother gain, [-].\n'.format(rosco_vt['SS_VSGain'])) diff --git a/Test_Cases/BAR_10/BAR_10_DISCON.IN b/Test_Cases/BAR_10/BAR_10_DISCON.IN index 8f462a026..580693cd5 100644 --- a/Test_Cases/BAR_10/BAR_10_DISCON.IN +++ b/Test_Cases/BAR_10/BAR_10_DISCON.IN @@ -1,5 +1,5 @@ ! Controller parameter input file for the BAR_10 wind turbine -! - File written using ROSCO version 2.8.0 controller tuning logic on 08/21/23 +! - File written using ROSCO version 2.8.0 controller tuning logic on 08/23/23 !------- SIMULATION CONTROL ------------------------------------------------------------ 1 ! LoggingLevel - {0: write no debug files, 1: write standard output .dbg-file, 2: LoggingLevel 1 + ROSCO LocalVars (.dbg2) 3: LoggingLevel 2 + complete avrSWAP-array (.dbg3)} @@ -78,14 +78,15 @@ 70282.09458000 ! VS_MaxTq - Maximum generator torque in Region 3 (HSS side), [Nm]. 0.000000000000 ! VS_MinTq - Minimum generator torque (HSS side), [Nm]. 27.49717000000 ! VS_MinOMSpd - Minimum generator speed [rad/s] -12.67229000000 ! VS_Rgn2K - Generator torque constant in Region 2 (HSS side), [Nm/(rad/s)^2] +11.20801000000 ! VS_Rgn2K - Generator torque constant in Region 2 (HSS side). Only used in VS_ControlMode = 1,3 5000000.000000 ! VS_RtPwr - Wind turbine rated power [W] 63892.81326000 ! VS_RtTq - Rated torque, [Nm]. 75.83317000000 ! VS_RefSpd - Rated generator speed [rad/s] 1 ! VS_n - Number of generator PI torque controller gains -2452.07948000 ! VS_KP - Proportional gain for generator PI torque controller [-]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2) -332.357190000 ! VS_KI - Integral gain for generator PI torque controller [s]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2) -9.76 ! VS_TSRopt - Power-maximizing region 2 tip-speed-ratio [rad]. +9.76 ! VS_TSRopt - Power-maximizing region 2 tip-speed-ratio. Only used in VS_ControlMode = 2. +0.314000000000 ! VS_PwrFiltF - Low pass filter on power used to determine generator speed set point. Only used in VS_ControlMode = 3. !------- SETPOINT SMOOTHER --------------------------------------------- 1.00000 ! SS_VSGain - Variable speed torque controller setpoint smoother gain, [-]. diff --git a/Test_Cases/IEA-15-240-RWT-UMaineSemi/DISCON-UMaineSemi.IN b/Test_Cases/IEA-15-240-RWT-UMaineSemi/DISCON-UMaineSemi.IN index 0728f2d17..2fecf79eb 100644 --- a/Test_Cases/IEA-15-240-RWT-UMaineSemi/DISCON-UMaineSemi.IN +++ b/Test_Cases/IEA-15-240-RWT-UMaineSemi/DISCON-UMaineSemi.IN @@ -1,5 +1,5 @@ ! Controller parameter input file for the IEA-15-240-RWT-UMaineSemi wind turbine -! - File written using ROSCO version 2.8.0 controller tuning logic on 08/21/23 +! - File written using ROSCO version 2.8.0 controller tuning logic on 08/23/23 !------- SIMULATION CONTROL ------------------------------------------------------------ 2 ! LoggingLevel - {0: write no debug files, 1: write standard output .dbg-file, 2: LoggingLevel 1 + ROSCO LocalVars (.dbg2) 3: LoggingLevel 2 + complete avrSWAP-array (.dbg3)} @@ -78,14 +78,15 @@ 21586451.33303 ! VS_MaxTq - Maximum generator torque in Region 3 (HSS side), [Nm]. 0.000000000000 ! VS_MinTq - Minimum generator torque (HSS side), [Nm]. 0.523600000000 ! VS_MinOMSpd - Minimum generator speed [rad/s] -37840583.60628 ! VS_Rgn2K - Generator torque constant in Region 2 (HSS side), [Nm/(rad/s)^2] +36535083.47186 ! VS_Rgn2K - Generator torque constant in Region 2 (HSS side). Only used in VS_ControlMode = 1,3 15000000.00000 ! VS_RtPwr - Wind turbine rated power [W] 19624046.66639 ! VS_RtTq - Rated torque, [Nm]. 0.791680000000 ! VS_RefSpd - Rated generator speed [rad/s] 1 ! VS_n - Number of generator PI torque controller gains -37877315.85935 ! VS_KP - Proportional gain for generator PI torque controller [-]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2) -4588245.18720 ! VS_KI - Integral gain for generator PI torque controller [s]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2) -9.00 ! VS_TSRopt - Power-maximizing region 2 tip-speed-ratio [rad]. +9.00 ! VS_TSRopt - Power-maximizing region 2 tip-speed-ratio. Only used in VS_ControlMode = 2. +0.314000000000 ! VS_PwrFiltF - Low pass filter on power used to determine generator speed set point. Only used in VS_ControlMode = 3. !------- SETPOINT SMOOTHER --------------------------------------------- 1.00000 ! SS_VSGain - Variable speed torque controller setpoint smoother gain, [-]. diff --git a/Test_Cases/MHK_RM1/MHK_RM1_DISCON.IN b/Test_Cases/MHK_RM1/MHK_RM1_DISCON.IN index 7899a7334..1216f1c07 100644 --- a/Test_Cases/MHK_RM1/MHK_RM1_DISCON.IN +++ b/Test_Cases/MHK_RM1/MHK_RM1_DISCON.IN @@ -1,5 +1,5 @@ ! Controller parameter input file for the MHK_RM1_Floating wind turbine -! - File written using ROSCO version 2.8.0 controller tuning logic on 08/21/23 +! - File written using ROSCO version 2.8.0 controller tuning logic on 08/23/23 !------- SIMULATION CONTROL ------------------------------------------------------------ 2 ! LoggingLevel - {0: write no debug files, 1: write standard output .dbg-file, 2: LoggingLevel 1 + ROSCO LocalVars (.dbg2) 3: LoggingLevel 2 + complete avrSWAP-array (.dbg3)} @@ -34,8 +34,8 @@ 0.00000 ! F_LPFDamping - Damping coefficient {used only when F_FilterType = 2} [-] 2 ! F_NumNotchFilts - Number of notch filters placed on sensors 1.0000 2.4200 ! F_NotchFreqs - Natural frequency of the notch filters. Array with length F_NumNotchFilts -0.0000 0.0000 ! F_NotchBetaNum - Damping value of numerator (determines the width of notch). Array with length F_NumNotchFilts, [-] -0.2500 0.2500 ! F_NotchBetaDen - Damping value of denominator (determines the depth of notch). Array with length F_NumNotchFilts, [-] +0.0010 0.0010 ! F_NotchBetaNum - Damping value of numerator (determines the width of notch). Array with length F_NumNotchFilts, [-] +0.1000 0.1000 ! F_NotchBetaDen - Damping value of denominator (determines the depth of notch). Array with length F_NumNotchFilts, [-] 2 ! F_GenSpdNotch_N - Number of notch filters on generator speed 1 2 ! F_GenSpdNotch_Ind - Indices of notch filters on generator speed 2 ! F_TwrTopNotch_N - Number of notch filters on tower top acceleration signal @@ -78,14 +78,15 @@ 12450.50344000 ! VS_MaxTq - Maximum generator torque in Region 3 (HSS side), [Nm]. 0.000000000000 ! VS_MinTq - Minimum generator torque (HSS side), [Nm]. 19.00309000000 ! VS_MinOMSpd - Minimum generator speed [rad/s] -1.430370000000 ! VS_Rgn2K - Generator torque constant in Region 2 (HSS side), [Nm/(rad/s)^2] +1.142870000000 ! VS_Rgn2K - Generator torque constant in Region 2 (HSS side). Only used in VS_ControlMode = 1,3 500000.0000000 ! VS_RtPwr - Wind turbine rated power [W] 8300.335630000 ! VS_RtTq - Rated torque, [Nm]. 63.81200000000 ! VS_RefSpd - Rated generator speed [rad/s] 1 ! VS_n - Number of generator PI torque controller gains -63.8796200000 ! VS_KP - Proportional gain for generator PI torque controller [-]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2) -84.4329000000 ! VS_KI - Integral gain for generator PI torque controller [s]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2) -7.17 ! VS_TSRopt - Power-maximizing region 2 tip-speed-ratio [rad]. +7.17 ! VS_TSRopt - Power-maximizing region 2 tip-speed-ratio. Only used in VS_ControlMode = 2. +0.314000000000 ! VS_PwrFiltF - Low pass filter on power used to determine generator speed set point. Only used in VS_ControlMode = 3. !------- SETPOINT SMOOTHER --------------------------------------------- 1.00000 ! SS_VSGain - Variable speed torque controller setpoint smoother gain, [-]. diff --git a/Test_Cases/MHK_RM1/MHK_RM1_Floating.fst b/Test_Cases/MHK_RM1/MHK_RM1_Floating.fst index 851ebdac2..a19bf6613 100644 --- a/Test_Cases/MHK_RM1/MHK_RM1_Floating.fst +++ b/Test_Cases/MHK_RM1/MHK_RM1_Floating.fst @@ -45,7 +45,7 @@ False Echo - Echo input data to .ech (flag) True SumPrint - Print summary data to ".sum" (flag) 5 SttsTime - Amount of time between screen status messages (s) 99999 ChkptTime - Amount of time between creating checkpoint files for potential restart (s) - 0.02 DT_Out - Time step for tabular output (s) (or "default") + default DT_Out - Time step for tabular output (s) (or "default") 0 TStart - Time to begin tabular output (s) 3 OutFileFmt - Format for tabular (time-marching) output file (switch) {0: uncompressed binary [.outb], 1: text file [.out], 2: binary file [.outb], 3: both 1 and 2} True TabDelim - Use tab delimiters in text tabular output file? (flag) {uses spaces if false} diff --git a/Test_Cases/MHK_RM1/MHK_RM1_Floating_ElastoDyn.dat b/Test_Cases/MHK_RM1/MHK_RM1_Floating_ElastoDyn.dat index 207ffc39e..5a79e2399 100644 --- a/Test_Cases/MHK_RM1/MHK_RM1_Floating_ElastoDyn.dat +++ b/Test_Cases/MHK_RM1/MHK_RM1_Floating_ElastoDyn.dat @@ -25,9 +25,9 @@ True PtfmYDOF - Platform yaw rotation DOF (flag) ---------------------- INITIAL CONDITIONS -------------------------------------- 0 OoPDefl - Initial out-of-plane blade-tip displacement (meters) 0 IPDefl - Initial in-plane blade-tip deflection (meters) - 0 BlPitch(1) - Blade 1 initial pitch (degrees) - 0 BlPitch(2) - Blade 2 initial pitch (degrees) - 0 BlPitch(3) - Blade 3 initial pitch (degrees) [unused for 2 blades] + 10 BlPitch(1) - Blade 1 initial pitch (degrees) + 10 BlPitch(2) - Blade 2 initial pitch (degrees) + 10 BlPitch(3) - Blade 3 initial pitch (degrees) [unused for 2 blades] 0 TeetDefl - Initial or fixed teeter angle (degrees) [unused for 3 blades] 0 Azimuth - Initial azimuth angle for blade 1 (degrees) 11.50 RotSpeed - Initial or fixed rotor speed (rpm) diff --git a/Test_Cases/NREL-5MW/DISCON.IN b/Test_Cases/NREL-5MW/DISCON.IN index a5e413dbe..e0f8d2513 100644 --- a/Test_Cases/NREL-5MW/DISCON.IN +++ b/Test_Cases/NREL-5MW/DISCON.IN @@ -1,5 +1,5 @@ ! Controller parameter input file for the NREL-5MW wind turbine -! - File written using ROSCO version 2.8.0 controller tuning logic on 08/21/23 +! - File written using ROSCO version 2.8.0 controller tuning logic on 08/23/23 !------- SIMULATION CONTROL ------------------------------------------------------------ 1 ! LoggingLevel - {0: write no debug files, 1: write standard output .dbg-file, 2: LoggingLevel 1 + ROSCO LocalVars (.dbg2) 3: LoggingLevel 2 + complete avrSWAP-array (.dbg3)} @@ -78,14 +78,15 @@ 47402.87063000 ! VS_MaxTq - Maximum generator torque in Region 3 (HSS side), [Nm]. 0.000000000000 ! VS_MinTq - Minimum generator torque (HSS side), [Nm]. 35.29006000000 ! VS_MinOMSpd - Minimum generator speed [rad/s] -2.185750000000 ! VS_Rgn2K - Generator torque constant in Region 2 (HSS side), [Nm/(rad/s)^2] +2.063350000000 ! VS_Rgn2K - Generator torque constant in Region 2 (HSS side). Only used in VS_ControlMode = 1,3 5000000.000000 ! VS_RtPwr - Wind turbine rated power [W] 43093.51876000 ! VS_RtTq - Rated torque, [Nm]. 122.9096700000 ! VS_RefSpd - Rated generator speed [rad/s] 1 ! VS_n - Number of generator PI torque controller gains -657.442080000 ! VS_KP - Proportional gain for generator PI torque controller [-]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2) -104.507080000 ! VS_KI - Integral gain for generator PI torque controller [s]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2) -7.64 ! VS_TSRopt - Power-maximizing region 2 tip-speed-ratio [rad]. +7.64 ! VS_TSRopt - Power-maximizing region 2 tip-speed-ratio. Only used in VS_ControlMode = 2. +0.314000000000 ! VS_PwrFiltF - Low pass filter on power used to determine generator speed set point. Only used in VS_ControlMode = 3. !------- SETPOINT SMOOTHER --------------------------------------------- 1.00000 ! SS_VSGain - Variable speed torque controller setpoint smoother gain, [-]. diff --git a/Test_Cases/NREL_2p8_127/NREL-2p8-127_DISCON.IN b/Test_Cases/NREL_2p8_127/NREL-2p8-127_DISCON.IN index 7e99fa72d..a0531ce60 100644 --- a/Test_Cases/NREL_2p8_127/NREL-2p8-127_DISCON.IN +++ b/Test_Cases/NREL_2p8_127/NREL-2p8-127_DISCON.IN @@ -1,5 +1,5 @@ ! Controller parameter input file for the NREL-2p8-127 wind turbine -! - File written using ROSCO version 2.8.0 controller tuning logic on 08/21/23 +! - File written using ROSCO version 2.8.0 controller tuning logic on 08/23/23 !------- SIMULATION CONTROL ------------------------------------------------------------ 2 ! LoggingLevel - {0: write no debug files, 1: write standard output .dbg-file, 2: LoggingLevel 1 + ROSCO LocalVars (.dbg2) 3: LoggingLevel 2 + complete avrSWAP-array (.dbg3)} @@ -78,14 +78,15 @@ 26673.40024000 ! VS_MaxTq - Maximum generator torque in Region 3 (HSS side), [Nm]. 0.000000000000 ! VS_MinTq - Minimum generator torque (HSS side), [Nm]. 37.81562000000 ! VS_MinOMSpd - Minimum generator speed [rad/s] -1.931170000000 ! VS_Rgn2K - Generator torque constant in Region 2 (HSS side), [Nm/(rad/s)^2] +1.654680000000 ! VS_Rgn2K - Generator torque constant in Region 2 (HSS side). Only used in VS_ControlMode = 1,3 2800000.000000 ! VS_RtPwr - Wind turbine rated power [W] 24248.54567000 ! VS_RtTq - Rated torque, [Nm]. 122.9096700000 ! VS_RefSpd - Rated generator speed [rad/s] 1 ! VS_n - Number of generator PI torque controller gains -600.450450000 ! VS_KP - Proportional gain for generator PI torque controller [-]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2) -85.3230300000 ! VS_KI - Integral gain for generator PI torque controller [s]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2) -8.25 ! VS_TSRopt - Power-maximizing region 2 tip-speed-ratio [rad]. +8.25 ! VS_TSRopt - Power-maximizing region 2 tip-speed-ratio. Only used in VS_ControlMode = 2. +0.314000000000 ! VS_PwrFiltF - Low pass filter on power used to determine generator speed set point. Only used in VS_ControlMode = 3. !------- SETPOINT SMOOTHER --------------------------------------------- 1.00000 ! SS_VSGain - Variable speed torque controller setpoint smoother gain, [-].