1

I tried to follow docs, and here is my implementation for triangle pulse:

V1 0 1 PULSE(-0.75 0.75 0m 8.335m 8.335m 0 16.67m 0)

but the result is:

enter image description here

although the Rise time is 8.335m at appears as 0, can someone explain what’s the issue?

simo
  • 273
  • 1
  • 13
  • 1
    Can you explain what kind of triangle pulse you want to generate and why the result isn't working for you? – Voltage Spike Jul 18 '19 at 19:09
  • A triangle like in here: https://www.electronicspoint.com/forums/resources/simulating-sawtooth-and-triangular-waveforms.58/ – simo Jul 18 '19 at 19:32

1 Answers1

1

Don't ask why, but probably it NGspice fails simulating with a pulse width of 0.

The following will work:

V1 0 1 PULSE(-1V 1V 0 {8.335m-0.5n} {8.335m-0.5n} 1n {16.67m+1n} 0)

EDIT
It seems a known issue: https://sourceforge.net/p/ngspice/bugs/355/

Are you aware of the fact that setting a (pulse) parameter to 0 does not mean that it becomes 0.000000... but that SPICE sees this as a don't care and substitutes it with something (what it thinks is) reasonable? I would expect your actual pulse-width becomes 5 or 10% of the period (I didn't consult the source code for the exact number).

Huisman
  • 10,694
  • 2
  • 20
  • 40