1 Introduction

Chaotic systems have received widespread attention due to their inherent characteristics, such as unpredictability, non-periodicity, and initial value sensitivity. Therefore, they are extensively applied in different fields, including meteorology [1], biology [2,3,4], chemistry [5,6,7], economics [8,9,10], chaotic cryptography [11,12,13] and so on. To implement chaotic systems, one approach is to use nonlinear devices and specific circuit topologies to configure and generate chaotic behavior, which are commonly known as analog chaotic systems. However, it is difficult to implement because they are easily affected by noise, parasitic effects, and burrs. The other is to employ digital circuit devices such as microcontrollers or FPGA to implement chaotic systems, which are referred to as digital chaotic systems. However, due to finite computational precision, digital chaotic systems will undergo dynamical degradation, severely restricting their practical applications.

There exist two principal directions for overcoming the dynamical degradation of digital chaotic maps. One is to construct high-performance chaotic maps through some control methods, such as parallel chaotification [14], nonlinear function coupling [15, 16], mathematical transformation [17,18,19], etc. Liu et al. [14] used a parallel structure to construct reinforced chaotic maps, greatly improving the complexity of the system. Hua et al. [16] used Sine function to cascade multiple chaotic seed maps and constructed a more powerful chaotic map, which have a larger chaotic range, better complexity, and unpredictability. Fan et al. [17] constructed the high-dimensional chaotic maps by using mathematical transformations, which can generate desired positive Lyapunov exponents. Although these chaotic maps have more complex dynamical characteristics, they still undergo dynamical degradation at low precision.

Another type of method is to apply anti-degradation treatment to the chaotic maps. The commonly used methods include (1) Improving computational precision [20, 21]: Using higher precision devices to construct chaotic maps can effectively extend their cycles, but it will significantly increase implementation costs. (2) Switching multiple chaotic maps [22,23,24]: Switching to another chaotic map when a periodic state occurs can effectively extend the period length, but often results in non-ideal distribution characteristics of the switched chaotic system. (3) Delay introducing method [25, 26]: Introducing a delay part to control the parameters or states of the system is equivalent to expand the dimension of the chaotic map. It effectively enhances its complexity, but the improvement effect is generally limited. (4) Error compensation method [27, 28]: Applying state error compensation to the input of a chaotic map greatly improves its dynamical degradation. However, due to the constraints of mathematical theorems, it is still unable to expand into high-dimensional spaces. (5) Analog and digital mixing [29,30,31]: Modulating digital chaotic systems by using analog chaotic systems to enhance the randomness of their trajectories. It can effectively improve system complexity and resist dynamical degradation, but its implementation cost is high, and it is prone to noise interference. (6) Bit inversion [32, 33]: Inverting the decimal part of a chaotic map to increase its complexity. It can achieve more precise control by bit operation, but it requires higher implementation costs. (7) Perturbation method [34,35,36]: By introducing external random sources like m-sequences or chaotic sequences to perturb system parameters or states, it achieves a significant improvement in system performance. However, it has a few deficiencies, such as the instability of the random source and the high costs associated with implementation.

To effectively address the issue of dynamical degradation in digital chaotic maps at a low cost, we propose a novel internal perturbation (InP) method. The system parameters are perturbed by nonlinear functions that couple the system states and iteration times. Under low precision, both low-dimensional and high-dimensional maps are subjected to anti-degradation treatment, and their Lyapunov exponents, trajectories, phase diagrams, auto-correlation, complexity, period lengths and sensitivity are compared and analyzed. The experiment results demonstrate that the InP method efficiently counteract the dynamical degradation of digital chaotic maps. Finally, the improved chaotic maps are implemented by FPGA and a novel pseudo-random sequence generator (PRNG) which operates at finite computational precision is designed to perform the NIST testing.

The structure of this paper is as follows. Section 2 introduces the InP method. In Sect. 3, the numerical experiments are conducted on the improved chaotic maps. In Sect. 4, we implement the improved chaotic maps by FPGA and apply them to PRNG. Finally, we summarize this paper and indicate the future directions.

2 Internal perturbation method

2.1 Digital chaotic maps

A discrete chaotic map is defined by

$$\begin{aligned} x_{i+1}=F\left( x_i\right) , \end{aligned}$$
(1)

where \(x_i \in \Omega \) is the state value of the map, and \(F: x_i \rightarrow x_{i+1}\) is a chaotic map.

When we confine it to finite computational precision, the chaotic domain \(\Omega \) is quantized uniformly to the finite domain \(\Omega _d\):

$$\begin{aligned} \Omega _d=\left\{ x_i \mid x_i=k \cdot 2^{-d}, k=0,1, \ldots , 2^d-1\right\} , \end{aligned}$$
(2)

where d is the calculation precision.

Then, the chaotic map is digitized as

$$\begin{aligned} x_{i+1}=U Q \circ F\left( x_i\right) , \end{aligned}$$
(3)

where \(x_i \in \Omega _d\), UQ (Uniform Quantization): \(\Omega \rightarrow \Omega _d\) denotes equidistant quantization of the chaotic map. Here, we choose floor(x) as the quantitative function, where floor(x) represents taking an integer down from x. The quantization process can be represented as \(U Q \circ x = floor (x \cdot 2^d) / 2^d\).

2.2 Principle of the internal perturbation method

This method only processes the parameters, and the system phase space has not been destroyed after experiments. So it can be considered as a remedial measure rather than generating a new random source [37]. The principle block diagram of the InP method is shown in Fig. 1. When a chaotic map is iterated, its states and iteration times continually change, and they are combined to obtain a new source

$$\begin{aligned} r_i=U Q \circ \left( x_i \cdot i\right) . \end{aligned}$$
(4)

By using a nonlinear function to confine \(r_i\) within the finite range, we have obtained an internal perturbation factor

$$\begin{aligned} k_i=m_1-m_2+m_2 \times \sin \left( r_i\right) \text{, } \end{aligned}$$
(5)

where parameter \(m_1\) and \(m_2\) are used to adjust the range of \(k_i\), which meet \(m_1> m_2 / 2 > 0\), so \(k_i \in (m_1-2m_2, m_1)\). With each iteration of the chaotic map, it continues to oscillate. By replacing a parameter of the chaotic map with it, we obtain an improved chaotic map

$$\begin{aligned} x_{i+1}=U Q \circ \left( F\left( x_i, k_i\right) \right) . \end{aligned}$$
(6)

3 Experiments and discussions

In this section, we conduct anti-degradation treatment on several typical low-dimensional and high-dimensional chaotic maps by using InP method, and then obtain the improved chaotic maps. Subsequently, the comparative analyses are conducted with original chaotic maps, digital chaotic maps, and the improved chaotic maps processed by other anti-degradation methods [24, 25, 32, 37, 38].

Fig. 1
figure 1

Principle block diagram of the InP method

3.1 Improved Logistic map

3.1.1 Definition

The digital Logistic map is defined by

$$\begin{aligned} x_{i+1}=U Q \circ \left( \mu \cdot x_i \cdot \left( 1-x_i\right) \right) , \end{aligned}$$
(7)

where \(\mu \in (3.5699,4]\) is the parameter. To resist the dynamical degradation caused by finite computational precision, we apply the InP method for anti-degradation treatment

$$\begin{aligned} x_{i+1}=U Q \circ \left( k_i \cdot x_i \cdot \left( 1-x_i\right) \right) , \end{aligned}$$
(8)

where \(k_i\) is determined by Eq. (5), and we choose \(m_1 = 4\) and \(m_2 = 1.15\). In this case, the range of parameters \(k_i\) is (1.7, 4). Next, we conduct anti-degradation analysis on the improved Logistic map.

3.1.2 Lyapunov exponents analysis

The Lyapunov exponent (LE) is an indicator that measures the degree of divergence of adjacent trajectories, and is commonly used to describe how small perturbations evolve over time in nonlinear systems. Generally, When the maximum LE of the system is positive, it indicates chaos. However, for digital chaotic maps, due to the finite computational precision, the trajectory may degenerate into a fixed point or a limit cycle. Wolf et al. [39] proposed a method to calculate the LE based on time series analysis. We set the computational precision \(d = 8\), with the parameter \(m_1 = 4\), and analyze the LE of system (8) as the parameter \(m_2\) varies, as shown in Fig. 2. It shows that as \(m_2\) changes from 0 to 1.2, the variation range of the system parameter \(k_i\) expands from fixed value 4 to [1.6, 4], and the LE of the system is still positive. It proves that even in low precision, the improved Logistic map remains chaotic. In addition, the parameter range of the original Logistic map is (3.5699, 4], while the improved Logistic map expands the parameter range to [1.6, 4]. Our method not only ensures that the system is still chaotic at 8-bit precision, but also expands the parameter range.

Fig. 2
figure 2

LE values of the improved Logistic map

Fig. 3
figure 3

The trajectories of the two chaotic maps. a Digital Logistic map. b Improved Logistic map

Fig. 4
figure 4

The phase diagrams of the three chaotic maps. a Original Logistic map. b Digital Logistic map. c Improved Logistic map

3.1.3 Trajectory and phase diagram analysis

We set the initial value \(x (0) = 0.3\), and the computational precision \(d = 8\). For digital chaotic maps, their trajectories often exhibit periodic behavior. We compare and analyze the trajectories of the digital Logistic map (system (7)) and the improved Logistic map (system (8)), as shown in Fig. 3. It shows that the digital Logistic map reach a cyclic state after about 15 iterations and the cycle length is 4, but in Fig. 3b, the improved Logistic map exhibits a complex trajectory and still presents an aperiodic state.

The phase space of the chaotic map reflects the correlation between adjacent iterations, and its phase diagram provides a visual way to understand the behavior of the chaotic map. The wider and more uniform the distribution range of the phase diagram, usually indicates that the system has better ergodicity. The phase diagrams of the original Logistic map, digital Logistic map, and improved Logistic map are compared and analyzed in Fig. 4. Figure 4b illustrates that the digital Logistic map’s phase space is compressed, and degenerates into several discrete fixed points, and the system’s ergodicity severely decreases. The original Logistic map’s phase diagram is shown in Fig. 4a, which is a convex parabola. In Fig. 4c, the improved Logistic map not only retains the convex parabola structure, but also further expands the domain of attraction and enhances its ergodicity. It indicates that the InP method can effectively expand the attraction domain of the chaotic maps.

3.1.4 Auto-correlation analysis

We set the computational precision \(d=8\), and conduct auto-correlation analysis on the two chaotic maps, as shown in Fig. 5. In Fig. 5a, the digital Logistic map shows extremely strong correlation, but in Fig. 5b, the improved Logistic map’s auto-correlation graph shows an ideal delta shape, indicating that the InP method can enable chaotic maps to maintain weak auto-correlation even at low precision.

3.1.5 Approximate entropy analysis

Approximate entropy (ApEn) is an index used to analyze sequence to describe the irregularity of systems. In general, as the ApEn value increases, the chaotic system becomes more complex. We compare the InP method with four existing methods: (1) Bi-coupling (BC) method [24]. (2) Delay-introducing (DI) method [25]. (3) Bit reversal (BR) method [32]. (4) Period detection disturbance (PD) method [38]. We set the the phase space dimension \(m=2\), and the similarity tolerance limit \(r=0.1\), and the results are shown in Fig. 6. At low precision, the improved Logistic map’s ApEn value is stable around 1.5, and is far superior to the other four methods. It shows that our method can significantly improve system complexity.

3.1.6 Permutation entropy analysis

Permutation entropy (PE) complexity is commonly employed to describe the randomness of sequence. A high PE value usually indicates that the system possesses larger complexity. The embedding dimension p and the delay time t are set as 5 and 1, respectively. Similar to the ApEn analysis, we compare and analyze three anti-degradation methods and the original Logistic map at different precisions, as shown in Fig. 7. The original Logistic map’s PE value is maintained at 0.6804, and the improved Logistic map’s PE value is stable around 0.86, which is not only superior to the other three anti-degradation methods, but also better than the original Logistic map. It demonstrates the effectiveness of this method in enhancing the performance of the chaotic systems.

Fig. 5
figure 5

The Auto-correlation graphs of the two chaotic maps. a Digital Logistic map. b Improved Logistic map

Fig. 6
figure 6

