siemens graph

16
Forward Reverse Non-Direc R 1 X 2 Z 2.236067977 Phi oad Max. load Angle (P-P) 45 Remember R load ,min load Z (P-P) oo a)if R_load_PH_PH$="oo" then LA = LA 45 b) if R_load_PH_PH$="oo" then Rload Rload 121 Distance Cha. Angle 90 Angle1 22 Angle2 30 AbsR 1 AbsRload 121 Rprag1 -0.7948449 Rprag2 -0.83415385 Rprag3 1 P1XA 1 P1XB 1

Upload: shahzad-bhatti

Post on 12-Feb-2016

1 views

Category:

Documents


0 download

DESCRIPTION

graph

TRANSCRIPT

Page 1: Siemens Graph

Forward Reverse Non-Directional

R 1X 2Z 2.2360679775

Phi oad Max. load Angle (P-P) 45 RememberR load ,min load Z (P-P) oo a)if R_load_PH_PH$="oo" then LA = 45LA 45 b) if R_load_PH_PH$="oo" then Rload = 121 else Rload = val(R_load_PH_PH$)Rload 121Distance Cha. Angle 90Angle1 22Angle2 30

AbsR 1AbsRload 121Rprag1 -0.794844904Rprag2 -0.83415385Rprag3 1

P1XA 1P1XB 1

Page 2: Siemens Graph

P1X

Page 3: Siemens Graph

R= R_Z1_PH_PHX = X_Z1Z=sqr(X^2+R^2)if Op_mode_Z1$= "Reverse" then Zone_Reduction = 0

b) if R_load_PH_PH$="oo" then Rload = 121 else Rload = val(R_load_PH_PH$)

RCA = Distance_AngleAng1 = 22if Op_mode_Z1$= "Reverse" then Ang1=30 else Ang1 =Ang1Ang2 = 30

AbsR = sqr(R*R)AbsRload = sqr(Rload*Rload)Rprag1 = AbsR * tan(RCA)/(tan(RCA)+tan(Ang1))Rprag2 = AbsR * tan(RCA)/(tan(RCA)-tan(LA))Rprag3 = AbsR * tan(RCA)/(tan(RCA)+tan(LA))

if Op_mode_Z1$= "Reverse" then X= -X else X=Xif Op_mode_Z1$= "Reverse" then R=-R else R=Rif Op_mode_Z1$= "Reverse" then Rload = -Rload

if Op_mode_Z1$ ="Non_Directional" then P1X =R-X/tan(RCA)if Op_mode_Z1$ ="Non_Directional" then P1Y = -X

P13X = P1XP13Y = P1Y

if Op_mode_Z1$ <>"Non_Directional" and LA < Ang1 then P1X = R*tan(RCA)/(tan(Ang1)+tan(RCA))if Op_mode_Z1$ <>"Non_Directional" and LA < Ang1 then P1Y = -P1X*tan(Ang1)

if Op_mode_Z1$ <>"Non_Directional" and LA >= Ang1 and AbsRload <=Rprag1 then P1X = Rloadif Op_mode_Z1$ <>"Non_Directional" and LA >= Ang1 and AbsRload <=Rprag1 then P1Y = -Rload*tan(Ang1)

if Op_mode_Z1$ <>"Non_Directional" and LA >= Ang1 and AbsRload >=Rprag1 then P1X = R*tan(RCA)/(tan(RCA)+tan(Ang1))'if Op_mode_Z1$ <>"Non_Directional" and LA >= Ang1 and AbsRload >=Rprag1 then P1X = R-X*tan(90- RCA) else P1X =P1Xif Op_mode_Z1$ <>"Non_Directional" and LA >= Ang1 and AbsRload >=Rprag1 then P1Y = -P1X*tan(Ang1)

if Op_mode_Z1$ ="Forward" and RLoad>120 then P1XA = R-X*tan(90-RCA)if Op_mode_Z1$ ="Forward" and RLoad>120 then P1XB = R*tan(RCA)/(tan(RCA)+tan(Ang1))

Page 4: Siemens Graph

if Op_mode_Z1$ ="Forward" and RLoad>120 and P1XA > P1XB then P1X = P1XA else P1X = P1X if Op_mode_Z1$ ="Forward" and RLoad>120 and P1XA <= P1XB then P1X = P1XB else P1X = P1X ' newly added after zumadei issueif Op_mode_Z1$ ="Forward" and RLoad>120 then P1Y = -P1X*tan(Ang1)

