Virtual power plant cross-time matching regulation method and device based on machine learning algorithm

CN116703099BActive Publication Date: 2026-09-25STATE GRID HEBEI ELECTRIC POWER RES INST +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310702849.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-14
Publication Date
2026-09-25
Estimated Expiration
2043-06-14

AI Technical Summary

Benefits of technology

[0089]本发明提供的一种基于机器学习算法的虚拟电厂跨时间匹配调控方法、装置、终端设备及可读存储介质与当前技术相比,优化效果在于,本发明中的虚拟电厂跨时间匹配调控方法及装置主要包括:获取机组热力系统实时运行数据;对机组运行数据进行数据清洗、稳态工况判定与关键参数选取等预处理操作;机组实时发电热耗率在线计算;采用随机森林算法建立机组热耗率预测模型,具体包括:输入变量选取与样本数据分组、样本数据归一化、超参数调节及模型训练;选取主汽压力、主汽温度、再热温度、给水温度作为可调参数;以机组发电热耗率为目标函数,采用粒子群优化算法对机组各运行工况进行参数优化;最后,对上述各功能模块进行系统集成与布置。本发明通过对电厂机组运行数据的实时采集及预处理得到符合建模要求的高质量样本数据,采用随机森林算法建立了机组发电热耗率实时预测模型,采用粒子群优化算法建立了机组热耗率优化模型,得到了机组在运行工况下的最佳参数,通过对机组运行数据进行挖掘,有效降低了汽轮机组的发电热耗率,为电厂实际运行提供指导。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116703099B_ABST
    Figure CN116703099B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of virtual power plant across time matching regulation method based on machine learning algorithm, machine learning method is established unit power generation heat consumption rate prediction model according to past data of steam turbine, and then parameter optimization is carried out to each working condition using particle swarm optimization algorithm, and the operation model of steam turbine after optimization is established, after predicting load demand, internal source equipment capacity, electric vehicle energy storage capacity, establish virtual power plant operation cost model;According to the energy consumption of internal distributed energy, establish internal distributed energy operation model;Then evolutionary particle swarm algorithm is applied to the operation cost model and distributed energy operation model of virtual power plant, and the load optimization of distributed energy in virtual power plant is carried out;Finally, the operation scheme with the lowest relative operation cost is determined.The present application can comprehensively, accurately and conveniently calculate the optimal deployment scheme of distributed energy in virtual power plant operation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power plant big data, and in particular relates to a virtual power plant cross-time matching control method, device and computer-readable storage medium based on machine learning algorithms. Background Technology

[0002] With the advancement of science and technology and economic development in my country, the installed capacity and power generation of my country's power industry have been increasing year by year. Optimizing the operation of coal-fired power plants is of significant research importance. As the automation level of thermal power plants increases, a large amount of operational data is generated and stored during the power production process. This data is characterized by its vast quantity, complex structure, diverse forms, rapid growth rate, and high value. Real-time reading of power plant operational data through the power plant's SIS system and the use of advanced data mining techniques to unlock the value hidden within this massive amount of data is beneficial for energy conservation, emission reduction, and safe and economical operation of power plants. It also accelerates the development of smart power plants and is an important direction for current power plant development.

[0003] Today, with the increasing maturity of machine learning algorithms and big data technology, modeling complex power production systems using big data technology allows for the full extraction of production information that was previously overlooked due to technology. Analyzing historical operating data helps to analyze the deterioration characteristics of units during actual operation and guide the current operation of units. This enables the optimization analysis of steam turbine generator units and the provision of optimization suggestions without affecting unit operation, which has become an important means of power plant operation optimization. Summary of the Invention

[0004] The purpose of this invention is to provide a method and apparatus for cross-time matching and control of a virtual power plant based on machine learning algorithms.

[0005] The technical solution of the present invention:

[0006] A virtual power plant cross-time matching control method based on machine learning algorithms includes the following steps:

[0007] S1: Acquire unit load, main steam parameters (main steam pressure, main steam temperature, main steam flow), feedwater parameters (feedwater flow, feedwater temperature, feedwater pressure), reheat parameters (reheat pressure, reheat temperature), high-pressure discharge parameters (high-pressure discharge pressure, high-pressure discharge temperature), and desuperheating water parameters (desuperheating water temperature, desuperheating water pressure) operating data;

[0008] S2: Perform preprocessing operations on the operating data, such as data cleaning, steady-state condition determination, and key parameter selection;

[0009] S3: Calculate the enthalpy of water and water vapor according to the enthalpy formula, and then calculate the heat consumption rate of the computer group for power generation;

[0010] S4: Establish a predictive model for unit power generation heat consumption rate using the random forest algorithm;

[0011] S5: Select the main steam pressure, main steam temperature, reheat temperature, and feedwater temperature as adjustable parameters for operation optimization;

[0012] S6: Using the unit's power generation heat consumption rate as the objective function, the particle swarm optimization algorithm is used to optimize the parameters of the unit under various operating conditions.

[0013] S7 collects and organizes resource information and integrates virtual power plant user information. The information includes distributed resource information within multiple virtual power plants, resource information of users aggregated by load aggregators, total power purchased by users, and total power sold by virtual power plants to users.

[0014] S8 optimizes the transaction plan. The transaction plan is formulated by the virtual power plant aggregator based on the energy information of each distributed energy node with the goal of maximizing cumulative profit, and the optimal plan is obtained through model calculation.

[0015] S9, output the transaction plan, which is to output the optimal transaction plan.

[0016] In step S1, the main steam parameters include main steam pressure, main steam temperature, and main steam flow rate; the feedwater parameters include feedwater flow rate, feedwater temperature, and feedwater pressure; the reheat parameters include reheat pressure and reheat temperature; the high-pressure discharge parameters include high-pressure discharge pressure and high-pressure discharge temperature; and the desuperheating water parameters include desuperheating water temperature and desuperheating water pressure.

[0017] Step S2, which involves preprocessing the operating data such as data cleaning, steady-state condition determination, and key parameter selection, specifically includes the following sub-steps:

[0018] S21: Running data cleaning mainly includes deleting NaN values ​​and filling in the average value in the running data. For distorted data, filtering and deletion are performed by setting upper and lower boundary thresholds for running data. For discrete data, filtering and deletion are performed by setting upper and lower thresholds through linear fitting.

[0019] S22: Steady-state operating condition determination mainly uses a steady-state determination formula. If the determined value does not exceed the steady-state threshold within a certain period, the unit is determined to be in steady-state operating condition. If the determined value exceeds the steady-state threshold, the parameter is pushed forward for a period of time, the data is re-acquired, and the determination is performed again. The steady-state operating condition data of each determination is retained until all operating data has been determined. The determination expression is as follows:

[0020]

[0021] In the formula, P jLet Pi be the parameter value at time i, P0 be the average value over a period of time following that time, and δi be the parameter value at time i. k It is the threshold used for judgment.

[0022] S23: Key parameter selection primarily employs the Pearson correlation coefficient formula to calculate the correlation coefficient values ​​between various operating parameters and the unit's power generation heat rate. This aims to reduce data redundancy and computational load, thereby improving modeling speed and model accuracy. (Column a of the matrix x...) ai and column b x bi The formula for calculating the Pearson correlation coefficient is as follows:

[0023]

[0024] In the formula, m is the length of each feature column, and the correlation coefficient ranges from -1 to 1. -1 indicates that the two columns are completely negatively correlated, +1 indicates that the two columns are completely positively correlated, 0 indicates that the two columns are completely uncorrelated, and i represents the i-th time.

[0025] Step S3, which involves calculating the enthalpy of water and water vapor using the enthalpy formula and then determining the heat consumption rate of the power generation unit, specifically includes the following sub-steps:

[0026] S31: Calculate the enthalpy of main steam, reheat steam, feedwater, and desuperheating water based on the enthalpy function of water and steam.

[0027]

[0028] Where PT is the steam enthalpy calculation function, hs1 is the main steam enthalpy (kJ / kg), hs2 is the reheat steam enthalpy (kJ / kg); P1 and P2 are the main steam pressure and reheat steam pressure, respectively (MPa); T1 and T2 are the main steam temperature and reheat steam temperature, respectively (°C); PTF is the enthalpy calculation function for saturated water and subcooled water, T2 is the condensate temperature, °C. hw1 is the feedwater enthalpy (kJ / kg), hw2 is the desuperheating water enthalpy (kJ / kg); P3 and P4 are the feedwater pressure and desuperheating water pressure, respectively (MPa); T3 and T4 are the feedwater temperature and desuperheating water temperature, respectively (°C).

[0029] S32: After calculating the enthalpy values ​​of parameters such as main steam, reheat steam, feedwater, and desuperheating water, the power generation heat rate of the unit can be calculated. The calculation formula is as follows:

[0030]

[0031] In the formula, q rhThe parameters are: ...

[0032] Step S4: Establishing a prediction model for the unit's power generation heat rate using the random forest algorithm, specifically including the following sub-steps:

[0033] S41: Select sample data of 13 key parameters, namely load, main steam pressure, main steam temperature, main steam flow rate, feedwater flow rate, feedwater temperature, feedwater pressure, reheat pressure, reheat temperature, high-pressure discharge pressure, high-pressure discharge temperature, desuperheating water temperature, and desuperheating water pressure, as input variables for the model. The output variable of the model is the unit's power generation heat rate. Establish a mapping model relationship between the input and output variables. At the same time, divide the operating data within a period of time up to the current time into groups. The first 80% of the data within this period is used as the training set to train the model, and the last 20% of the data within this period is used as the test set to evaluate the model's fitting effect.

[0034] S42: Normalize the sample data to eliminate the order-of-magnitude differences in the input variables due to their units, thereby accelerating model training and reducing model error. The specific expression for data normalization is as follows:

[0035]

[0036] In the formula, x i Represents the data at point i, x i ′ represents the normalized data at point i. x max x min These represent the mean, maximum, and minimum values ​​of the data, respectively.

[0037] S43: Random forest uses the Bootstrap resampling method to randomly extract m samples from the original dataset to construct m training subsets. Decision tree modeling is performed on each training subset. Then, the prediction results of multiple decision trees are combined, and the final prediction result is determined by voting. The main adjustable hyperparameters of the random forest algorithm, regression trees (Ntrees) and minimum leaf node (MinleafSize), are set to value ranges of [50 100 150 200] and [5 10 20 50 100], respectively, resulting in 20 hyperparameter combinations. The model is repeatedly trained to iterate through each hyperparameter, and the Ntrees and MinleafSize parameter values ​​that minimize the mean square error of the model are selected as the final training parameters of the model.

[0038] Step S5: Select the main steam pressure, main steam temperature, reheat temperature, and feedwater temperature as adjustable parameters for operation optimization. The specific selection criteria are as follows:

[0039] The weighting coefficient matrix W = [-0.028, 0.016, 0.017, -0.056, -0.396, 0.434, -0.014, -0.013, 0.012, -0.006, -0.001, 0.004, -0.003] between 13 key parameters (main steam pressure, main steam temperature, reheat temperature, feedwater temperature, unit load, main steam flow rate, feedwater flow rate, high-pressure exhaust temperature, high-pressure exhaust pressure, reheat pressure, desuperheating water temperature, desuperheating water pressure, and feedwater pressure) and the unit's heat rate was calculated. Based on the magnitude of the weighting coefficients, four parameters closely related to the unit's power generation heat rate—main steam pressure, main steam temperature, reheat temperature, and feedwater temperature—were selected as adjustable parameters for operational optimization.

[0040] The weight coefficient matrix W is calculated using the following formula:

[0041]

[0042]

[0043]

[0044] In the formula, X 0 Let Y be an m x n matrix of independent variables. 0 It is an m-row, 1-column dependent variable matrix; Let X(j,j) represent the maximum and minimum values ​​in the j-th column of the matrix; X(j,j) and Y(i) are the normalized values ​​of the independent and dependent variables, respectively. The new matrix is ​​formed by adding 10% to each column of matrix X and subtracting 10% respectively; Each is a matrix The predicted values ​​obtained by feeding them into the random forest model; IV j QI represents the effect of changes in the independent variable on the dependent variable. j The quantile effect of the dependent variable is represented by the subscript. The value of ω is rounded down to the nearest integer, representing the influence value at the i-th quantile; j is the weight coefficient value; W is the weight coefficient matrix.

[0045] Step S6: Using the unit's power generation heat consumption rate as the objective function, the particle swarm optimization algorithm is employed to optimize the parameters for each operating condition of the unit, including:

[0046] Initialization: Set the population size, iteration count, and velocity V of the particle swarm. i =(v 1i ,v2i ,…,v ni ), position X i =(x 1i ,x 2i ,…,x ni );V ni V represents i The iteration speed at the nth iteration, X ni X represents i The position of the nth iteration. Where V ni V represents i The iteration speed at the nth iteration, X ni X represents i The position of the nth iteration.

[0047] Calculate fitness value: F i =f(X) i In the formula, F represents the fitness value, and f is the fitness function;

[0048] Step S6: Using the unit's power generation heat consumption rate as the objective function, the particle swarm optimization algorithm is used to optimize the parameters of the unit under various operating conditions, including calculating individual extreme values ​​and population extreme values: the largest fitness value among all particles in the initial population is the population extreme value, and the largest / smallest fitness value among all individual fitness values ​​is the individual extreme value. In the first calculation, each particle has only one fitness value, which is its individual extreme value.

[0049] P i =X i G i =P ai (max[f(P i )])

[0050] In the formula, P represents the individual extreme value, and G represents the population extreme value;

[0051] Particle velocity and position updates: Velocity and position updates are iterated according to the following formulas:

[0052]

[0053]

[0054]

[0055] In the formula, k is the number of iterations, w is the weight, c1 and c2 are constants, R1 and R2 are random numbers between [0,1], and v max v min The boundary values ​​of the speed range set for the first step;

[0056] Fitness, individual extreme values, and population extreme value updates: After the population changes position, the fitness value of each particle is recalculated and compared with the original extreme values ​​to update each extreme value;

[0057] Loop calculation: When the number of iterations in the loop calculation does not meet the termination condition, return to the particle velocity and position update point and recalculate;

[0058] Output the optimal solution: The calculation terminates when the K value reaches its maximum, and the extreme value and the position of the particle corresponding to the extreme value are output.

[0059] S7 collects and organizes resource information and integrates it with virtual power plant user information. The information includes distributed resource information within multiple virtual power plants, resource information aggregated by load aggregators, total power purchased by users, and total power sold by virtual power plants to users, including:

[0060] The resources include distributed energy storage for electric vehicles and user loads of virtual power plants. The load-side resources of electric vehicles mainly include charging piles and charging / swapping stations. The virtual power plants are industrial controllable loads, including discontinuous production workshops and adjustable electrical equipment.

[0061] S8 optimizes the trading scheme. This scheme is formulated by the virtual power plant aggregator based on the energy information of each distributed energy node, aiming to maximize cumulative profit. The optimal scheme is calculated through a model, including:

[0062] The VPP aims to maximize revenue. Considering the VPP feed-in tariff, the operation and management costs of various distributed energy resources, the charging and discharging costs of electric vehicles, and the operation, management, and fuel costs of gas turbines, its objective function is as follows:

[0063]

[0064]

[0065] In the formula, t represents the time series, with 1 hour as a time interval, t = 1, 2, 3, ..., T, where T represents the number of hours within the operating cycle, and 1 day is one operating cycle, T = 24 hours; C represents the total revenue, ¥; C Gri d represents the VPP electricity price, in RMB / MWh; P t W Actual output of gas turbine, MW; C fp C represents the unit fuel cost coefficient for gas turbines, expressed as ¥ / MWh. t PEV Let P be the cost of the electric vehicle at time t, in ¥ / MWh. t c,PEV P t disc,PEVLet C be the total charging and discharging power of the electric vehicle at time t, in MW; t c C t dis C t BAT Let v be the electric vehicle charging operation management coefficient, discharging operation management coefficient, and electric vehicle battery loss cost at time t, expressed in ¥ / MWh; t c v t dis c represents the charging / discharging state of the electric vehicle at time t, when v t c =1, indicating that the electric vehicle is charging, when v t c =0 indicates that the electric vehicle is not charging, when v t dis c = 1 indicates that the electric vehicle is discharging, when v t dis c=0 indicates that the electric vehicle is not discharging.

[0066] Electric vehicles (EVs) possess dual attributes as both consumers and energy storage. To fully utilize their energy storage capacity, user travel needs must first be met. During the daily hours of 07:00–09:00 and 16:00–19:00, a large number of EVs will leave the grid. Their electricity demand needs must be met; therefore, these EVs can only charge, not discharge. The remaining EVs can charge and discharge. EVs connected to the virtual power plant at other times are entirely controlled by the VPP (Virtual Power Plant), working with gas turbines to compensate for the volatility and randomness of wind and solar power generation, thus completing the virtual power plant's output plan. Simultaneously, to incentivize EV owners to aggregate into the virtual power plant, certain incentive measures are needed. Constraints include equilibrium conditions and output constraints.

[0067] Where the power balance constraint is

[0068]

[0069] Gas turbine power upper and lower limit constraints

[0070]

[0071] In the formula, P max W P min W The upper and lower limits of the gas turbine output are given in MW.

[0072] Electric vehicle constraints

[0073]

[0074]

[0075]

[0076]

[0077] In the formula, P dis,Single P c,Single P represents the discharge and charging power of a single electric vehicle, in MW; N represents the number of controllable electric vehicles at time t, in vehicles; t PEV The equivalent power output of an electric vehicle is expressed in MW, where a value greater than 0 indicates discharging and a value less than 0 indicates charging.

[0078] Under the aforementioned operating strategy and constraints, the VPP scheduling model is solved using the particle swarm optimization algorithm. The particle swarm optimizer (PSO) employs a velocity-position model to optimize the entire solution space, with each particle performing iterative operations according to the given formula. Finally, the optimal running result is obtained.

[0079] S9, output the transaction plan, which is to output the optimal transaction plan.

[0080] This invention also provides a virtual power plant cross-time matching control device based on machine learning algorithms, specifically including:

[0081] The unit operation data acquisition module is used to acquire unit load, main steam parameters (main steam pressure, main steam temperature, main steam flow), feedwater parameters (feedwater flow, feedwater temperature, feedwater pressure), reheat parameters (reheat pressure, reheat temperature), high-pressure discharge parameters (high-pressure discharge pressure, high-pressure discharge temperature), and desuperheating water parameters (desuperheating water temperature, desuperheating water pressure).

[0082] The data preprocessing module is used to clean the operating data, determine the steady-state condition, and select key parameters.

[0083] The enthalpy and power generation heat rate calculation module is used to calculate the enthalpy of water and water vapor according to the enthalpy formula, and then calculate the power generation heat rate of the computer group.

[0084] The power generation heat rate prediction module is used to establish a prediction model for the unit's power generation heat rate using the random forest algorithm. Specifically, it includes input variable selection and sample data grouping (training set: test set = 8:2), sample data normalization, hyperparameter adjustment, and model training.

[0085] The adjustable parameter optimization module is used to select main steam pressure, main steam temperature, reheat temperature, and feedwater temperature as adjustable parameters. The particle swarm optimization algorithm is used to optimize the adjustable parameters to minimize the power generation heat rate.

[0086] The present invention also provides a user terminal device, including a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor. The transceiver, the memory, and the processor are all interconnected through the bus. When the processor executes the computer program, it implements the steps of a virtual power plant cross-time matching control method based on machine learning algorithms.

[0087] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a virtual power plant cross-time matching control method based on a machine learning algorithm.

[0088] The beneficial effects of this invention are:

[0089] The present invention provides a virtual power plant cross-time matching control method, device, terminal equipment, and readable storage medium based on machine learning algorithms. Compared with the current technology, the optimization effect of the virtual power plant cross-time matching control method and device in the present invention mainly includes: acquiring real-time operating data of the unit's thermal system; performing preprocessing operations such as data cleaning, steady-state condition determination, and key parameter selection on the unit's operating data; online calculation of the unit's real-time power generation heat rate; establishing a unit heat rate prediction model using the random forest algorithm, specifically including: input variable selection and sample data grouping, sample data normalization, hyperparameter adjustment, and model training; selecting main steam pressure, main steam temperature, reheat temperature, and feedwater temperature as adjustable parameters; using the unit's power generation heat rate as the objective function, and employing the particle swarm optimization algorithm to optimize the parameters for each operating condition of the unit; finally, integrating and arranging the above functional modules. This invention obtains high-quality sample data that meets modeling requirements through real-time acquisition and preprocessing of power plant unit operation data. A real-time prediction model for the unit's power generation heat rate is established using the random forest algorithm, and an optimization model for the unit's heat rate is established using the particle swarm optimization algorithm. The optimal parameters of the unit under operating conditions are obtained. By mining the unit's operation data, the power generation heat rate of the steam turbine unit is effectively reduced, providing guidance for the actual operation of the power plant. Attached Figure Description

[0090] To more clearly illustrate the calculation methods and technical solutions in the embodiments of the present invention, the embodiments or technical solutions will be described more intuitively below using the accompanying drawings. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0091] Figure 1A flowchart of a virtual power plant cross-time matching control method based on machine learning algorithm provided by an embodiment of the present invention is shown;

[0092] Figure 2 The schematic diagram of the random forest algorithm for predicting power generation heat consumption rate provided in the embodiments of the present invention is shown.

[0093] Figure 3 This invention illustrates a schematic diagram of the module structure of a virtual power plant cross-time matching and control device provided in an embodiment of the present invention.

[0094] Figure 4 A schematic diagram of the terminal equipment of the virtual power plant cross-time matching and control device provided in an embodiment of the present invention is shown. Detailed Implementation

[0095] like Figure 1-4 As shown, in order to solve the problem of imperfect cross-time matching and control of current virtual power plants, the purpose of this invention is to provide a cross-time matching and control method, device and computer user terminal equipment for virtual power plants based on machine learning algorithms.

[0096] Reference Figure 1 This invention proposes a cross-time matching control method for virtual power plants based on machine learning algorithms, comprising the following specific steps:

[0097] S1: Acquire unit load, main steam parameters (main steam pressure, main steam temperature, main steam flow), feedwater parameters (feedwater flow, feedwater temperature, feedwater pressure), reheat parameters (reheat pressure, reheat temperature), high-pressure discharge parameters (high-pressure discharge pressure, high-pressure discharge temperature), and desuperheating water parameters (desuperheating water temperature, desuperheating water pressure) operating data;

[0098] S2: Perform preprocessing operations on the operating data, such as data cleaning, steady-state condition determination, and key parameter selection;

[0099] S3: Calculate the enthalpy of water and water vapor according to the enthalpy formula, and then calculate the heat consumption rate of the computer group for power generation;

[0100] S4: Establish a predictive model for unit power generation heat consumption rate using the random forest algorithm;

[0101] S5: Select the main steam pressure, main steam temperature, reheat temperature, and feedwater temperature as adjustable parameters for operation optimization;

[0102] S6: Using the unit's power generation heat consumption rate as the objective function, the particle swarm optimization algorithm is used to optimize the parameters of the unit under various operating conditions.

[0103] S7 collects and organizes resource information and integrates virtual power plant user information. The information includes distributed resource information within multiple virtual power plants, resource information of users aggregated by load aggregators, total power purchased by users, and total power sold by virtual power plants to users.

[0104] S8 optimizes the transaction plan. The transaction plan is formulated by the virtual power plant aggregator based on the energy information of each distributed energy node with the goal of maximizing cumulative profit, and the optimal plan is obtained through model calculation.

[0105] S9, output the transaction plan, which is to output the optimal transaction plan.

[0106] Furthermore, S2 specifically includes:

[0107] S21: Running data cleaning mainly includes deleting NaN values ​​and filling in the average value in the running data. For distorted data, filtering and deletion are performed by setting upper and lower boundary thresholds for running data. For discrete data, filtering and deletion are performed by setting upper and lower thresholds through linear fitting.

[0108] S22: Steady-state operating condition determination mainly uses a steady-state determination formula. If the determined value does not exceed the steady-state threshold within a certain period, the unit is determined to be in steady-state operating condition. If the determined value exceeds the steady-state threshold, the parameter is pushed forward for a period of time, the data is re-acquired, and the determination is performed again. The steady-state operating condition data of each determination is retained until all operating data has been determined. The determination expression is as follows:

[0109]

[0110] In the formula, P j Let Pi be the parameter value at time i, P0 be the average value over a period of time following that time, and δi be the parameter value at time i. k It is the threshold used for judgment.

[0111] S23: Key parameter selection primarily employs the Pearson correlation coefficient formula to calculate the correlation coefficient values ​​between various operating parameters and the unit's power generation heat rate. This aims to reduce data redundancy and computational load, thereby improving modeling speed and model accuracy. (Column a of the matrix x...) a and column b x b The formula for calculating the Pearson correlation coefficient is as follows:

[0112]

[0113] In the formula, m is the length of each feature column, and the correlation coefficient ranges from -1 to 1. -1 indicates that the two columns are completely negatively correlated, +1 indicates that the two columns are completely positively correlated, and 0 indicates that the two columns are completely uncorrelated.

[0114] S3: Calculate the enthalpy of water and water vapor according to the enthalpy formula, and then calculate the heat consumption rate of the computer group's power generation.

[0115] Furthermore, S3 specifically includes:

[0116] S31: Calculate the enthalpy of main steam, reheat steam, feedwater, and desuperheating water based on the enthalpy function of water and steam.

[0117]

[0118] Where PT is the steam enthalpy calculation function, hs1 is the main steam enthalpy (kJ / kg), hs2 is the reheat steam enthalpy (kJ / kg); P1 and P2 are the main steam pressure and reheat steam pressure, respectively (MPa); T1 and T2 are the main steam temperature and reheat steam temperature, respectively (°C); PTF is the enthalpy calculation function for saturated water and subcooled water, T2 is the condensate temperature, °C. hw1 is the feedwater enthalpy (kJ / kg), hw2 is the desuperheating water enthalpy (kJ / kg); P3 and P4 are the feedwater pressure and desuperheating water pressure, respectively (MPa); T3 and T4 are the feedwater temperature and desuperheating water temperature, respectively (°C).

[0119] S32: After calculating the enthalpy values ​​of parameters such as main steam, reheat steam, feedwater, and desuperheating water, the power generation heat rate of the unit can be calculated. The calculation formula is as follows:

[0120]

[0121] In the formula, q rh The parameters are: ...

[0122] S4: Use the random forest algorithm to establish a predictive model for the unit's power generation heat consumption rate.

[0123] Furthermore, S4 specifically includes:

[0124] S41: Select sample data of 13 key parameters, namely load, main steam pressure, main steam temperature, main steam flow rate, feedwater flow rate, feedwater temperature, feedwater pressure, reheat pressure, reheat temperature, high-pressure discharge pressure, high-pressure discharge temperature, desuperheating water temperature, and desuperheating water pressure, as input variables for the model. The output variable of the model is the unit's power generation heat rate. Establish a mapping model relationship between the input and output variables. At the same time, divide the operating data within a period of time up to the current time into groups. The first 80% of the data within this period is used as the training set to train the model, and the last 20% of the data within this period is used as the test set to evaluate the model's fitting effect.

[0125] S42: Normalize the sample data to eliminate the order-of-magnitude differences in the input variables due to their units, thereby accelerating model training and reducing model error. The specific expression for data normalization is as follows:

[0126]

[0127] In the formula, x i Represents the data at point i, x i ′ represents the normalized data at point i. x max x min These represent the mean, maximum, and minimum values ​​of the data, respectively.

[0128] S43: Random forest uses the Bootstrap resampling method to randomly extract m samples from the original dataset to construct m training subsets. Decision tree modeling is performed on each training subset. Then, the prediction results of multiple decision trees are combined, and the final prediction result is determined by voting. The main adjustable hyperparameters of the random forest algorithm, regression trees (Ntrees) and minimum leaf node (MinleafSize), are set to value ranges of [50 100 150 200] and [5 10 20 50 100], respectively, resulting in 20 hyperparameter combinations. The model is repeatedly trained to iterate through each hyperparameter, and the Ntrees and MinleafSize parameter values ​​that minimize the mean square error of the model are selected as the final training parameters of the model.

[0129] S5: Select the main steam pressure, main steam temperature, reheat temperature, and feedwater temperature as adjustable parameters for operational optimization. The specific selection criteria are as follows:

[0130] The weighting coefficient matrix W = [-0.028, 0.016, 0.017, -0.056, -0.396, 0.434, -0.014, -0.013, 0.012, -0.006, -0.001, 0.004, -0.003] between 13 key parameters (main steam pressure, main steam temperature, reheat temperature, feedwater temperature, unit load, main steam flow rate, feedwater flow rate, high-pressure exhaust temperature, high-pressure exhaust pressure, reheat pressure, desuperheating water temperature, desuperheating water pressure, and feedwater pressure) and the unit heat rate was calculated. Based on the magnitude of the weighting coefficients, four parameters closely related to the unit's power generation heat rate—main steam pressure, main steam temperature, reheat temperature, and feedwater temperature—were selected as adjustable parameters for operation optimization.

[0131] The weight coefficient matrix W is calculated using the following formula:

[0132]

[0133]

[0134]

[0135] In the formula, X 0 Let Y be an m x n matrix of independent variables. 0 It is an m-row, 1-column dependent variable matrix; Let X(j,j) represent the maximum and minimum values ​​in the j-th column of the matrix; X(j,j) and Y(i) are the normalized values ​​of the independent and dependent variables, respectively. The new matrix is ​​formed by adding 10% to each column of matrix X and subtracting 10% respectively; Each is a matrix The predicted values ​​obtained by feeding them into the random forest model; IV j QIV represents the effect of changes in the independent variable on the dependent variable. j The quantile effect value of the dependent variable, subscript The value of ω is rounded down to the nearest integer, representing the influence value at the i-th quantile; j is the weight coefficient value; W is the weight coefficient matrix.

[0136] S6: Using the unit's power generation heat consumption rate as the objective function, the particle swarm optimization algorithm is used to optimize the parameters of the unit under various operating conditions, including calculating individual extreme values ​​and population extreme values: the largest fitness value among all particles in the initial population is the population extreme value, and the largest / smallest fitness value among all individual fitness values ​​is the individual extreme value. In the first calculation, each particle has only one fitness value, which is its individual extreme value.

[0137] P i =X i G i =P ai (max[f(Pi )])

[0138] In the formula, P represents the individual extreme value, and G represents the population extreme value;

[0139] Particle velocity and position updates: Velocity and position updates are iterated according to the following formulas:

[0140]

[0141]

[0142]

[0143] In the formula, k is the number of iterations, w is the weight, c1 and c2 are constants, R1 and R2 are random numbers between [0,1], and v max v min The boundary values ​​of the speed range set for the first step;

[0144] The following references Figure 1 The present invention provides a method for cross-time matching control of a virtual power plant based on a machine learning algorithm, which further explains the calculation of the cross-time matching control of the virtual power plant as follows:

[0145] The system acquires operating data including unit load, main steam parameters (main steam pressure, main steam temperature, main steam flow rate), feedwater parameters (feedwater flow rate, feedwater temperature, feedwater pressure), reheat parameters (reheat pressure, reheat temperature), high-pressure discharge parameters (high-pressure discharge pressure, high-pressure discharge temperature), and desuperheating water parameters (desuperheating water temperature, desuperheating water pressure). Preprocessing operations are performed on the operating data, including data cleaning, steady-state condition determination, and key parameter selection. The enthalpy of water and steam is calculated using the enthalpy formula to determine the unit's power generation heat rate. A random forest algorithm is used to establish a predictive model for the unit's power generation heat rate. Main steam pressure, main steam temperature, reheat temperature, and feedwater temperature are selected as adjustable parameters for operational optimization. With the unit's power generation heat rate as the objective function, a particle swarm optimization algorithm is used to optimize the parameters for each operating condition of the unit.

[0146] This invention also provides a virtual power plant cross-time matching control device based on machine learning algorithms, the mechanism of which is as follows: Figure 3 As shown, it specifically includes:

[0147] The unit operation data acquisition module is used to acquire unit load, main steam parameters (main steam pressure, main steam temperature, main steam flow), feedwater parameters (feedwater flow, feedwater temperature, feedwater pressure), reheat parameters (reheat pressure, reheat temperature), high-pressure discharge parameters (high-pressure discharge pressure, high-pressure discharge temperature), and desuperheating water parameters (desuperheating water temperature, desuperheating water pressure).

[0148] The data preprocessing module is used to clean the operating data, determine the steady-state condition, and select key parameters.

[0149] The water and water vapor enthalpy and power generation heat rate calculation module is used to calculate the water and water vapor enthalpy and then calculate the power generation heat rate of the computer group according to the enthalpy formula.

[0150] The power generation heat rate prediction module is used to establish a prediction model for the unit's power generation heat rate using the random forest algorithm. Specifically, it includes input variable selection and sample data grouping (training set: test set = 8:2), sample data normalization, hyperparameter adjustment, and model training.

[0151] The adjustable parameter optimization module is used to select main steam pressure, main steam temperature, reheat temperature, and feedwater temperature as adjustable parameters. The particle swarm optimization algorithm is used to optimize the adjustable parameters to minimize the power generation heat rate.

[0152] The present invention also provides a user terminal device, including a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the transceiver, the memory, and the processor are all interconnected via the bus.

[0153] A bus is used to connect transceivers, memory, processors, and computer users in series.

[0154] A transceiver is used to receive and send data under the control of a processor.

[0155] A computer-readable storage medium stores a computer program, which includes program instructions. When executed by a processor, the program instructions implement all or part of the processes in the methods described in the above embodiments. The computer program can also instruct related hardware to implement these processes. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium can include any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in a computer-readable medium can be appropriately added to or subtracted according to the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, a computer-readable medium may not include electrical carrier signals and telecommunication signals.

