Frequency modulation instruction prediction method and system for molten salt heat storage system based on machine learning

By analyzing the effect of the number of decision trees on the error and correlation coefficient, the optimal number of decision trees is determined, which solves the problem of improper selection of the number of decision trees in the random forest algorithm, achieves high-precision and low-computation frequency modulation instruction prediction, and improves the stability and operational efficiency of the power grid.

CN120387034BActive Publication Date: 2025-09-05XIAN THERMAL POWER RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510884713.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-09-05
Estimated Expiration
2045-06-30

AI Technical Summary

Technical Problem

Improper selection of the number of decision trees in the existing random forest algorithm leads to poor prediction accuracy or excessive computational complexity, affecting the stability and efficiency of power grid frequency regulation.

Method used

By constructing several decision trees, analyzing the errors and correlation coefficients under different numbers of decision trees, the optimal number of decision trees is determined, and the random forest algorithm is used to predict the frequency modulation command signal data.

Benefits of technology

The accuracy of frequency regulation instruction prediction is improved, the amount of calculation is reduced, and the stability and operational efficiency of the power grid are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387034B_ABST
    Figure CN120387034B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of power grid frequency regulation technology, and specifically to a method and system for predicting frequency regulation commands for a molten salt heat storage system based on machine learning. The method comprises: predicting command signal data using a plurality of decision trees to obtain a plurality of predicted command signal data sequences, and obtaining errors under different numbers of decision trees; obtaining error trend change factors under different numbers of decision trees based on the errors; performing correlation analysis on the predicted command signal data sequences corresponding to all decision trees under different numbers of decision trees to obtain the degree of increase in the number of decision trees under different numbers of decision trees; obtaining the optimal number of decision trees based on the degree of increase in the number of decision trees and the error trend change factors; and predicting frequency regulation command signal data using a random forest algorithm based on the optimal number of decision trees. The present invention improves the accuracy of frequency regulation command prediction and reduces the amount of computation required.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power grid frequency regulation technology, and in particular to a method and system for predicting frequency regulation instructions for a molten salt heat storage system based on machine learning. Background Art

[0002] Molten salt thermal storage systems combine molten salt energy storage technology with the peak-shaving and frequency-regulating capabilities of power systems, balancing fluctuations in energy supply and demand and improving grid stability. Molten salt thermal storage systems are primarily used to store excess electricity and release the stored energy during peak demand periods, thereby balancing grid load fluctuations. Molten salt thermal storage heats molten salt, storing thermal energy. When needed, the molten salt can be released to drive thermoelectric conversion equipment (such as steam turbines and combined heat and power generation) to generate electricity.

[0003] To ensure grid stability and reliability and address issues such as load and power generation fluctuations, unstable renewable energy generation, and frequency fluctuations, frequency modulation command signal prediction allows for pre-emptive adjustments to generator output and energy storage systems to avoid frequency anomalies, system overloads, and large-scale power outages. This improves grid stability, reduces operating costs, and enhances the grid's ability to respond to emergencies.

[0004] When predicting frequency modulation command signals, existing methods can use the random forest algorithm to construct a decision tree for prediction. However, in the conventional prediction process, the number of decision trees is randomly determined by humans, and the number of decision trees also has a certain degree of influence on the prediction process. When the number of decision trees is small, the accuracy of the predicted results is poor. When the number of decision trees is large, although the accuracy of the prediction results can be improved, due to the large number of decision trees, the prediction process will lead to increased computational complexity and memory overhead, which reduces the computational efficiency. Summary of the Invention

[0005] The present invention provides a method and system for predicting frequency modulation instructions of a molten salt heat storage system based on machine learning, which are used to solve the problem of selecting the number of decision trees in the existing random forest algorithm.

[0006] The purpose of the present invention can be achieved through the following technical solutions:

[0007] The first aspect of the present invention is to provide a method for predicting frequency modulation instructions of a molten salt heat storage system based on machine learning, comprising:

[0008] Continuously obtain frequency modulation command signal data at several moments and various characteristic data that affect the stability of the power system; obtain several sample data points through the frequency modulation command signal data and various characteristic data at several moments;

[0009] Several sample data points are sorted in time to obtain a data point sequence; the data point sequence is divided into a front data point sequence and a rear data point sequence; the frequency modulation command signal data corresponding to all data points in the rear data point sequence are grouped into a sequence, recorded as a rear command signal data sequence; data points are selected with replacement from the front data point sequence to obtain several data sets; each data set contains several data points; several decision trees are constructed using the several data sets; the command signal data is predicted using the several decision trees to obtain several predicted command signal data sequences, and the errors under different numbers of decision trees are obtained by calculating the differences between the several predicted command signal data sequences and the rear command signal data sequences; the error trend change factors under different numbers of decision trees are obtained by calculating the errors under different numbers of decision trees;

[0010] Matching prediction instruction signal data sequences corresponding to all decision trees under different numbers of decision trees in pairs to obtain a plurality of sequence combinations; obtaining a degree of increase in the number of decision trees under different numbers of decision trees based on a correlation coefficient between two prediction instruction signal data sequences in all sequence combinations under different numbers of decision trees; obtaining a decision tree number increase factor under different numbers of decision trees based on the degree of increase in the number of decision trees and the error trend change factor; and obtaining an optimal number of decision trees based on the decision tree number increase factor;

[0011] According to the optimal number of decision trees, the frequency modulation command signal data is predicted using the random forest algorithm.

[0012] Furthermore, the frequency modulation command signal data and various characteristic data at several moments are used to obtain several sample data points, including:

[0013] The data of all dimensions at each moment are combined into a sample data point, thereby obtaining a plurality of sample data points; wherein all dimensions include all feature data and frequency modulation command signal data.

[0014] Furthermore, dividing the data point sequence into a front data point sequence and a back data point sequence includes:

[0015] The first data point in the sequence The data points in the data point sequence are combined into a sequence, which is recorded as the first data point sequence; the last data point sequence in the data point sequence is recorded as the first data point sequence. The data points form a sequence, which is recorded as the subsequent data point sequence;

[0016] in, Divide the preset into percentage factors.

[0017] Furthermore, the method includes selecting data points with replacement from a previous data point sequence to obtain a plurality of data sets, wherein each data set includes a plurality of data points; constructing a plurality of decision trees using the plurality of data sets; predicting command signal data using the plurality of decision trees to obtain a plurality of predicted command signal data sequences; and obtaining errors under different numbers of decision trees by calculating the differences between the plurality of predicted command signal data sequences and the subsequent command signal data sequence.

[0018] Step 1: Select from the previous data point sequence with replacement times, each time selecting the preset parameters data points, build a decision tree, and obtain Decision trees; predict the frequency modulation command signal data through each decision tree to obtain a predicted command signal data sequence; The decision trees predict separately and obtain A predicted instruction signal data sequence; then jump to step 2;

[0019] Step 2: The mean of the corresponding position data in the predicted instruction signal data sequence forms a new data sequence, which is recorded as Mean prediction signal data series; through MAPE, calculate the The error between the mean prediction signal data sequence and the subsequent instruction signal data sequence is recorded as Error; then jump to step 3;

[0020] Step 3: Add 1 and jump to step 1;

[0021] The above steps are used to obtain the errors under different numbers of decision trees; Represents the loop parameters during iterative traversal.

[0022] Furthermore, the error trend change factors under different numbers of decision trees are obtained by calculating the errors under different numbers of decision trees, including:

[0023] A reference coordinate system is constructed with the number of decision trees as the horizontal axis and the error corresponding to the number of decision trees as the vertical axis; the errors under different numbers of decision trees are mapped in the reference coordinate system to obtain several reference data points;

[0024]

[0025] Where, Indicates the number of decision trees is When and the number of decision trees is The slope between the two reference data points corresponding to Indicates the number of decision trees is When and the number of decision trees is The slope between the two reference data points corresponding to Indicates the absolute value symbol, Indicates the number of decision trees is The error trend change factor when .

[0026] Furthermore, obtaining the degree of increase in the number of decision trees under different numbers of decision trees according to the correlation coefficient between the two predicted instruction signal data sequences in all sequence combinations under different numbers of decision trees includes:

[0027]

[0028] Where, Indicates the number of decision trees is Time The correlation coefficient between the two predicted instruction signal data sequences in the sequence combination, Indicates the number of decision trees is The total number of all sequence combinations when , Indicates the number of decision trees is The degree of increase in the number of decision trees when Represents an exponential function with a natural constant as its base.

[0029] Furthermore, obtaining a decision tree number increase factor under different numbers of decision trees by the increase degree of the number of decision trees and the error trend change factor; obtaining an optimal number of decision trees by the decision tree number increase factor includes:

[0030] Among them, the factor of increasing the number of decision trees is specifically expressed by the formula:

[0031]

[0032] Where, Indicates the number of decision trees is The error trend change factor when Indicates the number of decision trees is The degree of increase in the number of decision trees when Indicates the number of decision trees is The factor that increases the number of decision trees when represents the linear normalization function;

[0033] Start traversing and iterating when the number of decision trees is 2, and interpret the factor of increase in the number of decision trees when the number of decision trees is 2. The factor that increases the number of decision trees when the number of decision trees is 3 The size relationship, when , then stop the iteration and take 2 as the optimal number of decision trees; when , then the number of decision trees increases by the factor when the number of decision trees is 3 The factor that increases the number of decision trees when the number of decision trees is 4 The size relationship;

[0034] when , then stop the iteration and take 3 as the optimal number of decision trees; when , then the number of decision trees increases by the factor when the number of decision trees is 4 The factor that increases the number of decision trees when the number of decision trees is 5 The size relationship;

[0035] And so on, until the optimal number of decision trees is obtained.

[0036] The second aspect of the present invention is to provide a molten salt heat storage system frequency modulation instruction prediction system based on machine learning, comprising:

[0037] Data acquisition module: used to continuously acquire frequency modulation command signal data at several moments and various characteristic data that affect the stability of the power system; obtain several sample data points through the frequency modulation command signal data and various characteristic data at several moments;

[0038] Error analysis module: used to sort a number of sample data points according to time to obtain a data point sequence; divide the data point sequence into a front data point sequence and a rear data point sequence; form the frequency modulation command signal data corresponding to all data points in the rear data point sequence into a group of sequences, recorded as the rear command signal data sequence; select data points with replacement from the front data point sequence to obtain a number of data sets; each data set contains a number of data points; construct a number of decision trees through the several data sets; predict the command signal data through the several decision trees to obtain a number of predicted command signal data sequences, and obtain the errors under different numbers of decision trees through the differences between the several predicted command signal data sequences and the rear command signal data sequences; obtain the error trend change factors under different numbers of decision trees through the errors under different numbers of decision trees;

[0039] An optimal number determination module is configured to perform pairwise matching of prediction instruction signal data sequences corresponding to all decision trees under different numbers of decision trees to obtain a plurality of sequence combinations; obtain the degree of increase in the number of decision trees under different numbers of decision trees based on the correlation coefficient between two prediction instruction signal data sequences in all sequence combinations under different numbers of decision trees; obtain a decision tree number increase factor under different numbers of decision trees based on the degree of increase in the number of decision trees and the error trend change factor; and obtain the optimal number of decision trees based on the decision tree number increase factor;

[0040] Prediction module: used to predict FM command signal data using the random forest algorithm based on the optimal number of decision trees.

[0041] The third aspect of the present invention is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the computer program, the method for predicting frequency modulation instructions of a molten salt heat storage system based on machine learning is implemented.

[0042] A fourth aspect of the present invention is to provide a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the machine learning-based molten salt heat storage system frequency modulation instruction prediction method.

[0043] Compared with the prior art, the present invention has the following beneficial effects: constructing several decision trees through several data sets; predicting command signal data through several decision trees to obtain several predicted command signal data sequences, obtaining errors under different numbers of decision trees through the differences between several predicted command signal data sequences and subsequent command signal data sequences; obtaining error trend change factors under different numbers of decision trees through the errors under different numbers of decision trees, and improving the accuracy of the analysis of the number of decision trees through the error trend change under different numbers of decision trees; performing pairwise matching on the predicted command signal data sequences corresponding to all decision trees under different numbers of decision trees to obtain several sequence combinations; obtaining the degree of increase in the number of decision trees under different numbers of decision trees based on the correlation coefficient between two predicted command signal data sequences in all sequence combinations under different numbers of decision trees; obtaining the decision tree number increase factor under different numbers of decision trees based on the increase degree of the decision tree number and the error trend change factor; obtaining the optimal number of decision trees through the decision tree number increase factor, thereby improving the accuracy of the randomness analysis of different decision trees; predicting the frequency modulation command signal data through the random forest algorithm based on the optimal number of decision trees, thereby improving the accuracy of the frequency modulation command prediction and reducing the amount of calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0045] Figure 1 The present invention provides a flowchart of the steps of a method for predicting frequency modulation instructions of a molten salt heat storage system based on machine learning;

[0046] Figure 2 The present invention provides a module flow diagram of a frequency modulation instruction prediction system for a molten salt heat storage system based on machine learning. DETAILED DESCRIPTION

