Example circuits¶
This page collects example codes which mainly demonstrate the Circuit notation and Compilation machinery but also touches other parts of the lucipy library.
The examples demonstrate different simple mathematical problems and how to implement them on LUCIDAC using the lucipy software. The examples highlight different parts such as circuit modeling, digital (numerical) circuit simulation as well as steering the analog computer.
Python scripts¶
The following examples are short single file standalone scripts which you can download and
execute if you have lucipy installed. You can find them in the examples
directory of
the lucipy repository.
Simulations¶
These examples run straight out of the box and demonstrate how to configure a LUCIDAC circuit. Subsequently, the examples are solved in a digital simulator right within Python and the result is showed in a plot. Therefore, no hardware is required.
Rössler
Rössler attractor on LUCIDAC, as from Analog Paradigm Application Note 1. Coincidentally, see this example in a very similar notation also in the several-years old PyAnalog FPAA YML.
Lorenz
Lorenz attractor on LUCIDAC, as from Analog Paradigm Application Note 2.
Hindmarsh-Rose
Single Spiking Neuron Model on LUCIDAC, as from Analog Paradigm Application Note 28.
Euler spiral
Euler spiral on LUCIDAC, cf. Analog Paradigm Application Note 33. (Software simulation)
Sprott SQm system
Chaotic Sprott system on LUCIDAC, cf. Analog Paradigm Application Note 31. (Software simulation)
Yet another chaotic Sprott system
Yet another chaotic Sprott system on LUCIDAC, cf. Analog Paradigm Application Note 43. (Software simulation)
A chaotic system due to Lorenz, 1984
A chaotic system due to Lorenz in 1984 on LUCIDAC (Software simulation)
A three-time-scale system
A three-time-scale-system on LUCIDAC, cf. Analog Paradigm Application Note 44. (Software simulation)
A four wing attractor
A four wing attractor on LUCIDAC. (Software simulation)
The Halvorsen attractor
The Halvorsen attractor on LUCIDAC. (Software simulation)
The Dadras attractor
The Dadras attractor on LUCIDAC. (Software simulation)
The reduced Henon-Heiles attractor
The reduced Henon-Heiles attractor on LUCIDAC (cf. Julienn Clinton Sprott, “Elegang Chaos - Algebraically Simple Chaotic Flows”, World Scientific, 2016, pp. 133 f. (Software simulation)
The van der Pol oscillator
The van der Pol oscillator. (Software simulation)
Mathieu equation
The Mathieu equation. (Software simulation)
A Lotka-Volterra system
A Lotka-Volterra system. (Software simulation)
A hyperjerk system
A hyperjerk system (with five integrators). (Software simulation)
A hyperchaotic system including a quartic term
A hyperchaotic system including a quartic term. (Software simulation)
Demonstrator applications from booklet¶
These examples are part of the User handbook.
They are basically a subset of the examples given above. You can find them all in the
examples/rev1-final
directory. In order to run, they need the LUCIDAC_ENDPOINT
environment variable set and/or a Lucidac connected to USB/the same network. Since most
examples work without data aquisition, you currently cannot run them against the
emulator, i.e. when you use LUCIDAC_ENDPOINT="emu://"
you won’t get output.
Jupyter notebooks¶
The following examples are Jupyter/IPython notebooks which combine text/explanations next to editable and runnable code as well as their (potentially interactive) output, i.e. plots and images into single files. They are included into this documentation as “snapshots” and are a great experience to get started with lucipy.