if Op_mode_Z1$ ="Reverse" and -RLoad >120 then P1XC = R-X*tan(90-RCA)if Op_mode_Z1$ ="Reverse" and -RLoad>120 then P1XD = R*tan(RCA)/(tan(RCA)+tan(Ang1))if Op_mode_Z1$ ="Reverse" and -RLoad>120 and -P1XC > -P1XD then P1X = P1XC if Op_mode_Z1$ ="Reverse" and -RLoad>120 and -P1XC < -P1XD then P1X = P1XDif Op_mode_Z1$ ="Reverse" and -RLoad>120 then P1Y = -P1X*tan(Ang1)

if Op_mode_Z1$ ="Reverse" and LA < Ang1 then P1Y = -P1X*tan(30)if Op_mode_Z1$ ="Reverse" and LA >= Ang1 and AbsRload <=Rprag1 then P1Y = -Rload*tan(30)if Op_mode_Z1$ ="Reverse" and LA >= Ang1 and AbsRload >=Rprag1 then P1Y = -P1X*tan(30)

if Op_mode_Z1$ <>"Non_Directional" and (-P1Y) >= X then P13Y = -X else P13Y = P1Yif Op_mode_Z1$ <>"Non_Directional" and (-P1Y) >= X then P13X = -P13Y/ tan(Ang1) else P13X = P1Xif Op_mode_Z1$ ="Reverse" and (-P1Y) <= X then P13Y = -Xif Op_mode_Z1$ ="Reverse" and (-P1Y) <= X then P13X = -P13Y/ tan(30)

if Op_mode_Z1$ <>"Non_Directional" and P1Y <= P13Y then P1Y = P13Y else P1Y = P1Yif Op_mode_Z1$ <>"Non_Directional" and P1Y <= P13Y then P1X = P1X else P1X = P1Xif Op_mode_Z1$ ="Reverse" and P1Y >= P13Y then P1Y = P13Y ' Zumaedi modificationif Op_mode_Z1$ ="Reverse" and P1Y >= P13Y then P1X = P1X

if Op_mode_Z1$ = "Non_Directional" and AbsRload<=AbsR then P2X =R*tan(RCA)/(tan(RCA)+tan(LA))if Op_mode_Z1$ = "Non_Directional" and AbsRload<=AbsR then P2Y =-P2X*tan(LA)if Op_mode_Z1$ <> "Non_Directional" and LA<Ang1 then P2X =R*tan(RCA)/(tan(RCA)+tan(LA))if Op_mode_Z1$ ="Reverse" and LA<Ang1 then P2X =R*tan(RCA)/(tan(RCA)+tan(LA))if Op_mode_Z1$ <> "Non_Directional" and LA<Ang1 then P2Y =-P2X*tan(LA)if Op_mode_Z1$ = "Reverse" and LA<Ang1 then P2Y =-P2X*tan(LA)if Op_mode_Z1$ <> "Non_Directional" and LA<Ang1 and AbsRload>=Rprag1 and AbsRload<=AbsR then P2X=Rloadif Op_mode_Z1$ <> "Non_Directional" and LA<Ang1 and AbsRload>=Rprag1 and AbsRload<=AbsR then P2Y=(Rload-R)*tan(RCA)if Op_mode_Z1$ <> "Non_Directional" and LA>Ang1 and AbsRload<=AbsR then P2X=Rloadif Op_mode_Z1$ <> "Non_Directional" and LA>Ang1 and AbsRload<=AbsR and AbsRload>=Rprag1then P2Y= - (R-Rload)*tan(RCA)if Op_mode_Z1$ <> "Non_Directional" and LA>Ang1 and AbsRload<=AbsR and AbsRload<Rprag1 then P2Y= - RLoad*tan(Ang1)if Op_mode_Z1$ = "Reverse" and LA>Ang1 and AbsRload<=AbsR and AbsRload<Rprag1 then P2Y= - RLoad*tan(30)if AbsRload>AbsR then P2X=Rif AbsRload>AbsR then P2Y=0

