




Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Prepare-se para as provas
Estude fácil! Tem muito documento disponível na Docsity
Prepare-se para as provas com trabalhos de outros alunos como você, aqui na Docsity
Encontra documentos específicos para os exames da tua universidade
Prepare-se com as videoaulas e exercícios resolvidos criados a partir da grade da sua Universidade
Responda perguntas de provas passadas e avalie sua preparação.
Ganhe pontos para baixar
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
CMAC Neural Network Modeling article
Tipologia: Teses (TCC)
1 / 8
Esta página não é visível na pré-visualização
Não perca as partes importantes!





Magdy Abdelhameed Ahmed Kassem Ain Shams University Amro Shafik Faculty of Engineering Benha University Abdo Pasha, Abbasia, High Institute of Technology Cairo, Egypt Benha, Qaluobiya, Egypt E-mail: [email protected] E-mail: [email protected] E-mail: [email protected]
Neural networks, CMAC, Learning algorithms.
ABSTRACT
Cerebellar Model Articulation Controller Neural Networks (CMAC NN) is one of the intelligent systems used for modeling, identification, classification, and controlling of nonlinear systems. In this paper, the mathematical model of CMAC is presented. CMAC is implemented using Simulink environment and its parameters are tuned to get the best CMAC control action. Three different learning algorithms are tested, using a constant learning rate, a variable learning rate, and learning by the control action of the conjugate conventional controller. The effect of varying CMAC parameters is studied and discussed. The simulation results showed that the learning algorithm based on constant learning rate gives the best performance.
INTRODUCTION
The Cerebellar Model Articulation Controller (CMAC) is a type of neural networks based on a model of the mammalian cerebellum. It is also known as the Cerebellar Model Arithmetic Computer. It is a type of associative memory. (Albus 1975) introduced the theory of cerebellar function. He stated that CMAC is a memory management technique which causes similar inputs to tend to generalize so as to produce similar outputs, and dissimilar inputs result in outputs which are independent. (Albus 1975) clarified that CMAC computes control functions by referring to a table rather than by solution of analytic equations or by conventional analog servo techniques.
CMAC has two basic features if it is compared to neural networks (NN), it has a very fast learning capability, and it requires minimal a prior knowledge of the system. CMAC also has good generalization capability and information storing ability. CMAC is more suitable for real time implementation, since it does not contain time consuming sigmoid activation functions. But besides these attractive features it has a serious drawback; its memory complexity may be very large. In multidimensional case this may be so large that practically it cannot be implemented.
(Horvath and Gati 2009) presented a solution for the memory complexity problem of CMAC through using
Kernel CMAC (KCMAC). KCMAC reduce the memory complexity of CMAC networks without deteriorating its performance. The proposed version exploits the benefits of kernel representation and the complexity reduction effect of hash-coding, while smoothing regularization helps to reduce the performance degradation.
CMAC was applied during the last decade to different engineering applications for the purposes of intelligent control and performance enhancement. Generally, CMAC works with a conventional controller like Proportional- Integral (PI) (Abdelhameed et al. 2002) and (Hsu et al. 2009), Proportional-Derivative (PD) (Yu et al. 2009), and PID (Li and Xu 2009). An important development of CMAC was introduced by (Yeh and Tsai 2010) who developed a standalone single-input CMAC control system with online learning ability. CMAC in that time was used to work alone without the need of a conventional controller and it can provide the control effort to the plant at each online learning step without preliminary offline learning.
Several works were done for engineering and industrial applications such as (Abdelhameed et al. 2002) who introduced an adaptive learning algorithm for CMAC, in order to solve the instability problem which is occurred with the conventional CMAC after a long period of real time runs, to improve the tracking control of a piezoelectric actuated tool post. (Tsai and Yeh 2009) developed a CMAC NN speed estimator for speed-sensorless induction motor drives. They used the gradient-type learning technique to provide a real-time adaptive estimation of the motor speed. (Yu et al. 2009) built a hybrid controller includes a proportional-derivative compensator (PD) and a fuzzy CMAC for position tracking and anti-swing of an overhead crane. They discussed the stability of the system using a Lyapunov method and an input-to-state stability technique and proved that the controller is robustly stable with bounded uncertainties. (Ding et al. 2007) introduced a dynamic compensation method based on CMAC neural network for an accelerometer to avoid the noises, the drift error and the disturbances of the system. The data of the accelerometer dynamic response was measured and used for creating the dynamic compensation model which its parameters were trained by CMAC NN. (Li and Xu 2009) designed another hybrid controller in which CMAC feedforward and PID feedback control was employed for XY parallel micropositioning stage. CMAC neural network
with adjustable learning rate was employed into the PID control to compensate the hysteresis arising from piezoelectric actuator used for micropositioning.
Several works were done for medical applications of CMAC, (Bucak and Baki 2010) used CMAC ANN to develop an expert diagnosis system has a three-stage CMAC ANN architecture for classifying the healthy liver (liver data with no liver disease), hepatitis, and cirrhosis through the interpretation of the data consisted of the liver enzymes. The classification had a 100% success rate. (Wen et al. 2009) proposed a self-organizing cerebellar model articulation controller (SOCMAC) for the real-time classification of ECG complexes. The well-trained classifier used to classify the testing set and gives a classification accuracy of 98.21% which is comparable to the existing results. (Teddy 2008) presented a kernel density-based CMAC (KCMAC) model for clinical decision support. This model was differ than the classical CMAC by employing a multi-resolution organization scheme of its computing cells and adopting the Takagi– Sugeno–Kang (TSK) fuzzy model to define its network computation. KCMAC was applied to two case studies, breast cancer diagnosis and the modeling of the human glucose metabolic cycle and the experimental results were encouraging.
(Ortiz et al. 2007) presented another form of CMAC structure called Recurrent Fuzzy CMAC (RFCMAC) for nonlinear system modeling and identification. A new simple training algorithm with time-varying learning rates was introduced to assure the algorithm stability. But it needs further works on structure training and adaptive control, and also the real-time implementation needs to be tested.
Modeling and identification of nonlinear systems are two important engineering disciplines which are covered by CMAC also. (Lin and Lee 2009) developed a Parametric Fuzzy CMAC (P-FCMAC) by using a self-constructing learning algorithm which was consisted of the self- clustering method (SCM) and the back-propagation algorithm which was used to tune the adjustable parameters in place of Modified Genetic Algorithm (MGA). The performance and applicability of the proposed model were proven through three examples: prediction of the chaotic time series, approximation of a Sugeno’s nonlinear function, and identification of a nonlinear system. (Yu
From the survey on the literatures relating to the work with CMAC NN, it is found that CMAC is a competitive intelligent controller used in modeling, identification, classification, compensation and for nonlinear control
purposes for different computational, industrial, and medical applications.
PROBLEM STATEMENT
The objective of this work is to introduce a simple base on how to build CMAC, how each parameter variation affects the CMAC performance, and how the use of different learning algorithms can affect the CMAC performance.
MATHEMATICAL MODEL OF CMAC
The mathematical model of CMAC can be summarized in those following equations. The CMAC control signal UCMAC at any instant k is equal to the sum of weights of the activated cells like the following equation.
⤤
⤙⢀⡩
where wi(k) is the weight or the content of the memory cell, and xi(k) is considered to be a switch which has two values for any memory element i, 1 for activated cell and 0 for deactivated cell. Therefore, the allocating vector xi(k) can be defined as an AND function or an equal statement. It says if the switched summation of avi(k), the ith^ added value at any instant k, and ml(k), the first active memory element location at instant k, equal to the ith^ memory location, then output 1, else output 0. If xi(k) is equal to 0, then the memory content of that cell will not be exist in the CMAC control signal, i.e. the cell is deactivated. Thus, the value of xi(k) can be found using the following equations
x⤙䙦k䙧 = 䙰s⤙䙦k䙧g⤙䙦k䙧䙱^ AND 䙦i䙧 (2) g⤙䙦k䙧 = av⤙䙦k䙧 + ml䙦k䙧 (3)
The ith^ added value can be determined using the following formula, with knowing that the initial value of the allocating pointer is equal to 0, and P is the memory size.
av⤙䙦k䙧 = 㔳 x䙦⤙⡹⡩䙧䙦k䙧
⤀
⤙⢀⡩
x⤥䙦k䙧 = 0 (5)
The switch si(k) defined by another AND function between two inequalities. The first inequality between gi(k) and mlg(k) which represents the generalized memory location, and the second is between the location value i and the first active memory location ml(k). Thus, the switch value is determined by the following relation.
s⤙䙦k䙧 = 䙰gi䙦k䙧≤mlg䙦k䙧䙱 AND 䙰ml䙦k䙧 ≤ i䙱 (6) mlg䙦k䙧 = ml䙦k䙧 + n⤗ − 1 (7)
where ng is the generalization size. The representative diagram of CMAC structure is shown in Figure 1.
Figure 2: Block Diagram of the Hybrid
subject under control is an electrohydraulic equipped to give a linear simple harmonic motion through using a hydraulic cylinder. The overall structure of the system can be simplified by the representation as shown in Figure 2.
PERFORMANCE INDEX
The root mean square (abbreviated RMS or rms), is a statistical measure of the magnitude of a varying quantity. It is especially useful when the variations are positive and negative, e.g., sinusoidal functions. It can be calculated for a series of discrete values or for a continuously varying function. The RMS va lue for a continuous function x(t) defined over the interval T 1 ≤ t ≤ T 2 is given by
x⤂⢗⤃ = 㒖
㔅 䙰x䙦t䙧䙱⡰dt
⤄ㄘ
⤄ㄗ
The running or accumulative xRMS defined above will be used for the error function which is deduced from the difference between the desired and actual trajectories in order to compare the results. in this paper will be in centimeters of the cylinder rod displacement.
STUDY OF CMAC PARAMETERS
Constant Learning Rate Algorithm
There are four basic parameters will be discussed in this point, the generalization size ng, the memory size P, the learning rate β, and the scale for constant learning rate
Studying the Generalization Size Variation The generalization means that each input vector t is mapped into a number of memory locations instead of only one memory location. As the generalization size increases, the memory locations are overlapped which gives a bad performance of CMAC. Before the presence of overlapping, a chattering phenomenon appears in the mapping function output. Figures 3 and 4 present how the generalization size affects the CMAC performance.
Figure 2: Block Diagram of the Hybrid -Type Control System
under control is an electrohydraulic system which is linear simple harmonic motion through using a hydraulic cylinder. The overall structure of the block diagram
The root mean square (abbreviated RMS or rms), is a tical measure of the magnitude of a varying quantity. It is especially useful when the variations are positive and negative, e.g., sinusoidal functions. It can be calculated for a series of discrete values or for a continuously varying lue for a continuous function x(t) is given by
defined above will be used for the error function which is deduced from the and actual motion in order to compare the results. All eRMS values in this paper will be in centimeters of the cylinder rod
basic parameters will be discussed in this , the memory size P, the the scale for constant learning rate.
The generalization means that each input vector t o CMAC is mapped into a number of memory locations instead of
. As the generalization size increases, the memory locations are overlapped which gives a bad performance of CMAC. Before the presence of enon appears in the Figures 3 and 4 present how the generalization size affects the CMAC performance.
Figure 3: Effect of generalization size variation on CMAC performance
Figure 4: Variation of eRMS
Studying the Memory Size Variation From the logic thinking that as the memory size increases the efficiency of the controller increases. observe the variation of the memory size with CMAC efficiency. The linear mapping function used is i of
ml = Gain × input vector
where ml is the memory location. The offset value doesn’t affect the performance as all the memory locations are above the zero level , i.e. the memory location exists consequently the gain of the l under consideration. Figures 5 and 6 present how the mapping function gain affects the CMAC performance.
0
5 8 10 15 20
eRMS
Gereralization size (n
Generalization size variation
0
0 2
eRMS
Time (s)
RMS error variation vs. ng
Effect of generalization size variation on CMAC performance
RMS over time with different ng
Memory Size Variation From the logic thinking that as the memory size increases the efficiency of the controller increases. It is required to observe the variation of the memory size with CMAC efficiency. The linear mapping function used is i n the form
vector + offset value (15)
where ml is the memory location. The offset value doesn’t affect the performance as all the memory locations are , i.e. the memory location exists; consequently the gain of the l inear function is the factor Figures 5 and 6 present how the mapping function gain affects the CMAC performance.
20 25 29 30 31 35 40 Gereralization size (ng)
Generalization size variation
4 6 8 10 Time (s)
RMS error variation vs. ng ng= ng= ng=
Figure 5: Effect of Gain Variation on CMAC Performance
Figure 6: Variation of eRMS Over Time with Different Gains
From the results, CMAC performance is constant with a low efficiency for memory locations less than 200, we can called it the critical size. After that, the performance starts to increase until the memory size exceeds the designed size, i.e. 260 memory elements are built for the CMAC under study by using MATLAB/SIMULINK R2007b. For this reason a gain of 45 which gives 270 cells gives the worst condition because the CMAC is oversized.
Studying the Learning Rate Variation The learning rate is the basic parameter in the learning algorithm. The learning rate reflects the speed of changing the weights. A good selection of the learning rate enhances the CMAC performance by adjusting the learning speed. Low learning rates make CMAC needs more time to give a good performance, and high values make CMAC behaves randomly. Figures 7 and 8 present how the learning rate affects the CMAC performance.
Studying the Scale Variation (for constant learning) The scale is used sometimes to size the CMAC control signal to be the effective signal if it added to another conventional controller. The scale and the learning rate β are multiplied with error to update the weights in the learning algorithm. The multiplication has a commutative property, therefore if we fixed the other parameters for their best values, especially the learning rate, the scale values will be the same of those in Figure 7.
Figure 7: Effect of Learning Rate Variation on CMAC Performance
Figure 8: Variation of eRMS Over Time with Different Learning Rates
Variable Learning rate Algorithm
The variable (can be called adjustable or adaptive) learning algorithm was firstly presented by (Abdelhameed et al.
Studying the Variable Learning Slope Variation Decaying factor C controls the slope of the learning rate curve, i.e. the frequency of β pattern, as shown in Figure 9. The smallest values of C give an approximation to the behavior of the constant β learning algorithm, and the highest values increases the frequency of β pattern which results in good learning capability. The worst condition of C is to choose a middle value. Figure 9 clarify how the change in C values changes the β pattern. The change of eRMS with respect to C variation is shown in Figure 10, and for three different C values over time in Figure 11.
0
50
100
150
200
250
300
0
10 20 30 33 34 35 36 37 38 40 41 45
Cells used
eRMS
Mapping function gain
Mapping function variation
Running RMS Error Cells Used
0
0 2 4 6 8 10
eRMS
Time (s)
RMS error variation vs. gain Gain= Gain= Gain=
eRMS
β
Beta variation
0
0 2 4 6 8 10
eRMS
Time (s)
RMS error variation vs. beta
Beta=0. Beta=1. Beta=
Figure 15: Variation of eRMS Over Time with Different Scales
The memory size, learning rate, and the mapping function gain are found to be constant for all methods. The generalization size and UCMAC scale must be tuned well for each algorithm to give the best performance through decreasing the eRMS values. Table 2 shows the final values of eRMS for the three discussed learning algorithms with their best tuned values. Figure 16 clarify how the use of CMAC enhances the performance of the tested system even with using the PV type servo controller with its optimal gains, and how the use of different learning algorithms affects the CMAC performance. The variable learning algorithm gives a 50% decrease in the CMAC performance rather than using the other algorithms. The learning by a constant learning rate whether using the error value or UPV value for learning gives a good enhancement of about 3. times than using PV controller alone which gives an eRMS value of 0.2162 cm.
Table 1: Values of Tuned Parameters
Parameter Description Value Remarks ng Generalization size 30 Learning by constant rate
P Memory size 260 β Learning rate^1 Scale Control signal scale 1 Gain For mapping function 41 ng Generalization size 31 Learning by Scale Control signal scale 0.3 variable rate ng Generalization size 36 Learning by Scale Control signal scale 0.04 UPV
Table 2: Performance Enhancement for Different Learning Methods
Algorithm eRMS Constant learning rate 0. Adaptive learning rate 0. Learning by UPV 0.
Figure 16: Effect of Learning Algorithms on eRMS
CONCLUSIONS
The mathematical model of Cerebellar Model Articulation Controller (CMAC) is presented. The model parameters are discussed and studied. Three different learning algorithms are distinguished, learning by a constant learning rate, variable learning rate, and learning by a Proportional Velocity (PV) control signal UPV instead of learning by error value. It is found that:
Future research can be focused on developing different learning algorithms to shorten the learning time and increasing the performance of CMAC. Also, some work is required to compare between CMAC and different nonlinear controllers or with traditional ANNs. Finally, if an adaptive mean can be introduced in CMAC to change its parameters online, it will make a great challenge.
REFERENCES
Abdelhameed, M. M.; U. Pinspon; and S. Cetinkunt. 2002. “Adaptive learning algorithm for Cerebellar model articulation controller”, Mechatronics , Vol.12, Issue 6, 859-873. Albus, J. 1975. “A new approach to manipulator control: The cerebellar model articulation controller (CMAC)”. Transactions of the ASME, Journal of dynamic systems, measurement, and control , No.97 (Sep), 220-227. Bucak, I. O. and S. Baki. 2010. “Diagnosis of liver disease by using CMAC neural network approach”, Expert Systems with Applications , Vol.37, Issue 9, (Sep), 6157-6164. Ding, M.; Q. Zhou; and K. Song. 2007. “A New Method for Accelerometer Dynamic Compensation Based on CMAC”, ISNN 2007, Part I, LNCS 4491 , 667-675.
0
0 2 4 6 8 10
eRMS
Time (s)
RMS error Vs. scale Scale=0. Scale=0. Scale=0.
0
0 2 4 6 8 10
eRMS
Time (s)
Learning curves Const. Learning Upv Learning Variable Learning PV only
Horvath, G. and K. Gati. 2009. “Kernel CMAC with Reduced Memory Complexity”, ICANN 2009, Part I, LNCS 5768
Hsu, C.-F.; C.-M. Chung; C.-M. Lin; and C. “Adaptive CMAC neural control of chaotic systems w type learning algorithm”, Expert Systems with Applications Vol.36, 11836-11843. Li, Y. and Q. Xu. 2009. “CMAC- Based PID Control of an XY Parallel Micropositioning Stage”, ISNN 2009, Part II, LNCS 5552 , 1040-1049. Lin, C.-J. and C.-Y. Lee. 2009. “ A novel parametric fuzzy CMAC network and its applications”, Applied Soft Computing 775-785. Ortiz, F.; W. Yu; M. Moreno-Armendariz; “Recurrent Fuzzy CMAC for Nonlinear System Modeling”, ISNN 2007, Part I, LNCS 4491 , 487-495. Teddy, S. D. 2008. “KCMAC: A Novel Fuzzy Cerebellar Model for Medical Decision Support”, ICANN 2008, Part II, LNCS 5164 , 537-546. Tsai, C.-H. and M.- F Yeh. 2009. “Application of CMAC neural network to the control of induction motor drives”, Computing , Vol.9, 1187-1196. Wen, C.; T.-C. Lin; K.-C. Chang; and C. - “Classification of ECG complexes using self CMAC”, Measurement , Vol.42, 399- Yeh, M.-F. and C.-H. Tsai. 2010. “Standalone CMAC Control System with Online Learning Ability”, IEEE Transactions on Systems, Man, and Cybernetics - Part B: Cybernetics No.1, (Feb), 43-53. Yu, W. 2008. “Hierarchical Fuzzy CMAC for Nonlinear Systems Modeling”, IEEE Transactions on Fuzzy Systems No.5, (Oct), 1302-1314. Yu, W.; M. A. Moreno-Armendariz; and F. O. Rodriguez. 2009. “Stable adaptive compensation with fuzzy CMAC for an overhead crane”, Information Sciences , Available online, (June).
BIBLIOGRAPHIE
MAGDY ABDELHAMEED mechanical engineering in Ain Shams University, Faculty of Engineering. He awarded the B.Sc. degree in 1983, M.Sc. degree in 1989, and Ph.D. degree in 1994 from the same institution. He was awarded the Associate Professor in 2000, a nd full Professor of Automatic Control an Mechatronics in 2005. fields of interests are Control Systems Design, Automation and Robotics, Mechatronics, Control of Discrete Event Manufacturing Systems, Intelligent Control, Servo Motion Control Syst ems, Electro Hydraulic Control, Precision Motion Control, Nano Positioning Devices, Programmable Logic Controllers (PLC), Pneumatic and Hydraulic Control, Fault Detection and Diagnosis.
AHMED KASSEM studied engineering in the Shoubra Facu Engineering, Zagazig University, Benha Branch. He was awarded the B.Sc. degree in mechanical engineering, production major in 1977, and M.Sc. degree in mechanical
“Kernel CMAC with Reduced ICANN 2009, Part I, LNCS 5768 , 698-
and C. -Y. Hsu. 2009. “Adaptive CMAC neural control of chaotic systems with a PI- Expert Systems with Applications ,
Based PID Control of an XY ISNN 2009, Part II, LNCS
A novel parametric fuzzy CMAC Applied Soft Computing , Vol.9,
and X. Li. 2007. “Recurrent Fuzzy CMAC for Nonlinear System Modeling”,
“KCMAC: A Novel Fuzzy Cerebellar Model ICANN 2008, Part II, LNCS
F Yeh. 2009. “Application of CMAC neural network to the control of induction motor drives”, Applied Soft
“Standalone CMAC Control IEEE Transactions on Part B: Cybernetics , Vol.40,
“Hierarchical Fuzzy CMAC for Nonlinear Systems n Fuzzy Systems , Vol.16,
Armendariz; and F. O. Rodriguez. 2009. “Stable adaptive compensation with fuzzy CMAC for an , Available online,
LHAMEED studied the mechanical engineering in Ain Shams University, Faculty of Engineering. He was awarded the B.Sc. degree in 1983, M.Sc. degree in 1989, and Ph.D. degree in 1994 He was awarded nd full Professor of Automatic Control an Mechatronics in 2005. His main fields of interests are Control Systems Design, Automation and Robotics, Mechatronics, Control of Discrete Event Manufacturing Systems, Intelligent Control, Servo Motion ems, Electro Hydraulic Control, Precision Motion Control, Nano Positioning Devices, Programmable Logic Controllers (PLC), Pneumatic and Hydraulic Control,
studied the mechanical in the Shoubra Faculty of Engineering, Zagazig University, Benha awarded the B.Sc. degree in mechanical engineering, production major in 1977, and M.Sc. degree in mechanical
engineering in 1985 from the same institution. He awarded the Ph.D. degree in mechanic the West Berlin University, Germany in manufacturing technology. His main fields of interests in resea manufacturing technology, casting and forming processes, non-conventional machining.
AMRO SHAFIK Qaluobiya, Egypt. He studied mechanical engineering in the department of mechanical engineering technology Technology, Benha Diploma in Mechanical technology, Manufacturing Major in 2002, and the Bachelor of Science (B.Sc.) degree in the same institute in
engineering in 1985 from the same institution. He awarded the Ph.D. degree in mechanic al engineering in 1994 from the West Berlin University, Germany in manufacturing His main fields of interests in resea rch are manufacturing technology, casting and forming processes,
AMRO SHAFIK was born 1983 in Benha, Qaluobiya, Egypt. He studied mechanical engineering in the department of mechanical technology, High Institute of Technology, Benha University. He had the Diploma in Mechanical Engineering technology, Manufacturing Major in 2002, and the Bachelor of Science (B.Sc.) degree in the same institute in s awarded the Master of Science (M.Sc.) degree in 2010 in the field of Automation and Mechatronics. His main research interest is to develop control systems by using intelligent control lers and expert systems to enhance the performance of mechanical systems.