Difference between a voltage source and a battery?

I am teaching a linear algebra course and plan to use circuit lab to demonstrate a circuit. However, when I set up a simple system, I get different answers depending on whether use a voltage or a battery.


The corresponding Matlab code is :

A = [1; -1; -1];
b = [9; -12; 0];
C = diag([1./100, 1./35, 1./15]);
At = A';
AtCA = At*C*A;
x = (AtCA)\(At*C*b);
y = C*(b - A*x);

However, if I replace the voltage sources with batteries, my Matlab solution no longer agrees with the Matlab solution.

In explanation in mathematical terms would be especially appreciated!

by donna
October 09, 2014

Sorry no math, a battery can only output so much current before the voltage drops. So the voltage current relationship of a battery is complex. An ideal voltage source has its place in linear algebra. Another way to fix this would be to higher value resistors, so the battery wont be loaded down.

by Garrett
October 09, 2014

Thanks for your reply - it is much appreciated! It sounds like what you are saying is that a battery is non-linear. This is very helpful. At least two well known linear algebra textbooks I can cite use "batteries" in their circuit description, when, from what you are saying, an ideal voltage source would be more appropriate for a mathematical treatment. Is that right?

by donna
October 09, 2014


The battery is not non-linear.

It simply has a non-zero a series resistance.

The reason your answers differ between using the pure CL voltage source and the CL Battery is simply that the pure voltage source has zero source resistance whilst the battery has a non-zero source resistance.

If you double click on the battery symbol you'll see the internal series resistance: R_ESR.

Your chosen 12V 3 cell 'battery' has a 2 Ohm series resistance that obviously is significant compared to your circuit resistors, e1 - e3.

If you subtract 2 from the values of resistors e1 and e2 and run the sim with your chosen battery then the results should be the same as the unmodified ideal circuit driven by pure voltage sources.


by signality
October 10, 2014

Post a Reply

Please sign in or create an account to comment.