Electronics > Projects, Designs, and Technical Stuff
LTSpice pulse options
<< < (4/9) > >>
T3sl4co1l:
If all you're doing is looking at waveforms, you'll save a lot of time and precision doing it analytically rather than numerically.

SPICE only knows what it knows, on a moment-to-moment basis.  If you tell it that it needs those moments to be 1ps or something ridiculous, it's going to dutifully follow your command, and simulate with very small timesteps.  Maybe the steps are too small and it doesn't ever recover (timestep too small).  Finally, the FT it calculates from that run time, is limited by that run time: frequencies can only be so precisely calculated, based on the data recorded.  The true frequency and harmonics might be perfectly spaced, but you get sloppy binned results because it's not an analytical method.

But if all you're looking at is a PULSE source, that's a four step piecewise linear function, a trapezoid wave, with an easily solved integral in its Fourier series.  To wit:
- The harmonics go as 1/N from fundamental until the cutoff frequency
- The cutoff is determined by the ramp (edge) rate
- Above cutoff, harmonics go as 1/N^2
- If the duty cycle isn't 50%, even harmonics are present.  Specifically, harmonics go as, um, sin(D * (1-D) * N * 2*pi) or something like that.  Basically at 50%, they alternate (even harmonics = 0), while at very low or very high D, the waveform is very spiky and harmonics are flat (just as an ideal impulse train has all equal harmonics) until a break frequency F / (D*(1-D)) or thereabouts.
- I'm not sure offhand what happens with dissimilar rising and falling edges, but it must have some intermediate cutoff point.  Note that asymmetry in any parameter (rise/fall, on/off) introduces even harmonics.

Tim
iMo:
Took a half of a second..
iMo:
Sub-ps edges.
SiliconWizard:
Regarding the 0/default value for rise/fall times:

http://ltwiki.org/index.php?title=Most_frequently_asked_questions_for_beginners#I_have_a_pulse_source_in_my_schematic_with_zero_transition_times._LTspice_only_shows_slow_transition_times_of_2ns._What.27s_going_on_here.3F

Just tested a pulse voltage source in LTSpice with rise and fall times of 10ns, 100µs Ton, 200µs Toff, 1ms stop time without specifying a maximum timestep for the transient simulation, and I get 10ns rise and fall times.
Simon:

--- Quote from: SiliconWizard on May 06, 2019, 10:33:23 am ---Regarding the 0/default value for rise/fall times:

http://ltwiki.org/index.php?title=Most_frequently_asked_questions_for_beginners#I_have_a_pulse_source_in_my_schematic_with_zero_transition_times._LTspice_only_shows_slow_transition_times_of_2ns._What.27s_going_on_here.3F

Just tested a pulse voltage source in LTSpice with rise and fall times of 10ns, 100µs Ton, 200µs Toff, 1ms stop time without specifying a maximum timestep for the transient simulation, and I get 10ns rise and fall times.


--- End quote ---

Yes if you specify it it will go to what you want. If you don't it seems to assume 50µs

I am looking at the FFT of RC filtered steps, i would think that 10 points of those curves is a good idea? Questin is to do a proper FFT how many cycles do i need? I am pretty sure that the resulting graph from 2 and 14 cycle was different.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod