# PID Controller Based on Memristive CMAC Network

Authors: Lidan Wang; Xiaoyan Fang; Shukai Duan; Xiaofeng Liao
Journal: Abstract and Applied Analysis
 (2013)

---

## Abstract

Compound controller which consists of CMAC network and PID network is mainly used in control system, especially in robot control. It can realize nonlinear tracking control of the real-time dynamic trajectory and possesses good approximation effect. According to the structure and principle of the compound controller, memristor is introduced to CMAC network to be a compound controller in this paper. The new PID controller based on memristive CMAC network is built up by replacing the synapse in the original controller by memristors. The effect of curve approximation is obtained by MATLAB simulation experiments. This network improves the response and learning speed of the system and processes better robustness and antidisturbance performance.


---

## Body

## 1. Introduction

The cerebellar model articulation controller (CMAC) neural network is an adaptive learning network for the multidimensional continuous system or regarded as a multidimensional table look system for external functions. It is a kind of adaptive learning network which is similar to the associative memory network of perceptron and can approximate random nonlinear dynamic model. In 1975, CMAC was proposed by Albus as a controller model that can imitate cerebral connections [1, 2]. The LMS algorithm was introduced into the CMAC by Miller and Hewes and was successfully applied in multi-degree-of-freedom robot joint control during intervening years after 1998 [3–5]. At that time, the academic researchers were suffering from finding an artificial neural network model with good real-time performance. Although the BP network has the capability of the excellent nonlinear mapping, its convergence speed is too slow to meet the real-time control requirement. Great attentions have been paid to the CMAC for its good real-time and nonlinear characteristics, rapid algorithmic computation, output superposition, functional representation, fast learning speed, local generalization capability, and easy hardware implementation [6]. It is widely used in pattern recognition, signal processing, and robot control. Many researchers devoted themselves to the research of CMAC soon after. Lane et al. presented the higher-order CMAC neural network that allowed the multilayer CMAC network architectures to be constructed [7]. Kim and Lewis proposed the optimal design of CMAC neural network controller for robot manipulators, which had good performance even in the presence of large modeling uncertainties and external disturbances [8]. The adaptive CMAC is used in the supervisory control for uncertain nonlinear systems [9]. However, there were some defects in the CMAC network, such as the low learning accuracy, the poor approximation performance, and the slow convergence speed. The development and applications of the CMAC neural network are limited to some extent.Memristor is a kind of nonlinear [10, 11] and nonvolatile [12] circuit device which was proposed by Professor Chua in 1971 according to the completeness of the circuit theory [13] and was realized by HP in 2008 [14]. Memristor can be used as a tunable parameter in the control systems because it has a natural advantage of replacing neural synapse [15, 16].According to its definition and properties, memristor is regarded as a nanoscale rheostat. In this paper, memristor is used to replace the synapse of the CMAC network to construct a new compound control of neural network. This new control network has higher learning accuracy, smaller error, better approximation performance, and faster convergence speed. The feasibility of this theory is proved by the numerical simulation.


## 2. Self-Tuning Parameter PID Controller Based on CMAC

The PID controller based on CMAC can be described by the structure diagram in Figure1. Through the adaptive learning of the CMAC network, the PID controller can implement parameter self-tune and make the terminal output tending to zero. As a result, the output of CMAC network tends to the total output. It realized the on-line real-time control of the whole nonlinear network.Figure 1
The structure diagram of self-tuning parameter PID controller based on CMAC.PID is a feedback controller which can suppress system disturbance and guarantee the stability of system. CMAC is a feed-forward control which can guarantee the response and control speed of system. CMAC network is a kind of associative memory neural network which is similar to perceptron and has local generalization capacity. Its input signal can be encoded by the input layer. Its output layer can accomplish address calculation and output map. As a result, similar input produces similar output, and the network can approximate arbitrary nonlinear relationships.


## 3. PID Controller Based on Memristive CMAC

