1 Introduction

In the past decades, various applications of chaotic systems and different methods for chaos synchronization have been developed by many researchers in the world [1,2,3,4,5,6,7,8,9,10]. In the area of signal processing and chaotic communication, some practical applications such as spread-spectrum systems [11], radar systems [12], ultra-wide-band communication [13], image and video encryption [14,15,16,17] and secure communication [18] can be mentioned. Specifically, in the field of secure communication, according to the concept of drive-response provided by Pecora and Carroll [19], many secure communication systems have been successfully designed. Based on these approaches, chaotic shift-keying [20], chaotic-modulation [21], chaotic-masking [22] and chaotic encryption [23,24,25] have been investigated. Also, in the field of chaos synchronization methods, various techniques such as neural-based control [26], digital redesign control [27], backstepping control [28], impulsive control [29], intermittent control [30, 31], switching control [32], optimal control [33], composite nonlinear feedback [34], state-feedback control [35] and sliding mode control [36,37,38] can be considered. Sliding mode control (SMC) is an efficient robust control method that has been applied to control the linear and nonlinear systems such as power systems [39], electrical motors [40], robotic manipulators [41] and secure communication [42]. The considerable features of SMC are the robustness against uncertainties, fast response, insensitivity to the disturbances, computational simplicity with respect to other robust control methods [43,44,45,46,47,48,49,50,51,52,53,54,55].

On the other hand, recent improvements in the hardware technology and wireless communications have simplified the development of wireless sensor networks for a wide range of real-world applications, containing disaster relief, environmental monitoring, battlefield surveillance, site security, medical diagnostics, and so on. In general, security in data transmission for a communication system is essential. There are many challenges on the way of using secure protocols for WSNs as the communication systems. These communication systems are composed of at least one base station and many sensor nodes which deal with many restrictions, including restrictions on battery lifetime as well as processing and memory capabilities. Because of low cost and high-security properties of the chaotic signals and due to above-mentioned features of SMC, implementation of secure communication in wireless sensor networks (WSNs) using chaos synchronization via SMC is a useful solution and they can perfectly resolve security issues in WSNs. On the regards of applying chaos in WSNs, several methods have been investigated. In [55], a chaotic crypto-system with special focus on the dynamic chaotic S-Box has been proposed. A data security protocol for wireless sensor network using chaotic map has been introduced in [57]. An energy-aware chaotic communication in wireless sensor network by three nonlinear ordinary differential equations has been presented in [58]. A chaotic synchronization method has been also investigated in [59] for achieving secured communication between the base station and sensor nodes in a WSN. However, most of the existing works are mainly focused on the development of the chaotic encryption techniques in WSNs. Moreover, to the best of authors’ knowledge, the secure communication in wireless sensor networks based on adaptive finite time chaos synchronization under the noisy conditions and unbounded uncertainty has received less attention and the relevant theoretical advances have seldom been reported in the literature. This paper investigates finite time chaos synchronization based on data transmission by using the adaptive sliding mode control in presents of strong noise and unbounded uncertainty, and also enhances battery lifetime as well as relative security in WSNs. The proposed scheme and suggested controllers are robust to noise, parameter uncertainties and simple to be constructed. The paper is organized as follows: In Sect. 2, the model of chaotic WSN is presented. Main results containing the independent component analysis to separate noise from the signal and the design of an adaptive sliding mode controller for synchronization of the base station and sensor nodes are explained in Sect. 3. In Sect. 4, the employment of the proposed control technique on WSN systems is described. The numerical simulation results are presented in Sect. 5. Finally, conclusions are outlined in Sect. 6.

Fig. 1
figure 1

Schematics view of a WSN

2 Problem description

2.1 Model of chaotic WSN

Consider a modified Chua oscillator which is used in the base station to generate the chaotic signals \(x_1(t), x_2(t)\) and \(x_3(t)\). The data gathering from all the sensor nodes can be done using a selection method. The selector matrix M is multiplied by the first chaotic output signal of the base station and the chaotic signal \(Mx_1(t)\) is broadcasted to the sensor nodes. The matrix M is an \(n \times m\) matrix, where n is the number of sensors and m is the number of the route in the network routing table. This matrix is applied to choose the sensor and select the route that must be used for data transmission. For example, if one decides to gather the information from the sensor i on route j, the value of \(M_{i,j}\) becomes equal to 1. In this scheme, sensing range of the sensors in the idle mode is set to the minimum power level where the sensors can only hear the powerful chaotic signal \(Mx_1(t)\). Therefore, the power consumption comes down and after broadcasting the signal \(Mx_1(t)\), only sensor i and the sensors which are located on route j switch their sensing range from the idle mode to the TX/RX mode. On the other hand, in the selected sensor i, signal \(x_1(t)\) is used to generate the chaotic signals \(y_1(t), y_2(t)\) and \(y_3(t)\). By using these signals and a chaotic encryption scheme, the data are encrypted and sent to the base station. In the base station, because of the received signals from the sensor node have been mixed with noise at the transmission channel, employing an ICA technique, the chaotic signals are separated from the noise. Then, by implementing a finite-time sliding mode control synchronization method, the encrypted data are restored. Thus, in the proposed scheme, as already mentioned, besides the increase of the battery lifetime, the relative security for WSNs can be provided. The schematic view of the considered WSN system is shown in Fig. 1

2.2 Problem formulation

Changing the piecewise linear function f(x) in the differential equations of the general Chua oscillator and replacing it by a bounded and smooth function \(f(x_1)\), the modified Chua oscillator is obtained as

$$\begin{aligned} \begin{aligned}&\dot{x}_1 =\zeta \sigma (x_2-f(x_1))\\&\dot{x}_2 =\zeta (x_1-x_2+x_3)\\&\dot{x}_3 =-\zeta \gamma x_2\\ \end{aligned} \end{aligned}$$
(1)

with \(f(x_1)=-\sin (x_1)e^{-0.1|x|}\), where \(x_1, x_2\) and \(x_3\) are the system states, \(\sigma \) and \(\gamma \) are two appropriate positive constants which guarantee the chaotic behavior of the system and \(\zeta >0\) is a time-scaling factor [60]. For the parameters \(\sigma =9.35, \gamma =14.65\), and the initial conditions (\(14,1,-14\)) or (\(15,0,-15\)), the modified Chua oscillator system is chaotic and has a bounded attractor. Consider the dynamics of the base station chaotic system based on modified Chua oscillator as

$$\begin{aligned} \begin{aligned}&\dot{x}_1 =\zeta \sigma (x_2-f(x_1))\\&\dot{x}_2 =\zeta (x_1-x_2+x_3)+u_1\\&\dot{x}_3 =-\zeta \gamma x_2+u_2\\ \end{aligned} \end{aligned}$$
(2)

where \(u_1(t)\) and \(u_2(t)\) are the control inputs. Moreover, the chaotic system in the sensors can be considered as

$$\begin{aligned} \begin{aligned}&\dot{y}_{i1} =\zeta \kappa \, sgn(x_{i1}-y_{i1})\\&\dot{y}_{i2} =\zeta (y_{i1}-y_{i2}+y_{i3})\\&\dot{y}_{i3} =-\zeta (\gamma + \Delta \gamma _i)y_{i2}\\ \end{aligned} \end{aligned}$$
(3)

where \(y_{i1}, y_{i2}\) and \(y_{i3}\) are the system states, \(x_{i1}=Mx_1(t), M\in \mathbb {R}^{n \times m}\) is the selector matrix, \(\kappa \) is the design parameter, \(\gamma \) is the system parameter, \(\zeta >0\) is the time-scaling factor, and \(\Delta \gamma _i\) is designated as the parameter mismatch in each sensor where

$$\begin{aligned} \begin{aligned} \theta _i>|\Delta \gamma _i| \end{aligned} \end{aligned}$$
(4)

where \(\theta _i\) is the upper bound of \(\Delta \gamma _i\). Assuming that there are N sensors in a WSN, the parameter \(i,(i=1,2,\ldots ,N)\) represents each sensor node.

The synchronization errors are defined as

$$\begin{aligned} \begin{aligned}&e_{i1}=x_1-y_{i1}\\&e_{i2}=x_2-y_{i2}\\&e_{i3}=x_3-y_{i3}\\ \end{aligned} \end{aligned}$$
(5)

By differentiating (5) and subtracting (3) from (2), the synchronization error dynamics between sensors and base station are obtained as

$$\begin{aligned} \begin{aligned}&\dot{e}_{i1} =\zeta \sigma (x_2-f(x_1))-\zeta \kappa \, sgn(x_{i1}-y_{i1})\\&\dot{e}_{i2} =\zeta (e_{i1}-e_{i2}+e_{i3})+u_1\\&\dot{e}_{i3} =-\zeta \gamma e_{i2} + \zeta \Delta \gamma _iy_{i2}+u_2\\ \end{aligned} \end{aligned}$$
(6)

Our goal is to design controllers \(u_1\) and \(u_2\) such that the states of the base station chaotic system can be synchronized in a finite time with the states of the sensor nodes chaotic system. This problem can be converted to design controllers \(u_1\) and \(u_2\) in order to achieve the finite-time stability of the error system (6).

Lemma 1

[61] Consider a continuous positive-definite functional V(t) and a real number \(0< \lambda <1\) that is a ratio of two odd positive integers such that

$$\begin{aligned} \begin{aligned} \dot{V}(t)\le -\alpha _1V(t)^\lambda -\alpha _2V(t)\qquad \forall \, t\ge t_0 , V(t_0)\ge 0 \end{aligned}\nonumber \\ \end{aligned}$$
(7)

where \(\alpha _1,\alpha _2>0\). Then, for the initial time \(t_0\), the positive-definite functional V(t) approaches to the origin at least in a finite-time \(t_s\) as

$$\begin{aligned} \begin{aligned} t_s=t_0+\frac{1}{\alpha _2(1-\lambda )}\ln \frac{\alpha _1+\alpha _2V(t_0)^{1-\lambda }}{\alpha _1} \end{aligned} \end{aligned}$$
(8)

Proof

Dividing two sides of Eq. (7) by \(V(t)^\lambda \) yields

$$\begin{aligned} \begin{aligned} V(t)^{-\lambda }\dot{V}(t)\le -\alpha _1-\alpha _2V(t)^{1-\lambda } \end{aligned} \end{aligned}$$
(9)

where simplifying (9), we have

$$\begin{aligned} \begin{aligned} \mathrm{d}t\le -\frac{V(t)^{-\lambda }dV(t)}{\alpha _1+\alpha _2V(t)^{1-\lambda }} \end{aligned} \end{aligned}$$
(10)

By Integrating from two sides of the inequality (10) from \(t_0\) to \(t_s\), we achieve

$$\begin{aligned} \begin{aligned} t_s-t_0&\le -\int _{V(t_0)}^{0}\frac{V(t)^{-\lambda }dV(t)}{\alpha _1+\alpha _2V(t)^{1-\lambda }}\\&= \frac{\ln (\alpha _1+\alpha _2V(t_0)^{1-\lambda })-\ln \alpha _1}{\alpha _2(1-\lambda )}\\&=\frac{1}{\alpha _2(1-\lambda )}\ln \frac{\alpha _1+\alpha _2V(t_0)^{1-\lambda }}{\alpha _1} \end{aligned} \end{aligned}$$
(11)

which finalizes the proof of lemma. \(\square \)

Fig. 2
figure 2

The structure of MICA

3 Main results

3.1 Modified independent component analysis

In the real conditions, noise represents uncertainty in the telecommunication systems. The strong white Gaussian noises cause chaotic signals unrecognizable even when the robust methods are used for chaos synchronization. Thus, the noise must be separated from the chaotic signals before the synchronization process. In this study, a modified independent component analysis (MICA) is used to separate the chaotic signals from the noise. As mentioned in the problem description section, obtaining data from all sensor nodes can be done using the selector matrix M. Consequently, we can ignore the index i and consider the transmitted signals from the sensor node mixed with Gaussian noise, as

$$\begin{aligned} \begin{aligned} s_1(t)=a_{11}y_1(t)+a_{12}y_2(t)+a_{13}y_3(t)+a_{14}y_4(t)\\ s_2(t)=a_{21}y_1(t)+a_{22}y_2(t)+a_{23}y_3(t)+a_{24}y_4(t)\\ s_3(t)=a_{31}y_1(t)+a_{32}y_2(t)+a_{33}y_3(t)+a_{34}y_4(t)\\ s_4(t)=a_{41}y_1(t)+a_{42}y_2(t)+a_{43}y_3(t)+a_{44}y_4(t)\\ \end{aligned}\nonumber \\ \end{aligned}$$
(12)

where \(y_1(t)=m_e(t)\) is the masked message signal, \(y_2(t)\) and \(y_3(t)\) are the sensor chaotic signals and \(y_4(t)=n(t)\) is the white Gaussian noise. The Eq. (12) can be simplified as

$$\begin{aligned} \begin{aligned} S=A \cdot Y \end{aligned} \end{aligned}$$
(13)

Setting some of the elements of the matrix A to zero, the mixing matrix A can be considered as

$$\begin{aligned} \begin{aligned} A= \begin{bmatrix} a_{11}&\quad 0&\quad 0&\quad a_{14}\\ 0&\quad a_{22}&\quad 0&\quad a_{24}\\ 0&\quad 0&\quad a_{33}&\quad a_{34}\\ a_{41}&\quad a_{42}&\quad a_{43}&\quad a_{44} \end{bmatrix} \end{aligned} \end{aligned}$$
(14)

In matrix (14), the elements \(a_{41}, a_{42}, a_{43}\) and \(a_{44}\) must have known and equal values such as one, while other non-zero elements of the matrix can have an unknown and randomly selected value. The components of \(y_i(t)\) are independent and hence, the independent component analysis can be used for signals separation. ICA can calculate the unmixing matrix W that is the inverse matrix of A. In order to calculate the unmixing matrix W, the joint approximate diagonalization of eigenvalues for real signal (JADER) algorithm [62, 63] is used. Using the matrix W, we can obtain the separated signals similar to the original ones as

$$\begin{aligned} \begin{aligned} \hat{y}_1(t)=w_{11}s_1(t)+w_{12}s_2(t)+w_{13}s_3(t)+w_{14}s_4(t)\\ \hat{y}_2(t)=w_{21}s_1(t)+w_{22}s_2(t)+w_{23}s_3(t)+w_{24}s_4(t)\\ \hat{y}_3(t)=w_{31}s_1(t)+w_{32}s_2(t)+w_{33}s_3(t)+w_{34}s_4(t)\\ \hat{y}_4(t)=w_{41}s_1(t)+w_{42}s_2(t)+w_{43}s_3(t)+w_{44}s_4(t)\\ \end{aligned}\nonumber \\ \end{aligned}$$
(15)

Also, to calculate accurately the amplitude and phase of the obtained signals \(\hat{y}_i(t)\), the gradient estimation method [63] is applied. In this method, the appropriate values of the gain vector can be used to adjust opposite phase and unequal amplitude of the signals \(\hat{y}_i(t)\). As shown in Fig. 2, the adjustable gain vector \(G(t)=[g_1(t),g_2(t),g_3(t),g_4(t)]^T\) is multiplied by \(\hat{Y}(t)=[\hat{y}_1(t),\hat{y}_2(t),\hat{y}_3(t),\hat{y}_4(t)]^T\) and we have

$$\begin{aligned} z(t)= & {} g_1(t)\hat{y}_1(t)+g_2(t)\hat{y}_2(t)+g_3(t)\hat{y}_3(t)\nonumber \\&+g_4(t)\hat{y}_4(t) \end{aligned}$$
(16)

The error of the gradient estimation algorithm can be taken as

$$\begin{aligned} \begin{aligned} e(t)=s_1(t)-z(t) \end{aligned} \end{aligned}$$
(17)

The update rules of the gain vector G(t) can be defined via the recursive relations as

$$\begin{aligned} \begin{aligned} g_1(t+1)=g_1(t)+\mu [e(t)\hat{y}_1(t)]\\ g_2(t+1)=g_2(t)+\mu [e(t)\hat{y}_2(t)]\\ g_3(t+1)=g_3(t)+\mu [e(t)\hat{y}_3(t)]\\ g_4(t+1)=g_4(t)+\mu [e(t)\hat{y}_4(t)]\\ \end{aligned} \end{aligned}$$
(18)

where \(\mu \) is the step size of the iterations. After some iteration, the gain values \(g_i(t)\) converge to the constants. When the gains \(g_i(t)\) are fixed, the error of the gradient estimation algorithm is convergent to zero and then, the original signals \(y_i(t)\) and estimated signals \(\tilde{y}_i(t)\) are identical, i.e.,

\(y_i(t)\approx \tilde{y}_i(t)=g_i(t)\hat{y}_i(t).\)

Remark 1

There are some specific conditions and restrictions for applications of ICA to separate noise from chaotic signals. All components \(y_i\) must be statistically independent which means that \(p(y_1,y_2,y_3,y_4)=p_1(y_1)p_2(y_2)p_3(y_3)p_4(y_4)\), where p(.) is the probability of the components. Also, according to the central limit theorem, one component is allowed to have a Gaussian distribution and other independent components \(y_i\) must be non-Gaussian in distribution. These conditions are fundamental for the effectiveness of retrieving signals by ICA.

3.2 Adaptive finite-time sliding mode controller design

After the incoming signals at the base station are separated, the synchronization of the chaotic signals must be performed. In this section, we use the cascade synchronization method to present the error dynamics. In this method, the error system (6) is divided into two different subsystems. In fact, the synchronization error \(e_{i1}\) is considered as an external input to the dynamics of \(e_{i2}\) and \(e_{i3}\). Therefore, ignoring index i in the error signals, the system (6) is divided into two subsystems as

$$\begin{aligned} \begin{aligned} \dot{e}_1 =\zeta \sigma (x_2-f(x_1))-\zeta \kappa \, sgn(x_1-y_1) \end{aligned} \end{aligned}$$
(19)

and

$$\begin{aligned} \begin{aligned}&\dot{e}_2 =\zeta (e_1-e_2+e_3)+u_1\\&\dot{e}_3 =-\zeta \gamma e_2 + \zeta \Delta \gamma y_2+u_2\\ \end{aligned} \end{aligned}$$
(20)

Hence, the design procedure of the controller consists of two steps as follows:

Step 1 In Eq. (19), the function \(f(x_1)\) is such that \(|f(x_1)|\le 1,\,\forall t\ge 0.\) Since system (2) has the chaotic behavior, signal \(x_2(t)\) is bounded and thus there exists a constant \(\delta \ge 0\) such that \(|x_2(t)| \le \delta \,, \forall t \ge 0\). In fact, parameter \(\delta \) depends on the initial conditions. However, assuming that \(x_2(0)\) lies inside the attractor, then \(\delta \) can be obtained independently from the initial conditions. Choose the candidate Lyapunov function as

$$\begin{aligned} \begin{aligned} V_1(e_1)=\frac{1}{2}e_1^2 \end{aligned} \end{aligned}$$
(21)

The derivative of the Lyapunov function (21) along the trajectory of (19) is obtained as

$$\begin{aligned} \dot{V}_1(e_1)= & {} e_1 \dot{e}_1 \nonumber \\= & {} e_1\zeta \sigma x_2-e_1 \zeta \sigma f(x_1)-e_1 \zeta \kappa \, sgn(e_1)\nonumber \\= & {} -\zeta \kappa |e_1|+\zeta \sigma x_2 e_1-\zeta \sigma f(x_1) e_1\nonumber \\\le & {} -\zeta \kappa |e_1|+\zeta \sigma x_2 e_1+|\zeta \sigma |\cdot 1 \cdot |e_1|\nonumber \\\le & {} -\zeta \kappa |e_1|+\zeta \sigma x_2 e_1+\zeta \sigma |e_1|\nonumber \\\le & {} -\zeta \kappa |e_1|+\zeta \sigma \delta |e_1|+\zeta \sigma |e_1|\nonumber \\\le & {} -\zeta |e_1|(\kappa -\sigma (\delta +1)) \end{aligned}$$
(22)

Recall that \(\zeta >0\) and if and only if \(\kappa >\sigma (\delta +1)\), one can write

$$\begin{aligned} \begin{aligned} \dot{V}_1(e_1)\le -\zeta |e_1|=-\alpha V_1^\lambda \end{aligned} \end{aligned}$$
(23)

where \(\alpha =\sqrt{2}\zeta \) and \(\lambda =\frac{1}{2}\). Under the condition (23), the subsystem (19) is finite-time stable. This means that there is a constant finite time \(T_1\) such that \(e_1 \equiv 0\) is obtained for \(t \ge T_1\).

Step 2 When \(t \ge T_1\), we achieve \(e_1 \equiv 0\) and Eq. (20) converts to

$$\begin{aligned} \begin{aligned}&\dot{e}_2 = \zeta (e_3-e_2)+u_1\\&\dot{e}_3 = -\zeta \gamma e_2+\zeta \Delta \gamma y_2+u_2 \end{aligned} \end{aligned}$$
(24)

In this step, our aim is to design an appropriate sliding surface for the error subsystem (24) and control laws \(u_1\) and \(u_2\) for the chaotic system (2) to achieve a robust finite-time synchronization scheme between chaotic systems (2) and (3).

The global sliding surface for the subsystem (24) is presented by

$$\begin{aligned} \begin{aligned} s(t)= \sum _{k=2}^{3}c_k(e_k(t)-e_k(0)\,\exp (-\varphi _kt)) \end{aligned} \end{aligned}$$
(25)

where \(c_k\)’s are the gain coefficients and \(\varphi _k\)’s are the appropriate positive constants.

Remark 2

Using the exponential term \(e_k(0)\exp (-\varphi _kt)\), the global sliding surface (25) is defined to eliminate the reaching phase, i.e., the states of the system begin at the sliding surface from the first moment and the global robustness of the whole system can be guaranteed.

