eps=0.05;
a=1*exp(2*pi/3*1j);
Ia1=I1_120;
Ia2=I2_120;
Ia0=I0_120;
Ib1=a^2*I1_120;
Ib2=a*I2_120;
Ib0=I0_120;
Ic1=a*I1_120;
Ic2=a^2*I2_120;
Ic0=I0_120;
        
if abs(Ia1-Ia2)<eps*abs(Ia1) && abs(Ia1-Ia0)<eps*abs(Ia1) 
    tipofalta=1 ; %AG
elseif abs(Ib1-Ib2)<eps*abs(Ia1) && abs(Ib1-Ib0)<eps*abs(Ia1)
    tipofalta=2; %BG
elseif abs(Ic1-Ic2)<eps*abs(Ia1) && abs(Ic1-Ic0)<eps*abs(Ia1)
    tipofalta=3; %CG
elseif abs(Ia1+Ia2+Ia0)<eps*abs(Ia1) && abs(Ia0)>eps*abs(Ia1) 
    tipofalta=4; %BCG
elseif abs(Ib1+Ib2+Ib0)<eps*abs(Ia1) && abs(Ia0)>eps*abs(Ia1) 
    tipofalta=5; %CAG
elseif abs(Ic1+Ic2+Ic0)<eps*abs(Ia1) && abs(Ia0)>eps*abs(Ia1) 
    tipofalta=6; %ABG
elseif abs(Ia1+Ia2)<eps*abs(Ia1) && abs(Ia0)<eps*abs(Ia1) 
    tipofalta=7; %BC
elseif abs(Ib1+Ib2)<eps*abs(Ia1) && abs(Ia0)<eps*abs(Ia1) 
    tipofalta=8; %CA
elseif abs(Ic1+Ic2)<eps*abs(Ia1) && abs(Ia0)<eps*abs(Ia1) 
    tipofalta=9; %AB
elseif abs(Ia2)<eps*abs(Ia1) && abs(Ia0)<eps*abs(Ia1) && abs(Ia1)>25
    tipofalta=10; %ABC
else
    tipofalta=11; %Indeterminada
    
end
tipf = tipofalta