The Gitlab server is succesfully updated to version 14.4.0

Many users are receiving emails regarding excessive amounts of log-in attempts, which are brute-force attempts to crack your password. We are working on a 2FA solution, so no action is needed yet. If you receive emails regarding "sign-in from new location", please check the IP address and if unknown, notify frza@dtu.dk immediately.

Commit f591852c authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

bugfix: dt calculation fixed

feature: delay time(already set in DTU10MW) implemented
feature: setting brake signal to 0 releases the brake after delay and deploy time
feature: new output signals: 1) brake torque, 2) brake input signal, 3) brake actuator, 4) rotor speed
parent b69cf77c
......@@ -18,6 +18,8 @@
t_deploy = array1(3)
t_delay = array1(4)
! Initiate the dynamic variables
DelayBrakeCommand = t_delay/t_deploy
BrakeCommand = -DelayBrakeCommand
! Zero output
array2=0.d0
return
......@@ -40,17 +42,23 @@
! 1: Mech. brake LSS torque [Nm]
!
! Local vars
real*8 time,omega
real*8 time,omega, BrakeActuator, BrakeSignal
time_old=time
time=array1(1)
dt=time-time_old
time_old=time
! Save input
omega=array1(2)
BrakeCommand=min(BrakeCommand + dt*array1(3)/t_deploy,1.d0)
BrakeSignal = (array1(3)*2-1) ! 1->brake, 0->release(-1)
BrakeCommand=max(min(BrakeCommand + dt*BrakeSignal/t_deploy,1.d0+DelayBrakeCommand), -DelayBrakeCommand)
BrakeActuator = min(max(BrakeCommand,0d0),1d0)
! Output
array2(1)=tanh(omega*alpha)*BrakeCommand*Qmax
array2(1)=tanh(omega*alpha)*BrakeActuator*Qmax
array2(2)=array1(3)
array2(3)=BrakeActuator
array2(4)=omega
return
end subroutine update_mech_brake
!***********************************************************************
......
module mech_brake_fcns
real*8 pi,degrad,raddeg
parameter(pi=3.14159265358979,degrad=0.0174532925,raddeg=57.2957795131)
real*8 Qmax,Qbrake,t_deploy,t_delay,alpha,BrakeCommand
real*8 Qmax,Qbrake,t_deploy,t_delay,alpha,BrakeCommand, DelayBrakeCommand
real*8 time_old,dt
end module mech_brake_fcns
\ No newline at end of file
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