1 Introduction

The concept of discrete-time map has a long history in chaos studies [1]. The logistic map [2] represents a paradigmatic example of this class of systems as it is able to generate a wide range of dynamical behavior, including bifurcations and chaos, on the basis of a single parameter. Recently, the interest in this area has been renewed [3, 4] with the definition of novel discrete maps for engineering applications, such as image encryption [5, 6] and image processing [7], or by including the discrete-time counterparts of innovative devices, such as memristors [8]. Methods for constructing discrete-time memristive chaotic maps have been recently studied in [9, 10]. In the latter case, the pinched hysteresis characteristic of a discrete-time memristor induces, in a rather mathematically simple map, various complex behaviors, including a transition from chaos to hyperchaos. The area of research on this topic is appealing and new efforts are also done considering maps that are inspired by quantum game theory [11].

Within the class of nonlinear discrete maps, a particular relevance are assuming spiking maps [12] since they are reliable models of digital neurons. With respect to neuron models in the continuous-time domain [13, 14], discrete-time neuron models [15] are, in fact, prone to digital implementations and practical applications. This topic is, therefore, of interest for several areas of research and application, such as neurocomputing and bioengineering. Recently, the efforts in realizing discrete-time spiking neurons have been reviewed in [16], where spiking maps derived by the neuron models, with emphasis on the Hodgkin–Huxley model, are presented. Indeed, simple models possessing a spiking behavior consistent with biological neuron observations have been introduced in [17], where an integrate-and-fire mechanism has been discovered in a simple map. The interest in this area of research has been also devoted to discover discrete-time models for particular neurons, like the olivo-cerebellar system [18]. Spiking maps are further useful both in modeling [19] and in studying networks behavior [20]. An interesting example of discrete-time neuron model is discussed in [19] where it is shown that a discrete-time memristor model provides the key ingredient for modeling magnetic effects on the bursting and firing behavior of biological neurons [21, 22]. From the point of view of studying nonlinear dynamics in discrete-time models of spiking neurons, the work [23] emphasizes bifurcations, chaos and the richness of the dynamical behavior emerging from spiking maps and in [24] the possibility to have a transition from quasi-period spiking to an hyperchaotic bursting is explored.

In this communication, we present a new second-order discrete-time map that presents a rich dynamical behavior. Its genesis is related to the two-cell continuous-time system studied in [25]. Moreover, the introduction of two novel parameters allows to sensibly increase the complexity embedded in its behavior and to propose a simple hardware implementation of its dynamics.

The paper is organized as follows. In Sect. 2, some preliminary details related to the two-cell continuous-time system are reported. In Sect. 3, the new discrete-time nonlinear map is introduced, discussing the properties of its equilibrium points, while Sect. 4 proposes an intense numerical bifurcation analysis in order to explain into details the emergence of the rich dynamics, also in terms of firing behavior. In Sect. 5, the spiking dynamics of the proposed system is discussed providing a strategy based on the injection of noise to trigger the spiking behavior in the stability regions of the parameter space. Moreover, Sect. 6 is dedicated to the experimental results derived from the simple implementation of the map obtained by using a low-cost microcontroller and Sect. 7 draws the concluding remarks.

2 The two-cell nonlinear system

Let us consider the following set of nonlinear differential equations

$$\begin{aligned} \begin{array}{l} {\dot{x}}_1=-x_1+\left( 1+\mu \right) y_1-sy_2+i_1 \\ {\dot{x}}_2=-x_2+sy_1+\left( 1+\mu \right) y_2+i_2 \end{array} \end{aligned}$$
(1)

where

$$\begin{aligned} y_i=\frac{1}{2}\left( |x_i+1|-|x_i-1|\right) \end{aligned}$$
(2)

It represents a second-order continuous-time nonlinear system originally introduced in [26] with the aim of extending the paradigm of reaction–diffusion cellular nonlinear networks (RD-CNN). It originates from the so-called Nossek cell [27] with the inclusion of the two external currents \(i_1\) and \(i_2\) whose effect impacts on the existence and stability properties of the equilibria [25]. The system in Eq. (1) finds important practical applications in control as it is used as the core of central pattern generators to control the gait of hexapod robots [28].

