1
\$\begingroup\$

I try to step a DC voltage source in transient analysis in LTspice. Below there are five almost identical biased transistor circuits and plots for 1 sec duration. The only difference is that their DC bias is is increased from 500mV to 900mV with 100mV increments. So this DC bias is the DC voltage source in the question(V1, V2, V3, V4, V5). I know that such step is possible in DC analysis.

enter image description here (left-click to zoom)

As you see above, to obtain those plots I had to create five circuits.

Is it possible to obtain the same plots above by using only one circuit and writing a SPICE command in LTspice?

\$\endgroup\$
5
  • \$\begingroup\$ right click on voltage source ... advanced ... PWL \$\endgroup\$
    – jsotola
    Commented Apr 6, 2018 at 18:26
  • 1
    \$\begingroup\$ Add a .step command in the schematic. \$\endgroup\$
    – HKOB
    Commented Apr 6, 2018 at 18:30
  • \$\begingroup\$ @jsotola Imagine you had 100 iterations that would take the same effort as copying circuits. PWL only good if the increments are not same. I guess for my question .step method easier. I think my mistake was not to do .tran and use curly braces. \$\endgroup\$
    – cm64
    Commented Apr 6, 2018 at 18:54
  • \$\begingroup\$ you can cut a table from excel into a text file .... then use PWL file=myData.txt \$\endgroup\$
    – jsotola
    Commented Apr 6, 2018 at 20:07
  • \$\begingroup\$ If .tran {t} is your total simulation time, besides a simple PWL that was already suggested and answered, you can add a PULSE 500m 900m 0 {t}. \$\endgroup\$ Commented Apr 7, 2018 at 6:54

1 Answer 1

3
\$\begingroup\$

Right clock on the DC voltage source and select Advanced. Then select PWL(t1 v1 t2 v2...) Select Additional PWL points. Fill in the table with your desired voltage steps and times. See example below:

PWL Table

Here is another approach

\$\endgroup\$
1
  • \$\begingroup\$ The link solved the issue. Thanks. For equal increments PWL is not so practical. \$\endgroup\$
    – cm64
    Commented Apr 6, 2018 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.