Lesson 3
Current sources, conductances and dependent sources
Learn how to describe a current source using the j element. Simplify parallel resistors using the pr tool and its shorthand. Learn to describe conductances and dependent sources.
Last updated 2023-07-08
In this lesson you will learn how to describe a current source with the j element, and a trick to simplify parallel resistors with the pr tool or its shorthand. You will also learn to describe conductance and dependent sources using elements you already know.
3.1How to describe a current source
You can use SI prefixes here as well. The value of a current source is often given in milliamps; Symbulator will interpret any 'm given in the value as a division by a thousand.
Answers for a current source
For each current source you get the same answers as for a voltage source, with the same polarity conventions: the voltage drop in it, the current through it, the power consumed by it (for the delivered power, ask for the negative), and the equivalent resistance of the rest of the circuit as seen by that source.
Let's see an example.
B11's Example 8.1
Given the circuit, determine the current and voltage drop in R1.

B11's Example 8.1
Solution
We ask Symbulator to run a DC simulation of the circuit described between quotations:
s\dc("j,0,1,10'm:r1,1,0,20'k")We ask for the values of two variables, ir1 and vr1. We get .01 and 200., meaning a 10 mA current and a 200 V voltage drop.
3.2What about conductances?
Conductances are really resistors by another name. So we describe them as resistors, using the element r, and give as the value the inverse of the conductance: one divided by the conductance is the resistor in Ω.
The next example is from Elementary Linear Circuit Analysis (2ed) by Leonard S. Bobrow, which from here on I call Bo2.
Bo2's Example 2.2
Given the circuit, determine the voltages in the nodes.

Bo2's Example 2.2
Solution
As I explained, all conductances are simulated as resistors: the 4 siemens conductance becomes a 1/4 resistor, and so on. My description:
s\dc("j10,1,0,2:r12,1,2,1:r20,2,0,1/4:r30,3,0,1/3:r13,1,3,1/2:j32,3,2,3")We ask for these answers:
approx({v1,v2,v3}){–1.3, .34, –1.12}That indicates v1 = –1.3 V, v2 = .34 V, v3 = –1.12 V. This is correct.
3.3How to reduce parallel resistors
Symbulator can reduce resistors connected in parallel to their equivalent. The function is called pr, and you can use it on its own or inside a circuit description. There is a shorthand too, to save you typing.
Using s\pr({r,r,r…})
When you do not need the current through, or the power consumed by, each resistor, you can reduce any number of parallel resistors to one equivalent value: invoke s\pr with a comma-separated list of resistance values.
For example, to reduce three resistors in parallel with values of 10 Ω, 20 Ω and 30 Ω:
s\pr({10,20,30})You get 60/11 if you evaluate exactly, or 5.45 approximately.
You can also give symbolic values. For example, to reduce four resistors in parallel with values r1, r2, r3 and r4:
s\pr({r1,r2,r3,r4})You get the answer as a symbolic expression.
You can use the s\pr tool inside a circuit description or on its own, on the entry line. That is useful because a problem which is really just a resistor reduction may need no simulation at all.
Reducing series and parallel combos
Resistors in series reduce by simple addition, whenever we do not need each resistor's own answers — the voltage drop or power in each, or the voltage in the node between them. The current through series resistors is the same, so an equivalent still gives you the current.
AS7's Example 2.10
Find the equivalent resistance.

AS7's Example 2.10
Solution
We don't need to run a simulation to find this answer. We can find it by typing this on the entry line:
10+s\pr({3,6,1+s\pr({12,4,1+5})})We evaluate approximately and get 11.2 Ω. This is correct.
AS7's Practice Problem 2.10
Find the equivalent resistance.