The ApEn values for the five different anti-degradation methods

Fig. 7
figure 7

The PE values for the five different Logistic maps

Fig. 8
figure 8

Sensitivity analysis of system (8). a Trajectories with different initial values. b The difference between these two curves

3.1.7 Period analysis

By detecting the length of the period, the performance of anti-degradation methods can be evaluated. Here, for chaotic maps with fixed parameters, we use the chaotic cycle-finding algorithm [40] to calculate their period lengths, and its pseudocode is shown below. For other chaotic maps, we count the distance between the two peaks in the autocorrelation graph of them to find the period. We compare and analyze five methods, and list their period lengths in Table 1. It shows that even at low precision, the improved chaotic map still has a larger period, and the period cannot be detected above 8-bit precision, far superior to other methods.

Algorithm 1 Chaotic cycle-finding algorithm

1: Define the computational precision L, cycle length len,

step number \(step_n\), maximum step size for a single

cycle \(step_m\), initial value \(x_0\), chaotic system F(xL).

2: while true

3: \(x=F(x,L)\);

4: \(step_n++\);

5: if \(x==x_0\)

6: break;

7: end if \(step_n==step_m\)

8: \(step_n=0\);

9: \(step_m=step_m\cdot 2\);

10:  \(x_0=x\);

11: end

12: end

13: \(x=F(x, L);\)

14: while \(x \ne x_0\)

15: \(len++\);

16: \(x=F(x,L)\);

17: end

18: len

Table 1 Periodic testing for five contrast anti-degradation methods (U denotes undetected)

3.1.8 Sensitivity analysis

The sensitivity of the chaotic maps to initial values can be characterized by the differences in initial values with slight variations. For precision \(d = 16\), we set the initial values to 0.3 and \(0.3+2^{-d}\) respectively, and analyze the sequence with an initial length of 100. In Fig. 8, after the second iteration, the two trajectories begin to separate, so it shows that the improved Logistic map has strong sensitivity to initial values.

3.2 High-dimensional chaotic maps

In this section, we conduct anti-degradation analysis on a two-dimensional chaotic map and a four-dimensional chaotic map, respectively.

3.2.1 Definition

The 2D-SIMM map [11] consists of an iterative chaotic map with infinite collapse (ICMIC) and a Sine map, which are cascaded and exhibit rich chaotic characteristics. The 4D-SH map [41] utilizes two one-dimensional seed maps generated through mixed modulation coupling, and also has rich dynamical characteristics. The 2D-SIMM map is described as

