I would like to include a PI regulator which generates a PWM pulse for a DC/DC converter in my model. Input is a voltage 0-3.3V
What is the easiest way to do this in NG-Spice? Right now I am using an analog solution with several elements but is there another way? Perhaps some kind of CPU emulation block?
in the ngspice examples is an exampe of a PWM enerator that might help.
New simulation examples are following here.
Up to Class E RF generator I have been using KiCad 8. Now I am switching to KiCad 9. It should be no problem to open KiCad 8 Eeschema files in KiCad 9 for simulation, as the simulator interface did not change. Unfortunately it is not possible the other way round. You may not be able to open KiCad 9 files in KiCad 8 any more. ngspice-44 is typically involved.
The previous examples (KiCad 6, ngspice-38) are visible at Simulation examples for KiCad/Ees…
1 Like
holger
August 15, 2025, 3:45pm
3
Here you will find a PWM generator (symbol and model) ready for use: Simulation with XSPICE code models
1 Like
Fantastic! Thank you both.
The models would make a great addition to the default installation of KiCad in the future.
1 Like
It seems to me that your elements Holger gives KiCad/ngspice the capabilities similar to PLECS?
https://www.plexim.com/products/plecs