Optimization of automatic machines performance by experimental design