Robust optimization of the size of permanent magnets in a synchronous machine using deterministic and stochastic approach