ltspice:variable_resistor

Stan Zurek, Variable resistor , Encyclopedia-Magnetica.com, {accessed 2019-04-23} |

Go to: LTspice. |

The Arbitrary Behavioral Current Source in LTspice can be used to simulate time-variable resistor in transient simulations.

The steps are:

1. Connect a voltage source to ground and label its other end for example as “var”. Set the voltage waveform/pulse such that its value in volts corresponds directly to the desired variable resistance in ohms (e.g. “50 V” will correspond to “50 Ω”).

2. In value of the variable resistor enter:

R = V(var)

such that the name “var” represents the node name from step 1.

The steps are:

1. Label the node(s) the variable resistor is going to be connected between.

2. Use “Arbitrary Behavioral Current Source (bi)” and put it between the labelled nodes. If the resistor is connected to ground then only one node needs to be labelled (e.g. “test”).

3. Create a new voltage source connected somewhere to ground, and label its voltage output (e.g. “VAR”). The shape of this voltage source will determine how the resistance changes - this can be set to be a pulse, sine with offset, piece-wise linear (PWL) etc. Set the shape of this voltage source to vary between zero (infinite resistance, zero current) to unity (resistance equal to the value “LOAD”, see next point).

4. Add directive “.param LOAD 100” where “LOAD” represents a variable and “100” is the minimum value of resistance.

5. Edit the function of the Behavioral Current Source to be:

I=V(VAR)*V(test)/LOAD

This will set the current to vary anywhere between zero (if V(VAR)=0 then resistance = infinity), scaled to the real voltage “V(test)” and the value of LOAD (if V(VAR)=1 then resistance = LOAD). If the variable resistor is placed between two labelled nodes then a voltage difference between these nodes needs to be calculated in the equation.

The steps are:

1. Label the node(s) the variable resistor is going to be connected between.

2. Use “Arbitrary Behavioral Current Source (bi)” and put it between the labelled nodes. If the resistor is connected to ground then only one node needs to be labelled (e.g. “test”).

3. Create a new voltage source connected somewhere to ground, and label its voltage output (e.g. “VAR”). The shape of this voltage source will determine how the resistance changes - this can be set to be a pulse, sine with offset, piece-wise linear (PWL) etc. Set the shape of this voltage source to vary between any positive values (zero and negative values are not allowed). For “infinitely high” resistance use very high value, for example “1G” (1 giga) as the amplitude. For “infinitely low” resistance use a very low value, for example “1f” (1 femto).

4. Edit the function of the Behavioral Current Source to be:

I=V(test)/V(VAR)

This will set the resistance to be directly proportional to the V(VAR) voltage. If the variable resistor is placed between two labelled nodes then a voltage difference between these nodes needs to be calculated in the equation.

This method is applicable only in the operating point simulation (.op) not transient (.tran).

The steps are:

1. Add a directive:

.step param Rvar list 1 2 3 4 5 10

where “Rvar” denotes a variable resistance.

2. In the given resistor enter the value of resistance as “{Rvar}” (with curly brackets).

3. Run the simulation in the .op mode (operating point). When plotting currents and voltages, they will be plotted with the Rvar in the horizontal axis of the graphs.

ltspice/variable_resistor.txt · Last modified: 2018/12/07 22:24 by Stan Zurek