Method and system for establishing power load prediction model based on regional characteristics and meteorology
By establishing a power load prediction model based on regional characteristics and meteorology, and optimizing model parameters using a random forest algorithm, the problem of insufficient prediction accuracy caused by failure to fully consider regional characteristics in the existing technology is solved, and more efficient and accurate power load prediction is achieved. .
Patent Information
- Application Number
- CN202411452614.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-02-14
Smart Images

Figure CN119442049A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electric power technology, and in particular to a method and system for establishing an electric power load forecasting model based on regional characteristics and meteorology. Background Art
[0002] Power load forecasting is the basis for guiding grid planning and arranging power generation plans. High-precision load forecasting is the basis for the rational design and efficient operation of regional power supply systems.
[0003] Short-term power load is easily affected by a variety of numerical and non-numerical factors such as meteorological conditions and holiday types. The change of load shows a certain degree of randomness and nonlinearity, which affects the accuracy of load forecasting. The accuracy of prediction needs to be further improved.
[0004] With the rise and widespread application of machine learning and artificial intelligence, many scholars at home and abroad have conducted research on machine learning load forecasting.
[0005] At present, the power load forecasting methods are mainly divided into two categories: traditional forecasting methods and intelligent forecasting methods. Traditional forecasting methods mainly include time series, regression models, trend extrapolation and other methods; intelligent forecasting methods mainly include neural networks, support vector machines and other methods. The traditional forecasting method model is relatively simple, the model parameters are fixed, and it is difficult to explain the sudden change of load. Intelligent forecasting methods represented by neural networks can realize complex linear and nonlinear mapping and are currently widely used.
[0006] At present, most load forecasting methods focus on establishing the causal relationship between structured meteorological factors and load, without considering the regional characteristics, such as the influence of other factors such as building characteristics and resident characteristics. However, the constructed model is unable to reflect the explanation of other data on power load variables by modeling only through structured meteorological data. Summary of the invention
[0007] The purpose of the present invention is to provide a method and system for establishing a power load forecasting model based on regional characteristics and meteorology to solve the above-mentioned technical problems.
[0008] The present invention provides a method for establishing a power load forecasting model based on regional characteristics and meteorology, comprising the steps of: S1, establishing an influencing index system based on regional characteristics and meteorological data, wherein the index parameters of the influencing index system include regional power consumption building parameters, outdoor meteorological parameters, time parameters, and power consumption parameters at time Tt; wherein T is the current time, and time Tt is the time of t time difference T before the current time;
[0009] S2, obtaining a historical sample data set based on the influencing indicator system, wherein each sample data of the historical sample data set includes a current power load value and current values of all the indicator parameters;
[0010] S3, constructing a machine learning model based on a random forest algorithm, and optimizing model parameters through the historical sample data set to obtain a power load prediction model;
[0011] S4, evaluating the power load forecasting model, including evaluating through the following evaluation system; if all the evaluation systems are qualified, proceeding to step S5; if not, returning to step S3;
[0012] S41, evaluating the accuracy of the prediction results. If the relative error between the predicted value and the true value does not exceed 10%, the prediction is considered accurate. If the proportion of samples with accurate predictions to the total number of samples is greater than a preset value, the power load model is considered qualified.
[0013] S42, model error evaluation, evaluating whether the power load model is qualified by whether the root mean square error RMSE is less than a preset value. The calculation formula of the root mean square error RMSE is: Among them, N is the number of prediction samples, Y i is the predicted value, R i is the true value;
[0014] S5, predicting the power load through the power load prediction model and the influencing index system.
[0015] Furthermore, the regional power-consuming building parameters in step S1 include the total number of regional power-consuming buildings, the types of regional power-consuming buildings, the proportion of different types of regional power-consuming buildings in the total number of regional power-consuming buildings, and at least two of the maximum load and / or average load of each power-consuming building in the region; the outdoor meteorological parameters include at least one of air temperature, relative humidity, and solar radiation; the time parameters include the current time and working days; and the power consumption parameters at time Tt, in which t includes at least one of 10 minutes, 30 minutes, 1 hour, 2 hours, and 24 hours.
[0016] Furthermore, the evaluation system in step S4 also includes:
[0017] S43, model fit evaluation, through the model fit R 2 Whether the numerical difference between 1 and 1 is less than a preset value is used to evaluate whether the power load model is qualified. The model fit R 2 The calculation formula is Among them, N is the number of prediction samples, Y i is the predicted value, Ri is the true value, is the average of the true values.
[0018] Furthermore, the step S3 includes:
[0019] S31, the machine learning model based on random forest algorithm Among them, f k (x) is a single decision tree classification model, K is the number of decision trees, Y is the target variable, and I is the indicative function;
[0020] S32, dividing the historical sample data set into multiple training sets and one validation set, and performing P-fold cross validation on the training sets to obtain the index of the classification gas after the P-fold cross validation;
[0021] S33, using the grid search method to optimize the original parameters of the model, using the maximum range and maximum step length query to obtain the position range of the global optimal value, and then gradually reducing the query step length to obtain the optimal value.
[0022] Furthermore, P is greater than or equal to 5.
[0023] Furthermore, in step S32, a stratified random sampling method is used to divide the historical sample data set into multiple training sets and one validation set.
[0024] Furthermore, the number K of the decision trees is greater than or equal to 10, and the maximum depth of the decision tree is greater than or equal to 5 and less than or equal to 100.
[0025] Furthermore, step S2 includes converting and encoding the current values of all the indicator parameters to make them conform to the input of the training model given to the machine learning algorithm; when there are missing or empty values in the current values of all the indicator parameters, corresponding default values are filled in.
[0026] Furthermore, the step S2 also includes a step of performing data balancing on the historical sample data set.
[0027] The present invention also provides a system for establishing an electric power load forecasting model based on regional characteristics and meteorology, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the system implements the steps of the method for establishing an electric power load forecasting model based on regional characteristics and meteorology as described in any one of the above items.
[0028] The present invention provides a method and system for establishing a power load forecasting model based on regional characteristics and meteorology, through the steps: S1, establishing an influence index system based on regional characteristics and meteorological data, the index parameters of the influence index system include regional power building parameters, outdoor meteorological parameters, time parameters, and power consumption parameters at time Tt; S2, obtaining a historical sample data set based on the influence index system, each sample data of the historical sample data set includes the current power load value and the current values of all the index parameters; S3, constructing a machine learning model based on a random forest algorithm, and optimizing the model parameters through the historical sample data set to obtain a power load forecasting model; S4, evaluating the power load forecasting model, and entering step S5 when the evaluation system is qualified; if not, returning to step S3; S5, forecasting the power load through the power load forecasting model and the influence index system. The multi-dimensional attribute variables of regional power building parameters, outdoor meteorological parameters, time parameters, and power consumption parameters at time Tt are used for prediction, and the prediction model is established through the random forest algorithm, thereby improving the prediction efficiency and prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 The figure is a flow chart of a method for establishing a power load forecasting model based on regional characteristics and meteorology in one embodiment of the present invention.
[0030] Figure 2 It is a schematic diagram of the hardware structure of a system running a method for establishing a power load prediction model based on regional characteristics and meteorology in one embodiment of the present invention.
[0031] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0032] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0033] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0034] The present invention will now be described in further detail with reference to the accompanying drawings.
[0035] Please combine Figure 1 and Figure 2 , Figure 1 FIG. 1 is a flowchart of a method for establishing a power load forecasting model based on regional characteristics and meteorology in one embodiment of the present invention. Figure 2Schematic diagram of the framework structure of the system for establishing a power load forecasting model based on regional characteristics and meteorology.
[0036] In this embodiment, the method for establishing a power load forecasting model based on regional characteristics and weather comprises the following steps:
[0037] S1, establish an influencing index system based on regional characteristics and meteorological data, the index parameters of the influencing index system include regional electricity consumption building parameters, outdoor meteorological parameters, time parameters, and electricity consumption parameters at time Tt; where T is the current time, and time Tt is the time with a time difference of t before the current time.
[0038] Furthermore, the regional power-consuming building parameters in step S1 include the total number of regional power-consuming buildings, the types of regional power-consuming buildings, the proportion of different types of regional power-consuming buildings in the total number of regional power-consuming buildings, and at least two of the maximum load and / or average load of each power-consuming building in the region. Regional power-consuming buildings include residences, shopping malls, offices, hotels, factories, etc., and the load characteristics of different buildings are obviously different.
[0039] The outdoor meteorological parameters include at least one of air temperature, relative humidity, and solar radiation. Air temperature affects the activation of electrical equipment such as refrigeration and heating, and has a greater impact on power load; humidity corresponds to the impact of dehumidification equipment; solar radiation can correspond to lighting electricity. Of course, the lighting of different types of buildings such as shopping malls and residential buildings is affected differently by solar radiation.
[0040] The time parameters include the current time and working day. Similarly, working day or day and night have a significant impact on the power consumption of different buildings.
[0041] The power consumption parameter at time Tt includes at least one of 10 minutes, 30 minutes, 1 hour, 2 hours, and 24 hours. The power load is often not increased suddenly, so the power load in the previous time period can also be included in the indicator system for power load prediction.
[0042] S2, obtaining a historical sample data set based on the influencing indicator system, wherein each sample data of the historical sample data set includes a current power load value and current values of all the indicator parameters.
[0043] Furthermore, step S2 includes converting and encoding the current values of all the indicator parameters to make them conform to the input of the training model given to the machine learning algorithm; when there are missing or empty values in the current values of all the indicator parameters, corresponding default values are filled in.
[0044] Furthermore, step S2 also includes a step of performing data balancing on the historical sample data set. Specifically, the sample data of the training set can be balanced by the smote algorithm, which is achieved by balancing the Euclidean distances of each feature vector in the data sample. Those skilled in the art can directly implement this and will not be described in detail here.
[0045] S3, constructing a machine learning model based on the random forest algorithm, and optimizing the model parameters through the historical sample data set to obtain a power load prediction model.
[0046] Furthermore, the step S3 includes:
[0047] S31, the machine learning model based on random forest algorithm F(x)=argmax∑ K k=1 I(f k (x)=Y); where f k (x) is a single decision tree classification model, K is the number of decision trees, Y is the target variable, and I is the indicative function;
[0048] S32, dividing the historical sample data set into multiple training sets and one validation set, and performing P-fold cross validation on the training sets to obtain the index of the classification gas after the P-fold cross validation;
[0049] S33, using the grid search method to optimize the original parameters of the model, using the maximum range and maximum step length query to obtain the position range of the global optimal value, and then gradually reducing the query step length to obtain the optimal value.
[0050] Furthermore, P is greater than or equal to 5.
[0051] Furthermore, in step S32, a stratified random sampling method is used to divide the historical sample data set into multiple training sets and one validation set.
[0052] Furthermore, the number K of the decision trees is greater than or equal to 10, and the maximum depth of the decision tree is greater than or equal to 5 and less than or equal to 100.
[0053] S4, evaluating the power load prediction model, including evaluating through the following evaluation system; when all the evaluation systems are qualified, proceeding to step S5; if not, returning to step S3.
[0054] In a specific embodiment, the evaluation system includes:
[0055] S41, evaluating the accuracy of the prediction results. If the relative error between the predicted value and the true value does not exceed 10%, the prediction is considered accurate. If the proportion of samples with accurate predictions to the total number of samples is greater than a preset value, the power load model is considered qualified.
[0056] S42, model error evaluation, evaluating whether the power load model is qualified by whether the root mean square error RMSE is less than a preset value. The calculation formula of the root mean square error RMSE is: Among them, N is the number of prediction samples, Y i is the predicted value, R i is the true value;
[0057] Furthermore, the evaluation system in step S4 also includes:
[0058] S43, model fit evaluation, through the model fit R 2 Whether the numerical difference between 1 and 1 is less than a preset value is used to evaluate whether the power load model is qualified. The model fit R 2 The calculation formula is Among them, N is the number of prediction samples, Y i is the predicted value, R i is the true value, is the average of the true values.
[0059] S5, predicting the power load through the power load prediction model and the influencing index system.
[0060] The present invention also provides a system for establishing an electric power load forecasting model based on regional characteristics and meteorology. The system for establishing an electric power load forecasting model based on regional characteristics and meteorology is established and operated on the basis of a computer system, and specifically includes a memory 61, a processor 62, and a computer program 63 stored in the memory 61 and executable on the processor 62. When the processor 62 executes the computer program 63, the steps of the method for establishing an electric power load forecasting model based on regional characteristics and meteorology as described in any one of the above items are implemented.
[0061] This embodiment also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for establishing a power load forecasting model based on regional characteristics and meteorology as described in any of the above items.
[0062] The present invention provides a method and system for establishing a power load forecasting model based on regional characteristics and meteorology, through the steps: S1, establishing an influence index system based on regional characteristics and meteorological data, the index parameters of the influence index system include regional power building parameters, outdoor meteorological parameters, time parameters, and power consumption parameters at time Tt; S2, obtaining a historical sample data set based on the influence index system, each sample data of the historical sample data set includes the current power load value and the current values of all the index parameters; S3, constructing a machine learning model based on a random forest algorithm, and optimizing the model parameters through the historical sample data set to obtain a power load forecasting model; S4, evaluating the power load forecasting model, and entering step S5 when the evaluation system is qualified; if not, returning to step S3; S5, forecasting the power load through the power load forecasting model and the influence index system. The multi-dimensional attribute variables of regional power building parameters, outdoor meteorological parameters, time parameters, and power consumption parameters at time Tt are used for prediction, and the prediction model is established through the random forest algorithm, thereby improving the prediction efficiency and prediction accuracy.
[0063] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0064] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0065] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0066] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0067] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0068] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0069] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0070] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is therefore intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.
[0071] In the description of this specification, the description with reference to the terms "an embodiment", "another embodiment", "other embodiments", or "first embodiment to Xth embodiment" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, method steps or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0072] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0073] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for establishing a power load forecasting model based on regional characteristics and meteorology, characterized in that: Includes steps: S1, establish an influencing index system based on regional characteristics and meteorological data, wherein the index parameters of the influencing index system include regional power consumption building parameters, outdoor meteorological parameters, time parameters, and power consumption parameters at time Tt; wherein T is the current time, and time Tt is the time t time difference from the current time T before; S2, obtaining a historical sample data set based on the influencing indicator system, wherein each sample data of the historical sample data set includes a current power load value and current values of all the indicator parameters; S3, constructing a machine learning model based on a random forest algorithm, and optimizing model parameters through the historical sample data set to obtain a power load prediction model; S4, evaluating the power load forecasting model, including evaluating through the following evaluation system; if all the evaluation systems are qualified, proceeding to step S5; if not, returning to step S3; S41, evaluating the accuracy of the prediction results. If the relative error between the predicted value and the true value does not exceed 10%, the prediction is considered accurate. If the proportion of samples with accurate predictions to the total number of samples is greater than a preset value, the power load model is considered qualified. S42, model error evaluation, evaluating whether the power load model is qualified by whether the root mean square error RMSE is less than a preset value. The calculation formula of the root mean square error RMSE is: Among them, N is the number of prediction samples, Y i is the predicted value, R i is the true value; S5, predicting the power load through the power load prediction model and the influencing index system.
2. The method for establishing a power load forecasting model based on regional characteristics and meteorology according to claim 1, characterized in that: The regional power-consuming building parameters in step S1 include the total number of regional power-consuming buildings, the types of regional power-consuming buildings, the proportion of different types of regional power-consuming buildings in the total number of regional power-consuming buildings, and at least two of the maximum load and / or average load of each power-consuming building in the region; the outdoor meteorological parameters include at least one of air temperature, relative humidity, and solar radiation; the time parameters include the current time and working days; the power consumption parameters at time Tt include at least one of 10 minutes, 30 minutes, 1 hour, 2 hours, and 24 hours.
3. The method for establishing a power load forecasting model based on regional characteristics and meteorology according to claim 1, characterized in that: The evaluation system in step S4 also includes: S43, model fit evaluation, through the model fit R 2 Whether the numerical difference between 1 and 1 is less than a preset value is used to evaluate whether the power load model is qualified. The model fit R 2 The calculation formula is Among them, N is the number of prediction samples, Y i is the predicted value, R i is the true value, is the average of the true values.
4. The method for establishing a power load forecasting model based on regional characteristics and meteorology according to claim 1, characterized in that: The step S3 comprises: S31, the machine learning model based on random forest algorithm Among them, f k (x) is a single decision tree classification model, K is the number of decision trees, Y is the target variable, and I is the indicative function; S32, dividing the historical sample data set into multiple training sets and one validation set, and performing P-fold cross validation on the training sets to obtain the index of the classification gas after the P-fold cross validation; S33, using the grid search method to optimize the original parameters of the model, using the maximum range and maximum step length query to obtain the position range of the global optimal value, and then gradually reducing the query step length to obtain the optimal value.
5. The method for establishing a power load forecasting model based on regional characteristics and meteorology according to claim 4, characterized in that: The P is greater than or equal to 5.
6. The method for establishing a power load forecasting model based on regional characteristics and weather according to claim 4, characterized in that: In step S32, the historical sample data set is divided into multiple training sets and one validation set by using a stratified random sampling method.
7. The method for establishing a power load forecasting model based on regional characteristics and weather according to claim 4, characterized in that: The number K of the decision trees is greater than or equal to 10, and the maximum depth of the decision tree is greater than or equal to 5 and less than or equal to 100.
8. The method for establishing a power load forecasting model based on regional characteristics and meteorology according to any one of claims 1 to 7, characterized in that: The step S2 includes converting and encoding the current values of all the indicator parameters to make them conform to the input of the training model given to the machine learning algorithm; when there are missing or empty values in the current values of all the indicator parameters, corresponding default values are filled in.
9. The method for establishing a power load forecasting model based on regional characteristics and weather according to claim 8, characterized in that: The step S2 also includes a step of performing data balancing on the historical sample data set.
10. A system for establishing a power load forecasting model based on regional characteristics and meteorology, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for establishing a power load forecasting model based on regional characteristics and meteorology are implemented as described in any one of claims 1 to 9.
Citation Information
Cited By
Power load prediction method and system based on meteorological prediction model
CN119849989A
Power Load Forecasting Method and System Based on Meteorological Prediction Model
CN119849989B