Linear Algebra - Analysis of purely resistive DC circuit

In summary, the student is trying to solve a circuit but is having difficulty with the linear algebra. MATLAB gives an error when the matrix is close to being singular.
  • #36
Yeah it's node 6 in my calculations and there in incidence matrix N. But for E right is node 6 supposed to be 0 or 5? I thought 5. Am I wrong? Is node supposed to be 5 in the vector E instead? I don't understand how it changes N
 
Physics news on Phys.org
  • #37
Don't the sources, both voltage and current, need to specify the nodes they are between, i.e. what edge number applies to them?

BTW, just for future reference, usually the Ground node is labelled as Node 0. Easier to keep track of that way. I'm NOT suggesting you change the node numbering in this problem though. Way too late for that!
 
  • #38
So I'm not exactly sure what do I change in the equations to indicate this?

Thanks for ur help!
 
  • #39
I haven't used MATLAB so this may be too simplistic. Create an edge for each of the sources and a way to indicate that they are sources rather than resistors.
 
  • #40
I don't see how to do that in MATLAB? I don't think u can. Like what do I change in the matrix exactly to indicate this? I'm not sure thanks for ur help
 
  • #41
Don't know. Never tried authoring a simulator.
Hopefully someone here has some ideas.
 
  • #42
Yeah I'm using MATLAB to performing the matrix calculation. I think that the problem is defiantly this
inv([R N;N' A])
MATLAB is telling me that the matrix is singular. I defiantly think that R is ok. So N must be wrong, but I don't necessairly see how.

I see possibly that node 6 is connected to ground, which also connected to a two ampere power source which is connected to node 4. Do I need to include this in my incidence matrix? Do I have to call the current source an edge 7 and extend my R matrix to have the seventh row and seventh column be 0 since an ideal current source has zero resistance. Like I'm wondering if I need to update the matrix N to a 7 x 6 matrix were current is leaving node 6 and entering node 4?

Let me know if you don't know what I'm talking about.

I don't think it works. I just tried, N would be a 7x6 matrix, R would be a 7x7 matrix, N' would be a 6x7 matrix, and the zero matrix would be 7x7. MATLAB wouldn't allow an inverse matrix on such a matrix.
 
Last edited:
  • #43
BUMP went onto second page still not solved yet. Thanks for any help. I think that it may have to do with the problem being nearly singular, the determinant is not zero but very close to zero, so when I try to take the inverse it throws the error providing me with the incorrect result. Is there any way I can get MATLAB to give me the correct answer?
 
  • #44
Let me ask this, is there a way to change the problem so that way I don't have this issue of the matrix being near singular causing MATLAB to throw an error?
 
  • #45
BUMP
no answer yet
 
  • #46
You need to resolve the issues as pointed out in posts #4 and #11.

Those issues indicate that the circuit you have drawn does not correspond to a real circuit, or that the real circuit has been misinterpreted when transcribing the schematic.
 
  • #47
I thought i did though in number 34? What other changes do I still need to make exactly? Sorry I'm not sure.
 
  • #48
YoshiMoshi said:
I thought i did though in number 34? What other changes do I still need to make exactly? Sorry I'm not sure.

I'm not sure either as the method of circuit analysis that you're using is not one I use. But I did note that I don't see where the 2 A current source fits in with your incidence matrix. Shouldn't it have an "edge"? It moves current from node 6 to node 4.
 
  • #49
Ya I normally don't do it this way either. But yah I put it in matrix I.

I believe my solution is correct in #34 it's just giving me the error because the determinant of the matrix is nearly zero, so when MATLAB takes the inverse of the matrix it throws an error saying that it's signular or nearly singular and that the calculation may be incorrect, which the answer MATLAB provided doesn't match with my simulated answer.

That's why I put it in the MATH section because I think I'm more strugling with the linear algebra method of solving this problem and not so much the engineering aspects of it, but it got moved here.

I think this is now a linear algebra problem and think that MATLAB is giving the wrong answer becuase it's nearlly singular. I'm almost positive because that's what MATLAB says and sure enough the determinant is nearly zero, and when the determinant is zero the matrix cannot be inverted. I can still invert it though becuase it's not exactly zero but close to it. So I'm just wondering what I can change so that this is no longer the case. But a 12x12 matrix is kind of hard to work with and I'm not exactly sure which numbers should get changed.
 

Similar threads

Replies
6
Views
2K
Replies
7
Views
4K
Replies
3
Views
3K
Replies
24
Views
3K
Replies
2
Views
2K
Replies
7
Views
2K
Replies
6
Views
2K
Replies
9
Views
2K
Replies
1
Views
2K
Back
Top