I. Current Source

Symbol Name: CURRENT

Constant Current Source

Syntax:

Ixxx n+ n- <current> [AC=<amplitude>] [load]

This circuit element sources a constant current between nodes n+ and n-. If the source is flagged as a load, the source is forced to be dissipative, that is, the current goes to zero if the voltage between nodes n+ and n- goes to zero. If a negative current is specified, the load keyword is ignored.  The purpose of this option is to model a current load on a power supply that doesn't draw current if the output voltage is zero. When flagged as a load, the current source starts to deviate from a constant current when the voltage across it drops to 0.5V. The impedance eventually drops to a resistance equal to .25Ω/A times the value of the current source.

For AC analysis, the value of AC is used as the amplitude of the source at the analysis frequency.

Time-Dependent Pulsed Current Source

Syntax:

Ixxx n+ n- PULSE(Ioff Ion Tdelay Trise Tfall Ton Tperiod Ncycles)

Name Description Units
Ioff Initial value A
Ion Pulsed value A
Tdelay Delay sec
Tr Rise time sec
Tf Fall time sec
Ton On time sec
Tperiod Period sec
Ncycles Number of cycles(Omit for free-running pulse function) cycles

Time-Dependent Sine Wave Current Source

Syntax:

Ixxx n+ n- SINE(Ioffset Iamp Freq Td Theta Phi Ncycles)

Name Description Units
Ioffset DC offset A
Iamp Amplitude A
Freq Frequency Hz
Td Delay sec
Theta Damping factor 1/sec
Phi Phase of sine wave degrees
Ncycles Number of cycles(Omit for free-running pulse function) cycles

For times less than Td, the output current is given by

Ioffset+Iamp*sin(π*Phi/180)

For times after Td, but before Ncycles have completed, the current is given by

Ioffset+Iamp*exp(-(time-Td)*Theta)*sin(2*π*Freq*(time-Td)+π*Phi/180)

For times after Ncycles have completed, the current is the last current when Ncycles completed. Note Ncycles does not have to be an integer.

The damping factor, Theta, is the reciprocal of the decay time constant.

Time-Dependent Exponential Current Source

Syntax:

Ixxx n+ n- EXP(I1 I2 Td1 Tau1 Td2 Tau2)

Name Description Units
I1 Initial value A
I2 Pulsed value A
Td1 Rise delay time sec
Tau1 Rise-time constant sec
Td2 Fall delay time sec
Tau2 Fall-time constant sec

For times less than Td1, the output current is I1. For times between Td1 and Td2 the current is given by

I1+(I2-I1)*(1-exp(-(time-Td1)/Tau1))

For times after Td2 the current is given by

I1+(I2-I1)*(1-exp(-(time-Td1)/Tau1))-(I2-I1)*(1-exp(-(time-Td2)/Tau2))

Time-Dependent Single-Frequency FM Current Source

Syntax:

Ixxx n+ n- SFFM(Ioff Iamp Fcar MDI Fsig)

Name Description Units
Ioff DC offset A
Iamp Amplitude A
Fcar Carrier frequency Hz
MDI Modulation index -
Fsig Signal frequency Hz

The current is given by

Ioff+Iamp*sin((2.*π*Fcar*time)+MDI*sin(2.*π*Fsig*time)).

Lookup Table Current Source

Syntax:

Ixxx n+ n- tbl|table=(<voltage, current>, <voltage, current>, ...)

This is useful for modeling the characteristics of a load.

A lookup table is used to specify a transfer function. The table is a list of pairs of numbers. The second value of the pair is the device current when the voltage across the device is equal to the first value of that pair. The output is linearly interpolated when the voltage is between specified points. If the voltage is beyond the range of the look-up table, the current is extrapolated as a constant current of the last point of the look-up table.

The lookup table itself can be contained in a file:

Ixxx n+ n- tbl=<filename>

No file name extension is assumed and the file name must be enclosed in quotes. The file name can be specified by a string parameter.

For example.

Ixxx n+ n- tbl="mypath to\myfile.txt"

Ixxx n+ n- table={my_file_string_param}

Ixxx n+ n- tbl=my_file_string_param

Step Load Current Source

Syntax:

Ixxx n+ n- <value> step(<value1>, [<value2>], [<value3>, ...]) [load]

This is a special form for the current source. The current is specified as a list of currents to use in a step load response transient analysis. In this mode, the simulation is computed until steady state is reached at the first current in the list, <value1>. Then the current is stepped to the next value in the list, <value2>. The simulation proceeds until steady state is achieved at that current. Then the current is stepped to the next value and the process repeats until the list is exhausted. If the .tran command doesn't specify “step”, then the original <value> is used.

Resistive Load

Syntax:

Ixxx n+ n- R=<value>

This is not a current source at all, but a resistor. It is used to model a resistive load when the load is netlisted as a current source.

Arbitrary Piece-Wise Linear Current Source

Syntax:

Ixxx n+ n- PWL [TIME_SCALE_FACTOR= ] [VALUE_SCALE_FACTOR= ] PwlSpec [ PwlSpec [ ... ] ]

Works as described for the voltage source, except that the current source does not support a trigger expression.

.WAV-File Current Source

Syntax:

Ixxx n+ n- wavefile=<filename> [chan=<nnn>]

This allows a .wav file to be used as an input to LTspice. <filename> is either a full, absolute path for the .wav file or a relative path computed from the directory containing the simulation schematic or netlist.  Double quotes may be used to specify a path containing spaces.  The .wav file may contain up to 65536 channels, numbered 0 to 65535. Chan may be set to specify which channel is used. By default, the first channel, number 0, is used. The .wav file is interpreted as having a full scale range from –1A to 1A.

This source only has meaning in a .tran analysis.