HVDC grid protection algorithm design in phase and modal domains