A unified framework for finite-/fixed-time synchronization of memristor chaotic systems and its application in image encryption

This paper proposes a sliding-mode-based unified control framework to solve the synchronization problem of memristor chaotic systems. Both finiteand fixed-time synchronization of the memristor chaotic systems can be obtained in the uniform framework. According to the Lyapunov stability and finite-time stability theories, we demonstrate that the trajectories of error system reach the presented sliding-mode surface and converge to the origin along the surface in a finite/fixed time. Moreover, an image encryption algorithm is developed based on the presented control framework. Finally, the numerical simulations and the statistical performance analyses are discussed to illustrate the correctness of synchronization results, the effectiveness of the proposed encryption algorithm, and its potential applications in the scope of secure communication.


Introduction
For a chaotic system, small changes of the initial states cause large deviations of the system response. It thus generates a common belief that chaos is harmful among scientists until 1990 when Pecora and Carroll firstly put forward the theory of chaotic synchronization [1]. Since then, a large number of researchers have devoted great efforts to chaos control theory and chaotic synchronization problem [2][3][4]. A basic model of chaotic synchronization is the drive-response structure [5], in which the trajectories of the response system are supposed to be synchronized to that of the drive system. In the past decades, various effective synchronization control approaches have been proposed to achieve chaotic synchronization, including the fuzzy control [6][7][8][9], impulse control [10][11][12], adaptive control [13][14][15], etc.
It is worth pointing out that most of the existing results presented in the early research work can only be used to achieve asymptotic synchronization of chaotic systems [16][17][18][19][20], namely, the states of the chaotic systems reach agreement (i.e., synchronization) as time approaches infinity. This has already become the big obstacle greatly hindering the development and application of the above-mentioned asymptotic synchronization algorithms. To surmount the bottleneck, scholars have paid great efforts to solve the finite-time synchronization (FTS) problem, namely, to synchronize the states of all the chaotic systems to reach agreement in a finite time, which depends heavily on the initial value of the chaotic system [21,22]. However, the initial value may not be known and used in advance, which prevents the applications of the FTS technology in the case that the upper bound of the convergence time is highly required.
To remove this constraint, significant research findings of fixed-time control theory were presented in [23] to achieve a fixed convergence time regardless of the initial value and only depending on the system parameters and related control parameters. Therefore, the fixed-time synchronization (FxTS) can be achieved in a specific time, which expands the application field when initial values are unknown. Recently, a series of control strategies and synchronization results based on fixedtime control have been reported [24][25][26][27]. In [26], a fixedtime control scheme with fast convergence speed which was employed to power systems was proposed. In [27], a unified framework for the finite-time stabilization and fixed-time stabilization of a chaotic system was discussed. The results of the above two papers are derived based on the sliding-mode control (SMC) method. The SMC is a popular control method due to its insensitivity to the changes of system parameters, strong antiinterference ability and fast dynamic response [28]. The time evolutions of the states of the dynamic system are propelled to slide along the desired sliding-mode surface and stay on it by designing an appropriate controller. Based on its high control efficiency, this technology has been widely applied in the field of the synchronization of chaotic systems [29,30].
More recently, applying the chaotic synchronization theory to realize secure communication has become a hot research topic [31]. It requires the image information to be encrypted as binary data streams by employing some encoding methods. Especially, it is an effective way to use chaotic signals for scrambling the data streams and accomplishing image encryption. In [32], an encryption algorithm based on the synchronization scheme of chaotic systems was proposed, showing its stronger anti-deciphering ability compared to the nonchaotic synchronization ones. In 1971, Prof. Chua predicted the existence of memristor according to the completeness principle of circuit theory [33]. An experiment in HP laboratory successfully confirmed the existence of memristor [34] in 2008. Later, increasing research results prove that the chaotic system based on memristor behaves more complex dynamic behaviors and initial condition sensitivity [35,36]. In the consequence, combining memristor chaotic system (MCS) with cryptography, high security image encryption algorithms are designed, showing its great application value in image encryption, secure communication and other fields [37,38].
The special characteristics of memristor make the MCS an effective tool with higher initial value sensitivity, stronger pseudo-random and continuous broadband power spectrum characteristics in contrast to other traditional chaotic systems [39,40]. Thus, applying the synchronization of MCSs to achieve color image encryption will generate the anti-decoding ability and the key space. In [41], the FTS of MCSs was achieved and used to design an image encryption algorithm. The simulation results indicated that the encryption effect based on MCS had better decryption effect and less data loss compared with the same encryption algorithm based on the generalized chaotic systems. In [42], a new chaotic circuit with multiple memristors was used to implement image encryption. In [43], the proposed MCSs show great security on color image encryption by analyzing the encryption performances.
Inspired by the above analysis, this paper aims to realize the FTS and FxTS of MCSs via a unified control framework. In addition, an effective image encryption algorithm based upon MCSs is devised to show the potential application value. The main contributions of this paper are threefold.
(1) A unified framework based on SMC is proposed to solve the synchronization problem of MCSs.
(2) Different from the separate discussion of FTS and FxTS of MCSs, a unified framework is designed in this paper. By selecting different control parameters in the presented controller, FTS and FxTS of MCSs can be achieved at the same time.
(3) An effective image encryption algorithm is put forward based on the synchronization of MCSs. We prove that the presented algorithm is a suitable choice for different size of general images and has great value for secure communication.
The rest of this paper is arranged as follows. In the second section, the preparation work is introduced. The main results are given in Section 3 and the numerical simulations are presented in Section 4. Section 5 introduces an image encryption algorithm, while its experiment performances are demonstrated in Section 6. Finally, the conclusion is given in Section 7.

