Dynamic Analysis of Modified Duffing System via Intermittent External Force and Its Application

Over the past century, a tremendous amount of work on the Duffing system has been done with continuous external force, including analytical and numerical solution methods, and the dynamic behavior of physical systems. However, hows does the Duffing oscillator behave if the external force is intermittent? This paper investigates the Duffing oscillator with intermittent external force, and a modified Duffing chaotic system is proposed. Different from the continuous-control method, an intermittent external force of cosine function was designed to control the Duffing oscillator, such that the modified Duffing (MD) system could behave chaotically. The dynamic characteristics of MD system, such as the strange attractors, Lyapunov exponent spectra, and bifurcation diagram spectra were outlined with numerical simulations. Numerical results showed that there existed a positive Lyapunov exponent in some parameter intervals. Furthermore, by combining it with chaos scrambling and chaos XOR encryption, a chaos-based encryption algorithm was designed via the pseudorandom sequence generated from the MD. Finally, feasibility and validity were verified by simulation experiments of image encryption.


Introduction
Since the pioneering work of Georg Duffing, the nonlinear equation describing an oscillator with cubic nonlinearity has been called the Duffing equation, and it is used in its various forms to describe many nonlinear systems [1]. With external force, this equation exhibits an enormous range of well-known behaviors in nonlinear dynamical systems, for example, the chaos phenomenon. It is also one of simplest equations to describe chaotic behavior. During the past half-century, chaos phenomenon and chaos theory have been widely investigated, and many chaotic systems have been proposed [2][3][4][5]. The bifurcation of a Duffing oscillator is observed by keeping all parameters fixed except for the amplitude of the driving force; then, bifurcation value is determined [6]. In [7], the bifurcation structure and synchronization of a double-well Duffing oscillator coupled to a single-well one and subjected to periodic forces were studied. On the basis of the method of switching chaos on/off, a strategy of adjusting the shape of the time-dependent forcing was proposed to suppress or generate chaotic behavior in the Duffing oscillator [8]. Bifurcation diagrams and phases of two coupled periodically driven identical Duffing oscillators were presented in [9]. In [10], an electronic model of a Duffing oscillator with characteristic memristive nonlinear element is proposed instead of the cubic nonlinearity. For a two-degree-of-freedom mass-spring-damper model on a moving lubricated belt, the system's dynamic response behavior was studied for various parameter combinations, and the averaging method was used to solve nonlinear coupled equations of motion for qualitative analysis in order to find the amplitude and frequency of steady-state vibration [11]. Furthermore, many research works investigated the Duffing oscillator and new chaotic systems [12][13][14][15][16][17][18][19][20][21].
For some applications, high sensitivity to initial conditions and complex chaotic dynamics make chaotic systems useful, e.g., fluid mixing, and estimation of weak signal and information encryption [22]. In [23], a new signal detection and estimation method based on intermittency transition was developed by using chaotic Duffing oscillators. A novel parallel image-encryption algorithm was also presented based on chaotic Duffing oscillators [24]. A secure communication scheme based on chaotic Duffing oscillators and frequency estimation for the transmission of binary-coded messages was presented by a Lyapunov-based observer [25]. In [26], some general trends of the climatic response to time-dependent parameters were identified on the basis of a generalized stability criterion, and theoretical predictions were validated by the evolution equations of relevance in atmospheric and climate dynamics. Dynamic characteristics of climate systems were also discussed in some studies [27][28][29][30]. Meanwhile, there are many references on the dynamic analysis of chaotic systems and the applications of chaos-based encryption [31][32][33][34][35][36][37][38][39][40][41][42].
The Duffing oscillator with continuous external force, such as continuous sinusoidal function or cosine function, has attracted many researchers' attention and been widely studied in the past. However, what happens to the Duffing system if the controller has intermittent external force? Does it behave with periodic or chaotic motion? In order to answer these problems, this paper studies the dynamics of Duffing systems with intermittent external force and their applications. The modified Duffing (MD) system is very different from other references, in that external force is usually continuous, such as continuous cosine function. The main contributions of this paper are summarized as follows: (1) Intermittent external force, with work time and rest time, was designed for Duffing oscillator. In the work period, the external force was applied to control the Duffing oscillator. By contrast, the Duffing oscillator works without any external force in the rest period, so the control cost is less than its cost when the controller works in all period intervals. (2) The MD system generates a positive Lyapunov exponent. All parameters were fixed except for one variable; the dynamic characteristics of the MD system are discussed via the Lyapunov exponent spectra, bifurcation diagrams, and strange attractors. (3) An encryption algorithm was designed on the basis of the MD system, and the pseudorandom sequence was used to complete the scrambling encryption and chaos XOR encryption of the image. Moreover, the feasibility and effectiveness of encryption algorithm were shown through an image-encryption experiment.
The rest of the paper is organized as follows. Section 2 describes the mathematical modeling of the Duffing oscillator. In Section 3, a new chaotic Duffing system with an intermittent controller (MD system) is proposed, and its dynamic characteristics are analyzed. In Section 4, an image-encryption algorithm is outlined based on the MD system, and image-encryption experiment and security analysis of the encryption algorithm are given. Finally, Section 5 concludes the paper.

