Advanced microprocessor based intelligent relay for multifunction protection system