System Description
Based on Chua's circuit [44], a memristor chaotic circuit is constructed as shown in Fig. 1. The mathematical model of the current I M (t) and the voltage V M (t) is described as where η and ξ are constants, z(t) is the internal state variable of the memristor. According to Kirchhoff's cur- rent law, it implies that where V 1 (t) is the voltage across the capacitor C 1 and V 2 (t) is the voltage across the capacitor C 2 , −G is a negative conductance, L is an inductor, R is a common resistor, and I L (t) is the current flowing through R and L. Set Set system (3) as the drive system and the corresponding response system is described as where u i (t) (i = 1, 2, 3, 4) are controllers designed later.
Define the errors as e i (t) = y i (t)−x i (t), i = 1, 2, 3, 4. Based on systems (3) and (4), the error dynamic system is expressed as

Definitions and Lemma
Here are some of the important definitions and lemma involved in this paper. (3) and (4) (3) and (4) are said to be synchronized in a fixed time, if they are firstly finite-time synchronized, and the settling time T (e(0)) is bounded by a positive constant t max which is independent of the initial state, i.e., T (e(0)) ≤ t max .

Definition 2 Systems
Remark 1 From the definitions above, the settling time for FTS is related to the initial condition, while the settling time of FxTS is regardless of the initial condition and there is a specific upper limit of the time.

Main Results
First of all, a sliding-mode surface (SMS) is devised. Then effective controller is designed to ensure that the system state variables reach the SMS in a finite/fixed time and remain on the surface afterward. The fourthorder SMS is designed as The state variables of the designed fourth-order SMS are given as is the signum function. And the derivation of (9) iṡ It is assumed that the system state variables are able to arrive at the surface Γ within a finite/fixed time T 1 . From the equivalent condition for existence of the sliding-mode, it implies that The state variables of system (5) converge to the SMS within a finite/fixed time T 1 firstly. After reaching the surface, system (12) is activated and its state variables tend to zero within another finite/fixed time T 2 . As a result, the settling time T satisfies T = T 1 +T 2 .

Reachability of the SMS
In this part, a suitable controller is designed first. Then reachability of SMS Γ will be discussed next. The controller is described as where α is a positive constant.

Theorem 1
The state variables of system (5) by employing the designed control rules (13) move to the SMS Γ and reach on it within a finite/fixed time T 1 satisfying whereγ = min {γ i }, ∥ · ∥ denotes the Euclidean norm.
Proof The proof process with detailed mathematical reasoning is shown in Appendix I.

Remark 2
In (14), the upper bound of T 1 depends on the initial condition ∥S(0)∥ and T 1 is a finite time when 0 ≤ v 2 ≤ 1. For v 2 > 1, the upper bound of T 1 depends on the values of parameters α,γ and v 2 and is independent of the initial condition, namely T 1 is a fixed time.

Stability of System Dynamics
Proof See Appendix II.