Duffing Oscillator Description
The Duffing equation has a wide range of practical applications, such as the mass-spring-damper system model, i.e., If Equation (1) is divided by m on both sides, one has where β = β m , , m is the mass, β is the damping coefficient, k 1 and k 2 are the spring force coefficients, and F is the external force.
Similarly, for equilibrium points then System (5) is asymptotically stable.
However, with external force F, there is no equilibrium point in System (3), and it may behave with periodicity or chaos. The next section discusses the dynamic characteristics for this case.

Design and Dynamic Characteristic Analysis of MD System
There are a large number of discontinuous dynamical systems, such as pulse systems and switching systems. Inspired by the intermittent control method, this paper aims to investigate the Duffing system with intermittent external force, and dynamic characteristics were applied in the following subsections.

Design of MD System with Intermittent External Force
In order to investigate the dynamic characteristic for an MD system, an intermittent external force F of System (3) was designed, and it is given by , and τ is the length of control time in an interval [T i , T i+1 ], i.e., the modified Duffing system can be expressed as MD System (10) can also be called a switching system.

Simulation Experiment of MD System with Intermittent External Force
If the initial values and parameters of MD System (10) are taken as where the length of periodic time On the basis of Equation (10), the simulation experiments were implemented using Matlab software. Then, with the initial conditions in Equation (11), the chaotic attractor and diagram of variables x(t) and y(t) are shown in Figure 3a,b, respectively.

Dynamics Analysis of MD System with Respect to Parameter A
Chaotic systems are highly sensitive to their parameters. Different parameters lead the dynamic system to different states, such as periodic motion and chaotic motion. In order to know about the dynamic characteristics of an MD system, one needs to fix all parameters except for magnitude A of external force, i.e., Then, the bifurcation diagram spectrum with respect to parameter A is given in Figure 4a, and the corresponding Lyapunov exponent spectrum with respect to parameter A is shown in Figure 4b.  Furthermore, there are no positive Lyapunov exponents in interval [3.5, 6], i.e., one is equal to zero, and the others are negative; so, MD System (10) behaves periodically and there exists a limit cycle. For example, the phase diagram of MD System (10) is shown in Figure 5a when parameters A = 3.74, and there exists a limit cycle when t > 500. Similarly, MD System (10) behaves periodically too when A = 6, and there exists a limit cycle in Figure 5b when t > 500.

Dynamics Analysis of MD System with Respect to Parameter ω
Similarly, if parameter ω is a variable and the others are fixed in MD System (10), i.e., then the bifurcation diagram spectrum with respect to parameter ω and the corresponding Lyapunov exponent spectrum are shown in Figure 6a

Dynamics Analysis of MD System with Respect to Parameter τ
Furthermore, if length of interval control time τ is a variable and the others are fixed, i.e., then the bifurcation diagram with respect to parameter τ and the corresponding Lyapunov exponent spectrum of MD System (10) are shown in Figure 7a,b. There are some parameter intervals in 0, 4π 3w that MD System (10) has a positive Lyapunov exponent, for example, it is chaotic in τ ∈ [1.7, 3.2]. Note 1: If one considers replacing the original cosine function in Equation (9) with a constant, i.e., the intermittent external force is given by where [T i , T i+1 ] (i = 0, 1, 2, · · · , T 0 = 0) is a periodic interval, ∆T = T i+1 − T i (i = 0, 1, 2, · · · ), and τ is the length of control time in an interval [T i , T i+1 ], then the MD system can be expressed as Similarly, the initial values and parameters of MD System (16) are taken as where the length of a periodic time ∆T = T i+1 − T i = 2π ω , then the attractor is given in Figure 8a, and the corresponding time-domain waveform is shown in Figure 8b. In order to know about the dynamic characteristics of an MD system, one needs to fix all parameters except for magnitude A of external force, i.e., Then, the bifurcation diagram with respect to parameter A is given in Figure 9a, and the corresponding Lyapunov exponent spectrum with respect to parameter A is shown in Figure 9b

Algorithm Design and Information-Encryption Application
In this section, an information-encryption algorithm was designed on the basis of the proposed MD system, and the corresponding experiment and security analysis are given.

Algorithm Design
According to the MD system, a simple encryption algorithm is given, including scrambling encryption and chaos XOR encryption. First, the pseudorandom sequence was designed with the following steps.
Step 1: Generate pseudorandom sequence from MD system. The fourth-order Runge-Kutta algorithm was used to solve MD System (10), and it is given by where X = [x, y], X m is the m-th value of variable X, h is the calculation step, and d 1 , d 2 , d 3 , d 4 are the derivatives ofẋ andẏ in Equation (10). If initial value X 0 = [x 0 , y 0 ], step h, length of time T, and total iteration N are given, then one gets chaotic sequence X = [x, y] in the length of N.
Step 2: Remove pseudorandom sequence in [0, t z ] before the MD system enters the chaotic attractor, and obtain pseudorandom sequence X [t z ,T] after t z .
Step 3: By moving the decimal point, removing integer parts, and taking absolute values, such as by multiplying the pseudorandom sequence by 10 θ (θ is an integer), one gets where "Floor" is a function to take the integer part in the direction of negative infinity.
Step 4: Take a modular operation for pseudorandom sequence S θ and convert it into binary sequence S, i.e., where "Mod" is a modulus function, "Dec2bin" is a decimal-to-binary function, and γ is an integer.

Encryption 1: Scrambling Encryption
Information is encrypted by the scrambling encryption based on preprocessed pseudorandom sequence S θ .
Sequences S θ = [S θ 1 , S θ 2 ] are modeled by L (L is information length), and the new sequence or a pair of sequences is/are used as new position(s) to exchange the position of the original information, i.e., adjust the position of the original information as where I(0) ↔ I(end), or I(0, 0) ↔ I(end, end).

Encryption 2: Chaos XOR Encryption
Transform information data I into a binary sequence, and obtain encrypted information E by where ⊕ is the operation of XOR. On the receiving side, the decryption process is the inverse operation of above encryption algorithm, and the original information is successfully recovered with the correct keys.

Simulation Experiment
By taking a gray image as an example, the simulation experiments of the encryption algorithm were verified with Matlab software. The flowchart of chaos-based secure communication is shown in Figure 10. On the sender side, the pseudorandom sequence is generated with the keys in the first, and original information is encrypted by the scrambling encryption in Encryption 1 for M rounds; then, it encrypted by the second chaos XOR encryption in Encryption 2. Therefore, the encrypted information is transmitted to the receiver via the public channel, and it is recovered by the inverse operations of encryption algorithm with the correct keys.
If initial conditions are then the pseudorandom sequences are generated based on the MD system, and they are used to encrypt original image I with the encryption algorithm. Simulation results are given in Figure 11, where Figure 11a is original image I, Figure 11b is encrypted image E 1 after two rounds of scrambling encryption, and Figure 11c is final encrypted image E 2 after chaos scrambling encryption and chaos XOR encryption. Obviously, it is difficult to obtain useful information from encrypted information. Figure 10. Flowchart of secure chaos-based communication.

Information
In the receiver end, one can recover image I with the same initial conditions and parameters, and the recovered image is given in Figure 12c. However, it cannot be successfully recovered if one of the initial conditions or parameters is incorrect, and the corresponding experiment results are shown in Figure 12a

Key Sensitivity and Key Space
Key sensitivity was tested by initial conditions with small error. If we let i.e., error of initial variable x 0 is 10 −16 , then the decryption image is shown in Figure 12a. Similarly, if we let i.e., error of initial parameter ω is 10 −15 , then the decrypted image is shown in Figure 12b. Some initial conditions were tested and the results are given in Table 1. So, key-space (KS) size can be estimated from the above key-sensitivity accuracy, i.e.,

NIST Test
NIST tests may be useful as a first step in determining whether or not a generator is suitable for a particular cryptographic application. For sequences generated from chaotic systems, NIST tests provide a necessary randomness test by probabilistic methods. If the test results of p-values are greater than a significance level of 0.01, then it indicates that the sequence from the generator is random [43]. For sequence S = Dec2bin Mod S θ , 2 31 generated from the MD system, with a size greater than 10 8 bit binary data, test results are given in Table 2. Obviously, p-Values were greater than 0.01, and it passed all NIST tests.

Conclusions
On the basis of the Duffing oscillator, an MD chaotic system with intermittent external force was investigated. The Lyapunov exponent spectra and bifurcation diagrams spectra were given to depict the dynamic characteristics of an MD system, and it behaved as a chaotic attractor in some parameter intervals. Meanwhile, through the pseudorandom sequence of MD system, an encryption algorithm consisting of chaos-scrambling encryption and chaos XOR encryption was designed. Simulation experiments showed its feasibility and validity via image encryption. Security analysis showed that the algorithm could pass the NIST test and that it is highly sensitive to initial conditions and parameters. The proposed MD system could be applied to the design of new chaotic systems and chaos-based encryption algorithms in the future.