Resistance Tracking Control of Memristors Based on Iterative Learning

A memristor is a kind of nonlinear two-port circuit element with memory characteristics, whose resistance value is subject to being controlled by the voltage or current on both its ends, and thus it has broad application prospects. At present, most of the memristor application research is based on the change of resistance and memory characteristics, which involves how to make the memristor change according to the desired trajectory. Aiming at this problem, a resistance tracking control method of memristors is proposed based on iterative learning controls. This method is based on the general mathematical model of the voltage-controlled memristor, and uses the derivative of the error between the actual resistance and the desired resistance to continuously modify the control voltage, making the current control voltage gradually approach the desired control voltage. Furthermore, the convergence of the proposed algorithm is proved theoretically, and the convergence conditions of the algorithm are given. Theoretical analysis and simulation results show that the proposed algorithm can make the resistance of the memristor completely track the desired resistance in a finite time interval with the increase of iterations. This method can realize the design of the controller when the mathematical model of the memristor is unknown, and the structure of the controller is simple. The proposed method can lay a theoretical foundation for the application research on memristors in the future.


Introduction
In 1971, American scientist Chua first proposed the concept of a memristor based on the completeness of circuit theory [1]. Since at that time the existence of the memristor was only speculated mathematically, and it was not physically implemented yet, it has not attracted considerable attention during the more than three decades after it was proposed. Until May 2008, the nanometer memristor was successfully developed by the United States' Hewlett-Packard (HP) laboratory to develop a physical model, and the results of this research were published in "Nature" [2,3]. Since then, there has been a wave of research on memristors around the world [4]. Essentially, a memristor is a nonlinear resistor with a memory function. Its resistance value is controlled by the voltage or current added to both ends, it can maintain the previous value in the case of a power failure, and it will be cleared only when the current is in the opposite direction. Therefore, it has broad application prospects in many fields.
Up to now, scholars at home and abroad have mainly studied memristors from three aspects. The first is how to develop a device with memristive characteristics that is more economical and easy to implement, using advanced materials based on the idea of the memristive physical model by HP Labs. According to different materials, it can be divided into several typical memristors, such as thin film memristors [2], spin memristors [5], threeterminal memristors [6], phase transition memristors [7], and so on. The second aspect is to analyze the dynamic behavior of a memristor and the memristive system by following In view of the above analysis, in order to further broaden the application range of memristors and lay the foundation for future application research on memristors, this paper proposes an iterative learning control method for memristors by analyzing the general mathematical model of memristors. In this method, the resistance of the memristor is output, and the resistance change rate is the state equation. The derivative of the error between the actual resistance and the desired resistance is used to continuously modify the control voltage of the last memristor, so that making the current control voltage gradually approach the desired control voltage, thereby achieving the purpose of changing the memristor according to the desired resistance. Furthermore, the convergence condition of the algorithm is theoretically derived, and it is proved that the proposed method can make the memristor completely track the desired resistance within a finite time interval with the increase of iterations. Finally, the simulation examples are given to further validate the effectiveness of the proposed algorithm.

The Model of Memristors
In 2008, the research team of Hewlett-Packard Lab successfully created a physical model of the memristor using thin TiO 2 film and Pt metal. The model is composed of a thin titanium dioxide (TiO 2 ) film and two pieces of platinum (Pt). The titanium dioxide film sandwiched between two pieces of platinum is divided into two parts: one is the insulating layer without impurities (nondoping region), the other is the conduction layer after doping impurities (doping region). Its structure is shown in Figure 1. for engineering implementation. Therefore, iterative learning control has achieved fruitful research results after more than 30 years of development [25][26][27][28].
In view of the above analysis, in order to further broaden the application range of memristors and lay the foundation for future application research on memristors, this paper proposes an iterative learning control method for memristors by analyzing the general mathematical model of memristors. In this method, the resistance of the memristor is output, and the resistance change rate is the state equation. The derivative of the error between the actual resistance and the desired resistance is used to continuously modify the control voltage of the last memristor, so that making the current control voltage gradually approach the desired control voltage, thereby achieving the purpose of changing the memristor according to the desired resistance. Furthermore, the convergence condition of the algorithm is theoretically derived, and it is proved that the proposed method can make the memristor completely track the desired resistance within a finite time interval with the increase of iterations. Finally, the simulation examples are given to further validate the effectiveness of the proposed algorithm.

The Model of Memristors
In 2008, the research team of Hewlett-Packard Lab successfully created a physical model of the memristor using thin TiO2 film and Pt metal. The model is composed of a thin titanium dioxide (TiO2) film and two pieces of platinum (Pt). The titanium dioxide film sandwiched between two pieces of platinum is divided into two parts: one is the insulating layer without impurities (nondoping region), the other is the conduction layer after doping impurities (doping region). Its structure is shown in Figure 1. where w is the width of the conduction layer and D is the total width of the TiO2 film (about 10 nm).
When a voltage is applied to both ends of the memristor, the oxygen vacancy in the titanium dioxide film will drift under the action of the electric field. When the applied voltage makes the oxygen vacancy move from the conduction layer to the insulating layer, the conduction layer becomes wider and the insulating layer narrows gradually, so that the resistance value of the memristor will decrease; when the applied voltage makes the oxygen vacancy move from the insulating layer to the guide layer, the insulating layer becomes wider and the conduction layer narrows gradually, so that the resistance value of the memristor will increase. According to this principle and Figure 1, the voltage at both ends of the memristor can be obtained as follows. When a voltage is applied to both ends of the memristor, the oxygen vacancy in the titanium dioxide film will drift under the action of the electric field. When the applied voltage makes the oxygen vacancy move from the conduction layer to the insulating layer, the conduction layer becomes wider and the insulating layer narrows gradually, so that the resistance value of the memristor will decrease; when the applied voltage makes the oxygen vacancy move from the insulating layer to the guide layer, the insulating layer becomes wider and the conduction layer narrows gradually, so that the resistance value of the memristor will increase. According to this principle and Figure 1, the voltage at both ends of the memristor can be obtained as follows.
where i(t) is the current flowing through the memristor, z = w/D , z ∈ (0, 1) is the boundary position of the insulation layer and the conduction layer, M(z) is the resistance value of the memristor, R on is the resistance value of the memristor when the titanium dioxide film is all the conduction layer, and R off is the resistance value of the memristor when the titanium dioxide film is all insulating layer. Under the action of the electric field, the relationship between the ion drift rate and the change rate of conduction layer width is as follows: where µ v = 10 −14 m 2 · s −1 · v −1 is the drift rate of the ions in the uniform field. Therefore, the drift velocity of the interface can be obtained according to (3) and z = w/D: Since for the fixed model k = µ v R on D 2 is a constant, it can be seen from (4) that the ion drift is linear. However, the memristor is a nanometer device, and a small voltage can produce a strong electric field, so as to lead to the nonlinear drift of ions, which is more significant at the edge of the device. In order to characterize the nonlinear drift of ions, it is necessary to multiply a window function g(z) [29] on the right side of (4), and then we obtain: Equation (4) is also called a linear impurity drift model, and (5) is the window function model. In addition, a piecewise function model [30] and a cubic nonlinear model [31] are often used. The advantages and disadvantages of these four commonly used models can be directly referred to [32].
In [33], the researchers presented general mathematical models of a voltage-controlled memristor. .
where M is the resistance value of the memristor, f is the nonlinear function, and M −1 = 1/M is the memory conductance of the memristor. Since the memristor is a nano-sized circuit component, it has not been marketed due to the limitations of nano-technology. Therefore, the research into memristors is mainly to establish the mathematical model of memristors [34,35], the equivalent circuit model [36,37], and the simulation model [38,39]. The application research for memristors is mainly based on various models of memristors and the nonlinear, nonvolatile, or switching characteristics of memristors.

The Control Method Design of Memristors
In order to further broaden the application range of memristors, this paper designs an iterative learning control method by analyzing the mathematical model of voltagecontrolled memristors. This method makes the input voltage of the memristor approach the desired input voltage gradually with the increase of iterations, so that the resistance value of the memristor gradually approaches the desired resistance value.
In this paper, let the output of the memristor be y(t) = x(t), where x(t) is the resistance value of the memristor, let the input voltage of the memristor be v(t) as the control variable, f (x, v, t) is the nonlinear function of v(t) and x(t), and assuming that the k-th iteration is currently performed and the time interval of repetitive operation is t ∈ [0, T], then the voltage-controlled memristor can be expressed as follows: where the subscript k indicates the number of the iterative learnings.

Assumption 1.
There exists the partial derivative A k , B k of the nonlinear function f (x k (t), v k (t), t) with respect to x, v, and A k , B k are differentiable with respect to t and B k is bounded, where , A k and B k are functions of ξ k , η k , t. According to the differential median theorem, ξ k is a resistance between x k (t) and x k+1 (t), and η k is a voltage between v k (t) and v k+1 (t).
, which can make the state of the system be the desired value, i.e., satisfying Assumption 3. At each operation, the system satisfies x d (0) = x k (0).

