Sub topic 12
Dependent sources and the extra controlling-variable equation
This chapter assumes you can write mesh equations for circuits with independent voltage sources, put them in matrix form, and solve them. It also assumes you know how a supermesh handles an independent current source. Here you add the fourth kind of element: the dependent source.
What a dependent source is
A dependent source is a voltage or current source whose value is set by some other voltage or current in the circuit. That other quantity is the controlling variable. Dependent sources model transistors, op-amps, and transformers in small-signal circuit models.
| Type | Output | Controlled by | Gain unit |
|---|---|---|---|
| CCVS (current-controlled voltage source) | voltage | a current | ohm |
| VCVS (voltage-controlled voltage source) | voltage | a voltage | none |
| CCCS (current-controlled current source) | current | a current | none |
| VCCS (voltage-controlled current source) | current | a voltage | siemens |
In mesh analysis, a dependent source needs one extra step beyond an independent source. Its value contains an unknown, so you must say what that unknown is in terms of the mesh currents.
The rule
- Write the mesh equations as if the dependent source were an independent source with a symbolic value, such as
2*ix. - Write one extra equation that expresses the controlling variable in terms of the mesh currents. This is the controlling-variable equation.
- Substitute the controlling-variable equation into the mesh equations. Collect terms so that only mesh currents remain on the left.
- Solve as usual.
If the controlling variable is already a mesh current (or the difference of two), the extra equation is a one-line substitution. If it is a voltage, apply Ohm's law to turn it into a current first.
Worked example: a CCVS
Both mesh currents are clockwise.
- Mesh 1 contains a 12 V source, R1 = 2 Ω, and the shared resistor R2 = 4 Ω.
- Mesh 2 contains R2, R3 = 6 Ω, and a CCVS of value 2·ix.
- The CCVS is oriented so it raises potential in the direction of i2.
- The controlling variable ix is the current through R2, measured in the direction of i1.
Step 1: mesh equations. Mesh 1 is the same as in an independent-source circuit:
2·i1 + 4·(i1 − i2) = 12
For mesh 2, the shared resistor carries i2 − i1 in mesh 2's direction. The dependent source is a rise, so it goes on the right:
4·(i2 − i1) + 6·i2 = 2·ix
Step 2: controlling-variable equation. The current through R2 in the mesh 1 direction is
ix = i1 − i2
Step 3: substitute. Mesh 2 becomes
−4·i1 + 10·i2 = 2·i1 − 2·i2
−6·i1 + 12·i2 = 0
Mesh 1 simplifies to 6·i1 − 4·i2 = 12.
Step 4: solve. The second equation gives i1 = 2·i2. Substituting into the first gives 12·i2 − 4·i2 = 12, so i2 = 1.5 A and i1 = 3 A. Then ix = 1.5 A, and the CCVS produces 2 × 1.5 = 3 V.
Step 5: power check. The three resistors absorb 2·3² + 4·1.5² + 6·1.5² = 18 + 9 + 13.5 = 40.5 W. The 12 V source delivers 12 × 3 = 36 W. The CCVS delivers 3 V × 1.5 A = 4.5 W, because i2 flows through it in the direction of its voltage rise. The total delivered is 40.5 W, which matches.
Solving it numerically
The code below moves the dependent-source term to the left side, so the substituted coefficients appear directly in the matrix. It checks the power balance, counting the dependent source as a delivering element.
import numpy as np
R1, R2, R3 = 2.0, 4.0, 6.0
V1 = 12.0
r = 2.0 # CCVS gain in ohms: v_dep = r * ix, with ix = i1 - i2
# Mesh 1: (R1 + R2)*i1 - R2*i2 = V1
# Mesh 2: -R2*i1 + (R2 + R3)*i2 = r*(i1 - i2)
# -> -(R2 + r)*i1 + (R2 + R3 + r)*i2 = 0
A = np.array([[R1 + R2, -R2],
[-(R2 + r), R2 + R3 + r]])
b = np.array([V1, 0.0])
i1, i2 = np.linalg.solve(A, b)
ix = i1 - i2
v_dep = r * ix
print(f"i1 = {i1:.4f} A, i2 = {i2:.4f} A, ix = {ix:.4f} A")
print(f"Dependent source voltage = {v_dep:.4f} V")
p_resistors = R1 * i1**2 + R2 * ix**2 + R3 * i2**2
p_delivered = V1 * i1 + v_dep * i2
print(f"P_resistors = {p_resistors:.4f} W, P_delivered = {p_delivered:.4f} W")Running it prints i1 = 3.0000 A, i2 = 1.5000 A, and 40.5000 W for both power values.
Dependent source plus supermesh: a CCCS
A dependent current source in a branch shared by two meshes needs both techniques. The supermesh removes the unknown voltage across the source. The source's value then gives the constraint equation, and the controlling variable adds one more substitution.
Take this circuit, with both mesh currents clockwise:
- Mesh 1 has a 20 V source and R1 = 2 Ω.
- Mesh 2 has R3 = 4 Ω.
- The shared branch holds a CCCS carrying 2·ix in the direction of i1, where ix is the current through R3, so ix = i2.
The equations are:
- Supermesh KVL around the outer loop: 2·i1 + 4·i2 = 20
- Source constraint: i1 − i2 = 2·ix
- Controlling variable: ix = i2
Substituting the third equation into the second gives i1 − 3·i2 = 0, so i1 = 3·i2. The outer loop then gives 10·i2 = 20. So i2 = 2 A and i1 = 6 A. The CCCS carries 4 A, which equals 2 × 2 A.
import numpy as np
R1, R3 = 2.0, 4.0
V1 = 20.0
k = 2.0 # CCCS gain: i1 - i2 = k * ix, with ix = i2
# Supermesh KVL: R1*i1 + R3*i2 = V1
# Constraint after substitution: i1 - (1 + k)*i2 = 0
A = np.array([[R1, R3],
[1.0, -(1.0 + k)]])
b = np.array([V1, 0.0])
i1, i2 = np.linalg.solve(A, b)
i_src = i1 - i2
print(f"i1 = {i1:.4f} A, i2 = {i2:.4f} A, CCCS current = {i_src:.4f} A")
# The CCCS voltage is not in the equations, so recover it from mesh 1 KVL.
v_src = V1 - R1 * i1 # drop across the CCCS in the direction of i1
p_resistors = R1 * i1**2 + R3 * i2**2
p_source = V1 * i1
p_cccs = v_src * i_src # positive means absorbed
print(f"CCCS voltage = {v_src:.4f} V, CCCS absorbs {p_cccs:.4f} W")
print(f"P_source = {p_source:.4f} W, "
f"P_resistors + P_cccs = {p_resistors + p_cccs:.4f} W")The CCCS has 8 V across it in the direction of i1, with 4 A flowing along that direction. It therefore absorbs 32 W. The 20 V source delivers 120 W, and the resistors take 72 + 16 = 88 W. Then 88 + 32 = 120 W, so the balance holds.
Common errors
- Forgetting the extra equation. The mesh equations then contain
ixas a third unknown with only two equations. Always count unknowns against equations before solving. - Wrong sign on the controlling variable. If ix is defined opposite to your mesh direction, use ix = −(i1 − i2). Draw the arrow of ix on the circuit and compare it with the mesh arrows.
- Wrong sign on the dependent source term. A dependent voltage source is a rise or a drop depending on its polarity relative to the mesh direction, exactly like an independent source. The dependence on
ixdoes not change this. - Treating the dependent source as a resistor. If the gain is in ohms, the term
r·ixlooks like a resistor drop. Its sign comes from the source polarity, not from the current direction through it. - Controlling voltage not converted. For a VCVS or VCCS, write the controlling voltage as a resistance times a mesh-current expression. For example, vx across R3 is R3·i2 in the mesh-2 direction.
- Dropping the dependent source from the power check. A dependent source can deliver or absorb power. Include it, as in the examples above.
Exercises
Exercise
In the CCVS example, change the controlling variable so that the source value is 2·i1 (the current through R1) instead of 2·(i1 − i2). Keep the same polarity and all other values. Find i1 and i2.
Show answer
Mesh 1 stays 6·i1 − 4·i2 = 12. Mesh 2 becomes −4·i1 + 10·i2 = 2·i1, so −6·i1 + 10·i2 = 0 and i1 = (5/3)·i2. Substituting into mesh 1 gives 10·i2 − 4·i2 = 12, so i2 = 2 A and i1 = 10/3 ≈ 3.333 A.
Exercise
A circuit has two meshes, with a VCCS in the branch shared by both. The VCCS carries i1 − i2 = 0.5·vx, where vx is the voltage across a 4 Ω resistor that is only in mesh 2 and carries i2. What is the controlling-variable equation in terms of mesh currents, and what is the resulting constraint equation?
Show answer
By Ohm's law, vx = 4·i2. The constraint is i1 − i2 = 0.5 × 4·i2 = 2·i2, which rearranges to i1 − 3·i2 = 0. The gain 0.5 is in siemens, so 0.5·vx has units of amperes.
Exercise
Why does a dependent source make the resistance matrix non-symmetric, while a circuit with only independent sources and resistors always gives a symmetric matrix?
Show answer
In a resistor-only circuit, the coefficient of mesh current j in the equation for mesh i is minus the shared resistance, and the same resistance appears in the equation for mesh j. A dependent source adds a term proportional to a mesh-current combination into only one mesh equation. That term has no mirrored counterpart in the other equation, so the matrix entries no longer match across the diagonal.