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\$
  • 1
    \$\begingroup\$ A very similar question was asked just a couple days ago. \$\endgroup\$ – The Photon Nov 20 '17 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\$ – atmnt Nov 20 '17 at 22:10
  • \$\begingroup\$ Can you put your spice file (the netlist file) on pastebin or somewhere? \$\endgroup\$ – The Photon Nov 20 '17 at 22:13
  • \$\begingroup\$ Yes here is the asc file: wikisend.com/download/511398/fltrtest22.asc \$\endgroup\$ – atmnt Nov 20 '17 at 22:21
  • 1
    \$\begingroup\$ Possible duplicate of Exporting LTspice waveforms to txt or csv \$\endgroup\$ – Voltage Spike Nov 21 '17 at 5:52
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\$
  • \$\begingroup\$ Don't forget that the downside of this is the limit between +/-1V. \$\endgroup\$ – a concerned citizen Nov 21 '17 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\$ – Bruce Abbott Nov 21 '17 at 11:51

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.