Remark 1.
Assumption 2 is the controllability condition of a given trajectory. If the condition is not satisfied, the control of the system will be meaningless. Assumption 3 requires that each iteration satisfies the same initial condition, which is the basic condition to realize the perfect tracking control.
In practice, this assumption may not be strictly satisfied, but it can be made consistent with the actual value by adjusting the initial value of the desired trajectory.
The paper uses the derivative-type (D-type) iterative learning control method to control the resistance of the memristor. Then the control algorithm is designed as follows: where L is a learning gain, e k (t) = y d (t) − y k (t) is a tracking error of the resistance. The system structure figure of the iterative learning control is shown as Figure 2. The control objective of this paper is to use the algorithm (11) to control the nonlinear system (9) satisfying the Assumptions 1-3, so that the actual output

Convergence Analysis of the Control Algorithm
For the convenience of the subsequent convergence proof, the following related definitions are first given here. The control objective of this paper is to use the algorithm (10) to control the nonlinear system (8) satisfying the Assumptions 1-3, so that the actual output y k (t) of the system can gradually track the desired output y d (t) with the increase of iterations in a finite time interval.

Convergence Analysis of the Control Algorithm
For the convenience of the subsequent convergence proof, the following related definitions are first given here. Definition 1 [40]. The λ norm of a vector function h : [0, T] → R n is defined as The main results of this paper are given below.
Theorem 1. The iterative learning control algorithm (10) is adopted to control the nonlinear system (8) satisfying the Assumptions 1-3. When selecting the bounded learning gain L, satisfying then as k → ∞ , the output y k (t) converges to the desired trajectory y d (t), i.e., lim k→∞ y k (t) = y d (t), which means the memristive resistance x k (t) can converge to the desired resistance x d (t). Among them, the definition of B k can be found in Assumption 1 above.
Proof of Theorem 1. According to the definition of the tracking error and Assumption 3, we find Since it is difficult to obtain the analytic expression of the system (8), the convergence condition of the iterative learning control algorithm (10) cannot be obtained directly from (12). As a result, the following processing is needed.

The Simulation Experiments
In order to further verify the effectiveness of the proposed algorithm, the simulation experiments were performed on the following memristors. According to the cubic nonlinear model of the memristor proposed in reference [31], combining with the general mathematical model of the voltage-controlled memristor, the resistance change rate of the memristor in the paper is expressed as a cubic nonlinear function of the input voltage. Its mathematical expression is shown as follows: .
where α and β are constant, v is the input voltage (control voltage), x is the resistance of the memristor, and f (x, v, t) is the cubic nonlinear function of the input voltage. Let the memductance be W(x, v, t) = x −1 , then the output current of the memristor is i(t) = x −1 v(t). This expression (18)

