You can do that by using a "Arbitrary Behavioral Voltage or Current Sources" where you can define the arbitrarily define the behavior of you current source. I will not go in to the details of Arbitrary Behavioral Voltage or Current Sources since this is found in the Help of LTSpice
Additionally from http://ltwiki.org/index.php5?title=Undocumented_LTspice
You can find the following section:
Resistors
Behavioral Resistors
Create a behavioral resistor by right-mouse-button clicking on its Value field and edit its value to read: R=. This feature is undocumented, but is considered permissible to use. The expression syntax is the same as for a general behavioral source (see B-sources in Help).
The resistance must not go to zero and negative values can lead to convergence problems, so it is advisable to restrict its values to within a meaningful range as per the following Value example:
R = limit(1,100k,V(1,2)*I(V1)) ; R stays between 1 ohm and 100k
To plot an I-V curve, start by using the differential cursor to plot the voltage across the resistor. First click and hold down the left-mouse-button (red probe icon) on one side of the resistor and then drag and drop the black probe icon on the other side. Finish by dragging the mouse pointer over the x-axis (a ruler icon will appear) and the click the left mouse button to bring up the Horizontal Axis menu. Change the Quantity Plotted from "time" to "I(R1)" (assuming R1 is your behavioral resistor).
tline
and ltline
models have fixed delay, i.e. they cannot be a function of time. If you need such a delay, you can only use a behavioural source with the builtin function V=delay(V(in), f(time))
(for BV
source, for ex.), where f(time)
is a function defined previously with a .func
statement, or made up ad hoc (e.g. V=delay(V(in), V(control))
).
You should know that, while you can use that, in both .AC
and .TRAN
analyses, in the latter it may suffer from minor (seemingly erratical) drifts, depending on the configuration of your schematic. One cause may be the numerical accuracy (dynamic range) which, unfortunately, affects the behavioural sources, but I can't point out exactly what/who/where, I'm afraid that's up to you to find out.
Alternatively, you can build your own LC delay line built with the behavioural inductors (Flux=f(x)
) and capacitors (Q=f(x)
), but I, personally, would recommend avoiding. Your choice.
Best Answer
I'm not sure you can call a model TLINE but maybe you can. You should not enter units. Let's call the model 'myTline': .model myTline LTRA(R=10m L=9n C=3.59p len=1) R/L/C are parameters for a piece of wire of '1' length (if R/L/C values describe Ohms/Henries/Farads per meter then len of 1 is 1 meter). So if you want double the length you set it to 2 etc.
Then you just fill the 'Value' in LTRA component properties to be 'myTline', don't fill the other fields.