[0047] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0048] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or devices.

[0049] In response to the problems existing in the background technology, a frequency modulation instruction prediction method and system for the molten salt heat storage system based on machine learning was studied and designed, which has important practical significance.

[0050] like Figure 1 As shown, the first aspect of the present invention is to provide a method for predicting frequency modulation instructions of a molten salt heat storage system based on machine learning, comprising the following steps:

[0051] Step S001: continuously collecting frequency modulation command signal data and various characteristic data affecting the stability of the power system at several moments.

[0052] It should be noted that when there is a deviation in the balance between power supply and demand (such as load changes, power generation fluctuations, etc.), the power system's dispatch center or automation system generates frequency regulation instructions based on the system's frequency fluctuations, load demand, and power generation conditions. These frequency regulation instructions maintain frequency stability, respond to emergencies, and reduce the possibility of failures.

[0053] It should be further explained that, since the power system is easily disturbed by the environment, weather and other conditions during normal power generation, the power system has poor stability when disturbed. When the power system is disturbed, in order to maintain the stability of the system, the molten salt heat storage system will perform frequency and peak regulation to maintain the stability of the power system through frequency and peak regulation. Therefore, the frequency in the command signal data corresponding to different environmental conditions is different. Therefore, the frequency in the command signal data can be determined through environmental and weather data. Therefore, it is necessary to collect all types of data related to the frequency in the command signal data.

[0054] Specifically, at a preset time interval To get the preset time before the current moment The frequency modulation command signal data and various characteristic data of the power system dispatching center at all times in the hour; among them, the various characteristic data include humidity, temperature, wind speed and load, etc.

[0055] By combining the data of all dimensions at each moment into a sample data point, a number of sample data points can be obtained; wherein all dimensions include all feature data and frequency modulation command signal data.

[0056] Among them, in this embodiment, the preset time length , wherein, in this embodiment, the preset time There is no specific limitation, and the implementer can determine it according to the specific situation. seconds, where the preset time interval There is no specific limitation and implementers can decide based on specific circumstances.

[0057] At this point, several sample data points are obtained.

[0058] Step S002: Obtain a data point sequence and divide it into a front data point sequence and a rear data point sequence; obtain a rear instruction signal data sequence; select data points with replacement from the front data point sequence to obtain several decision trees; predict instruction signal data through the several decision trees to obtain several predicted instruction signal data sequences, and obtain errors under different numbers of decision trees through the differences between the several predicted instruction signal data sequences and the rear instruction signal data sequences; obtain error trend change factors under different numbers of decision trees through the errors under different numbers of decision trees.

[0059] It should be noted that in order to determine the prediction accuracy of each decision tree constructed and the number of decision trees in the random forest, an error analysis method is used to determine the optimal number of decision trees.

[0060] It should be further explained that, since fewer decision trees have a poorer prediction effect on signal instructions when constructing a decision tree, the optimal number of decision trees is obtained by iterative analysis from fewer to more.

[0061] Specifically, several sample data points are sorted in chronological order to form a set of sequences, which are recorded as data point sequences. The sample data points form a sequence, which is recorded as the previous data point sequence; the latter data point sequence The sample data points of the AFTER data point sequence are combined into a sequence, which is recorded as the AFTER data point sequence; the FM command signal data corresponding to all the sample data points in the AFTER data point sequence are combined into a set of sequences, which is recorded as the AFTER command signal data sequence. Divide the preset into percentage factors.

[0062] In this embodiment, the division percentage factor is preset , wherein in this embodiment the preset division percentage factor There is no specific limitation and implementers can decide based on specific circumstances.

[0063] The steps to obtain the error under different numbers of decision trees are:

[0064] Step 1: Select from the previous data point sequence with replacement times, each time selecting the preset parameters data points, build a decision tree, and obtain Decision trees; predict the frequency modulation command signal data through each decision tree to obtain a predicted command signal data sequence; The decision trees predict separately and obtain A predicted instruction signal data sequence; then jump to step 2;

[0065] Step 2: The mean of the corresponding position data in the predicted instruction signal data sequence forms a new data sequence, which is recorded as Mean prediction signal data series; through MAPE, calculate the The error between the mean prediction signal data sequence and the subsequent instruction signal data sequence is recorded as Error; then jump to step 3;

[0066] Step 3: Add 1 and jump to step 1;

