/* Program: three_resistors.c Original Rev. 9-July-2021 Current Rev. 9-Aug-2021 Assume that the circuit you are working with is three resistors connected in a "Delta" configuration. In the following diagram the three Resistors are labeled: Ra, Rb, and Rc. The three Nodes are labeled: N1, N2, and N3. Ra is between nodes N2 & N3 and across from N1. Rb is between nodes N1 & N3 and across from N2. Rc is between nodes N1 & N2 and across from N3. N3 o / \ / \ / \ Rb Ra / \ / \ N1 o------ Rc ------o N2 Using an Ohmmeter one could measure the resistance between Nodes N1 and N2. This is called Measurement M12. Likewise, the measured resistance between Nodes N1 and N3 is called Measurement M13, and the measured resistance between N2 and N3 is called Measurement M23. These are the only three independent resistance measurements possible and will always be called: M12, M13, and M23 in the following text. The other three redundant combinations of the double sub-scripts on M will not be used. ---> Given the values of the three Measurements: M12, M13, and M23 the goal is to calculate the resistance of: Ra, Rb, and Rc. The following obvious relationship exists between the values of the three resistors and the three Measurements obtained with the Ohmmeter: Rc x (Ra + Rb) M12 = Rc || (Ra + Rb) = -------------- Rc + (Ra + Rb) Where "||" implies parallel resistors and "+" implies series resistors. Likewise: M13 = Rb || (Ra + Rc) and M23 = Ra || (Rb + Rc) Trying to solve these three simultaneous equations, for example to give Ra as a function of: M12, M13, M23 is difficult to do directly. I assume that it can be done but I have never managed to avoid just getting lost in page after page of algebra. Even though the real circuit that you are working with is of the Delta configuration the easier path to finding the values of Ra, Rb, and Rc as functions of M12, M13, M23 is to assume that the circuit is in the "Y" configuration, solve that, and then transform the circuit from Wye to Delta using the known equivalence relationship equations. The Wye to Delta Transform was developed by Arthur Edwin Kennelly in 1899 at Harvard. It is a special case of a more general star-mesh transform in mathematics. Kennelly's Wye to Delta and Delta to Wye Transforms hold not only for resistors but also for complex impedances. So, even though the real circuit that you are working with is a Delta, we will assume that it is a Wye with the following layout. N3 One lead of all three o resistors are connected | together in the center. R3 | The other lead of R1 * is node N1. / \ R1 R2 The other lead of R2 / \ is node N2 and the N1 o o N2 other lead of R3 is N3. We retain the same naming convention for the Ohmmeter Measurements, e.g. M12 is the Ohmmeter Measurement across Nodes N1 and N2. From the Wye circuit layout it is obvious that M12 = R1 + R2. We can write out all 3 of these obvious relationships: M12 = R1 + R2 ---> R1 = M12 - R2 and R2 = M12 - R1 M13 = R1 + R3 ---> R1 = M13 - R3 and R3 = M13 - R1 M23 = R2 + R3 ---> R2 = M23 - R3 and R3 = M23 - R2 It is easy to solve the above simultaneous equations. Set pairs of equations for Rx equal to each other and eliminate one of the remaining Rs in terms of the other R and the third Mij. This gives: M12 + M13 - M23 R1 = ----------------- 2 M12 + M23 - M13 R2 = ----------------- 2 M13 + M23 - M12 R3 = ----------------- 2 We now have the solution for the three resistors of the Wye circuit in terms of the three Ohmmeter Measurements. The only remaining task is to transform the resistor values of the Wye circuit into the resistor values of the equivalent Delta circuit. This is done using Kennelly's Wye to Delta Transform which is: Define a term called the "Resistor Product" which is just the sum of the 3 possible resistor pair products: Rp = R1 x R2 + R1 x R3 + R2 x R3 then: Rp Rp Rp Ra = ---- Rb = ---- Rc = ---- R1 R2 R3 This gives us the desired result, i.e. the values of the 3 Delta configuration resistors in terms of the 3 Measurements. There are two final points to finish our understanding of this problem: - Do the algebra to fully write out e.g. what Ra is in terms of the 3 measurements. We do this to verify that this equation has the symmetries, zeros, and poles that we expect. - For completeness give the other Kennelly transform his Delta to Wye Transform. Writing out Ra directly in terms of M12, M13, M23 after some algebra we have: (M12xM13 + M12xM23 + M13xM23) - 1/2 (M12sqrd + M13sqrd + M23sqrd) Ra = ------------------------------------------------------------------- ( M12 + M13 - M23 ) To have an idea about what symmetries and other properties the equation for Ra in terms of M12, M13, M23 should have we can just workout some examples using the first equations at the top of this note. That is, pick some useful values for the three Delta configuration resistors and from those resistor values it is easy to calculate the three Ohmmeter Measurements that one would obtain from that circuit. Recall that M12 is the Measurement across Rc M13 is the Measurement across Rb M23 is the Measurement across Ra them in Ohms: Ra Rb Rc ---> M23 M13 M12 ------ ------ ------ ------- ------- ------- 100 100 100 66.66 66.66 66.66 100 100 200 75.0 75.0 100.0 100 200 300 83.33 133.33 150.0 100 100 0 50.0 50.0 0.0 x y 0 x||y x||y 0.0 does not 0 0 0.0 0.0 0.0 matter x y open x y x+y x open open x open open For example it is easy to understand that the equation for Ra in terms of M12, M13, and M23: - must by symmetric under exchanging the values of Rb and Rc, i.e. exchanging Measurements M12 and M13 i.e. M12 and M13 must always enter the equation for Ra as a sum or a product. - The numerator of the equation for Ra must be one order higher in Mij than its denominator to get the units correct. - The numerator must go to zero when M23 goes to zero. - If M23 is equal to the sum of M12 + M13 then the denominator of the equation for Ra must go to zero. - If M23 is zero AND M12 & M13 are not both zero then the equation for Ra must go to zero. - If M23 = M12 = M13 then Ra must equal 1.5 x Mij. For completeness the Kennelly Delta to Wye Transform is: Rb x Rc R1 = -------------- Ra + Rb + Rc Ra x Rc R2 = -------------- Ra + Rb + Rc Ra x Rb R3 = -------------- Ra + Rb + Rc */ #include #include main () { double measure_1_2 = 0.0 ; /* Measurement between nodes 1 & 2 */ double measure_1_3 = 0.0 ; /* Measurement between nodes 1 & 3 */ double measure_2_3 = 0.0 ; /* Measurement between nodes 2 & 3 */ double wye_R1 = 0.0 ; /* wye configuration R1 */ double wye_R2 = 0.0 ; /* wye configuration R2 */ double wye_R3 = 0.0 ; /* wye configuration R3 */ double delta_Ra = 0.0 ; /* delta configuration Ra */ double delta_Rb = 0.0 ; /* delta configuration Rb */ double delta_Rc = 0.0 ; /* delta configuration Rc */ double res_prod = 0.0 ; /* resistor product intermediate value */ /*==================================================================*/ /* */ /* First ask the operator to enter the 3 Ohmmeter Measurements, */ /* i.e. between nodes: 1-2, 1-3, and 2,3. */ /* */ /*==================================================================*/ printf(" \n "); printf("Enter the three Ohmmeter Measurements, i.e. the \n "); printf("resistance between nodes: 1-2, 1-3, and 2-3. \n "); printf(" \n "); printf(" Enter the resistance Measurement between nodes 1-2 : "); scanf( "%lf", &measure_1_2 ) ; printf(" \n ") ; printf(" Enter the resistance Measurement between nodes 1-3 : "); scanf( "%lf", &measure_1_3 ) ; printf(" \n ") ; printf(" Enter the resistance Measurement between nodes 2-3 : "); scanf( "%lf", &measure_2_3 ) ; printf(" \n ") ; printf(" Resistance Measurement between nodes 1-2 = %lf Ohms \n", measure_1_2 ) ; printf(" \n ") ; printf(" Resistance Measurement between nodes 1-3 = %lf Ohms \n", measure_1_3 ) ; printf(" \n ") ; printf(" Resistance Measurement between nodes 2-3 = %lf Ohms \n", measure_2_3 ) ; printf(" \n\n ") ; /*==================================================================*/ /* */ /* Now check that these 3 Resistance Measurements represent */ /* a normal physically realizable circuit where all three */ /* resistors have positive values. */ /* */ /*==================================================================*/ printf("For this to be a normal physically realizable circuit, \n "); printf("where all three resistors have a positive resistance, \n "); printf("then the value of any one Measurement can not be \n "); printf("equal to or larger than the sum of the other two \n "); printf("Measurements. Checking the input data for this \n "); printf("constraint. \n "); printf(" \n\n "); if ( measure_1_2 == 0.0 ) { printf(" Found the Measurement between nodes 1-2 \n "); printf(" to be Zero Ohms. This is a special \n "); printf(" condition that will cause a pole in the \n "); printf(" transform from the Wye configuration to \n "); printf(" the Delta configuration. \n "); printf(" Consider substituting a small value, e.g. \n "); printf(" 1 uOhm, for the this Measurement. \n "); printf(" \n\n "); } if ( measure_1_3 == 0.0 ) { printf(" Found the Measurement between nodes 1-3 \n "); printf(" to be Zero Ohms. This is a special \n "); printf(" condition that will cause a pole in the \n "); printf(" transform from the Wye configuration to \n "); printf(" the Delta configuration. \n "); printf(" Consider substituting a small value, e.g. \n "); printf(" 1 uOhm, for the this Measurement. \n "); printf(" \n\n "); } if ( measure_2_3 == 0.0 ) { printf(" Found the Measurement between nodes 2-3 \n "); printf(" to be Zero Ohms. This is a special \n "); printf(" condition that will cause a pole in the \n "); printf(" transform from the Wye configuration to \n "); printf(" the Delta configuration. \n "); printf(" Consider substituting a small value, e.g. \n "); printf(" 1 uOhm, for the this Measurement. \n "); printf(" \n\n "); } if ( measure_1_2 > measure_1_3 + measure_2_3 ) { printf(" Found the Measurement between nodes 1-2 \n "); printf(" to be larger than the sum of the \n "); printf(" Measurement between nodes 1-3 plus the \n "); printf(" Measurement between nodes 2-3. \n "); printf(" This physically unrealistic condition \n "); printf(" will force both the Wye configuration R3 \n "); printf(" and the Delta configuration Rc to have \n "); printf(" negative values of resistance. \n "); printf(" \n\n "); } if ( measure_1_3 > measure_1_2 + measure_2_3 ) { printf(" Found the Measurement between nodes 1-3 \n "); printf(" to be larger than the sum of the \n "); printf(" Measurement between nodes 1-2 plus the \n "); printf(" Measurement between nodes 2-3. \n "); printf(" This physically unrealistic condition \n "); printf(" will force both the Wye configuration R2 \n "); printf(" and the Delta configuration Rb to have \n "); printf(" negative values of resistance. \n "); printf(" \n\n "); } if ( measure_2_3 > measure_1_2 + measure_1_3 ) { printf(" Found the Measurement between nodes 2-3 \n "); printf(" to be larger than the sum of the \n "); printf(" Measurement between nodes 1-2 plus the \n "); printf(" Measurement between nodes 1-3. \n "); printf(" This physically unrealistic condition \n "); printf(" will force both the Wye configuration R1 \n "); printf(" and the Delta configuration Ra to have \n "); printf(" negative values of resistance. \n "); printf(" \n\n "); } /*==================================================================*/ /* */ /* Now calculate the values of R1, R2, and R3 assuming */ /* that this is a Wye configuration circuit. */ /* */ /*==================================================================*/ wye_R1 = ( measure_1_2 + measure_1_3 - measure_2_3 ) / 2.0 ; wye_R2 = ( measure_1_2 + measure_2_3 - measure_1_3 ) / 2.0 ; wye_R3 = ( measure_1_3 + measure_2_3 - measure_1_2 ) / 2.0 ; printf(" Resistance of Wye configuration R1 = %lf Ohms \n", wye_R1 ) ; printf(" \n ") ; printf(" Resistance of Wye configuration R2 = %lf Ohms \n", wye_R2 ) ; printf(" \n ") ; printf(" Resistance of Wye configuration R3 = %lf Ohms \n", wye_R3 ) ; printf(" \n\n ") ; /*==================================================================*/ /* */ /* Check the values of R1, R2, R3 to verify that they will */ /* transform OK into the Delta configuration, i.e. that the */ /* denominator of the transform expression will not go to zero. */ /* */ /*==================================================================*/ if ( wye_R1 == 0.0 ) { printf(" Because Wye configuration R1 is 0.0 Ohms \n "); printf(" the value of Delta configuration Ra is \n "); printf(" going to infinity. Consider modifying \n "); printf(" the value of a measurement. \n\n\n "); } if ( wye_R2 == 0.0 ) { printf(" Because Wye configuration R2 is 0.0 Ohms \n "); printf(" the value of Delta configuration Rb is \n "); printf(" going to infinity. Consider modifying \n "); printf(" the value of a measurement. \n\n\n "); } if ( wye_R3 == 0.0 ) { printf(" Because Wye configuration R3 is 0.0 Ohms \n "); printf(" the value of Delta configuration Rc is \n "); printf(" going to infinity. Consider modifying \n "); printf(" the value of a measurement. \n\n\n "); } /*==================================================================*/ /* */ /* Now transform to the values of Ra, Rb, and Rc to get the */ /* values of the resistors in a Delta configuration circuit. */ /* */ /*==================================================================*/ res_prod = ( wye_R1 * wye_R2 ) + ( wye_R1 * wye_R3 ) + ( wye_R2 * wye_R3 ) ; delta_Ra = res_prod / wye_R1 ; delta_Rb = res_prod / wye_R2 ; delta_Rc = res_prod / wye_R3 ; printf(" Resistance of Delta configuration Ra, \n" ) ; printf(" i.e. the resistor between nodes 2-3 = %lf Ohms \n", delta_Ra ) ; printf(" \n ") ; printf(" Resistance of Delta configuration Rb, \n" ) ; printf(" i.e. the resistor between nodes 1-3 = %lf Ohms \n", delta_Rb ) ; printf(" \n ") ; printf(" Resistance of Delta configuration Rc, \n" ) ; printf(" i.e. the resistor between nodes 1-2 = %lf Ohms \n", delta_Rc ) ; printf(" \n ") ; }