Motor protection controller