Harmonic Measuring Approach Based on Quantum Neural Network

Harmonic Measuring Approach Based on Quantum Neural Network

Available online at www.sciencedirect.com Available online at www.sciencedirect.com Physics Procedia Physics Procedia (2011)24 000–000 Physics 00 Pr...

405KB Sizes 1 Downloads 136 Views

Available online at www.sciencedirect.com Available online at www.sciencedirect.com

Physics Procedia

Physics Procedia (2011)24 000–000 Physics 00 Procedia (2012) 337 – 344

www.elsevier.com/locate/procedia

2012 International Conference on Applied Physics and Industrial Engineering

Harmonic Measuring Approach Based on Quantum Neural Network Yueling Li,Xinghua Wu Northeast Dianli University College of Electric Power Engineering Jilin ,China

Abstract Develop a quantum neural network with more effective study and generalized ability. A method proposed to measure the parameters of harmonic is three lays quantum neural networks. With the example of 3rd and 5th harmonic parameters, elaborates the composition of the training method and training sample in the quantum neuron networks. A simulation which trains the quantum neutron network with training samples firstly, then measures untrained samples, is performed by Matlab programs. And the results of the simulation show the validity of the method. ©©2011 Published by Elsevier B.V.Ltd. Selection and/orand/or peer-review under responsibility of ICAPIEofOrganization Committee. 2011 Published by Elsevier Selection peer-review under responsibility [name organizer] Keywords: a quantum netural network; harmonic

1.

Introduction

The rising of Artificial neural network (ANN) provides a new research approach of the harmonic measurement. ANN neural network has some of the basic human characteristics such as distributed storage of information adaptive capacity and other functions, there are many computational advantages. However, in the case of large amount of information, the processing speed of traditional ANN is too slow and can not be completely parallel. This article will introduce the concept of quantum computing to the traditional model of neurons, and construct the quantum neural networks which will be used into the harmonic measurement. Firstly instead of analog neurons with a quantum harmonic measurement device Parallel band-pass filter in the basic idea, and then construct a three-layer neural network to real-time measurement of quantum harmonic, and analyze the network's training methods and the composition of training samples, the final simulation study confirms the validity of this method of harmonic detection.

1875-3892 © 2011 Published by Elsevier B.V. Selection and/or peer-review under responsibility of ICAPIE Organization Committee. doi:10.1016/j.phpro.2012.02.050

338

2.

Yueling Li and Xinghua Wu / Physics Procedia 24 (2012) 337 – 344

Quantum theory

Author name / Physics Procedia 00 (2011) 000–000

Bit (bit) is a classic computing and the basic concepts of classical information, it has only two states, either 0 or 1. In quantum computing, quantum information is the basic unit of quantum bits (quantum bit or qubit), it can also take any of their linear superposition besides |0> and |1>.That is, the state of a quantum Element can be expressed as:

ψ= > α 0 > +β 1 >

(1) 2

2

And for the plural of which α and β to meet the normalization condition: |α| +|β| =1. Qubit states and the classical bit different from the classic bit of certainty (not 0 or 1), while the quantum bit is the probability, that is, the probability of state|0> is |α|2, and the probability of state|1> is |β|2. Therefore, a quantum bit of information contained in the bit is more than the classic. The qubit state can be independent and intertwined. Quantum gate is the basis for quantum computation, in a sense, representing the quantum gates quantum computing, which includes the characteristics of quantum computing, such as quantum parallelism. A theoretical proof, the existence of the universal quantum computing gates group, through their combination, may form an arbitrary quantum gate. The most basic of universal quantum computation is a set of phase-shift gate and two doors controlled NOT gate composition. Consider here with their composition calculation unit functions as neurons start to form a new computing model. To facilitate application, to indicate the plural form of quantum states, represented as follows:

ψ θ >: f (θ ) = eiθ = cos θ + i sin θ

(2)

Where the square of real part corresponds to the probability of amplitude of |0, and the imaginary part corresponds to |1>. By the type that can constitute the two most basic universal quantum gates: A phase shift gate:

f (θ1 + θ2 )= f (θ1 ) • f (θ2 )= ei(θ1+θ2 )

(3)

Two controlled NOT gate:

1) ⎧sinθ + i cosθ,(γ = π f ( γ −θ ) = ⎨ 0) 2 ⎩cosθ − i sinθ,(γ =

(4)

Where γ is controlled by input parameters. When γ = 1, quantum state reverse rotation; When γ = 0,quantum state does not rotate, then the probability of the magnitude of the phase is reversed, but the probability of being observed has remained the same, so as to not rotate. Different θ responses different quantum states by changing the value to achieve the quantum states of the evolution and transformation. 3.

Quantum Neural Networks Quantum neuron Use the above theory to construct quantum neuron model, as shown in Figure 1:

339

Yueling Li and/ Xinghua Wu / Physics Procedia 24 (2012) 337 – 344 Author name Physics Procedia 00 (2011) 000–000

Figure 1. the quantum neuron model

Reflected in the neuron's two most basic universal quantum gates, through which the combined operation of the quantum state, that is, on the quantum state of the amplitude and phase, respectively, for processing. The mathematical expression of quantum neuron is:

= ym

π 2

L

∑l f (θlm ).il

(5)

g (λm ) − arg(um )

(6)

um =

z m = f ( ym ) Among them, g ( x) =

(7)

1 . By equation (3) (4) know that equation (5) is the door of a phase 1 + exp(− x)

shift, equation (6) - (7) are the two controlled NOT gates Quantum Neural Networks Based on the multi-layer feed forward neural network mentioned in the literature [1], the author here instead this quantum neural network of hidden layer neurons, to construct a harmonic detection circuit according to quantum neural network, such as Figure 2: X1

Y1

X2

Y2

X3

QNN

A3

Y3 A5

Xi

Yi

Figure 2. the quantum neural network

340

Yueling Li and Xinghua Wu / Physics Procedia 24 (2012) 337 – 344 Author name / Physics Procedia 00 (2011) 000–000

With a hidden layer neurons, the figure has two output: A3 and A5, corresponding to the waveform under test in the 3rd and 5th harmonic amplitude. 4.

Quantum neural network for harmonic detection scheme A .The characteristics of harmonic currents of Power system

Non-linear load (especially the rectifier type nonlinear load) generated by the waveform distortion in analysising a typical power system and found that the proportion of total harmonic is small, and mostly is odd harmonic. Generally, each of harmonic amplitude does not exceed 50% of fundamental amplitude and the higher harmonic number is, the smaller magnitude will be. Thus, non-sinusoidal periodic current that generated by nonlinear loads in the system will spread out by Fourier series as follows:

iL (t ) = I1m sin(ω t ) + I 3 m sin(3ω t + ϕ 3 )

+ I 5 m sin(5ω t + ϕ5 ) + ""

(8) Among them, the more common situation is ϕ i =0°or ϕ i =180° ( i =3, 5…). According to above, the distortion produced by nonlinear load waveform has two characteristics: (1) contains odd harmonic components (2) The odd harmonics of the initial phase, ϕ i =0°or ϕ i =180°( i =3,5…) This type can reduce the number of training samples and form a more

targeted training samples, so the quantum harmonic detection circuit will be more simple. To form quantum neural network training samples

Training samples is composed by the fundamental waveform and odd harmonics. Allow the amplitude of fundamental wave from 0 to 10% of the fundamental amplitude of the interval gradually upward growth, but no more than 50% of fundamental amplitude. Using quantum neural networks in the measuring circuit of Figure 2 to measure the waveform distortion of the 3 rd and 5 the harmonics. To illustrate the method, where the amplitude of the fundamental is set 1, so the input non-sinusoidal periodic current in Figure 2 Measurement of quantum neural network is:

iL (t ) = sin(ω t ) + A3 sin(3ω t + ϕ3 ) + A5 sin(5ω t + ϕ 5 )

In (9), when the initial phase of when

ϕi

(9)

is fixed, the case should be 36 sets of training samples. For example,

ϕ i =0° ( i =3, 5…), the corresponding

target value is:

T= {﹙0.0 0.0)﹙0.0 0.1)﹙0.1 0.0)﹙0.1 0.1)…﹙0.2 0.2)﹙0.2 0.3)﹙0.3 0.3) ﹙0.3 0.4)﹙0.4 0.0) ﹙0.4 0.1)﹙0.5 0.0)﹙0.5 0.5)} Type x, y in ﹙x, y) represent the 3rd and 5th harmonic current amplitude, a total of 36 target. Let the early phase of harmonic currents﹝φ3=180°, φ5=0°﹞﹝φ3=0°φ5=180°﹞﹝φ3=180°, φ5=180°﹞ build up ﹙ − x , y ) ﹙ x y ) ﹙ − x − y ), a total of 121 training samples. Quantum neural network learning and training As a result of the same harmonic of the algorithm formula, listed only harmonic of 3and 5 here. A periodic non-sinusoidal current i , Quantum neural network input x is a value of one of the n sampling period, the learning method of mathematical expression is as follows: n