if Op_mode_Z1$ = "Reverse" and Rload >= 0.02 and Rload <= 120 then P1X = RLoad else P1X = P1X ' old calculation'if Op_mode_Z1$ = "Reverse" and -Rload >= 0.02 and Rload <= 120 then P1X = P1X else P1X = RLoad ' Zumadei modificationif Op_mode_Z1$ = "Reverse" and -Rload >= 0.02 and -Rload <= 120 then P1Y = -P1X*tan(Ang1) else P1Y = P1Yif Op_mode_Z1$ = "Reverse" and Rload >= 0.02 and Rload <= 120 then P13X = P1X else P13X = P13X

Page 5: Siemens Graph

if Op_mode_Z1$ = "Reverse" and Rload >= 0.02 and Rload <= 120 then P13Y = P1Y else P13Y = P13Yif Op_mode_Z1$ = "Reverse" and Rload >= 0.02 and Rload <= 120 then P2X = P1X else P2X = p2Xif Op_mode_Z1$ = "Reverse" and Rload >= 0.02 and Rload <= 120 then P2Y = P1Y else P2Y = P2Y

P3X=Rloadif Op_mode_Z1$ ="Non_Directional" and AbsRload<=Rprag3 then P3Y =-Rload*tan(LA) if Op_mode_Z1$ ="Non_Directional" and AbsRload> Rprag3 and AbsRload<AbsR then P3Y = (Rload-R)*tan(RCA)

if Op_mode_Z1$ <>"Non_Directional" and LA<Ang1and AbsRload<=Rprag3 then P3Y =-Rload*tan(LA)if Op_mode_Z1$ <>"Non_Directional" and LA<Ang1and AbsRload>Rprag3 and AbsRload<=AbsR then P3Y =(Rload-R)*tan(RCA)if Op_mode_Z1$ <>"Non_Directional" and LA>=Ang1 then P3Y = 0if AbsRload > AbsR and AbsRload < Rprag2 then P3X=Rloadif AbsRload > AbsR and AbsRload < Rprag2 then P3Y=(Rload - R)*tan(RCA)if AbsRload>=Rprag2 then P3X=Rif AbsRload>=Rprag2 then P3Y=0

if AbsRload>Rprag2 then P4X=R*tan(RCA)/(tan(RCA)-tan(LA))if AbsRload>Rprag2 then P4Y = P4X*tan(LA)if AbsRload>AbsR and AbsRload<Rprag2 then P4X = Rloadif AbsRload>AbsR and AbsRload<Rprag2 then P4Y = Rload*tan(RCA)if AbsRload<=Rprag2 then P4X=Rloadif AbsRload<=Rprag2 then P4Y=Rload*tan(LA)

P5X = (R*tan( RCA) + X*(1+tan(Zone_Reduction)*tan(90- RCA)))/(tan(Zone_Reduction)+tan(RCA)-tan(LA))P5Y = R*tan(RCA)*tan(LA)/(tan(RCA)-tan(LA))

P6X = R+X/tan(RCA)P6Y = X

P4X = P6X ' Zumaedi modificationP4Y = P6Y'if Op_mode_Z1$ ="Non_Directional" then P4Y = P4X*tan(LA) else P4Y = P4Y

if Op_mode_Z1$ ="Non_Directional" then P7X =-R+X/tan(RCA) else P7X = 0.3*Rif Op_mode_Z1$ <>"Non_Directional" and RLoad < X then P7X = RLoad + ((X-RLoad)/tan(LA))P7Y = X

P14X = P7XP14Y = P7Y

if Op_mode_Z1$ ="Non_Directional" then P8X = -P2X else P8X = 0.2*Rif Op_mode_Z1$ ="Non_Directional" then P8Y = -P2Y else P8Y = X

if Zone_Reduction > 0 then P4X = RLoad else P4X = P4X

Page 6: Siemens Graph

if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" then P4X = RLoad else P4X= P4Xif Zone_Reduction > 0 then P4Y= P4Y else P4Y = P4Yif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" then P4Y= P4Y else P4Y = P4Y

if Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" then P5X = P4X else P5X = P5Xif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" then P5Y = P4Y else P5Y = P5Yif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" then P6X = P4X else P6X = P6Xif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" then P6Y = P4Y else P6Y = P6Y

if Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" then P7Y= X-(X/tan(LA)-(X*tan(90-RCA)))*sin(LA)*sin(Zone_Reduction)/sin(180-LA-Zone_Reduction) else P7Y = P7Yif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and RLoad>= X then P7Y= X-(tan(Zone_Reduction)*(RLoad-(X*tan(90-RCA)))) else P7Y = P7Yif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" then P7X = P7Y/tan(LA) else P7Y = P7Y

if Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and P7X <= RLoad then P7X = Rloadif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and P7Y > X then P7Y = X-(tan(Zone_Reduction)*(RLoad-(X*tan(90-RCA))))

if Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and Rload >120 then P7X = (R*tan( RCA) + X*(1+tan(Zone_Reduction)*tan(90- RCA)))/(tan(Zone_Reduction)+tan(RCA)) else P7X = P7Xif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and Rload >120 then P7Y = (-R*tan(Zone_Reduction) + X*(1+tan(Zone_Reduction)*tan(90- RCA)))/(tan(Zone_Reduction)+tan( RCA))*tan(RCA) else P7Y = P7Y

if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and Rload >120 then P7X = (R*tan( RCA) + X*(1+tan(Zone_Reduction)*tan(90- RCA)))/(tan(Zone_Reduction)+tan(RCA)) else P7X = P7Xif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and Rload >120 then P7Y = (-R*tan(Zone_Reduction) + X*(1+tan(Zone_Reduction)*tan(90- RCA)))/(tan(Zone_Reduction)+tan( RCA))*tan(RCA) else P7Y = P7Y

if Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and RLoad>120 then P4X = P7X else P4X = P4Xif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and RLoad>120 then P4X = P7X else P4X = P4Xif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and RLoad>120 then P4Y = P7Y else P4Y = P4Yif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and RLoad>120 then P4Y = P7Y else P4Y = P4Yif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and RLoad>120 then P5X = P7X else P5X = P5Xif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and RLoad>120 then P5X = P7X else P5X = P5Xif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and RLoad>120 then P5Y = P7Y else P5Y = P5Yif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and RLoad>120 then P5Y = P7Y else P5Y = P5Yif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and RLoad>120 then P6X = P7X else P6X = P6Xif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and RLoad>120 then P6X = P7X else P6X = P6Xif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and RLoad>120 then P6Y = P7Y else P6Y = P6Y

if Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" then P8X = P7X else P8X = P8Xif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" then P8Y = P7Y else P8Y = P8Y

if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" then P5X = P5X if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" then P5Y = P5Y if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" then P6X = P6X if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" then P6Y = P6Y

if Zone_Reduction <= 0 and Op_mode_Z1$ ="Non_Directional" then P7X = RLoad

Page 7: Siemens Graph

if Zone_Reduction <= 0 and Op_mode_Z1$ ="Non_Directional" then P7Y = X-(X/tan(LA)-(X*tan(90-RCA)))*sin(LA)*sin(Zone_Reduction)/sin(180-LA-Zone_Reduction)

if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" then P7X = RLoadif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" then P7Y = X-(tan(Zone_Reduction)*(RLoad-(X*tan(90-RCA))))

if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and Rload >0.02 and Rload<120 then P7Y = X-(X/tan(LA)-(X*tan(90-RCA)))*sin(LA)*sin(Zone_Reduction)/sin(180-LA-Zone_Reduction)if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and Rload >0.02 and Rload<120 and P7Y > Rload then P7X = P7Y/tan(LA))

if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" then P8X =0if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and Rload >0.02 and Rload<120 then P8X =0if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and Rload >0.02 and Rload<120 and Rload <= X then P8X =-Rif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and RLoad > 120 then P8X = -(R-X*tan(90- RCA))if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" then P8Y = X

if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" then P14X = X*tan(90-RCA)if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" then P14Y = X

if Op_mode_Z1$ ="Non_Directional" then P9X = -P3Xif Op_mode_Z1$ ="Non_Directional" then P9Y = -P3Yif Op_mode_Z1$ ="Non_Directional" and -Rload >= -X then P9Y = X ' Zumaedi modificationif Op_mode_Z1$ ="Non_Directional" and Rload >= X and RLoad>120 then P9Y = -P3Y' if Op_mode_Z1$ ="Non_Directional" and AbsRload > AbsR then P9X = -R' if Op_mode_Z1$ ="Non_Directional" and AbsRload > AbsR then P9Y =0if Op_mode_Z1$ <>"Non_Directional" then P9X =0.1*Rif Op_mode_Z1$ <>"Non_Directional" then P9Y =X

if Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" then P9X = X*tan(90-RCA) else P9X = P9Xif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" then P9Y = X else P9Y = P9Y

'if Zone_Reduction > 0 and Op_mode_Z1$ = "Non_Directional" and RLoad >= X then P9X = Rload else P9X = P9X'if Zone_Reduction > 0 and Op_mode_Z1$ = "Non_Directional" then P9Y = X else P9Y = P9Y

if Op_mode_Z1$ ="Non_Directional" then P10X = -P4Xif Op_mode_Z1$ ="Non_Directional" then P10Y= -P4Y' if Op_mode_Z1$ ="Non_Directional" and AbsRload > Rprag2 then P10X = -R' if Op_mode_Z1$ ="Non_Directional" and AbsRload > Rprag2 then P10Y =0if Op_mode_Z1$ <>"Non_Directional" then P10X =0if Op_mode_Z1$ <>"Non_Directional" then P10Y =X

Page 8: Siemens Graph

if Op_mode_Z1$ ="Non_Directional" then P11X = -P5Xif Op_mode_Z1$ ="Non_Directional" then P11Y = -P5Yif Op_mode_Z1$ <>"Non_Directional" then P11X = -X*tan(Ang2)if Op_mode_Z1$ <>"Non_Directional" then P11Y = X

if Op_mode_Z1$ ="Non_Directional" then P12X = -R-X/tan(RCA) else P12X = 0if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" then P12X = -R else P12X= P12Xif Op_mode_Z1$ ="Non_Directional" then P12Y = -X else P12Y = 0if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and Rload>120 then P12X =-R-X/tan(RCA) else P12X= P12X

' Zumaedi modifications

P11XB = cos(90-Ang2) * ((R *sin(RCA)) / (sin(360-RCA-(90-Ang2))))P11YB = tan(90-Ang2) * -P11XB

P11XA = -(R - (X / tan(RCA)))P11YA = X

if Op_mode_Z1$ ="Forward" and -P11X >= -P11XA and -P11X >= -P11XB then P10X = P11XA else P10X = P10Xif Op_mode_Z1$ ="Forward" and -P11X >= -P11XA and -P11X >= -P11XB then P10Y = P11YA else P10Y = P10Y

if Op_mode_Z1$ ="Forward" and -P11X >= -P11XA and -P11X >= -P11XB then P11X = P11XB else P11X = P11Xif Op_mode_Z1$ ="Forward" and -P11X >= -P11XA and -P11X >= -P11XB then P11Y = P11YB else P11Y = P11Y

if Op_mode_Z1$ = "Reverse" and P11X >= P11XA and P11X >= P11XB then P10X = P11XA else P10X = P10Xif Op_mode_Z1$ = "Reverse" and P11X >= P11XA and P11X >= P11XB then P10Y = P11YA else P10Y = P10Y

if Op_mode_Z1$ = "Reverse" and P11X >= P11XA and P11X >= P11XB then P11X = P11XB else P11X = P11Xif Op_mode_Z1$ = "Reverse" and P11X >= P11XA and P11X >= P11XB then P11Y = P11YB else P11Y = P11Y

if Op_mode_Z1$ ="Non_Directional" then CentreX = 0 else CentreX =0.01*R/2if Op_mode_Z1$ ="Non_Directional" then CentreY = 0 else CentreY =0.01* X/2

Page 9: Siemens Graph

if Op_mode_Z1$ <>"Non_Directional" and LA < Ang1 then P1X = R*tan(RCA)/(tan(Ang1)+tan(RCA))

if Op_mode_Z1$ <>"Non_Directional" and LA >= Ang1 and AbsRload <=Rprag1 then P1Y = -Rload*tan(Ang1)

if Op_mode_Z1$ <>"Non_Directional" and LA >= Ang1 and AbsRload >=Rprag1 then P1X = R*tan(RCA)/(tan(RCA)+tan(Ang1))'if Op_mode_Z1$ <>"Non_Directional" and LA >= Ang1 and AbsRload >=Rprag1 then P1X = R-X*tan(90- RCA) else P1X =P1Xif Op_mode_Z1$ <>"Non_Directional" and LA >= Ang1 and AbsRload >=Rprag1 then P1Y = -P1X*tan(Ang1)

