Hi,

test13.qsch (12.4 KB)

Why is it showing this when integrating?

50ns as maxstepsize:

10ns maxstep size:

And if I run the test with gear meathod, what I see above disapear but appear other thing:

Expected result - straight line on 0V:

Hi,

test13.qsch (12.4 KB)

Why is it showing this when integrating?

50ns as maxstepsize:

10ns maxstep size:

And if I run the test with gear meathod, what I see above disapear but appear other thing:

Expected result - straight line on 0V:

It looks like trap ringing.

Aside from the ringing artifact, trap integration gives the correct result, i.e., the area under every trapezoid is correct. Gear does not give as exact result, because it adds damping that isnâ€™t in the circuit.

â€“Mike

And what is the cure?

I found a way by adding this option:

.opt maxord=1

I am wondering what does this maxord as it is eliminating that â€śtrap ringingâ€ť/triangles, and also I am wondering if there are also other modalities to eliminate those unexpected triangles.

.options maxord=1 forces Backward Euler. Even less accurate than Gear.

The cure is to not be phased by trap ringing. It goes away if you simulate a more realistic, i.e., physical circuit. For example, your diode is nonlinear but has no capacitance. That is impossible.

â€“Mike

1 Like

Ok. I can understand.

I have a curiosity then about gear and backward euler: why you decided to maintain also these two methods in qspice? I mean If trapezoidal method is better to use than gear/backward euler, then what are the reasons to have also these 2 methods? They have a benefits somewhere somehow over trap? Is better/necessary to use gear or backward euler than trapezoidal somewhere? Or you implemented gear and backward euler in qspice only to have it there, only as an option or If someone wants to play also with these 2 methods?

And QSpice has trapezoidal method implemented (as we are able to see the ringing artifacts) and not modified trapezoidal method, right? are You planing to implement also the modified trapezoidal method in qspice?

Gear can help in running Pspice model. For example, I worked on a TI subckt where its Tina-TI example set its method to Gear. If I change it to Trap, convergence issue will occur. Later I duplicated that circuit in Qspice, I found this same situation with Trap and had to run in Gear.