• No results found

Chapter 5 Improved Interactive Display System

5.1. Gestures used for the Interactive Display

A basic neuron model as shown in Fig 2.20 can be described by a function that calculates the output as a function of a number of inputs to it. The basic idea behind the entire neuron model, including the activation functions illustrated below, has been adopted from (Anderson, 2003).

Figure 2.20: Mathematical Model of a Neuron.

- 83 - The output of the neuron is given by

๐‘“ ๐œ‘ = ๐‘“( ๐‘๐‘–=00 ๐‘ค๐‘–๐‘Ž๐‘–) 2.10

Where: w0a0 is the threshold value (polarization), f ฯ† is the neuron activation function, ฯ† is the summation output signal and y is the neuron output.

๐œ‘ = ๐‘พ๐‘ป๐‘จ 2.11

Where: ๐‘พ = ๐‘ค0๐‘ค1โ€ฆ ๐‘ค๐‘0 , ๐‘จ = ๐‘Ž0๐‘Ž1โ€ฆ ๐‘Ž๐‘0 ๐‘ป 2.12 The activation function acts as a squashing function, such that the output of a neuron in a neural network is between certain values (usually 0 and 1, or -1 and 1). An activation function decides how powerful the output from the neuron should be, based on the sum of its inputs. Depending upon the applicationโ€˜s requirements, the most appropriate activation function is chosen. The activation function f (ฯ†) can be in different forms. A few of which are illustrated below:

โ–ช Threshold (or Step) Function

This takes on a value of 0 if the summed input is less than a certain threshold value (ฯ†), and the value 1 if the summed input is greater than or equal to the threshold value.

๐‘“ ๐œ‘ = 1, if ฯ† โ‰ฅ 0 0, if ฯ† < 0

- 84 - Figure 2.21: Step activation function

โ–ช Piece wise linear function

This function again can take on the values of 0 or โˆ’1, but can also take on values between that depending on the amplification factor in a certain region of linear operation.

๐‘“ ๐œ‘ =

1, for ฯ† > 1

โˆ’1, for ฯ† < โˆ’1 ๐œ‘, for โˆ’ 1 < ๐œ‘ < 1

Figure 2.22: Piece wise linear activation function.

โ–ช Sigmoid bipolar function

This function can range between 0 and 1, but it is also sometimes useful to use the -1 to 1 range.

An example of the sigmoid function is the hyperbolic tangent function

๐‘“ ๐œ‘ = tanh ๐›ฝ๐œ‘ =1 โˆ’ ๐‘’1 + ๐‘’โˆ’2๐›ฝ๐œ‘โˆ’2๐›ฝ๐œ‘

- 85 - Figure 2.23: Bipolar activation function.

โ–ช Sigmoid unipolar function

This function can range between 0 and 1 and in this work the Sigmoid activation function has been used since the emphasis is that the neural network output should be 0 or 1 (no or yes).

๐‘“ ๐œ‘ = 1+ ๐‘’1โˆ’๐›ฝ๐œ‘

Figure 2.24: Sigmoid unipolar activation function.

Based on the way the neurons are interconnected in a model, neural networks can be broadly classified into two types namely feed-forward and feed-back networks. As the name suggests, feedback networks unlike feed-forward networks have a feedback connection fed back into the network along with the inputs. Due to their simplicity and the existence of a well-defined learning algorithm, only feed-forward networks have been used in this dissertation for the simulation and hence the application is presented in the upcoming sections.

- 86 -

2.17.1 The Feed-forward Networks

Feed-forward networks are the simplest neural networks where there is no feedback connection involved in the network and hence the information travel is unidirectional (El-Sharkawi, Niebur, 1996). A feed-forward network with ๐‘ŽN0 input and ๐‘ฆNR output signals is shown in Fig 3.14. The computation process in the ith layer can be described by the following (2.13)

๐’‘(๐‘–)= ๐‘“(๐‘–) ๐’˜(๐‘–)๐’ˆ(๐‘–โˆ’1) 2.13

Where ๐’‘(๐‘–) = ๐‘1(๐‘–)๐‘2(๐‘–)๐‘3(๐‘–) โ€ฆ ๐‘๐‘(๐‘–)๐‘– ๐‘ป is the fault signal vector at the output of the ith layer.

And ๐‘พ(๐‘–) =

๐‘ค10(๐‘–) ๐‘ค11(๐‘–) โ€ฆ ๐‘ค1๐‘(๐‘–)๐‘–โˆ’1 ๐‘ค20(๐‘–) ๐‘ค21(๐‘–) โ€ฆ ๐‘ค2๐‘(๐‘–)๐‘–โˆ’1

โ‹ฎ ๐‘ค๐‘(๐‘–)๐‘–0

โ‹ฎ ๐‘ค๐‘(๐‘–)๐‘–1 โ‹ฑ

โ€ฆ

โ‹ฎ ๐‘ค๐‘(๐‘–)๐‘–๐‘๐‘–โˆ’1

is the weighing matrix between the (i-1)th and

the ith layer.

๐’ˆ(๐‘–โˆ’1)=

๐ด ๐‘“๐‘œ๐‘Ÿ ๐‘– = 1 1

๐’‘(๐‘–โˆ’1) ๐‘“๐‘œ๐‘Ÿ ๐‘– = 2,3, โ€ฆ , ๐‘… 2.14

A is the vector containing the input signals,๐’‡(๐‘–) is the activation function of the neurons in the ith layer and p is the number of processing layers. All the neurons in a particular layer are assumed to be similar in all aspects and the number of hidden layers can be more than one and is usually determined by the purpose of the neural network. The output of the processed neural network is represented by the output vector:

๐’š = ๐’‘(๐‘น)= [y1y2y3 โ€ฆ yNR]๐‘‡ 2.15

- 87 -

Figure 2.25: Structure of a two-layered feed-forward network.

2.17.2 The Training Process for the HVDC Neural Network Controller

Two important steps in the application of neural networks for any purpose are training and testing. The first of the two steps namely training of the chosen neural networks is dealt with in this section. Training is the process by which the neural network learns from the inputs and updates its weights accordingly. In order to train the neural network, a set of data called the training data-set is needed which is a set of input output pairs fed into the neural network.

Thereby, the neural network is taught what the output should be, when that particular input is fed into it. The ANN slowly learns the training set and slowly develops an ability to generalize upon this data and will eventually be able to produce an output when a new data is provided to it.

During the training process, the neural networkโ€˜s weights are updated with the prime goal of minimizing the performance function. This performance function can be user defined, but usually

- 88 -

feed-forward networks employ Mean Square Error as the performance function and the same is adopted throughout this work.

As aforementioned, The input to the suggested ANN controller is the current reference ๐ผ๐‘Ÿ๐‘’๐‘“ and measured dc current ๐ผ๐‘‘๐‘ and its output is the firing angle. The error between ๐ผ๐‘‘๐‘ and ๐ผ๐‘Ÿ๐‘’๐‘“ is used to adjust the weight of the ANN according to the delta rule. The speed of the controller and the system stability will depend on the learning rate ๐œ‚ and the momentum ๐œ‡ used in adjusting the weights of the ANN.