Design and Implementation of a Digital Dual Orthogonal Outputs Chaotic Oscillator

: Discrete time dynamical chaotic systems obey a set of recurrence equations involving one or more variables. Many chaotic maps have been proposed. None that simultaneously provides two sine–cosine outputs has stationary mean and standard deviation, or is quite robust with respect to the data format used in the hardware implementation. Here, we propose a chaotic oscillator based on a complex phasor whose angular argument evolves according to a geometric progression that is independent of the instantaneous amplitude. In order to maintain the oscillations, the phasor magnitude is normalized at each iteration using an approximation factor. The statistical characteristics of this oscillator are stationary in the short term, and do not depend on the initial conditions. The mean and standard deviation of the two orthogonal sequences quickly approach 0 and 2 1 / , respectively. The resulting distribution is similar to that of a digital sine with a constant angular step. We also present an FPGA architecture and its implementation results. This oscillator can be used in modulation schemes, such as the chaotic shift keying one or for data and image encryption. Finally, we show an original application that exploits the orthogonality of the two chaotic signals for the simultaneous encryption of two digital images.


Introduction
Chaotic maps offer a mathematical approach that describes the dynamic behavior of systems that are extremely sensitive to the initial conditions. Their study began in the 19th century with the works of Cauchy, Poincaré, Van der Pol and Liapunov. In 1963, Lorenz made a practical use of it for the forecasting of certain meteorological phenomena [1]. In continuous time, they can be represented mathematically by a system of nonlinear differential equations of dimension ≥3. The dynamics of Lorenz, Chen, Rössler and Lu are well-known examples [2]. Discrete time dynamical systems, such as Bernoulli, Hénon and the logistic maps, obey a set of recurrence equations involving one or more variables. More than 100 different chaotic maps have been proposed in the literature.
These systems generate aperiodic signals whose evolution, seen from the outside, lies on the edges between random and deterministic worlds. Therefore, the chaotic oscillators are of major interest for the generation of pseudo-random signals [3,4], or for the encryption of data [5][6][7], speech [8] or images [9][10][11][12]. Various modulation schemes, like the chaos shift keying, use a chaotic carrier in order to secure the transmission and to reinforce its confidentiality [13,14]. Chaotic sequences are also used in compressive sensing to build a measurement matrix that satisfies the restricted isometry property [15][16][17]. In the literature [18], the authors show that a chaotic generator can be used to create a reliable and efficient wireless communication system. Finally, chaotic oscillators and, more generally, systems with nonlinear dynamics, are used to perform complex operations and design stochastic logic systems [19].
Despite their abundance, there is no known chaotic system that simultaneously meets the following criteria:  jointly generates two orthogonal signals, i.e., the outputs are point by point in phase quadrature and constitute a unit vector.  presents statistical characteristics, such as stationary mean and standard deviation, that are also independent of the initial conditions.  is robust when one reduces the sample quantification format.
In an attempt to solve this problem, we looked for systems that implement circular functions that are implicitly normalized. In 1979, Ikeda was one of the first researchers to propose a discretetime attractor using sine and cosine functions [20]. Then came the chaotic sine map (CSM) and chaotic cosine map (CCM) [21,22]. In order to increase the chaotic complexity, recurrences of the type where G is a CCM and F a usual chaotic function, were studied more recently [23].
In all of these systems, the instantaneous phase is a function of the previous sample. Here, we propose a chaotic oscillator based on a complex phasor whose angular argument evolves according to a geometric progression that is independent of the instantaneous amplitude.
In the first part of this article, we review the most commonly cited discrete chaotic sequences and highlight their drawbacks, with respect to the three previously mentioned criteria.
The synthesis process and the main properties of the proposed chaotic oscillator are presented in the second part.
The third part analyzes the influence of the quantification on the performance of the oscillator. Finally, a practical application for fast image cryptography is presented.

Recurrence Equations
In order to make digital oscillators, one solution is to discretize the differential equations.
Numerical differentiation according to the Euler transformation h is often used.
This method requires a sufficiently fine step h, otherwise the sequence generated fades out or diverges very quickly. One-or multi-dimensional numerical sequences with a more or less pronounced chaotic character according to the internal parameters have also been proposed in the literature. Table 1 provides a synthesis of usual discrete chaotic sequences.

Influence of the Data Format
Chaotic sequences are very sensitive to the data quantification format. In fact, without special precautions, certain sequences fade very quickly. The Bernoulli map (also named the doubling map in the case of = 0) vanishes to zero after about 30 or 60 iterates with single precision or double precision floating point computations, respectively. This can be easily demonstrated, as the recurrence relation can be viewed as a left shift operation with the loss of the most significant bit [24].
The Logistic map does not suffer from the vanishing problem with floating point numbers of both single or double precision; but with fixed point representation, there are always cycles in the sequence. The cycles have a duration ranging from a few iterates to a maximum of about 300 iterates for  = 4, as well as a 2.21 fixed point format.
The sequences obtained by discretized differential equations are also very sensitive to the precision of computations, as well as to rounding rules, which may differ from one processor to another. For example, we show in Figure 1 the evolution over 60,000 points of the signal k x of the Lorenz sequence discretized according to the Euler approximation. The parameters used are The first computation is carried out by a MATLAB script with the double precision floating point format, using the three recurrence equations provided in Table 1 ( Figure 1, left). A second computation is carried out according to the same mathematical approach and with the same computer, but this time we used a Simulink diagram in discrete mode. According to Figure 2, very strong differences appear from the 45,000th iterate. This dependency creates a problem when such sequences are used, for example, for cryptographic applications.

Statistical Variability
The statistical characteristics of chaotic sequences such as the mean (m) and standard deviation (std) may depend on the intrinsic parameters and initial conditions. This is particularly true for discretized differential equations. The variations of the latter being slow with respect to h, and the estimates of m and std require a large number of samples. Table 2, for example, shows the high variability of the mean of the discrete Lorenz sequence on 100,000 k x samples.

Theoretical Background
We consider a digital oscillator that simultaneously generates at time k the outputs xk and yk, given by the following: where   is the angular step and ( ) are the initial conditions. Equation (1) corresponds to the complex phasor, as follows: The recurrence relation leads to the following: This oscillator uses the principle of the angular integration depicted in Figure 2. We consider a phasor whose argument k  follows a geometric progression with a common ratio of two. It follows the recurrence relations of Equation (4), as follows.
This is equivalent to substituting functions ).
On the other hand, the oscillator is very sensitive to the initial phase conditions. For example, Figure 3 shows the first 60 samples of k x and k y obtained for the two initial phases separated by a 0.001 rad (computations performed with MATLAB with double precision numbers).

Normalized Recurrence Equations
In practice, the phase errors due to the quantization accumulate and lead to the fade-out of signals. In order to overcome this problem, it is necessary to ensure that the relation 1 is satisfied at each iteration. This can be achieved by using the normalized Equations (5).

Approximation of Normalized Recurrence Equations
To eliminate the dividers in Equations (5), the following approximation is used: Using this relation, we get the following: Thus, Finally, The asymptotic algorithmic complexity of our map is therefore O(n). The magnitude of the generated points obeys Equation (8). Its evolution strongly depends on the initial value 0 r . Only a convergence of k r towards 1 makes it possible to maintain a steady chaotic state.
The continuous function corresponding to Equation (8) has three positive roots, namely, 0, 1 and 618 0 2 The dynamic behavior of Equation (6)  is a repulsive point. The main convergence intervals are summarized in Table 3  Table 3. Convergence properties of the sequence of Equation (6).

Case Initial Magnitude
Convergence Behavior Examples Chaotic steady state , whose magnitude corresponds to case number two in Table 3, make it possible to generate a maintained chaotic oscillator.

Statistic Properties of the Chaotic Oscillator
As the proposed oscillator generates sine and cosine functions, its statistical characteristics are stationary in the short term. The mean and standard deviation of the two sequences quickly approach 0 and    The observed dynamics are similar to the Ikeda attractor in the (x, y) plane and to the Hénon attractor in the (dx and x) plane.
The histogram on 1000 points of x and y shows a non-uniform distribution of output values ( Figure 5). This distribution is similar to that of a digital sine with a constant angular step. On the other hand, the instantaneous angular phase k  is uniformly distributed between − and , as shown in the histogram of Figure 6, made from a million values.

Chaotic Behavior Analysis
The recognition and quantification of chaos in a digital signal has been the subject of different approaches. Among them, the estimate of Lyapunovʹs largest exponent  of the progression is one of the most reliable. This parameter measures the average exponential rate of divergence or convergence between two trajectories of the sequence resulting from very close initial conditions. Three situations can occur, namely:   < 0 corresponds to an orbital trajectory attracted by a stable fixed point. This situation is representative of strongly deterministic, harmonic or random sequences.   very close to 0 represents a steady state close to a chaotic transition.   > 0 characterizes an unstable and chaotic orbit. The larger , the more chaotic character is observed.
In order to study the dynamics of financial markets, A Bensaida developed a neuron networkbased chaos test algorithm that mimics the chronological behavior of the sequence to be analyzed [25]. We used this algorithm because it requires no prior knowledge of the signal to be analyzed, and can also be used on noisy data. Table 4 compares the Lyapunov coefficients recorded on the Logistic progression, Hénon sequence and the signals delivered by the proposed oscillator. The estimates are made on 1000 points, with the same configuration of the neural network.

