**3.1 Payoff function and signals**

An unknown number Y is selected randomly from a range of values {10, 11..., 90}. Players do not know this number but have to guess it based on two types of information (signals). The first signal is public (Pu), common to all players in the same game session. The second is private (Pr). It is specific to each subject (player). Both signals are randomly selected from the same interval [Y-10, Y + 10]. The decision consists of choosing between a safe action A that brings a fixed payoff T or a risky action B that generates a payoff Y under certain conditions:

	- 20 in stage 1 of sessions 1 and 2 and in stage 2 of sessions 3�5
	- 50 in stage 2 of sessions 1 and 2 and in stage 1 of sessions 3�5

• **0**, otherwise.


**6. Conclusions**

A strong earthquake can induce a chain of disasters. The disaster chain from the 2008 Wenchuan earthquake has been discussed.

The characteristics of the earthquake induced landslides have been summarized as follows.

Comparing the simulated results with the actual event, we found that they are in good agreement with each other. Therefore, the proposed approach has been shown applicable and useful for predicting the movement of potential debris flow arising from earthquake.

Fig. 28. The movement of the debris flow (a) for t=10s, (b) t=76s, (c) t=120s, (d) t=150s and (e)

A strong earthquake can induce a chain of disasters. The disaster chain from the 2008

The characteristics of the earthquake induced landslides have been summarized as follows.

2. Large quantities of large-scale landslides (113) occurred and are listed in this chapter.

for the distribution of the maximum depth of Hongchungou debris flow.

1. A large number of landslides (56,000) were induced by the earthquake;

**6. Conclusions**

Wenchuan earthquake has been discussed.

Fig. 27. Identified landslides as loose material of the debris flow

The susceptibility analysis of the earthquake induced landslides has been carried out by both statistical analysis and ANN analysis based on slope units rather than the traditional grids. The relationship of landslide distribution with individual causative factor has been investigated. It has been found that slope gradient, elevation, slope range, the distances to the fault, the distances to a stream have contributed to landslides while specific catchment area, slope aspect and lithology have no clear relationship. A susceptibility map has been made for analysis of the earthquake induced landslides in Qingchuan County.

A Multiplex Acceleration Model has been proposed for analysis of the long run-out mechanism based on trampoline effect. Table model tests and DDA simulation were carried out. It has been shown that the proposed Multiplex Acceleration Model is reasonable and applicable.

The earthquake induced landslides can easily form debris flows after the earthquake. The characteristics of the debris flows arising from the 2008 Wenchuan earthquake have been summarized as follows.

An approach of simulating debris flow has been proposed. The earthquake induced landslides are identified by RS with object-based analysis method, which can overcome the problem of the so-called 'salt and pepper' appearance existed in the traditional spectral information based image analysis method. A practical simulation has been carried out and the proposed approach has been shown effective and useful for estimating the movement behaviours of a potential debris flow arising from a strong earthquake.


2. ANN basic fundamentals and architectures

The process of artificial neural network works similarly to the neurons in the brain. First, before an artificial neural network can be tested or used, it must be trained. The process starts with the neuron, the basic element ANNs (see Figure 1). The neuron inputs are the outputs of several other neurons. Once a neuron has combined the inputs and produces a single output, it is compared to what is known as a training set, group of known inputs and outputs. The user sets a threshold of maximum that is allowed by the system. If the output value from the neuron does not match the known value in the data set, then the system will adjust the weights. This process is repeated until the error is within the threshold range and at that time the system will hold the weights at their

© 2016 The Author(s). Licensee InTech. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and eproduction in any medium, provided the original work is properly cited. © 2018 The Author(s). Licensee InTech. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

current position to be tested against data that was not used in the training set. At this point in time, the system will be able to back decision and process patterns from the nonlinear data.

An important issue in designing an ANN is knowing how many values are assigned to each layer of an ANN. Assigning too many variables to a layer will lead to overfitting due to the system not being able to process so much information and also will lead to longer computational times during training. Sometimes, proper training may not be possible in a reasonable time given the overload of data. Assigning to few variables in a layer of a complicated set will lead to the system to underfitting the data due to the signals not being fully recognized. Many factors such as the inputs and outputs, noise, complexity of the error function, network architecture, and training algorithm influence what is the best number of hidden units. The neural network is implemented in MATLAB and Simulink toolbox. The performance of the system will be the mean squared error for measuring the average of the squared error. Training of the network will stop when the max number of repetitions is reached, the max time is reached, the performance is minimized to the goal, the performance gradient falls below the minimum value, or mu exceeds the max value [1].

Biological neurons as shown Figure 2 have a cell nucleus to receive input from other neurons through a web of dendrites. Its learning is accomplished via little changes to a current

Figure 1. Neuron function [1].

Figure 2. Neural network (biological and artificial) [2] (Image credit: Wikipedia).

portrayal—its setup contains critical data previously, and learning is directed. The qualities of associations between neurons, or weights, don't begin as arbitrary, nor does the structure of the associations. Unlike biological neural networks, artificial neural networks (ANNs) are ordinarily prepared starting with no outside help, utilizing a settled topology decided for the current issue. Be that as it may, ANNs can likewise learn in light of a prior portrayal. Sooner rather than later, ANNs will start to play out extra classes of errands at close human and even superhuman levels, maybe ending up scientifically and fundamentally more like organic neural systems [2].

One of the primary issues with neural systems is that, generally, they have a constrained capacity to recognize causal connections expressly. Engineers of neural systems bolster these systems' huge swathes of information and take into consideration the neural systems to decide autonomously which input factors are generally vital. Another issue with neural systems is the inclination to overfit in light of the fact that the model records for abnormalities and anomalies in the preparation information that may not be available crosswise over real informational indexes. Overfitting of information happens when an information examination model, for example, a neural system, produces great expectations for the preparation information yet more regrettable ones for testing information. Designers can moderate overfitting in neural systems by punishing huge weights and constraining the quantity of neurons in shrouded layers. Decreasing the quantity of neurons in concealed layers lessens overfitting yet in addition restrains the capacity of the neural system to display more intricate, nonlinear connections [3].

Artificial neural network contains various layers as shown in Figure 3. These layers are the following: input layer to receive inputs for network's learning and recognition, output layer to react to the data about how it's found out any assignment, and in-between hidden layer to change the contribution to something that yield unit can use somehow.

Figure 3. Multilayer neural network [4].

current position to be tested against data that was not used in the training set. At this point in time, the system will be able to back decision and process patterns from the nonlinear data.

An important issue in designing an ANN is knowing how many values are assigned to each layer of an ANN. Assigning too many variables to a layer will lead to overfitting due to the system not being able to process so much information and also will lead to longer computational times during training. Sometimes, proper training may not be possible in a reasonable time given the overload of data. Assigning to few variables in a layer of a complicated set will lead to the system to underfitting the data due to the signals not being fully recognized. Many factors such as the inputs and outputs, noise, complexity of the error function, network architecture, and training algorithm influence what is the best number of hidden units. The neural network is implemented in MATLAB and Simulink toolbox. The performance of the system will be the mean squared error for measuring the average of the squared error. Training of the network will stop when the max number of repetitions is reached, the max time is reached, the performance is minimized to the goal, the performance gradient falls below the

Biological neurons as shown Figure 2 have a cell nucleus to receive input from other neurons through a web of dendrites. Its learning is accomplished via little changes to a current

minimum value, or mu exceeds the max value [1].

2 Advanced Applications for Artificial Neural Networks

Figure 2. Neural network (biological and artificial) [2] (Image credit: Wikipedia).

Figure 1. Neuron function [1].

Figure 4. Neural network' different architectures [4].

Moreover, neural network has different architectures such as perceptron model, radial basis function, multilayer perceptron, recurrent neural network, long short-term memory, Hopfield network, Boltzmann machine neural network, convolutional neural network, modular neural network, and physical neural network [4]. These different types are well depicted in Figure 4.

Also, neural networks could be used in classification, prediction, clustering (competitive networks, adaptive resonance theory networks, and Kohonen self-organizing maps), association, pattern recognition (supervised classification and unsupervised classification), and in addition machine learning [4].


