A Novel Memristive Multilayer Feedforward Small-World Neural Network with Its Applications in PID Control

In this paper, we present an implementation scheme of memristor-based multilayer feedforward small-world neural network (MFSNN) inspirited by the lack of the hardware realization of the MFSNN on account of the need of a large number of electronic neurons and synapses. More specially, a mathematical closed-form charge-governed memristor model is presented with derivation procedures and the corresponding Simulink model is presented, which is an essential block for realizing the memristive synapse and the activation function in electronic neurons. Furthermore, we investigate a more intelligent memristive PID controller by incorporating the proposed MFSNN into intelligent PID control based on the advantages of the memristive MFSNN on computation speed and accuracy. Finally, numerical simulations have demonstrated the effectiveness of the proposed scheme.


Introduction
In 1971, Professor Chua theoretically formulated and defined the memristor and described that the memristance (short for resistor of a memristor) is characterized by the relationship between the electrical charge and flux passing through a device [1]. However, it was only after the first physical realization of the memristor in nanoscale at Hewlett-Packard (HP) Lab in 2008 that it immediately garnered extensive interests among numerous researchers [2][3][4]. The reported experiments confirmed that the memristor possesses switching characteristic, memory capacity, and continuous input and output property. Due to these unique properties, memristors are being explored for many potential applications in the areas of nonvolatile memory [5,6], very-large-scale integrated (VLSI) circuit [7], artificial neural networks [8][9][10], digital image processing [11][12][13], and signal processing and pattern recognition [14]. At present, a considerable number of models of different complexity have been proposed in the literatures, such as Pickett's model [15], spintronic memristor model [16], nonlinear ionic drift model [17], boundary condition-based model [18], and threshold adaptive memristor model [19]. These published models exhibit desired nonlinearity of nanoscale structures. This paper still applies the TiO 2 memristor model on account of its simplified expressions and the same ideal physical behaviors.
Brain neural network emerges from the interactions of dozens, perhaps hundreds, of brain regions, each containing millions of neurons [20]. They are highly evolved nervous systems capable of high-speed information processing, realtime integration of information across segregated sensory channels, and brain regions [20,21]. In order to obtain the similar intelligence of human brain, artificial neural network is designed to imitate the human brain not merely on architecture but also on work patterns. The connection structure of artificial neural networks is generally divided into feedforward, feedback, single-layer, multilayer, and so forth. Most of these connection architectures are approximately regular. However, the bioneurological researches show that brain neural network has random features to a certain degree and exhibits "small-world" effectiveness, that is, high levels of clustering and short average path length [22]. Therefore, it becomes a hot issue to design bionics neural network with randomness in architecture based on the background of neurobiology.
Notably, Watts and Strogatz revealed a significant effect that is in common among complex networks. They pointed out that the real architecture of network is nearly a middle model between regular connection and random connection and defined it as small-world network (WS model) in 1998 [23]. Over the past several years, a large number of investigations on complex networks have provided new insight into biological neural networks. Bassett concluded that human brain functional networks have small-world network topology derived from a series of magneto encephalography experiments [22]. Douw et al. found that the cognition is related to the resting-state small-world network topology [24]. In literature [25], the authors applied small-world properties into prefrontal cortex that correlate with predictors of psychopathology risk, which holds promise as a potential neurodiagnostic for young children. Taylor has studied the protein structures and binding based on small-world network strategies and has made great progress [26]. Simard built up a small-world neural network through rewiring the regular connections and found that the small-world neural network has faster learning speed and smaller error than that of the regular network and random network with the same size [27]. In this paper, we incorporate the memristor into the multilayer feedforward small-world neural network to build up a new type of memristive neural network that is easy of VLSI implementation and closer to biological networks. Furthermore, based on the proposed memristive neural network, a novel memristive intelligent PID controller is put forward. The nanoscale memristor is beneficial for easily adjusting the PID control parameters and the hardware realization of modern intelligent microcontrol system. This paper is organized as follows. In Section 2, we derive the mathematical model of a nonlinear memristor which takes into account the nonlinear dopant drift effect nearby the terminals and the boundary conditions and give its Simulink model correspondingly. Following that, the concepts and design algorithm of the memristive small-world neural network are described in detail in Section 3. Section 4 designs a memristive PID controller by combining the proposed neural network with the standard PID control theory. In order to guarantee the feasibility and effectiveness of the proposed scheme, the computer simulations are performed in Section 5. Finally, we give the conclusions in Section 6.

The Mathematical Model of the Memristor.
A memristor or memristive device is essentially a two-terminal passive electronic element with memory capacity. Its memristance state depends on the amplitude, polarity, and duration of the external applied power. The physical model of the HP memristor from [28], shown in Figure 1, consists of a twolayer thin film (thickness ≈ 10 nm) of TiO 2 sandwiched between two platinum electrodes. One of the layers, which is described as TiO 2− , is doped with oxygen vacancies (called dopants) and thus it exhibits high conductivity. The width of the doped region is modulated depending on the amount of electric charge passing through the memristor. The other TiO 2 layer owning an insulating property has a perfect 2 : 1 oxygen-to-titanium ratio, and this layer is referred to the undoped region. Generally, an external excitation V( ) applied across the memristor may cause the charged dopants to drift and the boundary between the two regions would be moved correspondingly with the total memristance changed eventually.
The total resistance of the memristor, , is a sum of the resistances of the doped and undoped regions: where on and off are the limited values of the memristance for = and = 0, respectively. Setting the internal state variable as = / , ∈ [0, 1], (1) can be rewritten as When = 0, the initial memristance is The Scientific World Journal The movement speed of the boundary between the doped and undoped regions depends on the resistance of doped area, the passing current, and other factors according to the state equation: where ] ≈ 10 −14 m 2 s −1 V −1 is the average ionic mobility parameter. As we all known, small voltages can yield enormous electric fields in nanoscale devices, which can secondarily produce significant nonlinearities in the ionic transport. As for a memristive device, these nonlinearities are manifested particularly at the thin film edges, especially at the two boundaries. This phenomenon, called nonlinear dopant drift, can be simulated by multiplying a proper window function ( ) on the right side of (4). Based on [28], there are several kinds of classical window functions, such as Joglekar window function and Biolek window function. This paper chooses the Joglekar window function which can be described by where is a positive integer called the control parameter. Figure 2(a) exhibits the behavior of the Joglekar window function for different values of . Figure 2(b) shows the graphs of the memristance versus charge of the memristor. As the value of becomes smaller, the nonlinearity increases. On the other hand, as the integer increases, the model tends to the linear model. Based upon this, as well as the literature [3,28], we set the value of the integer = 1 in this window function and obtain Substituting (6) into (4), where the internal state variable satisfies ( ) ∈ [ 0 , ( )] and the integration time is 0 ≤ ≤ . Assume 0 = 0; we can get The initial value of the state variable can be expressed as Then, the expression of ( ) can be calculated as where is a constant and its value is determined by off , on , and 0 : 4 The Scientific World Journal  Combining (2)-(11), the resistance of memristor can be rewritten as where Δ = off − on . Giving a sine stimulus to the memristor, we get the simulation results using MATLAB software. It is noteworthy that the memristor is a two-terminal element with polarity, which is shown in Figure 3(a). When the current flows into the memristive device from the positive pole to the negative pole, one can get the relationship curve (the blue line) between memristance and charge through it as shown in Figure 3(b). On the contrary, when the current flows into the memristor from the negative pole to the positive pole, the relationship curve is denoted by the red dashed line. When the charge is close to or exceeds the charge threshold values, the resistance of the memristor reaches and stays at on and off , respectively. Notably, the threshold value denotes the quantity of electric charge required when the memristance reaches the limit resistance. The parameters of the model are on = 100 Ω, off = 20 kΩ, 0 = 10 kΩ, = 10 nm, and ] ≈ 10 −14 m 2 s −1 V −1 . Moreover, the simulation results in Figure 3(b) are consistent with the results concluded by Adhikari et al. in [8,29].  adders, and modules), and parameter control modules. The model parameters are the same as those in Figure 3. The signal stimulus applied into the memristor is a sinusoidal current source with amplitude of 0.5 mA and frequency of 1 Hz.
The simulation results are exhibited in Figure 5. The current flowing through the memristor is shown in Figure 5(a). The typical hysteresis loop in Figure 5(b) shows its switching characteristic; that is, the memristance can switch between high resistance and low resistance. Figure 5(c) illustrates that the memristance is a nonlinear function of the flow of charge as discussed previously. Figure 5(d) shows the relationship between the memristance and the charge . Notably, in the part of the higher memristance state, the change ratio of the memristance is low, while, in the part of the lower memristance state, the change ratio of the memristance is high.

The Memristive Multilayer Feedforward
Small-World Neural Network

The Multilayer Feedforward Small-World Neural Network.
Generally, small-world phenomenon indicates that a network has highly concentrated local connections and also includes a few random long connections. In real world, a large number of networks have the small-world effect, such as disease transmission network, social network, and the food chain network [22]. As is known to all, in the classical multilayer feedforward neural network, such as BP network, the th neuron in the th layer V only connects its neighboring neuron sets −1 and +1 . In addition, all connections are feedforward and no connections exist between neurons within the same layer. This kind of network can be considered as a regular network. Based on [27] and the construction process of WS small world model, we introduce Algorithm 1   6 The Scientific World Journal Input Output Set the network has layers Set each layer has nodes For ℎ = 1 To − 2 which is used to construct multilayer feedforward neural network model according to the rewiring probability. The specific construction process is given as follows.
Step 1. Initialization: assuming the number of the network layers is , each layer has neuron nodes and the rewiring probability is .
Step 2. Generate the multilayer feedforward regular neural network, as shown in Figure 6(a).
Step 3. As shown in Algorithm 1 where 1 (ℎ) is the probability to select reconnection layer, selection probability between two neurons decreases exponentially. and are the distance coefficients, rand and randint both are MATLAB functions, the former is used to generate a number between (0, 1) randomly, and the latter can be used to randomly generate an integer from 1 to . Since the connections of the ( − 1)th layer cannot generate new long-connections if they are disconnected, the connections of the last two layers are not reconnected in the network.
As shown in Figure 6(a), when the rewiring probability = 0, the connection of the network maintains completely regular mode. Nonetheless, when ranges from 0 to 1, the long cross-layer connections are generated according to the rewiring probability and the probability of reconnection layer selecting. The resulting structure is between completely regular and random connection mode, as shown in Figure 6(b).
More specially, we set the network connection matrix as , where denotes the connection submatrix between the th layer and the ( + 1)th layer.
∈ is the connection weight between the neuron of the th layer and the neuron of the ( + 1)th layer. If there exists connection between these two neurons, then ̸ = 0; otherwise, = 0. Therefore, the regular network connection matrix can be expressed as the following equation: , (13) in which the number zero means no connection exists between the corresponding layers. As for multilayer feedforward small-world neural network, because of the reconnection performance, the connection matrix changes into as ) , where represents the reconnection submatrix between the th layer and the ( + 1)th layer, and the is the submatrix between two nonadjacent layers, which ∈ {1, 2, . . . 5}, ∈ {3, 4, . . . 7}.
The Scientific World Journal 7

The Memristive Synapse.
The nanoscale memristor has high potential of information storage on account of the nonvolatility with respect to long periods of power-down, so it can be used as electric synapse in the artificial neural networks, and the primary reasons are manifold. Firstly, as a kind of analog component, this device can realize weight updating continuously. Moreover, the memristor possesses the capacity of information storage due to the nonvolatility. This feature is consistent with the memory ability of the neurons in human's brain. Additionally, the memristive neural network can be further integrated in crossbar array which has significant advantages in better information processing capacity and huger storage.
According to the nonlinear memristor model in Section 2, the memristive conductance can be calculated from (12) as Differentiating (15) with respect to time , we can be obtain where the current ( ) = ( )/ . Notably, when Δ → 0, ( ) ≈ Δ . Hence, the rate of the memristive conductance Δ can be described as the synapse weight update rule. The relationship curve between the rate of the memristive conductance change and the current is shown in Figure 7. When the current is tiny, the memristive conductance is almost invariant. While the current tends to ±4 mA, the memristive conductance changes suddenly. So the current threshold value of the memristive synapse can be set as | th | = 4 mA.

