Commit dbf52ba4 authored by famen's avatar famen
Browse files

implemented Lidar Assisted Control method 4:

feedforward pitch control at above rated.
parent bc5e2670
Pipeline #23722 passed with stage
in 3 minutes and 40 seconds
......@@ -270,7 +270,7 @@ subroutine init_regulation(array1, array2) bind(c, name='init_regulation')
! if user provides negative number. It is used as the extension name for a text file
! which contains additional parameters needed by lidar assisted control. e.g '-1 = *.1'
TSR_opt = array1(49)
if (TSR_opt .le. 0.0_mk) then
if (TSR_opt .lt. 0.0_mk) then
! Read in extra control input file for lidar assisted control
write(lac_input_data%name,'(i3)') iabs(int(array1(49)))
inquire(file='./control/lacdata.'//trim(adjustl(lac_input_data%name)),exist=findes)
......
......@@ -159,10 +159,8 @@ subroutine normal_operation(GenSpeed, PitchVect, wsp, Pe, TTfa_acc, GenTorqueRef
!***********************************************************************************************
if((lidar_assisted_control .eq. 3) .and. (.not. fullload)) then
! if((lidar_assisted_control .eq. 3)) then
! steady_pitch = GetOptiPitch2(wsp,lac_input_data%steady_pitch_var)
! after this function call, PitchColRef is updated by PitchColRefLidar
call lidar_assisted_pitchcontroller(wsp,GenSpeedFilt,PitchMeanFilt,PitchMin,PitchColRefLidar,PitchColRef,dump_array)
! PitchColRef = PitchColRefLidar
endif
!***********************************************************************************************
! Calculate the estimated aerodynamic torque
......@@ -693,17 +691,13 @@ subroutine torquecontroller(GenSpeed, GenSpeedFilt, dGenSpeed_dtFilt, PitchMean,
GenSpeedRef = GenSpeedRefMin
endif
! Lidar assisted control (method = 1): Tracking Optimal Aerodynamic Torque (OAT) in region 2
if(lidar_assisted_control .eq. 1) then
! Lidar assisted control (method = 3): Using pitch to assist tracking the optimal TSR
if((lidar_assisted_control .eq. 1) .or. (lidar_assisted_control .eq. 3)) then
kgain_lac = lac_input_data%gain_oat
k_aero_torque = 0.5*rho*pi*R**2*lac_input_data%cp_opt*R/lac_input_data%tsr_opt
aero_torque = k_aero_torque*wsp**2
endif
! Lidar assisted control (method = 3): Using pitch to assist tracking the optimal TSR
if(lidar_assisted_control .eq. 3) then
! See the code in subroutine lidar_assisted_pitchcontroller
endif
case (2)
! This option should be combined with effective wind speed estimator for industry application
! Lidar assisted control (method = 2): Tracking Optimal rotor speed (ORT) in region 2
......@@ -749,7 +743,7 @@ subroutine torquecontroller(GenSpeed, GenSpeedFilt, dGenSpeed_dtFilt, PitchMean,
! case = 1 means that tracking the optimal Cp in partial load region (region 2)
case (1)
! Calculate the constant limits for opening and closing of torque limits
if(lidar_assisted_control .eq. 1) then
if((lidar_assisted_control .eq. 1) .or. (lidar_assisted_control .eq. 3)) then
! Lidar assisted control (method = 1): Tracking Optimal Aerodynamic Torque (OAT) in region 2
! compute rotor speed limits
GenSpeed_min1 = GenSpeedRefMin
......@@ -943,7 +937,7 @@ subroutine pitchcontroller(GenSpeedFilt, dGenSpeed_dtFilt, PitchMeanFilt, PeFilt
end subroutine pitchcontroller
subroutine lidar_assisted_pitchcontroller(wsp, GenSpeedFilt, PitchMeanFilt, PitchMin, &
PitchColRef_lidar, PitchColRef, dump_array)
PitchColRefLidar, PitchColRef, dump_array)
!
! Lidar Assisted Pitch controller. it computes the reference pitch angle to assist better TSR tracking
! At below rated wind
......@@ -953,7 +947,7 @@ subroutine lidar_assisted_pitchcontroller(wsp, GenSpeedFilt, PitchMeanFilt, Pitc
! real(mk), intent(in) :: PitAngSteady ! Steady-state pitch angle as function of wind speed [rad].
real(mk), intent(in) :: PitchMeanFilt ! Current Filtered mean pitch angle [rad].
real(mk), intent(in) :: PitchMin ! Minimum pitch angle [rad].
real(mk), intent(out) :: PitchColRef_lidar ! Reference collective pitch angle [rad].
real(mk), intent(out) :: PitchColRefLidar ! Reference collective pitch angle [rad].
real(mk), intent(inout) :: PitchColRef ! Blade pitch angle reference calculated by CPC controller [rad].
real(mk), intent(inout) :: dump_array(50) ! Dump Array for output.
......@@ -995,15 +989,15 @@ subroutine lidar_assisted_pitchcontroller(wsp, GenSpeedFilt, PitchMeanFilt, Pitc
! Set PID Limits for PID LAC Pitch controller
PID_lac_pit_var%outmin = PitchMin + lac_pitch_limit_min
PID_lac_pit_var%outmax = PitchMin + lac_pitch_limit_max
PitchColRef_lidar = PID2(stepno, deltat, kgain, PID_lac_pit_var, err_pitch, dummy_pitch_rate )
PitchColRefLidar = PID2(stepno, deltat, kgain, PID_lac_pit_var, err_pitch, dummy_pitch_rate )
if(stepno == 2 .and. compiled_with_debug .and. (lidar_assisted_control .eq. 3)) then
write(6,'(7a20)') 'Time [s]','RotSpeedErr [rad/s]','Pitch LAC [deg]', 'CPC Pitch[deg]', 'Switch [-]', 'PitchMin[deg]', 'PitchMax [deg]'
elseif((mod(stepno,500) == 0) .and. compiled_with_debug .and. (lidar_assisted_control .eq. 3)) then
write(6,'(i20,6E20.6)') stepno, err_pitch(1),PitchColRef_lidar*raddeg, PitchColRef_old*raddeg, dump_array(10), PID_lac_pit_var%outmin*raddeg, PID_lac_pit_var%outmax*raddeg
write(6,'(i20,6E20.6)') stepno, err_pitch(1),PitchColRefLidar*raddeg, PitchColRef_old*raddeg, dump_array(10), PID_lac_pit_var%outmin*raddeg, PID_lac_pit_var%outmax*raddeg
endif
PitchColRef = PitchColRef_lidar
PitchColRef = PitchColRefLidar
! Write into dump array
! dump_array(11) = GenSpeedFiltErr
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment