@lpoma @RDunn
Yes, I agree with you both…
- Cblock can only shorten the timestep, but can not increase timestep.
- for very deterministic discrete timing (i.e. digital MCU or digital PWM) MaxExtTimeStep() is better since it doesnt do the timing in Trial-Error manner as with Trunc(), I use Trunc() only to make analog comparator in C-block.
Anyway, @KSKelvin
do you notice for some “Timestep too small” for SMPS+Cblock controller, it can be solved adding small series resistance at the input of Cblock?
I have requested Mike to consider about adding Rint (or potentially also Cint, and Rint_par) on the Cblock parameter ( it already have rout and cout)…
*unfortunately, I cant send him the sch as its from my work PC.
It sounds strange that a series resistance at the input of a Cblock can resolve the issue of a timestep being too small. If you probe the current of that resistor, are you able to read a value that is not equal to 0A? Are you having .option gshunt or cshunt with your schematic, and the resistor as a result with extra elements connected to GND at Cblock input?
@KSKelvin the current on that extra small resistance is dead zero.
on this particular simulation my sim options are:
fastmath = true, method=gear, reltol=.1m
@KSKelvin
I guess its a false alarm.
Now I realize another source of timestep too small, particularly for sim with C-block.
As we all aware of, SPICE have difficulty to deal with signal discontinuity. And, C-block can be a source of discontinuity as its output can change suddenly between t-Ts and t . Which is why C-block has options to set rout and cout to tame down the transition.
We can easily set rout=1n and cout=1p, it then removes the problem…
Edit-> it’s not as fool proof as I hope…
Arief,
Regarding this update:
01/08/2026 Reduced the default inductor damping.
inductor rpar is now infinite at default.
Reminder, it will be a good idea to add Rpar = 100E6 (well 10 Meg or higher should be fine) for general SMPS application… the switching nature makes the circuit to ringing everywhere, thus adding damping is a good idea to help the solver to not going to femto-second time step.
Not infinite… In .tran, the default Rpar changed from L/15.91/Gmin to L/1.591/Gmin, i.e., increased by 10 times. In .ac, the default Rpar is L/0.1591/Gmin, i.e., increased by 100 times as compare to past. LTspice damping is much less. Possibly (I guess), many people are asking Mike why LTspice and Qspice do not match and eventually Rpar is reduced. I don’t think such a high Q is common (or even can be done) in power electronic. But there is another group of users who seem to work in a specific field with very high Q.
You can check inductor default Rpar by adding attribute Verbose to the inductor, and it will return L and Rpar in output window.
So, anyway I tried making a ideal MOSFET model (and IGBT too) including the body diode using Behavioral Resistor.
*I also have ideal diode model with behavioral resistor, just not posted there.
Simulation options are:
method=gear
cshunt=1f
gshunt=1f
gmin=1f
My test where I simulated my work circuit (17 MOSFET + 6 diodes) tells me that this behavioral resistor part runs a bit slower than S-switch+Behavioral Diode, but at the same time much more robust with far less “timestep too small” issues.
Anyway,
I guess I come up with this general suggestion on SMPS simulation with Qspice.
The goal is, to improve convergence (avoid that pesky Timestep too small) by means of simulation options and component model definition.
Cheers,
3 Likes
@physicboy You should mark your post as a solution.
Well, where can I find your proposed symbols? I can create those symbols to match the corresponding devices’ layout in Qspice so that others can drag them into their projects for verification (matching layout allow delete default device and add your proposed symbol without adjusting any wire). Additionally, I can create a .option symbol to quickly set the .option you proposed. Something like this.
You have that massive library organized like that?
,that’s super cool!
I have marked it as solution, and will send you the MOSFET/IGBT/Diode model tomorrow…
So, here we are the library based on the suggestion I made in the article (which is now also have been updated).

Github link QSPICE/ANR Q-Lib at main · physicboy/QSPICE · GitHub
2 Likes