Digital twin-based micro-grid frequency secondary cooperative control method

文档序号:1864188 发布日期:2021-11-19 浏览:2次 中文

阅读说明:本技术 一种基于数字孪生的微电网频率二次协同控制方法 (Digital twin-based micro-grid frequency secondary cooperative control method ) 是由 柳伟 李亚杰 张重阳 薛镕刚 于 2021-08-23 设计创作,主要内容包括:一种基于数字孪生的微电网频率二次协同控制方法,属于微电网控制技术领域,解决基于传统下垂控制的微电网频率二次协同控制中的参数无法动态调节的问题;通过数字孪生来解决微电网系统运行状态的修正问题,通过实时采集微电网系统内的运行数据,数据交互接口实时地将电网的运行数据传输到数字孪生模型中,通过数字孪生模型对数据进行分析预测,将控制指令反馈到微电网系统中进行二次控制,进而修正微电网系统的频率,使之稳定在额定频率附近;相比较基于下垂的传统二次控制算法,数字孪生具有逻辑规则库,并且可以快速地对微电网系统做出响应,提高了系统频率的控制精度。(A micro-grid frequency secondary cooperative control method based on digital twinning belongs to the technical field of micro-grid control and solves the problem that parameters in micro-grid frequency secondary cooperative control based on traditional droop control cannot be dynamically adjusted; the problem of correcting the running state of the micro-grid system is solved through digital twin, the running data in the micro-grid system is collected in real time, the data interaction interface transmits the running data of a power grid to a digital twin model in real time, the data is analyzed and predicted through the digital twin model, a control instruction is fed back to the micro-grid system for secondary control, and then the frequency of the micro-grid system is corrected to be stabilized near a rated frequency; compared with a droop-based traditional quadratic control algorithm, the digital twin has a logic rule base, and can quickly respond to the micro-grid system, so that the control precision of the system frequency is improved.)

1. A micro-grid frequency secondary cooperative control method based on digital twinning is characterized by comprising the following steps:

s1, preprocessing the offline data set: through Pearson correlation analysis, selecting influence factors of the microgrid frequency as input variables to calculate correlation coefficients, performing missing value filling and abnormal value detection on a data set, and performing normalization processing on input features in the data set;

s2, building a digital twin model: training the BP neural network based on the data set obtained in the step S1 by constructing the BP neural network, constructing a logic rule base, analyzing the running state of the microgrid system, starting the BP neural network for prediction if the microgrid system enters a steady state and the frequency has deviation, and otherwise, keeping the secondary control parameter unchanged;

s3, optimizing and controlling the microgrid system: and establishing a secondary control model based on droop control, transmitting current operation data to a digital twin model through a data interaction interface by the micro-grid system, analyzing the operation data of the micro-grid by the digital twin model, feeding back an obtained control instruction to the micro-grid system through the data interaction interface, and further adjusting the system frequency.

2. The microgrid frequency quadratic cooperative control method based on the digital twin as claimed in claim 1, wherein the formula for selecting the influence factors of the microgrid frequency as input variables to calculate the correlation coefficients in step S1 is as follows:

wherein r isxyRepresenting the correlation coefficient, x, y representing the n-dimensional phasor,representing the average value of the input variable.

3. The microgrid frequency quadratic cooperative control method based on digital twin as claimed in claim 2, characterized in that the missing value filling method in step S1 is: the method comprises the steps of periodically collecting power of each distributed power source and voltage at a bus in a micro-grid system, collecting exchange power of a connecting line at the same time, and filling missing values by constructing a cubic spline interpolation function between every two discrete points.

4. The digital twin-based microgrid frequency quadratic cooperative control method according to claim 3, characterized in that the cubic spline interpolation function is defined as follows:

y=ax3+bx2+cx+d (2)

wherein a, b, c and d respectively represent coefficient values of the 3-degree function.

5. The microgrid frequency quadratic cooperative control method based on the digital twin as claimed in claim 4, characterized in that the abnormal value detection method in step S1 is: calculating the abnormal value score of each sample by adopting an isolated forest-based theory, wherein the calculation formula is as follows:

wherein s (γ, Ψ) represents an anomaly score, γ represents a single sample, h (γ) is the height of γ in each tree, E (h (γ)) is the expectation of the path length of the sample γ in a batch of isolated trees, and c (Ψ) is the average of the path lengths at a given number of samples ψ, which is used to normalize the path length h (γ) of the sample γ;