Remark 3
In (15), the upper bound of T 2 relies on the initial condition ∥e(0)∥ and T 2 is a finite time when 0 ≤ v 2 ≤ 1. For v 2 > 1, the upper bound of T 2 is only related to the values of parametersγ, v 1 and v 2 , namely T 2 is a fixed time independent of the initial condition. On the SMS, the equivalent system (12) along the surface is able to realize finite-time stability or fixedtime stability as v 2 takes different values. According to the theoretical results in Theorems 1 and 2, the conclusion is obtained that systems (3) and (4) can realize FTS or FxTS within the settling time T =T 1 + T 2 .
Remark 4 Different from the FTS and FxTS results of the chaotic system separately studied in [21,26,46], this paper puts forward a unified framework to realize the FTS and FxTS of the chaotic system simultaneously. In the meanwhile, the formulas for calculating the theoretical settling time range in different cases are also given. Remark 5 In [47][48][49], theoretical synchronization results of ordinary chaotic systems were studied. By contrast, the chaotic system with memristor studied in this paper is more complex. Besides considering the unified framework of FTS and FxTS of chaotic systems, a secure image encryption algorithm based upon the FT-S/FxTS of the MCSs is designed in this paper as well to realize image encryption and decryption.

Numerical Simulation
In this section, the numerical simulations are given to show the effectiveness of the FTS/FxTS results. Choose the parameters of the system (3) (3) have double scroll chaotic attractors, which is a typical feature shared by a kind of Chua's chaotic system. In the simulation experiment, choose the controller parameters γ i = 1 (i = 1, 2, 3, 4), α = 2. The initial conditions of systems (3) and (4) (4) can be synchronized and the system error curves in two cases can approach zero in a finite/fixed time under the action of the controller.
Next, the initial value y(0) of system (4) is changed to (40,60.01, 80.01, 20) T while keeping other conditions unchanged, then we get Figs. 6 and 7. As shown in Table  Fig. 4 with Fig. 6, the upper limit for the settling time varies with the initial value obviously. By comparing Fig. 5 with Fig. 7, it is inescapably clear that the settling time keeps the same even if the initial value changes. That is to say, the FTS of chaotic system is related to the initial values of the systems, while the FxTS of chaotic system is independent of the initial values of the systems.

Design of Encryption Algorithm
With the development of chaos theory, the application of chaotic synchronization in communication security has become a hot topic for scholars. A large number of chaotic encryption algorithms have been proposed.  Mode  A  T  C  G  1  00 11 10 01  2  00 11 01 10  3  11 00 10 01  4 11 00 01 10 5 01 10 00 11 6 01 10 11 00 7 10 01 00 11 8 10 01 11 00 From a genetic point of view, base pairs are chemical structures that form DNA encode genetic information.
Base pairs consist of A-T and C-G. Strictly speaking, a base pair is a pair of matching bases connected. Similarly, when a decimal number is represented in binary, only two separate symbols 0 and 1 are required. Consequently, it is a nature idea that binary numbers converted from decimal numbers can be represented by bases in the DNA and there are eight coding methods shown in Table II that meet the requirements.
The following example illustrates the use of the above coding methods in the image encryption process. Suppose that for a color image, the gray value of a pixel point is decimal 100, and its binary form is 01100100, which is coded to be "GCGA" by DNA coding according to mode 1. However, "GCGA" is decoded to be 10011000 according to mode 2, which is converted to the decimal value 152. It can be seen that through the simple operation of DNA encoding and decoding in different modes, a value can be greatly changed, which is also the basic principle of the encryption algorithm based on DNA encoding. On this basis, the specific steps of the DNA encryption algorithm on the basis of the synchronization of MCSs are introduced. Fig. 8 shows the flow chart of the DNA encryption algorithm and the specific steps are as follows: (1) The color digital image needing to be encrypted is divided into three image pixel value matrices with the size of M × N in R, G, and B components. The three matrices are described as I 1 , I 2 and I 3 , each element of which has a value range of 0-255.
(2) The size of each sub block is p × p which is much smaller than M ×N . Then, each image pixel value matrix is divided into M ×N where θ is the branch parameter. If θ keeps approaching to 4, an aperiodic and non convergent sequence can be obtained after iterating continuously with the mapping initial value k 0 ∈ (0, 1). In this paper, θ is set to 3.9999 as one of the encryption keys. k 0 , as one of the encryption keys as well, satisfies where Sum (I 1 ), Sum (I 2 ) are used to calculate the sum of all the elements of the matrices I 1 , I 2 respectively. (4) A chaotic sequence K 1 is decided by successive iteration of Logistic map according to (16) and its length is set as M × N . The element values of the sequence K 1 are converted into the range of 0 to 255 by where k j (j = 0, . . . , M × N − 1) are elements of K 1 , k j ′ are elements of K 1 ′ converted from K 1 , Q is a twodimensional matrix transformed from the sequence K 1 ′ with the size of M × N .
(5) In consideration of the encryption efficiency, the XOR operation is applied in the corresponding blocks of I 1 , I 2 , I 3 with that of Q, which gets I ′ 1 , I ′ 2 , I ′ 3 . (6) The four-order Runge-Kurta method is adopted to calculate system (3), and four chaotic sequences with length of M ×N p 2 are acquired and expressed as X 1 , X 2 , X 3 , X 4 respectively. The initial values of these four sequences X 1 (0), X 2 (0), X 3 (0), X 4 (0) are also part of the encryption algorithm keys.
(7) The same DNA coding method is chosen for the sub blocks at the same location of I ′ 1 , I ′ 2 and I ′ 3 , which is determined by X 1 . Because there are eight ways of DNA code, it needs to convert the element values of the sequence X 1 into an integer ranging from 1 to 8 determined by where ω m (m = 0, . . . , M ×N p 2 − 1) are elements of the chaotic sequence X 1 .
(8) Sequence X 2 determines the rules of DNA decoding after DNA coding and the element values are similarly converted into an integer ranging from 1 to 8 according to (19). DNA decoding is the reverse process of DNA coding.
(9) Scramble the positions of sub blocks twice. The element values of the sequences X 3 and X 4 are arranged in order from largest to smallest by where P 1 and P 2 are two position sequences gained before the ordering of each element in the sequences X 3 and X 4 . The the element values of P 1 and P 2 are taken as the coordinates of sub blocks to exchange positions, so as to get better scrambling effects. (10) By merging the two-dimensional matrices after two substitutions into a three-dimensional matrix, the encrypted image is obtained.

Experiment and Analysis of DNA Encryption Algorithm
Taking Lena's color image as an example, the encrypted image is obtained by using the designed encryption algorithm. By comparing the original image with the encrypted image shown in Fig. 9, the encrypted image dose not resemble the original image obviously. Next, the two images will be analyzed from statistical perspectives.

Histogram Analysis
In this part, the histograms of the original image are compared with that of the encrypted image. Each image has specific histograms, which can reflect the scrambling of image encryption algorithm. Histogram can directly reflect the statistical changes of the image before and after the operation of encryption. In order to prevent attackers from cracking the image information by analyzing the gray value distribution, the encrypted image histogram is required to be smooth and uniform. Fig. 10 shows the histograms of the Fig. 9 (a) in R, G, and B channels. It can be seen that the histogram shapes are steep and fluctuating. Fig. 11 shows the histograms of the encrypted image in R, G, and B three channels. It can be seen that the histogram shapes are uniform distributions. This indicates that if an attacker makes a statistical attack, he will not be able to obtain accurate information about the Fig. 9 (a) from the Fig.  9 (b).

Correlation Analysis of Pixel Values in Adjacent Locations
In this part, it has tested the correlation of 5000 pairs of adjacent pixels of the Fig. 9 (a) and the Fig. 9 (b) in the horizontal direction, vertical direction and diagonal direction respectively to analyze the encryption effect. The calculating method of correlation coefficient is expressed as where δ and σ are the values of two adjacent pixels in the image. The mean value E(δ) and variance D(δ) are defined as follows: The smaller the correlation between the gray values of adjacent areas, the stronger the ability of the image to resist attacks is. Fig. 12 shows the value distribution of 5000 pairs of adjacent pixels in Fig. 9 (a) of channel B. It is apparent that the value distribution of these pixels is similar to a positive scale function curve, which shows direct correlation of adjacent pixels in Fig. 9 (a). Fig. 13 shows the value distribution of 5000 pairs of adjacent pixels of Fig. 9 (b) in the horizontal, vertical, and diagonal direction of channel B. It is inescapably clear that these pixels are completely randomly distributed, and the correlation coefficient between adjacent position data values is almost zero. The validity of the encryption algorithm is verified. Table III shows the correlation coefficients between the adjacent positions of the original image and the encrypted image of Lena by different algorithms.
It is clear that the correlation coefficients of horizontal, vertical and diagonal directions of the three channels of Fig. 9 (a) are all close to 1, which shows that the gray values of adjacent positions are highly correlated. The correlation coefficients of the encrypted images are all almost 0, which indicates that the adjacent position gray values of R, G , and B channels of Fig. 9 (b) in horizontal, vertical and diagonal directions are basically not connected. Moreover, compared with the encrypted images in Refs. [51,52], the correlation of adjacent pixels of the encrypted image of this paper is lower, which reflects that the proposed encryption algorithm is relatively better.