[0156] The computer-readable storage medium can be an internal storage unit of the terminal in any of the foregoing embodiments, such as the terminal's hard disk or memory. The computer-readable storage medium can also be an external storage device of the terminal, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., equipped on the terminal. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of the terminal. The computer-readable storage medium is used to store computer programs and other programs and data required by the terminal. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

[0157] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0158] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the terminals and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0159] In the several embodiments provided in this application, it should be understood that the disclosed terminals and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, or it may be an electrical, mechanical or other form of connection.

[0160] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.

[0161] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0162] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A virtual power plant cross-time matching control method based on machine learning algorithms, characterized in that, Includes the following steps: S1: Acquire operating data of unit load, main steam parameters, feedwater parameters, reheat parameters, high-pressure exhaust parameters, and desuperheating water parameters; S2: Perform preprocessing operations such as data cleaning, steady-state condition determination, and key parameter selection on the operating data; S3: Calculate the enthalpy of water and water vapor according to the enthalpy formula, and then calculate the heat consumption rate of the computer group for power generation; S4: Establish a predictive model for the unit's power generation heat rate using the random forest algorithm, which includes the following steps: S41: Select sample data of 13 key parameters, namely load, main steam pressure, main steam temperature, main steam flow rate, feedwater flow rate, feedwater temperature, feedwater pressure, reheat pressure, reheat temperature, high-pressure discharge pressure, high-pressure discharge temperature, desuperheating water temperature, and desuperheating water pressure, as input variables for the model. The output variable of the model is the unit's power generation heat rate. Establish a mapping model relationship between the input and output variables. At the same time, divide the operating data within a period of time up to the current time into groups. The first 80% of the data in this period is used as the training set to train the model, and the last 20% of the data in this period is used as the test set to evaluate the model's fitting effect. S42: Normalize the sample data to eliminate the order-of-magnitude differences in the input variables due to their units, thereby accelerating model training and reducing model error. The specific expression for data normalization is as follows: In the formula, express i Point data, Indicates after normalization i Point data, , , These represent the mean, maximum, and minimum values ​​of the data, respectively. S43: Random forests use the Bootstrap resampling method to randomly sample data from the original dataset. m One sample, construct m For each training subset, a decision tree model is built. Then, the prediction results of multiple decision trees are combined, and the final prediction result is determined by voting. The main adjustable hyperparameters of the random forest algorithm, regression tree and minimum leaf node, are set to value ranges of [50 100 150 200] and [5 10 20 50 100], respectively, resulting in 20 hyperparameter combinations. The model is repeatedly trained to iterate through each hyperparameter. The Ntrees and MinleafSize parameter values ​​that minimize the mean square error of the model are selected as the final training parameters of the model. S5: Select the main steam pressure, main steam temperature, reheat temperature, and feedwater temperature as adjustable parameters for operation optimization; S6: Using the unit's power generation heat consumption rate as the objective function, the particle swarm optimization algorithm is employed to optimize parameters for various operating conditions of the unit, including: Initialization: Set the population size, iteration count, and speed of the particle swarm. ,Location In the formula, V ni V represents i The iteration speed at the nth iteration, X ni X represents i The position of the nth iteration; Calculate fitness: In the formula, F represents the fitness value. f For adaptive value functions; Step S6: Using the unit's power generation heat consumption rate as the objective function, the particle swarm optimization algorithm is used to optimize the parameters of the unit under various operating conditions, including calculating individual extreme values ​​and population extreme values: the largest fitness value among all particles in the initial population is the population extreme value, and the largest / smallest fitness value among all individual fitness values ​​is the individual extreme value. In the first calculation, each particle has only one fitness value, which is its individual extreme value. , In the formula, P Represents an individual extreme value. G Indicates the extreme value of the group; Particle velocity and position updates: Velocity and position updates are iterated according to the following formulas: In the formula, k For the number of iterations, w As weight, , It is a constant. R 1 , R 2 It is a random number between [0,1]. , The boundary values ​​of the speed range set for the first step; Fitness, individual extreme values, and population extreme value updates: After the population changes position, the fitness value of each particle is recalculated and compared with the original extreme values ​​to update each extreme value; Loop calculation: When the number of iterations in the loop calculation does not meet the termination condition, return to the particle velocity and position update point and recalculate; Output the optimal solution: The calculation terminates when the K value reaches its maximum, and the extreme value and the position of the particle corresponding to the extreme value are output. S7 collects and organizes resource information and integrates virtual power plant user information. The information includes distributed resource information within multiple virtual power plants, resource information of users aggregated by load aggregators, total power purchased by users, and total power sold by virtual power plants to users. S8 optimizes the transaction plan. The transaction plan is formulated by the virtual power plant aggregator based on the energy information of each distributed energy node with the goal of maximizing cumulative profit, and the optimal plan is obtained through model calculation. S9, output the transaction plan, which is to output the optimal transaction plan.

2. The virtual power plant cross-time matching control method based on machine learning algorithm according to claim 1, characterized in that, Step S1: Main steam parameters include main steam pressure, main steam temperature and main steam flow rate; feedwater parameters include feedwater flow rate, feedwater temperature and feedwater pressure; reheat parameters include reheat pressure and reheat temperature; high-pressure discharge parameters include high-pressure discharge pressure and high-pressure discharge temperature; desuperheating water parameters include desuperheating water temperature and desuperheating water pressure.

