Protection relay with electronic motor control