# Finding the resistor values in a mesh from the voltages at the nodes

Discussion in 'General Electronics Discussion' started by striplar, Dec 13, 2012.

1. ### striplar

14
0
Dec 13, 2012
This is a very small version of the problem I'm trying to solve. I can use PSpice to calculate the node voltages if I know the resistor values but I need to find the reverse.
In other words, I know all of the node voltages and even the current flowing out of the voltage source.
I've performed a node analysis but that only provides the same number of equations as the number of nodes, and there are more resistors than nodes.
The question is, whether it's actually possible to solve this problem and if so how?
I realise that this is going to result in as many simultaneous equations as the the number of resistors. That could end up running into thousands, but I understand that there are ways of solving those using matrices.
Does anyone have a handle on this?

Here's a link to the kind of circuit matrix I'm using
http://puu.sh/1As1F

2. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,497
2,838
Jan 21, 2010
Homework eh?

Once you realise that the method you're using with PSpice has robbed you of practice of possibly easier problems using the correct method, you will figure out how to calculate the answer to this.

I recommend you go back to the textbooks you have and see how to solve simpler problems like this.

Sure, use PSpice to check your answer, but if you use it like a crutch, you'll eventually depend on it and will be stuck when it can't provide an answer (ooh, like now).

Mesh analysis is what you need to look up.

Another thing you can do is to ignore the current from the current source and just use the node voltages. Take a stab at what one resistor value might be (you could pick 1 ohm). With all the node voltages you'll be able to determine the values for all the other resistors. However this will not be the right result because (far more than likely) the current will be wrong. Simply scale the resistors to adjust the current (if you calculate 1.23A and the problem is 43mA then multiply all resistor values by 1230/43).

3. ### striplar

14
0
Dec 13, 2012
Thanks for that, but this is a project for a customer of mine, and I'm a BSc Mech Eng, not electronics one. I've done a fair bit of electronics, and spent most of my career designing CNC control systems and programming microprocessors, but this is proving problematical for me. Doubtless it's easier if it's in your own area of specialisation.
I'll have a pretty good idea of what one resistor value might be so I'll look at solving it that way too.
The final problem will have an array of at least one thousand resistors, so the solution has to be scalable.

4. ### BobK

7,682
1,688
Jan 5, 2010
Given only the voltage on the nodes and the total current, there is no guarantee that the problem has a solution. Where are the voltage coming from?

Bob

5. ### striplar

14
0
Dec 13, 2012
The voltage will be coming from a variable voltage power supply, and I'll be able to measure the current entering the array. It looks like there can only be one solution if you know all of the voltages but it's the number of equations that seems to be a problem. I can do it the other way round by defining the resistor values, because node analysis gives the same number of equations as nodes of course.
The question is really, where do the three extra equations come from to make the 5 required to solve for the resistors?
I presume you are able to see the diagram I've given the URL for.

Here's a slightly larger array to give you a better idea as to the way it will be expanded to a huge array.
http://puu.sh/1ACDN

The LH end of the array will always be grounded as shown, and the RH end will always be the single source of voltage.
I can't tell you much more for commercial reasons I'm afraid.

6. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,497
2,838
Jan 21, 2010
Curious that you know the node voltages without being able to measure at least a single current or resistance.

There are contact style current probes... or could you apply AC and read the current using a clamp meter?

If it's all a big secret, then all I can suggest is a mesh analysis.

7. ### striplar

14
0
Dec 13, 2012
Sorry to be mysterious, but this is commercially sensitive. The resistors aren't discreet items that you can take out of the circuit. The voltage and what current flows from it is under my control.
The question is whether mesh analysis can provide the 5 equations necessary to solve for the 5 unknown resistor values. It's hard to see that there can be more than one solution to these, because all of the voltages are dependent on all of the resistor values. I can't picture being able to balance out the currents with different sets of resistor values, that doesn't look sensible.
This is the first time I've used mesh analysis so it would be good to know if what I'm attempting is impossible or not before I spend too much time on it.

8. ### BobK

7,682
1,688
Jan 5, 2010
No it is not. Without knowing the total equivalent reistance, you can control one or the other but not both.

The reason you cannot solve the problem is that is it underspecified. Take the simplest network you can think of. Two parallel reistors, R1 and R2 between 10V and ground.

Here you know all the voltages, (0V and 10V) and let's say the current is 1A. There are an infinite number of solutions for R1 and R2. Eg. 20 Ohms and 20 Ohms, 50 Ohms and 12.5 Ohms.

Bob

9. ### striplar

14
0
Dec 13, 2012
Thanks Bob, that was clearly an incorrect statement about the voltage and the current. What I should have said is that I can control the voltage and measure the current flowing from the voltage source.
I agree that knowing the voltage across two resistors in parallel is under specified even if I know the sum of the currents flowing, but is that still true for the simple example I've drawn?
Don't the Voltages at B1 and B2 determine the proportion of current flowing through RB1 and RB2?
I've calcultated the values for the voltages at B1 and B2, and I know the current flowing from the voltage source. Knowing the values of all those things, I can't see how you could change any of the resistor values and still keep the same voltages at B1 and B2 while keeping the current drawn from the voltage source the same.
It seems to me that the key is to include the current from the voltage source in the equations. Without it, the proportions of the resistors remain the same, but their absolute values are indeterminate.