The conditions under which the system in Eq. (1) oscillates have been detailed in [25]. In particular, the concurrent presence of virtual and real equilibria, imposed by the external currents, ensures a limit cycle oscillation for \(0<\mu <s\) and \(|i_i|<1\). Without loss of generality, in the following we will fix the parameters of the two-cell system according to [25, 28] as \(\mu =0.7\), \(s=1\), \(i_1=-i_2=-0.3\). For this set of parameters, the peculiar slow-fast dynamics appears, as shown in Fig. 1, as a consequence of the slow evolution toward the virtual equilibrium, followed by a fast evolution away from the virtual equilibrium, thus generating an homoclinic orbit during which the dynamic flow undergoes sudden variations in the rate of the state-variables change.

Fig. 1
figure 1

Behavior of the two-cell system in Eq. (1) with nonlinearity (2) for \(\mu =0.7\), \(s=1\), \(i_1=-i_2=-0.3\): a temporal evolution and b phase-portrait (circles allow to identify the slow-fast rate of state-variables change)

Let us now consider, instead of the piece-wise linear function (2), a continuous and differentiable nonlinearity such as

$$\begin{aligned} y_i=\tanh {\alpha x_i} \end{aligned}$$
(3)

This leads to the introduction of a further parameter \(\alpha \) which provides the system with an interesting feature. The slow-fast dynamics in fact, yet being preserved for \(\alpha \in \left[ 0.65, 1.66\right] \), can be modulated by tuning \(\alpha \), as shown in Fig. 2. This introduces an integrate-and-fire like behavior, where one variable assumes the role of action potential and the other assumes the role of a recovery variable.

Fig. 2
figure 2

Behavior of the two-cell system in Eq. (1) with nonlinearity (3) for \(\mu =0.7\), \(s=1\), \(i_1=-i_2=-0.3\): a temporal evolution and b phase-portrait for \(\alpha =0.9\) (dash-dot orange line), \(\alpha =1\) (dash red line) and \(\alpha =1.6\) (continuous green line). Circles on the green trajectory are shown to identify the slow-fast rate of state-variables change. (Color figure online)

Thus, the system in Eq. (1) with nonlinearity as in (3) can be considered a novel model for spiking behavior. The analogy with the Morris–Lecar neuron model should be noticed [29], where the same type of nonlinearity is considered.

3 The two-cell spiking map

Let us now consider the Euler discretization with \(t=kT\) of the dynamics in Eq. (1) with nonlinearity (3) as:

$$\begin{aligned} x_1(k+1)= & {} x_1(k)+T\left[ -x_1(k)+\left( 1+\mu \right) y_1(k)-sy_2(k)+i_1\right] \nonumber \\ x_2(k+1)= & {} x_2(k)+T\left[ -x_2(k)+sy_1(k)+\left( 1+\mu \right) y_2(k)+i_2\right] \nonumber \\ \end{aligned}$$
(4)

with

$$\begin{aligned} y_i(k)=\tanh {\alpha x_i(k)} \end{aligned}$$
(5)

The discrete-time system described in (4) maintains the periodic spiking behavior observed in (1) for small values of T, as shown in Fig. 3 where the map iterations and the trajectory in the \(x_1-x_2\) plane are reported for \(T=0.1\) and different values of \(\alpha \).

Fig. 3
figure 3

Spiking behavior of the discrete-time system in Eqs. (4)–(5) for \(T=0.1\): a temporal evolution and b phase-portrait for \(\alpha =0.9\) (blue), \(\alpha =1\) (red), and \(\alpha =1.6\) (green). (Color figure online)

Moreover, Eq. (4) can be considered a nonlinear discrete-time map with T acting as a further parameter. Varying T, in fact, the behavior of system (4) with nonlinearity (5) drifts from that of system (1) with nonlinearity (3), showing the birth of bifurcation scenarios leading to a complex, yet spiking and bursting, behavior.

In the following, we will keep constant the parameters of the original continuous-time two-cell system, i.e., \(\mu =0.7\), \(s=1\), \(i_1=-0.3\) and \(i_2=0.3\), and investigate the dynamical behavior emerging in the parameter space \(T-\alpha \).

Let us start from determining the location of the equilibria of the discrete-time map, by imposing the conditions \(x_1(k+1)=x_1(k)\) and \(x_2(k+1)=x_2(k)\). This leads to the following system of nonlinear equations

$$\begin{aligned} x_1(k)+T\left[ -x_1(k)+\left( 1+\mu \right) y_1(k)-sy_2(k)+i_1\right] =x_1(k) \nonumber \\ x_2(k)+T\left[ -x_2(k)+sy_1(k)+\left( 1+\mu \right) y_2(k)+i_2\right] =x_2(k)\nonumber \\ \end{aligned}$$
(6)

and thus the equilibria must satisfy the equations

$$\begin{aligned}{} & {} -x_1(k)+\left( 1+\mu \right) y_1(k)-sy_2(k)+i_1=0 \nonumber \\{} & {} -x_2(k)+sy_1(k)+\left( 1+\mu \right) y_2(k)+i_2=0 \end{aligned}$$
(7)

The first consideration is that the equilibria of system (4) are independent of T. Being the nonlinearities in (7) transcendental functions, the solutions can be derived more efficiently by using a graphical approach based on plotting the nullclines (7) and detecting the intersection points. The nullclines for \(\alpha =1\), \(\alpha =1.666\) and \(\alpha =1.8\) are reported in Fig. 4 showing a transition from one to three and then to five distinct equilibria. The location of the equilibria with respect to \(\alpha \) retrieved by adopting this method is shown in Fig. 5.

Fig. 4
figure 4

Nullclines for different values of \(\alpha \): a \(\alpha =1\), the single intersection corresponds to a unique equilibrium; b \(\alpha =1.666\), three intersection corresponding to three equilibria; c \(\alpha =1.8\), five intersection corresponding to five equilibria

Fig. 5
figure 5

Coordinates of the equilibria with respect to \(\alpha \)

As concerns the stability analysis, it appears evident that this depends also on the parameter T. In fact, the Jacobian matrix of (4) reads as

$$\begin{aligned} \textrm{J}=\left[ \begin{array}{cc} 1-T\left( \left( 1+\mu \right) \alpha \left( \tanh ^2{\alpha x_1}-1\right) +1\right) &{} T\alpha \left( \tanh ^2{\alpha x_2}-1\right) \\ -T\alpha \left( \tanh ^2{\alpha x_1}-1\right) &{} 1-T\left( \left( 1+\mu \right) \alpha \left( \tanh ^2{\alpha x_2}-1\right) +1\right) \end{array}\right] \end{aligned}$$
(8)

By inspecting the modulus of the eigenvalues of \(\textrm{J}\) evaluated on each equilibria, it is possible to determine their stability as a function of T and \(\alpha \). According to this criterion, in Fig. 6 the regions in the parameter space \(T-\alpha \) in which the system (4) admits one, two or no stable equilibria are reported.

Fig. 6
figure 6

Number of stable equilibria in the parameter space \(T-\alpha \). The different colored regions indicate the transitions among one, two or no stable equilibria

4 Numerical bifurcation analysis

The two-cell discrete-time map introduced in this paper displays a plethora of complex dynamical behavior when varying the two parameters \(\alpha \) and T. In this section, we aim at investigating numerically the bifurcation routes to chaos and the peculiar behavior of the system.

The numerical investigation on the system behavior is performed by inspecting the bifurcation diagrams with respect to the two parameters and reporting the corresponding maximal Lyapunov exponent \(\lambda _{\max }\). The Lyapunov spectrum has been calculated by considering the Jacobian matrix in (8) and adopting the algorithm described in [30] to avoid ill conditioning and consequent numerical problems [31].

Let us investigate at first the bifurcation scenario with respect to T. According to Fig. 6, we can focus on three values of \(\alpha \) for which the transition between different stability regimes can be observed. For \(\alpha =0.5\), the system moves from one stable equilibrium to no stable equilibria when increasing T. When \(\alpha =1.2\), the system admits no stable equilibria for all T. Finally, for \(\alpha =1.8\) the system undergoes a transition between two stable equilibria and no stable equilibria.

The bifurcation diagram and the maximal Lyapunov exponent with respect to T when \(\alpha =0.5\) is reported in Fig. 7a. They show the birth of quasi-periodic toroidal oscillations [32], characterized by \(\lambda _{\max }=0\), occurring when the stable equilibrium disappears. Eventually, the tori collapse onto periodic oscillations, also displaying odd periodicity.

For \(\alpha =1.2\), chaotic and periodic windows appear along the considered range of T, showing the complex bifurcations cascade of periodic oscillations with increasing periodicity leading to the onset of a chaotic regime, as reported in Fig. 7b.