[0067] The above steps are used to obtain the errors under different numbers of decision trees; Represents the loop parameters during iterative traversal.

[0068] Among them, the detailed process of obtaining the error under different numbers of decision trees is:

[0069] Select preset parameters with replacement from previous data point series data points to form a first data set; a decision tree in a random forest is constructed using the first data set, which is recorded as the first decision tree; the frequency modulation command signal data is predicted using the first decision tree, and the predicted frequency modulation command signal data is organized into a set of sequences in chronological order, which is recorded as the first predicted command signal data sequence; the error between the first predicted command signal data sequence and the subsequent command signal data sequence is calculated using MAPE (Mean Absolute Percentage Error), which is recorded as the first error ;

[0070] The first error As the error corresponding to the number of decision trees is 1;

[0071] Continue selecting preset parameters with replacement from the previous data point sequence data points to form a second data set; a decision tree in a random forest is constructed through the second data set, which is recorded as the second decision tree; the frequency modulation command signal data is predicted through the second decision tree, and the predicted frequency modulation command signal data is organized into a set of sequences in chronological order, which is recorded as the second predicted command signal data sequence; the means of the corresponding position data in the first predicted command signal data sequence and the second predicted command signal data sequence are combined into a new set of data sequences, which is recorded as the second mean predicted signal data sequence; the error between the second mean predicted signal data sequence and the post-command signal data sequence is calculated through MAPE, which is recorded as the second error ;

[0072] The second error As the error corresponding to the number of decision trees is 2;

[0073] Continue selecting preset parameters with replacement from the previous data point sequence data points to form a third data set; a decision tree in a random forest is constructed through the third data set, which is recorded as the third decision tree; the frequency modulation command signal data is predicted through the third decision tree, and the predicted frequency modulation command signal data are organized into a set of sequences in chronological order, which is recorded as the third predicted command signal data sequence; the means of the corresponding position data in the first predicted command signal data sequence, the second predicted command signal data sequence and the third predicted command signal data sequence are combined into a new set of data sequences, which is recorded as the third mean predicted signal data sequence; the error between the third mean predicted signal data sequence and the post-command signal data sequence is calculated through MAPE, which is recorded as the third error ;

[0074] The third error As the error corresponding to the number of decision trees is 3;

[0075] And so on, the errors under different numbers of decision trees are obtained in turn.

[0076] Among them, in this embodiment, the preset parameters , in this embodiment, the preset parameters There is no specific limitation and the implementation can determine the maximum number of decision trees based on specific circumstances. MAPE is a well-known technique and will not be described in detail here. The number of data points used in each prediction by each decision tree is the same as the number of data points in the subsequent instruction signal data sequence. In this embodiment, the maximum number of decision trees used in the iterative loop traversal process is 500. However, there is no specific limitation on the maximum number of decision trees used in this embodiment and the implementation can determine the maximum number of decision trees based on specific circumstances.

[0077] It should be noted that in the process of determining the decision tree, a smaller number of decision trees results in poorer prediction results for the command signal. Therefore, in order to improve the prediction performance of the decision tree, it is necessary to increase the number of decision trees. In the process of increasing the number of decision trees, the prediction performance gradually improves. When it reaches a certain level, increasing the number of decision trees may not improve the prediction effect or the improvement rate is slow. Therefore, there is no need to increase the number of decision trees at this time. Increasing the number of decision trees at this time will only increase the amount of computer calculations and reduce the computer's computing efficiency. That is, as the number of decision trees increases, the corresponding prediction error first decreases rapidly, and then after passing an inflection point, the rate of decrease of the prediction error gradually decreases.

[0078] Specifically, a reference coordinate system is constructed with the number of decision trees as the horizontal axis and the error corresponding to the number of decision trees as the vertical axis; the errors under different numbers of decision trees are mapped in the reference coordinate system to obtain several reference data points; the slope difference between each data point and the two adjacent data points is calculated to obtain the error trend change factor under different numbers of decision trees; the error trend change factor is specifically expressed by the formula:

[0079]

[0080] Where, Indicates the number of decision trees is When and the number of decision trees is The slope between the two reference data points corresponding to Indicates the number of decision trees is When and the number of decision trees is The slope between the two reference data points corresponding to Indicates the absolute value symbol, Indicates the number of decision trees is The error trend change factor when .

[0081] Among them, when the trend difference change factor is larger, the number of decision trees needs to be increased; when the trend difference change factor is smaller, the number of decision trees does not need to be increased.

