Here is an example code to perform single line to ground fault detection on MATLAB:
main.m481 chars21 lines
In this code, we assume that the current values for each phase (Ia, Ib, and Ic) are already defined. The code calculates the ground fault current (Ig) by summing the squares of the current values for each phase and taking the square root. It then compares the calculated ground fault current to a threshold value (threshold) to detect ground faults. If any ground faults are detected, their indices are displayed; otherwise, a message indicating no ground faults are detected is displayed.
Feel free to adjust the values of Ia, Ib, Ic, and the threshold to fit your requirements.
gistlibby LogSnag