AS7's Practice Problem 2.10
Solution
Again, no simulation is needed:
16+s\pr({18,9,2+s\pr({20,1+s\pr({5,20})})})We evaluate and get 19 Ω. This is correct.
The [r,r,r…] shorthand for descriptions
Typing s\pr({}) while describing a circuit is not very practical, so there is a shorthand: Symbulator reads any values inside square brackets, such as [10,20,30] or [r1,r2,r3,r4], as input to s\pr. It works only inside the circuit description passed to Symbulator.
When to reduce resistors
A simulation where it makes sense to use pr is B11's Example 7.4, which you saw in the practice problems of Lesson 1. It makes sense to reduce R4 and R5 to an equivalent resistor, since we do not need to know their individual currents or power use:
s\dc("e,1,0,16.8:r1,1,2,9:r2,1,2,6:r3,2,3,4:re,3,0,[6,3]:r6,2,0,3")An example where using pr makes no sense is B11's Example 8.3, because you need to know the value of the current through R1.
Finally, a simulation where you can reduce part of the resistors is B11's Example 6.22. We must leave R1 alone, because we need the current through it, but we can reduce R2 and R3:
s\dc("jt,0,1,12'm:r1,1,0,1'k:re,1,0,[10'k,22'k]")Moving forward, we will use the pr({,,}) tool, or its shorthand [,,], in circuit descriptions whenever we feel it is appropriate.
3.4How to describe dependent sources
One of my favourite scenes in cinema comes from The Dark Knight: the Joker, played masterfully by Heath Ledger, is rolling on the floor of a Gotham City prison, taking a bare-knuckle beating from an ever-more-frustrated Batman. Master of the situation and laughing hysterically, the Joker says: "You have nothing! Nothing to threaten me with!"
Even though the movie had not been made yet, I remember feeling something similar — if less hysterical — back in 1999, when I realised that a 100% symbolic implementation let me make any element's value depend on any answer of the circuit. I could simulate voltage or current sources dependent on any voltage, current or combination of them as easily as a 12 V source.
Here is what you need to know for simulating dependent sources in Symbulator: nothing. There is nothing special to it at all. Just write the value as a function of the circuit's answers, using the variables you know by now, and run the simulation like it's nobody's business. For example:
- if the source depends on the current through a resistor called r1, you define its value as
ir1 - if the source depends on the voltage drop in a resistor called r2, you define its value as
vr2 - if the source depends on the current through a short called s3, you define its value as
is3 - if the source depends on the difference between the voltage of two nodes a and b, you define its value as
va-vb
With Symbulator, instead of fearing them, you will laugh in the face of dependent sources, thinking: "You have nothing!" Booyah!
3.5Instructive solved examples
Circuits with E, J and R
B11's Example 8.2
Determine the values of VS, I1 and I2.

In the line below we join two commands with a colon. The first runs a DC simulation of the circuit described in the string; the second asks the calculator for three variables that answer the questions.
s\dc("j,0,1,7:e,1,0,12:r1,1,0,4"):
{v1,ie,ir1}The calculator returns {12,4,3}, meaning VS is 12V, I1 is 4A and I2 is 3A. These are the correct answers. We will keep using the single-line instruction.
B11's Example 8.15
Determine the current through each resistor. My solution, with the direction marked in blue:

s\dc("j6,0,1,6:r2,1,0,2:r6,1,2,6:r8,0,2,8:j8,2,0,8"):
approx({ir2,ir6,ir8})We get these answers: {1.25,4.75,3.25}. So IR2 is 1.25A, IR6 is 4.75A, and IR8 is 3.25A.
B11's Example 8.21

Determine the voltage in each node and the current through each resistor.
My solution:
s\dc("j1,0,1,4:r1,1,0,2:r3,1,2,12:r2,0,2,6:j2,2,0,2"):
{v1,v2,ir1,ir2,ir3}We get the following answers: {6,-6,3,1,1}. So V1=6V, V2=-6V, IR1=3A, and IR2=IR3=1A.
Bo2's Drill Exercise 2.2 (Conductances)
Given the circuit, determine the voltages in the nodes.