3. The virtual power plant cross-time matching control method based on machine learning algorithm according to claim 1, characterized in that, Step S2: Perform data cleaning, steady-state condition determination, and key parameter selection preprocessing on the operating data, specifically including the following sub-steps: S21: Running data cleaning includes deleting NaN values ​​and filling in average values ​​in the running data. For distorted data, filtering and deletion are performed by setting upper and lower boundary thresholds for running data. For discrete data, filtering and deletion are performed by setting upper and lower thresholds through linear fitting. S22: The steady-state condition determination is made using a steady-state determination formula. If the determination value does not exceed the steady-state threshold within a certain period of time, the unit is determined to be in a steady-state condition. If the judgment value exceeds the steady-state threshold, the parameter is recursively pushed forward for a period of time, the data is re-acquired and the judgment is performed again, and the steady-state operating condition data of each judgment is retained until all operating data has been judged; the judgment expression is as follows: In the formula, P j for i Parameter values ​​at time, P 0 It is the average value over a period of time following that moment. It is the threshold used for judgment; S23: The key parameters are selected by calculating the correlation coefficient between each operating parameter and the unit's power generation heat rate using the Pearson correlation coefficient calculation formula. Matrix number a List x ai and the b List x bi The formula for calculating the Pearson correlation coefficient is as follows: In the formula, m The length of each feature column is denoted as , and the correlation coefficient ranges from [-1, 1]; -1 indicates that the two columns are completely negatively correlated, +1 indicates that the two columns are completely positively correlated, 0 indicates that the two columns are completely uncorrelated, and i represents the i-th time.

4. The virtual power plant cross-time matching control method based on machine learning algorithm according to claim 1, characterized in that, Step S3: Calculate the enthalpy of water and water vapor according to the enthalpy formula, and then calculate the heat consumption rate of the power generation unit. This includes the following sub-steps: S31: Calculate the enthalpy of main steam, reheat steam, feedwater, and desuperheating water based on the enthalpy function of water and steam. in, PT This is a function for calculating the enthalpy of water vapor. hs 1 Main steam enthalpy value kJ / kg, hs 2 The enthalpy of reheat steam is kJ / kg; , These are the main steam pressure and reheat steam pressure, respectively, in MPa; T 1 , T 2 These are the main steam temperature and the reheat steam temperature, respectively, in °C; Functions for calculating the enthalpy of saturated water and subcooled water; hw 1 The enthalpy value of the water supply is kJ / kg. hw 2 The enthalpy of the desuperheated water is measured in kJ / kg. P 3 , P 4 These are the feed water pressure and the desuperheating water pressure, respectively, in MPa; T 3 , T 4 These are the feed water temperature and the desuperheating water temperature, respectively, in °C; S32: After calculating the enthalpy values ​​of main steam, reheat steam, feedwater, and desuperheating water, the power generation heat rate of the unit can be calculated. The calculation formula is as follows: In the formula, q rh This indicates the heat consumption rate of power generation, expressed in kJ / (kWh). Nel This indicates the unit power, measured in kW. D This indicates flow rate, measured in kg / h. h Indicates enthalpy value, unit is kJ / kg; subscript zq Indicates main steam parameters, subscript zr Indicates parameters of the reheat steam hot section, subscript zl Indicates parameters of the reheat steam cold section, subscript gj Indicates parameters of superheated desuperheating water, subscript zj Indicates the parameters of the reheat desuperheating water, subscript fw This indicates the water supply parameters.

5. The virtual power plant cross-time matching control method based on machine learning algorithm according to claim 1, characterized in that, Step S5: Select the main steam pressure, main steam temperature, reheat temperature, and feedwater temperature as adjustable parameters for operation optimization. The specific selection criteria are as follows: The weighting coefficient matrix W = [-0.028, 0.016, 0.017, -0.056, -0.396, 0.434, -0.014, -0.013, 0.012, -0.006, -0.001, 0.004, -0.003] between 13 key parameters (main steam pressure, main steam temperature, reheat temperature, feedwater temperature, unit load, main steam flow rate, feedwater flow rate, high-pressure exhaust temperature, high-pressure exhaust pressure, reheat pressure, desuperheating water temperature, desuperheating water pressure, and feedwater pressure) and the unit heat rate was calculated. Based on the magnitude of the weighting coefficients, four parameters closely related to the unit's power generation heat rate—main steam pressure, main steam temperature, reheat temperature, and feedwater temperature—were selected as adjustable parameters for operational optimization. The weight coefficient matrix W is calculated using the following formula: In the formula, for m OK n The matrix of independent variables of the column, for m A matrix of dependent variables with 1 row and 1 column; , This represents the maximum and minimum values ​​in the j-th column of the matrix; These are the normalized values ​​of the independent and dependent variables; The new matrix is ​​formed by adding 10% to each column of matrix X and subtracting 10% respectively; Each is a matrix The predicted values ​​obtained by feeding them into the random forest model; This represents the effect of changes in the independent variable on the dependent variable. The quantile effect value of the dependent variable, subscript The value is rounded down to the nearest integer, indicating the first integer. i Influence value at the quantile level; These are the weighting coefficient values; This is the weight coefficient matrix.

6. A virtual power plant cross-time matching control device based on machine learning algorithms, characterized in that, A user terminal device includes a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor. The transceiver, the memory, and the processor are all interconnected via the bus. When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 5.

7. The virtual power plant cross-time matching control device based on machine learning algorithm according to claim 6, characterized in that, A computer-readable storage medium, wherein the computer program, when executed by a processor, implements the steps of the method as claimed in any one of claims 1 to 5.

8. The virtual power plant cross-time matching control device based on machine learning algorithm according to claim 6, characterized in that, A device for calculating economic indicators of power plant thermal systems, optimizing and matching control of unit operating conditions, based on machine learning algorithms and unit operation data is provided. The device includes: acquiring real-time operating data of the unit thermal system; performing preprocessing operations on the unit operating data, such as data cleaning, steady-state condition determination, and key parameter selection; calculating the real-time power generation heat rate of the unit online; and establishing a unit heat rate prediction model using a random forest algorithm.