PID controller based on memristive CMAC has the same principle and structure as shown above. The CMAC parts utilize supervised learning rule to implement network feed-forward control. PID controller implements feedback control of network. We replace the synapse weight with memristor and get the output of CMAC:(1)uc(k)=∑i=1cMemi(k)ai(i=1,2,…,n),
where c is the generalization parameter of network or the number of associative units. The total output is equal to the sum of CMAC output and PID output (u(k)=up(k)+uc(k)). In order to make the difference of the total output and CMAC output tend to zero, the outputup(k) of PID control network should tend to zero.The control algorithm of PID controller based on memristive CMAC is as follows:(2)uc(k)=∑i=1mMemi(k)ai,u(k)=uc(k)+up(k).Map formula of CMAC network is as follows:(3)ai={1Si∈[vi,vi+m],i=m+1,m+2,…,m+N,0,others,
where input space S of CMAC is divided into N+2m  quantized intervals between [Smin,Smax]. In this paper, N is the amount of the virtual storage space of CMAC (N=100), m is the generalization parameter of CMAC network, and ai   is the binary selection vector.Firstly, control network makes the CMAC network get into the local weight learning adjustment process by comparing total output and CMAC output. Through learning and adjusting weight repeatedly, finally the total output of the system is equal to the CMAC output. The weight adjustment formula of CMAC network is as follows:(4)Memi(k+1)=Memi(k)+ε·up(k)mai+β(Memi(k)-Memi(k-1)),
where ε is the learning efficiency ε∈(0,1), β is the momentum factor β∈(0,1), and εup(k)ai/m is the weight change ΔMemi(k).In order to further prove that PID controller based on memristive CMAC has the better control effect, MATLAB simulation experiments are done as follows. We set the learning efficiency of CMACε=0.02, momentum factor β=0.03, generalization parameter m=5, initial values of PID control parameters are kp=28,ki=0,kd=0.9, initial value of PID controller error signal is zero, and the initial values of three neurons of PID controller are zeros in the process of simulation. Input square signal is xin=0.5sign(sin(4πkTs)), transfer function of controlled object is 100/(s2+5s+10), and sampling time is 0.001 s. The Matlab simulation results of PID controller based on memristive CMAC are shown in Figures 2, 3, and 4.Figure 2
Square signal tracking curve of compound control.Figure 3
Output signal of compound control.Figure 4
Output error curve of compound control.The experimental results show that the PID controller plays an important role at the beginning; after a while, the CMAC becomes the major control, and its control effect is better than PID controller. The whole system has a small output error and has the characteristics of robustness and good real time. The main function of PID controller in the network is to judge the performance of CMAC controller and improve the stability and attenuate disturbance.


## 4. Comparative Study of Simulation Plots of Memristive  CMAC and CMAC

The same principle and algorithm as above are used in simulations of PID controller based on memristive CMAC and PID controller based on CMAC. The initial value and sampling values of variables are constant. The input signal (the blue curve) is step signal:xin(k)=1. The tracking curve simulation plot (the green curve is the tracking curve of PID controller based on memristive CMAC, and the red one is the tracking curve of PID controller based on CMAC) and error curve simulation plot (the blue curve is the error curve of PID controller based on memristive CMAC, and the red one is the error curve of PID controller based on CMAC) are shown in Figures 5, 6, and 7.Figure 5
Tracking curve of PID controller based on memristive CMAC.Figure 6
Error curve of PID controller based on CMAC.Figure 7
Amplified error curve.From above-amplified error curves, the error value of  the blue curve is less than the red ones. That is to say, error value of PID controller based on memristive CMAC reduces rapidly, so it has more rapid learning and weight-updating speed. The less the system error is, the better the effect of system input-output curve tracking is. PID controller based on memristive CMAC not only meets the requirement of input and output, but also has an adaptive and fast learning. Meanwhile, the system response and the convergence speed are both improved, and the system stability has better guarantees.


## 5. Application of PID Controller Based on Memristive CMAC

In this paper, the simulation analysis of the PID controller based on memristive CMAC for coil winder of dry-type transformer is conducted. Deviation signal of coil winder is a kind of nonlinear signal with multiple harmonic. It is important for the response speed and control precision in production process whether it can identify and detect the signal rapidly and precisely or not. The experiment parameters are set: sampling time is 0.001 s, time interval between the maximum deviation signals is 6.36 s, and corresponding frequency is 0.1573 s. Then the discrete formula of the maximum deviation signal is as follows:(5)xin(k)=2.5cos(0.99k)+10cos(1.97k)3π-10cos(3.95k)15π+10cos(5.93k)35π.
Weight updating formula of CMAC is as follows:
(6)ωk+1=ωk+Δω=ωk+a(xin+∑i=1nωi),
where ωk is the weight at the kth moment, and n is the amount of associative unit. The learning error formula is as follows:
(7)error=(xin-∑i=14ωi)22,
where a is the learning factor and its value range changes generally from 0.02 to 0.1; xin is known as the teacher signal (the input signal of system). Choosing different parameters, the different input-output and error simulation plots can be gotten (the green asterisk represents the learning result of the output, and the blue curve is the input signal).The input-output fitting curves are obtained from the above simulation. The error exists only at the beginning of a short time. The better signal identification effect is, the faster detecting speed of PID controller based on memristive CMAC is. It has the faster learning speed and higher accuracy under the same experimental conditions than PID controller based on CMAC. Meanwhile, because memristor is a nanoscale element, the higher connection density can be realized by VLSI circuit, and the higher precision learning of multidimension function can be expected (see Figure8).Signal identification plot of PID controller based on memristive CMAC.
(a)
Input signal:xin(k)=2.5cos(0.99k)
(b)
Input signal:xin(k)=10/3πcos(1.97k)
(c)
Input signal:xin(k)=-10/15πcos(3.95k)
(d)
Input signal:xin(k)=10/35πcos(5.93k)
(e)
Input signal:xin(k)=2.5cos(0.99k)+10/3πcos(1.97k)10/15πcos(3.95k)+10/35πcos(5.93k)


## 6. Conclusions

This paper presents an effective method to construct a new PID controller based on memristive CMAC. It is composed of the memristor, CMAC network, and PID controller. From the experimental results, the new network has smaller error, faster convergence speed and learning speed, higher approximation accuracy, and stronger local generalization capability. Under the complicated, changeable, and disturbed conditions, on-line real-time control of the control system can be realized. Meanwhile, the nanoscale memristor is used as a neural synapse which can significantly increase the number of neuron connections in neural network and improve its connection density. It makes it possible that the VLSI circuits of neural networks with memristive synapse can be implemented finally.



---

*Source: 510238-2013-03-10.xml*