10. ### BobK

7,682
1,688
Jan 5, 2010
The fact that you cannot write down enough equations to determine the resistances proves it. I think you need to know n-1 resistors in each n way branch point to have it fully specified, but that is only a gut feeling.

Bob

11. ### BobK

7,682
1,688
Jan 5, 2010
Okay, let's take your example. Set all of the vertically oriented resistors to 100M so essentially no current flows through them and assume all the others are much smaller. Now you have 3 3-way voltage dividers and you know all the intermediate voltages. You can now caculate the ratios of the 3 resistors in each horizontal branch, but you cannot know how the current divides between the the 3 branches without knowing at least 2 resistor values: 1 in any 2 of the 3 branches.

Bob

12. ### striplar

14
0
Dec 13, 2012
The fact that I can't write down enough equations may simply be because I don't really know what I'm doing though, and that's why I posed the question. I'm very much a novice to this kind of analysis.
You didn't directly address the last point I made though. It was carefully worded to see if someone could tell me if another set of resistor values could possibly be the solution to that specific set of conditions. ie all voltages known as is the current from the voltage source. I can't see how you could adjust any of the values and maintain those conditions.

13. ### striplar

14
0
Dec 13, 2012
Ok, I see what you're getting at there. effectively removing the vertical resistors. In that case I can see that you can determine the ratios of the resistors in each branch like you describe. I'm looking at the smaller example trying to visualise the difference between that high resistance bridge RLA1 and what happens when it has a small value.
As soon as you start to lower the value of RLA1, doesn't the ratio of those other resistors change? Perhaps that's what you're saying.
The crazy thing is that if it's indeterminate, you ought to be able to choose other values for the resistors that satisfy the voltage and current constraints, and I just can't see how you could change them to do that.
I'm not used to this particular kind of mental torture.

14. ### BobK

7,682
1,688
Jan 5, 2010
You see how you can do it in my simplied case, right? That proves that in some cases it can be done. Just because you don't see how to do it when all the resistors are in a narrow range, does not mean you cannot. Try an example with a a 2 x 2 version of your net and see if you can set the voltages and them come up with multiple solutions, I think you will find that you can.

Bob

15. ### striplar

14
0
Dec 13, 2012
Fair comment, it certainly looks like there's a unique solution in the simple case, even though I can't see how to construct enough equations for that. Is it possible that you would have to use an iterative technique to home in on the resistor values, in other words it's not classically solvable? Some structural problems are like that in mechanical engineering if my memory serves me right.
I'll try that mind bender you suggest when I'm not so tired, I've spent too long looking at this today and I'm going cross eyed.
There's a glimmer of hope though in a possible simplification that I might get away with. It might be acceptable to assume that the value of each vertical resistor is the same as the one to it's top RH branch for example. I still wouldn't know the value of it, but it would reduce the number of unknowns. Do you think that would render it solvable?
I really appreciate you applying your knowledge and experience to this, it's a huge help.

16. ### BobK

7,682
1,688
Jan 5, 2010
I have already shown you that there is not unique solution in the simplest case, 2 parallel resistors. Show me the circuit and values that you think has a unique solution.

Bob

1,293
56
Feb 26, 2011
18. ### striplar

14
0
Dec 13, 2012
I agree with you about the simplest case, but as soon as you add a bridging resistor in the middle of a mesh then it looks like a completely different problem. If I didn't know the current coming from the source, that would produce multiple solutions where the ratios of the resistors for a solution would remain the same. Adding that last piece of information forces every one of the resistors to change if you change just one. You may be right in that this doesn't have unique solution, I'm still undecided. It may simply be that there is a unique solution but you can't find it using the usual methods.
I'll go away and look for multiple solutions to the 2 x 2 array you suggest.
Once again, many thanks for your insight.

19. ### striplar

14
0
Dec 13, 2012
Thanks donkey, I've had a look at that, it explains it very well. Sadly, every tutorial always assumes that you know that values of some or all of the resistors. I guess that's because it's unusual to not be able to take them out of the circuit or you know them from their markings in real life. Sadly that's not the case here and they all have to be deduced somehow or another.

20. ### striplar

14
0
Dec 13, 2012
I think BobK has hit the nail on the head when he considers the case where the bridging resistors go to infinity. Like he says, there are multiple solutions because there are no constraints on the amount of current flowing in each of the parallel networks that remain.
In the real world version that I'm modelling, this cannot be the case, in fact all of the resistor values will be very similar.
As soon as you add the extra constraint that no resistor can have an infinite value, my guess is that there is only one solution. The fact that there are multiple solutions when this additional constrain is not there, could be the reason why you can't solve the problem with classical methods. Does that seem plausible?
If that's the case, some kind of iterative process might be able to home in on the steady state values for all of the resistors when infinite values are disallowed.
Here's the 2x2 mesh with all of the values for one solution and the question I'm looking to answer.
http://puu.sh/1B82W  