Summary of the invention
The object of the invention is exactly in order to address the above problem; A kind of method of predicting gas dissolved in oil of power trans-formers is provided; It adopts particle swarm optimization algorithm and associated vector machine method; Value based on leave-one-out method construct fitness function optimization nuclear parameter has the reliability of equilibrium criterion and the advantage of complexity of calculation.
To achieve these goals, the present invention adopts following technical scheme:
A kind of method of predicting gas dissolved in oil of power trans-formers, concrete steps are:
The first step: transformer oil dissolved gas data are carried out necessary processing, form the constant duration data, A=[a
1, a
2..., a
n], a
nBe the gas concentration data, n is a natural number, and then training sample data input X constructs by following mode with output Y:
X wherein
iBe input vector, y
iBe output valve, i ∈ 1,2 ... N-m}, m are the dimensions of input vector, and m is a natural number, n>M;
Second step: set up the fast correlation vector machine model;
The 3rd step: the value that adopts particle swarm optimization algorithm and leave-one-out method construct fitness function to optimize nuclear parameter is optimized kernel function;
The 4th step: bring training data into the fast correlation vector machine model, obtain associated vector and corresponding weight thereof.
Concrete steps in said second step are:
(1) set up relation between desired value and the property value:
Wherein, { x
i}
N I=1Be property set, x
i=[ξ
1, ξ
2..., ξ
m], m is a dimension, { t
i}
N I=1Be the object set of correspondence, i is any one in 1 to N, x
iWith t
iCorresponding, t
iFor greater than 0 real number, ξ
mFor greater than 0 real number, K (x
n.x
i) be kernel function, said kernel function is a gaussian kernel function; ω
iBe basis function ф
i=[K (x
1.x
i), K (x
2.x
i) ..., K (x
N.x
i)]
TCorresponding weight, ω=[ω
0, ω
1... ω
M], N is a number of samples, ε
nBe noise, satisfy Gaussian distribution N (0, σ
2), t then
nMeet the expectation and be y (x
n,, ω), variance is σ
2Gaussian distribution, wherein, N, M, m, n are natural number, have:
Wherein, t=[t
1, t
2, t
3... T
N], w=[ω
0, ω
1... ω
M], Φ is by basis function ф
iThe matrix of forming:
Wherein, and ω Gaussian distributed N (0, α
-1), ω is corresponding one by one with ultra ginseng α, and α is the real number greater than 0;
(2) make β=σ
-2, and make β and α all obey the Gamma distribution, that is:
Wherein, a, b, c, d generally are made as very little numerical value, as 10
-4
(3) one group of new attribute variable x* of input, x* is the real number greater than 0, its corresponding desired value is that t* then has:
p(t*|t)=∫p(t*|ω,α,σ
2)*
p(ω,α,σ
2|t)dωdαdσ
2 (9)
Derive by Bayes, can get:
p(ω,α,σ
2|t)=p(ω|t,α,σ
2)p(α,σ
2|t) (10)
(4) formula (10) is carried out approximate processing, formula first in the right can show with quantic, and second portion uses the delta function to be similar to, and the learning process of associated vector machine just becomes maximization p (α, σ like this
2| t) ∝ p (t| α, σ
2) p (α) p (σ
2) process, promptly find α
MP, σ
2 MP, MP is a real number, t is a desired value, satisfies:
(5) pass through border likelihood function or its logarithmic form (formula 9) maximizing are found the solution formula (8):
Wherein: C=σ
2I+ Ф A
-1Ф
T, I is a unit matrix;
(6) fast algorithm of use associated vector machine shortens the training process of associated vector machine, and C is decomposed by following mode:
(13)
(7) bring formula (10) into formula (9), obtain:
Wherein, define sparse factor s here
i: s
i=φ
TC
-1φ
iQuality factor q
i: q
i=φ
T iC
-1T; Through to the l (α in the formula (14)
i) analysis, drawing L (α) has unique maximal value, when:
In order to simplify calculating, definition: S
i=ф
TC
-1ф
iQ
i=ф
T iC
-1T; Get by formula (10):
Wherein, B=σ wherein
-2I; By formula (17) and formula (18) and combine s
iWith q
iDefine:
Concrete steps in said the 3rd step are:
(1) one group of particle position of initialization and speed;
(2) adaptive value of calculating particle; Take the leave-one-out method that fitness function is set; If k group data are arranged in the former training set; Leave-one-out is undertaken by following mode: therefrom remaining k-1 organizes as training set one of picked at random as test set, will predict the outcome and the actual value comparison.Above process is carried out k time, and k is the natural number greater than 1, with its mean absolute error number percent as the adaptive value function:
y
iBe actual value, y
ItBe predicted value, adaptive value is more little, and representative is separated more excellent;
(3) upgrade the overall situation and individual optimal value based on adaptive value result of calculation;
(4) according to formula (18) computing velocity value, according to formula (19) place value of new particle more;
(5) repeat (2)-(4), up to satisfying iterated conditional or reach iterations, output optimized parameter value.
The concrete steps of said fast correlation vector machine algorithm are following:
(1) rational initialization σ
2
(2) basis function ф of initialization
i, make simultaneously
I is a value in 1 to m, other α
mBe made as infinity;
(3) M basis function calculated its corresponding Σ and μ, calculate its s simultaneously
iAnd q
i, ∑=(σ wherein
-2Φ
TΦ+A)
-1, μ=σ
-2∑ Φ
TT, A=diag (α);
(4) from all M basis function, choose a ф
i
(5) calculated theta
i=q
i 2-s
i
(6) if θ
i>0, and α
i<∞ (ф
iIn model), reappraise α
iValue;
(7) if θ
i>0, and α
i<∞ is with ф
iJoin in the model and renewal α
i
(8) if θ
i<0, and α
i<∞ is with ф
iFrom model, delete, and upgrade α
iBe infinity;
(9) upgrade σ
2
(10) recomputate Σ and μ, s
iAnd q
i
(11), otherwise got back to for the 4th step if satisfy iterated conditional then release.
Said transformer is the oil-filled transformer of all electric pressures.
Said input vector dimension not only comprises value in the literary composition, also gets different values based on data cases and practical application.
Beneficial effect of the present invention: the present invention introduces associated vector machine fast algorithm and overcomes the slow-footed shortcoming of traditional associated vector computes; Adopt particle swarm optimization algorithm; And optimize the value of nuclear parameter based on leave-one-out method construct fitness function, preferably between the reliability and complexity of calculation of equilibrium criterion; Introducing the average absolute percent difference estimates predicting the outcome.
Embodiment
Below in conjunction with accompanying drawing and embodiment the present invention is described further.
As shown in Figure 1, be the flow process of setting up oil dissolved gas concentration prediction model of the present invention, a kind of method of predicting gas dissolved in oil of power trans-formers is characterized in that, concrete steps are:
The first step: transformer oil dissolved gas data are carried out necessary processing, form the constant duration data, A=[a
1, a
2..., a
n], a
nBe the gas concentration data, n is a natural number, and then training sample data input X constructs by following mode with output Y:
X wherein
iBe input vector, y
iBe output valve, m is the dimension of input vector, i ∈ 1,2 ... N-m}, m are the dimensions of input vector, and m is a natural number, n>M;
Second step: set up the fast correlation vector machine model;
The 3rd step: the value that adopts particle swarm optimization algorithm and leave-one-out method construct fitness function to optimize nuclear parameter is optimized kernel function;
The 4th step: bring training data into the fast correlation vector machine model, obtain associated vector and corresponding weight thereof.
Compiling Matlab program is verified above method.
The oil dissolved gas concentration prediction mainly is to the gas that can characterize transformer fault, comprises hydrogen (H
2), methane (CH
4), ethane (C
2H
6), ethene (C
2H
4) and acetylene (C
2H
2) etc.Under Matlab numerical simulation environment, the model that this paper proposes is verified.Certain transformer oil chromatographic data is as shown in table 1, and all gases concentration is fluctuation type ascendant trend, because of serious overheated or discharge fault, C do not take place
2H
2Concentration is 0.Adopt the oil dissolved gas concentration prediction model that proposes in the literary composition gas concentration to be predicted choosing date 2005-1-22 to 2005-1-31 is training set, the gas concentration of 2-1 is predicted the input vector dimension is chosen as 4 based on PSO-FRVM.The nuclear parameter value of optimizing is listed in the table 2 (because of C with predicting the outcome
2H
2Concentration is 0 always, so will not show among the result).
Can draw through table 2, different for the nuclear parameter numerical value that different gas data optimization obtains, further verified the importance of nuclear parameter to forecast model; The difference of prediction result and actual value is very little, and the validity of model has obtained good checking.
Predicted results that the present invention carries and other method (are comprised particle optimization SVMs (PSO-SVM); Gray model (GM) and artificial neural network (ANN)) compare; Comparative result is as shown in table 3, has listed file names with predicted value and average absolute percent difference.
represents the actual value of gas concentration.Through relatively drawing, based on the PSO-FRVM predicted results except C
2H
4The error that predicts the outcome greater than outside the PSO-SVM model, all the other results' accuracy rate all will be higher than other method, and very little with the difference of actual value; Need be optimized differently to three parameters with PSO-SVM, what the present invention proposed only need be optimized parameter of gaussian kernel function, so the PSO-FRVM model has also been simplified complexity of calculation when improving estimated performance.
Table 1
Table 2
Said transformer is the oil-filled transformer of all electric pressures.
Said input vector dimension not only comprises value in the literary composition, can get different values based on data cases and practical application.
Though the above-mentioned accompanying drawing specific embodiments of the invention that combines is described; But be not restriction to protection domain of the present invention; One of ordinary skill in the art should be understood that; On the basis of technical scheme of the present invention, those skilled in the art need not pay various modifications that creative work can make or distortion still in protection scope of the present invention.