[0082] At this point, the error trend change factor under different numbers of decision trees is obtained through the above method.

[0083] Step S003: The correlation between the prediction instruction signal data sequences corresponding to all decision trees under different numbers of decision trees is used to obtain the degree of increase in the number of decision trees under different numbers of decision trees; the increase factor of the number of decision trees under different numbers of decision trees is obtained through the increase degree of the number of decision trees and the error trend change factor; and the optimal number of decision trees is obtained through the increase factor of the number of decision trees.

[0084] It should be noted that when the random forest algorithm is used for prediction, it is done by constructing multiple different decision trees. At this time, the greater the difference between all the decision trees, the more it can indicate the diversity in all the data. At this time, it shows that the diversity of the data is still relatively large. Therefore, continuing to increase the number of decision trees still has a significant improvement in the prediction performance.

[0085] It should be further explained that when the difference between the predicted data of multiple decision trees is smaller, it means that the difference between the decision trees is smaller, which means that the diversity of the data has reached saturation. At this time, if you continue to increase the randomly selected data set to build the decision tree, there may be similarities in the previously selected data set. Therefore, when the difference between the predicted data of multiple decision trees is smaller, the number of decision trees should not be increased or a small number of decision trees should be added.

[0086] Specifically, the predicted instruction signal data sequences corresponding to all decision trees under different numbers of decision trees are matched pairwise to obtain several sequence combinations;

[0087] According to the correlation coefficient between the two prediction instruction signal data sequences in all sequence combinations under different numbers of decision trees, the degree of increase in the number of decision trees under different numbers of decision trees is obtained; the degree of increase is specifically expressed by the formula:

[0088]

[0089] Where, Indicates the number of decision trees is Time The correlation coefficient between the two predicted instruction signal data sequences in the sequence combination, Indicates the number of decision trees is The total number of all sequence combinations when , Indicates the number of decision trees is The degree of increase in the number of decision trees when represents an exponential function with a natural constant as the base. The correlation coefficient in this embodiment is the Pearson correlation coefficient, which is a well-known technology and will not be described in detail here.

[0090] Among them, when the number of decision trees is When the Pearson correlation coefficient between the two prediction instruction signal data sequences in all sequence combinations is larger, it means that the diversity of the data has reached saturation. At this time, increasing the number of decision trees will slowly improve the performance of the prediction results. In this case, increasing the number of decision trees will only increase the amount of calculation and will not improve the performance. When the number of decision trees is The smaller the Pearson correlation coefficient between the two predicted instruction signal data sequences in all sequence combinations, the greater the difference in prediction results between the decision trees, which means that the diversity between the decision trees is higher. In this case, adding more decision trees may further improve the performance because the new decision trees can bring more information and diversity, and improve the performance of the model.

[0091] It should be noted that when the error trend change factor under different numbers of decision trees becomes larger and larger, the greater the increase in the number of decision trees under different numbers of decision trees, the more the number of decision trees should be increased.

[0092] Specifically, the decision tree number increase factor under different decision tree numbers is obtained by the increase degree of the decision tree number and the error trend change factor; the decision tree number increase factor is specifically expressed by the formula:

[0093]

[0094] Where, Indicates the number of decision trees is The error trend change factor when Indicates the number of decision trees is The degree of increase in the number of decision trees when Indicates the number of decision trees is The factor that increases the number of decision trees when represents the linear normalization function.

[0095] Start traversing and iterating when the number of decision trees is 2, and interpret the factor of increase in the number of decision trees when the number of decision trees is 2. The factor that increases the number of decision trees when the number of decision trees is 3 The size relationship, when , then stop the iteration and take 2 as the optimal number of decision trees; when , then the number of decision trees increases by the factor when the number of decision trees is 3 The factor that increases the number of decision trees when the number of decision trees is 4 The size relationship;

[0096] when , then stop the iteration and take 3 as the optimal number of decision trees; when , then the number of decision trees increases by the factor when the number of decision trees is 4 The factor that increases the number of decision trees when the number of decision trees is 5 The size relationship;

[0097] And so on, until the optimal number of decision trees is obtained;

[0098] So far, the optimal number of decision trees is obtained through the above method.

[0099] Step S004: predicting the frequency modulation instruction signal data using a random forest algorithm according to the optimal number of decision trees.

[0100] According to the optimal number of decision trees, the frequency modulation command signal data is predicted by the random forest algorithm to improve the prediction accuracy and reduce the amount of calculation in the prediction process.

[0101] like Figure 2 As shown, the second aspect of the present invention is to provide a molten salt heat storage system frequency modulation instruction prediction system based on machine learning, including the following modules:

[0102] Data acquisition module 101: used to continuously acquire frequency modulation command signal data and various characteristic data affecting the stability of the power system at a certain time; obtain a number of sample data points through the frequency modulation command signal data and various characteristic data at a certain time;

[0103] Error analysis module 102: used to sort a number of sample data points according to time to obtain a data point sequence; divide the data point sequence into a front data point sequence and a rear data point sequence; form a group of frequency modulation command signal data corresponding to all data points in the rear data point sequence into a sequence, recorded as a rear command signal data sequence; select data points with replacement from the front data point sequence to obtain a number of data sets; wherein each data set contains a number of data points; construct a number of decision trees using the number of data sets; predict the command signal data using the number of decision trees to obtain a number of predicted command signal data sequences; obtain errors under different numbers of decision trees based on the differences between the number of predicted command signal data sequences and the rear command signal data sequence; and obtain error trend change factors under different numbers of decision trees based on the errors under different numbers of decision trees;

[0104] Optimal number determination module 103: used to perform pairwise matching of prediction instruction signal data sequences corresponding to all decision trees under different numbers of decision trees to obtain a plurality of sequence combinations; obtain the degree of increase in the number of decision trees under different numbers of decision trees based on the correlation coefficient between two prediction instruction signal data sequences in all sequence combinations under different numbers of decision trees; obtain a decision tree number increase factor under different numbers of decision trees based on the degree of increase in the number of decision trees and the error trend change factor; and obtain the optimal number of decision trees based on the decision tree number increase factor;

[0105] Prediction module 104: used to predict the frequency modulation instruction signal data using a random forest algorithm according to the optimal number of decision trees.

[0106] The third aspect of the present invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, a method for predicting frequency modulation instructions of a molten salt heat storage system based on machine learning is implemented.

[0107] A fourth aspect of the present invention is to provide a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, a method for predicting frequency modulation instructions of a molten salt heat storage system based on machine learning is implemented.

[0108] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, optical storage, etc.) containing computer-usable program code.

[0109] The present invention is described with reference to flowcharts and / or block diagrams of methods, systems, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0110] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0111] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the present invention.

Claims

1. A method for predicting frequency modulation instructions of a molten salt heat storage system based on machine learning, characterized in that: include: Continuously obtain frequency modulation command signal data and various characteristic data that affect the stability of the power system at several moments; Obtain a number of sample data points through the frequency modulation command signal data and various characteristic data at a number of moments; Several sample data points are sorted in time to obtain a data point sequence; the data point sequence is divided into a front data point sequence and a rear data point sequence; the frequency modulation command signal data corresponding to all data points in the rear data point sequence are grouped into a sequence, recorded as a rear command signal data sequence; data points are selected with replacement from the front data point sequence to obtain several data sets; each data set contains several data points; several decision trees are constructed using the several data sets; the command signal data is predicted using the several decision trees to obtain several predicted command signal data sequences, and the errors under different numbers of decision trees are obtained by calculating the differences between the several predicted command signal data sequences and the rear command signal data sequences; the error trend change factors under different numbers of decision trees are obtained by calculating the errors under different numbers of decision trees; The prediction instruction signal data sequences corresponding to all decision trees under different numbers of decision trees are matched in pairs to obtain several sequence combinations; based on the correlation coefficient between two prediction instruction signal data sequences in all sequence combinations under different numbers of decision trees, the degree of increase in the number of decision trees under different numbers of decision trees is obtained, including: Where, Indicates the number of decision trees is Time The correlation coefficient between the two predicted instruction signal data sequences in the sequence combination, Indicates the number of decision trees is The total number of all sequence combinations when , Indicates the number of decision trees is The degree of increase in the number of decision trees when represents an exponential function with a natural constant as the base; wherein the correlation coefficient is the Pearson correlation coefficient; Obtaining a decision tree number increase factor under different numbers of decision trees by using the increase degree of the number of decision trees and the error trend change factor; and obtaining an optimal number of decision trees by using the decision tree number increase factor, including: Among them, the factor of increasing the number of decision trees is specifically expressed by the formula: Where, Indicates the number of decision trees is The error trend change factor when Indicates the number of decision trees is The degree of increase in the number of decision trees when Indicates the number of decision trees is The factor that increases the number of decision trees when represents the linear normalization function; Start traversing and iterating when the number of decision trees is 2, and interpret the factor of increase in the number of decision trees when the number of decision trees is 2. The factor that increases the number of decision trees when the number of decision trees is 3 The size relationship, when , then stop the iteration and take 2 as the optimal number of decision trees; when , then the number of decision trees increases by the factor when the number of decision trees is 3 The factor that increases the number of decision trees when the number of decision trees is 4 The size relationship; when , then stop the iteration and take 3 as the optimal number of decision trees; when , then the number of decision trees increases by the factor when the number of decision trees is 4 The factor that increases the number of decision trees when the number of decision trees is 5 The size relationship; And so on, until the optimal number of decision trees is obtained; According to the optimal number of decision trees, the frequency modulation command signal data is predicted using the random forest algorithm.

2. The method for predicting frequency modulation instructions of a molten salt heat storage system based on machine learning according to claim 1 is characterized in that: The method obtains a plurality of sample data points by using the frequency modulation command signal data and various characteristic data at a plurality of moments, including: The data of all dimensions at each moment are combined into a sample data point, thereby obtaining a plurality of sample data points; wherein, the data of all dimensions include all feature data and frequency modulation command signal data.

3. The method for predicting frequency modulation instructions of a molten salt heat storage system based on machine learning according to claim 1 is characterized in that: The dividing the data point sequence into a front data point sequence and a back data point sequence includes: The first data point in the sequence The data points in the data point sequence are combined into a sequence, which is recorded as the first data point sequence; the last data point sequence in the data point sequence is recorded as the first data point sequence. The data points form a sequence, which is recorded as the subsequent data point sequence; in, Divide the preset into percentage factors.

4. The method for predicting frequency modulation instructions of a molten salt heat storage system based on machine learning according to claim 1 is characterized in that: The method comprises selecting data points with replacement from a previous data point sequence to obtain a plurality of data sets, wherein each data set includes a plurality of data points; constructing a plurality of decision trees using the plurality of data sets; predicting command signal data using the plurality of decision trees to obtain a plurality of predicted command signal data sequences, and obtaining errors under different numbers of decision trees by calculating the differences between the plurality of predicted command signal data sequences and the subsequent command signal data sequence. Step 1: Select from the previous data point sequence with replacement times, each time select the preset parameters data points, build a decision tree, and obtain Decision trees; predict the frequency modulation command signal data through each decision tree to obtain a predicted command signal data sequence; The decision trees predict separately and obtain A predicted instruction signal data sequence; then jump to step 2; Step 2: The mean of the corresponding position data in the predicted instruction signal data sequence forms a new data sequence, which is recorded as Mean prediction signal data series; through MAPE, calculate the The error between the mean prediction signal data sequence and the subsequent instruction signal data sequence is recorded as Error; then jump to step 3; Step 3: Add 1 and jump to step 1; The above steps are used to obtain the errors under different numbers of decision trees; Represents the loop parameters during iterative traversal.

5. The method for predicting frequency modulation instructions of a molten salt thermal storage system based on machine learning according to claim 1, characterized in that: The error trend change factors under different numbers of decision trees are obtained by using the errors under different numbers of decision trees, including: A reference coordinate system is constructed with the number of decision trees as the horizontal axis and the error corresponding to the number of decision trees as the vertical axis. The errors under different numbers of decision trees are mapped in the reference coordinate system to obtain several reference data points. Where, Indicates the number of decision trees is When and the number of decision trees is The slope between the two reference data points corresponding to Indicates the number of decision trees is When and the number of decision trees is The slope between the two reference data points corresponding to Indicates the absolute value symbol, Indicates the number of decision trees is The error trend change factor when .

6. A frequency modulation instruction prediction system for a molten salt heat storage system based on machine learning, characterized in that: It includes a data acquisition module, an error analysis module, an optimal quantity determination module and a prediction module. When the data acquisition module, the error analysis module, the optimal quantity determination module and the prediction module are executed, the frequency modulation instruction prediction method of the molten salt heat storage system based on machine learning according to claim 1 is realized.

7. An electronic device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method for predicting frequency modulation instructions of a molten salt heat storage system based on machine learning as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method for predicting frequency modulation instructions of a molten salt heat storage system based on machine learning as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and device for establishing timing sequence prediction model

    CN106682414A

  • Improved WOA-GRU-based flood flow prediction method and system

    CN113468803A