Commit 49bd7b6b authored by gepir's avatar gepir
Browse files

fixed time stepping of the generator torque demand

parent cd2603c4
......@@ -557,8 +557,10 @@ subroutine torquecontroller(GenSpeed, GenSpeedFilt, dGenSpeed_dtFilt, PitchMean,
if ((abs(outmin-outmin_old)/deltat) .gt. PID_gen_var%velmax) then
outmin = outmin_old + dsign(PID_gen_var%velmax*deltat, outmin-outmin_old)
endif
outmax_old=outmax
outmin_old=outmin
if (newtimestep) then
outmax_old=outmax
outmin_old=outmin
endif
PID_gen_var%outmin = outmin
PID_gen_var%outmax = outmax
if (PID_gen_var%outmin .gt. PID_gen_var%outmax) PID_gen_var%outmin = PID_gen_var%outmax
......
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