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össlerRö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.
LorenzLorenz attractor on LUCIDAC, as from Analog Paradigm Application Note 2.
Hindmarsh-RoseSingle Spiking Neuron Model on LUCIDAC, as from Analog Paradigm Application Note 28.
Euler spiralEuler spiral on LUCIDAC, cf. Analog Paradigm Application Note 33. (Software simulation)
Sprott SQm systemChaotic Sprott system on LUCIDAC, cf. Analog Paradigm Application Note 31. (Software simulation)
Yet another chaotic Sprott systemYet another chaotic Sprott system on LUCIDAC, cf. Analog Paradigm Application Note 43. (Software simulation)
A chaotic system due to Lorenz, 1984A chaotic system due to Lorenz in 1984 on LUCIDAC (Software simulation)
A three-time-scale systemA three-time-scale-system on LUCIDAC, cf. Analog Paradigm Application Note 44. (Software simulation)
A four wing attractorA four wing attractor on LUCIDAC. (Software simulation)
The Halvorsen attractorThe Halvorsen attractor on LUCIDAC. (Software simulation)
The Dadras attractorThe Dadras attractor on LUCIDAC. (Software simulation)
The reduced Henon-Heiles attractorThe 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 oscillatorThe van der Pol oscillator. (Software simulation)
Mathieu equationThe Mathieu equation. (Software simulation)
A Lotka-Volterra systemA Lotka-Volterra system. (Software simulation)
A hyperjerk systemA hyperjerk system (with five integrators). (Software simulation)
A hyperchaotic system including a quartic termA 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.