0
\$\begingroup\$

In transient analysis I define a voltage input such as a square wave input and obtain an output voltage. Here I set the input signal:

enter image description here

Export time series:

enter image description here

But when I export the input and export time series signals from LTspice as a text, the time points do not have equal intervals. From the text file time plotted:

enter image description here

Is it possible to set it so we have an input and output with equal time intervals? Such as a sampled input and output with a constant sampling rate fs.

\$\endgroup\$
8
  • 1
    \$\begingroup\$ A very similar question was asked just a couple days ago. \$\endgroup\$
    – The Photon
    Nov 20, 2017 at 22:03
  • \$\begingroup\$ I set the max timestep to 0.00008 still same number of samples and same issue nothing change. I think that question is lacking example imao I didnt get the solution which parameter is what ect. \$\endgroup\$
    – user1245
    Nov 20, 2017 at 22:10
  • \$\begingroup\$ Can you put your spice file (the netlist file) on pastebin or somewhere? \$\endgroup\$
    – The Photon
    Nov 20, 2017 at 22:13
  • \$\begingroup\$ Yes here is the asc file: wikisend.com/download/511398/fltrtest22.asc \$\endgroup\$
    – user1245
    Nov 20, 2017 at 22:21
  • 1
    \$\begingroup\$ Possible duplicate of Exporting LTspice waveforms to txt or csv \$\endgroup\$
    – Voltage Spike
    Nov 21, 2017 at 5:52

1 Answer 1

1
\$\begingroup\$

To 'sample' nodes in LTspice you can use the .WAVE command to create a WAV audio file. The maximum resolution is 32 bits and maximum sampling frequency is 4096MHz.

The plot below was produced from your LTspice schematic. It was created in LTspice with .wave fltrtest22.wav 16 50 V(in) V(out) which specifies 16 bits and 50sps, then converted to csv text data using Sound eXchange (command line: 'sox fltrtest22.wav -t dat fltrtest22.csv'), loaded into Openoffice Calc as merged space-delimited text, and finally plotted on an x-y scatter chart.

enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ Don't forget that the downside of this is the limit between +/-1V. \$\endgroup\$ Nov 21, 2017 at 8:14
  • \$\begingroup\$ Yes, the 'audio' waveforms saturate at +-1V. Just have to set the input to a level that ensures the output doesn't saturate. \$\endgroup\$ Nov 21, 2017 at 11:51

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.