**4. Tuning neural network controller using classical approach**

The architecture shown in **Figure 1** assumes the role of two neural blocks. Indeed, the weights of the neural model are adjusted by the identification error *e k*ð Þ, however the weights of the neural controller are trained by the tracking error *ec*ð Þ*k* .

The multi-layer perceptron is used in the neural model and in the neural controller. Each block consists of three layers. The sigmoid activation function *s* is used for all neurons.

Concerning the neural network model, the *j th* output layer of the hidden layer is described as follows

$$h\_j = \sum\_{i=1}^{n\_1} w\_{ji} x\_i \quad j = 1, 2, \dots, n\_2 \tag{10}$$

where *n*1 is the number of nodes of the input layer, *wji* is the hidden weight, *xi* is the input vector of the neural model, *x* ¼ ½ � *u k*ð Þ, *u k*ð Þ � 1 , *u k*ð Þ � 2 , … *T*, *u k*ð Þ is the control input to the system and *n*2 is the number of nodes of the hidden layer given in the expression (3).

The output of the neural network model is given by the following equation

$$yr(k+1) = \lambda s \left(\sum\_{j=1}^{n\_2} w\_{1j} s(h\_j)\right) \tag{11}$$

*w*1*j*ð Þ¼ *k* þ 1 *w*1*j*ð Þþ *k* Δ *w*1*j*ð Þ*k* (19)

*∂h*1 *∂w*1*j*

ð Þ *h*1 *S Wx* ð Þ (21)

*vjix*1*i j* ¼ 1, … , *n*4 (22)

*th* output layer of the hidden

(20)

(23)

(26)

where Δ*w*1*j* is

*DOI: http://dx.doi.org/10.5772/intechopen.96424*

layer is

Δ*w*1*j* ¼ �*η*

*hcj* ¼ X*n*3 *i*¼1

weight and *x*1*i* is the input vector of the neural network controller

*x*1 ¼ ½ � *r k*ð Þ,*r k*ð Þ � 1 ,*r k*ð Þ � 2 , … *T*, *r k*ð Þ is the desired value.

*j*¼1

*u k*ð Þ¼ *λc s* X*n*4

and *v*1*j* is the output weight.

where Δ*vji* is given by

Δ*vji* ¼ �*ηc*

*∂Ec ∂ec ∂ec ∂y ∂yr ∂h*1

following equation

with

**11**

Concerning the neural network controller, the *j*

*∂E ∂w*1*j*

*Tuning Artificial Neural Network Controller Using Particle Swarm Optimization Technique…*

Δ*w*1*j*ð Þ¼ *k ηλe k*ð Þ*s*

where *n*3 is the number of nodes of the input layer, *vji* is the hidden

*v*1*js hcj* � � ! ¼ *λc s* X*n*4

*u k*ð Þ¼ *λc s h*ð Þ¼ *c*1 *λc s vT*

*S Vx* ð Þ¼ 1 *s h j*

*v*1 ¼ *v*1*j* � �*T*

Concerning the hidden synaptic weights, they are updated by

The output of the neural network controller is given by the following equation

where *n*4 is the number of nodes of the hidden layer, *λc* is a scaling coefficient

*x*1 ¼ *x*1*i* ½ �*T*, *i* ¼ 1, … , *n*3, *V* ¼ *vji* � �, *i* ¼ 1, … , *n*3, *j* ¼ 1, … , *n*4,

� � � � *T*

*∂h*1 *∂s h j* � �

with *ηc* is the learning rate, 0≤ *ηc* ≤ 1 and the function cost defined as follows

The compact form of the output of the neural network controller is given by the

*j*¼1

1 *S Vx* ð Þ1

, *j* ¼ 1, … , *n*4,

*vji*ð Þ¼ *k* þ 1 *vji*ð Þþ *k* Δ *vji*ð Þ*k* (25)

*∂h j ∂u*

*∂u ∂hc*1 *∂hc*1 *∂hcj*

*∂hcj ∂vji*

