Optimisation of Real-Time Complex Path Generation in Constrained Intelligent Motion Applications Based on IPM Motor Drives