the calculation formula of c (ψ) is as follows:

where H (Ψ -1) is the sum of the modulations, it can be estimated by ln (Ψ -1) +0.5772156649 (Euler constant).

6. The microgrid frequency quadratic cooperative control method based on the digital twin as claimed in claim 5, characterized in that the formula for normalizing the input features in the data set in step S1 is as follows:

wherein x isminAnd xmaxExpressing the minimum and maximum values in the data, respectively, normalizing x' to [ -1, 1]Within the interval, thereby preserving the characteristics of the input data.

7. The microgrid frequency quadratic cooperative control method based on the digital twin as claimed in claim 6, characterized in that the method for constructing the BP neural network in step S2 is as follows:

the output layer has only one neuron, the output variable is the minimum value of the frequency of the droop curve, and the number of neurons in the hidden layer is determined according to the empirical formula (6):

wherein q represents the number of cryptic neurons; m represents the number of neurons in the input layer; n represents the number of neurons in the output layer; a is a constant of 1-10, and the number of layers of the hidden layer is adjusted according to the analysis requirement.

8. The microgrid frequency quadratic cooperative control method based on a digital twin as claimed in claim 7, wherein the method for training the BP neural network based on the data set obtained in step S1 in step S2 is as follows: setting an activation function of a hidden layer as a relu function, updating parameters of a BP neural network model through a random gradient descent algorithm, and storing the trained parameters, wherein an updating formula of the parameters is as follows:

in the formula (7), θ represents a network parameter of the BP neural network, η represents a learning rate, J represents a loss function,representing the gradient of the network parameter.

9. The microgrid frequency quadratic cooperative control method based on the digital twin as claimed in claim 8, characterized in that the prediction formula of the BP neural network in step S2 is as follows:

wherein u (s, theta) represents a prediction result output by the BP neural network, and k represents the number of layers of the BP neural network; s is the input of the BP neural network;represents the activation function of layer I neurons in BP neural networks.

10. The microgrid frequency quadratic cooperative control method based on the digital twin as claimed in claim 9, characterized in that the formula of the quadratic control model based on the droop control in step S3 is as follows:

wherein, ω isiRepresenting the output frequency of the ith controllable power supply; omeganiRepresents the nominal frequency of the ith controllable power supply; delta omegaiIs a quadratic frequency adjustment term; k is a radical ofpfAnd kifRespectively representing the proportional and integral coefficients of the quadratic frequency controller.

Technical Field

The invention belongs to the technical field of micro-grid control, and relates to a micro-grid frequency secondary cooperative control method based on digital twinning.

Background

With the increasing exhaustion of traditional fossil energy in the world, new energy power generation technology in micro-grids is more and more widely applied. However, as the new energy power generation is easily influenced by various environmental factors, the output power presents the characteristics of intermittence, volatility and randomness, and particularly when the micro-grid is in an island operation mode, the frequency of the system is adversely affected, and the quality of the electric energy is further affected.

The traditional frequency regulation means is mainly based on mathematical modeling and mechanism modeling, but with the complexity of a micro-grid system being higher and higher, the problems of model inaccuracy and the like exist, and the control effect is further influenced. In the document, "distributed fixed time secondary coordination control of an island microgrid" (cheng-gang, Chongqing university), aiming at the problem that a droop control strategy of the island microgrid can cause deviation of the frequency and the voltage of a system in a steady state from rated values, a distributed fixed time secondary coordination control strategy is proposed to realize recovery control of the frequency and the voltage of the system and realize expected active power distribution. The control method can complete the secondary control target within fixed time without depending on the initial state of the system, so that the off-line presetting of the setting time according to the task requirement becomes possible. However, the document does not solve the problem that the parameters in the conventional secondary control algorithm based on droop cannot be dynamically adjusted.

Digital Twin (Digital Twin) is a simulation process integrating multidisciplinary, multi-physical quantity, multi-scale and multi-probability by fully utilizing data such as physical models, sensor updating, operation history and the like, and mapping is completed in a virtual space, so that the full life cycle process of corresponding entity equipment is reflected. Digital twinning is an beyond-realistic concept that can be viewed as a digital mapping system of one or more important, interdependent equipment systems.

The concept of digital twin is firstly proposed in 2003, the high attention of domestic and foreign scholars is not attracted until 2011, and the concept of digital twin is listed as the current top strategic technology development direction by Gartner which is the most authoritative information technology consulting company in 2016-2018. The world's largest weapon producer, Rockschid Martin, listed a digital twin as the first 6 top technologies in future national defense and aerospace industry in 11 months in 2017; the Chinese science and technology association in 12 months in 2017 lists the digital twin as one of ten technological advances in intelligent manufacturing in the world on the world intelligent manufacturing congress. To date, a digital twin definition widely accepted by the industry was given by Glaessegen and Star-gel in 2012: "a complex product simulation model integrating multiple physics, multiple scales and probability, which can reflect the state of real product in real time". As a technology which fully utilizes models, data, intelligence and integrates multiple disciplines, the digital twin is oriented to the whole life cycle process of products, the functions of bridges and links connecting a physical world and an information world are exerted, and more real-time, efficient and intelligent services are provided.

Therefore, the invention utilizes the digital twin technology to carry out secondary cooperative control on the frequency of the microgrid. A large amount of data generated in the operation process of the micro-grid is fully mined through the data driving model, real-time interaction of the data between the digital twin model and the physical entity of the micro-grid is realized, and then the operation state of the micro-grid is adjusted, so that the system frequency is always kept near the rated frequency.

Disclosure of Invention

The invention aims to design a digital twin-based micro-grid frequency secondary cooperative control method and system, so as to solve the problem that parameters in the micro-grid frequency secondary cooperative control based on the traditional droop control cannot be dynamically adjusted.

The invention solves the technical problems through the following technical scheme:

a micro-grid frequency secondary cooperative control method based on digital twinning comprises the following steps:

s1, preprocessing the offline data set: through Pearson correlation analysis, selecting influence factors of the microgrid frequency as input variables to calculate correlation coefficients, performing missing value filling and abnormal value detection on a data set, and performing normalization processing on input features in the data set;

s2, building a digital twin model: training the BP neural network based on the data set obtained in the step S1 by constructing the BP neural network, constructing a logic rule base, analyzing the running state of the microgrid system, starting the BP neural network for prediction if the microgrid system enters a steady state and the frequency has larger deviation, and otherwise keeping the secondary control parameters unchanged;

s3, optimizing and controlling the microgrid system: and establishing a secondary control model based on droop control, transmitting current operation data to a digital twin model through a data interaction interface by the micro-grid system, analyzing the operation data of the micro-grid by the digital twin model, feeding back an obtained control instruction to the micro-grid system through the data interaction interface, and further adjusting the system frequency.

The method solves the problem of correcting the running state of the micro-grid system through digital twin, collects the running data in the micro-grid system in real time, transmits the running data of the power grid to a digital twin model through a data interaction interface in real time, analyzes and predicts the data through the digital twin model, feeds a control instruction back to the micro-grid system for secondary control, and further corrects the frequency of the micro-grid system to be stabilized near the rated frequency; compared with a droop-based traditional quadratic control algorithm, the digital twin has a logic rule base, and can quickly respond to the micro-grid system, so that the control precision of the system frequency is improved.

As a further improvement of the technical solution of the present invention, the formula for selecting the influence factor of the microgrid frequency as an input variable to calculate the correlation coefficient in step S1 is as follows:

wherein r isxyRepresenting the correlation coefficient, x, y representing the n-dimensional phasor,representing the average value of the input variable.

As a further improvement of the technical solution of the present invention, the missing value padding method in step S1 includes: the method comprises the steps of periodically collecting power of each distributed power source and voltage at a bus in a micro-grid system, collecting exchange power of a connecting line at the same time, and filling missing values by constructing a cubic spline interpolation function between every two discrete points.

As a further improvement of the technical solution of the present invention, the cubic spline interpolation function is defined as follows:

y=ax3+bx2+cx+d (2)

wherein a, b, c and d respectively represent coefficient values of the 3-degree function.

As a further improvement of the technical solution of the present invention, the method for detecting an abnormal value described in step S1 includes: calculating the abnormal value score of each sample by adopting an isolated forest-based theory, wherein the calculation formula is as follows:

wherein s (γ, Ψ) represents an anomaly score, γ represents a single sample, h (γ) is the height of γ in each tree, E (h (γ)) is the expectation of the path length of the sample γ in a batch of isolated trees, and c (Ψ) is the average of the path lengths at a given number of samples ψ, which is used to normalize the path length h (γ) of the sample γ;

the calculation formula of c (ψ) is as follows:

where H (Ψ -1) is the sum of the modulations, it can be estimated by ln (Ψ -1) +0.5772156649 (Euler constant).

As a further improvement of the technical solution of the present invention, the formula for performing normalization processing on the input features in the data set in step S1 is as follows:

wherein x isminAnd xmaxExpressing the minimum and maximum values in the data, respectively, normalizing x' to [ -1, 1]Within the interval, thereby preserving the characteristics of the input data.

As a further improvement of the technical solution of the present invention, the method for constructing the BP neural network described in step S2 is as follows:

the output layer has only one neuron, the output variable is the minimum value of the frequency of the droop curve, and the number of neurons in the hidden layer is determined according to the empirical formula (6):

wherein q represents the number of cryptic neurons; m represents the number of neurons in the input layer; n represents the number of neurons in the output layer; a is a constant of 1-10, and the number of layers of the hidden layer is adjusted according to the analysis requirement.

As a further improvement of the technical solution of the present invention, the method for training the BP neural network based on the data set obtained in step S1, which is described in step S2, includes: setting an activation function of a hidden layer as a relu function, updating parameters of a BP neural network model through a random gradient descent algorithm, and storing the trained parameters, wherein an updating formula of the parameters is as follows:

in the formula (7), θ represents a network parameter of the BP neural network, η represents a learning rate, J represents a loss function,representing the gradient of the network parameter.

As a further improvement of the technical solution of the present invention, the prediction formula of the BP neural network described in step S2 is as follows:

wherein u (s, theta) represents a prediction result output by the BP neural network, and k represents the number of layers of the BP neural network; s is the input of the BP neural network;represents the activation function of layer I neurons in BP neural networks.

As a further improvement of the technical solution of the present invention, the formula of the secondary control model based on droop control described in step S3 is as follows:

wherein, ω isiRepresenting the output frequency of the ith controllable power supply; omeganiRepresents the nominal frequency of the ith controllable power supply; delta omegaiIs a quadratic frequency adjustment term; k is a radical ofpfAnd kifRespectively representing the proportional and integral coefficients of the quadratic frequency controller.

The invention has the advantages that:

the method solves the problem of correcting the running state of the micro-grid system through digital twin, collects the running data in the micro-grid system in real time, transmits the running data of the power grid to a digital twin model through a data interaction interface in real time, analyzes and predicts the data through the digital twin model, feeds a control instruction back to the micro-grid system for secondary control, and further corrects the frequency of the micro-grid system to be stabilized near the rated frequency; compared with a droop-based traditional quadratic control algorithm, the digital twin has a logic rule base, and can quickly respond to the micro-grid system, so that the control precision of the system frequency is improved.

Drawings

Fig. 1 is a flow chart of the digital twin-based frequency quadratic cooperative control of a microgrid according to an embodiment of the present invention;

FIG. 2 is a topology structure diagram of a BP neural network according to an embodiment of the present invention;

FIG. 3 is a schematic diagram of bidirectional data interaction between a digital twin model and a micro-grid system according to an embodiment of the invention;

fig. 4 is a structural diagram of a simulation model of the microgrid frequency quadratic cooperative control method based on the digital twin according to the embodiment of the invention;

FIG. 5 is a plot of the change in frequency of a microgrid system based on a conventional secondary control model for droop;

fig. 6 is a frequency variation graph of a digital twin-based microgrid system according to an embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

The technical scheme of the invention is further described by combining the drawings and the specific embodiments in the specification:

example one

As shown in fig. 1, a digital twin-based microgrid frequency quadratic cooperative control method includes:

1. preprocessing offline datasets

1.1 Pearson correlation analysis

And selecting variables such as active power, reactive power and bus voltage of each distributed power supply in the microgrid system and active power and reactive power of a connecting line as input variables. Considering that the problems of increased model complexity, slowed convergence speed and the like caused by excessive input variables, several factors which have the greatest influence on the frequency of the microgrid are selected as input variables through Pearson correlation analysis, and correlation coefficients are calculated, namely:

in the formula (1), x and y each represent an n-dimensional phasor,representing input variablesAverage value of the amounts.

1.2 missing value filling

Acquiring the power of each distributed power supply in the microgrid system, the voltage at a bus and the exchange power of a connecting line every 3 seconds, considering that equipment possibly has faults and causes missing values in data, constructing a cubic spline interpolation function between every two discrete points to finally fill the missing values, wherein the cubic spline interpolation function is defined as follows:

y=ax3+bx2+cx+d (2)

in the formula (2), a, b, c and d respectively represent coefficient values of the 3-degree function.

1.3 detection of abnormal value

Considering that abnormal values possibly exist in a sample set and can have adverse effects on subsequent analysis, the abnormal value score of each sample is calculated based on the isolated forest theory, namely:

in equation (3), s (γ, Ψ) represents an anomaly score, γ represents a single sample, h (γ) is the height of γ in each tree, E (h (γ)) is the expectation of the path length of the sample γ in a batch of isolated trees, and c (Ψ) is the average of the path lengths at a given number of samples ψ, which is used to normalize the path length h (γ) of the sample γ;

in the formula (4), H (Ψ -1) is a sum of the sums, and can be estimated by ln (Ψ -1) +0.5772156649 (Euler constant).

1.4, carrying out normalization processing on the data set

The input features in the data set are normalized and subjected to dimensionless treatment, namely:

in the formula (5), xminAnd xmaxExpressing the minimum and maximum values in the data, respectively, normalizing x' to [ -1, 1]Within the interval, the characteristics of the input data are preserved as much as possible.

2. Building digital twin model

2.1, as shown in fig. 2, constructing a BP neural network, wherein the output layer has only one neuron, the output variable is the minimum value of the frequency of a droop curve, and the number of neurons in the hidden layer is determined according to the formula (6):

wherein q represents the number of cryptic neurons; m represents the number of neurons in the input layer; n represents the number of neurons in the output layer; a is a constant of 1-10, and the number of layers of the hidden layer is adjusted according to the analysis requirement.

Training the BP neural network based on the offline data set obtained in the step 1, setting an activation function of a hidden layer as a relu function, updating model parameters through a random gradient descent algorithm, storing the trained BP neural network parameters, and facilitating subsequent calling. The parameter update formula is as follows:

in the formula (7), θ represents a network parameter of the BP neural network, η represents a learning rate, J represents a loss function,representing the gradient of the network parameter.

2.2, constructing a logic rule base, analyzing the running state of the micro-grid system, starting a BP neural network for prediction if the system enters a steady state and has larger frequency deviation, and otherwise, keeping secondary control parameters unchanged; the output prediction formula of the BP neural network is as follows:

wherein u (s, theta) represents a prediction result output by the BP neural network, and k represents the number of layers of the BP neural network; s is the input of the BP neural network;represents the activation function of layer I neurons in BP neural networks.

3. Optimal control of microgrid system

3.1, establishing a secondary control model based on droop control as follows:

wherein, ω isiRepresenting the output frequency of the ith controllable power supply; omeganiRepresents the nominal frequency of the ith controllable power supply; delta omegaiIs a quadratic frequency adjustment term; k is a radical ofpfAnd kifRespectively representing the proportional and integral coefficients of the quadratic frequency controller.

3.2, based on the digital twin model established in the step 2, through a data interaction interface, bidirectional flow of data between the micro-grid system and the digital twin model is achieved, and finally the system frequency is stabilized near a rated value.

As shown in fig. 3, the micro-grid system transmits current operation data to the digital twin model through the data interaction interface, the digital twin model analyzes the operation data of the micro-grid, and an obtained control instruction is fed back to the micro-grid system through the data interaction interface to further adjust the system frequency.

As shown in fig. 4, a simulation model of the micro-grid system is established, 2 distributed energy storage power sources exist in the system, the output power ranges of the distributed energy storage power sources are respectively 0 MW-0.08 MW and 0 MW-0.04 MW, the two loads are respectively 0.04MW and 0.02MW, the micro-grid system is connected with the main grid at the initial moment, the micro-grid system is separated from the main grid at 0.5s, and load shedding operation is performed at 2 s.

As shown in fig. 5 and fig. 6, respectively, a conventional secondary control model based on droop and a system frequency change graph based on digital twin are shown, and it can be seen from fig. 5 that, under the action of the conventional secondary control model, the frequency of the system is stabilized at 49.90HZ after the system enters a steady state, and the deviation amount from the rated frequency is 0.1HZ, while it can be seen from fig. 6 that, after the digital twin detects that the microgrid system enters the steady state, a certain frequency deviation amount exists, and at this time, a control command is output to the microgrid through the digital twin model to adjust the frequency of the microgrid system, and the adjusted frequency is stabilized at 49.96HZ and is closer to the rated frequency.

The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:离网型混合供电控制系统、方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!