## 5 Conclusions  
In this work, a unified protection system that offers double functionality is proposed. The system was proven to be capable of both optimizing the settings of the relays for each network situation. The performance of the relay has been tested for different DG penetration levels, different types of short-circuit faults (single-phase to ground and three-phase), and different fault zones (faults in the main feeder and the laterals). The proposed scheme can be implemented in distribution systems using the communication standard IEC61850 [31]. In all the cases studied, the system has proven capable of adapting, in real time, the performance parameters of the relays that protect the faulted line section depending on the operating conditions of the system at the time of the fault. The proposed protection system has been applied to a distribution system in the presence of DG. The results demonstrate that the protection coordination proposed in this paper is capable of reducing relay operating times by more than 80% compared to classical coordination, which produces a more reliable operation of a network with DG. Conceptualization, E.M.G.d.T. and M.I.M.-L.; methodology, D.A.-G., E.M.G.d.T., M.I.M.-L., S.G.-S. and S.P. ; software, D.A.-G.; validation, S.G.-S., E.M.G.d.T. and M.I.M.-L.; formal analysis, E.M.G.d.T., M.I.M.-L. and D.A.-G.; investigation, D.A.-G., E.M.G.d.T., M.I.M.-L., S.G.-S. and S.P. ; data curation, E.M.G.d.T. and M.I.M.-L.; writing--original draft preparation, D.A.-G., E.M.G.d.T., S.G.-S., M.I.M.-L. and S.P. ; writing--review and editing, E.M.G.d.T. and M.I.M.-L.; supervision, S.G.-S., M.I.M.-L. and S.P. All authors have read and agreed to the published version of the manuscript. This research received no external funding. Not applicable. The authors declare no conflict of interest. Figure 11: Short-circuit in F21 with penetration level of DG1 17%. Classical coordination versus linear programming coordination. \begin{table}
\begin{tabular}{c|c c c c c c c c c c c c c c c c c c c} \hline \hline  & & \multicolumn{12}{c}{**F2**} & \multicolumn{12}{c}{**F7**} & \multicolumn{12}{c}{**F21**} \\ \hline \multicolumn{1}{c}{**Type of Fault**} & \multicolumn{3}{c}{\(\mathbf{t_{op}}\)} & \multicolumn{3}{c}{\(\mathbf{t_{op}}\)} & \multicolumn{3}{c}{\(\mathbf{t_{op}}\)} & \multicolumn{3}{c}{\(\mathbf{t_{op}}\)} & \multicolumn{3}{c}{\(\mathbf{t_{op}}\)} & \multicolumn{3}{c}{\(\mathbf{t_{op}}\)} & \multicolumn{3}{c}{\(\mathbf{t_{op}}\)} & \multicolumn{3}{c}{\(\mathbf{t_{op}}\)} & \multicolumn{3}{c}{\(\mathbf{t_{op}}\)} \\  & \multicolumn{3}{c}{\(17\%\)} & \multicolumn{3}{c}{\(33\%\)} & \multicolumn{3}{c}{\(3\%\)} & \multicolumn{3}{c}{\(17\%\)} & \multicolumn{3}{c}{\(33\%\)} & \multicolumn{3}{c}{\(3\%\)} & \multicolumn{3}{c}{\(5\%\)} & \multicolumn{3}{c}{\(17\%\)} & \multicolumn{3}{c}{\(33\%\)} & \multicolumn{3}{c}{\(5\%\)} \\ \hline  & Type Coordination & C & PL & C & PL & C & PL & C & PL & C & PL & C & PL & C & PL & C & PL \\ \hline \multirow{10}{*}{ \begin{tabular}{c} Three- \\ phase \\ \end{tabular}  } & I\({}_{\text{OCR1}}\) & 0.42 & **0.39** & 0.42 & **0.39** & 0.42 & **0.39** & - & - & - & - & - & - & - & - & - & - & - \\  & I\({}_{\text{OCR2(DG)}}\) & 0.20 & **0.20** & 0.19 & **0.10** & 0.15 & **0.08** & 0.20 & 0.13 & 0.20 & 0.10 & 0.20 & 0.10 & - & - & - & - & - \\  & I\({}_{\text{OCR3}}\) & - & - & - & - & - & - & - & - & - & - & 0.42 & **0.38** & 0.42 & **0.40** & 0.42 & **0.40** \\  & I\({}_{\text{RC}}\) & - & - & - & - & - & 0.45 & **0.42** & 0.45 & **0.38** & 0.45 & **0.40** & 0.12 & **0.08** & 0.12 & **0.10** & 0.12 & **0.10** \\ \hline \multirow{10}{*}{\ \begin{tabular}{c} Single- \\ phase \\ \end{tabular}