Optimization of closed-loop taVNS for motor rehabilitation