Volume (7)

6 downloads 0 Views 2MB Size Report
Yaser Khalifa and Badar Khan and Jasmine Begovic and Andrew Wheeler and. Airrion Wisdom ...... [7] F. Mo, A. Tabbara, and R. K. Brayton, “A force directed ...
The International Congress for global Science and Technology

,&*67,QWHUQDWLRQDO-RXUQDORQ$UWLILFLDO,QWHOOLJHQFH DQG0DFKLQH/HDUQLQJ

$,0/   9ROXPH  ,VVXH   -XQH  ZZZLFJVWFRP ZZZLFJVWDPFFP ZZZLFJVWHHVFRP   ‹,&*67//&'HODZDUH86$



$,0/-RXUQDO ,6613ULQW ,6612QOLQH ,661&'520 ‹,&*67//&'HODZDUH86$



Table of Contents

3DSHUV 3 $GHO$6HZLV\ $XWRPDWLF1XPEHU3ODWH5HFRJQLWLRQ8VLQJ+RXJK7UDQVIRUP  3 0.

V

(V )(s)

//pick best action or greedy

such that

and update

hash table.

a ← arg mina∈A(s) Q(s, a) //update the value function

4 Algorithm for RTDP in Varying Environment

V (s) ← Q(s, a)

V.

//stochastically simulate next state.

s ← s , //or

According to the description in the subsection above,

pick

pick

s

the

P (s, a, s ) + δs

Ps (s, a, s )

with probability next

state



s

with

probability

vironment based on RTDP. The key problem is that

end while

we must construct an appropriate variational environ-

In this algorithm,we combined the core ideas of both

ment for the learning Agent.

In the following algo-

of DP with variational environment and RTDP. On

rithm, we make the transition probability vary with

one hand, this algorithm is not like general value iter-

the dierent states of the system or add noise to base

ation method, which remains the advantages of RTDP

DP only. Speaking more detail, in each iteration, up-

not have to evaluate the entire state space for deliver-

dating the value function will use dierent transition

ing an optimal policy quickly, and on the other hand,

law,

it provides a more applicable environment for learn-

we shall propose an algorithm under a variational en-

add

Ps (s, a, s ), according to the current state s, or a noise δs to base DP simply. This noise param-

eter is varied with states also.

ing Agent. Because of having no counterpoint, we can not compare the performance with some other algo-

So, under this idea,

the new algorithm is dierent from the original one,

rithms.

RTDP algorithm.

that our algorithm can work very well.

The main advantages of this kind

But the following experiment will show you Also, in this

of algorithm are that it remains the powerful perfor-

experiment, we provide a method how to vary the en-

mance of RTDP algorithm, and meanwhile, the learn-

vironment.

ing Agent can accommodate more complex environment.

In our experiment, the environment is varied

5 Simulation Results

through changing the friction coecient at the dierent trials and transition probability at dierent state both. In the following, we show the details of this al-

Our experiment will employ the Pendulum Swing Up

gorithm.

Task.

Algorithm 2: RTDP Algorithm in Varying Environment(V-RTDP) RTDP(s:state) s = s0 , V (s) = V (s0 ) repeat s until RTDPTRIAL(s:state) V (s) ← 0 while    s do   

up-position

velocity

a pair,

θ

to the

and its derivative, the angular

and which is limited to So,a state

˙ . s = (θ, θ)

|a| < amax

//no termination condition

s

˙ < 10 |θ|

in our

can be represented by

We can apply a limited torque

at the xed joint, since the torque is not

sucient to directly reach the goal state

sup ,

so the

Agent has to swing up the system and decelerate again

be

not GOAL( )

if the goal state is reachable.

Ps (s, a, s ) c(s, a, s ) + γV (s )  //or for simplicity, Q(s, a) ← s (P (s, a, s ) +     δs ) c(s, a, s ) + γV (s ) , //where δs is an reasonable small number (noise).

discretization time step of

ecient

In the experiments, a

Δt = 0.01

Parameters of the System:

s

was used.

We used a friction co-

μ selected form {0.4, 0.5, 0.6} randomly.

This

friction coecient selection can demonstrate the re-

//Bellman error.

if

θ˙,

sdown

(see gure Fig.1). We have two state

implementation.

RTDPTRIAL( )

quire of our algorithm with vary environment. It also

(s) ← max{beV (s), |V (s) − Q(s, a)|} stop beV (s) < ε,

beV

sup

variables, the angle

//initialization,

Q(s, a) ←

In this task we have to swing up an inverted

pendulum from the stable down position

makes the swing up task a little more complicated to

then

learn due to the extenuated velocity of the system.

19

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Table 1: Parameters of the System Name Symbol Value Torque(Action) a [-20,+20] Gravity accel. g 9.8 Mass of the pen. m 1.0 Len. of the pen. l 1.0 Coef. of friction μ {0.4, 0.5, 0.6} randomly Time step Δt 0.01 Discount Factor γ 0.98 Initial state sdown = (θ, θ˙) (0,0) Goal state sup = (θ, θ˙) (π,0)

0

0

500

1000 Trials (c)

40

1500

Torque(Action)

0 −20 −40

0

500

1000 Trials

1500

0

500

1000 Trials (d)

2

Ang. Acc. Ang. Vel.

20

0 −10 −20

2000

Torque(Action)

10

2000

Step Cost

1 0.5 0

2000

1500

1.5

0

500

(a)

1000 Trials

1500

2000

(b) 0.03 Value Function

Value Function

(8)

0.02 0.01 0

0

2 4 Position(Angle) (c)

Bellman Errors

Value Function

0.01

0 2 Angular Velocity (d)

4

5

0.02 0.01 0 −20

0.02

0 −2

6

0.03

−10 0 10 Torque(Action)

20

0 −5 −10

0

500

1000 Trials

1500

2000

Figure 3: Value Function and Bellman Errors enhancing accommodational ability of it. The simulation experiment demonstrated that our algorithm is very ecient and fast. But the disadvantage of this algorithm is that, unfortunately, our algorithm can not solve the problem of a slow convergence theoretically yet, because the bad update frequency of rare transitions problem is still existent.

(9)

Torque or Action selection: The equation repre-

senting the motion of pendulum is given as a = ml2 θ¨ + μθ˙ + mgl sin(θ).

2

0.03

Where, ps is the state penalty, a is the applied torque, θ is the angle at a given instance from the stable equilibrium point measure in the anti-clockwise direction, θg is the goal angle, Δt is the time step length. The cost function includes two parts. One comes from the torque at some time step, and the cost increases with the torque. The other one comes from dierence of current angle to the target. Both of them are indexed a square is to boost up sensitivity for two quantities System Dynamics: The pendulum has the following dynamics: 1 (−μθ˙ + mgl sin θ + a). θ¨ = ml2

4

Figure 2: Simulation Results for Each Parameter

More system parameters' congurations are shown in Table 1. Step Cost Function: The cost(or immediate cost) was simply given by a measure of the following function.   c (θ, θ˙ , a) = a2 Δt + ps (θ − θg )2 Δt.

(b) 20

Targe Ang. Ang.

Step Cost

Angular Acceleration & Velocity

Angle and Target Angle

(a) 6

(10)

Simulation Results: The following gures show the

Acknowledgement

results of experiment under our algorithm. From Fig.2 (a) and (c), we know that the goal state is reached after 1500 trials only, and from (b), the torque or control action tends to 0 gradually. The cost function converges to the expectation value from (d). In Fig.3,we demonstrate the curves of value function and Bellman errors. Both of them can conclude that our algorithm has a fast convergence rate.

I would like to acknowledge the nancial support by NSFC60075019.We thank professor Anders Rantzer and professor Rolf Johansson in Lund University, Sweden, as advisors of the rst author for providing insightful comments that led to the improvement of the paper.

6 Conclusions In this paper,we proposed a new and novel algorithm through solving real-time stochastic dynamic programming problem with variational environment for reinforcement learning Agent. Here we employed a new DP framework for learning Agent in order to 20

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Changming Yin received B.Sc degree from Beijing

[7] Sutton R.S. and Barto A.G. Reinforcement Learn-

Normal University, Ph.D from Shanghai University,

ing:

China,in the year 1986 and 2006 respectively. He is

MA, 1998.

presently a professor in the College of Computer and

[8] Szita I.,Takacs B. and Lorincz A.ε-MDPs: Learn-

Communicational Engineering, Changsha University

ing in Vary Environment.Journal of Machine

of Science and Technology. His research areas include

Learning Research,Vol.3, pp.145-174, 2002.

intelligence control and simulations,intelligence computing and machine learning, etc.

Lihua Xue

[9] Szita I., Takacs B. and Lorincz A. Reinforcement learning integrated with a non-Markovian con-

received B.Sc degree from Taiyuan

Normal University, China,in the year 2005.

troller. ECAI2002, Proceedings of the 15th Eu-

She is

ropean Conference on Articial Intelligence,In F.

presently a graduate in the College of Computer and

van Harmelen(ed.):IOS Press,Amsterdam,pp.365-

Communicational Engineering, Changsha University

369,2002.

of Science and Technology. Her research areas include articial intelligence and machine learning, etc.

Minghui Hu

received B.Sc degree from Chang-

the year 2005.

He is presently a graduate in the

sha University of Science and Technology, China,in College of Computer and Communicational Engineering, Changsha University of Science and Technology. His

research

areas

include

software

engineering,

intelligence computing and machine learning, etc.

Liyun Li

received

B.Sc

degree

from

Huadong

Normal University, Shanghai, China,in the year 1998. He is presently a graduate in the College of Computer and Communicational Engineering, Changsha University of Science and Technology. His research areas include intelligence control and simulations, etc.

References [1] Barto A., Bradtke S. and Singh,S. Learning to act using real-time dynamic programming. Articial Intelligence vol.72,pp.81-138,1995. [2] Bonet B.and Gener H. Labeled RTDP: Improving Improving the convergence of real-time dynamic programming. Proc.of ICAPS-03, pp.1221,2003. [3] Howard R.A. Dynamic Programming and Markov Processes.MIT Press,7th edition,1972. [4] Korf R. Real-time heuristic search. Articial Intelligence, vol.42(2¨C3),pp.189-211,1990. [5] Lorincz A.,Polik I. and Szita I. Event-learning and robust Policy Heuristics. Connitive System Research,Vol.4,pp.319-337,2003. [6] McMahan G.J.

H.B.,Likhachev

Bounded

Real-Time

An Introduction. MIT Press, Cambridge,

M.

and

Dynamic

Gordon Program-

ming:RTDP with monotone upper bounds and performance guartees. In Proceedings of the 22nd International Conference on Machine Learning, Bonn, Germany, 2005.

21

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

22

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Power Line Communication using OFDM and OGA P.Malathi and P.T.Vanathi ECE Dept., PSG College of Tech, Coimbatore-04, India. [email protected], [email protected] plagued by impulse noise. To achieve high data rates of some Megabits/sec required for multimedia applications, sophisticated and well designed digital transmission systems are necessary in order to exploit the available frequency bands. Three network solutions can be considered for home networking: Ethernet and phone line, wireless, and power line networks. Ethernet and phone line solutions provide fast, reliable service but require snaking cable to each connection. Network nodes must be identified and placed during construction of new homes. Considerable renovation is required to retrofit older homes or to place additional nodes. Home network users seek three major factors in any network solution: ease-of-use, low cost, and ubiquitous node availability. PLC networking delivers all three. In this paper, the well–known Multicarrier technique orthogonal frequency division multiplexing (OFDM) [1] [2] is considered as modulation scheme. By the application of OFDM, the most distinct property of the power line channel, its frequency selectivity, can be easily coped with it. Design of communication network topologies is a highly constrained optimization problem in which random initialization and standard genetic operators often generate infeasible networks[4] [5]. Physical topological design PLC network is solved by two optimization algorithm named Simple Genetic Algorithm (GA) and Orthogonal Genetic Algorithm (OGA). The rest of the paper is organized as follows: OFDM is introduced in section II. History, limitation and process of PLC using OFDM are explained in section III. Finally, simple topological design of PLC using OGA and simulation results with conclusion discussed in section IV and V.

Abstract Orthogonal frequency Division Multiplexing (OFDM) has been proposed technique for in-home high speed Power Line Communication (PLC). Several technical challenges are present in using power lines as a networking media for data communication. Power line networking uses power lines existing in homes. The physical topological design of the home wiring poses power line as a networking media. Topological design can be formulated as ‘optimization problem’ and solved by using Simple Genetic Algorithm (GA) and Orthogonal Genetic Algorithm (OGA) technique. OGA is well suitable for it and gives better solution compare to GA. For efficient and reliable communication over power line, a robust physical (PHY) layer is required and which has clear and strong specification for its source and channel coding, modulation and multiplexing techniques. It is satisfied by OFDM technique which carries the signal at a high data rate with few bit errors and suitable for PLC data communication. For topological design, compare to GA, OGA provides best performance. In this paper, OFDM is used as a modulation scheme for PLC and OGA is used to solve the optimized topological design of PLC based on cost constrain. Key words: OFDM, PLC, GA, OGA, Physical layer specification, Optimization problem, Topological design, modulation and multiplexing technique.

1. Introduction The use of the PLC networks has attracted much attention and has become a mature subject of research in the last few years. A networked home connects home appliances, PCs and other smart devices not only to one another but also to a globally connected world through the Internet. For consumers to embrace home networking, a solution that utilizes the existing infrastructure within the home, such as electrical wiring, is significant. However, the use of power lines as a home networking plat form presents quite a trouble some and noisy environment that fluctuates with varying load impedance and time and is also

2.Orthogonal Frequency Division Multiplexing (OFDM) OFDM is a block modulation scheme where a block of information symbols is transmitted in parallel on subcarriers. An OFDM modulator can be implemented as an Inverse Fast Fourier Transform (IFFT) on a block of information symbols. To

23

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

mitigate the effects of Inter Symbol Interference (ISI) caused by channel time spread, each block of IFFT coefficients is typically preceded by a cyclic prefix (CP) or a guard interval consisting of samples, such that the length of the CP is at least equal to the channel length. Under this condition, a linear convolution of the transmitted sequence and the channel is converted to a circular convolution. As a result, the effects of the ISI are easily and completely eliminated. Moreover, the approach enables the receiver to use Fast Fourier transform (FFT) for OFDM implementation [3]. The total bandwidth is divided into N parallel subchannels and bits are assigned to subchannels in direct proportion to the sub channel signal to noise rations. The scheme that assigns the energy and bits to the different sub channels is called a bit and resource allocation technique. OFDM represents a different system-design approach. It can be thought of as a commercial combination of modulation and multiple-access schemes that segments a communications channel in such a way that many users can share it. Whereas Time Division Multiple Access (TDMA) segments are according to time and CDMA segments are according to spreading codes, OFDM segments are according to frequency. Compare to OFDM, Systems based on CDMA are very complex. Errors in power control and time synchronization will result in reduced capacity and system performance. TDMA systems also have less inherent immunity against multipath fading than CDMA systems, because they use a much narrower signal bandwidth. Due to orthogonality modulation scheme OFDM eliminate all above mentioned CDMA and TDMA drawbacks and provides best solution for 4G applications.

speed Internet access among multiple PCs and other devices. Basically a radio signal is modulated with the data that has to be sent. This radio signal is then sent down the copper medium (selected power lines) in a band of frequencies not used for the purpose of supplying electricity and managing electricity. The frequencies and encoding schemes used greatly influence both the efficiency and the speed of the PLC service. Most PLC radio traffic generally occurs in the same bandwidth roughly 1.6 MHz to 80 MHz. These frequencies are in the MF Medium Frequency (300 KHz-3 MHz), HF High Frequency (3MHz – 30 MHz) and some of the VHF Very High Frequency (30MHz – 300 MHz) spectrum. Various encoding schemes used for sending the data along the power lines are GMSK and CDMA used with the Single Carrier providing low bandwidths less than 1 MB and when used with OFDM the Multi Carrier providing a bandwidth of 45 MB. The encoding techniques are the main portions of the PLC and a backbone network is needed to locate the power sub-stations. The reasoning behind this is that the substation serves a certain limited number of users. The amount of bandwidth available would need to be shared between all users of the power grid supplied by that power station and cost constrains, topological design of backbone network is needed and solved by OGA. 3.2 History of PLC In the history of PLC, the first technique to make use of the power line for control messages was the method - Ripple Control. This is characterised by the use of low frequencies of 100 to 900 Hz giving a low bit rate and a demand on very high transmitter power, often in the region of several 10kWs. The system provided one-way communication technology, and among the applications provided was the management of street lights and load control. In 1913 the first commercial production of electromechanical meter repeaters took place. In the mid 1980’s experiments on higher frequencies were carried out to analyse the characteristic properties of the electric grid as a medium for data transfer. Frequencies (in the range of 5 to 500 kHz were tested in which the signal to noise levels were important topics for measurements as well as the attenuation of the signal by the grid. Bi-directional communication was developed in the late 80’s and early 1990’s. Since the 1997 experiment in a school of Manchester (United Kingdom) utility and technology companies continued to experiment with higher bandwidth data transfer across the electric grids in Europe and the U.S. Advances in PLC technology now allows for high speed, broadband communications over medium and low voltage mediums yielding extraordinary market opportunities. Some important PLC industries are Power Line Communications Association, United Power Line Council, PLC Forum, HomePlug Alliance, etc.

3. Power Line Communication (PLC) PLC networking in the home provides Local Home Network. Several applications for a PLC network in homes are sharing Internet, printers, files, home control, games, distributed video, remote monitoring and etc. PLC has been introduced around since the 1950’s but was never seriously thought of as a communication medium due to its low speed, low functionality and high development cost. However in recent times, new modulation techniques supported by technological advances have finally enabled power line communications to become a realistic and practical means of communication [8-16]. 3.1 Process of PLC Power line communications use the RF signal sent over medium and low voltage AC power lines to allow end users to connect to the Internet. The RF signal is modulated with digital information that is converted by an interface in the home like power grid. Alternating current power lines are used as a medium to send and receive discrete frequency-based control, monitoring and communication messages to run home devices, exchange data and share high-

24

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

3.3 Limitations of PLC Distances The distance between the customer’s home and the supplying sub-station is a factor in the bit rate available to the user. Improved encoding techniques can help to rectify it.

Input Serial Data Stream

FEC & Serial to Parallel

Symbol Mapping (QPSK)

Equipment The equipment in the Power Grid is a big factor when designing a PLC system. This problem has been solved by the design of new transformers that will pass radio frequencies, by allowing the high frequency to skip the transformer by means of filtering.

IFFT

Guard Interval Insertion

Time domain mapping

Fig 1 PLC System Transmitter Figure 1 Model Receive Front end Processing

Guard Interval Removal

Symbol Demapping (QPSK)

FFT

FEC Decoding Parallel to Serial

Output Serial Data Stream

Channel Adaptation

Synchronisation

Fig22 PLC System Receiver Model Figure

signals in the frequency domain to the time domain and produces an OFDM symbol. Inter Symbol Interference (ISI) is a major complication caused by multipath propagation. This is handled through time domain processing. If a copy of the signal arrives a significant fraction of one OFDM-symbol-time late, symbol error can occur. These multipath distortion effects can be almost completely mitigated by adding a guard time (cyclic prefix) to the OFDM symbol. The prefix is essentially a copy of the last few microseconds of the symbol as shown in Figure 3. The cyclic prefix absorbs any multipath interference that occurs when time-delayed reflections of the original symbol arrive at the receiver. By ensuring that the cyclic prefix is as long as the longest possible delay variation, the integrity of the OFDM symbol is preserved. At the receiver, the reverse process takes place as shown in Figure 2. The cyclic prefix is removed. An FFT is applied on each symbol, converting it from the time domain to the frequency domain. OFDM provides resistance to deep, narrow fades by using many carriers. The loss of a few tones can be compensated for with FEC coding which redundantly encodes data across all active tones. If some of the tones are not received due to noise or other effects, the remaining carriers can be used to recover the original signal. Automatic channel adaptation allows the system to respond to current conditions on the power line.

Sharing Each sub station will require a backbone connection to provide the customers with significant data rates. However the amount of bandwidth available between a sub-station and the homes connected to it must be shared the same. This problem can be rectified using suitable high data modulation techniques like OFDM. Cost PLC requires the use of high capacity backbones however there is a large cost involved in providing these high capacity connections. The capacities provided to each sub-station should be considered individually deciding on how many potential customers there are and the levels of broadband uptake there is in the area. It can be rectified by driving ‘cost constrain problem’ and solve it using optimization technique. Security Encryption must be used to prevent the interception of sensitive data by unauthorised personnel.

3.4 PLC System

Transmitter

and

Receiver

Figure 1 and 2 illustrates the conversion process that takes place at the transmitter and receiver. Forward Error Correction (FEC) redundantly encodes the input data to compensate for harsh channel characteristics. The encoded data is mapped onto a set of tones by QPSK technique which assigns subcarriers to it. OFDM modulation is generated using a Inverse Fast Fourier transform (IFFT) processor which converts

25

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Figure 3 Cyclic Prefix to the OFDM Symbol

Figure 4 OFDM Symbol Data Packet The tones are modulated using either differential BPSK (76 bits per OFDM symbol) or QPSK (152 bits per OFDM symbol). Convolutional codes are a reasonable choice because soft decision decoding can easily be performed by the Viterbi Algorithm, which is usually applied to decode convolutional codes. Furthermore, the code rate of convolutional codes can be adjusted in a flexible way by puncturing the code. Code puncturing can be applied to adapt the error correcting capability of the code to the channel state and to the desired level of error protection. The performance of simple convolutional codes can be improved by concatenating two or more codes. Convolutional coding rates of ½ can be punctured to achieve a rate of ¾. A combination of coding rate and modulation is used to adjust to varying channel conditions. Product encoding is used for frame control fields ensuring that all devices on the network can detect and decode this information. The tone map indicates the set of tones to be used for a particular communication between two stations. The tone map to be used is negotiated during channel adaptation. This is performed when a station first joins the network, periodically to ensure optimum throughput, or when the quality of the channel varies. Channel adaptation is also used to specify the modulation or coding schemes for the data. If significant fading occurs, specific tones can be dropped from the transmission. When an

acknowledgement is not received, the packets are resent. 3.5 HomePlug 1.0 standard In PLC environment OFDM with cyclic prefix (CP) was adopted by the HomePlug 1.0 PLC standard. Using OFDM has many benefits. It exhibits excellent mitigation of the effects of time dispersion, provides excellent Inter Channel Interference (ICI) performance, and is good at minimizing the effect of in-band narrowband interference. OFDM splits available bandwidth into many small frequency bands called subcarriers and the best coding methods can be applied to the usable subcarriers. This approach is used by HomePlug 1.0. The bandwidth in HomePlug 1.0 can vary from 1Mb/s to 14 Mb/s practically continuously according to the channel conditions. HomePlug 1.0 activates the nodes to perform channel estimation at least once every 5s. This allows the PLC network to maximize its data rate adaptively. Each data packet carries a series of OFDM symbols as shown in Fig 4. The packet consists of a start-offrame delimiter, the payload, and an end-of-frame delimiter. A response delimiter is transmitted to indicate whether or not the transmission was successfully received. A preamble and frame control form delimiters used for synchronization and control. The frame control of the start of frame, end of frame and response delimiters all include delimiter type and contention

26

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

control information. In the start of frame delimiter, the frame control field includes the tone map information needed by the receiver to decode the rest of the frame and a length field. The end of frame delimiter contains priority information used for contention control. Response delimiters contain information that allows a sender to verify that the response was indeed sent in response to the frame it just transmitted. An end of frame gap of 1.5μs is inserted between the frame check sequence and the end delimiter to allow for processing. The physical topological design of PLC network is derived in the next section.

links. Figure 6 shows a partially connected network with ten links using the same labeling scheme. 6

2

4 8

1 3

1

5

10

4

7

2

3

5

9

Fig 5 Figure 5 Fully connected network

4. Topological Design of PLC Topological design is formulated as optimization problem [4-7]. Simple Genetic Algorithm (GA) and Orthogonal Genetic Algorithm (OGA) are proposed for it. This paper selects the primary design of PLC network optimization problem is formulated as to choose a set of links from set of network nodes to minimize PLC network cost problem and implements GA and OGA. Orthogonal Genetic algorithm provides a better performance in sampling the genes from multiple parents. Comparing it with genetic algorithm, numbers of resultant strings are large with less iteration and time duration for result generation. As a result, OGA can search the solution space effectively and it is well suited for routing problem execution. In the implementation initially simple GA performance is considered. It covers encoding of the network, genetic operators and simple GA steps. Then it is followed by OGA concepts. 4.1 Simple Genetic Algorithm (GA) Performance This paper presents a GA with specialized encoding, initialization and local search operators to optimize the design of communication network topologies. The primary design problem is to connect the source node to the destination node with minimal cost constraints fitness function. To find an optimal point, we start with some randomly selected points in the solution space (population of solutions), evaluate the fitness of each point, perform some genetic operations (crossover, mutation) on the population, form a new population based on the fitness values of the individuals (reproduction) and proceed as such until the best solution (specified condition) is reached [3].

6

2

4 5

1 8

1 4

3

9

5

Fig66 Partially connected network Figure

Figure 5 network includes all possible links using the arbitrarily assigned labels designed as [1 2 3 4 5 6 7 8 9 10]. Figure 6 network contains five links using same labeling scheme [1 4 6 8 9] respectively. This network can be encoded as [1 0 0 1 0 1 0 1 1 0 1]. 4.1.2 GENETIC OPERATORS 4.1.2.1 Crossover Crossover is the randomized exchange of genetic material between strings with the possibility that good strings can produce better ones. This produces two new individuals. There are various crossover processes in use. The simplest being single point crossover is shown if Figure 7 and 8.

1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0

Figure Fig 7 7 Before Crossover The portions of the string beyond the crossover point are exchanged to form two new strings. The other types of crossover techniques are multi-point crossover, uniform partially mapping etc.,

4.1.1 Initialization of Population GA starts with a random population of individuals. To start with, the solution has to be coded into a fixed length binary string. There are a number of ways to implements the coding of solutions. Bit string encoding is the most classical approach used because of its simplicity and trace ability is explained below. For example, consider the two networks with six nodes and its links arbitrarily labeled with integers 110. Figure 5 shows fully connected network with 10

27

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Step4 : Calculate fitness and sort according to the fitness. g=g+1. Step5 : If g = gmax Stop, else select new generation go to step3. Consider the above example in figure 5 having 5 nodes with fully connected network links or edges of 10. Randomly generate 2 initial population parent strings for that network. Apply Simple GA crossover and mutation to generate first iteration new population string. Parent strings are t1 = 0 0 1 1 0 0 1 0 1 1 t2 = 1 0 1 1 1 0 1 0 0 1 Resultant first generation new population strings are O1= 1 0 1 1 1 0 0 0 1 1 O2 =1 0 0 1 0 1 0 1 1 1 It is same number as number of parent string. Similarly the same procedure is repeated in 4 times, because gmax = 4. At end, Simple GA generates 8 new population strings. O3 = 1 0 0 1 0 1 0 1 1 0 O4 = 1 1 0 0 0 1 1 0 1 1 O5 = 1 1 0 0 0 0 1 1 0 1 O6 = 1 0 1 1 1 0 0 0 0 1 O7 = 0 0 1 1 0 1 1 1 1 0 O8 = 1 0 0 1 1 0 0 1 0 1

1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 Figure Fig 88 After Crossover 4.1.2.2 Mutation Mutation is the random alteration of a gene in the chromosomal string. In binary coding this simply means changing a 1 to 0 and vice versa.

1 1 1 0 1 0 1 0 0 0 1 1 1

1 0 1 0 0 0 1 0 0 1 1 1 1 Fig 9 Mutation

Figure 9 Mutation

Figure 9 gives an illustration of how bit mutation is being performed on an individual. Bits 2, 5 & 10 have undergone single bit mutation. By itself mutation, may introduce unnecessary alterations in the search space thus randomizing the search totally. But when used sparingly with selection and crossover operators it is an insurance policy against premature loss of important solutions. Thus mutation is needed because even though reproduction and crossover effectively search and recombine existing solutions, occasionally they may become overzealous and lose some potentially useful genetic material (ones and zeros at particular locations). Mutation is used to maintain the diversity in the population. The probability of mutation is generally set to be very low when compared to the probability of crossover. 4.1.2.3 Significance of Pc and Pm The cross over and mutation operators are the sources of the explorations. In order to explore they must disturb some of the chromosome on which they operate. The higher the value of the Pc, the quicker are the new solutions introduced into the population. However as Pc increases, the solutions can be disrupted faster. Typical values of Pc range from 0.5 to 1. Similarly Pm also affects the quality of the population. Large values of Pm transform the GA into a purely random search algorithm, while some mutation is required to prevent the premature convergence of the GA to sub –optimal solutions. 4.1.3 Genetic Algorithm Steps Step1 : Randomly generate the initial population of parent string and estimate maximum number of generation gmax and let g=1. Step2 : Apply check-and repair algorithm to the parent string to check the two-connectivity. Step3 : To obtain new population apply crossover and mutation operation, choose GA operators Pc is maximum in the range of 0.5 to 1 and very low value of Pm .

Consider at the each iteration, Simple GA generates 2 new population strings same as number of parent strings. Similarly we can implement the same problem in OGA. 4.2 Orthogonal Genetic Algorithm (OGA) Performance OGA used for topological design problem is incorporate with ‘orthogonal array into the crossover operation’. Improved results, both in network performances and computation speeds can possible compare with existing approach. 4.2.1 orthogonal array crossover There is more number of possibilities to sample the parent strings for crossover. OGA produce an orthogonal array to perform a rational and representative sampling. Let Lm(nk) denote an orthogonal array , where ‘L’ denotes Latin square. Orthogonal array crossover operation can be defined as Lm(nk) , where n parents are divided into k factors, resulting m is the number of combination of levels to be tested and then select ‘j’ of them to be offspring strings. The details can be given as Inputs: n parents strings Outputs: m new generation strings Selected Outputs: j offspring strings Orthogonal design is incorporate into the crossover operation has a statistically sound method to sample the genes from multi parents for crossover. The resulting operation is called orthogonal crossover. For example, the orthogonal array L4(22) samples the genes from 2 parents for crossover has 2 factors. ie, we divide each parent into part and it generate 4 combination of output. Then choose GA operators Pc

28

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

number of generation gmax = 2 and cross over point (for OGA) k = 3. Randomly generation parent strings are: 1001001101 1001010100 Using Genetic Algorithm First generation new population strings and its fitness 1 0 1 1 1 0 1 1 0 1 : 263 1 0 0 1 1 1 0 1 1 1 : 266 Second generation new population strings and its fitness 0 1 0 1 0 1 0 0 1 1 : 187 0 1 0 1 1 0 0 1 1 1 : 318 From the two generation, GA generates only 4 new population strings. Minimum cost string is selected as best offstring. In Simple GA numbers of new generation strings are equal to numbers of parent strings. Using Orthogonal Genetic Algorithm First generation strings and its fitness 0 1 0 1 0 0 0 1 1 1 : 196 0 1 0 1 1 1 0 1 1 0 : 259 0 1 1 1 0 0 0 0 1 1 : 222 0 1 0 1 1 0 1 1 1 0 : 246 0 1 1 1 0 0 0 0 1 1 : 222 0 1 1 1 0 0 0 1 1 0 : 229 0 1 1 0 1 1 0 0 1 1 : 289 0 1 0 1 1 1 0 1 1 0 : 259

is maximum in the range of 0.5 to 1 and very low value of Pm for mutation for the resulting strings. By increasing the value of ‘n’ - parent and ‘k’ crossover point, the number of resultant combination strings also increased. 4.2.2 Orthogonal Genetic Algorithm Steps Step1 : Randomly and independently generate n parent strings. Step2 : Sample orthogonal array Lm(nk) generated from n parent strings using orthogonal array crossover. Step3 : Perform mutation with small probability in produced m binary output strings and execute the check-and-repair operation. Step4 : Evaluate the fitness for every string and sort. Remove the duplicate strings, and then select j of them to be offspring strings. Consider the same network having 5 nodes with fully connected 10 links. Randomly and independently generate 3 parent strings for the given network. Use the orthogonal array L9(32). (3 parent strings are divided into 2 parts, resulting 9 output strings). Let the parent strings be t1 = (0 0 0 0 1 1 1 1 0 1 ) t2 = (1 0 1 0 0 1 0 1 1 0 ) t3 = (1 0 1 1 1 1 0 0 1 0 )

In the first generation 6 best offstrings are selected. It can be act as parent strings to the next generation. In OGA, 6 parent strings will generate 256 new generation output string. Its orthogonal array is L256(63) for the same value Pc, Pm and k used in the first generation.

Using n-to-j orthogonal array crossover operation produce 9 strings based on orthogonal array L9(32) O1 = (0 1 0 0 1 1 1 1 0 1 ) O2 = (1 0 0 0 1 1 0 1 1 1 ) O3 = (0 0 0 0 1 1 0 0 1 1 ) O4 = (1 0 1 0 0 1 1 1 1 1 ) O5 = (1 0 1 0 0 1 0 1 1 1 ) O6 = (1 0 1 0 1 1 0 0 1 1 ) O7 = (1 0 1 1 1 1 1 1 0 1 ) O8 = (1 0 1 1 1 1 0 1 1 0 ) O9 = (1 0 1 1 1 1 0 0 1 1 )

Second generation new population strings: 0 1 1 1 0 0 0 1 1 1 : 258 0 1 0 1 0 1 0 0 1 1 : 218 0 1 1 1 0 0 0 1 1 0 : 229 0 1 1 1 1 0 1 1 1 0 : 308 0 1 1 1 0 0 1 1 1 1 : 303 0 1 0 1 0 0 0 0 1 1 : 222 0 1 1 1 0 1 0 1 1 0 : 287 0 1 1 1 1 1 1 1 1 0 : 366 1 1 0 1 0 0 1 1 1 1 : 273 0 1 1 1 0 0 0 0 1 1 : 222 0 1 0 1 0 1 0 1 1 0 : 225 0 1 1 1 1 0 1 1 1 0 : 278 1 1 0 1 0 0 0 1 1 1 : 228 1 1 1 1 0 0 0 1 1 1 : 290 0 1 1 1 0 0 1 1 1 1 : 303 0 1 1 1 1 1 0 1 1 1 : 350 0 1 0 1 0 1 0 0 1 1 : 166 0 1 1 1 1 0 0 0 1 1 : 204 0 1 1 1 0 1 0 0 1 1 : 228 0 1 0 1 1 0 1 0 1 1 : 187 0 1 0 1 0 1 0 1 1 0 : 225 0 1 0 1 1 1 0 1 1 1 : 263 0 1 1 1 1 1 0 1 1 0 : 271

Execute mutation, check and repair algorithm and evaluate the fitness function (minimum cost constraint) on the string and remove the duplicate strings. The resulting strings are considered as best output offspring. 4.3 Simulation Result For the simulation of GA and OGA, assume number of nodes, possible number of links with its cost, number of parent strings and the number of generations are given by the user. Parent strings are generated randomly by the program and execute the GA and OGA steps. Assume, first generation new population strings are the parent strings to the next generation. Consider a simple 5 plug node PLC network and maximum possible connections or links among them are 10. Randomly generated Pc = 0.8, Pm = 0.2,

29

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

0 1 0 0 0 0 0 1 1 0 : 151 1 1 1 1 0 0 0 1 1 0 : 261 0 1 0 1 0 0 0 1 1 0 : 167 . . . 0 1 1 1 0 1 0 0 1 1 : 280 0 1 1 1 0 1 1 1 1 0 : 334 1 1 0 1 0 0 1 1 1 0 : 244 1 1 0 1 0 0 1 1 1 1 : 273 Considering the PLC network results, in the first two generation simple GA produced only 4 new population strings. But OGA generates 256 combinations of output new population strings for the same selected values of Pc and Pm used in GA. To get the same performance result in GA, it required more number of iteration or generation. At that time OGA is the best choice to solve the problem. Based on the practical condition, by the selection of proper constrain formula it is possible to improve the performance of PLC.

[5]

[6]

[7]

[8]

[9]

5. Conclusion

[10]

In the new dimension to the potential applications of the electricity infrastructure network is Power Line Communication. History, limitation and process of PLC using OFDM are discussed in this paper. In addition with a simple topological design using OGA also derived for it. The use of OFDM modulation technique and OGA topological technique mitigated the limitations and improved the performances of PLC. This field is still in constitutes an open and attractive research area. Many studies are still necessary for the better understanding and improvement in the performance of power lines for high data rate noise free transmission. With recent developments in PLC networking technology has overcome almost all the hurdles in its way with the advantages such as easy of installation, cheaper cost and high data rates.

[11]

[12]

[13] [14] [15] [16]

REFERENCES: [1] J.A.C. Bingham “Multicarrier Modulation for Data Transmission: An Idea Whose Time Has Come,” IEEE Communications Magazine, pages 5–14, May 1990. [2] R. Fischer and J. Huber “On the equivalence of single- and Multicarrier modulation: A new view,” In Proc. of IEEE Int. Symp. On Inf. Theory (ISIT), page 197, Ulm, June/July 1997. [3] L. J. Cimini, Jr., “Analysis and simulation of a digital mobile channel using orthogonal frequency division multiplexing,” IEEE Trans. Commun., vol. COM-33, pp. 665–675, July 1985. [4] Berna Dengiz , Fulya Altiparmak and Alice E. Smith, “Local search genetic algorithm for optimal design of reliable networks,” IEEE Trans., Evolutioary Computation., vol., 1 no., 3 Sep 1997.

30

Qingfu Zhang and Yiu-Wing Leung, “An orthogonal Gentic Algorithm for Multimedia multicast routing,” IEEE Trans., Evolutioary Computation., vol., 3 no., 1 April 1999. K. F. Man, K. S. Tang, and S. Kwong , “Genetic algorithms: Concepts and applications.” IEEE Trans. Ind Electron., vol. 43, pp. 519-534, oct. 1996. David E Goldberg, “Gentic Algorithms in search optimization and machine learning,” International Student Edition, Addition Werley Limited, 1999. Niovi Pavlidou, A.J. HanVinck, Javad Yazdani and Bahram Honary, “Power line Communications: State of the Art and Future trends” IEEE Commun., Magazine, pp34-40, Apr 2003. Sobia Baig and D.Gohar, “A disctete multitone transceiver at the heart of the PHY layer of an In-home Power line communication Local area network” IEEE Commun., Magazine, pp48-53, Apr 2003. Yu-Ju Lin, Haniph A.Latchman and Richard E. Newman, “A comparative Performance study of Wireless and Power line networks” IEEE Commun., Magazine, pp54-63, Apr 2003. Ezio Biglieri and Politecnico di Torino, “Coding and Modulation for a Horrible channel” IEEE Commun., Magazine, pp92-98, May 2003. Matthias Gotz, Manuel Rapp and Klaus Dostert, “Power line channel characteristics and their effect on communication system design” IEEE Commun., Magazine, pp78-85, Apr 2004. IEEE802.11Tutorials,http://www.palowireless.c om/i802.11/tutorials.asp www.homeplug.org www.netgear.com www.homecna.org

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

P.Malathi received her M.E Degree in Applied Electronics from Coimbatore Institute of Technology, Coimbatore in 2001. She is doing her Ph.D work at PSG College of Technology, Coimbatore. She is an Assistant Professor in Electronics and Communication Engineering department with 10 years of teaching experience at Sri Ramakrishna Institute of Technology, Coimbatore. She is a member of ISTE and IETE. Her areas of interest are OFDM, MIMO, WLAN, PLC and Wireless Mobile communication.

Dr.P.T.Vanathi received B.E Degree in Electronics and Communication Engineering from PSG College of Technology, Coimbatore in 1985 and M.E Degree in Applied Electronics from the same institution in 1991. She has completed her Ph.D in Signal Processing. She is a Professor in Electronics and Communication Engineering department with 20 years of teaching experience at PSG College of Technology, Coimbatore. She is a member of ISTE and IETE. Her areas of interest are Speech recognition, Network security, Wireless Mobile Communication and Signal Processing.

31

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

32

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Autonomous Music Composition Relying on Evolutionary Formal Grammar Yaser M.A. Khalifa, Badar K Khan, .Jasmin Begovic, Airrion Wisdom, Andrew M. Wheeler1 Electrical and Computer Engineering Department, 1 Computer Science Department, State University of New York New Paltz, NY 12561 USA [email protected] http://www.engr.newpaltz.edu/~khalify/ A number of evolutionary based algorithms have recently been documented in literature. A number systems in which a population of musical agents has been reduced to its bare bones, or rather “genes”: each individual is simply a musical phrase or passage, mapped more or less directly from the individual’s genetic representation, or genotypes. These genotypes are in turn used in an artificial evolutionary system that reproduces modified (mutated and shuffled) versions of the musical passages in the population's next generation, according to how “fit” each particular individual is. Fitness can be determined either by a human listener, as in the Vox Populi system [2], or by an artificial critic, as in Spector and Alpern’s [3] use of a hybrid rule-based and neural network critic to assess evolving jazz responses. Whereas in the former higher fitness are assigned to solos that sound better, in the latter assigns higher fitness to responses that more closely match learned examples or rules. In [4], Gartland-Johnes and Colpey provide an excellent review of the application of Genetic Algorithms in musical composition. However, as stated in [5], most evolutionary composition systems listed in literature need a tutor, or a human evaluator in an interactive GA environment. The development of autonomous unsupervised music composers that possess automatic fitness assessment is still limited. Furthermore, the concept of composing music based on a library of motives is, however, near or perhaps slightly beyond the frontier of current capabilities of artificial Intelligence (AI) technology. Thus, this area of research spearheads a new direction in automated composition. For that, designers of evolutionary music requires new techniques that focus on creating classes of musical potential, as opposed to existing techniques that describe predicted linear outcomes. That should lead to an examination of the dynamic interaction between aspects of musical system. The work investigated in this paper is an attempt in that direction. Miranda, in [5] discusses different approaches to using evolutionary computation in music. However, most systems listed in literature e.g. [6–10] need a tutor, or an external evaluator. In [6] Both David Cope and

Abstract In this paper, an autonomous music composition tool is developed using Genetic Algorithms. The production is enhanced by integrating formal grammar rules. A formal grammar is a collection of either or both descriptive or prescriptive rules for analyzing or generating sequences of symbols. In music, these symbols are musical parameters such as notes and their attributes. The composition is conducted in two Stages. The first Stage generates and identifies musically sound patterns (motifs). In the second Stage, methods to combine different generated motifs and their transpositions are applied. These combinations are evaluated and as a result, musically fit phrases are generated. Four musical phrases are generated at the end of each program run. The generated music pieces will be translated into Guido Music Notation (GMN) and have alternate representation in Musical Instrument Digital Interface (MIDI). The Autonomous Evolutionary Music Composer (AEMC) was able to create interesting pieces of music that were both innovative and musically sound. Keywords: Music, Formal Grammar, Genetic Algorithms

1. Introduction Human intelligence has always been inspirational for engineers and scientists to build machines and devices that could acquire or mimic that intelligence. However, it has-been and still-is a major challenge to define that intelligence. Since creativity can be contrasted with intelligence, some researchers have started viewing creative activities, such as music and painting, as tangible intelligence. What makes creativity even more attractive to computer engineers and scientists is that a creative activity does involve very regular, cognitive processes. "According to the model, creative activity is the process of generating, refining, and then regenerating mental representations in service of task demands and goals" [1]. This later definition coincides perfectly with evolutionary algorithms processes.

33

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Robert Rowe designed systems that created music by analysis of other music. While Cope's system took input from classical compositions, Rowe looked at live input from a performer. Rowe drew a distinction between transformative and generative music composition. While his ``Cypher'' system contained elements of both, it was primarily a transformative one -- listening to the input from the user, pushing the input through a series of transformations, and then outputting something derivative, although not necessarily reminiscent. Biles and colleagues have used a neural network critic with the GenJam system [7], and to unclog the fitness bottleneck caused by presenting a user with too many musical examples to evaluate, these researchers hoped a neural network critic could at least filter out measures that were clearly unmusical before they reached the user. Results reported were not encouraging since population quickly finds a loophole in the fitness function and presents cheating solutions that will have such a fitness advantage over other members of the population that they will rapidly take over, killing off any other alternative approaches. This is not such a problem with human critics (as noted by Biles et. Al. in [7]), because their selection criteria can change over time to search for new aspects in creators and thus avoid stagnation. Gartland-Johnes and Colpey in [4] distinct between two important objectives of search algorithms; exploration and optimization. Search algorithms, such as Genetic and Evolutionary algorithms, in creative applications definitely serve the formal objective. The work presented in this paper is an attempt in that direction. It presents an autonomous music composition system. The system composes musical pieces based on a library of evolving motifs. The critique of the generated pieces is based on three evaluation functions: intervals, ratios, and formal grammars that each describes an aspect of the musical notes and/or system as explained in the following sections.

interval from 2000 Hz to 4000 Hz.” In music we refer to the interval between two consecutive notes as a half step, with two consecutive half steps becoming a whole step. This convention is the building block of our major scale. A scale is a set of musical notes that provides the blueprint of our musical piece. Because our starting point is the musical note C, this major scale will be entitled as such. The major scale consists of a specific sequence of whole steps of and half steps, that being W W H W W W H, where W is a whole step and H is a half step. A typical musical convention is to number the different notes of the scale corresponding to their sequential order, usually called roots. Using the sequence of the major scale, our C major scale consists of the notes C D E F G A B, returning to note C completing what is known as an octave, or a consecutive sequence of 8 major scale notes. Numeric values are now assigned where C corresponds to value 1, D would be 2, E being 3 and so on. The next C in terms of octaves would restart the count therefore the last value or root would be 7 corresponding to note B. We build on these scales by combining selected roots simultaneously to form what are known as chords. Chords can be any collection of notes, this leads to almost endless possibilities in music, however for our purposes we implement the C major chord and use its sequence of notes. A major chord consists of the 1st, 3rd, and 5th root of the major scale, this would mean that we utilize notes C E and G.

3. Genetic Algorithm Implementation GA are a stochastic combinatorial optimization technique [11]. It is based on the evolutionary improvement in a population using selection and reproduction, based on fitness that is found in nature. The GA operates on a population of chromosomes, where each chromosome consists of a number of genes, and each gene represents one of the parameters to be optimized. The composition of music is performed in two Stages. In Stage I, a set of motifs is generated. In Stage II, motifs and their transpositions are combined to form two music phrases, A and B. At the end of Stage II, phrase A# is generated by sharing each note of the phrase. At the end, a combination of ABA#A is produced, which is one of the common combinations in music composition theory, Fig. 1. The pieces produced are evaluated musically by subjecting them to musically defined rules such as intervals between consecutive notes and chords formations that are applied in Stage I. In Stage II, intervals as well as percentage of notes that belong to the required key, Ratios, are applied. These evaluation rules in described in details in sections five and seven.

2. Music Background In this section, some basic fundamentals of music composition are given. Because the piano has a good visual explanation of music, it will be used for illustration, however these concepts can be transposed to any musical instrument including the human voice. We begin by analyzing the most basic set of notes called the C major scale, which consists entirely of all the white notes. We will dissect what major scales are, how they are composed and further our discussion to how they form what are called chords, or simultaneously depressed single notes. Music regardless of the instrument has a maximum 12 different distinct pitches or tones which are called keys. A pitch is simply a frequency of sound; within these pitches a multitude of combinations can be formed to produce “music”. There is an interval that exists between to consecutive pitches, the term musical interval refers to a step up or down in musical pitch. This is determined by the ratios of the frequencies involved. “…an octave is a music interval defined by the ratio 2:1 regardless of the starting frequency. From 100 Hz to 200 Hz is an octave, as is the

4. Stage I In Stage I, motifs are generated. A table of the 16 best motifs is constructed that is used in Stage II. These motifs will be used both in their current, and transposed locations to generate musical phrases in Stage II. Fig .2 shows the chromosome structure in Stage I. Each chromosome will contain 16 genes, allowing a maximum

34

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

one, two, four, six, or eight notes. However, single note motifs are highly discouraged.

of 16 notes per motif. Each motif is limited to a fourquarter-note duration.

5. Stage I Evaluation Functions Start

5.1 Formal Grammar Evaluation Function As previously mentioned the C major chord consists of the 1st 3rd and 5th root of the scale. This will correspond to values 1, 5 and 8. We can also do an inversion of the major chord by using the same notes C E G, this time however starting at note E leaving the inversion to be E G C. If we consider the next octave up and assign the value 13 to the repeating C, the inversion E G C will correspond to values 5, 8, and 13. These two versions of the major chords give us two production rules [12] of which we are assured will be musically pleasing. The production rules will take the difference of the values assigning a good fitness if the production rule is met. Our first production rule will be the difference or skip of 4 and 3 (5 - 1 = 4 and 8 - 5 = 3), describing our first version of the major chord C E G. The second rule will be the difference or skip of 3 and 5 (8 – 5 = 3 and 13 – 8 = 5), describing the inversion of the major chord E G C. Our formal grammar can be extended from the ability to check for tonality to the ability to encourage certain fundamentals of music theory. One of the most common and important rules in music theory is the notion of the chord progression. A chord progression is simply a series of chords that are played in a particular order. The various combinations of these progressions are the basis for music we hear today. The most frequently used progressions rely on the first, fourth, and fifth degrees of the major scale. Scale degrees, are the usual nomenclature practiced when relating the name of a note with its corresponding order in which it falls on the diatonic scale. For example the diatonic major scale of C, would begin at C continuing to D, E, F G, A, and B. The scale degree of C would be the 1st, D would be the 2nd, C the 3rd, and so on. These degrees represent only a root tone; subsequent chords would be used in conjunction with that root note and other notes derived from that root to form a full musical chord. Again, we will only utilize the root and not the corresponding chord. One of the most common progressions, primarily used in Jazz, is the II-V-I. Observing the diatonic scale of C major we see that if we start at the II, which is note D, and descend in fifths we will end at G, which is the V, and continuing in fifths we end at C which is the I. This pattern in music theory is known as the circle of fifths, which describes the relationships among the 12 chromatically distinct keys of music. Another popular progression used in music is the VII-IIIVI, again following the same pattern as the previously mentioned progression, which descends in fifths. In this particular progression we notice that if we end on the VI we can then move to the II if we descend following the circle of fifths theory. The II will then be able transition to the V and finally resolve at I. We now have formed generally pleasing “music” by combining the 2 progressions, namely VII-III-VI-II-V-I. This represents a pattern which can be used in producing new production rules.

Stage I Generate a Table of Motives (TOM) (Intervals & Formal Grammar Rules)

Stage II Use TOM to Generate Phrases A & B (Ratios and Intervals Rules)

Output AA#BA#

End Fig. 1. Flow chart of the Two-stage System

Fig .2. Chromosome and Gene Structure for Stage I

Fig. 3. Motif Look-up Table Generated in Stage I

At the end of Stage I, a table of the top 16 motifs is constructed (Fig. 3). Each row in this look-up table represents a motif. The columns represent the different notes in the motif. Although all motifs generated are one whole note in duration, they could be composed of either

35

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Dissecting the above pattern we notice that each time we descend from a root we subtract 4 diatonic tones, and when we ascend from a root we add 3 diatonic tones. We can apply this 3-4 coupling technique to all roots within the same musical key and find that we will have musically fit pieces. Since we have chosen the key of C, our production rules are simplified due to the lack of sharps and/or flats in diatonic C major. A formal definition of the grammar we chose follows: We define a Context Free Grammar (CFG) thusly: G = {N, Ȉ, P, S} where N is the set of non-terminal symbols our grammar accepts, Ȉ is the set of terminal symbols our grammar accepts, P is a list of production rules in Chomsky Normal Form (CNF), and S is an element of N that represents the start production. The contents of these sets are: N: {S, A, B, C, D, E, F, G} Ȉ: {a, b, c, d, e, f, g, İ}, where İ is the empty string

Certain resolutions between notes are pleasant to hear, but are not necessary for a “good” melody. These resolutions therefore receive a bonus. Dealing with steps in the chromatic scale, we can define these bonus resolutions as the 12-to-13 and the 6-to-5 resolutions. The 12-to-13 is a much stronger resolution, and therefore receives a larger weight. It was experimentally suggested that the 12-to-13 resolution have double the bonus of the 6-to-5 one, and that the bonus does not exceed 10% of the total fitness. Thus the bonuses are calculated by dividing the number of occurrences of each of the two bonus resolutions by the number of allowed resolutions (15 resolutions among 16 different possible note selections), see equations (1) and (2).

P: { S o beaA | cfbB | dgcC | eadD | fbeE | gcfF | adgG A o cfbB | dgcC | eadD | fbeE | gcfF | adgG B o beaA | dgcC | eadD | fbeE | gcfF | adgG C o beaA | cfbB | eadD | fbeE | gcfF | adgG | İ D o beaA | cfbB | dgcC | fbeE | gcfF | adgG E o beaA | cfbB | dgcC | eadD | gcfF | adgG F o beaA | cfbB | dgcC | eadD | fbeE | adgG G o beaA | cfbB | dgcC | eadD | fbeE | gcfF }

The total interval fitness:

12-to-13 bonus = (#occurances/15) * 0.34

(1)

6-to-5 bonus = (#occurances/15) * 0.34

(2)

Interval Fitness =

1 total _ error(1  total _ bonus)

(3)

6. Stage II In Stage II, motifs from the look-up table constructed in Stage I are combined to form two phrases, A and B. Each phrase is eight measures, and each measure is a four quarter-note duration motif, Fig 4.

This CFG allows for any number of three note tuples, with no particular note tuple repeating. For example, beabea would be rejected, but beafbebea would be accepted. Every three note tuple follows the same rule: the root note, a note three tones up in the diatonic C scale, and a final note four tones down from the previous note in the diatonic C scale. A given motif will be evaluated note by note according to this grammar, and any motif that cannot be expressed with our CFG will be rejected and given a low fitness value for the next generation, in order to encourage these fundamental progressions in our sound.

Fig. 4. Chromosome Structure for Stage II

7. Stage II Evaluation Functions In Stage II, two evaluation functions are implemented: intervals, and ratio. The intervals evaluation function described in the previous section is used to evaluate interval relationships between connecting notes among motifs, i.e. between the last note in a motif and the first note in the following motif. The same rules, as described above in Stage I, are used in Stage II. The Rations evaluation function is described in the following section.

5.2 Intervals Evaluation Function Within a melody line there are acceptable and unacceptable jumps between notes. Any jump between two successive notes can be measured as a positive or negative slope. Certain slopes are acceptable, while others are not. The following types of slopes are adopted: Step: a difference of 1 or 2 half steps. This is an acceptable transition. Skip: a difference of 3 or 4 half steps. This is an acceptable transition. Acceptable Leap: a difference of 5, 6, or 7 half steps. This transition must be resolved properly with a third note, i.e. the third note is a step or a skip from the second note. Unacceptable Leap: a difference greater than 7 half steps. This is unacceptable. As observed from the information above, leaps can be unacceptable in music theory. We model this in GA using penalties within the interval fitness function.

7.1. Ratios Evaluation Function The basic idea for the ratios section of the fitness function is that a good melody contains a specific ideal ratio of notes, and any deviation from that ideal results in a penalty. There are three categories of notes; the Tonal Centers that make up the chords within a key, the Color Notes which are the remaining notes within a key, and Chromatic Notes which are all notes outside a key. Each type of note is given a different weight based on how much a deviation in that portion of the ratio would affect sound quality. The ideal ratios sought were: Tonal Centers make up 60% of the melody; Color Notes make up 35% of the melody; and Chromatic Notes make up 5% of the melody. Although these ratios choices could be quite controversial, they are a starting point. Ongoing research is looking into making these ratios editable by the user, or music style dependent.

36

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

8. Results The four motifs in Fig 5 all resulted from a single running of the program. They were handpicked from the final 16 motifs selected by the program as the most fit. It can be observed that each motif has an identical rhythm consisting of four eighth-notes, one quarter-note, and two more eighth notes. Summing the durations of the notes yields the correct four quarter-note duration indicated by the time signature §¨ 4 ·¸ at the beginning of each motif. ¨4¸ © ¹

Using the intervals evaluation algorithm as a reference, we can see why these motifs were chosen to be the elite of the population. Examining motif a, the first three notes are all F#’s, indicating that no penalty will be assigned (a step size of 0). The next note is a G# (2 halfsteps away from F#). This transition is classified as a step and no penalty is assigned. The following notes are F#, G#, and E (a difference of 2, 2, and 3 half-steps, respectively). These transitions are also acceptable; therefore the intervals evaluation function would not assign any penalty to the motif. When zero error is assigned to a motif, a high fitness value will result. Similar analysis of motifs b, c, and d yield the same result. So what is the musical difference between the motifs? Since the notes in each motif are slightly different, the musical ‘feel’ of each motif will vary. Compare motifs a and d for example. Motif a contains four F#’s. They are arranged in such a way that the first beat and a half of the measure are all F#’s, and also the 3rd downbeat (the quarter-note). This repeatedly drives the sound of the F# into the listener, resulting in an unconscious comparison of this note to every other note in the measure. This in turn will make dissonant notes sound more dissonant, and resolving notes sound more resolved. In the case of motif d, the F#’s are arranged in a manner that accents the steady background rhythm of the measure (the repetitive rhythm that your foot taps to when you listen to music). This does not accent the sound of the F# as much, but rather accents the other rhythms of the measure that occur between the F#’s. A more ‘primal’ feel will result, as opposed to the more ‘melodic’ feel of motif a. For the Formal Grammar evaluation function, the main musical objective is to implement the 3-4 coupling By analyzing the sequence of notes in the musical piece generated in Figure 6, it is seen that a direct correlation to our Formal Grammar production rule one. The skip from the B to D is a skip of 3 and C to E is a skip of 4 which meets our first production rule. We do see a skip of 2 that being D to C, a skip of 0 in C to C, and a skip of 1 C to B, but we must consider that formal grammar is not our only fitness criteria in the autonomous music composer.rule as previously explained in the musical theory.

Fig. 5 Sample Motif Generated in Stage I of the Evolutionary Music Composer

A second example is shown in Figure 6, where the piece incorporates almost all the rules and musical parameters that the program has set, however let us focus on how the 3-4 coupling rule is represented. Taking a look at Figure 7 at the end of the second measure, we notice a 16th note E. We know that on the C major scale, speaking numerically, E would be represented by a 3. This would mean that to move 3 major tones up would leave us at the 6 which is B. From B in accordance with the 3-4 coupling rule, we should then descend 4 major tones, completing the rule at the 2 or note D. We see a direct implementation of this sequence twice in the entire piece. The third example is in Figure 8 and is seen at the end of the second to last measure, where the sequence is characterized by the same exact notes as explained in the first instance of the 3-4 coupling rule.

37

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

project, methods that use weighted combinations of different fitness functions, or composition rules, will be explored.

10. Acknowledgements Funding for this work is provided by the Research & Creative Projects Award and the CSTEP Summer Research Awards for Dr Khalifa from SUNY New Paltz.

11. References [1] Fig .6. Sample Motifs Generated in Stage I of the Evolutionary Music Composer [2] B

D

[3] E

[4]

[5]

Fig. 7. Sample motifs generated in Stage II of the Evolutionary Music Composer

[6] B D [7]

E

[8]

Fig. 8. Sample motifs generated in Stage II of the Evolutionary Music Composer

[9]

9. Discussion and Future Work New techniques in evaluating combinations of motives are needed. The evaluation of motive combination should take into consideration the overall musical piece rather than the note transition resolutions of the first and last notes in the motif only. One approach that will be further investigated is the application of formal grammars. In a multi-objective optimization problem such as music composition, different evaluation functions are applied and contribute to the fitness measure of a generated piece. The main functions that have been implemented are intervals, and ratios. They have been equally considered in evaluating the evolutionary generated music so far. Different weighing methods for various evaluation functions is expected to effect the quality of the resulting music. These could also be affected by types of music sought, e.g. classical, Jazz, Blues, etc. In Stage II of the

[10]

[11]

[12]

38

Balaban, M., Ebcioglu, K . and O. Laske (eds.) (1992). Understanding Music with AI: Perspectives on Music Cognition. Cambridge, Mass.: MIT Press. Moroni, A., Manzolli, J., van Zuben, F. and Godwin, R. (1990). Vox Populi: An interactive evolutionary system for algorithmic music composition. Leonardo Music Journal, 10, 49-54. Spector, L., and Alpern, A. (1995). Induction and recapitulation of deep musical structure. Working Notes of the IJCAI-95 Workshop on Artificial Intelligence and Music (pp. 41-48). Gartland-Jones, A. Copley, P.: What Aspects of Musical Creativity are Sympathetic to Evolutionary Modeling, Contemporary Music Review Special Issue: Evolutionary Models of Music, Vol. 22, No. 3, 2003, pages 43-55. Miranda, E.R.: At the Crossroads of Evolutionary Computation and Music: Self-Programming Synthesizers, Swarm Orchestra and Origins of Melody, Evolutionary Computation, Vol. 12, No. 2, 2004, pp. 137-158. Rowe, R.: Interactive Music Systems: Machine Listening and Composing. Cambridge: MIT Press, 1993. Biles, J.A., Anderson, P.G., & Loggi, L.W. (1996) Neural network fitness functions for a musical GA. In Proceedings of the International ICSC Symposium on Intelligent Industrial Automation (IIA'96) and Soft Computing (SOCO'96) (pp. B39B44). Reading, UK: ICSC Academic Press. Khalifa, Y.M.A., Shi, H., Abreu, G., Bonny, S., and Ziender, J.: “Autonomous Evolutionary Music Composer”, presented at the EvoMUSART 2005, held in Lausanne, March 2005. Horowitz, D.: Generating Rhythems with Genetic Algorithms. Proc. of the 12th National Conference on Artificial Intelligence, AAAI Press, 1994. Pazos, A., and Del Riego, A.: Genetic Music Compositor. Proc. of the Congress of Evolutionary Computation, Vol. 2, 1999. Goldberg D.E. Genetic Algorithms in Search, Optimization and Machine Learning, AddisonWesley, Reading MA USA, 1989.Marques, M., Oliveira, V., Vieira, S. and Rosa A.C.: Music Composition Using Genetic Evolutionary Algorithms, Proc. of the Congress of Evolutionary Computation, Vol. 1, 2000. Levine, R.: Formal Grammar: Theory and Implementation, Oxford University Press, 1992.

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Yaser M.A. Khalifa received his BSc degree from Alexandria University, Egypt, and his PhD from Cardiff University of Wales, UK, in 1992 and 1997 respectively. He is currently with the Dept. of Electrical and Computer Engineering at the State University of New York (SUNY) at New Paltz, USA.

Badar Khan, Jasmin Begovic, and Airrion Wisdom are currently computer engineering seniors at the Department of Electrical and Computer Engineering at the State University of New York at New Paltz, New York, USA. Andrew Wheeler received his BS in Computer Science from the Computer Science Department at The State University of New York at New Paltz in 2007. He is currently pursuing his MS degree at the same department.

39

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

40

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Automation of the Arabic Sign Language Recognition using the PowerGlove M. Mohandes, S. Buraiky Electrical Engineering Dept. King Fahd University of Petroleum and Minerals KFUPM 1885, Dhahran, 31261, Saudi Arabia [email protected] http://faculty.kfupm.edu.sa/ee/mohandes/ Dictionary, only numbers and letters (finger spelling) were standardized among the users of the Arabic sign language. Moreover, differences in signs might be found among signers in the same country and sometimes even among signers in neighboring cities. This is because signs are mostly created by the hearing-impaired individuals themselves and are highly influenced by the local environment. An example of this trend is referring to the white color by pointing to one’s chest in the Gulf area, which originates from the fact that most males wear a white dress. This dress is not shared by all Arab sign language users. To help the unification of the Arabic sign language, this work adopted signs from the Unified Arabic Sign Language Dictionary. Many difficulties are encountered in designing a pattern recognition system for sign-language interpretation. One difficulty is that use of traditional programming paradigms makes the system overwhelmingly complex and hence impractical. This dictates resorting to machinelearning methods. Another difficulty encountered is the interface issue. Ideally, the interface should deliver accurate measurements to the processing machine, have low cost, and provide input in a form that requires low pre-processing overhead. Building a system that satisfies these three requirements is not easy. Hence, design compromises must be done to build a practical system. Interfaces in sign language systems can be categorized as direct-device or vision-based. The direct-device approach uses measurement devices that are in direct contact with the hand such as instrumented gloves, flexion sensors, styli and position-tracking devices. On the other hand, the vision-based approach captures the movement of the singer's hand using a camera that is sometimes aided by making the signer wear a glove that has painted areas indicating the positions of the fingers or knuckles. The main advantage of vision-based systems is that the user isn't encumbered by any complex devices. Their main disadvantage, however, is that they require a large amount of computation just to extract the hand position before performing any analysis on the images. In this paper we will discuss only the direct-devise methods. Systems based on the direct-device approach typically use instrumented gloves that could be enhanced by other

Abstract A sign language maps letters, words, and expressions of a certain language to a set of hand gestures enabling an individual to communicate by using hands and gestures rather than by speaking. Systems capable of recognizing sign-language symbols can be used as a means of communication with hard of hearing people. In addition, virtual reality systems can largely benefit from advances in sign language recognition. Several systems have been developed to recognize other sign languages. However, the Arabic sign language did not receive such attention. This paper introduces a system to recognize isolated signs from the Arabic sign language using an instrumented glove and a machine learning method. Signs from different aspects of life are chosen from the Unified Arabic Sign Language Dictionary that is adopted by all Arab countries. The results obtained are promising even though a simple glove with limited sensors was utilized. Keywords: Hard of hearing people, Arabic Sign Language, Support vector machine, instrumented glove, PowerGlove, Human-machine interaction.

1. Introduction Automated recognition of sign language is important in a world that is showing a continuously increasing interest in removing barriers faced by physically challenged individuals in communicating and contributing to the society and the workforce. Sign languages primarily consist of hand gestures performed by the hearingimpaired as a means of communication. Automated sign language recognition systems can greatly facilitate the communication between the vocal and the non-vocal communities as they can be used to translate signs into spoken words. For the hearing-impaired, such systems can serve as the equivalent of speech-recognition systems used by speaking people to interact with machines in a more natural way. Compared to other sign languages, not much has been done in the automation of the Arabic sign language, except few individual attempts [1, 2]. In fact, until the recent publication of the Unified Arabic Sign Language

41

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

devices [3, 4]. The first widely known instrumented glove, the Digital Data Entry Glove, was originally proposed as an alternative input device to the keyboard and worked by generating ASCII characters according to finger positions. The gloves had finger flex sensors, tactile sensors at their tips, orientation sensors and wristpositioning sensors. The VPL DataGlove used novel optical flex sensors that had fiber optic cables with a light at one end and a photodiode at another. A simplified version of the latter, the Z-glove, used the fiber optic devices to measure the angles of each of the first two knuckles of the fingers and was usually combined with a Polhemus tracking device. The Z-glove was the first commercially available instrumented glove. The Exon Dextrous Hand Master was developed afterwards with 8 bits of accuracy, 20 degrees of freedom and a measurement frequency of 200 Hz [5]. The CyberGlove was designed specifically for the Talking Glove Project and was patented in 1991. The PowerGlove is a less accurate but a highly cost effective alternative to other instrumented gloves [5, 6]. It is based on VPL's glove and only measures the position in the three dimensional Cartesian space and the roll while other gloves measure the pitch and yaw as well. In addition to its relatively low price, the PowerGlove can be easily connected to an RS232 serial port by using an interface box. This paper proposes a system for recognizing Arabic sign language using the PowerGlove as an interface and the support vector machine algorithm as a learning tool. The support vector machine algorithm has many advantages in terms of elegant simplicity, accuracy, ease of implementation and operational robustness. This may be added to a system that translates speech to sign language to obtain two-way communication system with hard of hearing people [7]; The remainder of the paper is organized as follows: Section (2) focuses on the proposed system architecture, Section (3) introduces support vector machine, while Section (4) discusses data collection and processing. Section (5) describes system performance while Section (6) includes the conclusion and future work.

signals to ultrasonic receivers on an L-shaped bar that is normally put on the PC’s monitor. The finger flex measurements are obtained using resistive ink flex sensors embedded in the glove fingers. There exists more than one option for interfacing the PowerGlove to the processing machine’s serial interface. The interfacing option used for this paper is the PowerGlove Serial Interface (PGSI) which is manufactured by the Students Chapter of the Association for Computing Machinery at the University of Illinois, the Urbana-Champaign Campus [8]. Measurement frames (packets) are sent by the glove every 44 milliseconds on average. Each frame contains eight measured values: the three-dimensional coordinates of the hand position, the roll of the hand and the flex of each finger except the little. The raw measurements are sent to the PGSI, which converts them to a format suitable for standard serial port communication. Features are then extracted by the computing machine from raw data frames received by the serial port and then used as an input to the learning algorithm. The output of the recognition algorithm is used to generate the corresponding word through the speakers.

2. System Architecture

3. An Introduction to Support Vector Machine

Figure.1: The PowerGlove with its accessories

Functionally, the proposed system consists of an input device, a computing machine that performs data acquisition and processing, the recognition algorithm, and a sound generator. The input device used for this work is the PowerGlove, which is a low cost instrumented glove originally designed by the Mattel company to be used as a controller for Nintendo gaming machines. It was chosen for its low cost and availability. The PowerGlove has been used for the recognition of the Australian sign language [6]. The PowerGloves with its accessories is shown in Figure.1. The glove measures the three-dimensional position of the hand, the configuration of four fingers (thumb, index, middle and ring) and the roll of the hand. Each of the x, y and z values has a resolution of 8 bits, the flex of each finger has a resolution of two bits (four possible values), while roll is measured in 30 degrees increments (12 possible values). The roll and the three dimensional position of the hand are measured by ultrasonic tracking. The glove is equipped with ultrasonic trackers sending

The support vector machine algorithm, in its simplest form, is based on constructing a hyperplane that separates two linearly separable classes with the maximum margin [9] as shown in Figure 2. Assuming that there is a set of vectors x, each having a label y and that the separating hyper plane is w.x  b 0 where w is a weight vector and b is a constant. It can be shown that the decision function (hypothesis), which is based on the optimal hyperplane, takes the form:

f ( x)

l

¦D i yi x i x  b

(1)

i 1

provided that the coefficients ai maximize the following function:

42

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

l

LD

¦a

i

i 1



1 l ¦ y i y j D iD j x i x j 2 i, j

Solving for support vectors (optimizing the dual function) is a quadratic convex programming problem, for which many numerical solution algorithms exist [9, 10]. Figure 3 shows the structure of the SVM classifier. The above formulations handle cases where only two classes exist. This can be extended to the classification of n classes by one of the following methods : 1. Build n classifiers, each capable of separating patterns belonging to one class from all other patterns. 2. Build the n-class classifier by feeding input to each of the two-class classifiers and choosing the class corresponding to the maximum of f k ( x), k 1,2,...., n (6)

(2)

where L D is called the dual Lagrangian function and is obtained by deriving the dual of the optimization problem formulated to maximize the classification margin. A support vector machine for separating non-linearly separable data can be built by first using a non-linear mapping that transforms data from the input space to the feature space, and then using a linear machine to separates them in the feature space. Mapping to the feature space can be performed by replacing the dot products with a kernel function K ( x, z ) I ( x).I ( z ) (where I : X o F is a non-linear mapping from input space X to feature space F). A number of different kernel functions can be found in the literature. The kernel function used in this paper is the Gaussian Radial Basis Kernel defined as

K ( x, y )

e  x  y / 2V 2 2

The multi-class problem can be solved in a direct manner as well as by generalizing the procedure used for the twoclass case [10, 11]. More details about the support vector machine algorithm can be found in [9, 10].

(3)

By replacing the dot product with the kernel function the decision function (the hypothesis) becomes: l

f ( x)

¦ D y K ( x .x )  b i

i

(4)

i

i 1

Additionally, in feature space some slackness can be introduced in the classification support vector machine developed above so that some error is tolerated. This is done by adding slack variables (representing violations of the margin constraints) to the cost function. With this modification the optimization problem becomes:

w.x  C ¦] l

Minimize

i 1

Figure 3. The support vector machine structure

2

(5)

i

4. Data Collection and Processing

y i ( wi .xi )  b t 1  9 i , i 1,2,...l where 9 i , i 1,2,...l are slack variables and C is a

To perform a sign, the hearing-impaired individual is seated in front of the computing machine’s display with his hand resting on the table. He presses a button indicating the start of the sign and that the current position is the point of origin. After performing the sign, the signer presses another button to indicate the end of the sign. Three adult individuals from the local hearing-impaired community provided the training data. The total number of words was 120 words and each individual provided 18 samples per word. Collected samples were labeled and stored to be used for training and testing. For each distinctive word, 12 samples per individual (a total of 36 samples) were used for training and 6 samples per individual (a total of 18 samples) were used for testing. Raw measurements sent by the glove are received in the form of a sequence of frames sent at an average rate of 23 frames per second with each bearing 8 measured instantaneous values: the x, y, z position of the hand, the roll of the hand, the flexes of the thumb, the index finger, the forefinger and the ring finger. Different signs generate different number of frames depending on the time needed to perform a particular sign, as a frame is generated every 0.44 sec. The x, y, z values generated by a certain sign represent a discrete trajectory of that sign in space. A three dimensional interpolated plot for the trajectory of the Arabic sign that means “goodby” is provided in figure 4.

subject to

constant coefficient whose best value is determined in practice by trial and error adjustment.

Support Vectors Optimal Hyperplane Figure 2. The optimal hyperplane

43

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Thus a continuous stream of frames is generated by the glove as the hand performs a sign. Each frame bears an instantaneous measurement of each of the eight raw measurements. The features used as inputs to the SVM are time division averages of the raw measurements. Time division averages are computed by dividing the entire time during which the sign was performed into a number of equal segments and then finding the average of each of the eight raw attributes over each segment. Within a segment, the average value of a certain raw measurement is taken over all frames generated during that segment. Different numbers of segments are explored in this paper. Figure 5 illustrates the feature extraction process.

Figure 4. Trajectory of the sign “Goodby” in space Features extracted from the raw measurements are used as input to the SVM. Time division averages are selected as features in this paper. With time division averaging, the total time over which the sign is performed is divided into segments and the time average of each raw measurement (x, y, z, roll and the flex of four fingers) is computed over that segment. This results in a total number of features equals to eight multiplied by the number of segments. This averaging reduces the size of input data to a fixed size form and provides smoother input to the learning machine. Time segmentation averages can be mathematically represented by: ui xj i, 0 d i d d  1 (7) si ¦ u  l 1 i j li i where: d: The number of time segments. i: The segment index. j: The frame index (starts from j=1) n: The total number of frames received during the signing time. li: The index of the first frame in segment i.

li

« n» «¬i d »¼  1

ui:

The index of the last frame in segment i.

ui

n» « «¬(i  1) d »¼

Figure 5. Extracting time division averaging features

5. System Performance The training data for each sign consists of 36 samples each 12 taken from the data pertaining to one of the three signers. 6 samples per sign per person are used for testing. To find the effect of features on the performance, several simulations with different number of features are performed. Figure 6 illustrates the performance of the system when sign duration is divided to 1-6 segments for 10 words while Figure 7 shows the performance when 710 segments are used. Clearly, increasing the number of segments improves performance but requires more processing. However, going beyond 10 segments does not improve the performance. The same behavior is observed when the number of words is increased to 120 as shown in Figures 7 and 8.

An example illustrating the use of the above equation, let us assume that during the signing time eight frames were received. Then for a two-segment time division the time average for x over the first segment ( s 0 ) is calculated as:

« § 8 ·» «0 ¨ 2 ¸ »  1 1 ¬ © ¹¼ 8» « u 0 «(0  1) » 4 2¼ ¬ 4 xj 1 4 s0 ¦ ¦xj 4 j1 j 1 4 11

l0

44

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Figure 6. Performance on 10 words when sign duration is divided to 1-5 segments

Figure 9. Performance on 120 words when sign duration is divided to 6-10 segments

Figure 7. Performance on 10 words when sign duration is divided to 6-10 segments

Figure 10. System performance for 10-60 words

Figure 8. Performance on 120 words when sign duration is divided to 1-5 segments Figure 11. System performance for 70-120 words

6. Conclusion

Figures 6-9 indicate also that increasing the number of words degrades the performance. This can be shown better in Figures 10 and 11 where the number of words is changed from 10 to 120 words while the number of segments is fixed at 10. However, this maybe due to the limited number of sensors in the gloves used, in addition to having one finger with no sensors at all. Therefore, words that differ only in that finger would be recognized as the same words. Utilizing better gloves may improve performance significantly.

The main objective of this research is to contribute to the community of physically challenged people by offering a simple interface device that simplifies communication. Another main objective is to investigate an unexplored area of application of the SVM algorithm that has shown promising results in many real-world applications. This paper is also a contribution to the research in Arabic Sign Language, which had very limited research in its automated recognition. Achieving cost effectiveness, reasonable performance and the use of off-the-shelf components are main design objectives. Obtained results

45

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

are promising. However, a better glove like the CyberGlove and a more sophisticated feature extraction method would yield significantly improved performance. Moreover, using two gloves will allow the recognition of two-handed signs as well.

Biography

Mohamed Mohandes is an associate professor at King Fahd University of Petroleum and Minerals. He obtained MS from University of MissouriColumbia in 1989 and PhD from Purdue University in 1993, both in Electrical and Computer Engineering. His area of research includes: Sign Language recognition, Neural networks, and intelligent systems.

7. Acknowledgment The authors acknowledge the support of Prince Salman Center for Disability Research and King Fahd University of Petroleum & Minerals.

8. References [1] M. Mohandes, “Arabic Sign Language Recognition”, Proceedings of the International Conference of Imaging Science, Systems and Technology (CISST’2001), Las Vegas, Nevada, USA, 2001, pp. 25-28. [2] O. Jarrah and A. Halawani, “Recognition of gestures in Arabic Sign Language using neuro-fuzzy systems”, Artificial Intellegence, pp. 117-138, 2001. [3] J. Kramer and L. Leifer, “The Talking Glove for non-verbal deaf individuals”. Technical Report CDR TR 1990 0312, Center for Design Research, Standford University, 1990. [4] Peter Vamplew, “The SLARTI sign Language Recognition System” University of Tasmania. [5] D.J. Sturman and D. Zeltzer. “A Survey of GloveBased Input”. IEEE Computer Graphics and Applications, 14(1), January 1994, pp.30-39 [6] W. Kadous, “GRASP:Recognition of Australian Sign Language Using Instrumented Gloves”. Bachelor’s Thesis, The University of New South Wales, 1995. [7] M. Mohandes, “Automatic Translation of Arabic Text to Arabic Sign Language”, ICGST International Journal on Artificial Intelligence and Machine Learning, AIML Vo. 6, Issue 4, p.p. 15-19, 1996. [8] Student Chapter of the Association for Computing Machinery at the University of Illinois, Power Glove Serial Interface Version 2, Urbana Champaign Campus, 1994. [9] C. Burgs, “A Tutorial on Support Vector Machines for Pattern Recognition.” Data Mining and Knowledge Discovery, 1998. [10] V. N. Vapnik. Statistical Learning Theory, John Wiley and Sons Inc., 1998. [11] S.S. Keerthi, S.K. Shevade, C. Bhattacharyya and K.R.K. Murthy. Improvements to Platt’s SMO Algorithm for SVM Classifier Design. Feb., 2000.

46

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Automatic Generation Control of TCPS Based Hydrothermal System under Open Market Scenario: A Fuzzy Logic Approach 1

C. Srinivasa Rao1, S. Siva Nagaraju2, P. Sangameswara Raju3 EEE Department, G. Pulla Reddy Engineering College, Kurnool, Andhra Pradesh, India 2 EEE Department, J.N.T.U College of Engg., Kakinada, Andhra Pradesh , India. 3 EEE Department, S.V.University, Tirupati, Andhra Pradesh, India [csr_bit, sirigiri70]@yahoo.co.in http://www.gprec.ac.in survey shows that most of earlier works in the area of AGC pertain to interconnected thermal systems and relatively lesser attention has been devoted to the AGC of interconnected hydro-thermal system involving thermal and hydro subsystem of widely different characteristics. Concordia and Kirchmayer [1] have studied the AGC of a hydro-thermal system considering non-reheat type thermal system neglecting generation rate constraints. Kothari, Kaul, Nanda [2] have investigated the AGC problem of a hydro-thermal system provided with integral type supplementary controllers. The model uses continuous mode strategy, where both system and controllers are assumed to work in the continuous mode. Perhaps Nanda, Kothari and Satsangi [13] are the first to present comprehensive analysis of AGC of an interconnected hydrothermal system in continuousdiscrete mode with classical controllers. Under deregulation the power system structure changed in such a way that would allow the evolving of more specialized industries for generation (Genco), transmission (Transco) and distribution (Disco). A detailed study on the control of generation in deregulated power systems is given in [3]. The concept of independent system operator (ISO) as an unbiased coordinator to balance reliability with economics has also emerged [4,5]. The assessment of Automatic Generation control in a deregulated environment is given in detail in [6, 7] and also provides a detailed review over this issue and explains how an AGC system could be simulated after deregulation. On the other hand, the concept of utilizing power electronic devices for power system control has been widely accepted in the form of Flexible AC Transmission Systems (FACTS) which provide more flexibility in power system operation and control [14]. A Thyristor Controlled Phase Shifter (TCPS) is expected to be an effective apparatus for the tie-line power flow control of an interconnected power system In the analysis of an interconnected power system. Literature survey shows ample applications of TCPS for the improvement of dynamic and transient stabilities of power systems

Abstract This paper presents the analysis of Automatic generation control (AGC) of a two-area interconnected thyristor controlled phase shifter (TCPS) based hydrothermal system in the continuous mode using fuzzy logic controller (FLC) under open market scenario. The effects of nonlinearities like deadband and generation rate constraint on the system have also been investigated. The traditional AGC two-area system is modified to take into account the effect of bilateral contracts on the dynamics. It is possible to stabilize the system frequency and tiepower oscillations by controlling the phase angle of TCPS which is expected to provide a new ancillary service for the future power systems. A control strategy using TCPS is proposed to provide active control of system frequency. Simulation results show that the limitations of integral controller can be overcome by including Fuzzy concept and thereby the response of frequency and tie line power can be improved substantially following a load change in any area. Further dynamic responses for small perturbation have been observed, considering FLC and integral controller and the results of both have been compared. Keywords: AGC, Area control error (ACE),deregulated system, FLC, hydrothermal system, open market system, TCPS

1. Introduction Large scale power systems are normally composed of control areas or regions representing coherent groups of generators. In a practically interconnected power system, the generation normally comprises of a mix of thermal, hydro, nuclear and gas power generation. However, owing to their high efficiency, nuclear plants are usually kept at base load close to their maximum output with no participation in the system AGC. Gas power generation is ideal for meeting the varying load demand. Gas plants are used to meet peak demands only. Thus the natural choice for AGC falls on either thermal or hydro units. Literature

47

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

[8],[15]and[16]. However these authors have not considered the presence of nonlinearities like dead band and generation rate constraint and hence their work does not explain the working of AGC with TCPS in deregulated environment in the presence of nonlinearities. A few investigations have been carried out using Fuzzy Logic Controllers (FLC) for AGC of thermal systems [9],[10] Surprisingly, till date, no attempt has been made to examine the effect of FLC in an interconnected hydrothermal system with TCPS under deregulated environment. The remainder of the paper is organized in detail as follows: Section (2) focuses on the dynamic mathematical model of two area system. In Section (3) the design of FLC and its application to AGC is explained. Section (4) emphasis on tie-line power flow model considering TCPS. Section (5) deals with system investigation. Section (6) deals with results and discussions. In Section (7) some conclusions are drawn.

3. Design of Fuzzy logic controller and application to Load frequency control In this work we have designed PI- like Fuzzy Knowledge Based Controller. The basic structure of the conventional PI controller is given by …..(1) u K p e  K I ³ edt where K p and K I are the proportional and integral gains respectively and e is the error signal (i.e. e=process set point–process output variable). Taking the derivative with respect to time, the above equation 1 is transformed into the following equivalent expression x

u

x

K p e K I e

…..(2)

For the load frequency control problem the inputs to the Fuzzy controller for ith area at a particular instant‘t’ are ACEi(t) and ǻACEi(t), where ACEi(t)=ǻPtiei+Biǻfi and ǻACEi(t) = ACEi(t)- ACEi(t-1) and output of the fuzzy controller is ǻu .This is in accordance with the equation. (2) for PI like controller. The inputs and outputs are transformed to seven linguistic variables NB, NM, NS, Z, PS, PM and PB which stand for Negative Big , Negative Medium, Negative small, Zero, Positive Small, Positive Medium and Positive Big respectively. Symmetrical triangular (expect of the two outermost ones which have a trapezoidal shape) membership function is considered here for all the three variables of ACE, ǻACE and ǻu. The membership function of ACE over the operating range of minimum and maximum value of ACE is shown in Figure 2. The membership function would perform a mapping from the crisp value to a fuzzified value. As shown in Figure 2, one particular crisp input ACE is 0.8 0.2  , where 0.8 converted to fuzzified value i.e. NS NM and 0.2 are membership grades corresponding to the linguistic variable NS and NM in FNN system. The membership grades are zero for all other linguistic values except NS and NM. The crisp value input to the system in this way will be converted to a fuzzified value consisting of several membership grades corresponding to each linguistic variable. In the same manner, the other input, ǻACE, and the output, ǻu are fuzzified.

2. Dynamic mathematical model Electric power systems are complex, nonlinear dynamic system. The load frequency controller controls the control valves associated with High Pressure (HP) turbine at very small load variations [11, 17]. The system under investigation has tandem-compound single reheat type thermal system. Each element (Governor, turbine and power system) of the system is represented by first order transfer function at small load variations in according to the IEEE committee report [11]. Two system nonlinearities likely Governor Deadband and Generation Rate Constraint (GRC) are considered here for getting the realistic response. Governor Deadband is defined as the total magnitude of the sustained speed change within which there is no change in the valve position [12]. It is required to avoid excessive operation of the governor. GRC is considered in real power systems because there exits a maximum limit on the rate of change in the generating power. Figure 1 shows the transfer function block diagram of a two area interconnected network .The parameters of two area model are defined in Appendix. The governor deadband is represented by the nonlinear backlash block and the GRC is taken into account by adding a limiter to the turbine as shown in the Figure 1.

Figure 2: Membership functions for the fuzzy variables of ACE

Procedure for Framing the Rules: As each of the three fuzzy variables are quantized to seven fuzzy sets, so total 7 × 7 or 49 rules are required to generate an fuzzy output relating two input fuzzy sets as shown in Table 1. Fuzzy rules play a major role in FLCs and have been investigated extensively. However, fuzzy rules usually

Figure 1. Interconnected hydrothermal two area system with GRC and deadband

48

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

can be generated using knowledge and operation experience with the system or by understanding the system dynamics [18]. Table-1 shows the 49 rules that are generated through the behavior of the system response after a load change. The entire rule base may be divided into regions A, B, C and D depending on the dynamics of the system as shown in Figure3. From Figure3, if e is positive and ǻe is negative, the system will reduce the error itself, which means that the magnitude of the applied control action should be zero. This corresponds to the region labeled A in the Figure 3. In case of negative e and negative ǻe the system tends to go to instability which requires an opposite (positive control) control action. This is interpreted as region B in the figures. In region C, the error is still negative while the rate of change of error is positive. This implies that the error is decreasing and that the control action should be kept to a minimum (zero). When both the error and rate of change of error go positive, the system again tends to go to instability region again and hence it is required to apply opposite (negative) control action to compensate for this tendency toward instability. The output control action increases from zero (Z) control in rule region A to a minimum positive control (PB) in rule region B, as shown in Figure 3. Then the control action decreases from PB in rule region B to minimum control (Z) in rule region C. Also when both e and ǻe approach their maximum positive value, the control action goes to maximum negative (NB). The firing strength of a fuzzy control rule will be ultimately determined using Mamdani correlation minimum encoding inference. For example, suppose that at a certain instant t, the Fuzzy logic employs a rule: If ACE (t) is NS and ǻACE (t) is NM then control action ǻu is PS.

ǻACE ACE NB NM NS set pt Z PS PM PB

ACE NB NM NS Z PS PM PB

NB

NM

NS

Z

PS

PM

PB

PB

PB

PM

PM

PS

PS

Z

PB

PM

PM

PS

PS

Z

Z

PM

PS

PS

PS

Z

Z

Z

Z

Z

Z

Z

Z

Z

Z

Z

Z

Z

NS

Z

NS

NS

Z

Z

NS

NS

NM

NM

NB

Z

NS

NS

NM

NM

NB

NB

A ˆB

NS

Z

PS

PM

B

C

A

D

Z

PB Z

NB

Defuzzification: The output of the inference mechanism is a fuzzy value, so it is necessary to convert this fuzzy value into a real value, since the physical process cannot deal with fuzzy value. This operation which is the inverse of fuzzification is known as defuzzification. In this paper the centroid of largest area (COA) has been used as the defuzzification method, in order to consider the problem containing prohibitive information. The well-known center of gravity defuzzification method has been used because of its simplicity. The control output ǻu is determined using the center of gravity by the following expression, ¦ membership of input u output correspondings 'u ¦ membership of input 49

¦ P jP j

'u

j 1 49

…..(3)

¦ Pj

j 1

Where, P j is the membership value of the linguistic variable recommending the fuzzy controller action, and u j is the precise numerical value corresponding to that fuzzy controller action. This ǻu is added with the existing previous signal will be the actually output signal u which will be fed to the governor. Figure 5 is the block diagram of two area reheat hydrothermal system under open market scenario with TCPS in series with the tieline where area control error of each area is fed to the corresponding fuzzy logic based digital controller. The accurate control signal is generated for every incoming ACE at that particular load change.

4. Tie Line Power flow model with TCPS The recent advances in power electronics have led to the development of the Flexible Alternating Current Transmission Systems (FACTS). FACTS devices are designed to overcome the limitations of the present mechanically controlled power systems and enhance power system stability by using reliable and high-speed electronic devices. One of the promising FACTS devices is the Thyristor Controlled Phase Shifter (TCPS). A TCPS is a device that changes the relative phase angle between the system voltages. Therefore, the real power flow can be regulated to mitigate the frequency oscillations and enhance power system stability. In this study, a two-area hydrothermal power system

The firing strength of a fuzzy control rule will be

P

NM

Figure 3: Rules generation by understanding system dynamics

Table 1 : Fuzzy rules for two area system

ǻACE

NB PB

( A C E (t ), ' A C E (t ))

m in ( P A C E ( A C E (t ), P ' A C E ( ' A C E (t )) where, A: ‘NS’,B: ‘NM’, P ACE andP 'ACE represent the membership functions of the linguistic values of error and rate of change of error. Suppose, e belongs to NS with a membership of 0.3 and ǻe belongs to NM with a membership of 0.7, then the rule consequence (wi) will be 0.3, the minimum between 0.3 and 0.7.

49

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Taking the laplace transform of Eqn.(14), it can be written as 2ST12 >'F1 ( s)  'F2 (s)@  T12 'M ( s) …..(15) 'Ptie12 ( s ) s As per Eqn.(15), it can be observed that the tie-line power flow can be controlled by controlling the phase shifter angle 'M . The phase shifter angle 'M (s) can be represented as [15-17]: KI 'M ( s ) 'Error1 ( s ) …..(16) 1  sT ps

interconnected by a tie-line under open market scenario is considered. 1’

Area 1 I reheat unit

1 : 1‘I

2 Area 2

1 1

TCPS V1 ‘G1

jx12

2

i12

I hydro unit

Tie-line

V1 ‘(G1  I

V2 ‘G 2

Figure4:Interconnected hydrothermal two area system with TCPS in series with the Tie-line

Where K M and Tps are the gain and time constants of the

Figure4 shows the schematic of the two-area interconnected hydrothermal system considering a TCPS in series with the tie-line. TCPS is placed near area 1. Area 1 is the thermal area comprising of three reheat units and area 2 is the hydro area consisting of three hydro units. Without TCPS, the incremental tie-line power flow from area 1 to area 2 under open market system can be expressed as [4] o 'Ptie 12

TCPS. Thus, Eqn.(12)can be rewritten as K 2ST12 >'F1(s)  'F2 (s)@  T12 I 'Error1(s) 'Ptie12(s) s 1  sTps …..(17) If the frequency deviation 'f1 is sensed, it can be used as the control signal (i.e., 'Error1 'f1 ) to the TCPS unit to control the TCPS phase shifter angle which in turn, controls the tie-line power flow. Thus, KI 'M ( s) 'F1 ( s) …..(18) 1  sT ps

o 2ST12

('f1  'f 2 ) …..(4) s When a TCPS is placed in series with the tie line as in Fig 4, a current flowing from area 1 to area 2 can be written as V1 ‘(G 1  I )  V 2 ‘G 2 …..(5) i12 jX 12 From Figure 4 it can also be written as

and the tie-line power flow perturbation becomes 'Ptie12 ( s)

…..(19) But in the open market system the actual tie-line power flow also includes the demand from Discos in one area to Gencos in another area. It can be represented as follows. ' Ptie 1-2, actual = 'Ptie12 ( s ) + (demand of Discos in area 2 from Gencos in area 1) – (demand of Discos in area 1 from Gencos in area2)

§ V ‘(G  I)  V2 ‘G2 · ¸ Ptie12  jQtie12 V1 ‘  (G1  I)¨¨ 1 1 ¸ jX12 © ¹ …..(6) Separating the real part of Eqn (6), we get V1 V 2 …..(7) Ptie12 sin(G 1  G 2  I ) X 12 But in Eqn (7) moving G 1 , G 2 and I from their nominal

5. System Investigation The AGC system investigated is composed of an interconnection of two areas under open market system. Area 1 comprises of a reheat system and area 2 comprises of hydro system. The detailed transfer function models of speed governors and turbines are discussed and developed in the IEEE committee report on Dynamic models for Steam and Hydro turbines in Power systems[11]. The detailed small perturbation transfer function block diagram model of two area hydrothermal system using fuzzy logic controller under open market scenario along with the incremental model of TCPS in series with the tie-line is shown in Figure 2. Nominal parameters of the system are given in the Appendix.

values G 1o , G 2o and I o respectively, we get

'Ptie12

V1 V2 X12

cos(G1o  G2o  Io) sin('G1  'G2  'I) …..(8)

But ( 'G 1  'G 2  'I ) is very small and hence, sin( 'G 1  'G 2  'I ) | ('G 1  'G 2  'I ) So Eqn (8) can be written as V1 V2 'Ptie12 cos(G1o  G2o  I o )('G1  'G2  'I ) …..(9) X12 V1 V 2 cos(G 20  G 20  M 0 ) X 12 Thus, Eqn.(10) reduces to 'Ptie12 T12 ('G 1  'G 2  'M )

Let

T12

2ST12 >'F1(s)  'F2 (s)@  T12 KM 'F1(s) 1  sT ps s

…..(10)

6. Results and Analysis The proposed Fuzzy Logic controller is applied to a two area hydrothermal thermal system under open market scenario. The simulation has been conducted with Fuzzy Logic Toolbox and Simulink in MATLAB 7.1 using Mamdani type fuzzy inference system. For comparative study between integral controller and Fuzzy Logic controller, the same values of the system parameters are

…..(11) Therefore, 'Ptie12 T12 ('G 1  'G 2 )  T12 'M …..(12) and 'G 1 2S ³ 'f1dt We also know that, …..(13) 'G 2 2S ³ 'f 2 dt From Eqns.12) and (13), it can be written as …..(14) 'Ptie12 2ST12 ( ³ 'f1dt  ³ 'f 2 dt )  T12 'M

50

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Cpf11

Cpf12 +

Pu load of Disco 1

+

Cpf21

Cpf22

+

+

1 R

B1 +

+

Demand of discos in 1 to Gencos in 2

'Pload

-

Fuzzy logic controller * apf

Pu load of Disco 2

-

+

1 (1  sTT 1)

1 (1  sTG1 )

+ +

Kp

+

(1  sTP1)

+

+

+ +

Kp

'f1

(1  sTP1 )

˜ T12

1 (1  sT1 )

F

1  sTw (1  0.5sTw )

1  sTR (1  sT2 )

-

+

ǻf

(1  sTP 2 ) Demand of discos in 2 to Gencos in 1

Cpf13

Cpf14 +

Pu load of Disco 3

Kp

+

'Pload

1/R

B1

2ST12 s

-

+ +

+

+

+

-

apf

ǻf

+

Cpf23

Cpf24

+

Pu load of Disco 4

+

Figure 5: Two area hydrothermal system with TCPS under open market scenario employing fuzzy logic controller

considered here as input values. The limiting value of deadband is specified as 0.06% and a specific value of generation rate limitation is 0.1 p.u. per minute [4]. Each Genco participates in AGC as defined by following area participation factors (apfs): apf1 =0.5, apf2 =0.25, apf3 =0.25, apf4 =0.5, apf5 =0.25, apf6 =0.25. Coefficients that distribute ACE to several Gencos are termed as “ACE participation factors” (apfs).

A step load disturbance of 0.04 pu MW is considered in either of the areas (fig 6-8).

m

It should be noted that ¦ apf j =1,where m is the number j 1

of Gencos. The Discos contract with the Gencos as per the following Disco participation matrix. The disco participation matrix(DPM) in this work is taken as follows:

ª 0 .1 « 0 .0 « « 0 .3 DPM = « « 0 .2 « 0 .2 « ¬« 0 . 2

0 .0

0 .3

0 .1 0 .4 0 .0 0 .3

0 .0 0 .1 0 .2 0 .0

0 .2

0 .4

0 .4 º 0 . 2 »» 0 .0 » » 0 .1 » 0 .1 » » 0 . 2 ¼»

Figure6: Variations in area frequencies and tie- line power deviations

51

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Figure7: Generations of Gencos in area 1

Figure10: Generations of Gencos in area 1 during contract violation

Figure8: Generations of Gencos in area 2

Also an additional case is also considered when contract violation occurs in either area. So in this contact violation an additional load of 0.03 pu MW is considered in both the areas after the time span of 30 sec and 75 sec (fig 911). In this contract violation the Gencos which are present in that particular area where the violation has taken place indeed take up that extra load while the remaining generators of other area generate the power which they had been generating before. It can also be seen that this contract violation does not affect the systems frequency response and altogether the system comes back to its original state after some disturbance initially.

Figure11: Generations of Gencos in area 2 during contract violation

7. Conclusion This paper has investigated the performance of conventional integral controller and Fuzzy Logic based controller on a two area hydrothermal system with TCPS under open market scenario. This work builds a fuzzy rule base with the use of the area control error and rate of change of the error. Also a tie-line power flow control technique by TCPS has been proposed for a two-area interconnected hydrothermal power system under open market scenario. A control strategy has been proposed to control the TCPS phase angle which in turn controls the inter-area tie-line power flow. The simulation results showed that the proposed fuzzy logic based controller yields more improved control performance than the conventional integral controller in the presence of TCPS.

8. Appendix All the notations carry the usual meanings (a) System Data T p1 , T p 2 = Power system time constants = 20s K p1 , K p 2 = Power system Gains = 120 Hz/p.u.Mw

Pr1 , Pr 2 = Rated area capacities = 1200 Mw Tt = Turbine time constant = 0.3s T g = Governor time constant of thermal area = 0.08s

Figure9: Variations in area frequencies and tie- line power deviations during contract violation

52

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

[10] C.S.Indulkar, Baldev Raj, “Application of Fuzzy Controller to Automatic Generation Control”, Electric Machine and Power System, 23:209-220, 1995. [11] “Dynamic Models for steam and Hydro Turbines in Power system studies,”IEEE committee report. Transactions in Power Apparatus &Systems Vol.92,No.6, pp.1904-915, Nov./Dec.1973,. [12] Chun-Feng Lu, Chun-Chang Liu and Chi-Jui Wu. “Effect of battery energy storage system on load frequency control considering governor dead band and generation rate constraints” IEEE transactions on energy conversions Vol. 10,pp.555- 561, September 1995. [13] J.Nanda, M.L.Kothari, P.S.Satsangi, “Automatic Generation Control of an Interconnected hydrothermal system in Continuous and Discrete modes considering Generation Rate Constraints”, IEE Proc., vol. 130, pt D, No.1 , pp 455-46, Jan. 1983. [14] N. G. Hingorani, “Flexible ac transmission,” IEEE Spectrum, pp. 40–45, Apr. 1993. [15] K. Xing and G. Kusic, “Application of thyristor controlled phase shifters to minimize real power losses and augment stability of power systems,”IEEE Transactions on Energy Conversion, vol. 3, no. 4, pp. 792–798, 1988. [16] R. Baker, G. Guth, W. Egli, and P. Eglin, “Control algorithm for a static phase shifting transformer to enhance transient and dynamic stability of large power systems,” IEEE Transactions on Power Apparatus and Systems, vol. PAS-101, no. 9, pp. 3532–3542, 1982 [17] Kundur. P, “Power System Stability and Control”, McGraw Hill, New York, 1994. [18] Roland R.Yager and Dimitar P.Filev, “Essentials of Fuzzy Modelling and Control”, John Wiley & Sons, Inc.1994.

Tw = Water time constant = 1s Tr , T1 , T2 = Time constants of hydro governor [ Tr 5s , T1 41.6 s , T2 =0.513s] R1 , R2 = Governor speed regulation parameter of thermal and hydro areas = 2.4Hz/pu Mw T12 = Synchronizing coefficient with TCPS= 0.0866s o = Synchronizing coefficient without TCPS T12

=0.0312s B1 , B2 Frequency bias constants for thermal and hydro areas = 0.4249p.u Mw/Hz K i1 , K i 2 = Integral gains of thermal and hydro areas (b) TCPS data: TPS 0.1s KI 1.5rad / Hz

I max

10 o

I min

10 o

9. References [1] A C. Concordia and L.K.Kirchmayer, “Tie-Line Power and Frequency Control of Electric Power System - Part II”, AIEE Transaction, vol. 73, Part111-A, pp. 133-146, April 1954. [2] M.L.Kothari, B.L.Kaul and J.Nanda, “Automatic Generation Control of Hydro-Thermal system”, journal of Institute of Engineers (India), vo1 61, pt EL2, pp 85-91, Oct 1980. [3] Robert P. Schulte, “Automatic generation Control modification for present demands on interconnected power systems”, IEEE Trans .On Power Systems ,pp. 1286-1291, August 1996. [4] Jayant Kumar, Kah-Koeng and Gerald Sheble, “AGC simulator for price based operation Part1”, IEEE Transactions on Power Systems, vol.12,no.2, ,pp. 527-532, May 1997. [5] Jayant Kumar, Kah-Hoeng and Gerald Sheble, “AGC simulator for price based operation part-2”, IEEE Transactions on Power Systems, Vol.12, no. 2, pp 533-538, May1997. [6] Bjorn H.Bakken and OvesGrande, “Automatic generation control in a deregulated environment”, IEEE Transactions on Power Systems, vol.13, no.4, pp. 1401-1406, Nov1998. [7] Vaibhav Donde, M.A.Pai and Ian A.Hiskens, “Simulation and optimization in an AGC system after deregulation”, IEEE Transaction on Power system, vol.16, no.3, pp.481-489, Aug.2001. [8] H. F. Wang, F. J. Shift, and M. Li, “Analysis of thyristor controlled phase shifter applied in damping power system oscillations,” International Journal of Electrical Power and Energy Systems, vol. 19, no. 1, pp. 1–9, 1997. [9] G.A.Chown, R.C.Hartman, “Design and experience with a Fuzzy Logic Controller for Automatic Generation Control (AGC)”, IEEE Transaction on Power System, Vol.-13, No. - 3, pp 965-970, Aug. 1998.

53

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

10. Bibliographies C.Srinivasa Rao graduated from J.N.T University in 2002, Masters in 2004 from Birla Institute of Technology, Mesra and currently pursuing his Ph.D from J.N.T.University. Working as Assistant Professor in the Department of Electrical Engineering, G.Pulla Reddy Engineering college (Autonomous), Kurnool, Andhra Pradesh since June 2004. His areas of interest are in Genetic Algorithm applications, power system operation and control and Deregulated market Dr.S.Sivanagaraju, graduated in 1998, Masters in 2000 from IIT, Kharagpur and did his Ph.D from J.N.T.University in 2004. Presently he is working as Associate Professor in the Department of Electrical Engineering, J.N.T.U College of Engg. (Autonomous), Kakinada. He is Referee for IEE Proceedings- Generation Transmission and Distribution and International Journal of Emerging Electric Power System. He has about 40 publications in National and International Journals and Conferences to his credit. His areas of interest are in Distribution Automation, Genetic Algorithm applications to distribution systems and power system.

Dr.P.Sangameswararaju did his Ph.D from S.V.University. Presently he is working as Associate Professor in the Department of Electrical Engineering, S.V.University. Tirupathi, Andhra Pradesh. He has about 20 publications in National and International Journals and Conferences to his credit. His areas of interest are in Distribution systems and power systems.

54

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Parameter Estimation of Software Reliability Growth Models by Particle Swarm Optimization Alaa Sheta Information Technology Department Prince Abdullah Bin Ghazi Faculty of Science and Information Technology, Al-Balqa Applied University Al-Salt, Jordan, [email protected] http://www.bau.edu.jo

Abstract

maiden flight was reported. Software failure occurred when a process for converting a 64-bit floating point number to a signed 16-bit integer was running. This operation caused a number overflow. Unfortunately, the backup software was just a copy of the original system. It behaved in exactly the same way. The mission failure was a result of a software failure." The problem of power shutdown of USS Yorktown problem is yet another software failure problem. The problem happen when a sailor mistakenly typed 0 in a field of the kitchen inventory application. Subsequent division by this field caused an arithmetic exception, which propagated through the system, crashed all LAN consoles and remote terminal units, and lead to power shutdown for about 3 hours. Another failure was when a bug in the Pentium processor in 1994 has happened. It was found that the omission of five entries in a table of 1,066 values (part of the chips circuitry) used by a speedy algorithm known as SRT division. This problem cost Intel company about $500 million. This list can be extended. Interest in using evolutionary computation and soft computing techniques, such as Genetic Algorithms (GAs), Genetic Programming (GP), Evolutionary strategies (ESs), Artificial Neural Networks (ANN), Fuzzy Logic (FL), and Particle Swarm Optimization (POS), to solve software engineering problems expanded in the recent years. Estimation of the COCOMO model parameters using Genetic Algorithms (GAs) for NASA Software Projects were provided in [24]. Predicting accumulated faults during the software testing process using parametric and non-parametric models were explored in many articles [1, 2, 25]. In [34], author provided a strategic solution for estimating software defect fix effort using self-organizing neural network. Fuzzy logic and neural networks were used in software engineering project management [7, 14].

Building software reliability growth models (SRGM) for predicting software reliability represents a challenge for software testing engineers. Being able to predict the number of faults (failure) in the software during development and testing processes helps significantly in specifying/computing the software release day and in managing project resources (i.e people and money). In this paper, we explore the use of Particle Swarm Optimization (PSO) algorithm to estimate SRGM parameters. The proposed method shows significant advantages in handling variety of modeling problems such as the exponential model (EXPM), power model (POWM) and Delayed SShaped model (DSSM). PSO algorithm will be used to estimate the parameters of the well known SRGM. Detailed results and analysis are provided showing the potential advantages of using PSO in solving this problem. Keywords: Particle Swarm Optimization, Software Reliability Growth Modeling, Software Testing.

1

Introduction

Software reliability is defined according to [21] as the probability of failure free operation of a computer program in a specified environment for a specified period of time. Failure process modeling represents a challenge because of the various nature of faults discovered and the methodologies to be used in order to isolate the faults [22, 4]. Unstable and unreliable software system can affect people life. In the following, we give few examples. In [26], author stated that, "In June 4th 1996, a total failure of the Ariane 5 launcher on its

55

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

2.3

In this paper, we explore the use of PSO to predict the faults during the software testing process using software faults historical data. Detailed results are provided to explore the advantages of using PSO in solving this problem. In section 3, we provide an overview of various SRGM which we will use in this article. The PSO algorithm is provided in section 4. Detailed experiments are provided in section 5. Then, a conclusion and future work is provided.

2

Delayed S-Shaped Model (DSSM)

This model describes the software reliability process as a delayed S-shaped model [32]. This model is also a finite failure model. The system equation for μ(t; β) and λ(t; β) are: μ(t; β) λ(t; β)

= =

β0 (1 − (1 + β1 t)e−β1 t ) β0 β12 t−β1 t

(4)

The model represents a learning process since some improvement was added to the exponential model based the growing experience of the project team.

The SRGM

In the past three decades, hundreds of models were introduced to estimate the reliability of software systems [31, 33]. The issue of building growth models was the subject of many research work [16, 20] which helps in estimating the reliability of a software system before its release to the market. Serious application such as weapon systems and NASA space shuttle applications were explored [5, 8, 23].

3

Particle Swarm Optimization

This model is known as a finite failure model. Many traditional techniques exists for the estimation of the model parameters β0 and β1 . They include the least square estimation. This technique has many problems related to the estimation accuracy and it needs a large number of measurements so that it can provide a good parameter estimate.

PSO is a population based search algorithm. PSO was inspired from natural animal behavior [11, 9, 10, 13]. The population contains set of particles each of which represents a solution for a given optimization problem. These particles are normally initialized randomly. During the PSO process, each particle, based on given evaluation criterion; update its own position with a certain velocity. The velocity is computed based on both the best experience of the particle itself and that of the entire population. This update process is repeated for number of generations. The update process stops either when the objective (i.e. solution of the problem) is achieved or when the maximum number of generations reached. PSO has been effectively used to solve variety of software engineering problems with better results than GAs. In [30], authors explored the idea of using an evolutionary model to automatically generating test cases that can provide high structural code coverage. A set of experiments where provided. They included 25 small artificial test objects and 13 more complex industrial test objects taken from various development projects. Author reported the success of PSO to perform in a better way than GAs for most test codes in terms of effectiveness and efficiency. A preliminary results on parameter estimation of SRGM using PSO was presented in [25]. The sensitivity of the tuning parameters (i.e the swarm size and velocity update) of PSO was also studied in various articles [29, 28].

2.2

3.1

2.1

Exponential Model (EXPM)

The exponential model was first provided in [18, 19]. μ(t; β) λ(t; β)

β0 (1 − e−β1 t ) β0 β1 e−β1 t

= =

(1)

μ(t; β) and λ(t; β) represent the mean failure function and the failure intensity function, respectively. The parameters β0 is the initial estimate of the total failure recovered at the end of the testing process (i.e. v0 ). β1 represents the ratio between the initial failure intensity λ0 and total failure v0 . Thus, β1 = λ0 /v0 . It is important to realize that: λ(t; β)

=

∂μ(t; β) ∂t

(2)

Power Model (POWM)

The PSO algorithm can be described in three stages. They are: 1) initial generation of particles position and velocities; 2) updating velocities; 3) updating positions. Step 1: Consider a swarm has "p" particles. The positions xik and velocities vki of the initial swarm of particles will be initialized randomly in a specific domain. The upper and lower bounds for each particle are presented in Equation 5.

The Power model was provided in [6]. The equations which govern the relationship between the time t and both μ(t; β) and λ(t; β) are: μ(t; β)

=

β 0 tβ 1

λ(t; β)

=

β0 β1 teβ1 −1

The Algorithm

(3)

The model objective is to compute the reliability of a hardware system during testing process. The model is based on the non-homogeneous Poisson process model.

xi0

56

=

xmin + r(xmax − xmin )

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

v0i

=

xmin + r(xmax − xmin ) δt

For each particle Initialize particle For each particle Calculate fitness value If the fitness value is better than the best fitness value (pbest) in history set current value as the new pbest End Choose the particle with the best fitness value of all the particles as the gbest For each particle Calculate particle velocity according to Eq. 5 Update particle position according to Eq. 6 End Continue while maximum iterations or minimum error criteria is not attained

(5)

Step 2: The velocity of each particle is updated according to Equation 6. i vk+1 = αk vki + γ1 r1 (pik − xik ) + γ2 r2 (gk − xik )

(6)

where k represents the instance in time. • αk is called the inertia weight; It is used a control parameter for the PSO process. It shows how the history of the process will affect the future. In other word, too large value for αk mean a large memory of the algorithm. It is important to make a balance between global and local exploration of the algorithm (i.e. exploration of various areas on the search space and exploitation of the neighborhood).

Figure 1: The Pseudo code of the PSO procedure

• γ1 , γ2 are two positive constant called cognitive and social parameters, respectively. Fine tuning for the parameters γ1 , γ2 will help to achieve faster convergence of the PSO.

Table 1: The tuning parameters for the PSO Operator Value Acceleration constant [2.1,2.1] Inertia Weight [0.9,0.6] Maximum no. of Iteration 1000 Maximum Velocity 300 No. of Particles 2 Domain of search for a [-1000,1000] Domain of search for b [-1,1]

• The parameters r1 , r2 are two random numbers having values between [0,1]. Their role is to keep population diversity. • pik is defined as the best location found by particle i up to the instance of time k. • gk is defined as the best global position found among all particle in the swarm up to instance k.

PSO models is selected to be the route mean square of the error:

N

1  RM SE = (yi − yˆi )2 N i=1

Step 3: Finally, the position is updated as given in Equation 7: i xik+1 = xik + vk+1 δt

(7)

N represents the number of measurements used for estimating the model parameters. The performance of the PSO algorithm is evaluated by computing the objective evaluation criterion in terms of the fitness. The tuning parameters and search space for PSO is given in Table 1. In the following sections, we will provide the results of a three real measured test/debug data set where our proposed approach was applied.

i The fitness for the locations pik , gk is defined as fbest g and fbest , respectively. Our objective is to minimize g i and fbest such that no furthe difference between fbest ther improvement is introduced. It normally takes few hundred to few thousands iterations till convergence achieved. The algorithm stops when the error minimum. The pseudo code of the PSO procedure was presented in [12, 15] and is given in Figure 1.

4

4.1

Test/Debug Data 1

The data set which contain real measured test/debug date of a real-time control application is presented in [17, 25]. The data set given includes the reading of the measured faults (xk ), the accumulated faults (yk ) and the the number of test workers (twk ) involved in the testing process. The developed program size was 870 Kilo line of code (KLOC) of FORTRAN and a middle level language. The test/debug data was measured day by day. The day represents the test instance. To build a software reliability model, we used 70% of the

Experiment Setup

To solve the parameter estimation problem for software reliability modeling we used the PSO toolbox under Matlab [3]. Our objective is to estimate the parameters such that the error difference, between the actual fault and the estimated faults based the parameter estimated using PSO, is minimal. The evaluation criterion to measure the performance of the developed

57

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Best so far curves for various models

Actual and estimated failures using various models

350

800 Best so far (EXPM) Best so far (POWM) Best so far (DSSM)

Actual failures μ(t,β) Estimated failures (EXPM) Estimated failures (POWM) Estimated failures (DSSM)

700

300

600 250 500 200 400 150 300 100 200

50

0

100

0

100

200

300

400

500 600 Generations

700

800

900

0

1000

Figure 2: Best so far curve for PSO convergence fitness function RMSE - 109 Measurements Table 3: Computed RMSE for Model RMSE-Training EXPM 20.2565 POWM 22.2166 DSSM 15.9237

20

40

60 Test Number

80

100

120

Figure 3: Actual and Accumulated failures for the EXPM, POWM and DSSM using PSO - 109 Measurements

Test/Debug Data 1 RMSE-Testing 119.4374 152.9372 26.3015

Table 5: Computed RMSE for Model RMSE-Training EXPM 24.9899 POWM 32.3550 DSSM 20.8325

measurements to estimate the model parameters. The rest of the dataset was used for prediction/validation of the developed model. The evolutionary process starts by running the PSO with the tuning parameters given in Table 1. We run PSO for 1000 iteration to obtain the parameters in the three cases under study. The convergence process was recorded by keeping an eye on the best individual after each generation. In Figure 2, we show the best so far curves of the evolutionary process for the three developed models. The actual and accumulated faults (failures) curves for the exponential model, power model and delayed S-shaped model are shown in Figure 3. The estimated parameters, for the software reliability growth models, are given with the model equations in Table 2. The computed RMSE in both training and testing (validation) cases are shown in Table 3. In this case, we found that the Delayed S-Shaped model was able to provide the best results using the PSO tuned parameters. The model error was the minimum compared to other proposed models.

4.2

0

Test/Debug Data 2 RMSE-Testing 80.8963 149.9684 17.0638

model. A Test/Debug data set of 111 measurements presented in [25] was used for our experiments. The best so far curves of the convergence process for the swarm process is presented in Figure 4. The estimated parameters for the developed SRGM are given in Table 4. The actual and accumulated faults (failures) curves for the EXPM, POWM and DSSM are shown in Figure 5. Based the developed experiments, the Delayed S-Shaped model provided the minimum RMSE among other models. The computed RMSE over both training and testing (validation) data are shown in Table 5. The results show that the DSSM is performing very well in this case.

4.3

Test/Debug Data 3

A Test/Debug data set has 46 measurements was presented in [27]. The number of measurements collected during testing process is small. This represents a difficulty for traditional parameter estimation techniques. It is sometimes difficult to correctly estimate model parameters using small number of measurements. The estimated parameters for the software reliability growth models are given with the model equations in Table 7. The power model and the Delayed S-Shaped model provided good results although the power model was slightly better in the case of training. In Figure 6, we show the best so far curves of the swarm evolutionary process for the three developed

Test/Debug Data 2

A field report data was developed to measure system faults during testing in a real-time application [27]. The software system consists of 200 modules with each having one kilo line of code of FORTRAN. We run the PSO to find the best parameters to tune the exponential model, power model and Delayed S-Shaped

58

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Table 2: Reliability Growth Model with Parameter Estimated using PSO - 109 Measurements Exponential Model (EXPM) Power Model (POWM) Delayed S-Shaped Model (DSSM)

μ(t; β) = 1670.9987(1 - e−0.0051702t ) μ(t; β) = 10.1655 t0.92338 μ(t; β) = 596.729 (1 - (1 + 0.045927 t)e−0.045927t )

Table 4: Reliability Growth Model with Parameter Estimated using PSO - 111 Measurements μ(t; β) = 695.7171(1 - e−0.017t ) μ(t; β) = 21.7567 t0.73627 μ(t; β) = 502.571(1 -(1 + 0.0635 t)e−0.0635t )

Exponential Model (EXPM) Power Model (POWM) Delayed S-Shaped Model (DSSM)

Table 6: Computed RMSE for Model RMSE-Training EXPM 12.8925 POWM 11.9446 DSSM 18.5807

Best so far curves for various models 350 Best so far (EXPM) Best so far (POWM) Best so far (DSSM) 300

Test/Debug Data 3 RMSE-Testing 13.6094 14.0524 47.4036

250 Best so far curves for various models 150

200

Best so far (EXPM) Best so far (POWM) Best so far (DSSM)

150

100

100

50

0

0

100

200

300

400

500 600 Generations

700

800

900

1000 50

Figure 4: Best so far curve for PSO convergence fitness function RMSE - 111 Measurements 0

Actual and estimated failures using various models

100

200

300

400

500 600 Generations

700

800

900

1000

Figure 6: Best so far curve for PSO convergence fitness function RMSE - 46 Measurements

700 Actual failures μ(t,β) Estimated failures (EXPM) Estimated failures (POWM) Estimated failures (DSSM)

600

0

models. The actual and accumulated faults (failures) curves for the exponential model, power model and delayed S-Shaped model are shown in Figure 7. The computed RMSE in both training and testing cases are shown in Table 6.

500

400

300

200

5

100

0

0

20

40

60 Test Number

80

100

Conclusion and Future Work

In this paper, we explored the use of Particle Swarm Optimization (PSO) technique to estimate the parameters of software reliability models (i.e. exponential model, power model and S-shaped model). The estimated model parameters were used to predict the faults in a software system during the testing process. The PSO method shows significant advantages in handling the modeling problem for the exponential

120

Figure 5: Actual and Accumulated failures for the EXPM, POWM and DSSM using PSO - 111 Measurements

59

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

Table 7: Reliability Growth Model with Parameter Estimated using PSO - 46 Measurements Exponential Model (EXPM) Power Model (POWM) Delayed S-Shaped Model (DSSM)

μ(t; β) = 382.4057(1 - e−0.0261t ) μ(t; β) = 14.9701 t0.7760 μ(t; β) = 216.3715 (1 - (1 + 0.1360 t)e−0.1360t ) Central, April, 22, 2005.

Actual and estimated failures using various models 300 Actual failures μ(t,β) Estimated failures (EXPM) Estimated failures (POWM) Estimated failures (DSSM)

250

[4] P. G. Bishop and R. Bloomfield. Worst case reliability prediction on a prior estimate of residual defects. In Proceedings of the 13 th IEEE International Symposium on Software Reliability Engineering (ISSRE-2002), pages 295–303, 2002.

200

150

[5] P. Carnes. Software reliability in weapon systems. In Eighth International Symposium on Software Reliability Engineering (ISSRE ’97), 1997.

100

50

0

0

5

10

15

20

25 30 Test Number

35

40

45

[6] L. H. Crow. Reliability for complex repairable systems. Reliability and Biometry, SIAM, pages 379–410, 1974.

50

[7] A. C. Hodgkinson and P. W. Garratt. A neurofuzzy cost estimator. In Proceedings of the Third Conference on Software Engineering and Applications, pages 401–406, 1999.

Figure 7: Actual and Accumulated failures for the EXPM, POWM and DSSM using PSO - 46 Measurements

[8] T. Keller and N. Schneidewind. Successful application of software reliability engineering for the NASA space shuttle. In Eighth International Symposium on Software Reliability Engineering (ISSRE ’97), 1997.

model, the power model and the Delayed S-Shaped model. Our future work include the exploration of using Genetic Programming in developing a polynomial structure model which can provide an advanced relationship between μ(t; β) and λ(t; β) to better model the software reliability prediction process. GP can build a polynomial structure with set of parameters which can provide an accurate estimate of the software faults.

[9] J. Kennedy. The particle swarm: Social adaptation of knowledge. In Proceedings of the 1997 International Conference on Evolutionary Computation, pages 303–308. IEEE Service Center, Piscataway, NJ, 1997. [10] J. Kennedy. The behavior of particles. Evolutionary Programming VII, pages 581–587, 1998.

References [1] Sultan Aljahdali, David Rine, and Alaa Sheta. Prediction of software reliability: A comparison between regression and neural network nonparametric models. In ACS/IEEE International Conference on Computer Systems and Applications (AICCSA 2001), Beirut, Lebanon, pages 470–473, 2001.

[11] J. Kennedy and R. C. Eberhart. Particle swarm optimization. In Proceedings of the IEEE International Conference on Neural Networks, pages 1942–1948. Piscataway, NJ, USA, 1995. [12] J. Kennedy and R. C. Eberhart. Particle swarm optimization. Proceedings of IEEE International Conference on Neural Networks (Perth, Australia), IEEE Service Center, Piscataway, NJ, 5(3):1942–1948, 1995.

[2] Sultan Aljahdali, Alaa Sheta, and David Rine. Predicting accumulated faults in software testing process using radial basis function network models. In 17th International Conference on Computers and Their Applications (CATA), Special Session on Intelligent Software Reliability, San Francisco, California, USA, 2002.

[13] J. Kennedy and R. C. Eberhart. Swarm Intelligence. Morgan Kaufmann Publishers, 2001. [14] S. Kumar, B. A. Krishna, and P.S. Satsangi. Fuzzy systems and neural networks in software engineering project management. Journal of Applied Intelligence, 4:31–52, 1994.

[3] Brian Birge. PSOt, Particle Swarm Optimization Toolbox for Matlab. Submitted to the Matlab

60

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

[15] Yong ling Zheng, Long hua Ma, Li yan Zhang, and Ji xin Qian. Empirical study of particle swarm optimizer with an increasing inertia weight. In Ruhul Sarker, Robert Reynolds, Hussein Abbass, Kay Chen Tan, Bob McKay, Daryl Essam, and Tom Gedeon, editors, Proceedings of the 2003 Congress on Evolutionary Computation CEC2003, pages 221–226, Canberra, 8-12 December 2003. IEEE Press.

[27] Y. Tohman, K. Tokunaga, S. Nagase, and Murata Y. Structural approach to the estimation of the number of residual software faults based on the hyper-geometric distribution model. IEEE Trans. on Software Engineering, pages 345–355, 1989. [28] F. van den Bergh. An Analysis of Particle Swarm Optimizers. PhD thesis, Department of Computer Science, University of Pretoria, Pretoria, South Africa, 2002.

[16] M. R. Lyu. Handbook of Software Reliability Engineering. IEEE Computer Society Press, McGraw Hill, 1996.

[29] F. van den Bergh and A.P. Engelbrecht. Effects of swarm size on cooperative particle swarm optimization. In GECCO 2001, (San Francisco, USA), 2001.

[17] T. Minohara and Y. Tohma. Parameter estimation of hyper-geometric distribution software reliability growth model by genetic algorithms. In Proceedings of the 6th International Symposium on Software Reliability Engineering, pages 324– 329, 1995.

[30] Andreas Windisch, Stefan Wappler, and Joachim Wegener. Applying particle swarm optimization to software testing. In GECCO ’07: Proceedings of the 9th annual conference on Genetic and evolutionary computation, pages 1121–1128, New York, NY, USA, 2007. ACM Press.

[18] P. B. Moranda. Predictions of software reliability during debugging. In Proceedings of Annual Reliability and Maintainability Symposium, pages 327–332, 1975.

[31] M. Xie. Software reliability models - past, present and future. In N. Limnios and M. Nikulin (Eds). Recent Advances in Reliability Theory: Methodology, Practice and Inference, pages 323–340, 2002.

[19] John Musa. A theory of software reliability and its application. IEEE Trans. Software Engineering, 1:312–327, 1975.

[32] S. Yamada, M. Ohba, and Osaki S. S-Shaped software reliability growth models and their applications. IEEE Trans. Reliability, pages 289– 292, 1984.

[20] John Musa. Software Reliability Engineering: More Reliable Software, Faster and Cheaper. Published AuthorHouse, ISBN 0079132715, 2004.

[33] Shigeru Yamada. Software reliability models and their applications: A survey. In International Seminar on Software Reliability of ManMachine Systems - Theories Methods and Information Systems Applications - August 17-18, Kyoto University, Kyoto, Japan, 2000.

[21] John Musa, A. Iannino, and K. Okumoto. Software Reliability: Measurement, Prediction, Applications. McGraw Hill, 1987. [22] H. Pham. Software Reliability. Springer-Verlag, 2000.

[34] Hui Zeng and David Rine. A neural network approach for software defects fix effort estimation. In Proceedings of the Eighth IASTED International Conference Software Engineering and Applications, pages 513–517, 2004.

[23] N. F. Schneidewind and Ted W. Keller. Applying reliability models to the space shuttle. IEEE Transactions on Software Engineering, pages 28– 33, 1992. [24] Alaa Sheta. Estimation of the COCOMO model parameters using genetic algorithms for NASA software projects. Journal of Computer Science, USA, 2(2):118–123, 2006. [25] Alaa Sheta. Reliability growth modeling for software fault detection using particle swarm optimization. In 2006 IEEE Congress on Evolutionary Computation, Sheraton, Vancouver Wall Centre, Vancouver, BC, Canada, July 16-21, 2006., pages 10428–10435, 2006. [26] Ian Sommerville. Software Engineering, 6 th Edition. Pearson Education Limited, England, 2001.

61

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

VLSI Floor Planning relying on Differential Evolution Algorithm 1

D.Jackuline Moni,2 S. Arumugam and 3D.Gracia Nirmala Rani 1, 3 ECE Department, Karunya University, Coimbatore, India. 2. Chief Executive, Bannariamman Educational Trust, Coimbatore

Abstract This paper presents a novel approach to solve the VLSI (Very Large Scale Integration) floor planning problems. This approach is based on Differential Evolution (DE) which optimizes both chip area and total wire length without overlaps in VLSI macro cell placement. Differential Evolution algorithm requires few control parameters, and has fast convergence. B*tree representation is used because it is very fast, flexible and easy for implementation. DE has been implemented and tested on popular benchmark problems. Experimental results show that DE can quickly produce optimal solutions for all tested benchmark problems. Keywords: Floorplanning, B*tree Representation

Differential

Evolution,

I. Introduction As the circuit size gets larger, design hierarchy and IP blocks are intensively and increasingly used to reduce the design complexity. The floor plan or building block placement is becoming critical to the performance of hierarchical design process. Floor planning in VLSI design is to arrange the modules on a chip under the constraint that no two modules are overlap while controlling the area, wire length, and other performance indices to be optimal. Floor plan an be divided into two categories. The slicing structure[1,2]and the non slicing structure[3,4,5,6]. In[7,8]force directed placement algorithm is used to solve macro cell placemen problems. In[9]a linear objective with an efficient quadratic programming approach is used. But in [8,9]overlaps between cells are not removed completely. Wong and Liu proposed an algorithm for slicing floor plan designs[2]. They presented a normalized polish expression to represent a slicing structure. For non slicing floor plans, representations such as sequence pair[4] bounded slicing grid[5] and tree[3],B*tree[10]are found in the literature. Sequence pairs can be used to floor plan hard rectangular blocks

62

by simulated annealing [1,3,4],Particle swarm optimization [11] and Ant Colony Optimization [12]. Sequence pairs are modified in constant time, but need to be re evaluated after each time. In [5], a grid based representation is presented. Its complexity is similar to that of the sequence pair. In [3], a tree based representation called O-trees is proposed. The tree structure is irregular and thus some primitive tree operations, such as search and insertion are not efficient. In this paper, we adopted a non slicing structure B*tree using DE. The B*tree [10] is very flexible, very fast and easy for implementation. It does not need to construct constraint graphs for area cost evaluation. In [10] B*tree based simulated annealing algorithm is proposed. Problem with SA is that the system must be close to equilibrium throughout the process, which demands a careful adjustment of the annealing schedule parameters. The remainder part of this paper is organized as follows; section 2 describes the Differential Evolution. Section 3 presents B*tree representation. Section 4 and 5 exhibits the implementation and experiment results. Section 6 gives the conclusion.

2. Methodology 2.1 Differential Evolution Algorithm The DE algorithm [13] is a population based algorithm like genetic algorithms using the similar operators; crossover, mutation and selection. The main difference in constructing better solutions is that genetic algorithms rely on crossover while DE relies on mutation operation. The main operation is based on the divergences of randomly sampled pairs of solutions in the population. The algorithm uses mutation operation as a search mechanism and selection operation to direct the search toward the prospective regions in the search space. The DE algorithm also uses a non-uniform crossover that can take child vector parameters from one parent more often than it does from others. By using the components of the existing population members to construct trial vectors, the recombination (crossover) operator efficiently shuffles information

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

about successful combinations, enabling the search for a better solution space. An optimization task consisting of D parameters can be represented by a D-dimensional vector. In DE, a population of NP solution vectors is randomly created at the start. This population is successfully improved by applying mutation, crossover and selection operators. Fig 1.shows the flow chart of DE.

Evaluation of a uniform random number generator. CR is the crossover constant İ [0, 1] CR=0 means no crossover. rn(i) İ (1,2,…D) is a randomly chosen index which ensures that ui,G-1 gets at least one element from vi,G-1 .Otherwise no new parent vector would be produced and the population would not alter. 2.1.3 Selection A ”greedy” selection scheme is used: If and only if the trial vector yields a better cost function value compared to the parameter vector x i,G is it accepted as a new parent vector for the following G+1.Otherwise,the target vector is retained to serve as a parent vector for generation G+1 once again. 2.2Pseudo Code Representations Input: population P, Crossover rate CR, a real value F Evolve P: For index=1 to the population size Select randomly three different values i1.i2, i3: Index # =i1 # =i2 # =i3 For each variable j If Random ” CR X =P[i1][j] + F *(P[i2][j] –P[i3][j]) Else X = P[index][j] If else X is better than P[index]. replace P [index] by X Loop Output: New Population P

3. B*-Tree Representation

Figure 1: Flowchart for Differential Evolution

The three operations mutation, crossover, and selection are described in the following section. 2.1.1. Mutation For each target vector xi,G , a mutant vector is generated according to, (2.1) vi,G-1 =x r1,G+F.(x r2,G-x r3,G) randomly chosen indexes r1 ,r2, r3 İ{1,2,3…NP}. Note that indexes have to be different from each other and from the running index. Therefore, the number of parameter vectors in a population must be at least four is a real and constant factor İ [0, 2] A that controls the amplification of the difference vector (xr2,G-x r3,G) . Note that the smaller the differences between parameters of parent r2 and r3, the smaller the difference vector and therefore the perturbation. That means if the population gets close to the optimum, the step length is automatically decreased. This is similar to the automatic step size control found in standard evolution strategies. 2.1.2 Crossover The target vector is mixed with the mutated vector using the following scheme to yield the trial vector ui,G1=(u1i,G+1, u2i,G+1……….. uDi,G+1)where Uji,G+1 =

vi,G-1 if (r(j) ”CR)or j=rn(i) xji,G if (r(j) >CR)and j #rn(i)

(2.2)

63

To handle non-slicing floor plans, we propose in this paper an ordered binary-tree based representation, called B*-tree representation [10]. Given an admissible placement P, we can represent it by a unique (horizontal) B*-tree .(See Figure 2.1(b) for the B*-tree representing the placement shown in Figure 2.1(a).) A B*-tree is an ordered binary tree whose root corresponds to the module on the bottom-left corner. Similar to the depth first search (DFS) procedure, we construct the B*-tree for an admissible Placement P in a recursive fashion.

B6

B7

B5 B2 B3 B4 B0

B1 Figure 2.1(a) admissible placement

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

N0 N2 N1

N5

N6

N3

N4

N7

Figure 2.1(b) B*tree representing placement

Starting from the root, we first recursively construct the left sub tree and then the right sub tree. Let Ri denote the set of modules located on the right-hand side and adjacent to bi. The left child of the node ni corresponds to the lowest module in Ri that is unvisited. The right child of ni represents the lowest module located above bi with its x-coordinate equal to that of bi and its ycoordinate less than that of the top boundary of the module on the left-hand side and adjacent to bi , if any. The B*-tree keeps the geometric relationship between two modules as follows. If node ni is the left child of node ni module bi must be located on the right-hand side and adjacent to module bi in the admissible placement; i.e., xj = xi +wi . Besides, if node nj is the right child of ni module bj must be located above and adjacent to module bi , with the x-coordinate of bj equal to that of bi; i.e. xj = xi, Also, since the root of tree (T) represents the bottom-left module, the x- and ycoordinates of the module associated with the root (x root, y root)=(0 0). We make n0 the root of T since bo is on the bottom-left corner. Constructing the left sub tree of n0 recursively, we make n7 the left child of n0. Since the left child of n7 does not exist, we then construct the right sub tree of n7 (which is rooted by n8). The construction is recursively performed in the DFS order. After completing the left sub tree of n0, the same procedure applies to the right sub tree of n0. Figure 2.1(b) illustrates the resulting B*tree for the placement shown in Figure 2.1(a). The construction takes only linear time. Note that a B*-tree can also be constructed by transforming an O tree to a binary tree, under several additional construction rules for some special module placements to make the theorem to be presented below hold. We have the following lemma, which leads to, Theorem 1: For a module bi in an admissible placement, the corresponding node ni in its induced B*-tree has a unique parent if ni is not the root. Theorem 2: There is a 1-to-1 correspondence between an admissible placement and its induced B*-tree. In other words, for an admissible placement, we can construct a unique B*-tree, and vice versa. The nice property of the

64

1-to-1 correspondence between an admissible placement and its induced B*-tree prevents the search space from being enlarged with duplicate solutions . 3.1 The Algorithm Our floor plan design algorithm is based on the Differential Evolution method [13,14,15]. The algorithm can consider not only hard modules, but also pre-placed, soft, and rectilinear ones. We perturb a B*tree (a feasible solution) to another B*-tree by using the following four operations. Op1: Rotate a module. Op2: Move a module to another place. Op3: Swap two modules. Op4: Remove a soft module and insert it into the best internal or external position. We have discussed Op1 is rotate a module. Op2 deletes and inserts a module. If the deleted node is associated with a rectangular module, we simply delete the node from the B*-tree. Otherwise, there will be several nodes associated with a rectilinear module, and we treat them as a whole and maintain their Location Constraints(LC) relations. Op4 deletes a soft module, tries all possible internal and external positions, inserts it into the best position, and changes its shape and the shapes of the other soft modules. Op2, Op3, and Op4 need to apply the Insert and Delete operations for inserting and deleting a node to and from a B*-tree. We explain the two operations in the following. 3.1.1. Deletion There are three cases for the deletion operation. Case 1: A leaf node. Case 2: A node with one child. Case 3: A node with two children. In Case 1, we simply delete the target leaf node. In Case 2, we remove the target node and then place its only child at the position of the removed node. The tree update can be performed in O (1) time. In Case 3, we replace the target node nt by either its right child or left child nc. Then we move a child of nc to the original position of nc. The process Proceeds until the corresponding leaf node is handled. It is obvious that such a deletion peration requires O (h) time, where h is the height of the B*-tree. Note that in Cases 2 and 3, the relative positions of the modules might be changed after the operation, and thus we might need to reconstruct a corresponding placement for further processing. Also, if the deleted node corresponds to a sub-module of a rectilinear module bR, we should also delete other sub-modules of bR . 3.1.2 Insertion When adding a module, we may place it around some module, but not between the sub-modules that belong to a rectilinear module. Only internal and external positions can be used for inserting a new node. For a rectangular module, we can insert it into an internal or an external position directly. For a rectilinear module

Artificial Intelligence and Machine Learning Journal, ISSN: 1687-4846, Volume 7, Issue I, ICGST, Delaware, USA, June 2007

bR consisting of the sub-modules b1, b2…….bn ordered from left to right, the sub-modules must be inserted simultaneously, and bi+1 must be the left child of bi to satisfy the LC relation. The DE algorithm starts by randomly choosing an initial B*-tree. Then it perturbs a B*-tree (a feasible solution) to another B*-tree based on the aforementioned Op1–Op4 until a predefined “frozen” state is reached. At last, we transform the resulting B*tree to the corresponding final admissible placement.

4. Implementation The pseudo code of the DE algorithm with B*tree [11]. • Initialize the values of D, NP, CR and F • Initialize all the vectors of the population randomly between a given lower bound (LB) and upper bound (UB). for i =1 to NP for j =1 to D (Xi,0 )j = LB + random number( UB - LB ) • Evaluate the cost of each vector. Cost here is the area of the modules. for i =1 to NP Ci = cal_area ( ) • Find out the vector with the lowest cost i.e. the best vector so far. Cmin = C1 and best =1 for i =2 to NP if (Ci < Cmin) then Cmin = Ci and best = i • Perform mutation , cross-over, reproduction and evaluation of the objective function until there is no further improvement in the lowest cost do { for i =1 to NP { • For each vector Xi (target vector), select three distinct vectors Xa, Xb and Xc, randomly from the current population (primary array) other than the vector Xi do { r1 = random number *NP r2 = random number *NP r3 = random number *NP } while (r1=i) OR (r2=i) OR (r3=i) OR (r1=r2) OR (r2=r3) OR (r1=r3) • Perform mutation and create a noisy vector X n,i, Xn,i = Xa,i + F (X b,i - X c,i) • Perform cross-over for each target vector Xi with its noisy vector Xn,i and create a trial vector , Xt,i. If CR =0 inherit all the parameters from the target vector Xi, except the last one which should be from Xn,i , else depending on a random number generated inherit either from Xi or X n,i as given below. for n=1 to D r=random number*1 if(CR==0) { for j=1 to (D-1) Xt,j = Xi,j }

65

else { for j=1 to D { r=random number*1 if(r