# Creating a Current Dependent Current Source in LTspice

Here a simple and very versatile method of creating a current dependent current source in LTspice is presented. The method makes use of the Arbitrary Behavior Current Source, or “bi” default library component. It’s very important to understand the current direction convention LTspice is using for various components, as will be demonstrated below for other current sources, voltage sources, components with only two terminals, and components with more than two terminals.

Understand that in all the given examples, even though all the independent currents are mirrored directly by the dependent current source, it’s also possible to adjust them with any arbitrary mathematical function LTspice recognizes, hence the component being named “Arbitrary Behavior Current Source”. For a full list of valid mathematical operators and functions search for “bi” in the help topics inside LTspice, or see the next LTspice Tip article for some examples.

## A Current Source Dependent on Another Current Source

This is very straightforward, the convention here is that the direction of current flow matches the arrow indicators between the dependent current source and the independent current source. Here, an independent 1mA DC current source, I1 , is connected to a 1 kOhm load, and a dependent current source, B1 , is set to mirror I1 's current exactly ( I={I(I1)} ) through a larger 10 kOhm load. Very easy, and works as expected with 1V at Vin and 10V at Vout .

If the independent source is flipped 180 degrees so that it’s driving its 1mA current the opposite direction, the dependent current source circuit is unaffected because current flowing out of the independent current source arrow flows out of the dependent current source arrow. Again, this works as expected, this time with -1V at Vin but still 10V at Vout .

## A Current Source Dependent on the Current of a Voltage Source

The convention here is that positive current flows in to the positive terminal. It isn’t difficult to make an incorrect assumption based on this. In the first example here, the convention makes the dependent source’s current flow opposite the direction its arrow is pointing.

This might be counter-intuitive at first, but it’s easy to fix the current direction by simply subtracting in the dependent current source equation ( I={-I(V1)} instead of I={I(V1)} ), as shown in the second example.

## A Current Source Dependent on the Current of a Two Terminal Component

For better or worse, LTspice treats two terminal components differently than components with three or more terminals. For components like resistors, capacitors, and inductors this can make it difficult to know what the current convention is prior to actually running a simulation (especially if components have been mirrored and/or rotated). Observe, and note that the dependent current equation is the same in both ( I={I(R1)} ).

After running the simulation, a simple means of checking the current convention of a two terminal component is to hover over the component in the schematic window and look at the current probe graphic that appears.

Here, the positive direction for current is indicated by the arrow of the probe.

## A Current Source Dependent on the Current of a More Than Two Terminal Component

For a component with three or more terminals the convention is that current flowing in to a pin is positive while current flowing out of a pin is negative. Here are some examples with a simple NPN transistor circuit, where the convention as stated should make the base and collector currents positive and the emitter currents negative. Sure enough, this is true.

Note the different dependent current equations ( I={Ic(Q1)} vs. I={Ie(Q1)} ). Unlike probing a two pin component, adding a current probe for a three or more terminal device requires clicking on the specific pin to make the distinction.

Note that the current probe graphic has now changed and indicates no inherent direction, as the previously mentioned positive in and negative out convention is used for each pin. Also, keep in mind that the dependent source equation is arbitrary, and therefore if the emitter current were desired to be made “positive”, this could be done by subtracting it (as before with a voltage source current), or since it’s known that the emitter current is equal and opposite to the sum of the collector and base currents ( I={Ic(Q1 )+ Ib(Q1)} )…

The only limitation is mathematical imagination and the functions/operators provided in LTspice.