Abstract
This paper presents a wavelet cerebellar model articulation controller (WCMAC) based adaptive control design for nonlinear systems using a particle swarm optimization (PSO). The WCMAC is the main tracking controller and a robust compensation controller is used to compensate for the residual error. In the WCMAC, the adaptive laws of controller parameters are derived using the gradient descent method. However, the initial values of learning rates of these adaptive laws are very important and they affect much to the performance of control systems. In this paper, the particle swarm optimization algorithm is applied to find the optimal learning rates of the parameter adaptation laws. To show the effectiveness of the proposed approach, numerical simulations of magnetic levitation system and inverted pendulum are provided to confirm the applications of the proposed PSO-WCMAC-based control system. The superiority of the proposed control scheme is also evaluated by quantitative comparison with other control schemes.
Keywords
Introduction
A cerebellar model articulation controller (CMAC) was firstly introduced by Albus in 1975 [1]. It is a type of neural network based on a model of the mammalian cerebellum (associative memory). CMAC has many advantages than other neural network controllers such as fast learning property, simple computation, and good generalization capability, so it is frequently used in real-time control systems [2]. In recent years, many papers have proposed the modifications of CMAC such as self-organizing CMAC, function-link CMAC and type-2 fuzzy CMAC to enhance the performance [3–7]. The conventional neural networks (NNs) often use a Gaussian function as the adaptive function; however, some studies have proven that the learning capability of wavelet NNs is more efficient than the conventional Gaussian function NNs [8, 9]. In this study, the considered wavelet CMAC combines the advantages of CMAC and decomposition property of wavelet function to achieve better learning performance so it can be more suitable for control applications [2].
The PSO algorithm is an optimization technique first introduced in 1995 by J. Kennedy and R. Eberhart, it mimics the social behavior of bird flocking or fish schooling [10]. Compared to the typical genetic algorithm (GA), PSO has advantages as easy to implement and few parameters to adjust [11]. In PSO, each single solution is called as a particle. In the beginning, the particles will be initialized with a group of random solutions. In each iteration, the best solution can be shared among other particles and every particle will move to follow the best solution [10]. Recently, PSO algorithm is widely used with some controllers such as PID, SMC, LQR, fuzzy, and neural network to solve nonlinear problems in control and economic dispatch [12–23]. In 2011, Bingül and Karahan proposed a PSO fuzzy logic controller for 2 DOF robot which used PSO algorithm to tune the antecedent and consequent parameters of fuzzy rules [13]. In 2014, Lu et al. presented a Chaotic PSO for optimal design of PID controller [17]. Following that, in 2015 Wang and Liu introduced PSO-based fuzzy controller for optimal charge pattern of li-ion batteries [18]. Also in 2015, Kapoor and Ohri provided the PSO algorithm for optimal parameters of PID and SMC controller [19]. The advance of these method is simple in calculation and easier for implementation. However, most papers in literature often use offline PSO to search optimal parameters for the controllers, so it led to large dimension of particles and will take long time to satisfy the fitness function. In many adaptive control systems, the learning rates of adaptive laws are very important and they are highly influential to the system performance. Most papers in literature often use a trial-and-error method to determine the learning rates of adaptive laws. However, selection the optimized learning rate is difficult and it often takes long time to train the network. Therefore, in this study, offline and online PSO method is applied to find the optimal learning rates for the mean, the variance of the wavelet Gaussian function in the input membership and also for the weight in memory space layer.
In the proposed control scheme, a PSO-WCMAC is the main tracking controller used to mimic an ideal controller and a robust compensation controller is designed to recover the residual error between the ideal controller and the main controller. Firstly, the PSO run in offline mode to find the best initial value of learning rates of WCMAC. Then, those obtained best values are used for the initials of the particles in online PSO. The developed controller can be applied to control nonlinear systems even without exact information of system dynamics.
Recently, many researchers focus on the magnetic levitation system (MLS) because of its advantages such as no mechanical contact, friction, and noise. MLS has many applications in precise positioning such as maglev train, magnetic bearing, wind tunnel, and conveyor system, etc. Beside MLS, an inverted pendulum is a classical problem in nonlinear control system, which attracted the attention of many researchers. In 2011, Lin et al. published an adaptive PID design for MLS [16]. After that, in 2015, Zhang et al. published robust tracking control for MLS [24]. In 2014, Tao and Su provided the moment adaptive fuzzy control for an inverted pendulum [25]. Mohammad and Ahmad [26] proposed a type-2 fuzzy PID controller for an inverted pendulum system [26]. However, all the methods of these papers are difficult to determine the initial parameter and the control performance can be further improved. In this paper, the developed PSO-WCMAC control system is applied for these two systems.
The motivation of the proposed paper is to apply offline and online PSO algorithm to find the optimal learning rates for adaptive laws of WCMAC. All the adaptive laws are designed based on the gradient descent method and the stability of the control system is proved by the Lyapunov function. The effectiveness of the proposed controller is verified by numerical simulations of magnetic levitation system and inverted pendulum. This paper is organized as follows. The problem formulation of nonlinear control system is presented in Section 2. The design of PSO-WCMAC control system is presented in Section 3. The simulation results are provided in Section 4. Finally, the conclusion is given in Section 5.
Problem formulation
Consider an nth order nonlinear system denoted as
When uncertainty is under consideration, (1) can be reformulated as
The goal of the controller is to produce a control signal u (t), which can force the system output x (t) to track the reference signal
Substituting (4) into (2), the error dynamics can be obtained as
From (6), it is obvious that if
The structure of PSO-WCMAC control system consists of a WCMAC where its learning rates can be updated using PSO and a robust compensation controller. The structure of WCMAC feedback control system is shown in Fig. 1.

Block diagram of PSO-WCMAC control system.
The structure of WCMAC is shown in Fig. 2 which consists of an input space, an association memory space, a receptive-field space, a weight memory space and an output space. Based on [2, 8], a signal propagation and a basic function in each space are described as follows.

The architecture of the WCMAC controller.
Input space
Association memory space A: In this space, several elements can be accumulated as a block. Each block performs a receptive-field basis function. The Gaussian membership function (MF) is used as a mother wavelet in the receptive-field, which can be represented as
Receptive-field space φ: The multidimensional receptive-field function is defined as a vector
Weight memory space
Output space o: The output of a WCMAC is the algebraic sum of the activated weights in the weight receptive-field and is expressed as
Assumed that there exists an ideal
A sliding surface s (t) is defined as
Taking the derivative of (14) and using (2) and (5), yield
By choosing a Lyapunov cost function
The aim of PSO-WCMAC is to find the optimal value of
1) Offline PSO
The PSO algorithm is shown in Fig. 3. At beginning, the initial values are set randomly for learning rate of the weight, the mean, and the variance

Flowchart of PSO.
To evaluate the performance of learning rates in PSO algorithm, the fitness function is chosen as
After run offline PSO, the optimal values for the learning rates of the weight, the mean, and the variance are used as the initial values for online PSO. In controller design, the main difference between online and offline PSO is the running time and initial particles. In offline PSO, each set values of learning rates will run for a long time (20 seconds) to calculate the fitness function based on the tracking error. But in online PSO, the running time is short (0.1 seconds) to response to the online real-time feedback control.
Robust compensation control
The robust compensation controller is designed to cope with the approximation error between the WCMAC and the ideal controller. Assumed that the approximation error can be bounded by 0 ≤ ɛ (t) ≤ E, where E is a positive and assumed to be a constant during the observation. However, this bounds is difficult to obtain, especially in practical systems. So that, the bound estimation is used to obtain the bound of the approximation error which can be defined as
Using some straightforward manipulation, the error equation can be obtained
Define a Lyapunov function as
Take derivative of Equation (27), then
Because E is a constant, so
Since
Because
Also,
In order to demonstrate the effectiveness of the proposed approach, the PSO-WCMAC system is applied to control a magnetic levitation system and an inverted pendulum. In the controller design, the parameters of WCMAC and robust controller can be tuned online by adaptive laws and the learning rates can be adjusted by the PSO algorithm.
Magnetic levitation system
The diagram of the magnetic levitation system is shown in Fig. 4. Using the Newton’s second law, the behavior of the metallic ball is given as [16]

The construction of a magnetic ball levitatic system [16].
Rewrite (31), then
For the offline PSO, the parameter of WCMAC will be initialized randomly and it can be updated. The parameters of PSO are chosen as random values initially for the population size (n p = 20, n d = 3), and the acceleration factor c1 = c2 = 0.07. In online PSO-WCMAC, the initial parameters are set from the best value found from the offline PSO algorithm.
The simulation results of the proposed control system are given in Figs. 5–8. From these figures, it is clear that the system can quickly achieve the steady state tracking performance with very small error and the learning rates can be adjusted via online PSO. The initial position of the metallic sphere is set to –1 mm. In the first simulation, the MLS are controlled by online PSO-WCMAC and normal WCMAC to follow a sine command signal x d (t) =0.01 * sin(2πft) with f = 0.15Hz as shown in Fig. 5. The online adjustments of the learning rates are shown in Fig. 6. For another case simulation, the same initial condition is used, and the command signal is a trapezoid signal as shown in Fig. 7. The learning-rates are shown in Fig. 8. Besides PSO, the genetic algorithm (GA) is another often used optimization algorithm. The comparison of root mean square error (RMSE) for WCMAC, GA-WCMAC and PSO-WCMAC is shown in Table 1. From these comparisons, it can be found the PSO-WCMAC can achieve smaller tracking error than the WCMAC and the GA-WCMAC. From these simulations, it is shown the proposed control system (PSO-WCMAC) can achieve satisfactory control performance with small tracking error for the MLS.

Simulation result of MLS with sine signal reference.

The learning-rates adjustment via online PSO by sine signal reference.

Simulation result of MLS with trapezoid signal reference.

The learning-rates adjustment via online PSO by trapezoid signal reference.
Comparison results in RMSE of MLS
The inverted pendulum system as used in [25, 29] is considered and it can be described by the dynamic equations
Model parameters of Inverted pendulum
The goal of control is to make the inverted pendulum following the reference trajectory

Simulation result of inverted pendulum with the online PSO-WCMAC for the initial angle = 0.2 (rad).

The learning-rates adjustment via online PSO of inverted pendulum for the initial angle = 0.2 (rad).

Simulation result of inverted pendulum with the online PSO-WCMAC for the initial angle = 0.458 (rad).

The learning-rates adjustment via online PSO of inverted pendulum for the initial angle = 0.458 (rad).
From the simulation results, it can be observed that the system output can follow the reference trajectory well even though the disturbance exists and the learning rates can quickly converge to the optimal value. The root mean square error is calculated after 1 second. They are RMSE = 0.0001 for initial angle = 0.2 (rad) and RMSE = 0.0008 for initial angle = 0.458 (rad). In the same conditions, Table 3 shows the comparison result of RMSE (after 1 second) between the WCMAC, GA-WCMAC, PSO-WCMAC and the results in [25]. From these comparisons, it can be seen that the proposed PSO-WCMAC has achieved smaller tracking error than the other control methods.
Comparison results of tracking error in RMSE
In Figs. 5, 7, 9 and 11, it can be seen u R provides large contribution for the total control effort in the initial phase since there exists large tracking error in this phase. After that, u WCMAC plays the main controller to provide desired control effort to track the desired trajectory.
In our research, the offline PSO is trained as 500 epochs with 20 sets value of learning rates. The computing time of the online WCMAC algorithm is 0.000035 second for each epoch and the computing time of PSO-WCMAC algorithm is 0.000042 second. The simulations were done on Windows 7 64-bit and the processor is Core i5-4460 3.2 GHz, RAM 8 GB.
In this study, an adaptive PSO-WCMAC was designed and combined with robust compensation controller to make the system convergence and ensure good control performance. It is suitable for a large class of unknown nonlinear systems. The major contributions of this study are the development of a PSO-WCMAC with the adaptive law for updating parameters, and the learning rates can be online optimized to best value based on PSO algorithm. Various simulation results of the magnetic ball and the inverted pendulum have
demonstrated the effectiveness of the proposed approach.
Footnotes
Acknowledgments
This work was supported partially by the National Science Council of the Republic of China under Grant NSC 98-2221-E-155-058-MY3.
