What the description said, possibly due to an overflow. Observed a long time and validated with console, mower conrol loop runs with 50Hz. Mower will stop after ~ 1 - 2 hours and drives are dead, because pid is outputting 0, beside rpm set is given.
It just stops working and there are sudden NaN´s coming from function call motorRightOrLeftLpf(motorRightOrLeftRpmCurr); (logged)
motorRightPID.TaMax = 0.25; //motorRightPID.x = motorRightLpf(motorRightRpmCurr); //gives a NaN after some time.................. motorRightPID.x = motorRightRpmCurr; motorRightPID.w = motorRightRpmSet; motorRightPID.y_min = -pwmMax; motorRightPID.y_max = pwmMax; motorRightPID.max_output = pwmMax; motorRightPID.output_ramp = MOTOR_PID_RAMP; motorRightPID.compute(); motorRightPWMCurr = motorRightPWMCurr + motorRightPID.y;