Analytical design and auto-Tuning of adaptive flux-weakening voltage regulation loop in IPMSM drives with accurate torque regulation