Page 10: Siemens Graph

if Op_mode_Z1$ ="Forward" and RLoad>120 and P1XA <= P1XB then P1X = P1XB else P1X = P1X ' newly added after zumadei issue

if Op_mode_Z1$ <>"Non_Directional" and (-P1Y) >= X then P13X = -P13Y/ tan(Ang1) else P13X = P1X

if Op_mode_Z1$ = "Non_Directional" and AbsRload<=AbsR then P2X =R*tan(RCA)/(tan(RCA)+tan(LA))

if Op_mode_Z1$ <> "Non_Directional" and LA<Ang1 and AbsRload>=Rprag1 and AbsRload<=AbsR then P2X=Rloadif Op_mode_Z1$ <> "Non_Directional" and LA<Ang1 and AbsRload>=Rprag1 and AbsRload<=AbsR then P2Y=(Rload-R)*tan(RCA)

if Op_mode_Z1$ <> "Non_Directional" and LA>Ang1 and AbsRload<=AbsR and AbsRload>=Rprag1then P2Y= - (R-Rload)*tan(RCA)if Op_mode_Z1$ <> "Non_Directional" and LA>Ang1 and AbsRload<=AbsR and AbsRload<Rprag1 then P2Y= - RLoad*tan(Ang1)if Op_mode_Z1$ = "Reverse" and LA>Ang1 and AbsRload<=AbsR and AbsRload<Rprag1 then P2Y= - RLoad*tan(30)

if Op_mode_Z1$ = "Reverse" and Rload >= 0.02 and Rload <= 120 then P1X = RLoad else P1X = P1X ' old calculation'if Op_mode_Z1$ = "Reverse" and -Rload >= 0.02 and Rload <= 120 then P1X = P1X else P1X = RLoad ' Zumadei modificationif Op_mode_Z1$ = "Reverse" and -Rload >= 0.02 and -Rload <= 120 then P1Y = -P1X*tan(Ang1) else P1Y = P1Yif Op_mode_Z1$ = "Reverse" and Rload >= 0.02 and Rload <= 120 then P13X = P1X else P13X = P13X

Page 11: Siemens Graph

if Op_mode_Z1$ = "Reverse" and Rload >= 0.02 and Rload <= 120 then P13Y = P1Y else P13Y = P13Y

if Op_mode_Z1$ ="Non_Directional" and AbsRload> Rprag3 and AbsRload<AbsR then P3Y = (Rload-R)*tan(RCA)

if Op_mode_Z1$ <>"Non_Directional" and LA<Ang1and AbsRload<=Rprag3 then P3Y =-Rload*tan(LA)if Op_mode_Z1$ <>"Non_Directional" and LA<Ang1and AbsRload>Rprag3 and AbsRload<=AbsR then P3Y =(Rload-R)*tan(RCA)

P5X = (R*tan( RCA) + X*(1+tan(Zone_Reduction)*tan(90- RCA)))/(tan(Zone_Reduction)+tan(RCA)-tan(LA))

Page 12: Siemens Graph

if Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" then P7Y= X-(X/tan(LA)-(X*tan(90-RCA)))*sin(LA)*sin(Zone_Reduction)/sin(180-LA-Zone_Reduction) else P7Y = P7Yif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and RLoad>= X then P7Y= X-(tan(Zone_Reduction)*(RLoad-(X*tan(90-RCA)))) else P7Y = P7Yif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" then P7X = P7Y/tan(LA) else P7Y = P7Y

if Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and P7X <= RLoad then P7X = Rloadif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and P7Y > X then P7Y = X-(tan(Zone_Reduction)*(RLoad-(X*tan(90-RCA))))

if Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and Rload >120 then P7X = (R*tan( RCA) + X*(1+tan(Zone_Reduction)*tan(90- RCA)))/(tan(Zone_Reduction)+tan(RCA)) else P7X = P7Xif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and Rload >120 then P7Y = (-R*tan(Zone_Reduction) + X*(1+tan(Zone_Reduction)*tan(90- RCA)))/(tan(Zone_Reduction)+tan( RCA))*tan(RCA) else P7Y = P7Y

