Variable frequency drive for spindle