Below my solution:
s\dc("r10,1,0,1/3:r12,1,2,1/2:r13,1,3,1/2:r23,2,3,1/6:
r20,2,0,1/8:j12,1,2,17:j03,0,3,2"):approx({v1,v2,v3})The answer, {-2.,1.,.5}, indicates v1=-2V, v2=1V, v3=0.5V. This is correct.
HK5's Figure 1-24b (Expert)
Determine ix and vx in the following circuit.

My solution:
s\ex("j6,0,1,6:r5,1,2,5:r2,2,0,2:r1,1,3,1:
r3,0,4,3:j10,2,3,10:rx,3,4,rx"):{ir1,vrx}Select DC. Add equation ir2=4. Add unknown rx. Run the simulation. The answer, {-8,80}, means that IX is -8A and that VX is 80V.
HK5's Example 2.2 (Conductances)
Determine the voltages in the nodes. My solution:

s\dc("j01,0,1,–8:j30,3,0,–25:j21,2,1,–3:r12,1,2,1/3:r23,2,3,1/2:r13,1,3,1/4:r20,2,0,1:r30,3,0,1/5"):{v1,v2,v3}The answer, {1,2,3}, is correct: v1=1V, v2=2V, v3=3V.
B11's Example 8.5
Determine the current I2 in the circuit shown. My solution:

s\dc("j1,1,0,4:r1,1,0,3:e2,1,2,5:r2,0,2,2"):approx(ir2)This gives us a value for I2 of 3.4 A. This is correct.
Bo2's Example 2.5 (Conductances)

Determine the voltages in the nodes, and the current through the voltage source.
s\dc("j,0,1,3:e,3,2,3:r12,1,2,1/7:r20,2,0,1/3:r30,3,0,1/5:r13,1,3,1/2"):
approx({v1,v2,v3,–ie})The answer, {-.5,-1.5,1.5,11.5}, is correct: v1=-.5, v2=-1.5, v3=1.5, i=11.5
B11's Example 8.22
Determine V1 and V2. My solution:

s\dc("j1,0,1,6:r1,1,0,4:e,1,2,12:r3,1,2,10:r2,2,0,2:j2,2,0,4"):
approx({v1,v2})The answer, {10.67,-1.33}, tells us that V1 is 10.67V and V2 is -1.33V.
B11's Example 8.19
Determine V1, I1 and I2, in the circuit:

My solution:
s\dc("e,2,0,24:r1,1,2,6:r2,1,0,12:j,0,1,1"):approx({v1,ir1,ir2})The answer, {20.,-.667,1.67}, tells us that V1 is 20V, I1 is -.667A and I2 is 1.67 A.
B11's Example 8.14

Determine I2 and I3.
s\dc("e1,1,0,20:r1,1,2,6:r2,2,a,4:j,a,0,4:r3,a,3,2:e2,0,3,12"):
approx({ir2,ir3})Answer: {3.33,-.667}. This is correct.
B11's Example 8.20
Determine V1, V2, I1, I2 and I3. My solution:

s\dc("e,3,0,64:r1,3,1,8:r2,1,2,4:j,1,2,2:r3,2,0,10"):
approx({v1,v2,ir1,ir2,ir3})Answer: {37.82,32.73,3.27,1.27,3.27}. You should know how to read these by now, but here it is just in case: V1 = 37.82V, V2 = 32.73V, I1 = 3.27A, I2 = 1.27A, I3 = 3.27A.
RM3's Example 9-12 (solve)
If R3 is to be replaced with R4 and I4, determine the value and direction of the source.

So that we can keep the name of node b, we will use the top left node as reference.
First, make sure you understand what this problem is asking you to do. The idea is that, despite the change, we keep the same voltage drop and current flow between nodes a and b. We must first know what they are. So we simulate the original circuit:
s\dc("e,0,b,20:r1,0,a,16:r2,a,b,40:r3,a,b,60"):{va-vb,ir3}We find that the voltage drop is 12V and the current is 0.2A. These are the currents and voltages that we have to keep once we do the replacement. Simulate the circuit now replacing R3 with a resistor R4 of 240Ω and a source j with value I4. Run this:
s\dc("e,0,b,20:r1,0,a,16:r2,a,b,40:r4,a,b,240:j,a,b,i4")Notice that both the voltage drop (given by va-vb) and the current (given by ir4+ij) are algebraic functions in terms of i4. Now you can find i4 solving by voltage drop:
solve(va-vb=12.,i4) …or by current flow… solve(ir4+ij=0.2,i4)The result is the same: i4 = .15 A. The required current source is .15A from a to b.
RM3's Example 8-13
Solve for the currents through R2 and R3 in the circuit shown. My solution:

s\dc("r1,a,0,10'k:r2,1,0,5'k:r3,b,a,6'k:r4,0,2,16'k:
j,a,b,2'm:e1,1,b,10:e2,b,2,8"):approx({ir2,ir3})The answer, {.00154,.00111} is correct: IR2 = 1.54 mA and IR3 = 1.11 mA.
HK5's Figure 1-24c (Expert)
Determine ix and vx in the following circuit.

s\ex("e,1,0,60:r8,1,2,8:r10,2,0,10:r4,2,3,4:r2,3,0,2:j,0,3,ix"):
{ix,v3}Select DC. Add equation ir8=5. Add unknown ix. Run the simulation, and you will get: {1,8}. This is correct: IX is 1A and that VX is 8V.
Bo2's Example 1.9
Determine I1, I2 and v.

This is my solution.
s\dc("ji,0,1,2:r1,1,0,3:jd,0,1,4v1:r2,1,0,5"):{ir1,v1,ir2}The answer, {-5/26,-15/26,-3/26}, is correct: I1=-5/26 A, I2=-3/26 A and v=-15/26 V.
AS2's Practice Problem 2.7
Find vo and io in the circuit. My solution:

s\dc("ji,0,o,6:ro,o,0,2:jd,o,0,iro/4:r8,o,0,8"):{vo,iro}The answer, {8,4}, is correct: vo = 8 V and io = 4 A.
HK5's Example 1-3
Determine the power delivered by each source and consumed by both resistors.

s\dc("ei,1,0,120:r1,1,2,30:ed,2,3,2vra:ra,0,3,15"):{–pei,–ped,pr1+pra}The answer, {960,1920,2880}, is right: the independent source delivers 960W, the dependent source delivers 1920W, and the resistors consume 2880W together.
AS2's Practice Problem 2.6
Find vx and vo in the circuit. My solution:

s\dc("ei,x,1,35:rx,x,0,10:ed,0,2,2vx:ro,1,2,5"):{vx,vro}The answer, {10,-5}, is correct: vx =10 and vo =-5.
Bo2's Example 1.10

Determine v1, v2 and i. My solution: The simulation took 14 seconds.
s\dc("ei,1,0,2:r1,1,2,1/3:ed,3,2,4*ir1:r2,3,0,1/5"):{ir1,vr1,vr2}The answers, {-15/26,-5/26,-3/26}, is correct: v1=-5/26 V, v2=-3/26 V and i=-15/26 A.
AS2's Example 2.6

Determine vo and i in the circuit. My solution is shown below:
s\dc("e12,1,o,12:ri,1,2,4:ed,2,3,2vo:e4,0,3,4:ro,o,0,6"):{vo,iri}The answer, {48,-8}, is correct: vo =48 and i = -8.
HK5's Drill Problem 1.11
Find the power absorbed by each element in the circuit. My solution:

s\dc("r1,x,0,30:ei,1,x,12:r2,1,2,8:r3,2,3,7:ed,3,0,4vx"):
approx({pr1,pei,pr2,pr3,ped})The answer, {.768,1.92,.2048,.1792,-3.072}, is correct.
AS2's Example 3.6
Determine the value of Io in the circuit. My solution:

s\dc("ei,a,0,24:ro,a,b,10:r12,b,0,12:r4,b,c,4:r24,a,c,24:ed,c,0,4iro"):
approx(iro)The answer, 1.5 A, is correct.
Bo2's Drill Exercise 1.12
Determine i, v and id.

We are given an unnecessary piece of information: the 4V drop in the 2Ω resistor.
My solution:
s\dc("ei,1,0,10:r1,1,2,1:r2,2,3,2:r3,2,0,3:
r4,3,0,2:ed,2,3,ir1/2"):{ir1,vr3,ied}The answer, {4,6,1}, is correct: i=4, v=6 and id=1.
AS2's Example 3.2
Determine the voltages at the nodes.

My solution:
s\dc("ji,0,1,3:jd,3,0,2ir2:r2,1,2,2:r4a,1,3,4:r8,2,3,8:r4b,2,0,4"):
approx({v1,v2,v3})The answer, {4.8,2.4,-2.4}, is correct.
AS2's Example 3.4
Find the node voltages in the circuit. My solution:

s\dc("r2,1,0,2:e,1,2,20:j,0,2,10:r6,2,3,6:rx,1,4,3:r4,3,0,4:
ed,3,4,3vrx:r1,4,0,1"):approx({v1,v2,v3,v4})The answer, {26.67,6.67,173.33,-46.67}, is correct.
Bo2's Drill Exercise 2.6
Determine the voltage in each node.
Notice that in the schematic, the resistors' values are given in siemens. Symbulator has to be fed the resistors with values in ohms. This means that, when we simulate them, we have to convert them from siemens to ohms by dividing 1 over the siemens value.

My solution:
s\dc("j,0,1,6:ei,3,1,6:ed,2,3,3v1:r5,1,0,1/5:r2,1,2,1/2:
r3,2,0,1/3:r1,2,3,1:r4,3,0,1"):{v1,v2,v3}The answer, {-1,2,5}, is correct.
Bo2's Example 2.7
Determine the voltages in all nodes. My solution:

s\dc("j,0,1,1:r3,0,1,3:r4,2,1,4:r1,2,0,1:r2,2,3,2:
r5,3,0,5:ei,3,4,1.5:ed,4,0,2vr4"):{v1,v2,v3,v4}The answer, {1.5,-.5,-2.5,-4.}, is correct.
Bo2's Example 2.6
Determine the voltages in all nodes.

My solution:
s\dc("e1,0,1,1:e2,3,4,.5:ed,3,2,3vr4:j,0,4,2:r4,1,2,1/4:
r1,2,0,1:r8,3,0,1/8:r2,2,4,1/2"):{v1,v2,v3,v4}The answer, {-1,-2.,1.,.5}, is correct.
HK5's Drill Problem 1-12
Find iA, iB and iC.

My solution:
s\dc("jl,x,0,5.6:ra,0,x,18:jb,0,x,.1vx:r9,0,x,9:jr,0,x,2"):
approx({ira,ijb,ir9})The answer, {3.,-5.4,6.}, is correct.
Numerical-from-symbolic examples
Bo2's Drill Exercise 1.10
Determine i, v, is and vs.

With one unknown value and one known solution, this problem is a job for Expert.
Determine i, v, is and vs.
s\ex("es,2,0,vs:jd,0,3,2ir1:r7,0,1,7:r1,3,1,1:r3,3,2,3:r4,1,2,4"):
{ir1,vjd,–ies,vs}Select DC, Add vr4=4 to the equations and vs to the unknowns. Run the simulation. The answer, {2,-9,-3,3}, is correct: i=2, v=-9, is=-3 and vs=3.
Bo2's Drill Exercise 1.11
Determine i, v and vd. (Since all element values are known, the tip we are given by the book – namely, that the voltage drop in the 6Ω resistor is 1.5V – is totally superfluous.)

s\dc("e,1,0,12:r1,1,2,1:r4,2,0,4:r10,2,3,10:r6,3,0,6:
r2,3,4,2:j,4,0,vr10/15"):approx({vr10,ir2,vj})The answer, {7.5,.5,.5} is correct: i=.5, v=7.5 and vd=.5.
Symbolic examples
TR5's Exercise 4.2
Find vO and iO in terms of iS.

This is my solution. The simulation took 14 seconds.
s\dc("ji,0,x,is:r1,x,0,1'k:r2,x,o,2'k:jd,0,o,vx/500:ro,o,0,500"):
{vo,iro}The answer, {1000*is,2*is}, is correct: vO=1000 iS and iO=2 iS.
TR5's Example 4.4
Find vO and the equivalent resistance RIN, in terms of vS, when R1 is 50 Ω, R2 is 1 kΩ, R3 is 100 Ω, R4 is 5 kΩ and g is 100 mS (i.e. 100'm).

This is my solution. The simulation took 18 seconds.
s\dc("e,1,0,vs:r1,1,2,50:r2,2,o,1'k:r3,o,0,100:
r4,o,0,5'k:j,0,o,100'm*vr2"):approx({vo,re})The answer, {.904*vs,10952.}, is correct: vO=.904 vS and RIN = 10.95 kΩ.
TR5's Figure 4-4
Find the voltage drop, current, and power consumed by the 500Ω resistor, and the ratio of that power to that delivered by the independent source, all in terms of iS.

I have not labeled the nodes in the figure, so you can practice doing it. My solution:
s\dc("js,0,1,is:r50,1,0,50:rx,1,0,25:jd,o,0,48irx:
r3,o,0,300:ro,o,0,500"):{iro,vo,pro,pro/(–pjs)}The answers we get are correct: iO=-12is, vO=-6000is, pO=72000is2, and pO/pS=4320.
TR5's Example 4.1 (Symbolic)
Find vO.

I did not label the nodes, so you can practice. Remember not to use rc: it is reserved.
s\dc("ei,1,0,vs:rs,1,2,rs:rx,2,0,rp:ed,0,3,r*irx:rrc,3,o,rrc:rl,o,0,rl"):voThe answer, shown first below, is correct. The textbook's answer follows it.


Bo2's Example 1.11 (Symbolic)
Determine v2.

My solution: In my solution I named the value of the source v1, to keep it similar to the book. This required avoiding naming any node as 1: if there was a node 1, Symbulator would store in v1 the voltage of the node, creating trouble. There is no problem with using r1 as a value, since nothing will be stored in that r1 value.
s\dc("e,a,0,v1:r1,a,3,r1:rg,3,0,rg:j,2,0,gm*vrg:rd,2,0,rd:rl,2,0,rl"):v2The simulation took 25 seconds. The answer I got is shown first below (the textbook's follows it.)


TR5's Example 4-7 (Symbolic)
Find RIN, i.e. the resistance as seen by the current source. My solution:

s\dc("ji,0,a,is:re,a,0,re:jd,b,a,β*is:rl,b,0,rl"):rjiThe answer we get — re*(β+1) — is correct, as can be seen by comparing it to the textbook's answer.

TR5's Exercise 4.3 (Symbolic)
Find vO, in terms of the value in the circuit. For resistors, use their conductance value.

This is my solution. We use µ as a constant in the dependent source. It is not confused with the SI prefix for micro because the prefix has an apostrophe.
s\dc("ei,1,0,vs:ed,2,0,μ*(vrx):r1,1,2,1/g1:
r2,2,o,1/g2:rx,1,o,1/gx:rl,o,0,1/gl"):voThis is the answer we get. It is correct. Compare it with the textbook's answer below it.


TR5's Example 4.5 (Symbolic)
Find iB.

My solution is shown below. Be patient. This simulation takes more than one minute.
s\dc("e1,1,0,vcc:rb,1,b,rb:e2,e,b,vγ:re,e,0,re:rrc,1,c,rrc:j,c,e,β*irb"):irbCompare my answer, first below, to the book's answer beneath it.


The last four problems show Symbulator at its DC best. I don't know of any calculator-based program that was able to provide this kind of purely symbolic answer to a circuit simulator back in 1999 when I made Symbulator. As a matter of fact, even today – a quarter of a century later - I know of no other calculator-based simulator that can do this.