Theorem 1

Consider the error dynamical system (24). Applying the control inputs \(u_1(t)\) and \(u_2(t)\) as

$$\begin{aligned} u_1= & {} -\zeta (e_3-e_2)-\varphi _2e_2(0)\exp (-\varphi _2t)\nonumber \\&-\frac{\rho }{c_2}sgn(s(t))|s|^\beta -\vartheta s(t)\end{aligned}$$
(26)
$$\begin{aligned} u_2= & {} \zeta \gamma e_2-\varphi _3e_3(0)\exp (-\varphi _3t)\nonumber \\&-\psi \,sgn(s(t))|y_2| \end{aligned}$$
(27)

with arbitrary positive constants \(\rho \) and \(\vartheta \), then the error dynamics (24) is forced to move from any initial condition to the global sliding surface (25) in the finite time \(T_2\) and to remain on it.

Proof

From (25), the time-derivative of the global sliding surface is obtained as

$$\begin{aligned} \begin{aligned} \dot{s}(t)= \sum _{k=2}^{3}c_k(\dot{e}_k(t)+\varphi _ke_k(0)\exp (-\varphi _k(t)) \end{aligned} \end{aligned}$$
(28)

where substituting (24) into (28), one can obtain

$$\begin{aligned} \begin{aligned} \dot{s}(t) =&\,c_2(\zeta (e_3-e_2)+u_1+\varphi _2 e_2(0)\exp (-\varphi _2(t))\\&+c_3(-\zeta \gamma e_2+\zeta \Delta \gamma y_2+u_2\\&+\varphi _3 e_3(0)\exp (-\varphi _3t) \end{aligned} \end{aligned}$$
(29)

Consider the candidate Lyapunov function as

$$\begin{aligned} \begin{aligned} V_2(s(t))=\frac{1}{2}s(t)^2 \end{aligned} \end{aligned}$$
(30)

where differentiating \(V_2(s(t))\) and using (29), it yields that

$$\begin{aligned} \begin{aligned} \dot{V}_2(s)&=s(t)\dot{s}(t) \\&=s(t) \{ c_2(\zeta (e_3-e_2)+\varphi _2 e_2(0)\exp (-\varphi _2t)\\&\quad +\, c_3(-\zeta \gamma e_2+\zeta \Delta \gamma y_2\\&\quad +\,\varphi _3 e_3(0)\exp (-\varphi _3t))+c_2u_1+c_3u_2 \} \end{aligned}\nonumber \\ \end{aligned}$$
(31)

Now, using the control inputs (26) and (27), we have

$$\begin{aligned} \begin{aligned} \dot{V}_2(s(t))&= s(t)\{-\rho \,sgn(s(t))|s|^\beta -c_2\vartheta s(t)\\&\qquad +c_3\zeta \Delta \gamma y_2-c_3 \psi |y_2|\,sgn(s(t))\}\\&\qquad \le - \rho |s(t)|^{\beta +1}-c_2 \vartheta s(t)^2+c_3 \zeta \Delta \gamma y_2s(t)\\&\qquad -c_3 \psi |y_2s(t)|\\&\qquad \le - \rho |s(t)|^{\beta +1}-c_2 \vartheta s(t)^2\\&\qquad -c_3(\psi -\zeta \Delta \gamma \,sgn(y_2s(t)))|y_2s(t)| \end{aligned}\nonumber \\ \end{aligned}$$
(32)

where based on the condition (4) and \(\psi \ge \zeta \theta \), Eq. (32) can be simplified as

$$\begin{aligned} \begin{aligned} \dot{V}_2(s(t))&\le -\rho |s(t)|^{\beta +1}-c_2 \vartheta s(t)^2 \\&= -\alpha _1V_2(s(t))^\lambda - \alpha _2V_2(s(t)) \end{aligned} \end{aligned}$$
(33)

where \(\alpha _1=2^\lambda \rho , \alpha _2=2c_2\vartheta \) and \(\lambda = \frac{\beta +1}{2}\). This means that the Lyapunov function \(V_2(s(t))\) decreases gradually. Then, the global sliding surface (25) converges to zero in the finite time and the synchronization errors (24) are convergent to the origin in the finite time. Therefore, when \(t>T_2>T_1\), one obtains \(y_1 \equiv x_1, y_2 \equiv x_2\) and \(y_3 \equiv x_3\). Consequently, the base station chaotic system (2) is synchronized with the sensor node chaotic system (3) using controllers (26) and (27) in the finite time. \(\square \)

Considering the condition (4), it is not easy to attain the upper bound \((\theta )\) and \((\psi \ge \zeta \theta )\) of the parameter mismatch \(\Delta \gamma \). As a result, an adaptation law can be proposed to dominate this problem. Then, the controller (27) is modified to

$$\begin{aligned} \begin{aligned} u_2&= \zeta \gamma e_2 - \varphi _3 e_3(0)\exp (-\varphi _3 t)\\&-\hat{\psi }(t) \Omega (\hat{\omega }(t),s(t))|y_2| \end{aligned} \end{aligned}$$
(34)

where \(\hat{\psi }(t)\) is the estimate of \(\psi \) in (27), and \(\Omega (\hat{\omega }(t),s(t))\) is a bipolar function as

$$\begin{aligned} \begin{aligned} \Omega (\hat{\omega }(t),s(t))=\frac{1-\exp (-\hat{\omega }(t) s(t))}{1+\exp (-\hat{\omega }(t) s(t))} \end{aligned} \end{aligned}$$
(35)

with the adaptation parameters \(\hat{\psi }(t)\) and \(\hat{\omega }(t)\) which can be updated by

$$\begin{aligned} \dot{\hat{\psi }}(t)= & {} \beta _1 \frac{1+\exp (-\hat{\omega }(t) s(t))}{1-\exp (-\hat{\omega }(t) s(t))}s(t)^\lambda \,sgn \big (\frac{\partial s(t)}{\partial u_2(t)} \big ) \end{aligned}$$
(36)
$$\begin{aligned} \dot{\hat{\omega }}(t)= & {} \beta _2 \hat{\psi }^{-1} \frac{(1+\exp (-\hat{\omega }(t) s(t)))^2}{2\exp (-\hat{\omega }(t) s(t))} sgn \big (\frac{\partial s(t)}{\partial u_2(t)}\big )\nonumber \\ \end{aligned}$$
(37)

where \(\beta _1\) and \(\beta _2\) are two positive constants.

Theorem 2

Consider the base station and sensor chaotic systems (2) and (3). If the control inputs are selected as (26) and (34) and the adaptation laws are chosen as (36) and (37), then the trajectories of the error system (24) are forced toward the global sliding surface (25) in the finite time \(T_2\) and the reaching condition is satisfied.

Proof

Consider the candidate Lyapunov function (30). Using direct differentiation of the Lyapunov function, we obtain

$$\begin{aligned} \begin{aligned} \frac{dV_2(s(t))}{dt}&=\frac{\partial V_2(s(t))}{\partial s(t)}\frac{\partial s(t)}{\partial u_2(t)} \\&\quad \bigg \{\frac{\partial u_2(t)}{\partial \hat{\psi }(t)}\frac{\partial \hat{\psi }(t)}{\partial t}+\frac{\partial u_2(t)}{\partial \hat{\omega }(t)}\frac{\partial \hat{\omega }(t)}{\partial t}\bigg \} \end{aligned} \end{aligned}$$
(38)

The first term on the right-hand side equation of (38) can be simplified using (34)–(36) as

$$\begin{aligned}&\dot{V}_3(s(t))=\frac{\partial V_2(s(t))}{\partial s(t)}\frac{\partial s(t)}{\partial u_2(t)}\frac{\partial u_2(t)}{\partial \hat{\psi }(t)}\frac{\partial \hat{\psi }(t)}{\partial t}\nonumber \\&\quad = s(t)\frac{\partial s(t)}{\partial u_2(t)}\bigg [-|y_2|\Omega (\hat{\omega }(t),s(t))\bigg ] \nonumber \\&\qquad \bigg [\beta _1 \frac{1+\exp (-\hat{\omega }(t) s(t))}{1-\exp (-\hat{\omega }(t) s(t))}s(t)^\lambda \,sgn \bigg (\frac{\partial s(t)}{\partial u_2(t)}\bigg )\bigg ]\nonumber \\&\quad =-\beta _1|y_2|\bigg |\frac{\partial s(t)}{\partial u_2(t)}\bigg |s(t)^{\lambda +1} \end{aligned}$$
(39)

where (39) can be rewritten as

$$\begin{aligned} \begin{aligned} \dot{V}_3(s(t))\le -\alpha _1V_2(s(t))^{\bar{\lambda }} \end{aligned} \end{aligned}$$
(40)
Fig. 3
figure 3

Block diagram of proposed chaotic communication system

Fig. 4
figure 4

The original signals \(y_1(t), y_2(t), y_3(t)\) and white Gaussian noise \(y_4(t)=n(t)\)

Fig. 5
figure 5

The mixed signals \(s_i(t),i=1,\ldots , 4\)

Fig. 6
figure 6

The separated and retrieved signals by modified ICA

Fig. 7
figure 7

Synchronization performance using controller in [60]

Fig. 8
figure 8

Synchronization errors using controller in [60]

with \(\bar{\lambda }=\frac{\lambda +1}{2}\) and \(\alpha _1 \le 2^{\bar{\lambda }}\beta _1|y_2|\big |\frac{\partial s(t)}{\partial u_2(t)}\big |\) . Moreover, the second term on the right-hand side equation of (38) is simplified using (34), (35) and (37) as

$$\begin{aligned}&\dot{V}_4(s(t)) =\frac{\partial V_2(s(t))}{\partial s(t)}\frac{\partial s(t)}{\partial u_2(t)}\frac{\partial u_2(t)}{\partial \hat{\omega }(t)}\frac{\partial \hat{\omega }(t)}{\partial t}\nonumber \\&\quad =s(t)\frac{\partial s(t)}{\partial u_2(t)}\bigg [\frac{-2 \hat{\psi }|y_2|s(t)\exp (-\hat{\omega }(t)s(t))}{(1+\exp (-\hat{\omega }(t)s(t)))^2}\bigg ]\nonumber \\&\qquad \bigg [\beta _2 \hat{\psi }^{-1} \frac{1+\exp (-\hat{\omega }(t) s(t))}{2\exp (-\hat{\omega }(t) s(t))}\,sgn \bigg (\frac{\partial s(t)}{\partial u_2(t)}\bigg )\bigg ]\nonumber \\&\quad =-\beta _2|y_2|\bigg |\frac{\partial s(t)}{\partial u_2(t)}\bigg |s(t)^2 \end{aligned}$$
(41)

and consequently

$$\begin{aligned} \begin{aligned} \dot{V}_4(s(t))\le -\alpha _2V_2(s(t)) \end{aligned} \end{aligned}$$
(42)

where \(\alpha _2\le 2\beta _2|y_2|\big |\frac{\partial s(t)}{\partial u_2(t)}\big |\). Then, considering (40) and (42), we obtain

$$\begin{aligned} \begin{aligned} \dot{V}_2(s(t))&=\dot{V}_3(s(t))+\dot{V}_4(s(t))\le -\alpha _1 V_2(s(t))^{\bar{\lambda }}\\&-\alpha _2V_2(s(t)) \end{aligned} \end{aligned}$$
(43)

which satisfies the finite-time stability of the error dynamics (24). This finishes the proof. \(\square \)

Remark 3

To eliminate the chattering phenomenon affected by the discontinuous function sgn(s(t)), the controller (26) and the adaptation laws (36) and (37) can be modified using the continuous hyperbolic tangent function. Then, the updated control inputs and adaptation laws are written as

$$\begin{aligned} u_1= & {} -\zeta (e_3-e_2)-\varphi _2e_2(0)\exp (-\varphi _2t)\nonumber \\&-\frac{\rho }{c_2}\tanh (\ell s(t))|s|^\beta -\vartheta s(t) \end{aligned}$$
(44)
$$\begin{aligned} u_2= & {} \zeta \gamma e_2 - \varphi _3 e_3(0)\exp (-\varphi _3 t)\nonumber \\&-\hat{\psi }(t) \Omega (\hat{\omega }(t),s(t))|y_2| \end{aligned}$$
(45)

and

$$\begin{aligned} \dot{\hat{\psi }}(t)= & {} \beta _1 \frac{1+\exp (-\hat{\omega }(t) s(t))}{1-\exp (-\hat{\omega }(t) s(t))}s(t)^\lambda \nonumber \\&\tanh \left( \ell \frac{\partial s(t)}{\partial u_2(t)} \right) \end{aligned}$$
(46)
$$\begin{aligned} \dot{\hat{\omega }}(t)= & {} \beta _2 \hat{\psi }^{-1} \frac{(1+\exp (-\hat{\omega }(t) s(t)))^2}{2\exp (-\hat{\omega }(t) s(t))}\nonumber \\&\tanh \left( \ell \frac{\partial s(t)}{\partial u_2(t)}\right) \end{aligned}$$
(47)

where \(\ell \) is the steepness coefficient of the hyperbolic tangent function.

Fig. 9
figure 9

States \(x_1\) and \(y_1\) of the chaotic systems using proposed controllers (26) and (34)

Fig. 10
figure 10

States \(x_2\) and \(y_2\) of the chaotic systems using proposed controllers (26) and (34)

Fig. 11
figure 11

States \(x_3\) and \(y_3\) of the chaotic systems using proposed controllers (26) and (34)

Fig. 12
figure 12

Synchronization errors using finite-time controllers (26) and (34)

Fig. 13
figure 13

a, b Control inputs(26) and (34), and c Global sliding surface (25)

Fig. 14
figure 14

Analog message signal using finite-time controller, a original and retrieved message, b encrypted message

Fig. 15
figure 15

Digital message signal using finite-time controller, a original and retrieved message, b encrypted message

4 Application in WSNs

The block diagram of the secure communication system in a WSN is shown in Fig. 3. In this system, at first, \(x_1\) as one of the state variables of the base station chaotic system, is encrypted using the key signal \(k_1(t)\) and multiplied by the selector matrix M. Then, the resulted signal \(Mx_{1e}(t)\) is broadcasted to the sensor nodes. After receiving and decrypting the signal \(Mx_{1e}(t)\) using the same key, the target sensor i encrypts the information signal m(t) and sends the encrypted signal \(m_e(t)\) to the base station. The encryption scheme in the sensor node consists of the chaotic-masking and chaotic encryption techniques. In this scheme, the key \(k_1(t)\) is added with the first state \(y_1(t)\), and the message signal m(t) is added with the second state \(y_2(t)\) of the sensor chaotic system. Then, the masked signals \(k(t)=k_1(t)+y_1(t)\) and \(m_1(t)=m(t)+y_2(t)\) are applied to the encryptor/decryptor block. In the encryptor/decryptor block, the multi-shift cipher encryption algorithm is employed to encrypt the message signal using the following equation [64]

$$\begin{aligned} e(m_1(t))= & {} \underbrace{f_1(\ldots f_1(f_1}_{n}(m_1(t),k(t)), \underbrace{ k(t)),\ldots ,k(t))}_{n}\nonumber \\= & {} m_{e1}(t) \end{aligned}$$
(48)

where \(f_1(.)\) is a piecewise function described by

$$\begin{aligned}&f_1(m_1(t),k(t))\nonumber \\&\quad ={\left\{ \begin{array}{ll} (m_1(t)+k(t))+2h &{}\quad -2h \le (m_1(t)+k(t)) \le -h\\ (m_1(t)+k(t)) &{}\quad -h< (m_1(t)+k(t)) \le h\\ (m_1(t)+k(t))-2h &{}\quad h < (m_1(t)+k(t)) \le 2h\\ \end{array}\right. }\nonumber \\ \end{aligned}$$
(49)

and h is selected such that \(m_1(t)\) and k(t) lie within the interval \([-h,h]\).

Finally, the encrypted signal \(m_{e1}(t)\) is added with the third state of the sensor chaotic system \(y_3(t)\) and the masked signal \(m_e(t)=m_{e1}(t)+y_3(t)\) is obtained. Then, the masked signal and the states of the chaotic oscillator in the sensor nodes are sent to the base station. Considering the white Gaussian noise in the communication channel, the received signals in the base station are mixed as Eqs. (12) by nonsingular mixing matrix A in (14). At first, by applying the modified ICA, the unmixing matrix \(W \approx A^{-1}\) is calculated via JADER algorithm and the optimal amplitude and phase are estimated by using the gradient estimation algorithm. After the incoming signals at the base station are separated and retrieved, by using the synchronizer block, the states of the base station chaotic system can be synchronized with the states of the sensor nodes chaotic system in a finite time. Hence, the message signal can be recovered using a recursive method. In the recursive method, according to the chaotic-masking concept, the signal \(x_3(t)\) is subtracted from \(m_e(t)\) and the key signal \(k_1(t)\) is added to the signal \(x_1(t)\) such that the signals \(\tilde{m}_{e1}(t)=m_e(t)-x_3(t)\) and \(\tilde{k}(t)=k_1(t)+x_1(t)\) are obtained. Now, replacing k(t) and \(m_1(t)\) by \(-\tilde{k}(t)\) and \(\tilde{m}_{e1}(t)\) in (48), the decrypted signal is found as

$$\begin{aligned} \begin{aligned} d(\tilde{m}_{e1}(t))=&\,\underbrace{f_1(\ldots f_1(f_1}_{n}(\tilde{m}_{e1}(t),- \tilde{k}(t)), \\&\underbrace{ - \tilde{k}(t)),\ldots ,- \tilde{k}(t))}_{n}= \tilde{m}_1(t) \end{aligned} \end{aligned}$$
(50)

and by subtracting \(x_2(t)\) from \(\tilde{m}_1(t)\), the original message signal is recovered as \(\tilde{m}(t)\).

5 Numerical results

In this section, the simulation results of the proposed scheme are described. The base station chaotic system (2) with \(\sigma =9.35\) and \(\gamma =14.65\), and the initial condition \((x_1(0),x_2(0),x_3(0))=(15,0,-15)\) is considered.

The sensor node chaotic system (3) with \(\kappa =100\) and \(\gamma =14.65\), and the initial condition \((y_1(0),y_2(0),y_3(0))=(14,1,-14)\) is specified.

In the sensor nodes, the uncertainty parameter is assumed as: \(\Delta \gamma _i=5t+0.3\sin (y_1t)+0.2\sin (y_2+y_3\sqrt{t})\). Assuming \(\mu =0.01\), the variables \(g_1(t), g_2(t), g_3(t)\) and \(g_4(t)\) are calculated using gradient estimation algorithm as \(g_1(t)=4.93 , g_2(t)=-1.037 , g_3(t)=-1.632\) ,\(g_4(t)=1.005\).

Figure 4 shows the original signals \(y_i(t),i=1,2,3\) and the white Gaussian noise \(y_4(t)\). The received signals at the base station mixed as Eq. (12) are presented in Fig. 5. As indicated in Fig. 6, the mixed signals are separated and retrieved successfully by using the modified ICA.

Figs. 7 and 8 show the simulation results of the method in [60]. As it can be observed from these figures, the signal \(y_1\) is synchronized with the signal \(x_1\) in 0.2 s, and the signals \(y_2\) and \(y_3\) are synchronized with \(x_2\) and \(x_3\) in approximately 6 s. This synchronization performance is not satisfactory in the real-world communication applications.

In what follows, the proposed finite-time controllers (26) and (34) are used. The state trajectories of the chaotic systems in the base station and sensors are shown in Figs. 9, 10 and 11. It is observed that the states \(y_1\) and \(x_1\) are synchronized in less than 0.02 s. Moreover, the states \(y_2\) and \(y_3\) are synchronized with \(x_2\) and \(x_3\) in 0.1 s.

Figure 12 demonstrates the synchronization errors which show the reasonable synchronization performance of the proposed control technique. Time response of the proposed controllers (26) and (34), and the global sliding surface (25) are illustrated in Fig. 13.

In this figure, the subfigures (a) and (b) show the controller inputs \(u_1(t)\) and \(u_2(t)\), respectively. From Fig. 13, it is obtained that the amplitude of the inputs is appropriate and no chattering phenomenon is observed in the control signals. Subfigure (c) shows the sliding surface s(t). It is seen that the sliding surface converges to the origin with the reaching time of \(t=0.1\) s.

In this section, the WSN communication system is also considered. A sinusoidal function is used for the analog message signal m(t) as

$$\begin{aligned} \begin{aligned} m(t)=2\sin ^2(\pi t)\cos (\pi t) \end{aligned} \end{aligned}$$
(51)

The digital message signal is considered with two values \(-1\) and 1, and the data rate equal to 0.5 bit/s. For the analog and digital messages, the time-scaling factor \(\zeta \) is set to 1 and 5, respectively. The simulation results of the WSN communication system are illustrated in Figs. 14 and 15. In these figures, the top subfigures compare the original and reiterative message signals and the bottom subfigures show the encrypted signals. As it can be seen from Figs. 14 and 15, the encrypted message signals are recovered in \(t=0.1\) s approximately.

6 Conclusions

In this paper, a new chaotic communication method has been proposed to enhance the security of WSNs considering the hardware and software limitations. The chaotic signals are mixed with the Gaussian white noise. To separate the noise from the chaotic signals, a modified independent component analysis is employed. Moreover, a new adaptive finite-time sliding mode controller has been proposed to achieve the finite-time synchronization between the chaotic oscillators in the base station and sensor nodes with unbounded uncertainties. Using the proposed scheme, as is found from the simulations results, the synchronization time has been reduced substantially. Because that the sensors return faster to the idle mode and consequently the battery lifetime is increased, the time reduction in WSNs is significantly valuable. The further researches in this field can be extended to realize secure communication in WSNs by applying chaotic systems composed of multi-scroll attractors using the results reported in [65].