Sub topic 11
Dependent Sources in KCL Equations
This chapter assumes you can write KCL at a node, express a resistor current with Ohm's law, and solve a small linear system. You should also know how nodal equations are built from those two ingredients. Here you add one new element, the dependent source, and learn how it changes the equations.
What a dependent source is
An independent source fixes its own voltage or current. A dependent source sets its output from some other voltage or current in the same circuit. That other quantity is the control variable. Circuits use dependent sources to model transistors, op-amps, and other active devices.
There are four types.
| Type | Output | Controlled by | Gain unit |
|---|---|---|---|
| VCCS | current | a voltage | siemens (A/V) |
| CCCS | current | a current | none (A/A) |
| VCVS | voltage | a voltage | none (V/V) |
| CCVS | voltage | a current | ohm (V/A) |
The diamond symbol marks a dependent source in a schematic. The gain is a constant, such as gm = 1.5 mS or beta = 2.
The rule: one extra equation per control variable
KCL does not care why a branch carries a current. A dependent current source is a branch with a known formula for its current, so it enters the KCL sum like any other branch. The only difference is that its value contains an unknown.
The method has two steps:
- Write KCL at each node, using the dependent source's formula for its branch current.
- Write the control variable in terms of the node voltages. If it is a voltage, express it as a difference of node voltages. If it is a current, apply Ohm's law to the branch that carries it.
After step 2, the unknowns are node voltages again. The dependent source adds terms to the equations but no new unknowns.
Example 1: a voltage-controlled current source
Take the circuit from the earlier nodal-analysis chapter and add a dependent source at node 2. A 10 mA independent source feeds node 1. Resistors are R1 = 1 kΩ (node 1 to ground), R2 = 2 kΩ (node 1 to node 2), and R3 = 2 kΩ (node 2 to ground). A VCCS pushes a current gm * v1 into node 2, with gm = 1.5 mS. The control variable is the voltage at node 1.
Write KCL at each node as "currents leaving through resistors equal currents entering from sources".
Node 1:
v1/1000 + (v1 - v2)/2000 = 0.010
Multiplying by 2000 gives 3 v1 - v2 = 20.
Node 2:
(v2 - v1)/2000 + v2/2000 = 0.0015 * v1
Multiplying by 2000 gives 2 v2 - v1 = 3 v1, so v2 = 2 v1.
The control variable v1 is already a node voltage, so no extra control equation is needed. Substitute v2 = 2 v1 into the first equation: 3 v1 - 2 v1 = 20, so v1 = 20 V and v2 = 40 V.
Now check the node 2 balance. The resistors carry (40 - 20)/2000 = 10 mA and 40/2000 = 20 mA away from the node, 30 mA in total. The dependent source supplies 1.5 mS * 20 V = 30 mA. The currents balance.
In matrix form, the dependent source term moves to the left side because it contains an unknown. The code below does this.
import numpy as np
R1, R2, R3 = 1000.0, 2000.0, 2000.0
gm = 1.5e-3 # siemens, VCCS gain
# Row 2: -v1/R2 + v2*(1/R2 + 1/R3) - gm*v1 = 0
G = np.array([
[1/R1 + 1/R2, -1/R2],
[-1/R2 - gm, 1/R2 + 1/R3],
])
I = np.array([0.010, 0.0]) # independent source current into each node
v1, v2 = np.linalg.solve(G, I)
print(f"{v1:.3f} {v2:.3f}") # 20.000 40.000
# KCL at node 2: resistor currents leaving = dependent source current entering
leaving = (v2 - v1) / R2 + v2 / R3
entering = gm * v1
print(f"{leaving:.6f} {entering:.6f}") # 0.030000 0.030000The term -gm in the second row, first column makes G non-symmetric. A circuit with only resistors and independent sources always gives a symmetric G. A dependent source usually breaks that symmetry, so a non-symmetric matrix is a sign that dependent sources are present.
Example 2: a current-controlled current source
When the control variable is a branch current, you must convert it to node voltages with Ohm's law before the system is solvable.
Consider one node (node 1) with these branches to ground:
- A 14 mA independent source entering the node.
Ra = 1 kΩ, carrying a currentixaway from the node.Rb = 2 kΩ.- A CCCS carrying
2 * ixaway from the node.
The control variable is ix, the current through Ra. Ohm's law gives ix = v / 1000.
KCL at node 1 (currents leaving equal currents entering):
ix + 2 ix + v/2000 = 0.014
Substitute the control equation:
3 v/1000 + v/2000 = 0.014
v * 3.5e-3 = 0.014, so v = 4 V.
Check: ix = 4 mA, the CCCS carries 8 mA, and Rb carries 2 mA. The total is 14 mA, which matches the source.
In this circuit, the CCCS behaves like a conductance of 2 mS from node 1 to ground, because its current is proportional to v and leaves the node. Whenever a dependent source's current is proportional to the voltage across its own terminals, you can fold it into the diagonal of G as an equivalent conductance.
Sign care with the control variable
Errors with dependent sources usually come from the control variable, not from KCL. Three habits prevent most of them.
- Write down the reference direction of the control current or the polarity of the control voltage before writing any equation. The gain's sign only means something relative to that reference.
- Express the control variable with the same direction you used in the KCL term. If
ixflows from node 1 to node 2, thenix = (v1 - v2)/R. Writing(v2 - v1)/Rflips the sign of every term that usesix. - Treat the dependent source's current direction as part of its definition. A VCCS drawn with its arrow into node 2 adds
gm * vcto the sources entering node 2. If the arrow points out, the same term appears with the opposite sign.
Dependent voltage sources and supernodes
A dependent voltage source between two nodes has the same problem as an independent one. Its current is unknown, so you cannot write KCL at either terminal separately. The supernode method from the earlier chapter still applies:
- Enclose the source and its two terminal nodes in one closed surface and write one KCL equation for the whole surface.
- Write a constraint equation for the source, such as
v2 - v3 = mu * v1for a VCVS. - Write the control equation if the control variable is a current, for example
ix = (v1 - v4)/R, and substitute it.
For a CCVS the pattern is v2 - v3 = r * ix, where ix is first rewritten in node voltages.
A source connected between a node and ground is simpler. The source fixes that node's voltage directly. If a VCVS of 3 * v1 connects node 2 to ground, then v2 = 3 v1 is the equation for node 2, and you skip KCL there. Afterward you can find the source's current by writing KCL at node 2 with the now-known voltages.
Effects on the solution
Dependent sources can change the character of the answer in ways resistor networks cannot.
- A dependent source with positive feedback can act like a negative conductance. For example, if the CCCS in Example 2 had a gain of
-4instead of2, the equation would be(1 - 4) v/1000 + v/2000 = 0.014. The coefficient ofvbecomes negative, sovcomes out negative even though the source is positive. - For certain gains, the diagonal coefficient reaches zero and
Gbecomes singular. The circuit then has no unique solution, which signals an unstable or ill-posed model. Ifnp.linalg.solveraisesLinAlgError, check for this case before suspecting a coding mistake. - Every term in your equations has units that must match. The VCCS gain is in siemens, the CCCS gain has no units, and so on. A unit mismatch usually points to a misplaced control equation.
Checking the answer
Verification works the same as for any nodal solution. Substitute the computed voltages back into each node's equation and confirm that currents entering equal currents leaving. For dependent sources, also recompute the control variable from the solution and confirm that the source output equals gain times that value. A solution that balances every node but uses a stale or wrongly signed control value passes the first check and fails the second.
Exercise
A 6 mA independent source enters a node. A 1 kΩ resistor connects that node to ground. A VCCS carries a current of 2 mS times the node voltage v away from the node to ground. Find v and the current in the resistor.
Show answer
Currents leaving equal currents entering: v/1000 + 0.002 v = 0.006. So 0.003 v = 0.006 and v = 2 V. The resistor current is 2 V / 1 kΩ = 2 mA. The VCCS carries 0.002 * 2 = 4 mA, and 2 mA + 4 mA = 6 mA, which matches the source.
Exercise
A VCVS connects node 2 to ground and sets v2 = 3 * v1. Node 1 receives 4 mA from an independent source and has a 1 kΩ resistor to ground, with nothing else attached. Why can you not use KCL at node 2 to find v2, and what do you use instead? What are v1 and v2?
Show answer
The current through the voltage source is unknown, so KCL at node 2 would add an unknown without giving v2. Use the source's constraint v2 = 3 v1 instead. At node 1, v1 = 4 mA * 1 kΩ = 4 V, so v2 = 12 V. After that, KCL at node 2 gives the source current if you need it.