3.1. Hardware Performance
The designed circuit was implemented using the VHDL (VHSIC Hardware Description Language) in the Xilinx Vivado 2019.1 design tool, and its operation was simulated in ModelSim—Mentor Graphics. We adopted the low-cost FPGA device Artix 7 XC7A100TFGG676-3 to embed such a chaotic system. This choice is based on the fact that this semiconductor device is commonly used for prototyping digital circuits. Moreover, FPGA offers several advantages, including flexibility, reliability, robustness, and fast processing [
22].
The tent map was implemented using three different fixed-point numerical precision formats: 16-bit, 32-bit, and 64-bit. These formats were chosen due to their common usage in many designs. One advantage of this circuit is its ability to adapt to different precision requirements based on the specific application it will be used for.
To demonstrate this result, we present the 16-bit implementation of the tent map in
Figure 2. This digital circuit presents chaotic behavior, yet contains only a small number of logical components and has a latency of one clock cycle. In the figure, the block labeled “&” represents the concatenation operation. The first fifteen XOR gates determine which condition for the tent map is satisfied in the
nth iteration and perform the complement operation if necessary. To save FPGA resources, we avoid using an XOR gate to execute
, since the resultant bit is always zero and will be discarded after a shift left operation. Additionally, note that the perturbation process is performed by the rightmost XOR gate, since
.
Table 2 shows which components are used to represent the tent map. Since there are many synthesis and implementation strategies in the Xilinx Vivado design tool, we chose to optimize the area of the implemented digital circuit as much as possible. The proposed scheme is compared to [
19], which also focuses on minimizing hardware. Note that the proposed circuit contains fewer logical resources, consumes less than
of the available capacity in the FPGA, does not use DSP (Digital Signal Processing) resources, and has a superior operating frequency.
Although Xilinx and Intel produce FPGAs with different architectures, it is relevant to mention that the proposed tent map presents the same results concerning Logic Utilization and Registers as the LUTs and FFs indicated in
Table 2 when using the Cyclone V device. Therefore, the proposed hardware architecture remains superior to the one shown in [
19].
Additionally,
Table 3 compares the logical resource consumption among other tent-map-based works as well as discrete chaotic maps. The sixth column shows the ratio between the total number of logical resources used and the number of bits. This is an objective way to measure the simplicity of a chaotic system since many of these papers do not clarify which components were used. Notice that the number of components used in this proposed digital circuit is lower than the other ones, reducing the number of components by at least
.
To emphasize the chaotic nature of the proposed digital tent map and that the perturbation method works, the largest Lyapunov exponent (
) was estimated using Wolf’s method [
24,
35]. This calculation was performed on a decimal representation converted from the generated binary data produced by ModelSim. The
reported in the literature is
and, as can be seen in
Table 4, the estimated values are in good agreement with the expected value. Moreover, as the largest Lyapunov exponent is positive, this can be considered evidence of the chaotic properties present in the proposed digital circuit. Furthermore, the return map and two-time series with slightly different initial conditions were plotted, as shown in
Figure 3. By
Figure 3, it is possible to note that the digital circuit preserves the tent shape of the map, and the chaotic orbits diverge over time periods, indicating its sensitivity to initial conditions.
The tent map, a type of 1D piecewise linear map, is required to have a specific correlation function and probability distribution [
36]. As shown in
Figure 3, the histogram and the autocorrelation function for all bit precision formats of the proposed digital tent map are presented. The histograms show a uniform distribution, indicating that all values of
are equally likely to be the circuit output. Additionally, the lack of correlation in the generated orbits indicates that the samples are independent of each other. These results align with previous findings in the literature.
The pseudorandom properties of the tent map can be observed through the
p-values obtained from one-sample Kolmogorov–Smirnov and Runs statistical tests, as well as the ENT test suite analysis. The Kolmogorov–Smirnov test compares the sample distribution with a theoretical uniform distribution, while the Runs test examines the sequence for randomness.
Table 4 shows the
p-value obtained for each bit precision. Since all
p-values are greater than or equal to the significance level of
, the sequence generated by the digital circuit passes these tests.
The ENT test suite [
37] is a tool that has been extensively used [
38,
39]. By running six different statistical tests, the tool provides a reliable measure of quality for compression algorithms, pseudo-random number generators for use in statistical sampling, and encryption applications. The six tests include Entropy, Optimum compression,
distribution, Arithmetic mean, Monte Carlo value for
, and Serial correlation coefficient tests. The results obtained are shown in
Table 5. Since the bit-stream of the map passed all tests for different precision formats, we concluded that the map could generate pseudo-random numbers.
Thus, the digital chaotic circuit can serve as a PRNG. As Herring and Palmore [
40] demonstrated, PRNGs are chaotic systems and vice versa. Since the circuit can function as a pseudo-random number generator, we will demonstrate a simple application of our digital circuit for a statistical sampling in a particle swarm optimization hardware architecture.
3.2. Hardware Architecture for Particle Swarm Optimization
Optimization techniques have been employed over the years, as shown by [
41,
42,
43,
44,
45,
46,
47,
48]. Such a topic is important in engineering and computer science since the technique allows the best location of resources [
49,
50,
51]. The mono-objective optimization problems rely on finding a point, in a space of innumerable optimization variables, in which the objective function achieves its minimum solution [
49].
A mono-objective optimization problem can be stated as
where
is the optimum point of the fitness function
, and
and
are the constraints.
One approach to solve optimization problems are metaheuristic algorithms. Particularly, such algorithms can solve many complex problems. Moreover, they are practical since they can find approximately optimal solutions in reasonable times [
52].
A classical metaheuristic algorithm is particle swarm optimization (PSO) [
53]. PSO is a method that uses a population of candidate solutions, namely particles, where each particle
i moves in the search space to find the most promising area. Such an algorithm uses a velocity vector to update the position of each particle. The position of each particle is updated based on population social behavior, i.e., the swarm of particles [
51]. From iteration to iteration, each particle
i advances in the direction of its previous local best (
) and the best global position (
) of the swarm.
The velocity
and position
of each particle
i are updated by Equations (
10) and (
11), respectively [
54]:
where
j is the current iteration,
is the inertia weight,
and
are acceleration coefficients,
and
are two independently uniform random numbers within range of
, and
P is the total number of particles. Algorithm 1 summarizes the steps performed in a particle swarm optimization.
One topic that has been discussed is the utilization of chaos theory on PSO [
55,
56,
57]. There are several ways to apply chaos on PSO to improve the local search in the algorithm [
58]. In this case, the chaotic properties of the proposed digital tent map are used for generating pseudo-random numbers. For such a task, a well-known hardware architecture of the parallel PSO is employed based on [
25].
Algorithm 1: Particle Swarm Optimization |
![Electronics 12 01953 i001]() |
Figure 4a shows the general hardware architecture used. This architecture was assembled in a parallel approach to improve running speed. It uses floating-point arithmetic to obtain a dynamic range for representing large and small numbers and is divided into five components: the FSM (Finite State Machine), the swarm unit, the evaluation unit, and the individual and global best detection units. While the FSM synchronizes the hardware operation, the swarm unit is responsible for updating the velocity and the position of each particle, according to Equations (
10) and (
11).
Figure 4b illustrates how the velocity and position of the particle are updated. The architecture is executed in five states, and in each state, all the operations are computed simultaneously. The architecture comprises just one floating-point multiplier, one floating-point adder/subtractor, and our digital tent map. To avoid using two more multipliers, instead of the tent map generating uniform random numbers within a range of
, the digital circuit generates uniform random numbers within a range of
and
. Additionally, as the proposed digital tent map performs the operations using fixed-point arithmetic, a fixed-to-float converter is applied to match the specified conditions of the hardware architecture for particle swarm optimization.
The evaluation unit carries out the fitness function evaluation. In this task, the hardware architecture was tested using benchmark functions applied in the literature. The chosen ones are the Sphere and Rosenbrock functions, where each one imposes different scenarios also found in real problems. The Sphere function is a unimodal and convex one, its domain is
, for all
, and the global minimum is
at the position
. The Sphere function is defined as [
59]
The Rosenbrock function is a typical non-convex and a multimodal function, its domain is
, for all
, and the global minimum is
at the position
. The Rosenbrock function is defined as [
60]
The best individual unit is responsible to determine if the current fitness value of each particle is lower than its respective best fitness value. Thus, if , the best particle position of the particle i is updated and stored in RAM.
Lastly, the global best unit concludes what the minimum value among all the
P best fitness values is. Hence, if
, the best global position
is updated and stored in RAM. It is important to note that these values are not effectively stored in a Block RAM (BRAM). The RAMs shown in
Figure 4a,b are based on Flip-Flops.
We implemented the hardware architecture using the IEEE standard for floating-point arithmetic (IEEE 754) [
61] with a bit-width of 27 bits. This bit-width consists of 1 bit for the signal, 8 bits for the biased exponent, and 18 bits for the mantissa. Our digital tent map was configured to generate pseudorandom numbers with a bit-width of 20 bits. We based this configuration on the same guidelines the authors in [
25] used since this architecture presents the best trade-off between the FPGA resources used and the PSO algorithm’s response. Moreover, it is important to highlight that the digital tent map produces a pseudo-random number at every clock cycle, so it has no impact on the latency of the proposed particle architecture [
25]. Using the proposed digital chaotic map as PRNG improves the performance of the PSO algorithm since previously an LFSR (Linear-Feedback Shift Register) was used as a source for generating random numbers, a technique that has serious drawbacks such as self-correlation and the possibility to reconstruct the parameters from a sequence of outputs [
62].
Table 6 shows the synthesis results of the implemented hardware for particle swarm optimization. Using the low-cost Artix 7—XC7A100TFGG676-3, we can embed this optimization technique efficiently.
The hardware architecture for particle swarm optimization using our digital tent map as a source of pseudo-random numbers was validated using
particles to optimize problems with
dimensions.
Table 7 exhibits the parameter set used in the experiment. Note the linear decrease in the inertia weight, which aims to refine the final solution and improve the convergence results. We also chose the initial and maximum velocities so that they did not cause the particle to leave the search space.
All the benchmark functions were optimized 16 times, with each run using distinct initial particle positions. This design ensured the preservation of swarm diversity, convergence, and quality of results, as it allowed us to estimate the global minimum of these benchmark functions in each run.
Table 8 summarizes the results obtained.
Ultimately, it is certainly important to mention that a crucial point of this application is the numerical conversion of the random number generated in fixed-point to floating-point format. As there is a nonlinearity present in such conversion, the numbers generated by the tent map could lose their random characteristics. However, this is not the case. After the fixed to float-point conversion, we applied just the Kolmogorov–Smirnov and Runs tests to ensure the generated sequence is pseudo-random and uniform. The p-values obtained for each test are and , respectively, for . Thus, as , the proposed digital tent map kept its uniform distribution and pseudorandom feature after conversion, as well as helped the PSO hardware performance.