π

h j = ∑ f (θij ) f ( xi ) 2 i

(10)

π

g (δ j ) − arg(h j ) 2 z j = f (u j )

= uj

y j = ⎡⎣imag ( z j ) ⎤⎦ = ol

341

Yueling Li and Xinghua Wu / Physics Procedia 24 (2012) 337 – 344 Author name / Physics Procedia 00 (2011) 000–000

f= 2 ( yj )

(12)

2

(13)

m

∑y w j =1

(11)

j

jl

− θl

(14)

Where, the linear activation function, that is: because the simulation results show that the output of this network is more accurate mapping of the input. Xi presents one of the i sample of a real vector, it is the actual characteristics of the normalized numerical values, n is the number of input vectors, m is the hidden number of neurons in the quantum, θ ij represents the first input i neuron to hidden layer j

δ j is the hidden layer quantum rotation to the output layer l neurons , θ l is the

neurons of the first quantum phase transformation parameters, parameters, w jl is the weights of the j hidden layer neurons

threshold of the l neurons of output layer, oi represents the i output of the sample。 Training methods with each sample, the error function is:

1 1 E = (dl − ol ) 2 =Δ l2 2 2

(15) Where d l is the desired output and ol is the actual output Calculate changes in each of layer error

back propagation by adjusting phase rotation factor and phase control factor, then calculate the changes in each layer back-propagation error. Using the traditional gradient descent method to adjust θ ij , w jl ,

δ j and oi , the mathematical formula of training in the learning process is as follows: For the weights of w jl and thresholds of θ ij in the output layer, consequential amendments to the formula:

w jl (k += 1) w jl (k ) + η y j Δ l

(16)

θ (k + 1) = θ ( k ) − ηΔ l Hidden layer neurons for the quantum phase rotation factor amendments to the formula:

Δθij =ηΔl wjl

∂y j ∂z j ∂u j ∂z j ∂u j ∂i j

= ηΔlw jlimag(z j )imag(iz j ). -1

imag(hj ) 2 1 +( ) real(hj )

.

θ ij

(17) and control factor δ j , consequential

342

[cos(θij +

π

Yueling Li and Xinghua Wu / Physics Procedia 24 (2012) 337 – 344 Author name / Physics Procedia 00 (2011) 000–000

xi ) + sin(θij +

2 (real (h j )) 2

π

2

xi )] (18)

θij (k = + 1) θij (k ) − Δθij Δδ j = η

π 2

Δ l w jl

(19)

∂y j ∂z j ∂u j ∂z j ∂u j ∂δ j

g (δ j )(1 − g (δ j ))

δ j (k = + 1) δ j (k ) − Δδ j

= η

π 2

Δlw jlimag(z j )imag(iz j ). (20) (21)

Whereη is learning rate, and usually values 0 and 1. By constantly adjusting the phase rotation factor and control factor, until the target date calculation error is less than expected. 5.

Simulation

Use Matlab to program algorithm and to form quantum neural network as shown in Figure 2. . Training steps are as follows: ﹙1)Give small random initial value to the phase rotation factor θ ij , phase control factors δ j , weights w jl and threshold oi respectively. ﹙2)The training sample, which is the value of the harmonic currents, is normalized and quantified by equation (10 ). ﹙3)Each of the samples will be quantized input value added to the quantum neural network input layer, using (11) - (14) to calculate the output of quantum neural network, and compared with the target value. ﹙4)Update phase rotation factor θ ij , phase control factor δ j , weight w jl and threshold oi according to equation (15) - (21). ﹙5)Return to step (2), repeat the above steps, join all the training samples into the network until they are all completed ﹙6)To determine whether the average error meet the requirements. If the error is greater than the pre-set, then return to step (2) and continue, otherwise the values stored for later use. Use off-line training methods and take fundamental frequency of 50Hz. In a cycle of the waveform distortion sampling 20 points, corresponding to the network of 20 input nodes. Use the 8 hidden layer nodes and 2 output nodes by experience and correspond the values of A3 and A5 respectively .Training error is set to 0, with the simulation model to obtain the training samples, the average error is about 9.34×10-8after 1000 iterations.

Yueling Li and Xinghua Wu / Physics Procedia 24 (2012) 337 – 344 Author name / Physics Procedia 00 (2011) 000–000

Figure 3. Training eror curve between QNN and BP

