CN108196317A - A kind of Predictive meteorological methods for micro-grid system - Google Patents
A kind of Predictive meteorological methods for micro-grid system Download PDFInfo
- Publication number
- CN108196317A CN108196317A CN201810116434.6A CN201810116434A CN108196317A CN 108196317 A CN108196317 A CN 108196317A CN 201810116434 A CN201810116434 A CN 201810116434A CN 108196317 A CN108196317 A CN 108196317A
- Authority
- CN
- China
- Prior art keywords
- weather
- weather information
- information
- meteorological
- local
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000012417 linear regression Methods 0.000 claims abstract description 22
- 238000009499 grossing Methods 0.000 claims abstract description 15
- 238000012549 training Methods 0.000 claims description 9
- 238000005457 optimization Methods 0.000 claims description 7
- 230000017105 transposition Effects 0.000 claims description 3
- 241000270322 Lepidosauria Species 0.000 claims 1
- 238000010248 power generation Methods 0.000 description 17
- 230000000875 corresponding effect Effects 0.000 description 10
- 230000006870 function Effects 0.000 description 6
- 230000004927 fusion Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000013277 forecasting method Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01W—METEOROLOGY
- G01W1/00—Meteorology
- G01W1/10—Devices for predicting weather conditions
Landscapes
- Environmental & Geological Engineering (AREA)
- Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Atmospheric Sciences (AREA)
- Biodiversity & Conservation Biology (AREA)
- Ecology (AREA)
- Environmental Sciences (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明公开了一种用于微电网系统的气象预测方法,具体如下:步骤一、定时采集t时刻的本地气象信息Rt并存储下来;步骤二、从国家气象局获取地址与步骤一中的地址相同、时间点与步骤一中时间点相同的以下数据:获取气象局历史真实的气象信息并存储起来;获取与气象局历史真实的气象信息相对应的气象局历史预测气象信息,该气象局历史预测气象信息称为F1t;获取气象局未来天气预报信息,气象局未来天气预报信息用F1't表示;步骤三、采用平滑指数方法预测下一时刻气象信息:步骤四、利用线性回归方法,将F1t、F2t当作输入,Rt当作目标列,拟合出一个优化气象信息回归模型,并根据该模型预测出未来一段时间的气象信息;本发明得到更加准确的气象预测数据。
The invention discloses a weather prediction method for a microgrid system, specifically as follows: step 1, regularly collect and store local weather information R t at time t; step 2, obtain the address from the National Meteorological Administration and the The following data with the same address and the same time point as in step 1: obtain and store the historical real weather information of the Meteorological Bureau; obtain the historical forecast weather information of the Meteorological Bureau corresponding to the historical real weather information of the Meteorological Bureau. The historical forecast weather information is called F1 t ; the future weather forecast information of the Meteorological Bureau is obtained, and the future weather forecast information of the Meteorological Bureau is represented by F1't; Step 3, using the smoothing index method to predict the weather information at the next moment: Step 4, using the linear regression method , taking F1 t and F2 t as input, and R t as the target column, fits an optimized meteorological information regression model, and predicts the meteorological information for a period of time in the future according to the model; the present invention obtains more accurate meteorological forecast data .
Description
技术领域technical field
本发明涉及微电网技术领域,特别是一种用于微电网系统的气象预测方法。The invention relates to the field of micro-grid technology, in particular to a weather prediction method for a micro-grid system.
背景技术Background technique
随着电网规模的不断扩大,超大规模电力系统的弊端也日益凸现,成本高,运 行难度大,难以适应用户越来越高的安全和可靠性要求以及多样化的供电需求。尤 其在近年来世界范围内接连发生几次大面积停电事故之后,电网的脆弱性充分暴露 了出来,因此分布式发电被提上了日程。可再生能源发电已经成为电力系统发展的 重要推动力,是智能电网的重要组成部分,并将在未来电力系统中扮演越来越重要 的角色。于是世界各国纷纷开始关注环保、高效和灵活的发电方式——分布式发电。 为了消除分布式发电的各种问题,为协调大电网与分布式电源间的矛盾,充分挖掘 分布式电源为电网和用户带来的价值和效益,提出了微电网。With the continuous expansion of the scale of the power grid, the disadvantages of the ultra-large-scale power system are becoming more and more prominent, such as high cost, difficult operation, and difficulty in adapting to the increasing safety and reliability requirements of users and the diversified power supply needs. Especially after several large-scale blackouts occurred in the world in recent years, the vulnerability of the power grid was fully exposed, so distributed generation has been put on the agenda. Renewable energy power generation has become an important driving force for the development of the power system, is an important part of the smart grid, and will play an increasingly important role in the future power system. As a result, countries around the world have begun to pay attention to an environmentally friendly, efficient and flexible power generation method - distributed power generation. In order to eliminate various problems of distributed power generation, to coordinate the contradiction between large power grid and distributed power generation, and to fully tap the value and benefits brought by distributed power generation to power grid and users, a microgrid is proposed.
微电网是一个相对独立的自发自用的一个电网系统,由于微电网的供电侧和用电侧的容量相对于大电网来说比较小,自身的可调控能力有限,有时候会出现电量 过剩或者电量短缺的情况,这样就需要我们提前预测出发电量和用电量,发电量和 用电量预测越准确对微电网的决策越有利。微电网中,发电的能量来源主要是新能 源(如光伏发电,风机发电等),而新能源发电量与天气因素息息相关,在一定程 度上来说,天气信息的准确程度决定了发电量预测的上限,同样用户用电量也与天 气因素相关性很大。微电网的规模相对都比较小,占地面积不是很大,所以需要相 对精确地理位置的天气信息。然而,国家气象局能够提供的实时天气信息和预测天 气信息空间精确度都不是太高,因此,需要一些方法解决这一问题。目前新能源发 电量存在预测精度不高和无网络条件下天气预测的问题。The microgrid is a relatively independent self-contained power grid system. Since the capacity of the power supply side and the power consumption side of the microgrid is relatively small compared with the large power grid, its own controllability is limited, and sometimes there will be excess power or power consumption. In the case of shortage, we need to predict the power generation and power consumption in advance. The more accurate the forecast of power generation and power consumption, the more beneficial it is for the decision-making of the microgrid. In the microgrid, the energy source of power generation is mainly new energy (such as photovoltaic power generation, wind power generation, etc.), and the power generation of new energy is closely related to weather factors. To a certain extent, the accuracy of weather information determines the upper limit of power generation forecast , the same user power consumption is also highly correlated with weather factors. The scale of the microgrid is relatively small, and the area is not very large, so weather information with relatively precise geographical location is required. However, the spatial accuracy of real-time weather information and forecast weather information provided by the National Weather Service is not very high, so some methods are needed to solve this problem. At present, there are problems such as low prediction accuracy of new energy power generation and weather prediction without network conditions.
发明内容Contents of the invention
本发明所要解决的技术问题是克服现有技术的不足而提供一种用于微电网系 统的气象预测方法,本发明通过线上与本地的气象数据融合得到更加准确、位置精 确度更高的气象预测数据。The technical problem to be solved by the present invention is to overcome the deficiencies of the prior art and provide a weather prediction method for the microgrid system. The present invention obtains more accurate weather forecasts with higher location accuracy through the fusion of online and local weather data. forecast data.
本发明为解决上述技术问题采用以下技术方案:The present invention adopts the following technical solutions for solving the problems of the technologies described above:
根据本发明提出的一种用于微电网系统的气象预测方法,包括以下步骤:A kind of meteorological prediction method for microgrid system proposed according to the present invention comprises the following steps:
步骤一、定时采集t时刻的本地气象信息Rt并存储下来;Step 1, regularly collect the local meteorological information R t at time t and store it;
步骤二、从国家气象局获取地址与步骤一中的地址相同、时间点与步骤一中时 间点相同的以下数据:Step 2. Obtain the following data from the National Meteorological Administration with the same address as in step 1 and the same time point as in step 1:
获取气象局历史真实的气象信息并存储起来;Obtain and store historical real weather information from the Meteorological Bureau;
获取与气象局历史真实的气象信息相对应的气象局历史预测气象信息,该气象局历史预测气象信息称为F1t;Obtain the historical forecast weather information of the Meteorological Bureau corresponding to the historical real weather information of the Meteorological Bureau, and the historical forecast weather information of the Meteorological Bureau is called F1 t ;
获取气象局未来天气预报信息,气象局未来天气预报信息用F1't表示;Obtain the future weather forecast information of the Meteorological Bureau, and the future weather forecast information of the Meteorological Bureau is represented by F1't;
步骤三、采用平滑指数方法预测下一时刻气象信息:Step 3. Using the smoothing index method to predict the weather information at the next moment:
平滑指数方法的具体过程如下:The specific process of the smoothing index method is as follows:
(1)已知t时刻的本地气象信息Rt以及t-1时刻的气象局未来天气预报信息(1) The local weather information R t at time t and the future weather forecast information of the Meteorological Bureau at time t-1 are known
F1′t-1;F1't -1 ;
(2)训练平滑系数要求平滑系数的大小是根据F1't-1和Rt,由 公式(1)训练得到 (2) Training smoothing coefficient Require The size of the smoothing coefficient is based on F1' t-1 and R t , trained by formula (1)
其中,Rt+1表示t+1时刻的本地气象信息;Among them, R t+1 represents the local weather information at time t+1;
(3)由步骤(2)训练出一个确定值;(3) A certain one is trained by step (2) value;
(4)由公式(1)和得出,由平滑指数方法得到的t时刻预测气象值为F2t,(4) by formula (1) and It is concluded that the predicted meteorological value at time t obtained by the smoothing index method is F2 t ,
步骤四、利用线性回归方法,将F1t、F2t当作输入,Rt当作目标列,拟合出 一个优化气象信息回归模型,并根据该模型预测出未来一段时间的气象信息。Step 4: Using the linear regression method, taking F1 t and F2 t as input and R t as the target column, fit an optimized meteorological information regression model, and predict the meteorological information for a period of time in the future according to the model.
作为本发明所述的一种用于微电网系统的气象预测方法进一步优化方案,步骤四具体如下:As a further optimization scheme for a weather prediction method for a microgrid system according to the present invention, step 4 is specifically as follows:
利用线性回归方法,将F1t、F2t当作输入,Rt当作目标列,拟合出一个优化 气象信息回归模型;Using the linear regression method, taking F1 t and F2 t as input and R t as the target column, an optimized meteorological information regression model is fitted;
其中,Rt={rt1,rt2,...,rti,...,rtn},rti表示t时刻的本地气象信息Rt第i种气象类型,n 表示气象类型的种类,Rt一共有n种气象类型,F1t={f1t1,f1t2,...,f1ti,...,f1tn},f1ti表 示F1t的第i种气象类型,F1t一共有n种气象类型,本地预测气象信息 F2t={f2t1,f2t2,...,f2ti,...,f2tn},f2ti表示F2t的第i种气象类型,F2t一共有n种气 象类型;Among them, R t ={r t1 ,r t2 ,...,r ti ,...,r tn }, r ti represents the local weather information R t of the i-th weather type at time t, and n represents the type of weather type , R t has a total of n meteorological types, F1 t = {f1 t1 ,f1 t2 ,...,f1 ti ,...,f1 tn }, f1 ti represents the i-th meteorological type of F1 t , and F1 t has a total of There are n kinds of weather types, and the local forecast weather information F2 t = {f2 t1 , f2 t2 ,..., f2 ti ,..., f2 tn }, f2 ti represents the i-th weather type of F2 t , and F2 t has a total of There are n weather types;
根据t取不同时刻时Rt,F1t,F2t训练气象信息回归模型如下:R t , F1 t , and F2 t are used to train the meteorological information regression model at different times according to t as follows:
其中,上标T表示矩阵转置,cT=[c1,c2,...,ci,...,cn]T是线性回归模型的参数,ci表 示第i个参数,c一共有n个参数;θT=[θ1,θ2,...,θi,...,θn]T是线性回归模型的参数,θi表示第i个参数,θ一共有n个参数;γT=[γ1,γ2,...,γi,...,γn]T是线性回归模型的参数, γi表示第i个参数,γ一共有n个参数;Among them, the superscript T represents matrix transposition, c T =[c 1 ,c 2 ,..., ci ,...,c n ] T is the parameter of the linear regression model, c i represents the i-th parameter, c has n parameters in total; θ T =[θ 1 ,θ 2 ,...,θ i ,...,θ n ] T is the parameter of the linear regression model, θ i represents the i-th parameter, and θ has a total of n parameters; γ T =[γ 1 ,γ 2 ,...,γ i ,...,γ n ] T is the parameter of the linear regression model, γ i represents the i-th parameter, and γ has n parameters in total ;
根据训练出的气象信息回归模型得到相对于Rt下一刻的气象信息预测值Rt'+1由公式(4)得到According to the trained meteorological information regression model, the predicted value R t ' + 1 of the meteorological information at the next moment relative to R t can be obtained by formula (4)
作为本发明所述的一种用于微电网系统的气象预测方法进一步优化方案,步骤四后还包括以下步骤:As a further optimization scheme for a meteorological prediction method for a microgrid system according to the present invention, after step 4, the following steps are also included:
根据实时采集的Rt以及对应t时刻的天气类型来训练K-近邻模型,将预测的气 象信息经训练好的K-近邻模型计算得出实时天气类型,用于实现离线状态的天气信 息的显示。Train the K-nearest neighbor model according to the real-time collected R t and the weather type corresponding to time t, and calculate the real-time weather type by calculating the predicted weather information through the trained K-nearest neighbor model, which is used to display the weather information in the offline state .
作为本发明所述的一种用于微电网系统的气象预测方法进一步优化方案,步骤一中,采用本地气象信息采集器定时采集t时刻的本地气象信息Rt并存储下来。As a further optimization scheme of the meteorological prediction method for the microgrid system described in the present invention, in step 1, the local weather information R t at time t is regularly collected by the local weather information collector and stored.
作为本发明所述的一种用于微电网系统的气象预测方法进一步优化方案,步骤二是运用Python有关的爬虫库来完成的。As a further optimization scheme of the meteorological forecasting method for the microgrid system described in the present invention, the second step is completed by using a python-related crawler library.
本发明采用以上技术方案与现有技术相比,具有以下技术效果:Compared with the prior art, the present invention adopts the above technical scheme and has the following technical effects:
本发明通过线上与本地的气象数据融合得到更加准确、位置精确度更高的气象预测数据,同时利用K-近邻算法实现离线状态下天气类型的显示。The present invention obtains more accurate weather prediction data with higher location accuracy through the fusion of online and local weather data, and at the same time uses the K-nearest neighbor algorithm to realize the display of weather types in an offline state.
附图说明Description of drawings
图1是本发明的流程图。Fig. 1 is a flow chart of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图及具体实施 例对本发明进行详细描述。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments.
基于目前实际研究中的问题,本发明提出了一种用于微电网系统的气象预测方法,它包含本地气象信息采集器、气象信息爬虫器、本地气象信息预测器、优化气 象信息模型输出器和实时天气类型显示器,其中本地气象信息采集器就是运用本地 安装的传感器采集相关的气象信息(比如温度、湿度等);气象信息爬虫器主要包 括两部分,第一部分是爬取气象网站历史真实天气信息,第二部分是爬取气象站历 史预测天气信息;本地气象信息预测器就是根据本地采集器采集的气象信息预测将 来一段时间内的气象信息;优化气象信息模型输出器根据气象信息爬虫器爬取的气 象站历史的预测天气信息和气象信息预测器预测的气象信息,再与本地气象信息采 集器采集的信息做比较,训练出一个优化气象信息模型;实时天气类型显示器根据 优化气象信息模型输出的气象信息值,预测实时的天气类型(晴天,阴天等)。Based on the problems in the current practical research, the present invention proposes a weather prediction method for microgrid systems, which includes a local weather information collector, a weather information crawler, a local weather information predictor, an optimized weather information model output device and Real-time weather type display, in which the local weather information collector uses locally installed sensors to collect relevant weather information (such as temperature, humidity, etc.); the weather information crawler mainly includes two parts, the first part is to crawl the historical real weather information of the weather website , the second part is to crawl the historical forecast weather information of the weather station; the local weather information predictor is to predict the weather information in the future based on the weather information collected by the local collector; the optimized weather information model output device crawls according to the weather information crawler The historical forecast weather information of the weather station and the weather information predicted by the weather information predictor are compared with the information collected by the local weather information collector to train an optimized weather information model; the real-time weather type display is output according to the optimized weather information model Meteorological information value, forecast real-time weather type (sunny, cloudy, etc.).
本发明提供了一种本地气象信息采集器、气象信息爬虫器、本地气象信息预测器、优化气象信息模型输出器和实时天气类型显示器的一种用于微电网系统的气象 预测方法,解决了在微电网中预测发电量和用电量时,采用的预测气象信息不准确 的问题。The present invention provides a weather prediction method for a microgrid system, including a local weather information collector, a weather information crawler, a local weather information predictor, an optimized weather information model output device, and a real-time weather type display, which solves the problem of When forecasting power generation and power consumption in the microgrid, the forecast weather information used is inaccurate.
本发明设计了一种用于微电网系统的气象预测方法,本地气象信息采集器就是运用本地安装的传感器采集相关的气象信息(比如温度、湿度等);气象信息爬虫 器主要包括两部分,第一部分是爬取气象网站历史真实天气信息,第二部分是爬取 气象站预测天气信息;本地气象信息预测器就是根据本地采集器采集的气象信息利 用平滑指数算法预测将来一段时间内的气象信息;优化气象信息模型输出器的训练 数据是气象信息爬虫器爬取的气象站历史的预测天气信息和本地气象信息预测器 预测的气象信息,训练目标是本地气象信息采集器采集的真实气象信息,利用线性 回归算法训练出一个优化气象信息模型,并根据该模型预测出未来一段时间的气象 信息;把预测的气象信息作为实时天气类型显示器的输入,再利用K-近邻算法给出 实时天气类型。The present invention designs a weather prediction method for the microgrid system. The local weather information collector uses locally installed sensors to collect relevant weather information (such as temperature, humidity, etc.); the weather information crawler mainly includes two parts, the first One part is to crawl the historical real weather information of the weather website, and the second part is to crawl the forecast weather information of the weather station; the local weather information predictor uses the smoothing index algorithm to predict the weather information for a period of time in the future based on the weather information collected by the local collector; The training data of the optimized weather information model exporter is the predicted weather information of the weather station history crawled by the weather information crawler and the weather information predicted by the local weather information predictor. The training target is the real weather information collected by the local weather information collector. The linear regression algorithm trains an optimized weather information model, and predicts the weather information for a period of time in the future according to the model; the predicted weather information is used as the input of the real-time weather type display, and then the K-nearest neighbor algorithm is used to give the real-time weather type.
一、体系结构1. Architecture
图1给出了本发明的模块图,主要由五部分组成:本地气象信息采集器、气象 信息爬虫器、本地气象信息预测器、优化气象信息模型输出器以及实时天气类型显 示器,其中本地气象信息采集器就是运用本地安装的传感器采集相关的气象信息 (比如温度、湿度等);气象信息爬虫器主要包括两部分,第一部分是爬取气象网 站历史真实天气信息,第二部分是爬取气象站历史预测天气信息;本地气象信息预 测器就是根据本地采集器采集的气象信息预测将来一段时间内的气象信息;优化气 象信息模型输出器根据气象信息爬虫器爬取的气象站历史的预测天气信息和气象 信息预测器预测的气象信息,再与本地气象信息采集器采集的信息做比较,训练出 一个优化气象信息模型;实时天气类型显示器根据优化气象信息模型输出的气象信 息值,预测实时的天气类型(晴天,阴天等)。Fig. 1 has provided the block diagram of the present invention, mainly is made up of five parts: local weather information collector, weather information crawler, local weather information predictor, optimization weather information model exporter and real-time weather type display, wherein local weather information The collector is to use locally installed sensors to collect relevant weather information (such as temperature, humidity, etc.); the weather information crawler mainly includes two parts, the first part is to crawl the historical real weather information of the weather website, and the second part is to crawl the weather station Historical forecast weather information; the local weather information predictor is to predict the weather information for a period of time in the future based on the weather information collected by the local collector; the optimized weather information model output device is based on the forecast weather information and the weather station history crawled by the weather information crawler The weather information predicted by the weather information predictor is compared with the information collected by the local weather information collector to train an optimized weather information model; the real-time weather type display predicts the real-time weather type according to the weather information value output by the optimized weather information model (sunny, cloudy, etc.).
下面具体的介绍:The following specific introduction:
本地气象信息采集器:存储本地历史气象信息数据和实时采集本地气象数据。 把从终端传感器采集到的数据传输写入到数据库中,为后面的数据读取和处理提供 方便。Local weather information collector: store local historical weather information data and collect local weather data in real time. Write the data transmission collected from the terminal sensor into the database to facilitate subsequent data reading and processing.
气象信息爬虫器:所谓爬虫就是运用Python语言工具从网上自动下载数据, 主要有两个模块,第一模块是从国家气象局网站上爬取历史真实的气象数据与对应 的本地采集的气象数据作对比,会发现数据并不完全一致,因为气象局采集的气象 数据位置精度不高,不能准确描述微电网所在地的气象信息。第二模块从气象局爬 取预测的气象信息,这其中包括历史预测气象信息和未来预测气象信息,历史预测 气象信息与本地气象信息预测器预测的气象信息相结合训练优化气象信息模型。Meteorological Information Crawler: The so-called crawler is to use Python language tools to automatically download data from the Internet. There are two main modules. The first module is to crawl historical real meteorological data from the website of the National Meteorological Administration and make corresponding local meteorological data. In contrast, it will be found that the data are not completely consistent, because the location accuracy of the meteorological data collected by the Meteorological Bureau is not high, and it cannot accurately describe the meteorological information of the location of the microgrid. The second module crawls the forecasted weather information from the Meteorological Bureau, which includes historical forecasted weather information and future forecasted weather information, and combines the historical forecasted weather information with the weather information predicted by the local weather information predictor to train and optimize the weather information model.
本地气象信息预测器:该模块设定每隔一段时间就会利用平滑指数算法预测未来一段时间的气象信息,预测的这段时间与气象信息爬虫器爬取的预测气象数据相 对应。Local weather information predictor: This module is set to use the smoothing index algorithm to predict the weather information for a period of time in the future at regular intervals. The forecast period corresponds to the forecast weather data crawled by the weather information crawler.
优化气象信息模型输出器:该模块的作用主要是利用分别来自气象信息爬虫器和本地气象信息预测器的两组预测的气象数据来尽可能的逼近采集到的对应时间 的本地气象信息。具体做法:利用线性回归算法,把两个预测气象数据当做输入, 本地气象数据当做目标列(输出),拟合出一个优化气象信息回归模型,并根据该 模型预测出未来一段时间的气象信息,该气象信息位置精确度更高,更加符合微电 网所处的环境。Optimize the weather information model output device: the function of this module is mainly to use two sets of predicted weather data from the weather information crawler and the local weather information predictor to approximate the local weather information collected at the corresponding time as much as possible. Specific method: use the linear regression algorithm, take two forecasted meteorological data as input, and local meteorological data as the target column (output), fit an optimized meteorological information regression model, and predict the meteorological information for a period of time in the future according to the model, The weather information has higher location accuracy and is more in line with the environment where the microgrid is located.
实时天气类型显示器:该模块的功能主要是根据本地采集器采集的数据以及对应时间的气象爬虫器中天气类型,把优化气象信息模型输出器预测的气象信息作为 输入,再利用K-近邻算法给出实时天气类型。Real-time weather type display: The function of this module is mainly based on the data collected by the local collector and the weather type in the weather crawler at the corresponding time, and the weather information predicted by the outputter of the optimized weather information model is used as input, and then the K-nearest neighbor algorithm is used to give Display the real-time weather type.
二、方法流程2. Method flow
1.本地气象信息采集器:1. Local weather information collector:
表1数据存储形式(示例)Table 1 Data storage form (example)
把采集过来的气象数据按照表1的格式存储,以时间为索引从传感器上采集各 个气象数据并存储下来,供其他步骤使用,该真实数据记作R。The collected meteorological data are stored in the format of Table 1, and each meteorological data is collected from the sensor with time as the index and stored for use in other steps. The real data is recorded as R.
2.气象信息爬虫器:2. Meteorological information crawler:
第一模块爬取历史真实的气象信息并存储起来,存储格式与表1一样,时间粒 度也与表1保持一致;第二模块功能主要是爬取与真实气象信息相对应的预测气象 数据,也叫做历史预测气象信息F1,另外还要爬取未来的天气预报信息,也叫做未 来预测气象信息F'1。以上步骤运用Python有关的爬虫库来完成的。The first module crawls and stores the historical real weather information, the storage format is the same as Table 1, and the time granularity is also consistent with Table 1; the function of the second module is mainly to crawl the forecast weather data corresponding to the real weather information, and also It is called the historical forecast weather information F 1 , and the future weather forecast information is also crawled, which is also called the future forecast weather information F' 1 . The above steps are completed using Python-related crawler libraries.
3.本地气象信息预测器:该模块设定每隔一段时间就会利用平滑指数算法预测未来一段时间的气象信息,预测的这段时间与气象信息爬虫器爬取的预测气象数据 时间粒度相对应。3. Local weather information predictor: This module is set to use the smoothing index algorithm to predict the weather information for a period of time in the future. The predicted period corresponds to the time granularity of the forecast weather data crawled by the weather information crawler .
平滑指数算法的具体过程如下:The specific process of the smoothing index algorithm is as follows:
(5)已知本时刻的本地气象信息以及本时刻的本地气象预测信息;(5) The local weather information at this time and the local weather forecast information at this time are known;
(6)训练平滑系数(要求),平滑系数的大小,是根据过去的预测 数F2与实际数R比较,根据公式(1)训练出来的(6) Training smoothing coefficient (Require ), the size of the smoothing coefficient is trained according to the formula (1) based on the comparison between the past forecast number F 2 and the actual number R
其中Rnext表示下一时刻的真实气象数据。Among them, R next represents the actual meteorological data at the next moment.
(3)由步骤(2)可以训练出一个确定值,这要就可以根据前一刻的气象信 息预测下一时刻的气象数据了。(3) From step (2), a certain value, so that the weather data of the next moment can be predicted based on the weather information of the previous moment.
4.优化气象信息模型输出器:4. Optimize the weather information model output device:
该模块的作用主要是利用分别来自气象信息爬虫器和本地气象信息预测器的 两组预测的气象数据来尽可能的逼近采集到的对应时间的本地气象信息。具体做法: 利用线性回归算法,把两个预测气象数据F1、F2当作输入,本地气象数据R当作 目标列(输出),拟合出一个优化气象信息回归模型,并根据该模型预测出未来一 段时间的气象信息。本地气象信息集R={r1,r2,...,ri,...,rn},其中ri表示第i种气象 类型,历史预测气象信息F1={f11,f12,...,f1i,...,f1n},其中f1i表示第i种气象类型,本 地预测气象信息F2={f21,f22,...,f2i,...,f2n}。The main function of this module is to use two sets of predicted weather data from the weather information crawler and the local weather information predictor to approximate the collected local weather information at the corresponding time as much as possible. Specific method: use the linear regression algorithm, take the two predicted weather data F 1 and F 2 as input, and the local weather data R as the target column (output), fit an optimized weather information regression model, and predict according to the model Provide weather information for a period of time in the future. Local meteorological information set R={r 1 ,r 2 ,...,r i ,...,r n }, where r i represents the i-th weather type, historical forecast weather information F 1 ={f 11 ,f 12 ,...,f 1i ,...,f 1n }, where f 1i represents the i-th weather type, local forecast weather information F 2 ={f 21 ,f 22 ,...,f 2i ,.. ., f 2n }.
根据回归方程如下:According to the regression equation as follows:
其中f预测1,f预测2,...,f预测i...,f预测n是要预测的气象类型,训练模型的时候用 真实的本地气象信息,ci,θi,γi分别表示线性回归训练过程中的参数。最后,把Rnext和F'1作为输入,可以得到一组优化后的预测气象信息 F预测={f预测1,f预测2,...,f预测i,...,f预测n}。F预测能更好的体现气象信息,位置精确度更 高,为微电网中其他模块提供更准确的数据,优化微电网的运行,提高微电网的效 益。Among them, f predicts 1 , f predicts 2 , ..., f predicts i ..., f predicts n is the weather type to be predicted, and the real local weather information is used when training the model, c i , θ i , γ i respectively Indicates the parameters in the linear regression training process. Finally, taking R next and F' 1 as input, a set of optimized forecast weather information can be obtained F forecast = {f forecast 1 , f forecast 2 ,..., f forecast i , ..., f forecast n } . F prediction can better reflect the meteorological information, and the location accuracy is higher. It can provide more accurate data for other modules in the microgrid, optimize the operation of the microgrid, and improve the efficiency of the microgrid.
5.实时天气类型显示器:5. Real-time weather type display:
该模块的功能主要是根据本地采集器采集的数据以及对应时间的气象爬虫器 中天气类型,比如A时刻本地气象信息为RA,对应的天气类型是晴天,根据真实 的天气值训练模型K-近邻模型,把优化气象信息模型输出器预测的气象信息作为输 入,再利用K-近邻模型给出实时天气类型,这样就可以实现离线状态的天气信息的 显示,同时更加的准确。The function of this module is mainly based on the data collected by the local collector and the weather type in the weather crawler at the corresponding time. For example, the local weather information at time A is R A , and the corresponding weather type is sunny, and the model K is trained according to the real weather value- The nearest neighbor model takes the meteorological information predicted by the optimized weather information model output device as input, and then uses the K-nearest neighbor model to give the real-time weather type, so that the offline weather information can be displayed more accurately.
本发明提出了一种基于气象信息的优化微电网的方法,主要由本地气象信息采集器、气象信息爬虫器、本地气象信息预测器、优化气象信息模型输出器和实时天 气类型显示器等五部分组成,通过线上与本地的气象数据融合得到更加准确、位置 精确度更高的气象预测数据,同时利用本地采集的气象数据利用K-近邻算法实现离 线状态下天气类型的显示。The present invention proposes a method for optimizing a microgrid based on meteorological information, which is mainly composed of five parts: a local weather information collector, a weather information crawler, a local weather information predictor, an optimized weather information model output device, and a real-time weather type display. , Through the fusion of online and local meteorological data, more accurate and location-accurate weather forecast data can be obtained, and at the same time, the K-nearest neighbor algorithm can be used to display the weather type in the offline state by using the locally collected meteorological data.
为了方便描述,我们假设有如下应用实例:For the convenience of description, we assume the following application examples:
某学校学科楼微电网系统,包括光伏发电、风机发电、教室用电以及能源管理 系统,下面就以此系统为例具体介绍一下。The micro-grid system of a school subject building includes photovoltaic power generation, fan power generation, classroom power consumption and energy management system. The following will take this system as an example to introduce it in detail.
(1)本地气象信息采集器。该系统通过传感器采集温度、湿度、风向、风速、 大气压和辐照度,存储在数据库里面。(1) Local weather information collector. The system collects temperature, humidity, wind direction, wind speed, atmospheric pressure and irradiance through sensors and stores them in the database.
(2)气象信息爬虫器。通过Python爬虫下载气象站的天气信息,包括历史真 实气象信息和预测气象信息,其中预测气象信息又包括历史预测气象信息和未来预 测气象信息。爬取的气象类型为温度、湿度、风向、风速、大气压、辐照度和天气 类型(晴天、雨天等),且时间粒度与本地气象信息采集器保持一致。(2) Meteorological information crawler. The weather information of the weather station is downloaded through the Python crawler, including historical real weather information and forecast weather information, and the forecast weather information includes historical forecast weather information and future forecast weather information. The meteorological types to be crawled are temperature, humidity, wind direction, wind speed, atmospheric pressure, irradiance, and weather type (sunny, rainy, etc.), and the time granularity is consistent with that of the local weather information collector.
(3)本地气象信息预测器。根据已有的采集到的历史气象信息利用平滑指数 算法预测未来一段时间的气象信息值。(3) Local weather information predictor. According to the existing collected historical meteorological information, the smoothing index algorithm is used to predict the value of meteorological information in the future.
(4)优化气象信息模型输出器。该模块的作用主要是利用分别来自气象信息 爬虫器和本地气象信息预测器的两组预测的气象数据来尽可能的逼近采集到的对 应时间的本地气象信息。具体做法:利用线性回归方法,将F1t、F2t当作输入,Rt当作目标列,拟合出一个优化气象信息回归模型;(4) Optimize the weather information model exporter. The main function of this module is to use two sets of predicted weather data from the weather information crawler and the local weather information predictor to approximate the collected local weather information at the corresponding time as much as possible. Specific method: use the linear regression method, take F1 t and F2 t as input, and R t as the target column, and fit an optimized meteorological information regression model;
其中,Rt={rt1,rt2,...,rti,...,rtn},rti表示t时刻的本地气象信息Rt第i种气象类型,n 表示气象类型的种类,Rt一共有n种气象类型,F1t={f1t1,f1t2,...,f1ti,...,f1tn},f1ti表 示F1t的第i种气象类型,F1t一共有n种气象类型,本地预测气象信息 F2t={f2t1,f2t2,...,f2ti,...,f2tn},f2ti表示F2t的第i种气象类型,F2t一共有n种气 象类型;Among them, R t ={r t1 ,r t2 ,...,r ti ,...,r tn }, r ti represents the local weather information R t of the i-th weather type at time t, and n represents the type of weather type , R t has a total of n meteorological types, F1 t = {f1 t1 ,f1 t2 ,...,f1 ti ,...,f1 tn }, f1 ti represents the i-th meteorological type of F1 t , and F1 t has a total of There are n kinds of weather types, and the local forecast weather information F2 t = {f2 t1 , f2 t2 ,..., f2 ti ,..., f2 tn }, f2 ti represents the i-th weather type of F2 t , and F2 t has a total of There are n weather types;
根据t取不同时刻时Rt,F1t,F2t训练气象信息回归模型如下:R t , F1 t , and F2 t are used to train the meteorological information regression model at different times according to t as follows:
其中,上标T表示矩阵转置,cT=[c1,c2,...,ci,...,cn]T是线性回归模型的参数,ci表 示第i个参数,c一共有n个参数;θT=[θ1,θ2,...,θi,...,θn]T是线性回归模型的参数,θi表示第i个参数,θ一共有n个参数;γT=[γ1,γ2,...,γi,...,γn]T是线性回归模型的参数, γi表示第i个参数,γ一共有n个参数;Among them, the superscript T represents matrix transposition, c T =[c 1 ,c 2 ,..., ci ,...,c n ] T is the parameter of the linear regression model, c i represents the i-th parameter, c has n parameters in total; θ T =[θ 1 ,θ 2 ,...,θ i ,...,θ n ] T is the parameter of the linear regression model, θ i represents the i-th parameter, and θ has a total of n parameters; γ T =[γ 1 ,γ 2 ,...,γ i ,...,γ n ] T is the parameter of the linear regression model, γ i represents the i-th parameter, and γ has n parameters in total ;
根据训练出的气象信息回归模型得到相对于Rt下一刻的气象信息预测值Rt'+1由公式(4)得到According to the trained meteorological information regression model, the predicted value R t ' + 1 of the meteorological information at the next moment relative to R t can be obtained by formula (4)
(5)实时信息显示器。根据采集到的气象信息,利用K-近邻算法得出实时的 天气类型,并显示到微电网控制屏上。(5) Real-time information display. According to the collected meteorological information, use the K-nearest neighbor algorithm to get the real-time weather type and display it on the microgrid control panel.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或 替换,都应涵盖在本发明的保护范围内。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto, any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention, All should be covered within the protection scope of the present invention.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810116434.6A CN108196317B (en) | 2018-02-06 | 2018-02-06 | Meteorological prediction method for micro-grid system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810116434.6A CN108196317B (en) | 2018-02-06 | 2018-02-06 | Meteorological prediction method for micro-grid system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108196317A true CN108196317A (en) | 2018-06-22 |
CN108196317B CN108196317B (en) | 2019-12-13 |
Family
ID=62592546
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810116434.6A Active CN108196317B (en) | 2018-02-06 | 2018-02-06 | Meteorological prediction method for micro-grid system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108196317B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109358381A (en) * | 2018-09-12 | 2019-02-19 | 浙江省气象科学研究所 | A method of site forecast wind speed correction |
CN109471205A (en) * | 2018-10-18 | 2019-03-15 | 国网山东省电力公司应急管理中心 | A kind of monitoring and pre-alarming method based on gridding meteorological data in grid operation |
CN109541728A (en) * | 2018-10-18 | 2019-03-29 | 国网山东省电力公司应急管理中心 | A kind of electricity power engineering project meteorologic early-warning method |
CN111339392A (en) * | 2020-03-27 | 2020-06-26 | 中国科学院大气物理研究所 | Sky blue index determination method and system based on meteorological elements |
CN111695736A (en) * | 2020-06-15 | 2020-09-22 | 河北锐景能源科技有限公司 | Photovoltaic power generation short-term power prediction method based on multi-model fusion |
CN112489387A (en) * | 2020-12-04 | 2021-03-12 | 广东电网有限责任公司江门供电局 | Power distribution construction site safety early warning method based on weather monitoring |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101634721A (en) * | 2009-04-15 | 2010-01-27 | 华东师范大学第二附属中学 | Historical data based intelligent early warning system for typhoon and flood |
CN101893726A (en) * | 2010-07-23 | 2010-11-24 | 北京师范大学 | A sandstorm disaster simulation device and simulation method |
CN103499846A (en) * | 2013-09-03 | 2014-01-08 | 百度在线网络技术(北京)有限公司 | Method and equipment for predicting weather conditions |
-
2018
- 2018-02-06 CN CN201810116434.6A patent/CN108196317B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101634721A (en) * | 2009-04-15 | 2010-01-27 | 华东师范大学第二附属中学 | Historical data based intelligent early warning system for typhoon and flood |
CN101893726A (en) * | 2010-07-23 | 2010-11-24 | 北京师范大学 | A sandstorm disaster simulation device and simulation method |
CN103499846A (en) * | 2013-09-03 | 2014-01-08 | 百度在线网络技术(北京)有限公司 | Method and equipment for predicting weather conditions |
Non-Patent Citations (2)
Title |
---|
侯琼煌: "基于三次指数平滑模型的雾霾天气分析与预测", 《环境保护科学》 * |
谭风雷 等: "一种改进的指数平滑负荷预测方法研究", 《电力需求侧管理》 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109358381A (en) * | 2018-09-12 | 2019-02-19 | 浙江省气象科学研究所 | A method of site forecast wind speed correction |
CN109471205A (en) * | 2018-10-18 | 2019-03-15 | 国网山东省电力公司应急管理中心 | A kind of monitoring and pre-alarming method based on gridding meteorological data in grid operation |
CN109541728A (en) * | 2018-10-18 | 2019-03-29 | 国网山东省电力公司应急管理中心 | A kind of electricity power engineering project meteorologic early-warning method |
CN109471205B (en) * | 2018-10-18 | 2022-01-04 | 国网山东省电力公司应急管理中心 | Monitoring and early warning method based on gridding meteorological data in power grid operation |
CN111339392A (en) * | 2020-03-27 | 2020-06-26 | 中国科学院大气物理研究所 | Sky blue index determination method and system based on meteorological elements |
CN111339392B (en) * | 2020-03-27 | 2023-02-03 | 中国科学院大气物理研究所 | A Method and System for Determining Sky Blue Index Based on Meteorological Elements |
CN111695736A (en) * | 2020-06-15 | 2020-09-22 | 河北锐景能源科技有限公司 | Photovoltaic power generation short-term power prediction method based on multi-model fusion |
CN111695736B (en) * | 2020-06-15 | 2023-04-21 | 河北锐景能源科技有限公司 | Photovoltaic power generation short-term power prediction method based on multi-model fusion |
CN112489387A (en) * | 2020-12-04 | 2021-03-12 | 广东电网有限责任公司江门供电局 | Power distribution construction site safety early warning method based on weather monitoring |
Also Published As
Publication number | Publication date |
---|---|
CN108196317B (en) | 2019-12-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108196317B (en) | Meteorological prediction method for micro-grid system | |
WO2021238505A1 (en) | Federated learning-based regional photovoltaic power probability prediction method, and cooperative regulation and control system | |
Zhang et al. | Data augmentation for improving heating load prediction of heating substation based on TimeGAN | |
Sankarananth et al. | AI-enabled metaheuristic optimization for predictive management of renewable energy production in smart grids | |
CN110705772B (en) | Regional power grid wind power generation power prediction optimization method and device | |
KR101476522B1 (en) | System for predicting energy producing quantity | |
CN103699944A (en) | Wind and photovoltaic generation power prediction system with multiple prediction modes | |
CN111260108B (en) | Energy hub robust optimization method based on interval prediction | |
CN109740790A (en) | A user electricity consumption prediction method based on time series feature extraction | |
CN109711614A (en) | A kind of the dynamic optimization progress control method and system of distributed busbar protection | |
Xiao et al. | Short-term power load interval forecasting based on nonparametric Bootstrap errors sampling | |
CN117114438A (en) | A flexible and interpretable data-driven forecasting method for heating and cooling loads in building area energy systems | |
CN106570774A (en) | Progressive learning grid regulation and control method based on learning theory | |
Gao et al. | Adversarial discriminative domain adaptation for solar radiation prediction: A cross-regional study for zero-label transfer learning in Japan | |
Wang et al. | Look-ahead decision making for renewable energy: A dynamic “predict and store” approach | |
CN116316617B (en) | Multi-station intelligent fusion new energy generation power region prediction method and system | |
CN106779175A (en) | It is a kind of to consider that non-linear photovoltaic at times is exerted oneself Forecasting Methodology | |
CN115759458A (en) | Load prediction method based on comprehensive energy data processing and multi-task deep learning | |
Singh et al. | Optimum power forecasting technique for hybrid renewable energy systems using deep learning | |
Zhang et al. | A data transfer method based on one dimensional convolutional neural network for cross-building load prediction | |
CN104537233A (en) | Distribution network pseudo measurement generating method based on kernel density estimation | |
CN112200366B (en) | Load forecasting method, apparatus, electronic device and readable storage medium | |
CN104657786A (en) | Short-term wind power mixed predicting method based on Boosting algorithm | |
CN116485004A (en) | Wind power prediction method based on power heat map and convolutional neural network | |
CN115577903A (en) | Method, device, equipment and medium for evaluating influence of new energy on power grid peak regulation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |