# An FPGA-Based PID Controller Design for Chaos Synchronization by Evolutionary Programming

Authors: Her-Terng Yau; Yu-Chi Pu; Simon Cimin Li
Journal: Discrete Dynamics in Nature and Society
 (2011)

---

## Abstract

This paper is concerned with the design of a field programmable gate arrays- (FPGAs-) based digital proportional-integral-derivative (PID) controller for synchronization of a continuous chaotic model. By using the evolutionary programming (EP) algorithm, optimal control gains in PID-controlled chaotic systems are derived such that a performance index of integrated absolute error (IAE) is as minimal as possible. To verify the system performance, basic electronic components, including OPA resistor and capacitor elements, were used to implement the chaotic Sprott circuits, and FPGA technology was used to implement the proposed digital PID controller. Numerical and experimental results confirmed the effectiveness of the proposed synchronization procedure.


---

## Body

## 1. Introduction

In recent years, chaos synchronization has attracted the interest of researchers in various fields [1]. Chaos synchronization has many potential applications in physics and engineering and particularly in secure communication [2]. The idea of synchronizing two identical chaotic systems was first introduced by Pecora and Carroll [3]. In continuous-time chaotic systems, synchronization is usually achieved by a master-slave or drive-response approach. Given a master (drive) and slave (response) in a chaotic system, the goal is synchronizing the behavior of the slave (response) system to that of the master (drive) system. To achieve the synchronization, a nonlinear controller must be designed to obtain signals from the master and slave systems and to manipulate the slave system. Recently developed control methods can achieve chaos synchronization between two identical chaotic systems with different initial conditions [1]. However, none of the proposed methods in our surveyed papers can obtain an optimal or near-optimal digital controller for synchronizing continuous chaotic systems according to a performance index specified by an FPGA chip.Conversely, evolutionary programming (EP) algorithms have proven effective and easy to implement for global optimization of complex functions and for solving complex control problems in engineering [4, 5]. Generally, the four steps in the global optimization algorithm are initialization, mutation, competition, and reproduction. Furthermore, Cao [4] also developed a quasirandom sequence (QRS) for generating an initial EP population that avoids formulating clusters around an arbitrary local optimal.In fact, implementing this technique in digital electronic devices such as field programmable gate arrays (FPGAs) can accelerate the development of prototype circuits such as control and real-time simulation circuits [6]. The FPGA comprises thousands of logic gates, some of which are grouped into a configurable logic block (CLB) to simplify higher-level circuit design. Because of its simplicity and programmability, the FPGA is the preferred option for chip prototype design.The main objective of this work was to develop an EP-based digital PID control scheme for solving synchronization problems in FPGA-based chaotic systems. The EP algorithm derived optimal control gains in PID-controlled chaotic systems such that the performance index of integrated absolute error (IAE) was minimized and the master and slave chaotic systems were synchronized.  The optimal architecture for digital controller was then implemented and simulated by very high-speed description language (VHDL) and ModelSim. The developed architectures for each component were then implemented and tested under the Xilinx Spartan-3 FPGA. Finally, simulation and experimental results were compared to confirm the effectiveness of the proposed EP-based digital PID scheme for chaos synchronization.


## 2. System Description and Problem Formulation

First, consider two single-input single-output (SISO) master and slave systems described by the following differential equations:Master system:(2.1)ẋm(t)=f(t,xm),ym(t)=Cxm.Slave system:(2.2)ẋs(t)=f(t,xs)+Bu(t),ys(t)=Cxs,
where xm(t)=[xm1,xm2,…,xmn]∈Rn and xs(t)=[xs1,xs2,…,xsn]∈Rn are the state vectors of master and slave systems, respectively.  The f:R×Rn→Rn is a given nonlinear function. The ym(t)∈R and ys(t)∈R are the outputs of the master and slave systems, respectively. The B∈Rn×1 and C∈R1×n are the system matrices. The u(t)∈R is the control input included in the slave system (2.2) to synchronize the master and slave systems. Generally, many chaotic systems can be expressed by (2.1). For example, the Sprott circuit, the modified Chua's circuit, the Duffing-Holmes system, the Lorenz system, and the Lu system all belong to the class defined by (2.1).Let the error states bee1=xm1-xs1,e2=xm2-xs2,…,en=xmn-xsn. The objective of this study was to use the EP algorithm to design a simple but effective PID controller u(t) that can synchronize coupled systems (2.1) and (2.2) under different initial conditions such that(2.3)lim⁡t→∞‖xm(t)-xs(t)‖⟶0.The procedure for determining the PID controlleru is to first define the output error signal ye=ym-ys and then to define the continuous form of a PID controller with input ye(·) and output u(·).  The conventional equation is (2.4)u(t)=Kp[ye(t)+1Ti∫0tye(t)dt+Tdddtye(t)],
where Kp is the proportional gain constant, Ti is the integral time constant, and Td is the derivative time constant. When using the FPGA chip to implement this controller, the continuous-type PID controller (2.4) is reformulated as a digital-type PID controller as shown below:(2.5)u(k)=Kp[ye(k)+1TiS(k)+TdT[ye(k)-ye(k-1)]].Here,u(k) is the kth sampling output data of the PID controller, S(k)=∑ye(k) is the error sum, and T is the sampling time constant. Therefore, (2.5) can be rewritten as(2.6)u(k)=Kpye(k)+KiS(k)+Kd[ye(k)-ye(k-1)],
where Ki=Kp1/Ti is the integral gain constant and Kd=KpTd/T is the derivative gain constant.The performance criterion or objective function of a controller design can generally be defined according to the desired specifications. The two performance criteria typically considered in the EP algorithm are the integrated squared error (ISE) and the integrated absolute error (IAE). This study uses the IAE index as the objective function (OF), which is given as(2.7)OF=IAE=∑k=1kf‖E(k)‖,
where E(k)=[e1,e2,…,en], ∥·∥ is the Euclidean norm of a vector, k is the sampling time point, and kf is the total number of samples. Below, the EP algorithm is used to minimize the objective function score (2.7) by tuning the digital PID controller and optimizing the gain parameters.


## 3. Evolutionary Programming (EP) Algorithm for Solving the Optimization Problem

Since the EP algorithm is considered an easily implemented and promising technique for the global optimization of complex functions, this study introduces an EP algorithm for solving this problem. Figure1 shows the proposed EP-based PID control system includes synchronized master and slave chaotic systems, a PID controller, and an EP algorithm. The ym is the output of the master system, ys is the output of the slave system, and u is the control input generated by the PID controller as defined in (2.5). The parameters of the proposed PID controller are derived by the EP algorithm such that the value of IAE given in (2.7) is minimized.Figure 1
Block diagram of chaos synchronization system.This section proposes an extended EP algorithm for obtaining the digital PID controller with optimal gain parameters to minimize the following objective function (OF) score (2.6). Let g be the continuously differentiable matrix-valued function defined for g∈S, where S={g∈R3∣0≤gi≤Mi,i=1,2,3} and Mi is the bounded search space. The optimization problem is to find g*=[Kp*,Ki*,Kd*]∈S such that the OF performance index of the system is minimized. Mathematically, the optimization problem (P1) can be formulated as follows. (P1): To findg*∈S such that
(3.1)OF=IAE=∑k=1kf‖E(k)‖,forg*∈S
is minimized.Based on the simulation  results obtained in [4], an extended EP algorithm for solving the above optimization problem is applied as follows.Step 1.
Generate an initial populationP0=[p1,p2,…,pN] of size N by randomly initializing each 3-dimensional solution vector pi∈S,i=1,2,…,N according to the quasirandom sequence (QRS).Step 2.
Calculate the fitness score (objective function)fi=f(pi) for each pi,i=1,2,…,N, where
(3.2)fi(pi)=OF=∑k=1kf|E(kT)|.Step 3.
Mutate eachpi,i=1,2,…,N, based on the statistical data to double the population size from N to 2N, and generate pi+N by using
(3.3)pi+N,j=pi,j+N(0,βfifΣ),∀j=1,2,3,
where pi,j denotes the jth element of the ith individual, N(0,βfi/fΣ) represents a Gaussian random variable with a mean zero and variance βfi/fΣ, fΣ is the sum of all fitness scores, and β is a parameter to scale fi/fΣ.Step 4.
Use (3.2) to calculate the fitness score fi+N for every pi+N,i=1,2,…,N. In the stochastic competition process, pi,i=1,2,…,N randomly competes with pj,j=N+1,…,2N. If fi<fj, pi wins; otherwise, pj wins, and pi is replaced by pj. After completing the competition process, select N winners for the next generation, and let the individual with the minimum objective function in the winners be p1.Step 5.
If the valuefΣ converges to a minimum value, then let g*=p1 be the global optimum value and g*=[Kp*,Ki*,Kd*] such that the OF performance index of the system is minimized. Otherwise, return to Step 3.


## 4. Simulation and Experimental Results

This section describes the proposed EP-based digital PID controller design for synchronizing Sprott circuits, which are the chaotic systems typically studied in the literature [7, 8]. Now consider the following Sprott circuits:Master:(4.1)ẋm1=xm2,ẋm2=xm3,ẋm3=-1.2xm1-xm2-0.6xm3+2⋅sign⁡(xm1).Slave:(4.2)ẋs1=xs2,ẋs2=xs3+u(t),ẋs3=-1.2xs1-xs2-0.6xs3+2⋅sign⁡(xs1),
where ẋm and ẋs denote the derivatives of xm and xs, respectively, with respect to time t. In this example, the initial conditions for master and slave are [xm1(0),xm2(0),xm3(0)]=[0.10.10.1] and [xs1(0),xs2(0),xs3(0)]=[-1-1-1], respectively. Matlab and Simulink are used to solve the optimization problem (P1), where N=30 and β=0.001. The proposed EP algorithm generates P0=[p1,p2,…,p30] according to the QRS. Several manipulations of the EP algorithm gets the convergence curve of IAE value versus iteration depicted in Figure 2. Figure 2 clearly shows that convergence occurs after about 170 iterations, and the final value of IAE is f(g*)=0.7592. The corresponding PID control gains are g*=[Kp*,Ki*,Kd*]=[200.001820]. Figure 3 also shows the Kp, Ki, and Kd trajectories during the evolutionary procedure. Figure 4 shows the output response when using the resulting PID control gain z*. The simulation results confirm that the EP algorithm and proposed PID controller effectively synchronize Sprott chaotic systems.Figure 2
Convergence curve of IAE.Figure 3
Iteration response ofKp,Ki,Kd.Time responses using the EP-based PID controller. (a)xm1versusxs1. (b) xm2versusxs2. (c) xm3versusxs3.  (d) The error states e1,e2,e3. (e) The control input. (The control u(t) is activated at t=20 sec.).
(a)(b)(c)(d)(e)The proposed PID controller was then tested in an actual system. Figure5 [8] shows the experimental results when (4.1) and (4.2) were applied in a circuit connected in a master/slave configuration. Figure 6 shows how the controller was implemented with Xilinx Spartan-3 FPGA and AD/DA converters and a 1289 kHz sampling rate. Figure 7 shows that the slave circuit response was synchronized to the master circuit response after the control was activated at t=20 second. The experimental results of error dynamics in Figure 7(d) show the convergence to a very small synchronization error.Electronic implementations of Sprott circuits. (a) master system; (b) slave system.
(a)(b)The Black diagram (a) and the photograph (b) of the proposed chaos synchronization system.
(a)(b)Experimental results of synchronization. (a)xm1versusxs1.(b) xm2versusxs2. (c) xm3versusxs3. (d) The error states e1,e2,e3.
(a)(b)(c)(d)


## 5. Conclusions

A simple and successful digital PID controller for an FPGA chip was proposed for using an evolutionary programming algorithm to synchronize two chaotic systems. The derived EP algorithm efficiently obtains the gains for three PID controllers by solving specified optimization problems. Moreover, the effectiveness of the proposed EP-based PID scheme was then demonstrated in a chaotic circuit system. The simulation and experimental results confirm that the proposed methods are effective and practical. Compared to existing methods of chaotic synchronization, the proposed FPGA-based optimal PID controller is not only effective, but also simple in terms of design and implementation.



---

*Source: 516031-2011-09-21.xml*