The Memristive Activation Function.
In the standard MFSNN, the activation function for each neuron is usually the nonlinear Sigmoid function. Particularly, the activation function of the hidden layer adopts bipolar Sigmoid function, but the output layer activation function is unipolar Sigmoid function.
Based on the constitutive relationship of the memristor, a lot of nonlinear curves can be simulated and substituted [5,6,11,12]. Based on the Simulink model of the nonlinear memristor described in Section 2, we get its simplified Simulink model accordingly as shown in Figure 8(a). Furthermore, we design a package of the memristive device (in Figure 8(b)) which can be considered as a system with single-input and double-output. In this system, the input variable is the current , and the output variable is the memristance ( ) and charge ( ), respectively. Then, the behavior of the output curve can be adjusted efficiently by the parameter control module, gain module, and internal operation module, which is crucial to implement the activation function in the neural network. Here, we set the activation functions for the hidden layer and output layer neurons of the memristive MFSNN as ℎ( ) and ( ), respectively. Figure 9(a) exhibits the constructing principle diagram of the memristive activation function in the hidden layer, in which the red dotted line frame represents the parameter adjustment area. 1 is the adjustable gain which is used for controlling the shape of the activation function, and 2 is the fixed gain whose value is 2 = 10 −4 . The suitable parameters of the memristor are chosen as on = 100 Ω, off = 20 kΩ, 0 = 10 kΩ, = 10 nm, and ] ≈ 10 −14 m 2 s −1 V −1 . The input signal is a sinusoidal current with an amplitude of 0.5 mA and a frequency of 1 Hz. Notably, the polarity of the voltage applied into the memristor is opposite to the polarity of the memristor itself; that is, the current flows through the memristor from the negative polar to the positive polar. Figure 9(b) shows the memristive activation function of the hidden layer, and its shape varies with different values of 1 .
Similarly, Figure 10(a) is the constructing principle diagram of the activation function of the output layer. In the parameter adjustment part (the red dotted line frame), 3 is an adjustable gain and 4 is the fixed gain whose value is 4 = 2 × 10 −4 . The parameters are the same with the simulation in Figure 9. Figure 10(b) shows the memristive activation function of the output layer. Obviously, as the value of 3 increases, the graphs tend to flatten.

The Memristive Intelligent PID Controller
So far, the PID control has found widespread applications in the modern control field. By adjusting the control action of the proportion, integration, and differentiation, we get an interactive nonlinear relationship among these control variables. The neural network has the ability of expressing the nonlinearity, which can be used in the PID control for implementing the optimal nonlinear relationship among control variables. In this work, we build up a more intelligent PID controller with the parameters ( , , and ) self-tune based on the presented memristive multilayer feedforward small-world neural network.
According to the literature [30], the classical incremental digital PID control algorithm can be described as where the , , and are the coefficient of the proportion, integration, and differentiation, respectively. In Figure 11, the ANN is the memristive multilayer feedforward small-world neural network. Its learning algorithm consisted of the backward error propagation and the forward input signal propagation. Different from the traditional multilayer feedforward neural network, the state of the neurons in each layer not only affects the state of the neurons in the next layer but also affects the state of the neurons in the cross-layer.
Based on the novel neural network presented in Section 3, we set the , , and that represent the input layer, hidden layer, and output layer, respectively. The number of the input layer is 1 which is same with that of the output layer, and the number of the hidden layer is . represents the input vector of the network, then the set of the input samples is 1 = [ 1 , 2 , 3 , . . . , ]. The number of the input vectors is dependent on the complexity of the system. Notably, the superscript 1 represents the first layer in the whole neural network.
The input and output vectors of the first hidden layer can be expressed as where the superscript 1 denotes the first hidden layer of the network and ℎ( ) is the memristive bipolar sigmoid function proposed in Section 3.
By that analogy, the input and output vectors of the th hidden layer can be written as Finally, the input and output vectors of the output layer can be obtained as where ( ) denotes the memristive unipolar sigmoid function. The three nodes of the output layer are corresponding with the nonnegative adjustable parameters , , and of the PID controller, respectively.
From [27], we conclude the weight update algorithm of the memristive multilayer feedforward small-world neural network as below: where is the inertial coefficient, whose scope ranges from 0 to 1, and ∈ (0, 1) is the learning rate.