if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and Rload >120 then P7X = (R*tan( RCA) + X*(1+tan(Zone_Reduction)*tan(90- RCA)))/(tan(Zone_Reduction)+tan(RCA)) else P7X = P7Xif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and Rload >120 then P7Y = (-R*tan(Zone_Reduction) + X*(1+tan(Zone_Reduction)*tan(90- RCA)))/(tan(Zone_Reduction)+tan( RCA))*tan(RCA) else P7Y = P7Y

if Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and RLoad>120 then P4X = P7X else P4X = P4Xif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and RLoad>120 then P4X = P7X else P4X = P4Xif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and RLoad>120 then P4Y = P7Y else P4Y = P4Yif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and RLoad>120 then P4Y = P7Y else P4Y = P4Yif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and RLoad>120 then P5X = P7X else P5X = P5Xif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and RLoad>120 then P5X = P7X else P5X = P5Xif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and RLoad>120 then P5Y = P7Y else P5Y = P5Yif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and RLoad>120 then P5Y = P7Y else P5Y = P5Yif Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and RLoad>120 then P6X = P7X else P6X = P6Xif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and RLoad>120 then P6X = P7X else P6X = P6Xif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and RLoad>120 then P6Y = P7Y else P6Y = P6Y

Page 13: Siemens Graph

if Zone_Reduction <= 0 and Op_mode_Z1$ ="Non_Directional" then P7Y = X-(X/tan(LA)-(X*tan(90-RCA)))*sin(LA)*sin(Zone_Reduction)/sin(180-LA-Zone_Reduction)

if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" then P7Y = X-(tan(Zone_Reduction)*(RLoad-(X*tan(90-RCA))))

if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and Rload >0.02 and Rload<120 then P7Y = X-(X/tan(LA)-(X*tan(90-RCA)))*sin(LA)*sin(Zone_Reduction)/sin(180-LA-Zone_Reduction)if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and Rload >0.02 and Rload<120 and P7Y > Rload then P7X = P7Y/tan(LA))

if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and Rload >0.02 and Rload<120 then P8X =0if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and Rload >0.02 and Rload<120 and Rload <= X then P8X =-Rif Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and RLoad > 120 then P8X = -(R-X*tan(90- RCA))

if Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" then P9X = X*tan(90-RCA) else P9X = P9X

'if Zone_Reduction > 0 and Op_mode_Z1$ = "Non_Directional" and RLoad >= X then P9X = Rload else P9X = P9X

Page 14: Siemens Graph

if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and Rload>120 then P12X =-R-X/tan(RCA) else P12X= P12X

if Op_mode_Z1$ ="Forward" and -P11X >= -P11XA and -P11X >= -P11XB then P10X = P11XA else P10X = P10Xif Op_mode_Z1$ ="Forward" and -P11X >= -P11XA and -P11X >= -P11XB then P10Y = P11YA else P10Y = P10Y

if Op_mode_Z1$ ="Forward" and -P11X >= -P11XA and -P11X >= -P11XB then P11X = P11XB else P11X = P11Xif Op_mode_Z1$ ="Forward" and -P11X >= -P11XA and -P11X >= -P11XB then P11Y = P11YB else P11Y = P11Y

if Op_mode_Z1$ = "Reverse" and P11X >= P11XA and P11X >= P11XB then P10X = P11XA else P10X = P10Xif Op_mode_Z1$ = "Reverse" and P11X >= P11XA and P11X >= P11XB then P10Y = P11YA else P10Y = P10Y

if Op_mode_Z1$ = "Reverse" and P11X >= P11XA and P11X >= P11XB then P11X = P11XB else P11X = P11Xif Op_mode_Z1$ = "Reverse" and P11X >= P11XA and P11X >= P11XB then P11Y = P11YB else P11Y = P11Y

Page 15: Siemens Graph

if Zone_Reduction > 0 and Op_mode_Z1$ <>"Non_Directional" and Rload >120 then P7Y = (-R*tan(Zone_Reduction) + X*(1+tan(Zone_Reduction)*tan(90- RCA)))/(tan(Zone_Reduction)+tan( RCA))*tan(RCA) else P7Y = P7Y

if Zone_Reduction > 0 and Op_mode_Z1$ ="Non_Directional" and Rload >120 then P7Y = (-R*tan(Zone_Reduction) + X*(1+tan(Zone_Reduction)*tan(90- RCA)))/(tan(Zone_Reduction)+tan( RCA))*tan(RCA) else P7Y = P7Y