X-Y plot Lorenz attractor using A models

Hi,

I am a new user of Kicad-Ngspice and I am enjoying the learning process. I would like to share a simulation design based on the Lorenz attractor, which is a classic system for introducing chaos concepts. The simulation was created using Xspice’s A-model, but the X-Y butterfly plot was done with GNUplot.

Here is a figure of the schematic and gnuplot result:

The oscillator consists of multiplier, subtractor, gain and integrator blocks. They are all implemented using a local library with their corresponding symbols. The realized state equation is given by:

eq

A Kicad 8 project can be found below:

Bmodel.7z (57.0 KB)

Best regards,

cblas

5 Likes

Great work!

I am working on making the XSPICE code models available for the KiCad user by establishing a symbol library and an assiciated model library. Digital is nearly complete, analog is still missing… due to the lack of symbols. Maybe we can cooperate a bit on this. Ultimate goal would be to have the library integrated into KiCad like the Simulation_SPICE symbol library.

I have just applied for a talk at FOSDEM2025 (FOSDEM 2025 - Home) to present about the integration efforts. If you allow, I might use your circuit as an example for a analog device (with proper citation of course).

New users ‘suffer’ from some restrictions (New Member Information), but they seem to be relievable without too much of effort.

Hi Holger,

Of course I could collaborate with the analog library.

Yes, you can use the circuit as an example for an analog system in your FOSDEM 2025 talk.

Regarding digital library and its different models, I have tested a gate oscillator with two oscillation mode, and Kicad-ngspice was able to capture such a behavior. May be someone in the forum could help me to explain it from a theoretical point of view.

I have updated my post and now you can download the project.