Electrical power system transient frequency predication model update method based on data inheritance thought
Technical field
The present invention relates to electric system Situation Awareness and trend prediction technology fields, especially a kind of to be thought based on data inheritance
The electrical power system transient frequency predication model update method thought.
Background technique
Power grid is largely accessed with new energy such as photovoltaic, wind-powered electricity generations and gradually replaces normal power supplies, and the equivalent inertia of system is gradually
Reduce, causes system transient modelling problem especially transient frequency safety problem more serious, be unfavorable for the safety and stability of electric system
Operation.Quick predict electrical power system transient frequency, for taking emergent control measure in time, and then it is steady to improve power system security
It is qualitative significant.
In recent years, artificial intelligence and machine learning rapidly develop, and machine learning method is because its predetermined speed is fast and is good at digging
The characteristics of digging non-linear relationship between data, the shortcomings that capable of effectively making up conventional electric power system transient modelling frequency analysis method,
Electrical power system transient frequency analysis is applied to by numerous scholars.Machine learning method answering in electrical power system transient frequency analysis
With being substantially by the way of off-line training, application on site, need abundance, accurate sample each non-thread to be fitted electric system
The response characteristic of property link is to promote the precision of prediction of transient frequency.But the number that transient fault occurs for real system is less,
Lack of training samples is difficult to sufficiently reflect non-thread between data using the frequency predication model that historical sample data training obtains
Property connection, cause precision of prediction not high.
In practical power systems operation, there is the process gradually accumulated in transient fault sample, by newly-increased transient fault
The study of sample can facilitate the precision of prediction for promoting transient frequency with renewal frequency prediction model.At any time may to cope with
The transient fault of generation, the update of frequency predication model needs online progress, to propose to the renewal speed of model higher
Requirement.But electrical power system transient frequency is predicted based on traditional machine learning method, it needs to use in model modification complete
The historical data in portion leads to many historical data repetition trainings, so that model modification is inefficient.
It therefore, is artificial intelligence how using the transient fault sample newly increased fast and effeciently renewal frequency prediction model
The main problem that can be faced in electrical power system transient frequency predication field.
Summary of the invention
Goal of the invention: in view of this, the purpose of the present invention is to propose to a kind of electric system based on data inheritance thought is temporary
State frequency predication model update method.This method has excavated the connection between historical frequency prediction model and historical data, will count
It is applied to frequency predication model modification process according to thought is inherited.This method is on the basis of Historical heritage frequency predication model, root
Online updating is carried out to historical frequency prediction model according to newly-increased transient fault sample, to realize fast and effeciently renewal frequency
Prediction model promotes frequency predication performance, helps to formulate and take emergent control measure in time.
Technical solution: for achieving the above object, the technical solution adopted in the present invention is as follows:
A kind of electrical power system transient frequency predication model update method based on data inheritance thought, includes the following steps:
(1) limit of utilization learning machine ELM algorithm is trained history transient fault sample, generates historical frequency and predicts mould
Type;Active power injection rate, the reactive power injection of each node when wherein history transient fault sample data includes systematic steady state
Power disturbance percentage when amount, line voltage amplitude, phase angle and transient fault, the frequency minimum, frequency after failure are minimum
It is worth moment and frequency steady-state value;
(2) real-time monitoring system operating status judges whether that transient fault occurs;
(3) if transient fault occurs for electric system, the system operation data before and after failure is collected, is entered step (4), it is no
Then continue return step (2);
(4) on the basis of historical forecast model, frequency predication model is carried out more using newly-increased transient fault sample
Newly, new prediction model is obtained.
Further, the generating process of historical frequency prediction model includes the following steps: in the step (1)
(11) history transient fault sample is collected;History transient fault sample includes target variable and characteristic variable;Target
Variable includes the frequency minimum f after failure1, frequency minimum moment f2And frequency steady-state value f3;Characteristic variable includes that system is steady
The active power injection rate P of i-th of node when statei, reactive power injection rate Qi, line voltage amplitude Vi, phase angle thetai, i ∈ 1,2,
N } and power disturbance percent delta P when transient fault;N is electric system number of nodes;
(12) feature extraction is carried out to history transient fault sample according to genetic algorithm, obtains training sample;
(13) sample is trained using ELM algorithm, obtains historical forecast model.
Further, step (12) specifically include:
(121) binary coding is carried out to feature each in history transient fault sample, 1 represents selection this feature, takes 0 representative
Do not select this feature;
(122) population primary is generated at random, and the binary number that wherein each individual is one p represents a kind of feature
Selection scheme;P is characterized number;
(123) fitness of each individual in population is calculated;
(124) if the fitness of individual optimal in population is still undesirable, genetic iteration is carried out to the population and is obtained
To new population, including selection, intersection, variation, and continue step (123);Otherwise the corresponding featured aspects of optimum individual are taken to be
Local optimum feature set.
Further, step (13) specifically includes:
(131) construct ELM Single hidden layer feedforward neural networks, the neural network input layer be step (12) extract with it is temporary
The electric parameter of state frequency dependence, output layer are transient frequency minimum, minimum moment or steady-state value;Network hidden layer section is set
Point number and the connection that input layer and hidden node are completed by way of randomization;
(132) its mathematical expression form is obtained according to ELM model:
In formula: ai=[ai1,ai2,…,aip]TIt is the weight vectors for connecting input unit and i-th of hidden node, p is defeated
Enter characteristic, biIt is i-th of hidden node offset parameter of randomization, βi=[βi1,βi2,…,βim]TIt is i-th of hidden layer of connection
The weight vectors of node and output unit, m are prediction target number, ai·xiIndicate the inner product of the two, L is of hidden node
Number, g is activation primitive;
(133) optimize following formula objective function:
min||Hβ-T||2
In formula: H is neural network hidden layer output matrix, and β is output weight matrix, and T is desired output matrix, and N is sample
Quantity;
In formula:For the transposition of the output weight vectors of i-th sample,For the desired output vector of i-th sample
Transposition;
Optimal output weight is calculated according to the following formula:
In formula:For optimal output weight matrix,It is the Moore-Penrose generalized inverse of matrix H.
Further, corresponding input feature vector is selected first according to the corresponding feature selecting scheme of individual in step (123)
And export feature construction training sample and test sample;Then it is trained by ELM and obtains transient frequency predicted value, and according to
Following formula calculates fitness of the root-mean-square error RMSE as the individual:
Wherein: f (xi) indicate i-th of sample predicted value, yiIndicate the actual value of i-th of sample, N is test sample number
Amount.
Pair further, the renewal process of prediction model neural network based is equivalent to the amendment to model parameter, i.e.,
The amendment of two layers of mapping relations;Specific implementation is only to be updated to the weight of second layer Linear Mapping.
Further, in step (4), the specific implementation step of kth+1 time update includes:
(41) according to newly-increased transient fault more new samples, ELM hidden layer output matrix is updated by following formula:
Hk+1=[Hk ΔH]T
In formula: Hk+1For updated hidden layer output matrix, HkFor the hidden layer output matrix of historical forecast model, Δ H is new
The corresponding hidden layer output matrix of data;
(42) according to newly-increased transient fault more new samples, expectation output matrix is updated by following formula:
In formula: Tk+1For updated desired output matrix, TkFor the desired output matrix of historical forecast model, Δ T is new
The corresponding desired output matrix of data;
(43) it is calculate by the following formula to obtain updated output weight matrix βk+1:
In formula: βkFor the output weight matrix of historical forecast model, Pk+1For the intermediate variable in+1 renewal process of kth,
I is unit matrix;Wherein as k=0,H0The hidden layer output of historical forecast model when to update for the first time
Matrix.
The utility model has the advantages that the invention proposes a kind of electrical power system transient frequency predication model based on data inheritance thought is more
New method.Compared with the conventional method, data inheritance thought is applied to frequency predication model modification process by this method, can basis
Newly-increased transient fault sample quickly updates historical frequency prediction model, promotes frequency predication performance.This method is applicable
In the less electrical power system transient frequency predication scene of historical sample, help to formulate and take emergent control measure in time,
It is of great significance to maintaining power system stability to run.
Detailed description of the invention
Fig. 1 is the method flow schematic diagram of the embodiment of the present invention;
Fig. 2 is the IEEE39 node system topological diagram containing wind-powered electricity generation of the embodiment of the present invention;
Fig. 3 is the ELM Single hidden layer feedforward neural networks structural schematic diagram of the embodiment of the present invention.
Specific embodiment
As shown in Figure 1, a kind of electrical power system transient frequency based on data inheritance thought provided in an embodiment of the present invention is pre-
Survey model update method, comprising:
Step S1: limit of utilization learning machine ELM algorithm is trained history transient fault sample, and it is pre- to generate historical frequency
Survey model;
Step S2: real-time monitoring system operating status judges whether that transient fault occurs;
Step S3: if transient fault occurs for electric system, the system operation data before and after failure is collected, is entered step
Otherwise S4 continues return step S2;
Step S4: on the basis of historical forecast model, using newly-increased transient fault sample to frequency predication model into
Row updates, and obtains new prediction model.
The present embodiment is analyzed with the modified IEEE39 node of real topology, wherein the thermoelectricity use etc. of No. 1 node
The blower of capacity replaces, and structure chart is as shown in Figure 2.
The test macro is built in PSCAD/EMTDC, and thermoelectricity total capacity is 8630MW, system total load base value in system
For 6150MW, load level is in normal distribution (μ=1, δ=0.067), and blower rated wind speed is 11m/s, and fluctuations in wind speed is in normal state
It is distributed (μ=11, δ=0.0333), emulation cuts off a generator in 10s at random.
Further, the generation of historical frequency prediction model can specifically be divided into following steps in step S1:
Step S11: collecting history transient fault sample, and sample includes transient frequency target variable and according to electric system
Theoretical knowledge analyzes electrical quantity relevant with transient frequency.According to the analogue system, 20 groups of sample of random generation is temporary as history
State fault sample.For 39 node system, the wattful power of i-th of node when history transient fault sample includes systematic steady state
Rate injection rate Pi, reactive power injection rate Qi, line voltage amplitude Vi, phase angle thetai, power disturbance percent delta P when transient fault
And the frequency minimum f after failure1, frequency minimum moment f2, frequency steady-state value f3;
Step S12: feature extraction is carried out to history transient fault sample according to genetic algorithm, obtains training sample;
Step S13: limit of utilization learning machine (extreme learning machine, ELM) is trained sample, obtains
To historical forecast model.
In the present embodiment, feature extraction is carried out to history transient fault sample according to genetic algorithm described in step S12,
It mainly comprises the steps that
Step S121: carrying out binary coding to feature each in history transient fault sample, and 1 represents selection this feature, takes 0
Representative does not select this feature;
Step S122: generating population primary at random, and the binary number that wherein each individual is one p represents one kind
Feature selecting scheme;P is characterized number, is 157 in this example;
Step S123: the fitness of each individual in population is calculated;
Step S124: if the fitness of individual optimal in population is still undesirable, heredity is carried out to the population and is changed
In generation, obtains new population, including selection, intersection, variation, and continues step S123;Otherwise the corresponding featured aspects of optimum individual are taken
For local optimum feature set.
Further, training sample is trained to obtain historical forecast using ELM described in step S13 in the present embodiment
The method of model, detailed process distinguish following steps:
Step S131: building ELM Single hidden layer feedforward neural networks, concrete structure diagram are as shown in Figure 3.For electric system
Transient frequency forecasting problem, network input layer are electric parameters relevant to transient frequency, and output layer is the key that transient frequency
Feature, i.e. transient frequency minimum, minimum moment or steady-state value.According to input, the number of nodes of output layer, network hidden layer is set
Node number and the connection that input layer and hidden node are completed by way of randomization.In the present embodiment, ELM algorithm is adopted
With sigmoid activation primitive, hidden node number is set as 23.
Step S132: its mathematical expression form is obtained according to classical ELM model:
In formula: ai=[ai1,ai2,…,aip]TIt is the weight vectors for connecting input unit and i-th of hidden node, biBe with
I-th of hidden node offset parameter of machine, βi=[βi1,βi2,…,βim]TIt is i-th of hidden node of connection and output unit
Weight vectors, m are prediction target number, ai·xiIndicate the inner product of the two, L is the number of hidden node, and g is activation primitive.
Step S133: optimization following formula objective function:
min||Hβ-T||2
In formula: H is neural network hidden layer output matrix, and β is output weight matrix, and T is desired output matrix, and N is sample
Quantity.
In formula:For the transposition of the output weight vectors of i-th sample,For the desired output vector of i-th sample
Transposition.
Optimal output weight is calculated according to the following formula:
In formula:For optimal output weight matrix,It is the Moore-Penrose generalized inverse of matrix H.
Further, the fitness of each individual in population is calculated in the present embodiment described in step S124, specifically: it is first
First according to the corresponding feature selecting scheme of individual, corresponding input feature vector and output feature construction training sample and survey are selected
Sample sheet.Then transient frequency predicted value is obtained by ELM training, and calculates root-mean-square error RMSE according to the following formula as this
The fitness of body:
Wherein: f (xi) indicate i-th of sample predicted value, yiIndicate the actual value of i-th of sample, N is test sample number
Amount.
Further, the renewal process of prediction model neural network based is equivalent to repair model parameter in step S4
Just, i.e., the amendment to two layers of mapping relations;Such as table 1, concrete implementation mode has following 4 kinds, and the layer is reflected in wherein √ expression
Weight is penetrated to be updated, × indicate not to be updated this layer mapping weight:
1 network model parameter update mode of table
The 4th kind of update mode is selected in the present embodiment, consider primarily for two o'clock: 1. due to transient fault time scale
It is shorter, need quickly to carry out the update of model, therefore only consider to update one layer of mapping;2. in neural network, first layer mapping
To be non-linear, the second layer is mapped as linearly.And the renewal speed of Linear Mapping layer is considerably more rapid, therefore selection scheme four.
Frequency predication model update method described in the present embodiment, updates the specific implementation steps are as follows institute kth+1 time
Show:
Step S21: according to newly-increased transient fault more new samples, hidden layer output matrix is updated by following formula:
Hk+1=[Hk ΔH]T
In formula: Hk+1For updated hidden layer output matrix, HkFor the hidden layer output matrix of historical forecast model, Δ H is new
The corresponding hidden layer output matrix of data.
Step S22: according to newly-increased transient fault more new samples, expectation output matrix is updated by following formula:
In formula: Tk+1For updated desired output matrix, TkFor the desired output matrix of historical forecast model, Δ T is new
The corresponding desired output matrix of data.
Step S23: it is calculate by the following formula to obtain updated output weight matrix βk+1:
In formula: βkFor the output weight matrix of historical forecast model, Pk+1For the intermediate variable in+1 renewal process of kth,
I is unit matrix;Wherein as k=0,H0The hidden layer output of historical forecast model when to update for the first time
Matrix.
Particularly, in the present embodiment, the method for the present invention and based on the model update method of ELM in the model training time and
Comparison on precision of prediction is as shown in the table:
2 two kinds of transient frequency prediction technique model training time comparisons of table
The precision of prediction of 3 two kinds of frequency predication methods of table compares
As can be seen from the data in the table, compared to the electrical power system transient frequency predication method that non-data is inherited, the present invention
Method precision of prediction is higher, and can faster promote frequency predication precision.