Modeling and Analysis of a Three-Terminal-Memristor-Based Conservative Chaotic System

In this paper, a three-terminal memristor is constructed and studied through changing dual-port output instead of one-port. A new conservative memristor-based chaotic system is built by embedding this three-terminal memristor into a newly proposed four-dimensional (4D) Euler equation. The generalized Hamiltonian energy function has been given, and it is composed of conservative and non-conservative parts of the Hamiltonian. The Hamiltonian of the Euler equation remains constant, while the three-terminal memristor’s Hamiltonian is mutative, causing non-conservation in energy. Through proof, only centers or saddles equilibria exist, which meets the definition of the conservative system. A non-Hamiltonian conservative chaotic system is proposed. The Hamiltonian of the conservative part determines whether the system can produce chaos or not. The non-conservative part affects the dynamic of the system based on the conservative part. The chaotic and quasiperiodic orbits are generated when the system has different Hamiltonian levels. Lyapunov exponent (LE), Poincaré map, bifurcation and Hamiltonian diagrams are used to analyze the dynamical behavior of the non-Hamiltonian conservative chaotic system. The frequency and initial values of the system have an extensive variable range. Through the mechanism adjustment, instead of trial-and-error, the maximum LE of the system can even reach an incredible value of 963. An analog circuit is implemented to verify the existence of the non-Hamiltonian conservative chaotic system, which overcomes the challenge that a little bias will lead to the disappearance of conservative chaos.

Although two-terminal memristors have proved the basic principle of neurons, the synapses of one neuron are far more than one, so it is necessary to study multi-terminal memristors. The three-terminal Widrow-Hoff memristor [8] has carried out this kind of attempt by adding a control terminal to realize a three-terminal chemical memristor. A new floating gate silicon MOS (MOSFET) transistor [9] was similarly proposed, and Lai proposed field-effect transistors with nano ionic gates [10]. Mouttet proposed the basic definition of the three-terminal memristor [11] based on the two-terminal memristor passive nonlinear system [12] by Chua. Recently, using monolayer molybdenum disulfide, three-terminal [13], six-terminal, or even more synapses' memristors were realized.
Chaos exists in mathematical models [14] and other aspects such as the macroeconomic model [15], the breaking of topological supersymmetry [16], etc. Chaotic systems This paper is organized as follows: Section 2 proposes the three-terminal memristor and constructs the circuit to implement it. Section 3 proposes the conservative chaotic system based on a three-terminal memristor from a strict conservative system [18]. Section 4 gives the characteristics of equilibria of the three-terminal memristor conservative system. Section 5 gives the dynamical analysis, and the cause of dynamical changing of the system in different levels and the impact of Hamiltonian on the system are investigated. Analog circuit implementation is provided in Section 6. Section 7 summarizes the paper.

Modeling of Three-Terminal Memristor
The memristor predicted by Chua is a two-port device [31]. It also has three significant features: the hysteresis loop passes the origin, the hysteresis loop is the shape of eight, and the area of the hysteresis curve decreases with increasing signal frequency. Here, we choose the cubic smooth memductance nonlinearity model [14,32]. The memristor model is described in the following form . ϕ = v, W(ϕ) = α + βϕ 2 , i = W(ϕ)v = (α + βϕ 2 )v. (1) According to the magnetic controlled three-terminal memristor model proposed in the memristive systems analysis [11], the following results are obtained Here v g , v d represent the input voltages, i g , i d represent the output currents, w donates an n-dimensional state variable of the system, g, h are defined as continuous function, and f is an n-dimensional continuous function. The memristor model in Equation (1) is appropriately deformed. By changing it to the model of single-port input and dual-port output, the model is transformed as where v in = v 1 v 2 is the input voltage of the model, ϕ is the magnetic flux that controls the state of the model, W(ϕ) represents the memductance, and i 1 , i 2 are the two current outputs.
To verify the feature of the model Equation (3), we used Matlab for numerical simulation, as shown in Figure 1, The product of v 1 = A 1 sin(ω 1 t) and v 2 = A 2 sin(ω 2 t) is the input of this device with parameters A 1 = A 2 = ω 2 = 1, and ω 1 = 2 in Figure 1a and ω 1 = 10 Figure 1b. We found that the hysteresis curve does not converge to a single-valued function, but a multi-valued resistance with the frequency increasing, which means this model has a complex resistance value. The three-terminal memristor can be implemented by the circuit shown in Figure 2.  In Figure 2 .
, R C form the integrated circuit, and the remaining four resistors match the output coefficients. Using Multisim to simulate the model, input voltages are consistent with Matlab numerical simulation. The circuit simulation results received are shown in Figure  3.   In Figure 2 .
, R C form the integrated circuit, and the remaining four resistors match the output coefficients. Using Multisim to simulate the model, input voltages are consistent with Matlab numerical simulation. The circuit simulation results received are shown in Figure  3. In Figure 2, v 1 , v 2 are input voltages of the model, M 1 to M 4 multipliers, R 1 to R 5 resistors, C 1 a capacitor, and i 1 , i 2 output currents, respectively. The analytical mathematical model is given as R 1 , C 1 form the integrated circuit, and the remaining four resistors match the output coefficients. Using Multisim to simulate the model, input voltages are consistent with Matlab numerical simulation. The circuit simulation results received are shown in Figure 3.  It was found that the simulation results of the circuit model are consistent with the simulation of the mathematical model, so the model can be used to build the actual hardware circuit.

Modeling of Conservative Chaotic System Based on Three-Terminal Memristor
Qi proposed a 4D Euler rigid body equation with a Hamiltonian vector field form It was found that the simulation results of the circuit model are consistent with the simulation of the mathematical model, so the model can be used to build the actual hardware circuit.

Modeling of Conservative Chaotic System Based on Three-Terminal Memristor
Qi proposed a 4D Euler rigid body equation with a Hamiltonian vector field form [18] . where with The system can be written as .
The divergence of the 4D Euler equation is Therefore, Equation (8) is a phase-volume conservative system. Because J(x) in Equation (6) is a skew-symmetric matrix, we have Thus, the system of Equation (8) is a Hamiltonian conservative system. Therefore, it preserves both the phase-volume and Hamiltonian. Using Matlab for numerical simulation, take parameters [π 1 , π 2 , π 3 , π 4 ] T = [2, 3, 4, 5] T , initial conditions [x 10 , x 20 , x 30 , x 40 ] T = [5, 5, −5, −5] T , and sampling time T = 0.001 s. Since the conservation of both phasevolume and Hamiltonian, this system only produces periodic orbit [17][18][19], as shown in Figure 4. s. Since the conservation of both phase-volume and Hamiltonian, this system only produces periodic orbit [17][18][19], as shown in Figure 4. The 4-D Hamiltonian conservative system only produces a periodic orbit because of the conservation of both phase volume and Hamiltonian energy. Does it generate conservative chaos by breaking one of the conservations, like the Hamiltonian energy? Qi [17] proposed a Hamiltonian conservative chaotic system by changing the Casimir conservation and keeping the Hamiltonian constant. Only one parameter was changed. So far, to our best knowledge, no memristor has been applied in all the conservative chaotic systems generation. Qi [17] proposed a Hamiltonian conservative chaotic system by changing the Casimir conservation and keeping the Hamiltonian constant. Only one parameter was changed. So far, to our best knowledge, no memristor has been applied in all the conservative chaotic systems generation.
To generate chaos, we should break the conservation of Hamiltonian by adding a pair of constants c and (π 4 /π 1 )c in the symplectic matrix J(x) in Equation (6), and then Equation (5) can be written as where For simplification, the system parameters are fixed as Then Equation (11) becomes with Because the main diagonal of Equation (12) is zero as Equation (6), the phase volume is still conservative.
However, for the Hamiltonian energy, we have Thus, the system is non-conservative in Hamiltonian energy but conservative in phase volume. Setting initial conditions [x 10 , x 20 , x 30 , x 40 ] T = [5 , 5 , −5 , −5] T , constant c = 1 and sampling time T = 0.001 s, this system produces chaotic orbits [ Figure 5a]; therefore, the Hamiltonian of Equation (12) is non-conservative because the positive and negative changes of x 1 x 4 [ Figure 5b].
Because the main diagonal of Equation (12) is zero as Equation (6), the phase volume is still conservative.
However, for the Hamiltonian energy, we have ( ) Thus, the system is non-conservative in Hamiltonian energy but conservative in phase volume. Setting initial conditions When the three-terminal memristor is coupled with the 4D Euler equation, can chaos be generated using a similar way? The memristor model is regarded as a device inserted in the 4D rigid body to replace 5c and 5c − . To get the input of the memristor, we added When the three-terminal memristor is coupled with the 4D Euler equation, can chaos be generated using a similar way? The memristor model is regarded as a device inserted in the 4D rigid body to replace 5c and −5c. To get the input of the memristor, we added another variable x 5 as the input of the memristor. Thus, the memristor is α + βx 2 5 , and the new system is described as Here γ is the three-terminal memristor weight parameter. Therefore, the memristor is added as a feedback term to Equation (12). The divergence of Equation (17) is which means the phase volume of the system (17) is still conservative. Now, we test whether the Hamiltonian energy is still conservative. The generalized Hamiltonian form was used [33]. We consider the input of the fifth term as a nonconservative force, and get . where with new Hamiltonian and M(x) is no longer skew-symmetric but is decomposed into the sum of a skewsymmetric matrix J(x) and a symmetric matrix R(x). The total force exerted on the system is non-conservative. Differentiating the Hamilton function, we get which indicates Hamiltonian energy function is no longer conservative. We divide H of Equation (21) into with It can be proved that Therefore, H c represents the conservative energy of the system, and H n is the non-conservative part. According to [17], there are two categories of conservative systems: the Hamiltonian conservative chaotic system, in which both the volume and Hamiltonian of the system are constant, and the non-Hamiltonian conservative chaotic system, in which only the phase volume is conservative. Thus, the proposed three-terminal-memristor-based system (i.e., Equation (17)) is a typical non-Hamiltonian conservative chaotic system.

Equilibria and Their Stability of Three-Terminal Memristor Conservative System
The equilibria point plays an essential role in analyzing the system's properties and we examined whether it meets the requirements of the conservative chaotic system. For a conservative system, only saddles and centers exist. There are no stable or unstable nodes and foci to exist in a conservative system. Equation (17) can be rewritten as .
Setting the left of Equation (24) equal to 0, we can get three cases: Case 1: This case has three sub-cases as follows: Case 1.1: x 1 = 0, x 4 = 0. Case 3: In Case 2, we derive x 2 = x 3 = 0, but parameters α, β > 0 and the weight parameter γ = 0, γ(α + βx 2 5 )x 1 = 0 holds. Since x 1 = 0, we have γ α + βx 2 5 = 0 which contradicts the premise. Therefore, Case 2 does not hold. Case 3 has the same problem as Case 2. Therefore, from Case 1, the system has line equilibria E 5 = [0, 0, 0, 0, x 5 ] T , plane equilibria E 3,5 = [0, 0, x 3 , 0, x 5 ] T , and E 2,5 = [0, x 2 , 0, 0, x 5 ] T . The Jacobi matrix of the system is By substituting E 5 into the characteristic equation, we find the eigenvalues of E 5 as Hence, line equilibria E 5 are centers. For the plane equilibrium E 3,5 , we find the eigenvalues as where where j is the imaginary unit. If a 4 = 0 holds, E 3,5 must be centers from Equation (24). If a 4 = 0, we can find out if a 4 > 0, λ 3 is a positive real number and the real parts of λ 4 , λ 5 must be negative. If a 4 > 0, λ 3 is a negative real number and the real parts of λ 4 , λ 5 must be positive. Therefore, if a 4 = 0, E 3,5 must be saddles. Likewise, plane equilibrium E 2,5 has the same properties as E 3,5 . In sum, both E 2,5 and E 3,5 are either natural elliptic (centers) or saddles. Thus, from the perspective of these equilibria, the system fully meets the characteristics that the conservative system in phase space only has either saddle or center [17][18][19].