Key Space Analysis
To prevent attacks, an effective encryption algorithm should have a large enough key space at least 2 100 in general assumption. The key space of an algorithm can be calculated according to the sensitivity of each key. The keys of the encryption algorithm in this paper includes the initial values of the four chaotic sequences derived from the system (3) and the Logistic map's parameter θ and its initial value k 0 , and the key space they constitute is 10 16 ×10 16 ×10 16 ×10 16 ×10 15 ×10 16 = 10 95 ≈ 2 315 . There is no doubt that this has a very large key capacity that can easily resist the exhaustive key method to crack the image.

Information Entropy Analysis
In information theory, entropy is the average amount of information contained in each message received. The more random the information source is, the greater the entropy is. Information entropy represents the overall characteristics of information sources in an evaluative sense. In the meanwhile, it can reflect the degree of confusion of information of a picture and its specific mathematical definition is where p (w i ) is the proportion of the image grey value and W represents the gray scale of the image, H(w) is the maximum information entropy. For example, when W = 256 = 2 8 , H = log 2 256 = 8. In particular, the actual information entropy measured will be little smaller than the ideal value. Therefore, the information entropy of the encrypted image of an effective encryption algorithm should be very close to 8. Table IV is the numerical comparisons about information entropy of the encrypted image of Lena in different algorithms. Obviously, the experimental data obtained by the proposed encryption algorithm are closer to the ideal value 8.

Remark 6
In [50], an encryption algorithm based on D-NA coding was adopted and showed good performance. Through the comparison of experimental data, the key space of the proposed encryption algorithm is much larger than 2 256 of [50]. In addition, the information entropy of the proposed algorithm of the encrypted image is 7.9993 and is closer to 8 than that of [50,51,53], which indicates that the encryption effect is more marvelous.

Analysis of Decrypted Image
The decryption process is completely opposite to the encryption process on the encrypted image. This paper will not repeat it. In the process of decryption, only if all the keys are accurate can the decrypted image be correctly gained. At the same time, the decrypted image ought to be like a replica of the original image. As shown in Fig. 14, the decrypted image is identical to Fig. 9 (a) from the visual point of view. In addition, Fig. 15 shows the histograms of Fig. 14 in three channels, which is identical with Fig. 10. It reflects that the encryption and decryption results are excellent.

Key Sensitivity Analysis
A secure image encryption algorithm is supposed to be sensitive to the keys in the processes of encryption and decryption. It means that small changes in the keys can lead to severe distortions of the encrypted and decrypted images. Key sensitivity guarantees the uniqueness of the keys. The encryption algorithm contains multiple keys, each of which contributes different values during the encryption process. Only when all the keys are correct can the clear original image be decrypted accurately. No matter which key is changed slightly during decryption, the correct original image cannot be obtained.
The sensitivity of the algorithm to the keys by slightly changing the value of one of the keys during decryption is tested. For example, after changing the value 0.7803 of X 4 (0) into 0.7803000000000001 when used to the decryption, a new decrypted image not containing any relevant information on original image is shown in Fig. 16. The range of key changes only as small as 10 −16 , but the original image is still not visible from the decrypted image. The experimental results show that only accurate keys can get the accurate decrypted image. It indicates that the key sensitivity of this algorithm is extremely strong.

Conclusion
This paper has presented a unified framework for using SMC to design FTS/FxTS of MCSs. Unlike separate discussions of FTS and FxTS of MCSs, a unified framework is designed in this paper to achieve FTS and FxTS of MCSs at the same time by selecting different control parameters in a simple controller. In addition, an efficient image encryption algorithm on the bases of the FTS/FxTS of MCSs has been designed. Simulation results and performance analyses have demonstrated that our proposed image encryption algorithm has good encryption and decryption effects with high security, large key space and superb key sensitivity. In practical applications, synchronization studies are generally not limited to the synchronization of one drive system and one response system. Consequently, studying the synchronization of multiple MCSs will be a part of our next research plan. Moreover, the ability of encryption algorithm to resist attack is also an important indicator to measure whether the algorithm is reliable enough, which is not taken into account in this paper. Therefore, we intend to design new encryption algorithms with faster encryption speed and stronger reliability and use more convincing indicators to judge the encryption algorithms.
The following part will discuss the different three cases of v 2 .

Proof of Theorem 2
Choose the quadratic function And the derivation of (34) iṡ whereγ = max {γ i } , i = 1, 2, 3, 4. The following will also discuss the three different cases of v 2 .