Optimization of the closed-loop controller of a discontinuous capsule drive using a neural network