Memristor Effect in Chaos Generation
For system (19), take initial values [x 10 , x 20 , x 30 , x 40 , x 50 ] T = [1, 1, −1, −1, 0] T , parameters [α, β, γ] T = [1, 1, 0] T , and sampling time T = 0.001 s. Since γ = 0, the outputs of the three-terminal memristor do not affect the system. According to the analysis of Equation (10), it produces periodic orbit, as shown in Figure 6a. Now fixing α = β = γ = 1 and initial values as above, the orbits of different phase spaces are shown in Figure 6c,d. Therefore, the three-terminal-memristor-based conservative system produces chaos, which is called the three-terminal-memristor-based conservative chaotic system. The Poincaré map from Figure 6e with x 1 = 0 shows the orbits are chaotic and do not form a chaotic attractor. The chaotic attractor of a dissipative system has several little branches of hair-like Poincaré map because of the fractal dimension, but this memristor-based conservative chaos has a wide-banding Poincaré map that almost evenly fills the space initially occupied. This is because it has an integer dimension. The ergodicity of the memristor-based conservative chaotic system is much better than general dissipative chaotic systems, which is beneficial in chaos-based encryption.
The LEs L 1,2,3,4,5 = [0.4446, 0.0003, 0.0000, −0.0003, −0.4446] T in Figure 6b, indicating the sum of the LEs is zero. From Ref. [20], the Kaplan-Yorke Lyapunov dimension is The integer result proves the conservativeness of the system. From Figure 6f, H c is constant, indicating this part is conservative; however, the total Hamiltonian of the system H changes, which is caused by the non-conservative part H n . Thus, we confirmed the system is a typical non-Hamiltonian conservative chaotic system.
In this case, the maximum LE value, L 1 = 0.4446, is small, and the Poincaré map area is not large enough, although it fills evenly. Normally, in chaos-based encryption, the larger maximum LE value, the higher-order in pseudo-randomness of the chaos generator, the better in security, the more difficult to break. Besides, the larger area of Poincaré map, the more choices in the selection of pseudo-randomness. To enhance the maximum LE, many references took a trial-and-error method through bifurcation; we took a mechanism way in this paper. Provided that the frequency and energy of the system are increased, the positive Lyapunov exponent can be increased. Therefore, we adjusted the five initial values and four parameters according to their functions in frequency and energy. According to the 4D Euler equation, increasing π i can speed up the operating frequency of the system, and increasing the initial values can store the kinetic energy. The initial values also determine the spatial magnitude of orbits and the area of the Poincaré map. Initial values [x] T = [1000, 1000, −1000, −1000, 0] T and [π 1 , π 2 , π 3 , π 4 ] T = [100, 150, 200, 250] T , and sampling time T = 10 −7 s, were chosen to calculate Lyapunov exponents using the Wolf method [34]. As shown in Figure 6g,h, the maximum of the LEs LE 1 = 0.9631 × 10 3 . The maximum of the LEs is far greater than those of the most chaotic systems; it can be observed from the Poincaré map with x 1 = 0 that the space of the orbits is quite large, and the frequency is very high, which can be tested by frequency spectrum (the figure is omitted). Usually, the maximum LE cannot be adjusted too large through mechanical analysis. To increase the LE, the scaling time can be adjusted; however, this proposed memristor-based chaotic system can produce exceptionally large maximum LE through the adjustments of parameter and initial, which is based on the physical mechanism. The large LE and magnitude of Poincaré map are greatly helpful in chaos-based encryption.

Dynamical Analysis with Different Initial Conditions of H c
We have analyzed the three-terminal memristor excitation of chaos, so how does Hamiltonian affect system dynamics? Fixing parameter [α, β, γ] T = [1, 1, 1] T , the initial value determines H 0 from Equation (29). There are some bifurcations, for instance, when x 10 = 1 and x 10 = 1.2, the system produces chaotic orbits, as shown in Figure 7d,f. However, it also generates the periodic orbits, period-2 orbits, and quasiperiodic orbits with x 10 = 1.1, as shown in Figure 7e.

Dynamical Analysis with Different Initial Conditions of c H
We have analyzed the three-terminal memristor excitation of chaos, so how does

Dynamical Analysis with Fixed c H and Varied n H
Although the non-conservative part n H changes with time at the rate of Equation (22), in Section 5.1 and 5.2, the initial value of 50 0 x ≠ is crucial. When it is set to zero, the influence of three-terminal memristor variable is reduced as much as possible from Equation (23). In this section, the four initial values [ ] x promotes the chaotic degree of the system within a range. Beyond this range, it suppresses the system's dynamics and transits from chaotic motion to quasiperiodic motion. As the Hamiltonian level increases, the range becomes wider, as shown in Figure  8b,d.

Dynamical Analysis with Fixed H c and Varied H n
Although the non-conservative part H n changes with time at the rate of Equation (22), in Sections 5.1 and 5.2, the initial value of x 50 = 0 is crucial. When it is set to zero, the influence of three-terminal memristor variable is reduced as much as possible from Equation (23). In this section, the four initial values [x 10 , x 20 , x 30 , x 40 ] T corresponding to the conservative part H c0 being fixed, we analyze how the initial value x 50 corresponding to the H n0 effects of the system.
The low H c0 energy determines that the system generates quasiperiodic orbits [ Figure 8a] and the high H c0 energy makes chaos [ Figure 8c], which corresponds to the results given in Sections 5.1 and 5.2. Regardless of the value of conservative Hamiltonian H c0 , x 50 promotes the chaotic degree of the system within a range. Beyond this range, it suppresses the system's dynamics and transits from chaotic motion to quasiperiodic motion. As the Hamiltonian level increases, the range becomes wider, as shown in Figure 8b,d.

Circuit Implementation
There are three methods for the simulation of nonlinear systems: chaotic system simulation circuit, FPGA (Field Programmable Gate Array), and computer numerical simulation. For the most dissipative systems, the required accuracy is not high, so all three simulation methods can be implemented. However, for conservative systems, the required accuracy is very high, especially FPGA and numerical simulation. Even if the accuracy is high, there still are problems such as algorithms, sampling, discretization, and the number of bits of computer operations causing errors. The conservative system divergence is zero, so a little bit of error will make the divergence either larger than zero leading to instability, or less than zero leading to shrinking. Both situations cause the conservative chaotic phase diagram to disappear. The hardware implementation is challenging. Therefore, for conservative systems, analog circuit simulation is indispensable because it is a real analog simulation.
As shown in Figure 9, the system is implemented by an analog electronic circuit without scale transformation. A total of 10 analog multipliers accomplish seven quadratic terms and two cubic terms in the system. Besides, there are five integrators and four inverters, which are composed of some capacitors and resistors. The three-terminal memristor is constructed at the bottom of Figure 9. α β γ = , the phase portraits of numerical simulation are shown in Figure   10a,b. In the analog circuit, the chips have a slight voltage deviation that corresponds to a small initial value, so there is no need to add the initial voltage between the capacitor's two pins.

Circuit Implementation
There are three methods for the simulation of nonlinear systems: chaotic system simulation circuit, FPGA (Field Programmable Gate Array), and computer numerical simulation. For the most dissipative systems, the required accuracy is not high, so all three simulation methods can be implemented. However, for conservative systems, the required accuracy is very high, especially FPGA and numerical simulation. Even if the accuracy is high, there still are problems such as algorithms, sampling, discretization, and the number of bits of computer operations causing errors. The conservative system divergence is zero, so a little bit of error will make the divergence either larger than zero leading to instability, or less than zero leading to shrinking. Both situations cause the conservative chaotic phase diagram to disappear. The hardware implementation is challenging. Therefore, for conservative systems, analog circuit simulation is indispensable because it is a real analog simulation.
As shown in Figure 9, the system is implemented by an analog electronic circuit without scale transformation. A total of 10 analog multipliers accomplish seven quadratic terms and two cubic terms in the system. Besides, there are five integrators and four inverters, which are composed of some capacitors and resistors. The three-terminal memristor is constructed at the bottom of Figure 9.     Figure 10a,b. In the analog circuit, the chips have a slight voltage deviation that corresponds to a small initial value, so there is no need to add the initial voltage between the capacitor's two pins.   Figure 10a,b. It is verified that the proposed system produces conservative chaos.

Conclusion
This paper proposed a non-Hamiltonian conservative chaotic system by integrating three-terminal memristor and 4D Euler equations. The dual-output pins of the three-terminal memristor, satisfying the nature of the skew-symmetric matrix. The system has generalized Hamiltonian; the conservation of the 4D Euler equation has been preserved. The characteristics of either centers or saddles of the equilibrias of the system proved the conservation property. Chaotic dynamics have been revealed by varying the weight parameter of the three-terminal memristor. Changing the initial Hamiltonian of the system will produce rich dynamics, which provides the way of producing quasiperiodic orbit and chaos. The routes and mechanisms from quasiperiodic orbit to chaos have been provided through energy bifurcation. With different initial Hamiltonian levels, the system will have different dynamic ranges. Using energy and frequency adjustment, instead of trial-anderror, the system produced the huge LEs, which is more suitable for encryption than other chaotic systems. The analog circuit of the system was built physically, which confirmed the chaotic existence of the system, and combined the three-terminal memristor and 4D Euler equation successfully. By changing the different types of memristors, modifying the dual outputs, and embedding it into the 4D Euler equation, keeping the conservative part skew-symmetric nature, chaos can be generated under reasonable parameters.

Conclusions
This paper proposed a non-Hamiltonian conservative chaotic system by integrating three-terminal memristor and 4D Euler equations. The dual-output pins of the threeterminal memristor, satisfying the nature of the skew-symmetric matrix. The system has generalized Hamiltonian; the conservation of the 4D Euler equation has been preserved. The characteristics of either centers or saddles of the equilibrias of the system proved the conservation property. Chaotic dynamics have been revealed by varying the weight parameter of the three-terminal memristor. Changing the initial Hamiltonian of the system will produce rich dynamics, which provides the way of producing quasiperiodic orbit and chaos. The routes and mechanisms from quasiperiodic orbit to chaos have been provided through energy bifurcation. With different initial Hamiltonian levels, the system will have different dynamic ranges. Using energy and frequency adjustment, instead of trial-anderror, the system produced the huge LEs, which is more suitable for encryption than other chaotic systems. The analog circuit of the system was built physically, which confirmed the chaotic existence of the system, and combined the three-terminal memristor and 4D Euler equation successfully. By changing the different types of memristors, modifying the dual outputs, and embedding it into the 4D Euler equation, keeping the conservative part skew-symmetric nature, chaos can be generated under reasonable parameters.