Implementation of a Microcontroller-Based Chaotic Circuit of Lorenz Equations

Lorenz equations are commonly used in chaos education and studies. Simulation programs can be used to produce solutions of Lorenz equations and to examine its chaotic waveforms. However, sometimes a chaotic signal source can be needed. Such a circuit can be made using either analog or digital circuit components. Recently, a microcontroller-based circuit is suggested to obtain chaotic waveforms of Lorenz equations however only simulations are used to show proof of concept. Such circuit needs experimental verification. In this paper, implementation and experimental verification of the microcontroller-based circuit which solves Lorenz equations in real time and produces its chaotic waveforms are presented. Runge-Kutta method is used to solve the equation system. By using Proteus, microcontroller-based chaotic circuit is simulated and designed. Presented design has been implemented using an Arduino Mega 2560 R3 microcontroller. The microcontroller sends the chaotic signals to the outputs of the circuit using digital-to-analog converters. The waveforms acquired experimentally from the implemented circuit matches well with those obtained from Proteus simulations.


I. INTRODUCTION
HE LORENZ system is a set of ordinary differential equations first studied by Edward Lorenz in 1963 [1]. The equation system can have chaotic solutions for a range of system parameter values. The Lorenz system is commonly used for chaos education and studies. The Lorenz equations can also be used to describe models for dynamos, BLDC electrical machines, electronic circuits, lasers, chemical processes, and osmotic instability [2]- [6]. The Lorenz system has strange attractors, i.e. some of its solutions presented in the phase plane look like number eight or a butterfly [7]- [9].
Analog circuit implementations of Lorenz system can be used for secure communications and cryptography [7], [9]- [14]. MOS realization of a Modified Lorenz Chaotic Systems is given in [14]. Memristor is also a promising circuit element for both analog and chaotic circuit applications thanks to its non-linear dynamics [15]- [19]. Programmable memristorbased chaotic systems can be found in [18], [20]- [22]. A full CMOS based memristive chaotic circuit is examined in [18] and made using a microcontroller-based circuit in [23]. In such a circuit, the chaos waveforms are obtained in a hybrid way not just in an analog way and the effect of different numerical solution methods such as Euler and Runge-Kutta on the bifurcation of the Lorenz system can be investigated easily [23]. This method is also applicable to the Lorenz system and the approach is presented only using simulations in [24]. However, experimental verification of the microcontrollerbased circuit has not been done yet. In this paper, a microcontroller-based chaotic circuit of Lorenz equations is implemented. The circuit is made using cheap, rugged, easyto-use components such as microcontroller Arduino Mega 2560 R3 microcontroller, two DAC0808 digital to analog converters, two LM 741 Opamps, and with a few passive components. The microcontroller solves the Lorenz equation system differential equations numerically and sends two of the solved state-variables out as binary numbers throughout the digital ports to the DACs and, then using the DACs and the opamp-based inverting amplifiers, obtains their waveforms.
To do this, first, the microcontroller-based circuit of Lorenz system is simulated with Proteus TM . Some experience about chaotic waveforms is gained from the simulations and used to scale the state variables by adjusting the gains or the program constants. Then, the experimental circuit is assembled using cheap off-the shelves components on a breadboard and its chaotic waveforms in the time domain are obtained experimentally.
The remainder of this paper is organized as follows. The Lorenz equations are briefly told in the second section. The microcontroller-based circuit of Lorenz System is introduced, the circuit is simulated with Proteous TM , and its time-domain waveforms and phase portraits are given in the third section. Its experimental results are given in the fourth section. The conclusions are given in the final section.
where x, y and z are the state variables, t is time.  ,  , and  are the Lorenz system parameters. The system parameters are normally assumed to be positive. The Lorenz equations show chaotic behavior for σ = 10, ρ = 28 and β = 8/3. The parameter values are also used in this study.
The Lorenz system is simulated in Simulink TM toolbox of MATLAB TM using Runge-Kutta method in the time domain and the results are shown in Fig. 1, Fig. 2, Fig. 3.   In this section, Proteus TM schematic of the microcontrollerbased circuit of Lorenz system shown in Figure 1 is given. The circuit is made of an Arduino Mega 2560 R3 microcontroller, two DAC0808 digital to analog converters (DACs), and two LM741 Op-amp-based inverting amplifiers. State variables of the Lorenz equations, x, y, and z are solved numerically using Runge-Kutta method, only two of the state variables selected previously can be sent throughout the digital outputs to the DACs by the microcontroller due to the number of digital ports of the microcontroller. The circuit is simulated in Proteus. At the output of the inverting amplifiers fed by the DACs, the selected state-variables are obtained in timedomain as shown in Fig. 4. The output waveforms of the microcontroller-based chaotic circuit in the time domain are obtained from the Proteus simulations and they are shown in Fig. 5. Phase-portrait waveforms of the circuit are not given because of space considerations.

IV. EXPERIMENTAL RESULTS
The experimental results of the circuit are given in this section. The circuit shown in Fig. 4 is assembled and a photograph of the implemented circuit is given in Fig. 6. Experimental waveforms are acquired by a 60 MHz digital oscilloscope simultaneously. The experimental waveforms and strange attractors which are obtained during chaotic operation are presented respectively in Fig. 7 and Fig. 8. The microcontroller-based chaotic system of Lorenz equations is clearly able to demonstrate chaotic behavior and its waveforms resemble well results of the computer simulations as seen in Fig. 1, and Fig. 5. The butterfly shape of the strange attractors is also presented in Fig. 2

V. CONCLUSION
In this paper, an Arduino Mega 2560 R3 microcontrollerbased circuit of Lorenz system is designed. The circuit is able to form chaotic signals of Lorenz equations at the outputs of its inverting amplifiers. If its program is modified properly to adjust the Lorenz system parameters perhaps by using potentiometers connected to analog inputs of the microcontroller, their effect on its chaotic behavior can be investigated easily. Such a circuit which is made of off-the shelves components can be used for educational and research purposes.