The bifurcation route for \(\alpha =1.8\) obtained varying T reflects in the bifurcation diagram reported in Fig. 7c. A period-doubling route sets on giving birth to a sustained chaotic behavior with high values of \(\lambda _{\max }\).

Fig. 7
figure 7

Bifurcation diagrams (upper panel) and maximal Lyapunov exponent \(\lambda _{\max }\) (lower panel) with respect to T: a \(\alpha =0.5\); b \(\alpha =1.2\); c \(\alpha =1.8\)

The behavior of the system with respect to Fig. 6 can be further explored by fixing T and varying \(\alpha \). In this case, there are two possible scenarios to be investigated, since the variation of \(\alpha \) leads to the transition from one to none and then to two stable equilibria for \(T<2\), while for \(T\ge 2\) the system admits one or none stable equilibria when \(\alpha \) varies. The two complex bifurcation routes corresponding to these scenarios are reported in Fig. 8. The diagram for \(T=1.6\) (Fig. 8a) shows the transition between the single stable equilibrium to a toroidal regime, with \(\lambda _{\max }=0\), which eventually collapse onto a series of periodic oscillations with even and odd periodicity, followed by the transition to a wide window of chaos. The presence of two stable equilibria for \(\alpha >1.65\) leads to a multistable behavior in which, along with the two stable equilibria, a period-4 cycle can be retrieved, depending on the initial conditions. When \(T=2.3\) (see Fig. 8b), the toroidal oscillations are soon replaced by the birth of a first chaotic attractor, that coexists with a period-4 oscillation, as reported, for \(\alpha =0.56\), in Fig. 9. Further increase in \(\alpha \) leads to a novel periodic window originating a chaotic behavior, followed by an odd periodic window creating a route to a further chaotic window. Therefore, two different routes to chaos appear with respect to same parameter \(\alpha .\)

Fig. 8
figure 8

Bifurcation diagrams (upper panel) and maximal Lyapunov exponent \(\lambda _{\max }\) (lower panel) with respect to \(\alpha \): a \(T=1.6\), different color branches represent coexisting attractors with initial conditions: \(x_1(0)=-1\), \(x_2(0)=-1\) for the behaviors in red; \(x_1(0)=4\), \(x_2(0)=-1\) for the fixed-point behavior in black; \(x_1(0)=-4\), \(x_2(0)=-1\) for the period-4 oscillation in blue; b \(T=2.3\), different color branches represent coexisting attractors with initial conditions: \(x_1(0)=-1\), \(x_2(0)=-1\) for the behaviors in red; \(x_1(0)=-1\), \(x_2(0)=4\) for the period-4 oscillation in blue. (Color figure online)

Fig. 9
figure 9

Multistable behavior in the two-cell map for \(T=2.3\) and \(\alpha =0.56\). Initial conditions: \(x_1(0)=-1\), \(x_2(0)=-1\) for the behavior in red; \(x_1(0)=-1\), \(x_2(0)=4\) for the period-4 oscillation in blue. (Color figure online)

It is interesting to note that the behavior of the map occurring for \(T=2.3\) and \(\alpha =1.7\) is intermittent, i.e., alternates between two different chaotic behaviors, as reported in Fig. 10a. Intermittency is robust with respect to the initial conditions, as shown in Fig. 10b. The presence of intermittency, as it occurs in other discrete-time maps [3], is linked to the odd periodic cycles observed in the considered area of the parameter space.

Fig. 10
figure 10

Intermittency in the two-cell map for \(\alpha =1.7\) and \(T=2.3\): a intermittent behavior between chaotic dynamics (left panel) and particular of the internal attractor (right panel); b intermittency for ten different initial conditions chosen randomly from a Gaussian distribution with variance \({\bar{sigma}}=4\) and mean value \({\bar{\mu }}=0\)

The system in Eq. (4) with nonlinearity (5) is able to generate a wide plethora of non-trivial dynamical behavior. Interestingly, the dynamics of the system make it suitable for modeling spiking neurons. Its behavior, in fact, can be opportunely tuned by acting on system parameters \(\alpha \) and T to show different firing patterns. In Fig. 11, we report the transition from a quasi-periodic spiking to a chaotic bursting observable when \(T=2.3\) and increasing \(\alpha \). The quasi-periodic torus obtained for \(\alpha =0.45\), in fact, displays a quasi-periodic spiking pattern that becomes periodic for \(\alpha =0.5\). Chaotic spiking occurs for \(\alpha =1.4\), whose firing behavior is modulated by further increasing \(\alpha \) until the emergence of an intermittent chaotic spiking behavior for \(\alpha =1.7\). Increasing \(\alpha \) has now the effect of passing from a spiking firing pattern to a bursting firing pattern, either periodic or chaotic. More specifically, a periodic bursting is obtained when \(\alpha =2.15\), while a chaotic bursting appears for \(\alpha =2.2\).

