subroutine TDS_dia(x1,x2,x3,x5,x6,x7) use equipments_PowerLimit use TopDrive_VARIABLES IMPLICIT NONE REAL :: x1,x2,x3,x5,x6,x7 !TDS%Vt = x6+Kpi*(Kpn*((30.*TDS%w_ref/pi)-(30.*x3/pi))-x2) TDS%ia_ref = x7+Kpn*((30.*TDS%w_ref/pi)-(30.*x3/pi)) call TopDrive_TorqueLimit !IF (TDS%ia_ref>TDS%ia_ref_limit) THEN ! TDS%ia_ref = TDS%ia_ref_limit !END IF !TorqueLimit_Elimination1: !call PowerLimits !if (Power_sigma>max_Power_sigma) then ! TDS%Vt = TDS%Vt !else TDS%Vt = x6+(Kpi*(TDS%ia_ref-x2)) !end if IF (TDS%Vt>810.) THEN TDS%Vt = 810.0 ELSE IF (TDS%Vt<0.) THEN TDS%Vt = 0.0 END IF !IF (x2<=1150.) THEN x5 = (6.3304d-3)*1150. !ELSE IF (x2>1150.) THEN ! x5 = 2.8571d-7*(x2-1150.)+7.28 !END IF TDS%Ea = x5*x3 TDS%dia = (TDS%Vt-(Ra+Rf)*x2-TDS%Ea)/(La+Lf) !call PowerLimits !if (Power_sigma>max_Power_sigma) then ! TDS%dia = 0.d0 !end if end subroutine !------------------------------------------------------------------------------- subroutine TDS_dw(x1,x2,x3,x4,x5) use TopDrive_VARIABLES IMPLICIT NONE REAL :: x1,x2,x3,x4,x5 REAL :: const !IF (x2<=1150.) THEN x4 = 6.3304d-3*1150. !ELSE IF (x2>1150.) THEN ! x4 = 2.8571d-7*(x2-1150.)+7.28 !END IF TDS%Te = x4*x2 !TDS%dw = (TDS%Te-x5)/TDS%J_coef const = TDS%J_coef+(TDS%String_JCoef/(TDS%Mech_Efficiency*TDS%Conv_Ratio)) !TDS%dw = (TDS%Te-((TDS%String_Torque)/(TDS%Mech_Efficiency*TDS%Conv_Ratio)))/(const) TDS%dw = (TDS%Te-TDS%TL)/(const) end subroutine !------------------------------------------------------------ subroutine TDS_dx(x1,x2,x3,x4,x5) use TopDrive_VARIABLES IMPLICIT NONE REAL :: x1,x2,x3,x4,x5 !TDS%dx = Kii*(Kpn*((30.*TDS%w_ref/pi)-(30.*x3/pi))-x2) TDS%ia_ref = x5+Kpn*((30.*TDS%w_ref/pi)-(30.*x3/pi)) call TopDrive_TorqueLimit !if (LimitOveride==1) then !goto TorqueLimit_Limitation2 !end if !IF (TDS%ia_ref>TDS%ia_ref_limit) THEN !TDS%ia_ref = TDS%ia_ref_limit !END IF !TorqueLimit_Elimination2: TDS%dx = Kii*(TDS%ia_ref-x2) end subroutine !------------------------------------------------------------ subroutine TDS_dy(x1,x2,x3,x4,x5) use TopDrive_VARIABLES IMPLICIT NONE REAL :: x1,x2,x3,x4,x5 TDS%dy = Kin*((30.0d0*TDS%w_ref/pi)-(30.0d0*x3/pi)) end subroutine