Computer Simulations and Results
In this section, some numerical simulations of the memristive multilayer feedforward small-world neural network PID controller have been executed on MATLAB software. The mathematical model of the controlled plant is given as where the ( ) is slow time-variant and its expression is The memristive neural network under investigation is constituted by seven layers with four neurons in the input layer, three neurons in the output layer, and five in each of the five hidden layers. The learning rate of the network = 0.4, and the inertial coefficient = 0.05. The initial weighs as random values fall in [−0.5 0.5], and the value of the rewiring probability is chosen as = 0, = 0.08, = 0.1, and = 0.2, respectively. The parameters are on = 100 Ω, off = 20 kΩ, 0 = 10 kΩ, = 10 nm, and ] ≈ 10 −14 m 2 s −1 V −1 , 1 and 3 are user-specified parameters whose value both are 20000, and the action time is = 0.001 s. When the system works steadily, the tracking results can be gotten as follows. Figure 12(a) shows the input signal (step response curve in ( ) = 1.0) and the output curves under a different rewiring probability . As can be seen from the figure, when the time = 0.5 s, the whole system reaches the steady state.
Making a further analysis, we can conclude that when the rewiring probability = 0, the memristive neural network keeps regularly in architecture. Its respond speed is slower than that of network when the rewiring probability = 0.08 and = 0.1. Moreover, Figure 12(b) exhibits the error curves between the input signal and the output signal correspondingly. When the rewiring probability = 0.08 and = 0.1, the network spends less time on approaching the predefined approximation error than the regular network (when = 0). Figure 12(c) shows the output variables of the memristive multilayer feedforward small-world neural network when = 0.08 which are the control parameters , , and , correspondingly. In order to verify the superior performance of the memristive small-world neuronal networks and figure out the optimal structure, we conducted a series of simulations to The Scientific World Journal observe the convergence performance of the proposed network under different . Figure 13(a) shows the approximation speed (iteration times) of different network structures, that is, the smallest iteration number for reaching the predefined approximation error = 0.0001. Each drawn point is the average value of 50 times runs. It can be observed that the small-world networks (0 < < 1) need much less iteration times than the regular neural network (when = 0), which demonstrates its advantage in processing speed. Furthermore, when = 0.08, the network has the fast approximation speed.
Notably, the mathematical function of this system has the local minimum, for getting out of the local minimum, we define the maximum allowable iteration times to be 10000, as previously mentioned for each , and we performed the simulation for 50 times, where the effective approximation times, that is, error < 0.0001 within 10000 iterations, are presented in Figure 13(b). It can be found that the small-world networks have higher accuracy rate than the regular network.

Conclusions
A mathematical closed-form charge-governed memristor model is recalled firstly and the corresponding Simulink model is presented. Using the change rule of memconductance, a memristive realization scheme for synaptic weight is proposed. Moreover, the activation functions in electric neurons are also implemented based on the single-input and double-output package of the memristor. Combining the proposed memristive synapse and activation functions, a memristor-based MFSNN is addressed. It exhibits advantages in computation speed and accuracy over the traditional multilayer neural networks by considering the small-world effect. Meanwhile, it has potential of hardware realization of the neural network because of the nanoscale size of the memristive synapse. These superior properties can further improve the application of the neural networks, such as in the intelligent controller design. Motivated by this, we apply the memristor-based MFSNN to classical PID control, and the proposed memristive PID controller may possess the following superiorities. (i) Its nanoscale physical implementation could promote the development of the microcontroller. (ii) Because of the participation of the memristive neural network, the proposed PID controller can realize the parameters self-adjustment. (iii) The control speed and accuracy are improved. Eventually, extensive numerical simulations justify the effectiveness and efficiency of the memristive PID controller over the regular neural network PID controller. This work may provide a theoretical reference to physically realize the small-world neural networks and further promote the development of modern intelligent control technology.