CN113887786A - PSO-LSTM-based primary frequency modulation capability evaluation and prediction system - Google Patents
PSO-LSTM-based primary frequency modulation capability evaluation and prediction system Download PDFInfo
- Publication number
- CN113887786A CN113887786A CN202111072152.9A CN202111072152A CN113887786A CN 113887786 A CN113887786 A CN 113887786A CN 202111072152 A CN202111072152 A CN 202111072152A CN 113887786 A CN113887786 A CN 113887786A
- Authority
- CN
- China
- Prior art keywords
- lstm
- frequency modulation
- data
- primary frequency
- model
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/067—Enterprise or organisation modelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
- G06Q50/06—Electricity, gas or water supply
Abstract
The invention relates to a PSO-LSTM-based primary frequency modulation capability evaluation and prediction system, which comprises the following steps: collecting historical data in a DCS (distributed control System) of a thermal generator set; processing the acquired data to obtain effective data capable of reflecting the primary frequency modulation process; selecting a training set and a verification set of data, and determining input and output variables of the model; constructing an LSTM neural network and optimizing a network model by using a PSO algorithm to obtain a PSO-LSTM-based primary frequency modulation capability evaluation and prediction model; according to the method, variable factors influencing the primary frequency modulation capability are determined by utilizing historical operating data of the thermal power generating unit, the method for evaluating the primary frequency modulation performance is determined, the primary frequency modulation capability of the thermal power generating unit is predicted by constructing an LSTM neural network model, and a scheduling worker is assisted to perform emergency control when disturbance occurs.
Description
Technical Field
The invention relates to a PSO-LSTM-based primary frequency modulation capability evaluation and prediction system.
Background
With the rapid increase of the power demand, the peak regulation task of the generator set in China is also intensified. The primary frequency modulation capability of the generator set is a guarantee for maintaining power balance and stable operation of a power grid, and reasonable and standardized primary frequency modulation performance and parameters of the generator set play an important role in guaranteeing good primary frequency modulation capability of the generator set and optimal scheduling of the smart power grid.
Long Short-Term Memory (LSTM) neural networks can mine data-to-data links by learning historical data. Because the common recurrent neural network has the gradient disappearance problem, only short-term memory can be realized, and the problem of long-term dependence is solved. The LSTM is improved on the basis of RNN, and unlike the cycle layer in the basic structure of RNN, the LSTM uses three "gate" structures to control states and outputs at different times, i.e., "input gate", "output gate", and "forget gate". The LSTM combines short-term memory and long-term memory through a gate structure, can relieve the problem of gradient disappearance, and has good effect on data prediction and learning.
Particle Swarm Optimization (PSO) is based on random solution, and through iteration, optimal solution is found, and through fitness, the quality of the solution is evaluated. The algorithm converges on a global optimal solution with a high probability, optimizes in a dynamic multi-objective optimization environment, and has strong global search capability on nonlinear and multimodal problems. By using the method to optimize the hyper-parameters of the LSTM network, the established model can be more accurate and have better prediction level.
Disclosure of Invention
The invention aims to solve the technical problem of providing a PSO-LSTM-based primary frequency modulation capability evaluation and prediction system, which is used for predicting the primary frequency modulation capability of a thermal power generating unit and assisting a dispatcher to perform emergency control when disturbance occurs.
The technical scheme adopted by the invention is as follows:
a PSO-LSTM-based primary frequency modulation capability evaluation and prediction system is characterized by comprising the following steps:
s100: collecting historical data in a DCS (distributed control System) of a thermal generator set;
s200: processing the acquired data to obtain effective data capable of reflecting the primary frequency modulation process;
s300: selecting a training set and a verification set of data, and determining input and output variables of the model;
s400: and constructing an LSTM neural network and optimizing a network model by using a PSO algorithm to obtain a PSO-LSTM-based primary frequency modulation capability evaluation and prediction model.
Further, in S100, a total of 4 months are selected from 4 quarters of the year as historical data S of the unit operation, and the data sampling time interval is 1S.
Further, the collected data includes frequency f and load level P of the systemaActive load PbPower shortage PcAnd generating electricityInertia time constant tau and total spare capacity P of unitrAnd a power compensation amount Px。
Further, the specific steps of S200 are as follows:
s210: setting a frequency modulation dead zone delta f reflecting the primary frequency modulation to be 0.033Hz, and processing the data according to the following rules:
in formula 1, f (t) represents the frequency at time t, fNRepresenting nominal frequency fNWhen the frequency deviation exceeds a frequency modulation dead zone, determining that primary frequency modulation action is carried out according to a formula 1, otherwise, carrying out no primary frequency modulation action, wherein data in a time range of (t +1, t + n-1) is effective data, and extracting the effective data;
s220: and (4) judging the primary frequency modulation performance of the thermal power generating unit, and calculating the unequal rate of speed regulation of the thermal power generating unit according to the data processed in the step S100 and the step S210.
Further, in S220, the step of calculating the unequal speed ratio of the thermal power generating unit is as follows:
s221: in order to ensure that the value delta of the unit primary frequency modulation is 4-5% rapidly and accurately, the calculation can be carried out by the following formula:
where Δ f is the amount of change in the grid frequency, fNIs rated frequency, and is the active variable quantity p of the generator setNRated power of the generator set, f0The no-load frequency of the generator set;
s222: and judging whether the frequency modulation performance of the unit is qualified or not according to the speed regulation unequal rate calculated in the S221, wherein delta is more than or equal to 4% and less than or equal to 5%, indicating that the primary frequency modulation performance of the unit is qualified, and otherwise, indicating that the primary frequency modulation performance is unqualified.
Further, in S300, the data extracted in S200 is processed to create a related data setAnd the established data setCarrying out normalization processing, and normalizing the data to be between 0 and 1 by using a mapminmax function;
data setDividing into training set and verification set, and randomly selecting data set every month70% as training setThe remaining 30% of the data per month was used as the validation setWill train the setFrequency f, load level P of the systemaActive load PbPower shortage PcInertia time constant tau of generator set and total spare capacity PrInput variable X (k) f, P as LSTM modela,Pb,Pc,τ,Pr]The power compensation amount y and the speed regulation inequality rate δ are used as output variables y (k) of the model, [ y, δ [ ]]And solving the mapping relation of the input variable and the output variable by constructing an LSTM model.
Further, in S400, the specific steps of constructing the model of the LSTM neural network are as follows:
s410: determining an initial network structure of the LSTM neural network, determining the number of hidden layers and the number of output layers, and initializing a training step length;
s420: performing particle optimization on the number n of hidden layer neurons and the learning rate lr of the LSTM by using a particle swarm algorithm, and giving optimal parameters to an LSTM neural network model for training to obtain a PSO-LSTM-based primary frequency modulation capability evaluation and prediction model;
s430: substituting the optimal hidden layer neuron number n and the learning rate lr parameter values obtained in the step S420 into an LSTM network to obtain an optimized PSO-LSTM-based primary frequency modulation capability evaluation and prediction model, wherein the model input variables are the frequency f and the load level P of the systemaActive load PbPower shortage PcInertia time constant tau of generator set and total spare capacity PrI.e. the input variable x (k) ═ f, Pa,Pb,Pc,τ,Pr]The output variables of the model are power compensation quantity y and speed regulation inequality rate delta, namely output variable Y (k) [ y, delta ]]。
Further, in S410, an input gate i is settAnd an output gate otForgetting door ftThe activation function is a sigmoid function, and the specific steps are as follows:
s411: setting input door it=σ(wxi·Xt+whi·ht-1+bi) In the formula wxi、whiWeight matrix representing input and output respectively and weight matrix of hidden layer and input gate, biRepresenting the deviation, X, between the input layer and the output layertInput matrix representing time t, ht-1An output representing the hidden layer at time t-1;
s412: provided with an output gate ot=σ(wxo·Xt+who·ht-1+bo) In the formula wxoRepresenting input and output gate weight matrices, whoA weight matrix representing the hidden layer and the output gate;
s413: setting a forgetting door ft=σ(wxf·Xt+whf·ht-1+bf) In the formula wxf、whfRespectively representing an input gate weight matrix, a forgetting gate weight matrix, a hidden layer and an output gate weight matrix;
s414: set cell state gt=tanh(wxg·Xt+whg·ht-1+bg) In the formula wxgRepresenting the input to a memory cell weight matrix, whgRepresenting the hidden to memory cell weight matrix;
s415: setting a current state function ct=ft*ct-1+it*gtThe output for the current time is ht=tanh(ct*ot);
S416: training the built initial LSTM network model import data, and collecting the training setFrequency f, load level P of the systemaActive load PbPower shortage PcInertia time constant tau of generator set and total spare capacity PrInput variable X (k) f, P as LSTM modela,Pb,Pc,τ,Pr]The power compensation quantity y and the speed regulation unequal rate delta are used as output variables Y (k) of the LSTM model]And respectively importing the input variable X (k) and the output variable Y (k) into an LSTM network model for training to obtain a primary frequency modulation capability evaluation and prediction model based on the LSTM.
Further, the specific steps of obtaining the PSO-LSTM-based primary frequency modulation capability evaluation and prediction model in S420 are as follows:
s421: initializing parameters of a particle swarm algorithm, and determining the swarm size m, the maximum iteration number max _ d and the minimum value w of the inertial weight of the particle swarmminMaximum value w of inertia weightmaxAcceleration factor c1And c2And setting the value ranges of the number n of the neurons in the hidden layer and the learning rate lr according to the LSTM model established in S410, and setting the interval range [20,60 ] of the number of the neurons in the hidden layer]The interval range of the learning rate is [0.001,0.1 ]];
S422: according to the interval range of the hidden layer neuron number n and the learning rate lr initialized by S421, verifying the setInput variable of data x (k) ═ f, Pa,Pb,Pc,τ,Pr]The power compensation quantity is introduced into an LSTM-based primary frequency modulation capacity evaluation and prediction model trained by S416, and a predicted value of the power compensation quantity can be obtained through the output of the LSTM network modelAnd prediction of speed regulation unequal rateObtained by outputting the modelAndvalue and verification setThe following mean square error between the real value y of the power compensation quantity and the real value delta of the speed regulation unequal rate is taken as the fitness value f of the particle swarmiAnd the fitness function is defined as follows:
where N represents the verification setThe total amount of data of (a) is,denotes the power offset prediction value, y, obtained in S422nPresentation verification setThe true value of the medium power offset amount,indicating the rate of inequality of the throttle obtained in S422An estimated value ofnPresentation verification setThe actual value of the unequal rate of the medium speed regulation;
s423: optimizing the number n of hidden layer neurons and the learning rate lr of the LSTM network model established in the step S410 according to the particle swarm fitness value obtained in the step S422, and specifically comprising the following steps:
s424: the number n of hidden layer neurons and the learning rate lr of the LSTM network model are used as two particles, and the fitness value f defined by S422 is used for each particleiAnd an extremum p of the individualbest=(p1,p2,p3,p4,……pi-1,pi) I is 1,2,3 … …, N, if f isi>piThen use fiReplacement of pi(ii) a Then, for each particle, the fitness value f defined by S422iAnd global extreme gbest=(g1,g2,g3,g4,……gi-1,gi) Making a comparison if fi>giThen use fiG is replaced byi;
S425: iteratively updating the speed and the position of two particles of the neuron number n and the learning rate lr of the hidden layer;
s426: updating two particles of the hidden layer neuron number n and the learning rate lr, and calculating the fitness value f of the particlesiAnd comparing the number of the hidden layer neurons with the local optimal solution and the global optimal solution, when the error is good enough or the maximum cycle number max _ d set in the step S421 is reached, exiting the updating of the particles to obtain the optimal hidden layer neuron number n and the optimal learning rate lr parameter value of the LSTM network model, and returning to the step S423 to update the particles iteratively.
Further, in S425, the calculation is performed by using formula 4 and formula 5, which are specifically as follows:
vid=w*vid+c1r1(pid-xid)+c2r2(pgd-xid) (formula 4)
xid=xid+vid(formula 5)
In the formula c1、c2Is a learning factor, r1And r2Is [0, 1 ]]Uniform random number within a range, vidDenotes the velocity, p, of the particleidFor individual local optimal solutions, pgdFor a global optimal solution of the particle, xidIs the position of the particle.
The invention has the positive effects that:
the method comprises the steps of collecting historical operating data, preprocessing the data, determining an input and output variable set, constructing an LSTM network model, evaluating primary frequency modulation capability and predicting the primary frequency modulation capability. Variable factors influencing primary frequency modulation capacity are determined by utilizing historical operating data of the thermal power generating unit, a method for evaluating the primary frequency modulation performance is determined, the primary frequency modulation capacity of the thermal power generating unit is predicted by constructing an LSTM neural network model, and emergency control can be carried out by auxiliary scheduling personnel when disturbance occurs. The method has important significance on the primary frequency modulation control accuracy and stability of the thermal power generating unit.
According to the method, the time sequence characteristics of the historical data of the thermal power generating unit are fully considered, an LSTM neural network is used for establishing the model in the step S400, the LSTM model has a historical information storage function, and the accuracy is better than that of a traditional neural network when long-time sequence input is processed, so that the prediction of the primary frequency modulation capability of the thermal power generating unit is better realized. In order to solve the problems that the traditional long-short term memory (LSTM) neural network has insufficient model fitting capability and low prediction precision due to the fact that model parameters are selected by means of experience, the PSO optimization algorithm is used for optimizing the number n of hidden layer neurons and the learning rate lr of the LSTM neural network model in the step S400, the optimal parameters are given to the LSTM neural network model for training, and therefore the prediction result of the prediction model is more accurate. By evaluating and predicting the primary frequency modulation capability of the PSO-LSTM established in the step S400, the primary frequency modulation capability of the thermal power generating unit can be predicted, the situation that the primary frequency modulation capability of the thermal power generating unit is insufficient can be found in time, emergency control is performed by a dispatcher in the past, and the safe and stable operation of the thermal power generating unit is guaranteed.
Drawings
FIG. 1 is a flow chart of the steps of the present invention;
FIG. 2 is a flow chart of the system of the present invention.
Detailed Description
As shown in fig. 1 and 2, the method comprises the following steps:
step 1: historical data are collected from a DCS (distributed control system) of the thermal generator set, 4 months (one month is selected every quarter) are selected all the year round as historical data S of unit operation, and errors caused by different power loads due to natural causes of the quarter are avoided. The data sampling time interval is 1s, and the thermal power generating unit is required to operate without halt and fault within the data acquisition range due to the fact that the data acquisition range contains not less than 40 load levels and not less than 15 large-amplitude lifting load data within a month; the collected data comprises the frequency f and the load level P of the systemaActive load PbPower shortage PcInertia time constant tau of generator set and total spare capacity PrPower compensation amount Px;
Step 2: preprocessing the data, and sorting the acquired data to obtain effective data capable of reflecting the primary frequency modulation process. The method comprises the following specific steps:
step 2-1: because the collected historical operating data comprises stable operating data of the thermal power generating unit and frequency disturbance of noise and non-primary frequency modulation action, for the collected effective data, a value is set to reflect a frequency modulation dead zone delta f of primary frequency modulation to be 0.033Hz, and the data processing rule is as follows:
in formula 1, f (t) represents the frequency at time t, fNRepresenting nominal frequency fNWhen the frequency deviation exceeds the frequency modulation dead zone according to the formula 1, the frequency modulation action can be regarded as being performed once, otherwise, the frequency modulation action is not performed once, and the data in the time range (t +1, t + n-1) is valid dataAnd valid data is extracted.
Step 2-2: judging the primary frequency modulation performance of the thermal power generating unit, and calculating the unequal rate of speed regulation of the thermal power generating unit according to the data processed in the step 1 and the step 2-1, wherein the method comprises the following specific steps of:
step 2-2-1: the unequal speed-regulating rate reflects the speed of the static regulating characteristic of the generator set and is an important parameter in the performance indexes of the thermal generator set. In order to ensure that the primary frequency modulation of the unit is fast and accurate, delta is taken to be 4% -5%. Can be calculated by the following formula:
where Δ f is the amount of change in the grid frequency, fNIs rated frequency, and is the active variable quantity p of the generator setNRated power of the generator set, f0The no-load frequency of the generator set;
step 2-2-2: and judging whether the frequency modulation performance of the unit is qualified or not according to the speed regulation unequal rate calculated in the step 2-2-1. Delta is more than or equal to 4% and less than or equal to 5%, the primary frequency modulation performance of the unit is qualified, otherwise, the primary frequency modulation performance is unqualified;
and step 3: establishing a related data set by using the data extracted by the step 2And the established data setNormalization was performed to normalize the data to between 0-1 using the mapminmax function. Data setDividing into training set and verification set, and randomly selecting data set every month70% as training setThe remaining 30% of the data per month was used as the validation setWill train the setFrequency f, load level P of the systemaActive load PbPower shortage PcInertia time constant tau of generator set and total spare capacity PrInput variable X (k) f, P as LSTM modela,Pb,Pc,τ,Pr]The power compensation amount y and the speed regulation inequality rate δ are used as output variables y (k) of the model, [ y, δ [ ]]Solving a mapping relation between an input variable and an output variable by constructing an LSTM model;
and 4, step 4: constructing a model of the LSTM neural network, wherein the specific model construction steps are as follows:
step 4-1: determining an initial network structure of the LSTM neural network, determining the number of hidden layers and the number of output layers, and initializing a training step length. Setting input door itAnd an output gate otForgetting door ftThe activation function is a sigmoid function, and the specific steps are as follows:
step 4-1-1: setting input door it=σ(wxi·Xt+whi·ht-1+bi) In the formula wxi、whiWeight matrix representing input and output respectively and weight matrix of hidden layer and input gate, biRepresenting the deviation, X, between the input layer and the output layertInput matrix representing time t, ht-1An output representing the hidden layer at time t-1;
step 4-1-2: provided with an output gate ot=σ(wxo·Xt+who·ht-1+bo) In the formula wxoRepresenting input and output gate weight matrices, whoA weight matrix representing the hidden layer and the output gate;
step 4-1-3: setting a forgetting door ft=σ(wxf·Xt+whf·ht-1+bf) In the formula wxf、whfRespectively representing an input gate weight matrix, a forgetting gate weight matrix, a hidden layer and an output gate weight matrix;
step 4-1-4: set cell state gt=tanh(wxg·Xt+whg·ht-1+bg) In the formula wxgRepresenting the input to a memory cell weight matrix, whgRepresenting the hidden to memory cell weight matrix;
step 4-1-5: setting a current state function ct=ft*ct-1+it*gtThe output for the current time is ht=tanh(ct*ot);
Step 4-1-6: training the built initial LSTM network model import data, and determining the training set in step 3Frequency f, load level P of the systemaActive load PbPower shortage PcInertia time constant tau of generator set and total spare capacity PrInput variable X (k) f, P as LSTM modela,Pb,Pc,τ,Pr]The power compensation quantity y and the speed regulation unequal rate delta are used as output variables Y (k) of the LSTM model]And respectively importing the input variable X (k) and the output variable Y (k) into an LSTM network model for training to obtain a primary frequency modulation capability evaluation and prediction model based on the LSTM.
Step 4-2: in order to improve the LSTM network performance, particle optimization is carried out on the number n of hidden layer neurons and the learning rate lr of the LSTM by using a Particle Swarm Optimization (PSO), the optimal parameters are endowed to an LSTM neural network model for training, and a PSO-LSTM-based primary frequency modulation capability evaluation and prediction model is obtained by the following specific steps:
step 4-2-1: initializing parameters of a particle swarm algorithm, and determining the swarm size m, the maximum iteration number max _ d and the minimum value w of the inertial weight of the particle swarmminAnd inertial weightMaximum value w ofmaxAcceleration factor c1And c2Setting the value ranges of the number n of the neurons in the hidden layer and the learning rate lr according to the LSTM model established in the step 4-1, and setting the interval range [20,60 ] of the number of the neurons in the hidden layer]The interval range of the learning rate is [0.001,0.1 ]];
Step 4-2-2: according to the interval range of the hidden layer neuron number n and the learning rate lr initialized in the step 4-2-1, the verification set determined in the step 3Input variable of data x (k) ═ f, Pa,Pb,Pc,τ,Pr]Leading the power compensation quantity into an LSTM-based primary frequency modulation capacity evaluation and prediction model trained in the steps 4-1-6, and obtaining a predicted value of the power compensation quantity through the output of the LSTM network modelAnd prediction of speed regulation unequal rateObtained by outputting the modelAndvalue and verification setThe following mean square error between the real value y of the power compensation quantity and the real value delta of the speed regulation unequal rate is taken as the fitness value f of the particle swarmiAnd the fitness function is defined as follows:
where N represents the verification setThe total amount of data of (a) is,represents the estimated power offset value, y, obtained in step 4-2-2nPresentation verification setThe true value of the medium power offset amount,representing the estimated rate of speed change inequality, delta, obtained in step 4-2-2nPresentation verification setThe actual value of the unequal rate of the medium speed regulation;
step 4-2-3: optimizing the number n of hidden layer neurons and the learning rate lr of the LSTM network model established in the step 4-1 according to the particle swarm fitness value obtained in the step 4-2-2, and specifically comprising the following steps:
step 4-2-4: taking the number n of hidden layer neurons and the learning rate lr of the LSTM network model as two particles, and using the fitness value f defined in the step 4-2-2 for each particleiAnd an extremum p of the individualbest=(p1,p2,p3,p4,……pi-1,pi) I is 1,2,3 … …, N, if f isi>piThen use fiReplacement of pi(ii) a The fitness value f defined in step 4-2-2 is applied to each particleiAnd global extreme gbest=(g1,g2,g3,g4,……gi-1,gi) Making a comparison if fi>giThen use fiG is replaced byi;
Step 4-2-5: and (3) iteratively updating the speed and the position of two particles of the neuron number n and the learning rate lr of the hidden layer by using a formula 4 and a formula 5, wherein the method formula is as follows:
vid=w*vid+c1r1(pid-xid)+c2r2(pgd-xid) (formula 4)
xid=xid+vid(formula 5)
In the formula c1、c2Is a learning factor, r1And r2Is [0, 1 ]]Uniform random number within a range, vidDenotes the velocity, p, of the particleidFor individual local optimal solutions, pgdFor a global optimal solution of the particle, xidIs the position of the particle;
step 4-2-6: updating two particles of the hidden layer neuron number n and the learning rate lr using formula 4 and formula 5 in step 4-2-5, and calculating the fitness value f of the particlesiComparing with the local and global optimal solutions, when the error is good enough or the maximum cycle times max _ d set in the step 4-2-1 is reached, quitting the updating of the particles to obtain the optimal hidden layer neuron number n and the learning rate lr parameter value of the LSTM network model, otherwise returning to the step 4-2-3 to update the particles iteratively;
step 4-3: substituting the optimal hidden layer neuron number n and the learning rate lr parameter values obtained in the step 4-2-6 into an LSTM network to obtain an optimized PSO-LSTM-based primary frequency modulation capability evaluation and prediction model, wherein the model input variables are the frequency f and the load level P of the systemaActive load PbPower shortage PcInertia time constant tau of generator set and total spare capacity PrI.e. the input variable x (k) ═ f, Pa,Pb,Pc,τ,Pr]The output variables of the model are power compensation quantity y and speed regulation inequality rate delta, namely output variable Y (k) [ y, delta ]]。
The frequency is an important parameter for the safe operation of the power system, and the large-amplitude change of the frequency can bring serious harm to the safe and stable operation of the whole power system. According to the method, whether the primary frequency modulation performance of the thermal power generating unit meets the frequency modulation requirement or not is found through historical operating data of the thermal power generating unit, the primary frequency modulation capability is predicted for avoiding the difficulty that a dispatcher can accurately analyze the frequency modulation condition of a power grid in a short time, and the method has important significance for knowing that the dispatcher can carry out emergency shutdown when the thermal power generating unit is disturbed or fails.
Claims (10)
1. A PSO-LSTM-based primary frequency modulation capability evaluation and prediction system is characterized by comprising the following steps:
s100: collecting historical data in a DCS (distributed control System) of a thermal generator set;
s200: processing the acquired data to obtain effective data capable of reflecting the primary frequency modulation process;
s300: selecting a training set and a verification set of data, and determining input and output variables of the model;
s400: and constructing an LSTM neural network and optimizing a network model by using a PSO algorithm to obtain a PSO-LSTM-based primary frequency modulation capability evaluation and prediction model.
2. The PSO-LSTM-based primary frequency modulation capability assessment and prediction system according to claim 1, wherein in S100, a total of 4 months are selected from 4 quarters of the year each, and are used as historical data S for unit operation, and the data sampling time interval is 1S.
3. The PSO-LSTM-based primary frequency modulation capability assessment and prediction system according to claim 2, wherein the collected data comprises frequency f, load level P of the systemaActive load PbPower shortage PcInertia time constant tau of generator set and total spare capacity PrAnd a power compensation amount Px。
4. The PSO-LSTM-based primary frequency modulation capability assessment and prediction system according to claim 1, wherein the specific steps of S200 are as follows:
s210: setting a frequency modulation dead zone delta f reflecting the primary frequency modulation to be 0.033Hz, and processing the data according to the following rules:
in formula 1, f (t) represents the frequency at time t, fNRepresenting nominal frequency fNWhen the frequency deviation exceeds a frequency modulation dead zone, determining that primary frequency modulation action is carried out according to a formula 1, otherwise, carrying out no primary frequency modulation action, wherein data in a time range of (t +1, t + n-1) is effective data, and extracting the effective data;
s220: and (4) judging the primary frequency modulation performance of the thermal power generating unit, and calculating the unequal rate of speed regulation of the thermal power generating unit according to the data processed in the step S100 and the step S210.
5. The PSO-LSTM-based primary frequency modulation capability assessment and prediction system according to claim 4, wherein in S220, the calculation steps of the unequal speed rate of the thermal power generating unit are as follows:
s221: in order to ensure that the value delta of the unit primary frequency modulation is 4-5% rapidly and accurately, the calculation can be carried out by the following formula:
where Δ f is the amount of change in the grid frequency, fNIs rated frequency, and is the active variable quantity p of the generator setNRated power of the generator set, f0The no-load frequency of the generator set;
s222: and judging whether the frequency modulation performance of the unit is qualified or not according to the speed regulation unequal rate calculated in the S221, wherein delta is more than or equal to 4% and less than or equal to 5%, indicating that the primary frequency modulation performance of the unit is qualified, and otherwise, indicating that the primary frequency modulation performance is unqualified.
6. The PSO-LSTM-based primary FM capability assessment and prediction system according to claim 1 wherein in S300, the extracted data processed in S200 is used to create a related data set S※And the established data setS※Carrying out normalization processing, and normalizing the data to be between 0 and 1 by using a mapminmax function;
data set S※Dividing into training set and verification set, randomly selecting data set S every month※70% as training setThe remaining 30% of the data per month was used as the validation setWill train the setFrequency f, load level P of the systemaActive load PbPower shortage PcInertia time constant tau of generator set and total spare capacity PrInput variable X (k) f, P as LSTM modela,Pb,Pc,τ,Pr]The power compensation amount y and the speed regulation inequality rate δ are used as output variables y (k) of the model, [ y, δ [ ]]And solving the mapping relation of the input variable and the output variable by constructing an LSTM model.
7. The PSO-LSTM-based chirp capability assessment and prediction system according to claim 1, wherein in S400, the specific steps of constructing the model of the LSTM neural network are as follows:
s410: determining an initial network structure of the LSTM neural network, determining the number of hidden layers and the number of output layers, and initializing a training step length;
s420: performing particle optimization on the number n of hidden layer neurons and the learning rate lr of the LSTM by using a particle swarm algorithm, and giving optimal parameters to an LSTM neural network model for training to obtain a PSO-LSTM-based primary frequency modulation capability evaluation and prediction model;
s430: the optimal hidden layer neuron number n and the learning rate lr parameter values obtained in S420 are introduced into the LSTM network to obtain the optimized PSO-LSTM-based primary frequency modulation energyA force estimation and prediction model with input variables of frequency f and load level P of the systemaActive load PbPower shortage PcInertia time constant tau of generator set and total spare capacity PrI.e. the input variable x (k) ═ f, Pa,Pb,Pc,τ,Pr]The output variables of the model are power compensation quantity y and speed regulation inequality rate delta, namely output variable Y (k) [ y, delta ]]。
8. The PSO-LSTM-based chirp capability assessment and prediction system according to claim 7, wherein in S410, an input gate i is settAnd an output gate otForgetting door ftThe activation function is a sigmoid function, and the specific steps are as follows:
s411: setting input door it=σ(wxi·Xt+whi·ht-1+bi) In the formula wxi、whiWeight matrix representing input and output respectively and weight matrix of hidden layer and input gate, biRepresenting the deviation, X, between the input layer and the output layertInput matrix representing time t, ht-1An output representing the hidden layer at time t-1;
s412: provided with an output gate ot=σ(wxo·Xt+who·ht-1+bo) In the formula wxoRepresenting input and output gate weight matrices, whoA weight matrix representing the hidden layer and the output gate;
s413: setting a forgetting door ft=σ(wxf·Xt+whf·ht-1+bf) In the formula wxf、whfRespectively representing an input gate weight matrix, a forgetting gate weight matrix, a hidden layer and an output gate weight matrix;
s414: set cell state gt=tanh(wxg·Xt+whg·ht-1+bg) In the formula wxgRepresenting the input to a memory cell weight matrix, whgRepresenting the hidden to memory cell weight matrix;
s415: setting a current state function ct=ft*ct-1+it*gtThe output for the current time is ht=tanh(ct*ot);
S416: training the built initial LSTM network model import data, and collecting the training setFrequency f, load level P of the systemaActive load PbPower shortage PcInertia time constant tau of generator set and total spare capacity PrInput variable X (k) f, P as LSTM modela,Pb,Pc,τ,Pr]The power compensation quantity y and the speed regulation unequal rate delta are used as output variables Y (k) of the LSTM model]And respectively importing the input variable X (k) and the output variable Y (k) into an LSTM network model for training to obtain a primary frequency modulation capability evaluation and prediction model based on the LSTM.
9. The PSO-LSTM-based primary frequency modulation capability assessment and prediction system according to claim 8, wherein the specific steps of obtaining the PSO-LSTM-based primary frequency modulation capability assessment and prediction model in S420 are as follows:
s421: initializing parameters of a particle swarm algorithm, and determining the swarm size m, the maximum iteration number max _ d and the minimum value w of the inertial weight of the particle swarmminMaximum value w of inertia weightmaxAcceleration factor c1And c2And setting the value ranges of the number n of the neurons in the hidden layer and the learning rate lr according to the LSTM model established in S410, and setting the interval range [20,60 ] of the number of the neurons in the hidden layer]The interval range of the learning rate is [0.001,0.1 ]];
S422: according to the interval range of the hidden layer neuron number n and the learning rate lr initialized by S421, verifying the setInput variable X (k) of data)=[f,Pa,Pb,Pc,τ,Pr]The power compensation quantity is introduced into an LSTM-based primary frequency modulation capacity evaluation and prediction model trained by S416, and a predicted value of the power compensation quantity can be obtained through the output of the LSTM network modelAnd prediction of speed regulation unequal rateObtained by outputting the modelAndvalue and verification setThe following mean square error between the real value y of the power compensation quantity and the real value delta of the speed regulation unequal rate is taken as the fitness value f of the particle swarmiAnd the fitness function is defined as follows:
where N represents the verification setThe total amount of data of (a) is,denotes the power offset prediction value, y, obtained in S422nPresentation verification setThe true value of the medium power offset amount,an estimated value, delta, representing the rate of change of speed obtained in S422nPresentation verification setThe actual value of the unequal rate of the medium speed regulation;
s423: optimizing the number n of hidden layer neurons and the learning rate lr of the LSTM network model established in the step S410 according to the particle swarm fitness value obtained in the step S422, and specifically comprising the following steps:
s424: the number n of hidden layer neurons and the learning rate lr of the LSTM network model are used as two particles, and the fitness value f defined by S422 is used for each particleiAnd an extremum p of the individualbest=(p1,p2,p3,p4,……pi-1,pi) I is 1,2,3 … …, N, if f isi>piThen use fiReplacement of pi(ii) a Then, for each particle, the fitness value f defined by S422iAnd global extreme gbest=(g1,g2,g3,g4,……gi-1,gi) Making a comparison if fi>giThen use fiG is replaced byi;
S425: iteratively updating the speed and the position of two particles of the neuron number n and the learning rate lr of the hidden layer;
s426: updating two particles of the hidden layer neuron number n and the learning rate lr, and calculating the fitness value f of the particlesiAnd comparing the number of the hidden layer neurons with the local optimal solution and the global optimal solution, when the error is good enough or the maximum cycle number max _ d set in the step S421 is reached, exiting the updating of the particles to obtain the optimal hidden layer neuron number n and the optimal learning rate lr parameter value of the LSTM network model, and returning to the step S423 to update the particles iteratively.
10. The PSO-LSTM-based primary fm capability assessment and prediction system according to claim 9, wherein in S425, the calculation is performed using formula 4 and formula 5, which are as follows:
vid=w*vid+c1r1(pid-xid)+c2r2(pgd-xid) (formula 4)
xid=xid+vid(formula 5)
In the formula c1、c2Is a learning factor, r1And r2Is [0, 1 ]]Uniform random number within a range, vidDenotes the velocity, p, of the particleidFor individual local optimal solutions, pgdFor a global optimal solution of the particle, xidIs the position of the particle.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111072152.9A CN113887786A (en) | 2021-09-14 | 2021-09-14 | PSO-LSTM-based primary frequency modulation capability evaluation and prediction system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111072152.9A CN113887786A (en) | 2021-09-14 | 2021-09-14 | PSO-LSTM-based primary frequency modulation capability evaluation and prediction system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113887786A true CN113887786A (en) | 2022-01-04 |
Family
ID=79009334
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111072152.9A Pending CN113887786A (en) | 2021-09-14 | 2021-09-14 | PSO-LSTM-based primary frequency modulation capability evaluation and prediction system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113887786A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114565328A (en) * | 2022-04-29 | 2022-05-31 | 浙江中控技术股份有限公司 | AGC frequency modulation performance assessment method and device |
CN114899844A (en) * | 2022-06-13 | 2022-08-12 | 华能国际电力股份有限公司德州电厂 | Primary frequency modulation control system of small-disturbance thermal power generating unit |
CN115951755A (en) * | 2023-02-06 | 2023-04-11 | 广芯微电子(广州)股份有限公司 | Photovoltaic maximum power point tracking method and device based on PSO-LSTM |
CN116191476A (en) * | 2023-04-03 | 2023-05-30 | 华能威海发电有限责任公司 | Intelligent power grid primary frequency modulation system |
CN116231685A (en) * | 2023-05-10 | 2023-06-06 | 华北电力大学 | QPSO-based electric power system inertia and primary frequency modulation capability assessment method |
-
2021
- 2021-09-14 CN CN202111072152.9A patent/CN113887786A/en active Pending
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114565328A (en) * | 2022-04-29 | 2022-05-31 | 浙江中控技术股份有限公司 | AGC frequency modulation performance assessment method and device |
CN114565328B (en) * | 2022-04-29 | 2022-08-19 | 浙江中控技术股份有限公司 | AGC frequency modulation performance assessment method and device |
CN114899844A (en) * | 2022-06-13 | 2022-08-12 | 华能国际电力股份有限公司德州电厂 | Primary frequency modulation control system of small-disturbance thermal power generating unit |
CN115951755A (en) * | 2023-02-06 | 2023-04-11 | 广芯微电子(广州)股份有限公司 | Photovoltaic maximum power point tracking method and device based on PSO-LSTM |
CN116191476A (en) * | 2023-04-03 | 2023-05-30 | 华能威海发电有限责任公司 | Intelligent power grid primary frequency modulation system |
CN116191476B (en) * | 2023-04-03 | 2023-12-29 | 华能威海发电有限责任公司 | Intelligent power grid primary frequency modulation system |
CN116231685A (en) * | 2023-05-10 | 2023-06-06 | 华北电力大学 | QPSO-based electric power system inertia and primary frequency modulation capability assessment method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113887786A (en) | PSO-LSTM-based primary frequency modulation capability evaluation and prediction system | |
CN111736084B (en) | Valve-regulated lead-acid storage battery health state prediction method based on improved LSTM neural network | |
CN113064093A (en) | Energy storage battery state of charge and state of health joint estimation method and system | |
CN109255726A (en) | A kind of ultra-short term wind power prediction method of Hybrid Intelligent Technology | |
US20220261655A1 (en) | Real-time prediction method for engine emission | |
CN111008790A (en) | Hydropower station group power generation electric scheduling rule extraction method | |
CN112834927A (en) | Lithium battery residual life prediction method, system, device and medium | |
CN111832839B (en) | Energy consumption prediction method based on sufficient incremental learning | |
CN115759415A (en) | Power consumption demand prediction method based on LSTM-SVR | |
CN113344288A (en) | Method and device for predicting water level of cascade hydropower station group and computer readable storage medium | |
CN115062528A (en) | Prediction method for industrial process time sequence data | |
CN114839531A (en) | Motor fault detection method based on group type sparse self-coding and group intelligence | |
CN110782013A (en) | Thermal power plant NO based on generalized mutual entropy self-encoder xEmission amount prediction method | |
CN113705922A (en) | Improved ultra-short-term wind power prediction algorithm and model establishment method | |
CN113095477A (en) | Wind power prediction method based on DE-BP neural network | |
CN115796327A (en) | Wind power interval prediction method based on VMD (vertical vector decomposition) and IWOA-F-GRU (empirical mode decomposition) -based models | |
Wei et al. | Improved grey wolf optimization based on the Quantum-behaved mechanism | |
Niu et al. | Research on neural networks based on culture particle swarm optimization and its application in power load forecasting | |
CN113762591A (en) | Short-term electric quantity prediction method and system based on GRU and multi-core SVM counterstudy | |
CN113868957A (en) | Residual life prediction and uncertainty quantitative calibration method under Bayes deep learning | |
CN113420492A (en) | Modeling method for frequency response model of wind-solar-fire coupling system based on GAN and GRU neural network | |
CN112508239A (en) | Energy storage output prediction method based on VAE-CGAN | |
CN112183814A (en) | Short-term wind speed prediction method | |
Li et al. | Short-term Load Forecasting of Long-short Term Memory Neural Network Based on Genetic Algorithm | |
Liu et al. | Prediction of Biochemical Oxygen Demand Based on VIP-PSO-Elman Model in Wastewater Treatment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |