001_Sweep_table_lookup : Table lookup for output level
Requires: SmartSpice & Smartview
Minimum Versions: SmartSpice 4.6.5.R
An E element voltage source (VCVS) can be used with a look-up table of values to change the output level. In this example the input is swept between 2 and 8 volts while the output level changes at 3, 4 and 5 volts goverened by the transfer characteristic of the look-up table.
The input deck is a SPICE file containing the setup of the bias circuit for the sense inputs of the E(VCVS) element, and the look-up table to vary the corresponding output voltage levels.
To run the simulation, Source the input deck and press the green run button. When the simulation completes, the tabular results are shown in SmartSpice GUI window.
Plotting the output waveforms in a smartview window you can see the ramped voltage (vdd), input of the E element v(vcvs) and the corresponding output voltage v(tso) due to the look-up table values.
You can plot v(tso) vs v(vcvs) waveform to directly check the look-up table by setting v(vcvs) as the scale parameter (a Smartview feature).
VCVS_dc_table.in
* Check VCVS for DC sweep input and table lookup output. .options nomod .dc VDD 2 8 0.25 E1 TSO 0 TABLE 'v(VCVS) - V(0)' = (1,0.65) (1.5,0.85) (2,0.95) (2.5,1.2) (3,1.3) (3.5,1.4) (4,1.5) VDD VDD 0 5 r001 VDD VCVS 100 r002 VCVS 0 100 r003 TSO 0 100 *.TRAN 1u 5u .print V(VCVS) V(TSO) .save all(v) .end