A current dependent current source (CCCS) is an active circuit element whose output current is a mathematical function of a controlling current flowing elsewhere in the circuit. In LTspice, you implement this using either the F primitive (which requires a zero-volt sensing voltage source) or a behavioral B source. While physical components like BJTs inherently act as current-controlled devices, using an ideal CCCS in simulation strips away parasitic capacitances and non-linear junction effects. This changes your workflow by drastically speeding up simulation convergence and allowing you to isolate the core transfer function of current mirrors, optocouplers, and feedback networks without the solver choking on complex semiconductor physics.

Builders commonly confuse the CCCS with the Voltage-Controlled Current Source (VCCS, known as the G source in LTspice), or they mistakenly attempt to probe a node's current directly without inserting a dedicated sensing element. To visualize the concept, think of a CCCS like a water valve whose opening is mechanically linked to a water wheel in a completely different pipe; the flow in pipe B is strictly dictated by the flow spinning the wheel in pipe A, regardless of the pressure in pipe B.

Implementing CCCS in LTspice: F-Sources vs. Behavioral B-Sources

SPICE engines calculate node voltages first, then derive branch currents. Because of this architecture, you cannot simply tell an F source to "measure the current through node X." You must provide a component that forces a measurable voltage drop. The standard workaround is inserting a 0V DC voltage source in series with your controlling branch.

The Zero-Volt Sense Trap: Never assign a resistance value to your sensing voltage source. It must be an ideal 0V DC source. Adding even 1 milliohm of resistance will alter your circuit's operating point and invalidate your transfer function calculations.

Alternatively, LTspice's behavioral B sources allow you to read current directly through existing components using the I() function, bypassing the need for a dummy voltage source. Here is how the two methods compare:

Feature F-Source (Primitive CCCS) B-Source (Behavioral)
Syntax F1 N+ N- Vname Gain I = I(V_sense) * Gain
Sense Requirement Requires 0V voltage source in series Can read I(R1) or I(V1) directly
Convergence Speed Extremely fast (linear matrix solve) Slower (requires iterative non-linear solving)
Best Use Case Ideal transformers, basic current mirrors Complex non-linear transfer functions

For most linear modeling tasks, the F source is superior. As noted in the Analog Devices LTspice documentation, primitive sources are always preferred over behavioral sources when the relationship is strictly linear, as they prevent the timestep-reduction loops that cause "timestep too small" errors.

Worked Numeric Example: Modeling an Optocoupler CTR

Let's model the Current Transfer Ratio (CTR) of a standard PC817 optocoupler using an F source. The CTR defines the ratio of the output phototransistor collector current ($I_c$) to the input LED forward current ($I_f$). For this example, we will assume a conservative CTR of 40% (0.4).

The Input (LED) Circuit:

  • Supply Voltage ($V_{cc}$): 5.0V
  • Current Limiting Resistor ($R_{led}$): 220Ω
  • LED Forward Voltage ($V_f$): 1.15V (typical for GaAs infrared LEDs)

First, we calculate the controlling current ($I_f$):
$I_f = (V_{cc} - V_f) / R_{led}$
$I_f = (5.0V - 1.15V) / 220Ω = 17.5 mA

The Output (Phototransistor) Circuit:

With a CTR of 0.4, the expected output current is:
$I_c = I_f imes CTR$
$I_c = 17.5 mA imes 0.4 = 7.0 mA

LTspice Implementation Steps:

  1. Place a standard voltage source (5V) and a 220Ω resistor to drive a standard diode model representing the LED.
  2. Insert a 0V DC voltage source named V_sense in series with the LED anode. This is our current probe.
  3. On the isolated output side, place a 10V supply and a 1kΩ load resistor.
  4. Press F2, type F, and place the current-dependent current source primitive across the output load.
  5. Right-click the F source. Set the value to 0.4 (the CTR gain).
  6. Right-click the F source again to open the advanced attributes, and ensure the controlling voltage source name is set to V_sense.

When you run a .op (Operating Point) simulation, probing the output branch will show exactly 7.0 mA, perfectly isolating the optocoupler's transfer function without needing to import a complex 5-terminal SPICE model for the phototransistor.

Where You Meet This in Practice

While you will rarely build a physical CCCS on a breadboard, the concept and its simulation equivalent are foundational to modern analog design. According to All About Circuits, dependent sources are the mathematical bridge between ideal circuit theory and physical semiconductor behavior.

1. Galvanic Isolation Modeling
When designing isolated power supplies or digital isolators, you need to simulate signal transfer across an isolation barrier without creating a DC path in your SPICE netlist. A CCCS perfectly models the magnetic or optical coupling of an isolator, allowing the primary and secondary grounds to float independently while still transferring signal current.

2. Ideal Current Mirrors
In integrated circuit design, current mirrors bias multiple amplifier stages. Using physical BJT models for a 10-transistor mirror array can cause massive convergence issues during transient analysis. Replacing the mirror with an ideal CCCS (Gain = 1) allows you to verify the system-level loop stability before swapping in the physical transistor models for final verification.

3. 4-20mA Transmitter Loops
Industrial sensors output a 4-20mA signal proportional to a measured variable. When simulating the receiving end (like a 250Ω shunt resistor feeding an ADC), a CCCS driven by a behavioral voltage source allows you to model the high-impedance, current-regulating nature of the transmitter without building out the internal op-amp and pass-transistor circuitry of the sensor.

Frequently Asked Questions

How do I fix the "voltage source loop" error when using an F-source?

This error occurs when you place the 0V sensing source in a way that creates a closed loop consisting entirely of voltage sources and inductors, which violates Kirchhoff's Voltage Law in the SPICE solver. To fix it, ensure your 0V sense source is in series with a resistive element or a semiconductor junction. If you must sense current in a purely inductive branch, add a microscopic series resistor (e.g., 1u ohm) to break the ideal voltage loop.

Can I use a current dependent current source to model a BJT transistor?

Yes, but only for low-frequency, first-order approximations. A BJT is fundamentally a current-controlled device where $I_c = \beta imes I_b$. You can model this by placing an F source between the collector and emitter, controlled by a 0V source in the base lead, with the gain set to the transistor's $\beta$ (e.g., 100). However, this ideal model completely ignores the Early effect (output impedance), base-emitter voltage drops, and junction capacitances. It is useful for quick logic checks, but never use it for high-frequency or precision analog simulation.

Why does my behavioral B-source output show unrealistic mega-amp spikes?

Behavioral sources evaluate their mathematical expressions at every single simulation timestep. If your controlling current experiences a transient glitch (common during the initial UIC startup phase or during MOSFET switching events), the B source will multiply that glitch by your gain factor, resulting in massive, non-physical current spikes that crash the solver. To prevent this, always place a high-value bleeder resistor (e.g., 10MΩ) in parallel with the B source output to provide a DC path to ground, and use the idt() or lowpass() functions in your behavioral equation to filter out high-frequency numerical noise.