, *j* ¼ 1, … , *n*4*:*

*∂s h j* � � *∂h j*

*v*1*js* X*n*3

! !

*i*¼1

*vjix*1*i*

� � (24)

¼ �*η*

0

*∂E ∂e ∂e ∂h*1

where *w*1*j* is the weight from the hidden layer to the output layer and *λ* is a scaling coefficient. The compact form of the output is given by the following equation

$$yr(k+1) = \lambda \, s(h\_1) = \lambda \, s \left[ w\_1^T \mathbf{S}(W\mathbf{x}) \right] \tag{12}$$

with

$$\mathbf{x} = \begin{bmatrix} \mathbf{x}\_{i} \end{bmatrix}^{T}, i = \mathbf{1}, \dots, n\_{1},$$

$$\mathbf{W} = \begin{bmatrix} \boldsymbol{w}\_{\hat{\boldsymbol{\mu}}} \end{bmatrix}, i = \mathbf{1}, \dots, n\_{1}, j = \mathbf{1}, \dots, n\_{2},$$

$$\mathbf{S}(\mathbf{W}\mathbf{x}) = \begin{bmatrix} \mathbf{s}(\boldsymbol{h}\_{j}) \end{bmatrix}^{T}, j = \mathbf{1}, \dots, n\_{2},$$

$$\boldsymbol{w}\_{1} = \begin{bmatrix} \boldsymbol{w}\_{1\hat{\boldsymbol{\mu}}} \end{bmatrix}^{T}, j = \mathbf{1}, \dots, n\_{2}.$$

The incremental change of the hidden weights Δ*wij*, *i* ¼ 1, … , *n*1 and *j* ¼ 1*::n*2, is

$$
\Delta w\_{ji} = -\eta \frac{\partial E}{\partial w\_{ji}} = -\eta \frac{\partial E}{\partial \epsilon} \frac{\partial \epsilon}{\partial h\_1} \frac{\partial h\_1}{\partial h\_j} \frac{\partial h\_j}{\partial w\_{ji}} \tag{13}
$$

$$
\Delta w\_{ji} = \eta \lambda^{\prime}(h\_1) S^{\prime}(\mathcal{W}\infty) w\_{\natural} \mathbf{x}^T e(k) \tag{14}
$$

with *η* is the learning rate, 0 ≤*η*≤1, *S*0 ð Þ¼ *Wx diag s*0 *h j* � � � � *T* , *j* ¼ 1, … , *n*2, *s* 0 ð Þ *h*1 is the derivative of *s h*ð Þ1 defined as follows

$$s'(h\_1) = s(h\_1)(1 - s(h\_1))\tag{15}$$

*e k*ð Þ is the identification error which is given by

$$e(k) = \mathcal{y}(k) - \mathcal{y}r(k)\tag{16}$$

and the function cost which is given by the following equation

$$E = \frac{1}{2} \sum\_{k=1}^{N} \left( e(k) \right)^2 = \frac{1}{2} \sum\_{k=1}^{N} \left( y(k) - yr(k) \right)^2 \tag{17}$$

where *N* is the number of observations.

The incremental change of the hidden weights Δ*wij* is used in the following equation

$$
\Delta w\_{ji}(k+1) = w\_{ji}(k) + \Delta \, w\_{ji}(k) \tag{18}
$$

However, the output weights are updated by the following equation

*Tuning Artificial Neural Network Controller Using Particle Swarm Optimization Technique… DOI: http://dx.doi.org/10.5772/intechopen.96424*

$$
\boldsymbol{w}\_{\mathbb{\dot{\mathcal{Y}}}}(\boldsymbol{k}+\mathbf{1}) = \boldsymbol{w}\_{\mathbb{\dot{\mathcal{Y}}}}(\boldsymbol{k}) + \Delta \,\boldsymbol{w}\_{\mathbb{\dot{\mathcal{Y}}}}(\boldsymbol{k})\tag{19}
$$

where Δ*w*1*j* is

where *n*1 is the number of nodes of the input layer, *wji* is the hidden weight, *xi* is the input vector of the neural model, *x* ¼ ½ � *u k*ð Þ, *u k*ð Þ � 1 , *u k*ð Þ � 2 , … *T*, *u k*ð Þ is the control input to the system and *n*2 is the number of nodes of the hidden layer given

*j*¼1

where *w*1*j* is the weight from the hidden layer to the output layer and *λ* is a scaling

coefficient. The compact form of the output is given by the following equation

*x* ¼ *xi* ½ �*T*, *i* ¼ 1, … , *n*1,

� � � � *T*

� �, *i* ¼ 1, … , *n*1, *j* ¼ 1, … , *n*2,

The incremental change of the hidden weights Δ*wij*, *i* ¼ 1, … , *n*1 and *j* ¼ 1*::n*2, is

¼ �*η*

, *j* ¼ 1, … , *n*2,

*∂h*1 *∂h j*

ð Þ¼ *Wx diag s*0 *h j*

*∂h j ∂wji*

� � � � *T*

ð Þ¼ *h*1 *s h*ð Þ1 ð Þ 1 � *s h*ð Þ1 (15)

*e k*ð Þ¼ *y k*ð Þ� *yr k*ð Þ (16)

*wji*ð Þ¼ *k* þ 1 *wji*ð Þþ *k* Δ *wji*ð Þ*k* (18)

ð Þ *Wx w*1*jxTe k*ð Þ (14)

ð Þ *y k*ð Þ� *yr k*ð Þ 2 (17)

, *j* ¼ 1, … , *n*2, *s*

, *j* ¼ 1, … , *n*2*:*

*∂E ∂e ∂e ∂h*1

*yr k*ð Þ¼ þ 1 *λ s h*ð Þ¼ 1 *λ s wT*

*W* ¼ *wji*

Δ*wji* ¼ �*η*

with *η* is the learning rate, 0 ≤*η*≤1, *S*0

the derivative of *s h*ð Þ1 defined as follows

Δ*wji* ¼ *ηλs*

*s* 0

and the function cost which is given by the following equation

ð Þ *e k*ð Þ 2 ¼ 1

However, the output weights are updated by the following equation

2 X *N*

The incremental change of the hidden weights Δ*wij* is used in the following

*k*¼1

*e k*ð Þ is the identification error which is given by

*E* ¼ 1 2 X *N*

where *N* is the number of observations.

*k*¼1

*S Wx* ð Þ¼ *s h j*

*w*1 ¼ *w*1*j* � �*T*

> *∂E ∂wji*

> > 0 ð Þ *h*1 *S*0

*w*1*js h j* � � !

1 *S Wx* ð Þ � � (12)

(11)

(13)

0 ð Þ *h*1 is

The output of the neural network model is given by the following equation

*yr k*ð Þ¼ þ 1 *λ s* X*n*2

in the expression (3).

*Deep Learning Applications*

with

equation

**10**

$$
\Delta w\_{1\circ} = -\eta \frac{\partial E}{\partial w\_{1\circ}} = -\eta \frac{\partial E}{\partial \varepsilon} \frac{\partial \varepsilon}{\partial h\_1} \frac{\partial h\_1}{\partial w\_{1\circ}} \tag{20}
$$

$$
\Delta w\_{1j}(k) = \eta \lambda e(k) s'(h\_1) \mathbf{S}(\mathcal{W} \mathbf{x}) \tag{21}
$$

Concerning the neural network controller, the *j th* output layer of the hidden layer is

$$h\_{cj} = \sum\_{i=1}^{n\_{\mathcal{I}}} v\_{j\mathcal{I}} x\_{\mathcal{I}i} \quad j = 1, \ldots, n\_{\mathcal{I}} \tag{22}$$

where *n*3 is the number of nodes of the input layer, *vji* is the hidden weight and *x*1*i* is the input vector of the neural network controller *x*1 ¼ ½ � *r k*ð Þ,*r k*ð Þ � 1 ,*r k*ð Þ � 2 , … *T*, *r k*ð Þ is the desired value.

The output of the neural network controller is given by the following equation