$$\begin{aligned} \left\{ \begin{array}{l} x_{i+1}=a \cdot \sin \left( b \cdot y_i\right) \cdot \sin \left( c / x_i\right) \\ y_{i+1}=a \cdot \sin \left( b \cdot x_{i+1}\right) \cdot \sin \left( c / y_i\right) \end{array},\right. \end{aligned}$$
(9)

where \(a, b, c \in (0, 9)\) are the system parameters. Here we set \(a = 1\) and \(b = \pi \). The digital 2D-SIMM map is

$$\begin{aligned} \left\{ \begin{array}{l} x_{i+1}=U Q \circ \left( \sin \left( \pi \cdot y_i\right) \cdot \sin \left( c / x_i\right) \right) \\ y_{i+1}=U Q \circ \left( \sin \left( \pi \cdot x_{i+1}\right) \cdot \sin \left( c / y_i\right) \right) \end{array} .\right. \end{aligned}$$
(10)

Using the InP method for anti-degradation treatment, the perturbation factors are

$$\begin{aligned} \left\{ \begin{array}{l} c_1(i)=U Q \circ \left( 9-c_0+c_0 \cdot \sin \left( i \cdot x_i\right) \right) \\ c_2(i)=U Q \circ \left( 9-c_0+c_0 \cdot \sin \left( i \cdot y_i\right) \right) \end{array},\right. \end{aligned}$$
(11)

where \(c_0\) is an undetermined constant, and \(c_1(i), c_2(i) \in (9-2c_0, 9)\). In addition, due to the ICMIC seed map, the chaotic value cannot be 0, so the state is compensated as

$$\begin{aligned} \left\{ \begin{array}{l} x_i= {\left\{ \begin{array}{ll}x_i &{} \quad x_i \ne 0 \\ U Q \circ \left( 0.01 \cdot \sin \left( 2+c_1(i)\right) \right) &{} \quad x_i=0\end{array}\right. } \\ y_i= {\left\{ \begin{array}{ll}y_i &{} \quad y_i \ne 0 \\ U Q \circ \left( 0.01 \cdot \sin \left( 2+c_2(i)\right) \right) &{} \quad y_i=0\end{array}\right. } \end{array}.\right. \nonumber \\ \end{aligned}$$
(12)

Then replace the parameter c, we get the improved 2D-SIMM map

$$\begin{aligned} \left\{ \begin{array}{l} x_{i+1}=U Q \circ \left( \sin \left( \pi \cdot y_i\right) \cdot \sin \left( c_1(i) / x_i\right) \right) \\ y_{i+1}=U Q \circ \left( \sin \left( \pi \cdot x_{i+1}\right) \cdot \sin \left( c_2(i) / y_i\right) \right) \end{array} .\right. \nonumber \\ \end{aligned}$$
(13)
Fig. 9
figure 9

Attractors of the two-dimensional chaotic maps. a Original 2D-SIMM map. b Digital 2D-SIMM map. c Improved 2D-SIMM map

Fig. 10
figure 10

Attractors of the four-dimensional chaotic maps. a Original 4D-SH map. b Digital 4D-SH map. c Improved 4D-SH map

The 4D-SH map is

$$\begin{aligned} \left\{ \begin{array}{l} x_{i+1}=k \cdot \sin \left( a \cdot \left( 1-2 \cdot w_i^2\right) \cdot \sin \left( b / x_i\right) \right) \\ y_{i+1}=k \cdot \sin \left( a \cdot \left( 1-2 \cdot x_{i+1}^2\right) \cdot \sin \left( b / y_i\right) \right) \\ z_{i+1}=k \cdot \sin \left( a \cdot \left( 1-2 \cdot y_{i+1}^2\right) \cdot \sin \left( b / z_i\right) \right) \\ w_{i+1}=k \cdot \sin \left( a \cdot \left( 1-2 \cdot z_{i+1}^2\right) \cdot \sin \left( b / w_i\right) \right) \end{array},\right. \nonumber \\ \end{aligned}$$
(14)

where \(k, a, b \in (0, 9)\) are the system parameters. Here we set \(k = 1\) and \(a = 2\pi \). The digital 4D-SH map is

$$\begin{aligned} \left\{ \begin{array}{l} x_{i+1}=U Q \circ \left( \sin \left( 2 \pi \cdot \left( 1-2 \cdot w_i^2\right) \cdot \sin \left( b / x_i\right) \right) \right) \\ y_{i+1}=U Q \circ \left( \sin \left( 2 \pi \cdot \left( 1-2 \cdot x_{i+1}^2\right) \cdot \sin \left( b / y_i\right) \right) \right) \\ z_{i+1}=U Q \circ \left( \sin \left( 2 \pi \cdot \left( 1-2 \cdot y_{i+1}^2\right) \cdot \sin \left( b / z_i\right) \right) \right) \\ w_{i+1}=U Q \circ \left( \sin \left( 2 \pi \cdot \left( 1-2 \cdot z_{i+1}^2\right) \cdot \sin \left( b / w_i\right) \right) \right) \end{array} .\right. \nonumber \\ \end{aligned}$$
(15)

Using the InP method for anti-degradation treatment, the perturbation factors are

$$\begin{aligned} \left\{ \begin{array}{l} b_1(i)=U Q \circ \left( 9-b_0+b_0 \cdot \sin \left( i \cdot x_i\right) \right) \\ b_2(i)=U Q \circ \left( 9-b_0+b_0 \cdot \sin \left( i \cdot y_i\right) \right) \\ b_3(i)=U Q \circ \left( 9-b_0+b_0 \cdot \sin \left( i \cdot z_i\right) \right) \\ b_4(i)=U Q \circ \left( 9-b_0+b_0 \cdot \sin \left( i \cdot w_i\right) \right) \end{array},\right. \end{aligned}$$
(16)

where \(b_0\) is an undetermined constant, and \(b_1(i),\) \(b_2(i),\) \(b_3(i),\) \(b_4(i) \in (9-2b_0, 9)\). Similarly, due to the ICMIC map, we need to compensate for the state

$$\begin{aligned} \left\{ \begin{array}{l} x_i= {\left\{ \begin{array}{ll}x_i &{} \; x_i \ne 0 \\ U Q \circ \left( 0.01 \cdot \sin \left( 2+b_1(i)\right) \right) &{} \quad \; x_i=0\end{array}\right. } \\ y_i= {\left\{ \begin{array}{ll}y_i &{} \quad \; y_i \ne 0 \\ U Q \circ \left( 0.01 \cdot \sin \left( 2+b_2(i)\right) \right) &{} \quad \; y_i=0\end{array}\right. } \\ z_i= {\left\{ \begin{array}{ll}z_i &{} \quad \; z_i \ne 0 \\ U Q \circ \left( 0.01 \cdot \sin \left( 2+b_3(i)\right) \right) &{} \quad \; z_i=0\end{array}\right. } \\ w_i\!=\! {\left\{ \begin{array}{ll}w_i &{} \quad w_i \ne 0 \\ U Q \circ \left( 0.01 \cdot \sin \left( 2+b_4(i)\right) \right) &{} \quad w_i=0\end{array}\right. } \end{array}.\right. \nonumber \\ \end{aligned}$$
(17)

Then replace the parameter b, we get the improved 4D-SH map

$$\begin{aligned} \left\{ \begin{array}{l} x_{i+1}=U Q \circ \left( \sin \left( 2 \pi \cdot \left( 1-2 \cdot w_i^2\right) \cdot \sin \left( b_1(i) / x_i\right) \right) \right) \\ y_{i+1}=U Q \circ \left( \sin \left( 2 \pi \cdot \left( 1-2 \cdot x_{i+1}^2\right) \cdot \sin \left( b_2(i) / y_i\right) \right) \right) \\ z_{i+1}=U Q \circ \left( \sin \left( 2 \pi \cdot \left( 1-2 \cdot y_{i+1}^2\right) \cdot \sin \left( b_3(i) / z_i\right) \right) \right) \\ w_{i+1}=U Q \circ \left( \sin \left( 2 \pi \cdot \left( 1-2 \cdot z_{i+1}^2\right) \cdot \sin \left( b_4(i) / w_i\right) \right) \right) \end{array}.\right. \nonumber \\ \end{aligned}$$
(18)

Here, Eqs. (13) and (18) represent the improved 2D-SIMM map and the improved 4D-SH map, respectively.

3.2.2 Attractors analysis

We set calculation precision \(d = 8\), \(b_0 = c_0 = 3\) and the range of perturbation factors is (3, 9). Next, we compare the digital chaotic map with the improved chaotic map. The attractors of the two-dimensional chaotic maps are shown in Fig. 9. In Fig. 9b, the performance of the digital 2D-SIMM map has deteriorated, and the attractor only exhibits a few discrete fixed points. From Fig. 9a, c, the InP method restores the attractor of the original 2D-SIMM map. Since the visualization of a four-dimensional chaotic map cannot be directly displayed on a two-dimensional plane, we plot the four-dimensional attractor graphs by representing the fourth dimensional data in color form, as shown in Fig. 10. In Fig. 10b, the chaotic map is digitized and degenerated into several fixed points. From Fig. 10a, c, the InP method successfully restores the attractor structure of 4D-SH map.

3.2.3 Complexity analysis

Usually, high-dimensional chaotic maps exhibit larger complexity compared to low-dimensional chaotic maps. However, when the computational precision decreases, the high-dimensional chaotic maps’s complexity will also be low, requiring anti-degradation treatment. Fig. 11a reflects the variation of ApEn values with precisions for improved 2D-SIMM map (system (13)), original 2D-SIMM map (system (9)), improved 4D-SH map (system (18)), and original 4D-SH map (system (14)). We can see that for the improved 2D-SIMM map, the ApEn value is higher than the original 2D-SIMM map. Due to the original 4D-SH map has a large complexity, whose ApEn value exceeds 2.4. Therefore, for the improved 4D-SH map, the improvement of the InP method reaches a certain limit, but it can still maintain an approximate ApEn value at low precision. Fig. 11b reflects the variation of PE values with precisions for the four different chaotic maps. The PE values of all four chaotic maps are very high, and the PE values of the improved 2D-SIMM map are even higher than those of the original 2D-SIMM map.

Fig. 11
figure 11

The complexity analysis for the four different chaotic maps. a ApEn complexity. b PE complexity

Fig. 12
figure 12

Sensitivity analysis: a Initial value \(x_0+2^{-8}\) in system (13). b Initial value \(y_0+2^{-8}\) in system (13). c Initial value \(y_0+2^{-8}\) in system (18). d Initial value \(z_0+2^{-8}\) in system (18). e Initial value \(w_0+2^{-8}\) in system (18)

Table 2 Periodic testing for four chaotic maps (U denotes undetected)

3.2.4 Period analysis

We analyze the output sequence periods of the digital chaotic maps and the improved chaotic maps, and test the precision d from 4 to 20. The results are shown in Table 2. We can see that the period lengths of the digital chaotic maps are generally low. However, after using the InP method, the period lengths are greatly extended, and the system performance is improved.

3.2.5 Sensitivity analysis

For precision \(d = 8\), we set the initial values of system (13) x-dimension are 0.2 and 0.2+\(2^{-d}\), and the initial values of the y-dimension are 0.1 and 0.1+\(2^{-d}\), respectively. We analyze the first 100 iterations, as shown in Fig. 12. From Fig. 12a, we can see that when the initial value of x changes, the y-dimensional data undergoes differentiation after approximately two iterations, exhibiting different chaotic behaviors. In Fig. 12b, differentiation occurs at the third iteration. In addition, we conduct the same analysis on system (18). For x-dimensional data, we change the initial values of y, z and w dimensions and analyze their trajectories, respectively. In a short period, the chaotic trajectories all separate in Fig. 12c–e. It indicates that the improved chaotic maps still have strong initial value sensitivity at low precision.

4 Application

In this section, we utilize field-programmable gate array (FPGA) to implement the improved 2D-SIMM map (system (13)) and the improved 4D-SH map (system (18)) based on the InP method, and design a new pseudo-random number generator (PRNG).

4.1 FPGA implementation

To demonstrate the InP method can solve the problems caused by hardware devices’ truncation effects, FPGA is used to reproduce the improved 2D-SIMM map and the improved 4D-SH map. In FPGA, the IEEE754 single precision floating-point type is often used as the data format to save resources [42]. The data format is shown in Fig. 13. It has a total of 32-bits, with the highest bit being the sign bit, [30...23] being the index bit, and [22...0] being the tail bit. The last part has 23 digits, and commonly referred to as the significant digit. For a digital chaotic map, small perturbations have a significant impact on the entire map, so the tail digit has the greatest impact on the chaotic state. Due to the truncation effect of hardware devices, it leads to dynamical degradation of some chaotic maps implemented on FPGA platform. Table 3 lists the hardware device truncation effect demonstration. It shows that due to the decimal part of a single precision floating-point number is only 23 digits, and the red part of the original data is preserved, while the blue part is truncated, resulting in the rounding errors.

Table 3 The hardware device truncation effect demonstration

Figure 14 shows the hardware block diagram of FPGA, where the SIL_4D module constructs a 4-dimensional system based on the InP method through a state mechanism. The output data is a 32-bit floating point number, which needs to be converted into 16-bit fixed point data through the Float2dac module. Finally, the 16-bit data is converted into analog signals through the Dac_out module and outputed to the DAC8552 chip.

Figure 15 shows the FPGA experimental platform, where FPGA is Altera Cyclone V 5CSEMA5F31C6 with 50 MHz clock frequency. Under the IEEE754 single precision floating-point standard, we apply the InP method to the FPGA platform, using a DAC8552 chip to convert digital signals into analog signals. The attractors of the improved 2D-SIMM map and the improved 4D-SH map are printed on the oscilloscope, and compared with the results of MATLAB simulation in Fig. 16. It shows that the graphs printed by FPGA are similar to the simulation results in MATLAB, proving that the InP method can solve the problems caused by hardware devices’ truncation effects.

In addition, we compute the throughput (TP) of the sequence. Fig. 17 shows the timing diagram, where wire_done1, A1, A2, A3, A4 denote the flag for completing one iteration, first data, second data, third data, fourth data, respectively. It shows that the time required for the system to complete one iteration is 18,900 ns. The throughput (TP) is calculated as \(TP=W/T\), where W, T denotes the output data volume, run time, respectively. Therefore, we get \(TP = 32\; \hbox {bits} \times 4/18{,}900\;\hbox {ns} = 6.77\;\hbox {Mbps}\). And we also count the resource consumption of the system, as listed in Table 4.

Fig. 13
figure 13

The structure of IEEE 754 single precision floating point numbers

Fig. 14
figure 14

Hardware block diagram of FPGA

Fig. 15
figure 15

FPGA experimental platform

4.2 Pseudo-random number generator

We design a novel PRNG, which operates at finite precision to evaluate the randomness of sequences generated by digital chaotic maps. The steps are listed as follows.

\({\varvec{step\ 1}}\): Iterate the M-dimensional chaotic map \(N + t\) times and discard the initial t iterations to avoid transient effects, then obtaining a new chaotic sequence \(X_j=\left\{ x_j(i)\right\} _{i=1}^N, j=1,2, \ldots , M\).

\({\varvec{step\ 2}}\): At L-bit precision, quantify the chaotic sequence X as binary sequences with a bit width of \(l (l \le min(L, 16)\), and let \(l = 8\)). Finally, a new pseudo-random sequence \(P=\left\{ b_i\right\} _{i=1}^{l N}\) is obtained by

$$\begin{aligned}{} & {} \left\{ b_i\right\} _{i=(k-1) l+1}^{k l}= d e c 2 b i n \nonumber \\{} & {} \quad \left( \bmod \left( \left[ \left( \sum _{j=1}^M x_j(i)\right) / M \cdot 2^{\min (L, 16)}\right] , 2^l\right) \right) ,\nonumber \\ \end{aligned}$$
(19)

where M is the dimension of the chaotic map. l is the bit width of the unit data, and \(x_j\) is the output set of each dimension, where \(k = 1, 2, ..., N\). N is the length of the chaotic sequence, and dec2bin(x) is a decimal to binary function.

Fig. 16
figure 16

Comparison of MATLAB and FPGA outputs: a xy dimension of system (9). b xy dimension of system (14). c xz dimension of system (14). d zw dimension of system (14). e xy dimension of system (13). f xy dimension of system (18). g xz dimension of system (18). h zw dimension of system (18)

Fig. 17
figure 17

System timing diagram testing

Table 4 FPGA resource consumption table
Table 5 NIST testing for seven contrast anti-degradation methods

NIST-800-22 test is usually used to test the randomness of sequences. It consists of 15 independent tests that test 100 sets of binary data with a length of \(10^6\). Only when the pass rate > 96% and P_value > 0.01, the test is considered passed. We use the Logistic map as the target map and apply different anti-degradation methods for analysis, with the proportion of passing independent test items as shown in Table 5. The results indicate that at different levels of precision, the chaotic map improved by the InP method has a higher pass rate compared to the chaotic maps improved by other methods. It shows that this method can effectively improve the randomness of chaotic sequences at low precision.

5 Conclusion

In this paper, we introduce a novel anti-degradation method, and achieve good anti-degradation effects at a low cost. Both the low-dimensional and high-dimensional chaotic maps are subjected to anti degradation treatment. By calculating the Lyapunov exponents, we demonstrate that the improved chaotic map not only exhibits chaos at low precision, but also expands the chaotic range. Finally, we apply this method to the field of FPGA, and verify it can solve the problems caused by hardware devices’ truncation effects. In addition, we conduct NIST test at finite precision, which demonstrates that the sequence generated by the improved chaotic map exhibits strong randomness at low precision. Compared with several anti-degradation methods, the InP method has the characteristics of lower implementation cost and better anti-degradation effect. Next, we will combine this method with image encryption to achieve finite precision image encryption.