The Simulation Experiments
In order to further verify the effectiveness of the proposed algorithm, the simulation experiments were performed on the following memristors. According to the cubic nonlinear model of the memristor proposed in reference [31], combining with the general mathematical model of the voltage-controlled memristor, the resistance change rate of the memristor in the paper is expressed as a cubic nonlinear function of the input voltage. Its mathematical expression is shown as follows:  Figure 6. It can be seen from Figure 2 to Figure 6 that the resistance of the memristor (19) has nonlinear characteristics, and the hysteresis loop of the memristor (19) can gradually narrow with the increase of frequency and widen with the increase of amplitude, that is, Equation (19) accords with the basic characteristics of the memristor.
The simulation results are shown in Figures 7-10. Figure 7 is the tracking the memristor's resistance to Equation (20) at different iterations, Figure 8 is the error curve of the memristor's resistance to Equation (20), Figure 9 is the tracking the memristor's resistance to Equation (21)   In order to verify the control effect of the proposed algorithm (10) on the memristor resistance, Equation (18) is used to represent the resistance change rate of the memristor. Let the resistance x k (t) be the output y k (t), and v k (t) be the control voltage. Select α = 400 Ω/(V · s), β = 400 Ω/(V 3 · s), the iterative learning gain is L = 0.0001, the control voltage at first iteration is v 0 (t) = 0, the simulation time is T = 4 s, the sampling period is 0.01 s, then the expected resistance of the memristor is divided into the following two cases: y d1 (t) = x d1 (t) = 260 + 240 sin(πt) The simulation results are shown in Figures 7-10. Figure 7 is the tracking curve of the memristor's resistance to Equation (19) at different iterations, Figure 8 is the tracking error curve of the memristor's resistance to Equation (19), Figure 9 is the tracking curve of the memristor's resistance to Equation (20) at different iterations, and Figure 10 is the tracking error curve of the memristor's resistance to Equation (20).          It can be seen from Figures 7 and 9 that at the 60th iteration, the resistance of the memristor has completely tracked the desired resistance in the time interval [0,4]s , rather than the asymptotic tracking with time. At the same time, it can also be seen from Figures 8 and 10 that the tracking error gradually converges to 0 with the increase of the number of iterations. Therefore, the control algorithm proposed in this paper can make the resistance change according to the desired trajectory. The reason is that the input voltage can approach the desired voltage step by step through the control system in Figure 2 and the iterative learning control algorithm (11). As a result, the resistance of the memristor tends to the desired trajectory, step by step.   It can be seen from Figures 7 and 9 that at the 60th iteration, the resistance of the memristor has completely tracked the desired resistance in the time interval [0,4]s , rather than the asymptotic tracking with time. At the same time, it can also be seen from Figures 8 and 10 that the tracking error gradually converges to 0 with the increase of the number of iterations. Therefore, the control algorithm proposed in this paper can make the resistance change according to the desired trajectory. The reason is that the input voltage can approach the desired voltage step by step through the control system in Figure 2 and the iterative learning control algorithm (11). As a result, the resistance of the memristor tends to the desired trajectory, step by step. It can be seen from Figures 7 and 9 that at the 60th iteration, the resistance of the memristor has completely tracked the desired resistance in the time interval [0, 4] s, rather than the asymptotic tracking with time. At the same time, it can also be seen from Figures 8 and 10 that the tracking error gradually converges to 0 with the increase of the number of iterations. Therefore, the control algorithm proposed in this paper can make the resistance change according to the desired trajectory. The reason is that the input voltage can approach the desired voltage step by step through the control system in Figure 2 and the iterative learning control algorithm (10). As a result, the resistance of the memristor tends to the desired trajectory, step by step.
In order to further verify the effectiveness of this algorithm, the memristor model represented by Equations (2) and (4) is simulated here. Its simulation parameters are set as follows: R on = 100 Ω, R off = 600 Ω, µ v = 10 −14 m 2 s −1 V −1 , D = 10 nm, the iterative learning gain L = −0.00001, the control voltage at the first iteration v 0 (t) = 0, the desired resistance of memristor M d (t) = 260 + 240 sin(πt), the initial resistance M(0) = M d (0) = 260 Ω, and the simulation time T = 4 s. The simulation results are shown in Figures 11 and 12. Among them, Figure 11 is the tracking curve at the 50th, 100th, and 500th iteration learning, and Figure 12 is the convergence curve of the tracking error with the iterations. As can be seen from Figures 11 and 12, the algorithm (10) in this paper can also realize the resistance tracking control for the memristor model represented by Equations (2) and (4).
Entropy 2023, 25, x FOR PEER REVIEW 13 of In order to further verify the effectiveness of this algorithm, the memristor mod represented by Equations (2) and (4) Figures 11-12. Among them, Figure 11 is the tracking curve at the 50th, 100t and 500th iteration learning, and Figure 12 is the convergence curve of the tracking err with the iterations. As can be seen from Figures 11 and 12, the algorithm (11) in this pap can also realize the resistance tracking control for the memristor model represented b Equations (2) and (4).  Hardware-adjustable resistors in engineering mainly include rheostats, resistance boxes, and programmable resistors. The variation of the resistance value of these traditional hardware-adjustable resistors is discrete, and the accuracy of the resistance value depends on the set block, the number of resistors, or the number of network nodes. However, the variable resistance designed by memristor and iterative learning control method in this paper can be adjusted continuously and can track the desired resistance with arbitrary precision. Therefore, compared with the traditional hardware-adjustable resistor, the adjustable resistor designed in this paper can improve the continuity, flexibility, and adjusting accuracy of the variable resistor.  (2) and (4) to desired resistance. Figure 12. Tracking error of the memristor (2) and (4) to desired resistance.

Conclusions
Aiming at how to make the resistance of the memristor change according to the desired trajectory, this paper proposes an iterative learning control method for the resistance of the memristor by analyzing the general mathematical model of the voltage-controlled memristor. The method is to use successive iterative learning to make the control voltage of the memristor gradually approach the desired voltage with the increase of the iterations, achieving the purpose of changing the resistance of the memristor according to the desired resistance. Furthermore, the convergence of the proposed algorithm is mathematically strictly proved, and the convergence conditions are deduced. The research results show that the proposed algorithm can make the resistance of the memristor completely track the desired resistance in a finite time interval with the increase of iterations. The controller based on this method not only has a simple structure that is convenient for engineering implementation, but it does not rely on the precise mathematical model of the memristor. At the same time, compared with the traditional digital potentiometer, the resistance control system designed in this paper can improve the continuity, flexibility, and accuracy of variable resistor, which will lay a foundation for the application research on memristors in analog circuits, digital circuits, and other fields.