$$\mu(k) = \lambda\_{\epsilon} \left( \sum\_{j=1}^{n\_4} \nu\_{\text{lj}} s(h\_{\epsilon j}) \right) = \lambda\_{\epsilon} s \left( \sum\_{j=1}^{n\_4} \nu\_{\text{lj}} s \left( \sum\_{i=1}^{n\_3} \nu\_{\text{ji}} \mathbf{x}\_{1i} \right) \right) \tag{23}$$

where *n*4 is the number of nodes of the hidden layer, *λc* is a scaling coefficient and *v*1*j* is the output weight.

The compact form of the output of the neural network controller is given by the following equation

$$\mu(k) = \lambda\_{\mathfrak{c}} \,\, \mathfrak{s}(h\_{\mathfrak{c}1}) = \lambda\_{\mathfrak{c}} \,\, \mathfrak{s} \left[ \boldsymbol{v}\_{1}^{T} \mathbf{S}(\mathsf{Vx}\_{1}) \right] \tag{24}$$

with

$$\mathbf{x}\_{1} = \begin{bmatrix} \mathbf{x}\_{1i} \end{bmatrix}^{T}, i = \mathbf{1}, \dots, n\_{3},$$

$$V = \begin{bmatrix} v\_{ji} \end{bmatrix}, i = \mathbf{1}, \dots, n\_{3}, j = \mathbf{1}, \dots, n\_{4},$$

$$\mathbf{S}(\mathbf{V}\mathbf{x}\_{1}) = \begin{bmatrix} s\begin{pmatrix} h\_{j} \end{pmatrix} \end{bmatrix}^{T}, \ j = \mathbf{1}, \dots, n\_{4},$$

$$\boldsymbol{\nu}\_{1} = \begin{bmatrix} \boldsymbol{\nu}\_{1j} \end{bmatrix}^{T}, j = \mathbf{1}, \dots, n\_{4}.$$

Concerning the hidden synaptic weights, they are updated by

$$
v\_{ji}(k+1) = v\_{ji}(k) + \Delta\ v\_{ji}(k)\tag{25}$$

where Δ*vji* is given by

$$
\Delta v\_{ji} = -\eta\_c \frac{\partial E\_c}{\partial \mathbf{e}\_c} \frac{\partial \mathbf{e}\_c}{\partial \mathbf{y}} \frac{\partial \mathbf{y}r}{\partial h\_1} \frac{\partial h\_1}{\partial \mathbf{s}(h\_j)} \frac{\partial \mathbf{s}(h\_j)}{\partial h\_j} \frac{\partial h\_j}{\partial u} \frac{\partial u}{\partial h\_{c1}} \frac{\partial h\_{c1}}{\partial h\_{cj}} \frac{\partial h\_{cj}}{\partial v\_{ji}} \tag{26}$$

with *ηc* is the learning rate, 0≤ *ηc* ≤ 1 and the function cost defined as follows

*Deep Learning Applications*

$$E\_c = \frac{1}{2} \sum\_{k=1}^{N} \left( e\_c(k) \right)^2 = \frac{1}{2} \sum\_{k=1}^{N} \left( y(k) - r(k) \right)^2 \tag{27}$$

where *N* is the number of observations and *ec*ð Þ*k* is the tracking error which is given by the following equation

$$
\sigma\_{\varepsilon}(k) = \mathcal{y}(k) - r(k) \tag{28}
$$

This approach has two drawbacks. First, to find a suitable fixed learning rate *η*ð Þ*k* (respectively *ηc*ð Þ*k* ), several tests are called which decreases the on-line operation. Second, when we use this type of derivative of sigmoid function, a large amount of error should not be spread to the weights of the output layer and the learning speed becomes very slow. In order to increase the learning speed, some of

*Tuning Artificial Neural Network Controller Using Particle Swarm Optimization Technique…*

**5. Tuning neural network controller using particle swarm optimization**

An alternative technique is proposed, in this section, to optimize the neural network controller by implementing Particle Swarm Optimization algorithm. This algorithm works like animal behavior on finding foods and avoiding danger, where they will coordinate with each other to find the best position to settle. Likewise, PSO is directed by the movement of the best individual from the population, known as the social compound, and their own experience, known as the cognitive compound. The algorithm moves the set of solutions to find the best solution among them.

In this study, the Particle Swarm Optimization Feedforward Neural Network (PSO NN) is applied to a multi-layered perceptron where the position of each particle, in a swarm, represents the set of synaptic weights of the neural network for the current iteration. The dimensionality of each particle is the number of synaptic

Let us consider a search space of dimension *D*. A particle *i* of the swarm is

*xij* ¼ ½ � *xi*1, *xi*2, … , *xiD*

*vij* ¼ ½ � *vi*1, *vi*2, … , *viD*

There is no concept of backpropagation in PSO NN where the direct neural network produces the learning error, objective function of each particle, based on the set of synaptic weights and biases, the positions of the particles. Each particle moves in the weighting space trying to minimize the learning error and keeps in

Changing the position means updating the synaptic weights of the neural network controller to generate the proper control law by reducing tracking error. In each iteration *k*, the particles update their position by calculating the new velocity and move to the new position. At the iteration ð Þ *k* þ 1 , the velocity vector is

*Pbestij* ¼ *pbesti*1, *pbesti*2, … , *pbestiD T* (39)

*Gbestij* ¼ *gbesti*1, *gbesti*2, … , *gbestiD T* (40)

memory the best position through which it passed, denoted

whereas the best position reached by the swarm is denoted

*T* (37)

*T* (38)

the new proposed approaches are proposed in the next section.

*DOI: http://dx.doi.org/10.5772/intechopen.96424*

**5.1 Mathematical formulation**

modeled by a position vector

calculated as follows:

**13**

and a velocity vector denoted

weights.

where *r k*ð Þ is the desired output. So Δ*vji* comes

$$
\Delta v\_{\vec{\mu}} = \eta\_c \lambda\_c \mathbf{e}\_\epsilon(\mathbf{k}) \mathbf{s}'(h\_1) w\_{\vec{\mu}} \mathbf{S}'(W\mathbf{x}) w\_{\vec{\mu}} \mathbf{s}'(h\_{c1}) v\_{1\vec{\mu}} \mathbf{S}'(V\mathbf{x}\_1) \mathbf{x}\_1^T \tag{29}
$$

with *S*0 ð Þ¼ *Vx*1 *diag s*0 *h j* � � � � *T* , *j* ¼ 1, … , *n*4.

The output synaptic weights of the neural network controller are updated as

$$
\upsilon\_{1\circ}(k+1) = \upsilon\_{1\circ}(k) + \Delta\upsilon\_{1\circ}(k) \tag{30}
$$

where Δ*v*1*j* is given by

$$
\Delta \nu\_{1\dot{j}} = -\eta\_c \frac{\partial E\_c}{\partial \nu\_{1\dot{j}}} = -\eta\_c \frac{\partial E\_c}{\partial \varepsilon\_c} \frac{\partial \varepsilon\_c}{\partial h\_{c1}} \frac{\partial h\_{c1}}{\partial \nu\_{1\dot{j}}} \tag{31}
$$

So

$$\frac{\partial \mathcal{e}\_c(k)}{\partial h\_{c1}} = \frac{\partial (\mathcal{y}(k) - r(k))}{\partial h\_{c1}} = \frac{\partial \mathcal{y}(k)}{\partial h\_{c1}} = \frac{\partial \mathcal{y}(k)}{\partial u(k)} \frac{\partial u(k)}{\partial h\_{c1}}\tag{32}$$

and the Eq. (31) becomes

$$
\Delta \nu\_{\mathbf{j}\rangle} = -\eta\_c \frac{\partial E\_c}{\partial \mathbf{c}\_c} \frac{\partial \mathbf{y}(k)}{\partial u} \frac{\partial u(k)}{\partial h\_{c1}} \frac{\partial h\_{c1}}{\partial v\_{\mathbf{j}}} \tag{33}
$$