Fig. 11
figure 11

Firing patterns of state variable \(x_1\) for different values of \(\alpha \). From top to bottom: quasi-periodic spiking (\(\alpha =0.45\)); periodic spiking (\(\alpha =0.5\)); chaotic spiking (\(\alpha =1.4\)); intermittent chaotic spiking (\(\alpha =1.7\)); periodic bursting (\(\alpha =2.15\)); chaotic bursting (\(\alpha =2.2\))

In order to provide an insight on the system behavior when varying both parameters T and \(\alpha \), the maximal Lyapunov exponent has been evaluated in the parameter space \(T-\alpha \). The diagram reported in Fig. 12 confirms the occurrence of several regions of chaos.

Fig. 12
figure 12

Maximum Lyapunov exponent calculated in the parameter space \(T-\alpha \). Initial conditions: \(x_1(0)=-1\), \(x_2(0)=-1\)

5 Noise-induced spiking behavior

The spiking dynamics of neuron models is often characterized by the so-called interspike interval (ISI), defined as the time-span between two successive spikes. Since both the continuous-time system (1) with nonlinearity (3) and its discrete-time counterpart (4) with nonlinearity (5) have a spiking behavior depending on \(\alpha \), the ISI has been evaluated for the latter for different values of \(\alpha \), as reported in Fig. 13 where the direct effect of the introduction of this parameter on the modulation of the spiking dynamics is shown. The spiking behavior disappears for \(\alpha >1.66\).

Since the discrete-time system (4) is the Euler discretization of the continuous-time dynamics (1), even decreasing T the behavior of the map reaches an equilibrium when \(\alpha >1.66\), as confirmed in Fig. 14a for \(\alpha =1.7\).

In order to guarantee a spiking behavior in the system (4) with nonlinearity (5) in a wider range of the parameter \(\alpha \), we can introduce a random perturbation in Eq. (4) as:

$$\begin{aligned} \begin{aligned} x_1(k+1)=&x_1(k)+T\left( -x_1(k)+\left( 1+\mu \right) y_1(k) -sy_2(k)+i_1+\eta \xi _1(k)\right) \\ x_2(k+1)=&x_2(k) +T\left( -x_2(k)+sy_1(k) +\left( 1+\mu \right) y_2(k)+i_2+\eta \xi _2(k)\right) \end{aligned} \end{aligned}$$
(9)
Fig. 13
figure 13

Interspike interval, in samples, for the spiking dynamics of the system in Eq. (4) with nonlinearity (5) with respect to \(\alpha \), when \(T=0.1\)

where \(\xi _1\) and \(\xi _2\) are random processes with uniform distribution in the range \([-1,1]\) and \(\eta \) is the noise level. The effect is to perturb the stability of the coexisting equilibria, thus triggering the slow-fast dynamics responsible for the spiking behavior. The effect of the injected noise is shown in Fig. 14b, in which the behavior of the system for \(T=0.1\) and \(\alpha =1.7\) is perturbed with a noise level \(\eta =0.5\).

In order to determine the effectiveness of the noise perturbation, the ISI has been evaluated for three different values of the noise level, varying \(\alpha \). In Fig. 15, the average value of the ISI as a function of \(\alpha \) is reported for \(\eta =0\), \(\eta =0.3\), and \(\eta =1\). The range of \(\alpha \) triggering a spiking dynamics is larger, the higher is the level of noise. The cost, however, is also to increase the variability of the ISIs.

This erratic behavior of the interspike interval occurring in the two-cell map when subjected to the random process, led us to investigate the variability of the distribution of the ISIs, which is clearly affected by the presence of the noise, as a function of \(\eta \). To this aim, the ISIs have been evaluated fixing \(T=0.1\) and \(\alpha =1.7\), and varying \(\eta \), as shown in the diagram reported in Fig. 16a, where the continuous line marks the average ISI for each value of the noise level. The spiking behavior is triggered for \(\eta >0.3\), and the distribution of ISIs becomes more regular when \(\eta \) increases. This latter consideration can be further verified by giving a measure to the variability of the ISIs. Hence, we investigated the coherence of ISIs distribution computing the coefficient of variation (\(C_\textrm{V}\)) for the ISIs series obtained for different values of \(\eta \), fixing \(T=0.1\) and \(\alpha =1.7\), as

$$\begin{aligned} C_{V}=\frac{\sigma _\textrm{ISI}}{\mu _\textrm{ISI}} \end{aligned}$$
(10)
Fig. 14
figure 14

Behavior of the two-cell map for \(T=0.1\) and \(\alpha =1.7\): a stable behavior when \(\eta =0\); b spiking behavior when \(\eta =0.5\)

Fig. 15
figure 15

Interspike interval, in steps, for the spiking dynamics of the system in Eq. (4) with nonlinearity (5) with respect to \(\alpha \), when \(T=0.1\), and for \(\eta =0\) (average in continuous line), \(\eta =0.5\) (average in dashed line) and \(\eta =1\) (average in dash-dotted line)

where \(\sigma _\textrm{ISI}\) and \(\mu _\textrm{ISI}\) are, respectively, the standard deviation and the mean value of the retrieved ISIs series. The \(C_\textrm{V}\) is reported in Fig. 16b as a function of \(\eta \). The increase of the noise level leads to a non-trivial reduction of the variability of the ISI distribution. This is a consequence of the nature of the two-cell map for \(\alpha =1.7\) and \(T=0.1\), i.e., the coexistence of two stable equilibria. The noise, in fact, triggers the spiking behavior thanks to the interplay of the two equilibria providing an oscillation among them with an intrinsically periodic nature.

Fig. 16
figure 16

Inducing spiking behavior with noise. a Bifurcation diagram with respect to \(\alpha \) on the ISI for \(T=0.1\): three levels of noise are considered \(\eta =0\) (in blue), \(\eta =0.5\) (in red), and \(\eta =1\) (in black). Lines indicate the average value of the ISI. b Bifurcation diagram with respect to \(\eta \) and c coefficient of variation \(C_\textrm{V}\) with respect to \(\eta \), when \(\alpha =1.7\) and \(T=0.1\). (Color figure online)

6 Experimental results

In this section, the implementation of an electronic circuit aimed at realizing the two-cell discrete-time system introduced in this paper is presented. Discrete-time systems can be easily implemented in digital computing devices, with the only constraint of the digit precision. However, we want to implement a hybrid digital/analog circuit which produces an output voltage following the dynamics of the two-cell map in (4).

The circuit is based on the microcontroller board Arduino\(^\circledR \) UNO. It is a multipurpose board equipped with an ATMEL 32bit ARM-based processor, interfaced with an analog-digital converter and a serial/USB interface. It is fully programmable via an integrated development environment in C/C++.

The microcontroller is programmed implementing the iterator (4) with nonlinearity (5), and the two variables, coded as 8-bit words, are sent through the digital output of the board. These digital signals are then converted to an analog voltage by means of a standard \(R-2R\) digital-to-analog converter. Arduino pins from 2 to 9 are used to produce the eight digits of the 8-bit word. The \(R-2R\) digital-to-analog converter is realized on a breadboard, following the schematic reported in Fig. 17. Wires connect the output pins of the Arduino\(^\circledR \) board with the inputs of the converter in such a way that the most significant bit (corresponding to pin 2) is connected to the first resistor R, and so on. The complete experimental setup is shown in Fig. 18.

Fig. 17
figure 17

Digital-to-analog converter based on the \(R-2R\) configuration with output buffer: \(R=10\;\hbox {k}\Omega \), TL-084 operational amplifiers powered with a dual voltage supply \(V_\textrm{s}=\pm 9\,\hbox {V}\)

Fig. 18
figure 18

Complete setup for the logistic map microcontroller implementation with the Arduino\(^\circledR \) board and the \(R-2R\) converter implemented on the breadboard

The microcontroller is programmed with the code reported in the “Appendix A.”

The hybrid circuit reveals to be effective in reproducing the behavior of the two-cell map, even in the 8-bit implementation. In Fig. 19a, b, the periodic behavior of the map is reported obtaining the period-5 cycle, for \(\alpha =0.5\) and \(T=2.3\), and period-12 cycle, for \(\alpha =1.2\) and \(T=1.4\). The intermittency corresponding to \(T=2.3\), and \(\alpha =1.7\), and the chaotic behavior produced by the circuit with \(T=2.3\), and \(\alpha =1.8\) are reported in Fig. 20a, b, respectively.

Fig. 19
figure 19

Behavior of the hybrid circuit implementing the two-cell map: a period-5 for \(\alpha =0.5\) and \(T=2.3\); b period-12 for \(\alpha =1.2\) and \(T=1.4\)

Fig. 20
figure 20

Behavior of the hybrid circuit implementing the two-cell map: a intermittency for \(\alpha =1.7\) and \(T=2.3\); b chaos for \(\alpha =1.8\) and \(T=2.3\)

Comparing the obtained signals with the numerical simulation, a perfect match as regards the dynamic behavior can be observed. Differences in the signal shape can be noticed, due to the characteristics of the microcontroller implementation. The first macroscopic difference is that the values assumed by the iterator, and then converted to an analog voltage, are not instantaneous but are maintained for a finite amount of time. This time consists in the duration of each loop cycle that depends on the complexity of the executed code and on the delay introduced in the main code (see “Appendix A”). The delay is introduced in order to ensure that the main clock of the microcontroller completes a cycle and the digital output is correctly updated. The second difference stands in the amplitude of the analog voltage, that is constrained in the range \(\left[ 0\text {V}, 5\text {V}\right] \). This means that when producing the digital output corresponding to the value assumed by the state variable \(x_1\) at each step, it must be adequately scaled (see “Appendix A”). These differences, however, do not impact on the capability of the hybrid circuit to reproduce the dynamical features of the introduced discrete-time neuron model.

Fig. 21
figure 21

Behavior of the hybric circuit implementing the two-cell map: (a) spiking behavior obtained thanks to the injection of noise when \(\alpha =1.7\), \(T=0.1\), and \(\eta =0.5\); (b) experimental bifurcation diagram of the ISI with respect to \(\eta \)

The circuit allows also to investigate the triggering of the spiking behavior as a consequence of the introduction of a random process. This needs a reformulation of the code used to program the microcontroller, as detailed in the “Appendix B.”

The spiking behavior obtained thanks to the injection of noise is reported in Fig. 21a when \(\alpha =1.7\), \(T=0.1\) and \(\eta =0.5\). Moreover, the experimental bifurcation diagram related to the ISI with respect to \(\eta \) is reported in Fig. 21b, showing a perfect match with the numerical results in Fig. 16a, despite the peculiarity of the output analog voltage outlined above.

7 Conclusions

Spiking models play a crucial role in the definition of future paradigms for intelligent learning and artificial intelligence. In order to ensure a straightforward implementation on smartdevices and microcontrollers, discrete-time models with spiking and bursting behavior are fundamental. The importance of discrete-time nonlinear maps is also related to their capability of aiding in modeling identification from experimental data, where sampled data can be directly classified.

In this paper, we proposed a second-order discrete-time map originated from a well-established continuous-time model with a slow-fast spiking dynamics. Rather than being a mere discretization of a continuous dynamics, the proposed system springs a non-trivial quantity of complex dynamics and a generally richer dynamical behavior with respect to the continuous-time counterpart. The use of the discretization step T as a further system parameter allows the discrete-time case to easily achieve strange behavior, including chaos, intermittency, cycles with odd and even periodicity, and even multistability in spiking dynamics. A transition from quasi-periodic to periodic spiking, and then to chaotic spiking, intermittency and bursting behavior can be achieved by tuning a single parameter.

Another crucial aspect is that the introduced model presents several regions in the \(T-\alpha \) parameter space in which the coexistence of different behavior occurs. This characteristic makes the neuron model capable of reacting differently in the presence of different initial conditions, thus performing a classification. As the original continuous-time model has been adopted to design robust central patter generators for bio-inspired mobile robots [33], the discrete-time spiking neuron model here introduced can be considered in the context of practical applications on a robotic platform. Under this perspective, the multistable behavior observed may be exploited to allow different robot reactions in the presence of different environmental stimuli suitably mapped onto the dynamics initial conditions.

The possibility of modulating the spiking dynamics through a single parameter and the efficacy of noise in triggering a spiking behavior make the proposed system a realistic neuron model that can be adopted in novel spiking neural network architectures.