Hardware Implementation
The oscillator was also implemented on a Xilinx FPGA target (Zynq UltraScale+ MPSoC ZCU106). The implementation diagram is given in Figure 7. As the dynamics of k x and k y are limited to the interval [−1; 1], a quantization format with 23 bits, of which 21 are reserved for the fractional part, is sufficient to sustain the oscillations and to provide a reasonably large enough period (more than 2820 iterations), compared to a single precision floating point implementation (more than 1920 iterations). Table 5 summarizes the necessary hardware resources, power consumption and the maximum sampling frequency fs obtained for three different calculation accuracies, namely, double precision floating point (IEEE754 64-bit), single precision floating point (IEEE754 32-bit) and the custom defined fixed-point format, with two bits for the integer part and 21 bits for the fractional part.
In this case, one can see that an algorithm architecture matching the methodology provides a resulting architecture that lowers the necessary hardware resources, consumes less power, has a greater throughput and has a similar or even better accuracy than its direct "translation" from a software model.

Image Encryption/Decryption With Bitwise XOR Operation
Many authors use chaotic systems to encrypt digital images. Basically, the encryption processes of an image plane of N*M pixels remain similar, and take place in three successive stages, namely:


Elaboration of a sequence of N*M numerical coefficients of the chosen chaotic system in which the precise initial conditions have been introduced.  Quantification of the coefficients in a format identical to that of the pixels of the original image (eight bits in most cases). Given the variability of the statistical characteristics of the sequence with the initial conditions, this operation can only be carried out after the computation of the entire sequence.  Application of a bitwise XOR operation between the pixel values and the quantized coefficients.
The decryption of the image is carried out according to the same approach. The use of this coding strategy with the proposed chaotic system is also possible. In this case, the quantification is easy because of the statistical stability of the sequence. Indeed, the range of our sequence is [−1; 1], therefore it becomes very easy to convert it into, for example, a sequence of eightbit words. The hardware resources needed are very low, as it only requires a fixed-point increment whose output is truncated to the eight most significant bits. The scheme of this method with the proposed chaotic oscillator is shown in Figure 8.

Simultaneous Images Mixing Encryption/Decryption
We propose a second process, which can be used if the confidentiality of the information is not the main criterion.
Let U and V be two different grayscale images of the same size N*M. Let k be the position of a pixel in the image, according to the conventional scanning from left to right and from top to bottom.
The k u and k v pixels of each image can be considered as the Cartesian coordinates of a point This operation leads to point where the ordered pairs ( k x , k y ) are generated by the orthogonal outputs of the proposed chaotic oscillator.
The values ' k u and ' k v provide two encrypted images, named U' and V', respectively.
Two uniform images represented by a single point P are located after this transformation in a different point P', distributed randomly on a circle of the same radius.
The transformation is reversible. It is performed by a reverse rotation, as follows: This principle is similar to that of a synchronous modulation/demodulation with a random frequency.
The algorithm for the encryption is as follows: Step 1: Read the two original images with size N*M, then convert them into one dimensional arrays U and V, and assign the initial conditions x0 and y0.
Step 2: For each pair (uk and vk), compute the following: Step 3: Convert the two arrays Uʹ and Vʹ into two images with the size N*M.
The algorithm for the decryption is as follows: Step 1: Read the two encrypted images with size N*M, then convert them into one-dimensional arrays U' and V', and assign initial conditions x0 and y0.
Step 2: For each pair (u'k and v'k), compute the following: Step 3: Convert the two arrays of U and V into two images with the size N*M.
The asymptotic algorithm complexity of both the encryption and decryption is O(N*M). We applied this encryption method using the digital architecture described in the previous paragraph. Figures 9 and 10 illustrate the encryption and decryption, respectively, of the original images (Lena and the Pirate, respectively).
Chaotic Oscillator Upon reception, a visualization of the addition of the two images can be carried out very simply by performing the computation However, the separation of the two images cannot be achieved without knowledge of the chaotic sequence.
Chaotic Oscillator A practical application of this process is merging pairs of pages from a book in order to provide a quick overview to the reader, who, if interested, can request the decryption key from the publisher.

Conclusions
We propose a chaotic oscillator using a complex phasor with phase doubling at each sampling time. The recursive structure performs the angular integration and simultaneously generates two orthogonal signals representative of the pair (cosine and sine). The nonlinear evolution of the phase is responsible for the chaotic behavior that we confirmed by the positive Lyapunov coefficients evaluated on the generated signals.
Thanks to the trigonometric properties related to the double angle, no direct computation of the cosine and sine functions is necessary.
The permanence of the oscillations is obtained using a normalization of the magnitude of the ordered pairs ( k x and k y ) carried out at each iteration.
In order to simplify the implementation of the system, the normalization ratio is replaced by an approximation factor. The recurrence equations thus take a purely polynomial form.
The analysis of the dynamics of the system shows that any initial pair ( 0 x and 0 y ) whose magnitude is between 0.618 and 1.272 ensures a chaotic behavior. The hardware implementation of this oscillator is presented and the influence of the quantification format on the chaotic complexity is studied. A fixed point 23-bit format, including 21 bits for the fractional part, allows for the generation of deterministic chaos with a periodicity greater than 2800.
This oscillator can be used in modulation schemes, such as the chaotic shift keying one and for data and image encryption. We finally show an original application that exploits the orthogonality of the two chaotic signals for the simultaneous encryption of two digital images.