Author Topic: Mesh analysis  (Read 34211 times)

0 Members and 1 Guest are viewing this topic.

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Mesh analysis
« Reply #125 on: January 05, 2017, 08:45:21 pm »
You have to use arrows as these are alternating voltages without DC polarity. You could just mark the equation quantities with + or - but putting an arrow to paper helps get it right and not loose track or consistency between multiple equations.

Sent from my phone so mind the autocorrect.

 

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 743
  • Country: us
Re: Mesh analysis
« Reply #126 on: January 05, 2017, 08:49:06 pm »
I guess for Americans is more intuituve when voltage arrow points against direction of current on passive components like resistors.

It's not that the arrow points against the direction of current in passive components; it's that the arrow points in the direction of increasing potential in all components, sources and loads alike.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Mesh analysis
« Reply #127 on: January 05, 2017, 08:49:15 pm »
OK, now I see where the problem is. If I type in Google english phrase kirchhoff's voltage law and do an image search, then majority of the results doesn't have voltage arrows in it (english speakers doesn't like voltage arrows) and when they do, they are highly inconsistent. Some are drawn with arrows pointing from + to -, some in the other way. But when I type for example german phrase 2. Kirchhoffsches Gesetz I get higly consistent results, where almost all images have volatge arrows in it and they are pointg the way I (and SPICE) suggest. Similar situation is when I do search in slovak or czech language. I guess for Americans is more intuituve when voltage arrow points against direction of current on passive components like resistors.

I knew this would come down to a U.S. vs <everybody else in the world> kind of thing.  Now, it's been 40+ years since I graduated from EE school and things could have changed but I really had never seen the voltage arrows before.  Current arrows, certainly, but never voltage arrows.

It's sometimes hard to remember that many of the participants here are NOT from the U.S.
 

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 743
  • Country: us
Re: Mesh analysis
« Reply #128 on: January 05, 2017, 09:24:54 pm »
OK, now I see where the problem is. If I type in Google english phrase kirchhoff's voltage law and do an image search, then majority of the results doesn't have voltage arrows in it (english speakers doesn't like voltage arrows) and when they do, they are highly inconsistent. Some are drawn with arrows pointing from + to -, some in the other way. But when I type for example german phrase 2. Kirchhoffsches Gesetz I get higly consistent results, where almost all images have volatge arrows in it and they are pointg the way I (and SPICE) suggest. Similar situation is when I do search in slovak or czech language. I guess for Americans is more intuituve when voltage arrow points against direction of current on passive components like resistors.

Using the search term "Kirchoff's voltage law" in Google, within the first 50 hits, only 3 had an arrow associated with a voltage source, but they all but one also had a + and - sign.  One followed the Wikipedia convention and the other two (one of which was the Tina site) didn't.  I don't think you can conclude that use of the arrow is "highly inconsistent" with such a small sample; but regardless of their use of an arrow, they were very consistent in their use of + and -.

The one that didn't also have a + and - sign was: http://www.resistorguide.com/kirchhoff-law/ and the author was probably of German ancestry; he had a picture of Kirchoff himself on the site.  :)

I don't think I have seen the use of an arrow associated with a voltage source except in these two problems from the HNC coursework that Simon posted (and were also posted on the Physics forum).  It's not common on the English speaking forums, and the ambiguity can be avoided by using + and - instead of an arrow.

The polarity of an AC source can also be indicated by use of a + and - sign.  Just realize that for this purpose it doesn't mean that the side with the + sign is always positive.  It just means that the whatever voltage is given for the source, it is to be understood as explained in the Wikipedia article on the passive sign convention under the heading "AC circuits":

Quote
Since the sign convention only deals with the directions of the variables and not with the direction of the actual current, it also applies to alternating current (AC) circuits, in which the direction of the voltage and current periodically reverses. In AC circuits, even though the voltage and current reverse direction, a "formal" direction of current flow and voltage polarity are defined by considering the voltage and current direction in the first half of the cycle "positive". During the second half of the AC cycle, in a resistive AC circuit, both the voltage and current in the device reverse direction, so the sign of the voltage and current reverse. Since the power is the product of voltage and current, the two sign reversals cancel each other, and the sign of the power flow is unchanged.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Mesh analysis
« Reply #129 on: January 05, 2017, 10:25:15 pm »
Over on the Digilent site they have a Real Analog course of EE101.
https://learn.digilentinc.com/classroom/realanalog/

In the 7th lecture, the instructor talks about Nodal Analysis in considerable detail (from an American point of view).  At the 40 minute mark, he talks about the Super Node idea and this applies directly to Simon's problem.

One of the cool things about Nodal Analysis is that you need not be consistent in how you assign current flows into or out of nodes.  You can, for example, assign all currents as leaving all nodes even though the current arrows clearly conflict.  It doesn't matter, it all works out.



I had gotten a little fuzzy re: shorting out voltage sources and replacing current sources with an open circuit to find independent nodes.  It's a pretty good video.

ETA: More on the Super Node in video 8


« Last Edit: January 05, 2017, 10:33:17 pm by rstofer »
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Mesh analysis
« Reply #130 on: January 07, 2017, 02:09:55 pm »
Well I have watched various videos on both methods and beleive I now have a thorough understanding yet still come up ith 2 difference results, another 1/2 day down the drain. Time to move onto the next question.
 

Offline orolo

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: es
Re: Mesh analysis
« Reply #131 on: January 07, 2017, 02:23:12 pm »
If you have them around, please post your equations and diagrams. I'm not familiar with the super node/mesh formulation, and I would like to take a look.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Mesh analysis
« Reply #132 on: January 07, 2017, 04:45:06 pm »
If you watch the videos, you will see that there is only one node and that Z2 is irrelevant.  The current through Z2 is determined, if necessary, strictly from V3.  The reasoning behind this is that the source, V3, has zero impedance.  In the resistor sense, it appears as 0 Ohms between VA and VB shorting out Z2.

Here is a video that is right on point:


At 3:20, the author points out that the impedance across V3 doesn't matter.

So, what you wind up with is (hopefully I get this right):

-(V1-VA)/Z1 + VA/Z4 + VB/Z5 - (V2-VB)/Z3 = 0
and
VA = VB + V3

I haven't cranked this out and I certainly wouldn't want to guarantee the correctness but, if I understand the Super Node idea, this is kind of what it looks like.

After I have some caffeine, I'll try to grind through these equations.  One thing this thread has demonstrated, there are a number of tools that solve these kinds of equations.

All in, it seems that Nodal Analysis is the easy way to deal with this circuit.  I really need to spend more time thinking about this approach.

BTW, there is a bunch of material that goes along with the Digilent Real Analog Circuits course:
https://learn.digilentinc.com/classroom/realanalog/

Note that Analog Devices wrote a lot of the material.

Budding EE's might be interested in this course as a way to get started or at least a preview of what's coming at them.


 
The following users thanked this post: orolo

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Mesh analysis
« Reply #133 on: January 07, 2017, 04:56:09 pm »
I will post my working out later. The nodal analysis I think is okay. The super node idea is in fact fairly simple. You just treat the two nodes that the voltage source spans as one node. So only one real equation is written in terms of both nodes. A second equation tells you that the left node minus the right node is equal to the voltage source. Alternatively you could probably just put that voltage into the main equation and eliminate the right hand node as a term.

I've spent most of today going round in circles with the mesh analysis again having looked at a few videos including Daves. I now have it fairly clear that I draw clockwise arrows around each loop or mash or whatever you call the damn thing and make any voltage source that contributes to current going in that direction positive and any voltage drops across loads that that voltage source is driving current through negative. This of course means that when you come upon the right hand voltage source this is in fact nowt negative although apparently you also assume the voltage drops across the impedances are also negatives. But the result is vastly different from the nodal analysis result and to be honest I'm getting pretty fed up because I have very carefully followed all of the advice in the videos.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Mesh analysis
« Reply #134 on: January 07, 2017, 05:08:17 pm »
I've spent most of today going round in circles with the mesh analysis again having looked at a few videos including Daves. I now have it fairly clear that I draw clockwise arrows around each loop or mash or whatever you call the damn thing and make any voltage source that contributes to current going in that direction positive and any voltage drops across loads that that voltage source is driving current through negative. This of course means that when you come upon the right hand voltage source this is in fact nowt negative although apparently you also assume the voltage drops across the impedances are also negatives. But the result is vastly different from the nodal analysis result and to be honest I'm getting pretty fed up because I have very carefully followed all of the advice in the videos.

If we take the diagram from your first post and look at the mesh analysis, then for the leftmost loop we will have this:
$$ + V_1 - I_1 Z_1 - (I_1 - I_2)Z_4 = 0$$

For the rightmost loop we will have:
$$ - (I_3 - I_2)Z_5 - I_3 Z_3 - V_2 = 0 $$

If you wanted to make this more intuitive you could draw the \$ I_3 \$ loop anti-clockwise instead, and then you would write:
$$ + V_2 - I_3 Z_3 - (I_3 + I_2) Z_5 = 0 $$

Changing the loop direction from clockwise to anti-clockwise just changes the sign convention for that particular current in the equations, but ultimately the final answer should come out the same.
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Mesh analysis
« Reply #135 on: January 07, 2017, 05:13:17 pm »

For the rightmost loop we will have:
$$ - (I_3 - I_2)Z_5 - I_3 Z_3 - V_2 = 0 $$

If you wanted to make this more intuitive you could draw the \$ I_3 \$ loop anti-clockwise instead, and then you would write:
$$ + V_2 - I_3 Z_3 - (I_3 + I_2) Z_5 = 0 $$

Changing the loop direction from clockwise to anti-clockwise just changes the sign convention for that particular current in the equations, but ultimately the final answer should come out the same.

This confuses me, because if I just change the sign of the voltage and nothing else in that equation it changes the result with respect to the other equations. If i was to change the sign of the voltage source and the voltage drops then I can understand things may be equal.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Mesh analysis
« Reply #136 on: January 07, 2017, 05:21:06 pm »
This confuses me, because if I just change the sign of the voltage and nothing else in that equation it changes the result with respect to the other equations. If i was to change the sign of the voltage source and the voltage drops then I can understand things may be equal.

OK, but when you do the mesh analysis you are following the current loops. The current loop arrow indicates which way you presume the current to be flowing. (In actual fact, if the current happens to end up flowing against the arrow it will have a negative sign in the solution, but since a negative times a negative is a positive it all cancels out in the end.)

So what you do is draw your current loop and you follow the current on its path around the loop. If the current flows through a voltage source from - to + then the voltage increases at that step, but if the current flows from + to - then the voltage decreases.

When the current flows through an impedance the voltage always decreases with a voltage drop of \$IZ\$.

If the final current happens to end up with a negative sign, then the "decrease" through the impedance is actually an "increase" (because a decrease in one direction is always in increase in the reverse direction).

The important thing is that we do not need to care whether the actual current value is positive or negative when we write the equations. All we must do is respect whatever sign convention we have chosen for our current loops.
« Last Edit: January 07, 2017, 05:23:14 pm by IanB »
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Mesh analysis
« Reply #137 on: January 07, 2017, 05:23:43 pm »
Thats what I meant. if all loops are going clockwise and we suddenly make one anticlockwise that messes up the system of equations does it not?
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Mesh analysis
« Reply #138 on: January 07, 2017, 05:27:22 pm »
This confuses me, because if I just change the sign of the voltage and nothing else in that equation

By the way, you have not just changed the sign of the voltage and nothing else, you have also changed the direction of the current arrow. Since you have changed two signs, and a minus times a minus is a positive, the two changes cancel out and the result remains the same.

Thats what I meant. if all loops are going clockwise and we suddenly make one anticlockwise that messes up the system of equations does it not?

Well no, because see my comment above. If the current arrow is reversed in direction, then the voltage change across a voltage source changes in sign according to which way you follow the current through the voltage source.
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Mesh analysis
« Reply #139 on: January 07, 2017, 05:31:49 pm »
yes but if you reverse the current arrow and thus change the voltage from - to + then you do the same for the drops across the impedences surely which would null out the effect of inverting a sources polarity and bring the same result. But in your example the drops across the impedences are still negative while the voltage is now positive, so in the overall system of 4 equations this changes things. A similar situation can arise for the top loop. I'm going by Daves video, I don't have a problemwith being consistent in assumed current direction but something is not right.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Mesh analysis
« Reply #140 on: January 07, 2017, 05:32:37 pm »
In other words, it does not "mess up" the equations, but it does alter the equations we write.

For instance, see where I wrote \$-(I_3 + I_2)Z_5\$. I added \$I_3\$ and \$I_2\$ together according to the convention of the direction arrows in the two loops shared by \$Z_5\$. (Note for future readers: this is when the \$I_3\$ loop has been drawn counterclockwise, rather than clockwise.)

The way to look at it is to imagine yourself flowing with the current on its journey around the loop, adding and subtracting voltages for each element you pass through as you go along.
« Last Edit: January 07, 2017, 06:05:36 pm by IanB »
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Mesh analysis
« Reply #141 on: January 07, 2017, 05:34:36 pm »
yes but if you reverse the current arrow and thus change the voltage from - to + then you do the same for the drops across the impedences surely...

No, the voltage always drops when you go through an impedance. That is one of the golden rules. If you follow the current on its journey, then each time you go through an impedance you have to add a \$-IZ\$ term to your equation.
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Mesh analysis
« Reply #142 on: January 07, 2017, 05:37:42 pm »
ok my equations are:

\$ 120-2I_1+i5( I_1 - I_2 ) = 0 \$

\$ i5( I_2 - I_1 )+i5( I_2 - I_2 ) - i4( I_2 - I_3 ) = 0 \$

\$ -i120 - i4( I_3 - I_2 ) - 4I_3 = 0 \$

\$ -14.14-i14.14 + i5( I_4 - I_3 ) = 0 \$
« Last Edit: January 07, 2017, 05:40:50 pm by Simon »
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Mesh analysis
« Reply #143 on: January 07, 2017, 05:38:53 pm »
No, the voltage always drops when you go through an impedance.

If you are not convinced of this, set up a really simple DC example with a battery and a resistor. Draw a clockwise loop arrow and solve the problem. Then draw a counterclockwise loop arrow and solve the same problem. You will find the answers to be identical in each case.

This must be so, because the arrow is something you have drawn on the paper for your convenience. The presence of the arrow does not change the circuit diagram in any way.
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Mesh analysis
« Reply #144 on: January 07, 2017, 05:42:23 pm »
So what your saying is to just make -i120 into i120 in the third equation ? that will change the overall result. So is this the right way and I've got the equation wrong ?
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Mesh analysis
« Reply #145 on: January 07, 2017, 05:48:44 pm »
ok my equations are:

\$ 120-2I_1+i5( I_1 - I_2 ) = 0 \$

\$ i5( I_2 - I_1 )+i5( I_2 - I_2 ) - i4( I_2 - I_3 ) = 0 \$

\$ -i120 - i4( I_3 - I_2 ) - 4I_3 = 0 \$

\$ -14.14-i14.14 + i5( I_4 - I_3 ) = 0 \$

I'm not saying they are right or wrong at this point, because I will have to carefully step through them term by term.

In light of that comment, I suggest it is better to begin by writing the down the equations symbolically before substituting in the values of the variables.

Firstly, it is much easier to check they are correct when written that way. And secondly, it is then a simpler step to carefully substitute in the values and keep the signs in check while doing so.

For instance, I would not write \$+i5(I_1-I_2)\$, I would write \$-(-i5)(I_1-I_2)\$.

Hard experience has taught me that mistakes happen if I try to take shortcuts like cancelling signs along the way like that.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Mesh analysis
« Reply #146 on: January 07, 2017, 05:57:09 pm »
So what your saying is to just make -i120 into i120 in the third equation ? that will change the overall result. So is this the right way and I've got the equation wrong ?

What I'm saying is you need to "follow the current around the loop", and don't try to put in the values until after you have checked the equation.

So let's start at the bottom left. Our current goes through \$Z_5\$, so we have a drop of \$-I_3 Z_5\$. But \$I_2\$ is going through \$Z_5\$ the other way, so we also have a \$+I_2 Z_5\$ term.

Next, our current goes through \$Z_3\$, giving us a \$-I_3 Z_3\$ term.

Lastly our current goes backwards through \$V_2\$, so we will have a \$-V_2\$ term (negative because backwards).

Adding them all up, our loop equation becomes:
$$-I_3 Z_5 + I_2 Z_5 - I_3 Z_3 - V_2 = 0$$

This equation we can double check to make sure it is right, and only then should we plug in the numbers.
« Last Edit: January 07, 2017, 05:58:54 pm by IanB »
 

Offline orolo

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: es
Re: Mesh analysis
« Reply #147 on: January 07, 2017, 06:19:13 pm »
ok my equations are:

\$ 120-2I_1+i5( I_1 - I_2 ) = 0 \$

\$ i5( I_2 - I_1 )+i5( I_2 - I_2 ) - i4( I_2 - I_3 ) = 0 \$

\$ -i120 - i4( I_3 - I_2 ) - 4I_3 = 0 \$

\$ -14.14-i14.14 + i5( I_4 - I_3 ) = 0 \$

Two small errors:

-> In the second equation, it's +i5(I_2 - I_4), not +i5(I_2 - I_2).
-> In the fourth equation, it's +i5(I_4 - I_2), not +i5(I_4 - I_3).

With that corrected, you get the right results. The rest is perfect, even conceptually. Just tiny mistakes with the indices.
« Last Edit: January 07, 2017, 06:21:10 pm by orolo »
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Mesh analysis
« Reply #148 on: January 07, 2017, 06:38:51 pm »
ah, yes I wrote them out right but copied them out wrong into the post. I'll rereun the calculation later to make sure I copy it right into the computer.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Mesh analysis
« Reply #149 on: January 07, 2017, 07:04:35 pm »
So, what you wind up with is (hopefully I get this right):

-(V1-VA)/Z1 + VA/Z4 + VB/Z5 - (V2-VB)/Z3 = 0
and
VA = VB + V3

Stuffing these 2 equations plus several definitions into Microsoft Mathemetics wxMaxima, we get:

Code: [Select]
eq1 :   0 = -(V1-VA)/Z1 +(VA/Z4) + (VB / Z5) - (V2 - VB)/Z3;
eq2 :   VA = VB + V3;
eq3 :   V1 = 120;
eq4 :   V2 = 120*%i;
eq5 :   V3 = 14.14 + 14.14 * %i;
eq6 :   Z1 = 2;
eq7 :   Z3 = 4;
eq8 :   Z4 = 0 -5 * %i;
eq9 :   Z5 = 0 + 4 * %i;

res : solve([eq1,eq2,eq3,eq4,eq5,eq6,eq7,eq8,eq9]);

expand(float(res));

We get:

VA = 86.38+i45.76
VB = 72.24+i31.62
V3 = 14.14+i14.14 <= VA - VB = V3 as given in the problem

It's nice when the voltages balance!

The Super Node idea is really the easy way to solve the nodal analysis portion of the problem.  One node equation plus one identity and it's done!
« Last Edit: January 07, 2017, 07:41:05 pm by rstofer »
 
The following users thanked this post: orolo


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf