Motors integrated with frequency converter