Rate-of-change-of-frequency (ROCOF) is one of the most popular local islanding detection methods due to its simplicity and low cost. However, the method suffers from significant non-detection zone (NDZ) and experiences security issues due to non-islanding events. In this article, an enhancement of the ROCOF relay, improving frequency estimation is proposed and compared to standard methods. Results are obtained through real-time hardware-in-the-loop (RT-HIL) simulations using an IEC61850 compliant STM32F746NG microprocessor acting as a ROCOF relay. Feasibility of the method has been proven experimentally. As demonstrated, it has an ability to significantly mitigate a number of nuisance trippings for non-islanding events. For the CIGRE medium voltage benchmark distribution network, the proposed method provided full security at the setting of 0.5 Hz/s for adjacent feeder faults, whereas the standard methods happened to fail even at the setting of 1 Hz/s. Additionally, as shown, an improvement of the relay security can lead to reduction of NDZ. [ABSTRACT FROM AUTHOR]