4
\$\begingroup\$

I have a customized Pulse pattern and I would like to have it in repetition. Does anyone know how we can establish that in LT spice?

enter image description here

\$\endgroup\$
6
\$\begingroup\$

PWL sources can be repeated either a set number of times:

PWL REPEAT FOR 7 (file=pwl_data.txt) ENDREPEAT

or forever:

PWL REPEAT FOREVER (file=pwl_data.txt) ENDREPEAT

Source: http://ltwiki.org/index.php?title=Undocumented_LTspice

\$\endgroup\$
3
  • \$\begingroup\$ Perfect! The link also helps a lot. \$\endgroup\$ – Durgaprasad Apr 29 at 13:15
  • 2
    \$\begingroup\$ @Durgaprasad One note that is not immediately seen: if the sequence needs to be repeated a lot of times, it may take a while to computate all the points. This is because PWL points are known beforehand, so extending the timescale by N is done by linearly interpolating all the points. Depending on how large N is, it can take up quite a bit to compute everything. This is why it's better to use repeat forever, because LTspice seems to determine the length of the sequence relative to the total simulation time, and no more. It just might be cheaper. Or not, but probably will be. YMMV. \$\endgroup\$ – a concerned citizen Apr 29 at 17:44
  • \$\begingroup\$ Yes, I did use the FOREVER function an it takes the endpoint as our simulation stop time. This is fast and hassle-free. \$\endgroup\$ – Durgaprasad Apr 30 at 7:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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