or in Eq. (33), *y k*ð Þ does not depend on *h*1, for this reason we use *yr k*ð Þ instead of *y k*ð Þ under the condition that the neural model is equal to the system behavior which gives

$$\frac{\partial \eta(k)}{\partial u} = \frac{\partial \eta r(k)}{\partial u} = \frac{\partial \eta r(k)}{\partial h\_1} \frac{\partial h\_1}{\partial s(h\_j)} \frac{\partial s(h\_j)}{\partial h\_j} \frac{\partial h\_j}{\partial u} \tag{34}$$

from where approximately

$$
\Delta \nu\_{\mathbf{l}\mathbf{j}} = -\eta\_c \frac{\partial E\_c}{\partial \mathbf{e}\_c(\mathbf{k})} \frac{\partial \mathbf{e}\_c(\mathbf{k})}{\partial \mathbf{y}(\mathbf{k})} \frac{\partial \mathbf{y}(\mathbf{k})}{\partial h\_1} \frac{\partial h\_1}{\partial \mathbf{s}(h\_j)} \frac{\partial \mathbf{s}(h\_j)}{\partial h\_j} \frac{\partial h\_j}{\partial \mathbf{u}(\mathbf{k})} \frac{\partial \mathbf{u}(\mathbf{k})}{\partial h\_{c1}} \frac{\partial \mathbf{h}\_{c1}}{\partial \nu\_{\mathbf{l}j}} \tag{35}
$$

the obtained incremental change Δ*v*1*j* is rewritten as

$$
\Delta v\_{1\circ} = \eta\_c \lambda\_c e\_c(k) s'(h\_1) w\_{1\circ} \mathbf{S}'(\mathcal{W}\mathbf{x}) w\_{j\circ} s'(h\_{c1}) \mathbf{S}(\mathcal{V}\mathbf{x}\_1) \tag{36}
$$

In this section, we used a fixed learning rate, *η*ð Þ*k* (respectively *ηc*ð Þ*k* ), and a derivative of sigmoid function *s* 0 ð Þ¼ *h*1 *s h*ð Þ1 ð Þ 1 � *s h*ð Þ1 .

*Tuning Artificial Neural Network Controller Using Particle Swarm Optimization Technique… DOI: http://dx.doi.org/10.5772/intechopen.96424*

This approach has two drawbacks. First, to find a suitable fixed learning rate *η*ð Þ*k* (respectively *ηc*ð Þ*k* ), several tests are called which decreases the on-line operation. Second, when we use this type of derivative of sigmoid function, a large amount of error should not be spread to the weights of the output layer and the learning speed becomes very slow. In order to increase the learning speed, some of the new proposed approaches are proposed in the next section.


**Microelectrode Arrays and Application to Medical Devices**

Editors

**Colin Dalton Alinaghi Salari**

MDPI • Basel • Beijing • Wuhan • Barcelona • Belgrade • Manchester • Tokyo • Cluj • Tianjin

*Editors* Colin Dalton Electrical and Computer Engineering Department, University of Calgary Canada

Alinaghi Salari Li Ka Shing Knowledge Institute, Ryerson University Canada

*Editorial Office* MDPI St. Alban-Anlage 66 4052 Basel, Switzerland

This is a reprint of articles from the Special Issue published online in the open access journal *Micromachines* (ISSN 2072-666X) (available at: https://www.mdpi.com/journal/micromachines/ special issues/Microelectrode Arrays).

For citation purposes, cite each article independently as indicated on the article page online and as indicated below:

LastName, A.A.; LastName, B.B.; LastName, C.C. Article Title. *Journal Name* **Year**, *Article Number*, Page Range.

**ISBN 978-3-03943-174-8 (Hbk) ISBN 978-3-03943-175-5 (PDF)**

Cover image courtesy of Xing Yang.

c 2020 by the authors. Articles in this book are Open Access and distributed under the Creative Commons Attribution (CC BY) license, which allows users to download, copy and build upon published articles, as long as the author and publisher are properly credited, which ensures maximum dissemination and a wider impact of our publications.

The book as a whole is distributed by MDPI under the terms and conditions of the Creative Commons license CC BY-NC-ND.