Figure 3 shows average error curve when QNN and BP were used. The input of network is 20 sampling points and the 8 neurons are in hidden layer. Figure shows the training error, in the same condition, the error precision where use quantum neural network is higher than where use the traditional BP, average precision can be achieved 9.34×10-8. Table 1:

measuring results of untrained samples with trained Quantum Neural Networks Samble

iL

1

2

3

4

5

6

7

8

9

actual value

measur ements

absolute error

error

A3

0.34

0.3355

0.0045

1.32%

A5

0.34

0.3403

0.0003

0.088%

A3

0.34

0.3365

0.0035

1.03%

A5

0.36

0.3622

0.0022

0.61%

amplitude

A3

0.34

0.3374

0.0026

0.76%

A5

0.38

0.3841

0.0041

1.08%

A3

0.36

0.3562

0.0038

1.06%

A5

0.34

0.3426

0.0026

0.76%

A3

0.36

0.3572

0.0028

0.78%

A5

0.36

0.3643

0.0043

1.19%

A3

0.36

0.3582

0.0018

0.5%

A5

0.38

0.3861

0.0061

1.61%

A3

0.38

0.3772

0.0028

0.74%

A5

0.34

0.3446

0.0046

1.35%

A3

0.38

0.3783

0.0017

0.45%

A5

0.36

0.3661

0.0061

1.69%

A3

0.38

0.3792

0.0008

0.21%

A5

0.38

0.3868

0.0068

1.79%

Table 1 show that the well trained quantum neural network is better than traditional BP network on the training samples which are not measured. Its precision is very high, and verified the feasibility of the proposed algorithm.

343

344

Conclusion

Yueling Li and Xinghua Wu / Physics Procedia 24 (2012) 337 – 344 Author name / Physics Procedia 00 (2011) 000–000

In the case of large amount of information processing, speed of neural network is too slow in the traditional sense of learning, the network memory capacity is limited, such defect as catastrophic phenomena of amnesia network will occur in accepting new information, then the research where combine neural computation and other theories is brought forward. This article will apply quantum theory to the traditional BP neural network, quantum neural structure as a hidden layer of the network and use the network into harmonic measurement of power system. Using the trained neural network to measure the samples that are not trained, the network can achieve a higher harmonic measurement accuracy from the test results. Although the proposed detection method is given only to the 3rd harmonic and 5th harmonic of the training and simulation, the method can be extended to any number of times higher harmonics. Simulation results show that as long as there are enough appropriate samples, quantum neural network can achieve a higher harmonic detection accuracy. References [1]

Wang Qun , Wu Ning , Wang Zhaoan . A measuring approach of power harmonics based on artificial neural

network[J].Auromation of Electric Power Systems,,1998,22(11):35-39. [2]

Tang Shengqing,Cheng Xiaohua,A Harmonic Measuring Approach Based on Multilayered Feed Forward Neural

Network[J],Proceedings of the CSEE,2006 ,26(18):90-94 [3]

Huang Guohong , Xiong Zhihua , Shao Huihe . A New Classification Algorithm Based on Constructive Neural

Networks [J].Chinese Journal of Computers,2005,28(9):1519-1523. [4]

Liang Jiuzhen,He Xingui,Huang Deshuang.Super-Linearly Convergent BP Learning Algorithm for Feedforward

Neural Networks[J].Journal of Software, 2000,11(8):1094-1096. [5]

Xie Guangjun.Research on Quantum Neural Computational Models[J].Journal of Circuits and Systems

[6]

Lv Qiang,Yu Jinshou.Structure design of quantum neural unit and its application[J],Control and Decision,2007,

22(9):1022-1026. [7]

Sun Baiqing,Pan Qishu,Feng Yingjun,Zhang Changsheng.Improvement of BP network training rate[J].Journal

of Harbin Institute of Technology,2001,33(4):439-441 [8]

Liu Yiming.Improvement of Quantum Neural

[9]

Tang Shengqing , Cheng Xiaohua . A harmonic measuring approach based on multilayered feed forward neural

network[J].Proceedings of the CSEE,2006,26(18):90-94(in Chinese). [10] Xiao Yanhong , Mao Xiao , Zhou Jinglin , et al . A survey on measuring method for harmonics in power system[J].Power System Technology,2002,26(6):61-64(in Chinese). [11] Huang N E,Shen Z,Long S R,et al.The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis[J].Proceedings of the Royal Society of London Series A,1998,45(4):903-995. [12] Dixon J W,Garcia J J,Moran L.Control system for three-phase active power filter which simultaneously compensates power factor and unbalanced loads [J].IEEE Trans on Industrial Electronics,1995,42(6):636-641.