A fast adaptive memetic algorithm for online and offline control design of PMSM drives