[go: up one dir, main page]

CN116706907B - Photovoltaic power generation prediction method and related equipment based on fuzzy reasoning - Google Patents

Photovoltaic power generation prediction method and related equipment based on fuzzy reasoning Download PDF

Info

Publication number
CN116706907B
CN116706907B CN202310997292.XA CN202310997292A CN116706907B CN 116706907 B CN116706907 B CN 116706907B CN 202310997292 A CN202310997292 A CN 202310997292A CN 116706907 B CN116706907 B CN 116706907B
Authority
CN
China
Prior art keywords
photovoltaic
data
environment
training
similarity
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.)
Active
Application number
CN202310997292.XA
Other languages
Chinese (zh)
Other versions
CN116706907A (en
Inventor
苏明辉
楚俊昌
李瑞平
孔瑞霞
王艳琴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Baidali Heng Technology Co.,Ltd.
Original Assignee
Shenzhen Aerospace Science And Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Aerospace Science And Technology Co ltd filed Critical Shenzhen Aerospace Science And Technology Co ltd
Priority to CN202310997292.XA priority Critical patent/CN116706907B/en
Publication of CN116706907A publication Critical patent/CN116706907A/en
Application granted granted Critical
Publication of CN116706907B publication Critical patent/CN116706907B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J3/00Circuit arrangements for AC mains or AC distribution networks
    • H02J3/004Generation forecast, e.g. methods or systems for forecasting future energy generation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/042Knowledge-based neural networks; Logical representations of neural networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/048Fuzzy inferencing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J3/00Circuit arrangements for AC mains or AC distribution networks
    • H02J3/38Arrangements for parallely feeding a single network by two or more generators, converters or transformers
    • H02J3/381Dispersed generators
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J2203/00Indexing scheme relating to details of circuit arrangements for AC mains or AC distribution networks
    • H02J2203/20Simulating, e g planning, reliability check, modelling or computer assisted design [CAD]
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J2300/00Systems for supplying or distributing electric power characterised by decentralized, dispersed, or local generation
    • H02J2300/20The dispersed energy generation being of renewable origin
    • H02J2300/22The renewable source being solar energy
    • H02J2300/24The renewable source being solar energy of photovoltaic origin
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Human Resources & Organizations (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Molecular Biology (AREA)
  • Tourism & Hospitality (AREA)
  • Biomedical Technology (AREA)
  • Power Engineering (AREA)
  • Biophysics (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Automation & Control Theory (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Development Economics (AREA)
  • Fuzzy Systems (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • Primary Health Care (AREA)

Abstract

The invention provides a photovoltaic power generation prediction method and related equipment based on fuzzy reasoning, and relates to the technical field of photovoltaic power generation, wherein the method comprises the following steps: acquiring training environment data and training photovoltaic data; carrying out fuzzy division on training environment data to obtain a training environment data set; carrying out fuzzy division on the training photovoltaic data to obtain a training photovoltaic data set; inputting the training environment data set into a preset neural network for training to obtain a predicted photovoltaic data set corresponding to the training environment data set; according to the predicted photovoltaic data set and the training photovoltaic data set, parameter adjustment is carried out on the neural network until the neural network converges, and a photovoltaic prediction model is obtained; when the current environment data is acquired, calculating a current photovoltaic predicted value corresponding to the current environment data based on the photovoltaic predicted model. The invention can combine multisource information, fully exert the nonlinear modeling capability of the neural network and the human intelligent characteristics of fuzzy reasoning, and improve the prediction accuracy of photovoltaic power generation.

Description

基于模糊推理的光伏发电预测方法和相关设备Photovoltaic power generation prediction method and related equipment based on fuzzy reasoning

技术领域Technical field

本发明涉及光伏发电技术领域,尤其涉及一种基于模糊推理的光伏发电预测方法和相关设备。The present invention relates to the technical field of photovoltaic power generation, and in particular to a photovoltaic power generation prediction method and related equipment based on fuzzy reasoning.

背景技术Background technique

光伏预测是一项关键的技术,它可以帮助光伏电站更好地利用太阳能资源,提高发电效率,降低运行成本,保障电网安全稳定。光伏预测的主要目的是根据光伏电站的位置、组件特性等因素,预测未来一段时间内光伏电站的发电量或输出功率。光伏预测的难度在于光伏发电受到多种因素的影响,如太阳辐射、云层遮挡、温度变化、风速风向等,这些因素都具有不确定性和非线性性,导致光伏发电具有随机性和波动性。Photovoltaic prediction is a key technology that can help photovoltaic power stations better utilize solar energy resources, improve power generation efficiency, reduce operating costs, and ensure the safety and stability of the power grid. The main purpose of photovoltaic forecasting is to predict the power generation or output power of photovoltaic power stations in the future based on factors such as the location of the photovoltaic power station and component characteristics. The difficulty of photovoltaic prediction is that photovoltaic power generation is affected by many factors, such as solar radiation, cloud cover, temperature changes, wind speed and direction, etc. These factors are uncertain and nonlinear, resulting in photovoltaic power generation being random and volatile.

当前光伏发电的预测仍然缺少一种准确且适应性强的方法。Current photovoltaic power generation forecasting still lacks an accurate and adaptable method.

发明内容Contents of the invention

本发明提供一种基于模糊推理的光伏发电预测方法和相关设备,用以解决现有技术中缺少准确的光伏发电预测方法的缺陷,实现光伏发电的准确预测。The present invention provides a photovoltaic power generation prediction method and related equipment based on fuzzy reasoning to solve the defect of lack of accurate photovoltaic power generation prediction method in the prior art and realize accurate prediction of photovoltaic power generation.

本发明提供一种基于模糊推理的光伏发电预测方法,包括:The present invention provides a photovoltaic power generation prediction method based on fuzzy reasoning, including:

获取训练环境数据和训练光伏数据;Obtain training environment data and training photovoltaic data;

对所述训练环境数据进行模糊划分,得到训练环境数据集,对所述训练光伏数据进行模糊划分,得到训练光伏数据集,所述训练环境数据集包括若干对环境数据对,所述环境数据对包括训练环境数据值和每一个所述训练环境数据值对应的环境标签,所述训练光伏数据集包括若干对光伏数据对,所述光伏数据对包括训练光伏数据值和每一个所述训练光伏数据值对应的光伏标签;Fuzzy division is performed on the training environment data to obtain a training environment data set. Fuzzy division is performed on the training photovoltaic data to obtain a training photovoltaic data set. The training environment data set includes several pairs of environmental data. The pairs of environmental data are including training environment data values and environment labels corresponding to each training environment data value; the training photovoltaic data set includes several pairs of photovoltaic data pairs; the photovoltaic data pairs include training photovoltaic data values and each of the training photovoltaic data The photovoltaic tag corresponding to the value;

将所述训练环境数据集输入至预设的神经网络中,并控制所述神经网络对所述训练环境数据集进行预测,得到所述训练环境数据集对应的预测光伏数据集,所述神经网络中包括模糊函数;The training environment data set is input into a preset neural network, and the neural network is controlled to predict the training environment data set to obtain a predicted photovoltaic data set corresponding to the training environment data set. The neural network Includes fuzzy functions;

根据所述预测光伏数据集和所述训练光伏数据集,对所述神经网络进行参数调整,直至所述神经网络收敛,得到光伏预测模型;According to the predicted photovoltaic data set and the training photovoltaic data set, adjust parameters of the neural network until the neural network converges to obtain a photovoltaic prediction model;

当获取当前环境数据时,基于所述光伏预测模型,计算所述当前环境数据对应的当前光伏预测值。When current environmental data is obtained, the current photovoltaic prediction value corresponding to the current environmental data is calculated based on the photovoltaic prediction model.

根据本发明提供的一种基于模糊推理的光伏发电预测方法,所述对所述训练环境数据进行模糊划分,得到训练环境数据集包括:According to a photovoltaic power generation prediction method based on fuzzy reasoning provided by the present invention, the fuzzy division of the training environment data to obtain the training environment data set includes:

计算每一个所述训练环境数据对应的环境特征向量;Calculate the environment feature vector corresponding to each of the training environment data;

根据所述环境特征向量之间的相似度,对所述训练环境数据进行初分类,得到若干个初始环境聚类;According to the similarity between the environmental feature vectors, perform preliminary classification on the training environment data to obtain several initial environment clusters;

对所述初始环境聚类进行相似度计算,得到聚类相似度值;Perform similarity calculation on the initial environment clustering to obtain a clustering similarity value;

根据所述聚类相似度值,对所述初始环境聚类进行合并,并对合并后的初始环境聚类中的数据进行更新,直至所述初始环境聚类满足预设的停止标准,得到若干个目标环境聚类和所述目标环境聚类对应的环境标签;According to the cluster similarity value, the initial environment clusters are merged, and the data in the merged initial environment clusters are updated until the initial environment clusters meet the preset stopping criteria, and several A target environment cluster and an environment label corresponding to the target environment cluster;

根据所述目标环境聚类和所述环境标签,生成环境数据对。According to the target environment clustering and the environment label, an environment data pair is generated.

根据本发明提供的一种基于模糊推理的光伏发电预测方法,所述根据所述环境特征向量之间的相似度,对所述训练环境数据进行初分类,得到若干个初始环境聚类包括:According to a photovoltaic power generation prediction method based on fuzzy reasoning provided by the present invention, the training environment data is initially classified according to the similarity between the environmental feature vectors, and several initial environment clusters are obtained, including:

对所述环境特征向量进行拆分,得到所述环境特征向量对应的第一环境比较值和第二环境比较值;Split the environment feature vector to obtain the first environment comparison value and the second environment comparison value corresponding to the environment feature vector;

计算所述第一环境比较值之间的第一相似度;Calculate a first similarity between the first environment comparison values;

根据所述第一相似度,对所述环境特征向量进行划分,得到第一聚类;According to the first similarity, divide the environmental feature vector to obtain a first cluster;

计算所述第一聚类中所述第二环境比较值之间的第二相似度;Calculating a second degree of similarity between the second environment comparison values in the first cluster;

根据所述第二相似度,对所述环境特征向量进行划分,得到初始环境聚类。According to the second similarity, the environment feature vector is divided to obtain initial environment clustering.

根据本发明提供的一种基于模糊推理的光伏发电预测方法,在所述获取训练环境数据和训练光伏数据之前,还包括:According to a photovoltaic power generation prediction method based on fuzzy reasoning provided by the present invention, before obtaining training environment data and training photovoltaic data, it also includes:

获取历史环境数据、更新环境数据、历史光伏数据和更新光伏数据;Obtain historical environmental data, update environmental data, historical photovoltaic data and update photovoltaic data;

根据预设的更新周期,对所述更新环境数据和历史环境数据进行抽选,得到训练环境数据;以及,According to the preset update cycle, the updated environment data and historical environment data are selected to obtain training environment data; and,

对所述历史光伏数据和所述更新光伏数据进行抽选,得到训练光伏数据。The historical photovoltaic data and the updated photovoltaic data are selected to obtain training photovoltaic data.

根据本发明提供的一种基于模糊推理的光伏发电预测方法,所述根据预设的更新周期,对所述更新环境数据和历史环境数据进行抽选,得到训练环境数据包括:According to a photovoltaic power generation prediction method based on fuzzy reasoning provided by the present invention, the updated environment data and historical environment data are selected according to a preset update cycle, and the training environment data obtained includes:

根据所述更新周期,确定所述更新环境数据和所述历史环境数据中的候选环境数据;Determine candidate environment data among the updated environment data and the historical environment data according to the update cycle;

将所述候选环境数据与候选环境时间对应的参考环境数据进行比较,确定所述候选环境数据中的异常值,其中,所述候选环境时间为与所述候选环境数据对应的时间;Compare the candidate environment data with reference environment data corresponding to the candidate environment time, and determine outliers in the candidate environment data, where the candidate environment time is the time corresponding to the candidate environment data;

根据所述异常值和所述候选环境时间,对所述候选环境数据进行调整,得到训练环境数据。According to the abnormal value and the candidate environment time, the candidate environment data is adjusted to obtain training environment data.

根据本发明提供的一种基于模糊推理的光伏发电预测方法,所述将所述候选环境数据与候选环境时间对应的参考环境数据进行比较,确定所述候选环境数据中的异常值包括:According to a photovoltaic power generation prediction method based on fuzzy reasoning provided by the present invention, comparing the candidate environment data with the reference environment data corresponding to the candidate environment time, and determining the abnormal values in the candidate environment data includes:

基于所述参考环境数据,确定预测参数;Based on the reference environmental data, determine prediction parameters;

根据所述参考环境数据和所述预测参数,生成环境预测模型;Generate an environment prediction model based on the reference environment data and the prediction parameters;

基于所述环境预测模型,生成所述候选环境时间对应的预测环境数据;Based on the environment prediction model, generate predicted environment data corresponding to the candidate environment time;

对所述预测环境数据和所述候选环境数据进行比较,确定所述候选环境数据中的异常值。The predicted environment data and the candidate environment data are compared to determine outliers in the candidate environment data.

根据本发明提供的一种基于模糊推理的光伏发电预测方法,所述将所述训练环境数据集输入至预设的神经网络中,并控制所述神经网络对所述训练环境数据集进行预测,得到所述训练环境数据集对应的预测光伏数据集包括:According to a photovoltaic power generation prediction method based on fuzzy reasoning provided by the present invention, the training environment data set is input into a preset neural network, and the neural network is controlled to predict the training environment data set, Obtaining the predicted photovoltaic data set corresponding to the training environment data set includes:

将所述训练环境数据集输入至所述神经网络的输入层,并控制所述输入层将所述训练环境数据集传输至所述神经网络的隐藏层;Input the training environment data set to the input layer of the neural network, and control the input layer to transmit the training environment data set to the hidden layer of the neural network;

控制所述隐藏层中每一个计算节点对所述训练环境数据集进行计算,得到对应的初始值;Control each computing node in the hidden layer to calculate the training environment data set to obtain the corresponding initial value;

将所述初始值输入所述模糊函数,并控制所述模糊函数对所述初始值进行模糊计算,得到预测光伏数据;Input the initial value into the fuzzy function, and control the fuzzy function to perform fuzzy calculation on the initial value to obtain predicted photovoltaic data;

控制所述预测光伏数据传输至所述神经网络的输出层,并控制所述输出层输出。Control the transmission of the predicted photovoltaic data to the output layer of the neural network, and control the output layer output.

本发明还提供一种基于模糊推理的光伏发电预测装置,包括:The invention also provides a photovoltaic power generation prediction device based on fuzzy reasoning, including:

获取模块,用于获取训练环境数据和训练光伏数据;Acquisition module, used to obtain training environment data and training photovoltaic data;

划分模块,用于对所述训练环境数据进行模糊划分,得到训练环境数据集,以及,对所述训练光伏数据进行模糊划分,得到训练光伏数据集,所述训练环境数据集包括若干对环境数据对,所述环境数据对包括训练环境数据值和每一个所述训练环境数据值对应的环境标签,所述训练光伏数据集包括若干对光伏数据对,所述光伏数据对包括训练光伏数据值和每一个所述训练光伏数据值对应的光伏标签;A dividing module, used to fuzzy divide the training environment data to obtain a training environment data set, and to fuzzy divide the training photovoltaic data to obtain a training photovoltaic data set, where the training environment data set includes several pairs of environmental data Yes, the environment data pair includes a training environment data value and an environment label corresponding to each training environment data value. The training photovoltaic data set includes several pairs of photovoltaic data pairs, and the photovoltaic data pairs include training photovoltaic data values and The photovoltaic label corresponding to each of the training photovoltaic data values;

输入模块,用于将所述训练环境数据集输入至预设的神经网络中,并控制所述神经网络对所述训练环境数据集进行预测,得到所述训练环境数据集对应的预测光伏数据集,所述神经网络中包括模糊函数;An input module for inputting the training environment data set into a preset neural network, and controlling the neural network to predict the training environment data set to obtain a predicted photovoltaic data set corresponding to the training environment data set. , the neural network includes a fuzzy function;

调整模块,用于根据所述预测光伏数据集和所述训练光伏数据集,对所述神经网络进行参数调整,直至所述神经网络收敛,得到光伏预测模型;An adjustment module, configured to adjust parameters of the neural network according to the predicted photovoltaic data set and the training photovoltaic data set until the neural network converges to obtain a photovoltaic prediction model;

预测模块,用于当获取当前环境数据时,基于所述光伏预测模型,计算所述当前环境数据对应的当前光伏预测值。A prediction module, configured to calculate the current photovoltaic prediction value corresponding to the current environmental data based on the photovoltaic prediction model when current environmental data is obtained.

本发明还提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上述任一种基于模糊推理的光伏发电预测方法。The present invention also provides an electronic device, including 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 any of the above fuzzy inference-based methods. Photovoltaic power generation forecasting method.

本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一种基于模糊推理的光伏发电预测方法。The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any one of the above fuzzy inference-based photovoltaic power generation prediction methods is implemented.

本发明提供的基于模糊推理的光伏发电预测方法,能够实现更准确的光伏数据预测,为光伏发电系统的功率调度和稳定供电提供重要支撑。本发明通过获取训练环境数据和训练光伏数据,并对其进行模糊划分,得到训练环境数据集和训练光伏数据集。这样充分利用多源信息,还进一步结合环境因素,扩展输入维度,也更全面地反映光伏发电系统的运行状态和影响因素,提高预测的准确性和可靠性。然后将训练环境数据集输入至预设的神经网络中,并控制神经网络对其进行预测,得到预测光伏数据集。然后根据预测光伏数据集和训练光伏数据集,对神经网络进行参数调整,直至神经网络收敛,得到光伏预测模型。这通过充分发挥神经网络的非线性建模能力和模糊推理的人类智能特点,还原人类的直觉与思维,更好地捕获复杂非线性关系。因此最后基于光伏预测模型,计算当前环境数据对应的当前光伏预测值更为精确且具有较高的适应性。The photovoltaic power generation prediction method based on fuzzy reasoning provided by the present invention can achieve more accurate photovoltaic data prediction and provide important support for the power scheduling and stable power supply of the photovoltaic power generation system. The present invention obtains the training environment data and the training photovoltaic data and fuzzy divides them to obtain the training environment data set and the training photovoltaic data set. This makes full use of multi-source information, further combines environmental factors, expands the input dimension, and more comprehensively reflects the operating status and influencing factors of the photovoltaic power generation system, improving the accuracy and reliability of prediction. Then the training environment data set is input into the preset neural network, and the neural network is controlled to predict it to obtain a predicted photovoltaic data set. Then, according to the predicted photovoltaic data set and the training photovoltaic data set, the parameters of the neural network are adjusted until the neural network converges, and the photovoltaic prediction model is obtained. This restores human intuition and thinking and better captures complex nonlinear relationships by giving full play to the nonlinear modeling capabilities of neural networks and the human intelligence characteristics of fuzzy reasoning. Therefore, based on the photovoltaic prediction model, the current photovoltaic prediction value corresponding to the current environmental data is calculated more accurately and has higher adaptability.

附图说明Description of the drawings

为了更清楚地说明本发明或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the present invention or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are of the present invention. For some embodiments of the invention, those of ordinary skill in the art can also obtain other drawings based on these drawings without exerting creative efforts.

图1是本发明提供的一种基于模糊推理的光伏发电预测方法的流程示意图;Figure 1 is a schematic flow chart of a photovoltaic power generation prediction method based on fuzzy reasoning provided by the present invention;

图2是本发明提供的一种基于模糊推理的光伏发电预测装置的结构示意图;Figure 2 is a schematic structural diagram of a photovoltaic power generation prediction device based on fuzzy reasoning provided by the present invention;

图3是本发明提供的电子设备的结构示意图。Figure 3 is a schematic structural diagram of the electronic device provided by the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明中的附图,对本发明中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the present invention more clear, the technical solutions in the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention. , not all examples. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of the present invention.

下面结合图1描述本发明的一种基于模糊推理的光伏发电预测方法,包括:The following describes a photovoltaic power generation prediction method based on fuzzy reasoning of the present invention in conjunction with Figure 1, which includes:

S100、获取训练环境数据和训练光伏数据;S100. Obtain training environment data and training photovoltaic data;

S200、对所述训练环境数据进行模糊划分,得到训练环境数据集,对所述训练光伏数据进行模糊划分,得到训练光伏数据集,所述训练环境数据集包括若干对环境数据对,所述环境数据对包括训练环境数据值和每一个所述训练环境数据值对应的环境标签,所述训练光伏数据集包括若干对光伏数据对,所述光伏数据对包括训练光伏数据值和每一个所述训练光伏数据值对应的光伏标签;S200. Perform fuzzy division on the training environment data to obtain a training environment data set. Fuzzy division on the training photovoltaic data to obtain a training photovoltaic data set. The training environment data set includes several pairs of environmental data. The environment The data pairs include training environment data values and environment labels corresponding to each of the training environment data values. The training photovoltaic data set includes several pairs of photovoltaic data pairs. The photovoltaic data pairs include training photovoltaic data values and each of the training The photovoltaic tag corresponding to the photovoltaic data value;

S300、将所述训练环境数据集输入至预设的神经网络中,并控制所述神经网络对所述训练环境数据集进行预测,得到所述训练环境数据集对应的预测光伏数据集,所述神经网络中包括模糊函数;S300. Input the training environment data set into a preset neural network, and control the neural network to predict the training environment data set to obtain a predicted photovoltaic data set corresponding to the training environment data set. Neural networks include fuzzy functions;

S400、根据所述预测光伏数据集和所述训练光伏数据集,对所述神经网络进行参数调整,直至所述神经网络收敛,得到光伏预测模型;S400. According to the predicted photovoltaic data set and the training photovoltaic data set, adjust parameters of the neural network until the neural network converges to obtain a photovoltaic prediction model;

S500、当获取当前环境数据时,基于所述光伏预测模型,计算所述当前环境数据对应的当前光伏预测值。S500. When obtaining current environmental data, calculate the current photovoltaic prediction value corresponding to the current environmental data based on the photovoltaic prediction model.

具体的,收集足够多的数据来训练神经网络,以建立光伏预测模型。训练环境数据和训练光伏数据可以从实际的光伏电站或者模拟的光伏系统中获取,也可以从公开的数据库或者网站中下载。训练环境数据是指用于对后续神经网络进行训练的环境数据。训练环境数据为某一时刻对应的温度、辐射度、湿度、风速等。训练光伏数据是指对神经网络进行训练的光伏数据,为了训练结果的合理性,训练光伏数据与训练环境数据对应同一时刻。不同数据之间时间差距可以日为单位,也可以小时为单位,可以根据对预测精度的需求进行调整。这些数据可以用表格或矩阵的形式存储和表示,每一行对应一个时刻,每一列对应一个输入信号。为方便训练,可将训练环境数据和训练光伏数据进行标准化处理,如将所有输入用最大最小标准化转化为0~1范围内,有助于神经网络的训练。Specifically, enough data is collected to train the neural network to build a photovoltaic prediction model. Training environment data and training photovoltaic data can be obtained from actual photovoltaic power plants or simulated photovoltaic systems, or can be downloaded from public databases or websites. Training environment data refers to the environment data used to train subsequent neural networks. The training environment data is the temperature, radiation, humidity, wind speed, etc. corresponding to a certain moment. Training photovoltaic data refers to the photovoltaic data used to train the neural network. In order to ensure the rationality of the training results, the training photovoltaic data and the training environment data correspond to the same time. The time gap between different data can be in days or hours, and can be adjusted according to the demand for forecast accuracy. These data can be stored and represented in the form of tables or matrices, with each row corresponding to a moment and each column corresponding to an input signal. In order to facilitate training, the training environment data and training photovoltaic data can be standardized. For example, all inputs can be converted into the range of 0~1 using maximum and minimum normalization, which is helpful for the training of neural networks.

然后将连续的数值型数据转化为离散的类别型数据,从而方便神经网络的输入和输出。模糊划分是一种将数值型数据按照一定的规则和标准分成若干个区间,并赋予每个区间一个标签的方法。模糊划分可以根据实际情况和经验进行设定,也可以利用一些算法或者工具进行自动化或者半自动化地生成。所述训练环境数据集包括若干对环境数据对,所述环境数据对包括训练环境数据值和每一个所述训练环境数据值对应的环境标签。以温度为例,环境标签可包括高温、中温、低温。所述训练光伏数据集包括若干对光伏数据对,所述光伏数据对包括训练光伏数据值和每一个所述训练光伏数据值对应的光伏标签。以光伏功率为例,光伏标签可包括高功率、中功率和低功率。Then the continuous numerical data is converted into discrete categorical data to facilitate the input and output of the neural network. Fuzzy partitioning is a method that divides numerical data into several intervals according to certain rules and standards, and assigns a label to each interval. Fuzzy divisions can be set based on actual conditions and experience, or can be generated automatically or semi-automatically using some algorithms or tools. The training environment data set includes several pairs of environment data, and the pair of environment data includes a training environment data value and an environment label corresponding to each training environment data value. Taking temperature as an example, environmental labels can include high temperature, medium temperature, and low temperature. The training photovoltaic data set includes several pairs of photovoltaic data, and the photovoltaic data pairs include training photovoltaic data values and photovoltaic tags corresponding to each of the training photovoltaic data values. Taking photovoltaic power as an example, photovoltaic labels can include high power, medium power and low power.

通过对训练环境数据和训练光伏数据进行模糊划分,可以增加数据的多样性,避免由于准确的数值,导致模型训练过程中出现过拟合或欠拟合的情形。另一方面,模糊划分能够更好地将数据分为不同的类群,通过环境标签和光伏标签更加凸显其代表性的特征,而非其原始特征,降低预测过程的难度。此外光伏发电场景常常存在特殊环境的干扰,模糊划分能够减弱特殊环境的干扰,使得后续模型能够对场景具有更好的适用性。By fuzzy dividing the training environment data and training photovoltaic data, the diversity of the data can be increased and avoid over-fitting or under-fitting during the model training process due to accurate values. On the other hand, fuzzy division can better divide the data into different groups, highlight its representative characteristics through environmental labels and photovoltaic labels, rather than its original characteristics, and reduce the difficulty of the prediction process. In addition, photovoltaic power generation scenarios often have interference from special environments. Fuzzy division can weaken the interference from special environments, allowing subsequent models to have better applicability to the scenario.

然后利用神经网络来学习从环境变量到光伏输出之间的映射关系,并得到光伏预测模型。神经网络是一种由多个节点(神经元)和连接(权重)组成的非线性模型,能够通过调整权重来逼近任意复杂函数。神经网络有多种类型和结构,本实施例中使用前向传播神经网络,即输入层节点数为N个(对应N个输入信号),隐藏层节点可根据需求自由调整,本实施例中设置为10个,输出层节点数为1个(对应1个输出信号)。输入层节点的数量与输入的环境标签和光伏标签的数量有关。将训练环境数据集中的每一对环境数据对作为神经网络的输入,经过隐藏层的非线性变换,得到输出层的预测光伏数据值。这些预测光伏数据值构成了训练环境数据集对应的预测光伏数据集。The neural network is then used to learn the mapping relationship from environmental variables to photovoltaic output and obtain a photovoltaic prediction model. Neural network is a nonlinear model composed of multiple nodes (neurons) and connections (weights), which can approximate any complex function by adjusting the weights. There are many types and structures of neural networks. In this embodiment, the forward propagation neural network is used, that is, the number of input layer nodes is N (corresponding to N input signals), and the hidden layer nodes can be freely adjusted according to needs. In this embodiment, it is set is 10, and the number of output layer nodes is 1 (corresponding to 1 output signal). The number of input layer nodes is related to the number of input environmental labels and photovoltaic labels. Each environmental data pair in the training environment data set is used as the input of the neural network, and through nonlinear transformation of the hidden layer, the predicted photovoltaic data value of the output layer is obtained. These predicted PV data values constitute the predicted PV data set corresponding to the training environment data set.

预测光伏数据集和训练光伏数据集之间存在差距,这一差距可用损失值表现。计算预测光伏数据集和所述训练光伏数据集之间的损失值,并基于损失值,对神经网络的参数进行优化,使其能够更好地拟合训练数据,从而提高预测精度。光伏数据集中的光伏标签代表了某一个光伏数值在整个数据集中的相对位置,而预测光伏数据集中的光伏标签代表了对整个数据集的数据特征的预测。在本实施例中,除了传统的数值与数值之间的损失值的比较,还包含光伏标签的比较,因此在训练过程中能够更快地确定训练的方向,加快训练的速度,同时,准确地预测光伏标签也能够更好地实现对整体数据预测效果的提升,进而提高整个数据的准确率。There is a gap between the predicted PV data set and the training PV data set, which can be represented by a loss value. Calculate the loss value between the predicted photovoltaic data set and the training photovoltaic data set, and based on the loss value, optimize the parameters of the neural network so that it can better fit the training data, thereby improving the prediction accuracy. The photovoltaic labels in the photovoltaic data set represent the relative position of a certain photovoltaic value in the entire data set, while the photovoltaic labels in the predicted photovoltaic data set represent the prediction of the data characteristics of the entire data set. In this embodiment, in addition to the traditional comparison of loss values between values, it also includes the comparison of photovoltaic labels. Therefore, during the training process, the direction of training can be determined faster, the speed of training can be accelerated, and at the same time, it can be accurately Predicting photovoltaic labels can also better improve the overall data prediction effect, thereby improving the accuracy of the entire data.

将损失值反向传输至神经网络中,根据一定的规则和方法来更新权重的过程,该过程可采用梯度下降法、随机梯度下降法、牛顿法等。本实施例中使用梯度下降法,即通过计算预测光伏数据和训练光伏数据之间的均方误差作为损失函数,并求解损失函数对权重的偏导数作为梯度,然后按照梯度的反方向以一定的步长来更新权重。这个过程可以重复多次,直到损失函数达到最小值或者变化很小,即神经网络收敛。此时,神经网络的参数就确定了,也就得到了光伏预测模型。The process of reversely transmitting the loss value to the neural network and updating the weight according to certain rules and methods. This process can use the gradient descent method, stochastic gradient descent method, Newton method, etc. In this embodiment, the gradient descent method is used, that is, by calculating the mean square error between the predicted photovoltaic data and the training photovoltaic data as the loss function, and solving the partial derivative of the loss function with respect to the weight as the gradient, and then in the opposite direction of the gradient with a certain step size to update the weights. This process can be repeated multiple times until the loss function reaches the minimum value or changes very little, that is, the neural network converges. At this point, the parameters of the neural network are determined, and the photovoltaic prediction model is obtained.

利用已经训练好的光伏预测模型来对新的或者未来的环境数据进行光伏输出的预测。当前环境数据是指某一时刻或者某一时间段内的温度、辐射度、湿度、风速等。当前环境数据也需要进行模糊划分,得到当前环境数据集,包括若干对环境数据对。将当前环境数据集中的每一对环境数据对作为神经网络的输入,经过隐藏层和输出层的计算,得到当前光伏预测值。这些当前光伏预测值构成了当前光伏预测结果集,可以用于评估、分析或者控制光伏系统的性能和状态。Use already trained photovoltaic prediction models to predict photovoltaic output for new or future environmental data. Current environmental data refers to temperature, radiation, humidity, wind speed, etc. at a certain moment or within a certain period of time. The current environmental data also needs to be fuzzy divided to obtain the current environmental data set, including several pairs of environmental data. Each pair of environmental data in the current environmental data set is used as the input of the neural network, and through the calculation of the hidden layer and the output layer, the current photovoltaic prediction value is obtained. These current photovoltaic prediction values constitute the current photovoltaic prediction result set, which can be used to evaluate, analyze or control the performance and status of the photovoltaic system.

本发明通过获取训练数据、进行模糊划分、输入神经网络、进行参数调整、得到光伏预测模型、计算当前光伏预测值等,充分利用多源信息,结合环境因素,扩展输入维度,提高预测的准确性和可靠性。还能够发挥神经网络的非线性建模能力和模糊推理的人类智能特点,还原人类的直觉与思维,更好地捕获复杂非线性关系,提高预测的普适性和鲁棒性。最终实现更准确的光伏功率或发电量的预测,为光伏发电系统的功率调度和稳定供电提供重要支撑。This invention makes full use of multi-source information, combines environmental factors, expands the input dimension, and improves the accuracy of prediction by acquiring training data, performing fuzzy division, inputting into a neural network, performing parameter adjustment, obtaining a photovoltaic prediction model, calculating current photovoltaic prediction values, etc. and reliability. It can also give full play to the nonlinear modeling capabilities of neural networks and the human intelligence characteristics of fuzzy reasoning, restore human intuition and thinking, better capture complex nonlinear relationships, and improve the universality and robustness of predictions. Ultimately, more accurate predictions of photovoltaic power or power generation can be achieved, providing important support for power dispatching and stable power supply of photovoltaic power generation systems.

在另一种实现方式中,所述对所述训练环境数据进行模糊划分,得到训练环境数据集包括:In another implementation, the fuzzy division of the training environment data to obtain the training environment data set includes:

计算每一个所述训练环境数据对应的环境特征向量;Calculate the environment feature vector corresponding to each of the training environment data;

根据所述环境特征向量之间的相似度,对所述训练环境数据进行初分类,得到若干个初始环境聚类;According to the similarity between the environmental feature vectors, perform preliminary classification on the training environment data to obtain several initial environment clusters;

对所述初始环境聚类进行相似度计算,得到聚类相似度值;Perform similarity calculation on the initial environment clustering to obtain a clustering similarity value;

根据所述聚类相似度值,对所述初始环境聚类进行合并,并对合并后的初始环境聚类中的数据进行更新,直至所述初始环境聚类满足预设的停止标准,得到若干个目标环境聚类和所述目标环境聚类对应的环境标签;According to the cluster similarity value, the initial environment clusters are merged, and the data in the merged initial environment clusters are updated until the initial environment clusters meet the preset stopping criteria, and several A target environment cluster and an environment label corresponding to the target environment cluster;

根据所述目标环境聚类和所述环境标签,生成环境数据对。According to the target environment clustering and the environment label, an environment data pair is generated.

具体的,首先将所述训练环境数据转化为数值化的环境特征向量,以便后续进行相似度计算和聚类分析。此处转换为环境特征向量可采用前文中标准化的方式,计算环境特征向量的结果是一个矩阵,其中每一行代表一个训练环境数据,每一列代表一个特征维度。Specifically, the training environment data is first converted into a numerical environment feature vector for subsequent similarity calculation and cluster analysis. Here, the environment feature vector can be converted to the standardized method mentioned above. The result of calculating the environment feature vector is a matrix, in which each row represents a training environment data and each column represents a feature dimension.

然后根据所述环境特征向量之间的相似度,将相似的训练环境数据分为一组,形成初始环境聚类。相似度是一种衡量两个数据之间相似程度的数值,例如欧氏距离、余弦相似度。相似度越大,说明两个数据之间越可能是同一个类,因此根据相似度值,可对训练环境数据进行初分类,得到若干个初始环境聚类。初分类的数量可以根据预先设定相似度值阈值确定,也可以在分类之前指定。Then, based on the similarity between the environment feature vectors, similar training environment data are grouped into a group to form initial environment clustering. Similarity is a numerical value that measures the degree of similarity between two data, such as Euclidean distance and cosine similarity. The greater the similarity, the more likely it is that the two data are in the same class. Therefore, based on the similarity value, the training environment data can be initially classified and several initial environment clusters can be obtained. The number of initial classifications can be determined based on a preset similarity value threshold, or can be specified before classification.

然后根据所述初始环境聚类之间的相似度,得到聚类相似度值,以便后续进行合并操作。聚类相似度值是一种衡量两个聚类之间相似程度的数值,例如平均距离、最小距离。聚类相似度计算时可采用聚类中心、聚类边界、聚类内部分布等作为计算时采用的数值。Then, based on the similarity between the initial environment clusters, cluster similarity values are obtained for subsequent merging operations. The clustering similarity value is a value that measures the degree of similarity between two clusters, such as average distance and minimum distance. When calculating the clustering similarity, the cluster center, cluster boundary, cluster internal distribution, etc. can be used as the numerical values used in the calculation.

然后根据所述聚类相似度值,将相似度高于某个阈值的初始环境聚类合并为一个更大的聚类,并更新合并后的聚类中的数据和环境特征向量,以提高聚类质量和准确性。合并操作是将两个或多个聚类合并为一个聚类,更新操作是对合并后的聚类中的数据和环境特征向量进行重新计算或调整的操作,例如使用加权平均。预先设置一个停止标准,用于判断是否继续合并操作的条件,本实施例中可采用最大聚类个数、最大迭代次数作为停止标准。合并操作结束后得到的最终聚类即为目标环境聚类。对每一个目标环境聚类进行命名或编号,就得到每一个目标环境聚类对应的环境标签。Then according to the cluster similarity value, the initial environment clusters with similarity higher than a certain threshold are merged into a larger cluster, and the data and environment feature vectors in the merged cluster are updated to improve the clustering. Class quality and accuracy. The merge operation is to merge two or more clusters into one cluster, and the update operation is to recalculate or adjust the data and environment feature vectors in the merged clusters, such as using a weighted average. A stopping criterion is set in advance to determine whether to continue the merging operation. In this embodiment, the maximum number of clusters and the maximum number of iterations can be used as the stopping criterion. The final cluster obtained after the merging operation is completed is the target environment cluster. By naming or numbering each target environment cluster, the environment label corresponding to each target environment cluster is obtained.

得到目标环境聚类和环境标签后,即可生成环境数据对。环境数据对是一种由两个元素组成的数据结构,其中第一个元素是一个训练环境数据,第二个元素是该训练环境数据所属的目标环境聚类的环境标签。After obtaining the target environment clusters and environment labels, environment data pairs can be generated. An environment data pair is a data structure composed of two elements, where the first element is a training environment data, and the second element is the environment label of the target environment cluster to which the training environment data belongs.

通过类似的模糊划分,对训练光伏数据进行划分得到训练光伏数据集,具体包括:Through similar fuzzy division, the training photovoltaic data is divided to obtain the training photovoltaic data set, which specifically includes:

计算每一个所述训练光伏数据对应的光伏特征向量;Calculate the photovoltaic feature vector corresponding to each of the training photovoltaic data;

根据所述光伏特征向量之间的相似度,对所述训练光伏数据进行初分类,得到若干个初始光伏聚类;According to the similarity between the photovoltaic feature vectors, perform preliminary classification on the training photovoltaic data to obtain several initial photovoltaic clusters;

对所述初始光伏聚类进行相似度计算,得到聚类相似度值;Perform similarity calculation on the initial photovoltaic clustering to obtain a clustering similarity value;

根据所述聚类相似度值,对所述初始光伏聚类进行合并,并对合并后的初始光伏聚类中的数据进行更新,直至所述初始光伏聚类满足预设的停止标准,得到若干个目标光伏聚类和所述目标光伏聚类对应的光伏标签;According to the cluster similarity value, the initial photovoltaic clusters are merged, and the data in the merged initial photovoltaic clusters are updated until the initial photovoltaic clusters meet the preset stopping criteria, and several A target photovoltaic cluster and a photovoltaic label corresponding to the target photovoltaic cluster;

根据所述目标光伏聚类和所述光伏标签,生成光伏数据对。Photovoltaic data pairs are generated based on the target photovoltaic clustering and the photovoltaic tag.

上述实现方式,可以根据不同的环境特征、光伏特征和条件,动态地调整聚类的数量和范围,从而更好地反映出光伏发电的多样性和复杂性。根据聚类的相似度值,灵活地合并或分割聚类,也帮助捕捉出光伏发电的变化和趋势。The above implementation method can dynamically adjust the number and scope of clusters according to different environmental characteristics, photovoltaic characteristics and conditions, thereby better reflecting the diversity and complexity of photovoltaic power generation. Flexibly merging or splitting clusters based on their similarity values also helps capture changes and trends in photovoltaic power generation.

在另一种实现方式中,所述根据所述环境特征向量之间的相似度,对所述训练环境数据进行初分类,得到若干个初始环境聚类包括:In another implementation, the training environment data is initially classified according to the similarity between the environment feature vectors, and several initial environment clusters are obtained, including:

对所述环境特征向量进行拆分,得到所述环境特征向量对应的第一环境比较值和第二环境比较值;Split the environment feature vector to obtain the first environment comparison value and the second environment comparison value corresponding to the environment feature vector;

计算所述第一环境比较值之间的第一相似度;Calculate a first similarity between the first environment comparison values;

根据所述第一相似度,对所述环境特征向量进行划分,得到第一聚类;According to the first similarity, divide the environmental feature vector to obtain a first cluster;

计算所述第一聚类中所述第二环境比较值之间的第二相似度;Calculating a second degree of similarity between the second environment comparison values in the first cluster;

根据所述第二相似度,对所述环境特征向量进行划分,得到初始环境聚类。According to the second similarity, the environment feature vector is divided to obtain initial environment clustering.

具体的,环境特征向量分解为两个子向量,分别表示不同的环境属性。例如,如果环境特征向量是一个四维向量,表示温度、湿度、辐照度和风速等环境因素,那么可以将其拆分为两个二维向量,分别表示温湿度和辐风度。这样,可以根据不同的环境属性进行比较和聚类。Specifically, the environmental feature vector is decomposed into two sub-vectors, representing different environmental attributes respectively. For example, if the environmental feature vector is a four-dimensional vector representing environmental factors such as temperature, humidity, irradiance, and wind speed, it can be split into two two-dimensional vectors representing temperature, humidity, and radiance respectively. In this way, comparisons and clustering can be performed based on different environmental attributes.

计算每两个数据之间在第一环境比较值上的相似程度。相似度越高,表示两个数据在第一环境比较值上越接近。然后计算每两个数据之间在第二环境比较值上的相似程度。与前文“计算所述第一环境比较值之间的第一相似度”步骤类似,也可以用不同的度量方法来计算相似度。不同的是,这里只需要计算同一类别内的数据之间的相似度,而不需要考虑不同类别之间的相似度。Calculate the degree of similarity between each two data on the first environment comparison value. The higher the similarity, the closer the two data are in the first environment comparison value. Then calculate the degree of similarity between each two data on the second environment comparison value. Similar to the previous step of "calculating the first similarity between the first environment comparison values", different measurement methods can also be used to calculate the similarity. The difference is that here only the similarity between data within the same category needs to be calculated, without considering the similarity between different categories.

根据第二相似度将数据进一步细分为更小的类别,使得同一类别内的数据在第二环境比较值上也相似度高,而不同类别之间的数据在第二环境比较值上也相似度低。这样,可以将数据按照第二环境比较值上的次要差异进行分类。最终得到基于环境特征向量的初始环境聚类。The data is further divided into smaller categories according to the second similarity, so that the data within the same category are also similar in the second environment comparison value, and the data between different categories are also similar in the second environment comparison value. Degree is low. This way, the data can be sorted by minor differences in the comparison values of the second environment. Finally, the initial environment clustering based on the environment feature vector is obtained.

通过类似的聚类方法,可对光伏特征向量进行初始分类,得到初始光伏聚类,具体包括:Through a similar clustering method, the photovoltaic feature vectors can be initially classified to obtain the initial photovoltaic clustering, which specifically includes:

对所述光伏特征向量进行拆分,得到所述光伏特征向量对应的第一光伏比较值和第二光伏比较值;Split the photovoltaic feature vector to obtain the first photovoltaic comparison value and the second photovoltaic comparison value corresponding to the photovoltaic feature vector;

计算所述第一光伏比较值之间的第一相似度;Calculating a first degree of similarity between the first photovoltaic comparison values;

根据所述第一相似度,对所述光伏特征向量进行划分,得到第一聚类;According to the first similarity, divide the photovoltaic feature vector to obtain a first cluster;

计算所述第一聚类中所述第二光伏比较值之间的第二相似度;calculating a second degree of similarity between the second photovoltaic comparison values in the first cluster;

根据所述第二相似度,对所述光伏特征向量进行划分,得到初始光伏聚类。According to the second similarity, the photovoltaic feature vector is divided to obtain initial photovoltaic clustering.

在另一种实现方式中,在所述获取训练环境数据和训练光伏数据之前,还包括:In another implementation, before obtaining the training environment data and the training photovoltaic data, the method further includes:

获取历史环境数据、更新环境数据、历史光伏数据和更新光伏数据;Obtain historical environmental data, update environmental data, historical photovoltaic data and update photovoltaic data;

根据预设的更新周期,对所述更新环境数据和历史环境数据进行抽选,得到训练环境数据;以及,According to the preset update cycle, the updated environment data and historical environment data are selected to obtain training environment data; and,

对所述历史光伏数据和所述更新光伏数据进行抽选,得到训练光伏数据。The historical photovoltaic data and the updated photovoltaic data are selected to obtain training photovoltaic data.

具体的,从不同的数据源收集相关的数据,例如气象站、卫星、传感器等。历史环境数据是指过去一段时间内的环境数据,包括影响光伏发电的因素,例如温度、湿度、风速、辐射。更新环境数据是指最近采集的环境数据。历史光伏数据是指太阳能发电系统的输出功率或电量,更新光伏数据是指最近采集的光伏数据。Specifically, relevant data is collected from different data sources, such as weather stations, satellites, sensors, etc. Historical environmental data refers to environmental data in the past period, including factors that affect photovoltaic power generation, such as temperature, humidity, wind speed, and radiation. Updated environmental data refers to the most recently collected environmental data. Historical photovoltaic data refers to the output power or electricity of the solar power generation system, and updated photovoltaic data refers to the most recently collected photovoltaic data.

随着时间推移,历史环境数据并不一定适用现有的环境,因此需要对历史环境数据、更新环境数据、历史光伏数据和更新光伏数据进行抽选,选出近期合适用于训练的训练环境数据和训练光伏数据。As time goes by, historical environmental data may not necessarily be applicable to the existing environment. Therefore, it is necessary to select historical environmental data, updated environmental data, historical photovoltaic data and updated photovoltaic data to select training environment data suitable for training in the near future. and training PV data.

更新周期是指抽取的数据分布的时间范围。例如每周、每月或每季度。抽选方法可以根据不同的目标和条件选择,例如随机抽样、分层抽样或分组抽样等。根据更新周期,可抽选得到训练环境数据和训练光伏数据,增加后续训练得到的光伏预测模型的自适应性。The update period refers to the time range of the extracted data distribution. For example weekly, monthly or quarterly. The selection method can be selected according to different objectives and conditions, such as random sampling, stratified sampling or group sampling, etc. According to the update cycle, training environment data and training photovoltaic data can be selected to increase the adaptability of the photovoltaic prediction model obtained by subsequent training.

在另一种实现方式中,所述根据预设的更新周期,对所述更新环境数据和历史环境数据进行抽选,得到训练环境数据包括:In another implementation, selecting the updated environment data and historical environment data according to a preset update cycle to obtain training environment data includes:

根据所述更新周期,确定所述更新环境数据和所述历史环境数据中的候选环境数据;According to the update cycle, determine the candidate environment data among the updated environment data and the historical environment data;

将所述候选环境数据与候选环境时间对应的参考环境数据进行比较,确定所述候选环境数据中的异常值,其中,所述候选环境时间为与所述候选环境数据对应的时间;Compare the candidate environment data with reference environment data corresponding to the candidate environment time, and determine outliers in the candidate environment data, where the candidate environment time is the time corresponding to the candidate environment data;

根据所述异常值和所述候选环境时间,对所述候选环境数据进行调整,得到训练环境数据。According to the abnormal value and the candidate environment time, the candidate environment data is adjusted to obtain training environment data.

具体的,更新环境数据和历史环境数据都存在每一个环境数据对应的时刻,因此可根据更新周期中时间范围,确定所述更新环境数据和所述历史环境数据中的候选环境数据。例如更新环境数据对应为一周,更新周围为两周,则从历史环境数据中抽出最近的一周数据作为候选环境数据。Specifically, both the updated environment data and the historical environment data exist at a time corresponding to each environment data. Therefore, the candidate environment data in the updated environment data and the historical environment data can be determined according to the time range in the update cycle. For example, if the updated environment data corresponds to one week and the surrounding area is updated to two weeks, then the most recent week of data is extracted from the historical environment data as candidate environment data.

候选环境数据对应的时间段即为候选环境时间,将候选环境时间对应的历史环境数据进行比较,即可得到波动值。例如候选环境数据对应的时间为7月1日到7月31日,则将去年、前年的历史环境数据作为与其对应的参考环境数据,也可将6月1日至6月30日对应的环境数据作为参考环境数据。根据候选环境数据与参考环境数据,可确定候选环境数据中的异常值。异常值是指与参考环境数据相比,偏离正常范围的候选环境数据。例如,如果候选环境数据中的温度比参考环境数据中的温度高出或低于一定的阈值,那么这个温度就是一个异常值。The time period corresponding to the candidate environment data is the candidate environment time. By comparing the historical environment data corresponding to the candidate environment time, the fluctuation value can be obtained. For example, if the candidate environmental data corresponds to the period from July 1 to July 31, the historical environmental data of last year and the year before that can be used as the corresponding reference environmental data, or the environment corresponding to June 1 to June 30 can be used. data as reference environmental data. Based on the candidate environment data and the reference environment data, outliers in the candidate environment data can be determined. Outliers refer to candidate environmental data that deviate from the normal range compared with reference environmental data. For example, if the temperature in the candidate environment data is higher or lower than the temperature in the reference environment data by a certain threshold, then this temperature is an outlier.

预先设定一个合理的阈值,用于判断候选环境数据与参考环境数据之间的差异是否超过正常范围。阈值的选择可以根据不同的环境因素和数据特征来确定。例如使用统计方法,如均值、标准差、分位数等,来计算参考环境数据的中心趋势和离散程度,然后根据一定的倍数或比例来确定阈值。将候选环境数据与参考环境数据进行比较,找出那些超过阈值的候选环境数据,并将它们标记为异常值。A reasonable threshold is set in advance to determine whether the difference between the candidate environment data and the reference environment data exceeds the normal range. The selection of threshold can be determined based on different environmental factors and data characteristics. For example, statistical methods such as mean, standard deviation, quantile, etc. are used to calculate the central trend and degree of dispersion of reference environmental data, and then the threshold is determined based on a certain multiple or proportion. Compare the candidate environment data with the reference environment data, find those candidate environment data that exceed the threshold, and mark them as outliers.

排除异常值后候选环境数据的数量会减少,因此基于更新周期,在抽选的历史环境数据之前再选择一些环境数据,以使得最后选择的环境数据的数量与更新周期对应的环境数据的数量相同。在增加历史环境数据的过程中,也会进行异常值检测,以保证训练环境数据中的数据准确。After excluding outliers, the number of candidate environmental data will be reduced. Therefore, based on the update period, some environmental data are selected before the selected historical environmental data, so that the number of finally selected environmental data is the same as the number of environmental data corresponding to the update period. . In the process of adding historical environment data, outlier detection will also be performed to ensure that the data in the training environment data is accurate.

得到训练光伏数据的方式与之相类似,包括:The method of obtaining training photovoltaic data is similar, including:

根据所述更新周期,确定所述更新光伏数据和所述历史光伏数据中的候选光伏数据;Determine candidate photovoltaic data in the updated photovoltaic data and the historical photovoltaic data according to the update cycle;

将所述候选光伏数据与候选光伏时间对应的参考光伏数据进行比较,确定所述候选光伏数据中的异常值,其中,所述候选光伏时间为与所述候选光伏数据对应的时间;Compare the candidate photovoltaic data with the reference photovoltaic data corresponding to the candidate photovoltaic time, and determine the abnormal values in the candidate photovoltaic data, wherein the candidate photovoltaic time is the time corresponding to the candidate photovoltaic data;

根据所述异常值和所述候选光伏时间,对所述候选光伏数据进行调整,得到训练光伏数据。According to the abnormal value and the candidate photovoltaic time, the candidate photovoltaic data is adjusted to obtain training photovoltaic data.

在另一种实现方式中,所述将所述候选环境数据与候选环境时间对应的参考环境数据进行比较,确定所述候选环境数据中的异常值包括:In another implementation, comparing the candidate environment data with the reference environment data corresponding to the candidate environment time, and determining the abnormal values in the candidate environment data includes:

基于所述参考环境数据,确定预测参数;Based on the reference environmental data, determine prediction parameters;

根据所述参考环境数据和所述预测参数,生成环境预测模型;Generate an environment prediction model based on the reference environment data and the prediction parameters;

基于所述环境预测模型,计算所述候选环境时间对应的预测环境数据;Based on the environment prediction model, calculate the predicted environment data corresponding to the candidate environment time;

对所述预测环境数据和所述候选环境数据进行比较,确定所述候选环境数据中的异常值。The predicted environment data and the candidate environment data are compared to determine outliers in the candidate environment data.

具体的,对参考环境数据进行差分处理,以消除数据中的趋势和季节性因素,使之成为平稳序列。差分处理的次数和阶数可以根据数据的特点和需要进行选择。然后,计算该参考环境数据对应的预测参数,以采用ARIMA模型为例,预测参数包括自回归项(p)、滑动平均项(q)和差分次数(d)。然后根据参考环境数据和预测参数,生成环境预测模型。仍以ARIMA模型为例,由于ARIMA模型的基本结构已知,因此将参考环境数据和预测参数代入模型的基本结构中,即可得到环境预测模型,并检验环境预测模型的拟合效果和残差分布。如果环境预测模型不符合数据的特征或存在显著的残差相关性,则需要重新调整参数。在环境预测模型的基础上,可计算候选环境时间对应的预测环境数据。例如将所述候选环境时间输入已拟合的环境预测模型中,得到相应的预测环境数据。Specifically, differential processing is performed on the reference environmental data to eliminate trends and seasonal factors in the data and make it a stationary sequence. The number and order of differential processing can be selected according to the characteristics and needs of the data. Then, calculate the prediction parameters corresponding to the reference environmental data. Taking the ARIMA model as an example, the prediction parameters include the autoregressive term (p), the moving average term (q) and the number of differences (d). Then an environmental prediction model is generated based on the reference environmental data and prediction parameters. Still taking the ARIMA model as an example, since the basic structure of the ARIMA model is known, the environmental prediction model can be obtained by substituting the reference environmental data and prediction parameters into the basic structure of the model, and testing the fitting effect and residuals of the environmental prediction model. distributed. If the environmental prediction model does not fit the characteristics of the data or there are significant residual correlations, the parameters need to be re-tuned. Based on the environment prediction model, the predicted environment data corresponding to the candidate environment time can be calculated. For example, the candidate environment time is input into a fitted environment prediction model to obtain corresponding predicted environment data.

对所述预测环境数据和所述候选环境数据进行比较,确定所述候选环境数据中的异常值。比较的方法可以有多种,例如计算两者之间的差异、比例、相关性等。The predicted environment data and the candidate environment data are compared to determine outliers in the candidate environment data. There can be many methods of comparison, such as calculating the difference, ratio, correlation, etc. between the two.

在另一种实现方式中,所述神经网络包括输入层、隐藏层和输出层,所述隐藏层包含若干个计算节点和模糊函数,所述将所述训练环境数据集输入至预设的神经网络中,并控制所述神经网络对所述训练环境数据集进行预测,得到所述训练环境数据集对应的预测光伏数据集包括:In another implementation, the neural network includes an input layer, a hidden layer and an output layer. The hidden layer includes several computing nodes and fuzzy functions. The training environment data set is input to a preset neural network. network, and control the neural network to predict the training environment data set, and obtain the predicted photovoltaic data set corresponding to the training environment data set including:

将所述训练环境数据集输入至所述输入层,并控制所述输入层将所述训练环境数据集传输至所述计算节点;Input the training environment data set to the input layer, and control the input layer to transmit the training environment data set to the computing node;

控制每一个所述计算节点对所述训练环境数据集进行计算,得到对应的初始值;Control each of the computing nodes to calculate the training environment data set and obtain the corresponding initial value;

将所述初始值输入所述模糊函数,并控制所述模糊函数对所述初始值进行模糊计算,得到预测光伏数据;Input the initial value into the fuzzy function, and control the fuzzy function to perform fuzzy calculation on the initial value to obtain predicted photovoltaic data;

控制所述预测光伏数据传输至所述输出层,并控制所述输出层输出。Control the transmission of the predicted photovoltaic data to the output layer, and control the output layer to output.

具体的,先将训练环境数据集转换为适合神经网络处理的格式,并将其分配给不同的计算节点。计算节点是神经网络中执行特定运算的单元,通常由多个神经元组成。预先定义输入层的结构,例如输入层有多少个神经元,每个神经元接收多少个特征值,以及输入层与计算节点之间的连接方式。Specifically, the training environment data set is first converted into a format suitable for neural network processing and distributed to different computing nodes. A computing node is a unit that performs specific operations in a neural network and is usually composed of multiple neurons. Define the structure of the input layer in advance, such as how many neurons the input layer has, how many feature values each neuron receives, and how the input layer is connected to the computing nodes.

然后,需要对环境数据集进行预处理,例如归一化、标准化、缺失值处理等,以便输入层能够正确地接收和解析数据,并传输至计算节点。Then, the environmental data set needs to be preprocessed, such as normalization, normalization, missing value handling, etc., so that the input layer can correctly receive and parse the data and transmit it to the computing node.

然后让计算节点根据输入层传来的数据进行相应的运算,从而得到初始值。初始值是指计算节点输出的未经激活函数处理的数值。预先定义计算节点的结构,包括计算节点有多少个神经元,每个神经元有多少个权重和偏置,以及计算节点之间的连接方式等。此外,还需要定义计算节点的运算方式,例如使用加权和、矩阵乘法、卷积等方法。本实施例的计算节点的运算方式优先选用加权求和。再将初始值通过模糊函数转换为预测光伏数据。模糊函数是指能够处理不确定性和模糊性的数学函数。预先设置模糊函数的类型,包括使用模糊逻辑、模糊集合、模糊规则等,以及模糊函数的参数,例如使用隶属度函数、模糊运算符、推理机制。Then let the computing node perform corresponding operations based on the data from the input layer to obtain the initial value. The initial value refers to the value output by the calculation node that has not been processed by the activation function. Define the structure of the computing node in advance, including how many neurons the computing node has, how many weights and biases each neuron has, and how the computing nodes are connected. In addition, it is also necessary to define the operation method of the calculation node, such as using weighted sum, matrix multiplication, convolution and other methods. The calculation method of the computing node in this embodiment is preferably weighted summation. The initial value is then converted into predicted photovoltaic data through a fuzzy function. Fuzzy functions refer to mathematical functions that can handle uncertainty and ambiguity. Preset the type of fuzzy function, including the use of fuzzy logic, fuzzy sets, fuzzy rules, etc., as well as the parameters of the fuzzy function, such as the use of membership functions, fuzzy operators, and inference mechanisms.

最后,将预测光伏数据从模糊函数传输至输出层,并由输出层显示或保存。输出层是神经网络中负责输出最终结果的层。设置输出层有神经元的数量、输出层与模糊函数之间的连接方式等。Finally, the predicted PV data are transferred from the fuzzy function to the output layer and displayed or saved by the output layer. The output layer is the layer in the neural network responsible for outputting the final result. Setting the output layer includes the number of neurons, the connection method between the output layer and the fuzzy function, etc.

最后定义输出层的输出方式,如反归一化、反标准化。控制输出层输出数据。Finally, define the output method of the output layer, such as denormalization and denormalization. Control the output layer output data.

该方式利用模糊函数来处理不确定性和模糊性,从而提高了预测的准确性和鲁棒性。通过模糊理论和神经网络技术的结合,提高了光伏预测的准确性和自适应性。This method uses fuzzy functions to deal with uncertainty and ambiguity, thereby improving the accuracy and robustness of predictions. Through the combination of fuzzy theory and neural network technology, the accuracy and adaptability of photovoltaic prediction are improved.

参考图2,下面对本发明提供的基于模糊推理的光伏发电预测装置进行描述,下文描述的基于模糊推理的光伏发电预测装置与上文描述的基于模糊推理的光伏发电预测方法可相互对应参照。装置包括获取模块210、划分模块220、输入模块230、调整模块240和预测模块250。Referring to FIG. 2 , the photovoltaic power generation prediction device based on fuzzy reasoning provided by the present invention is described below. The photovoltaic power generation prediction device based on fuzzy reasoning described below and the photovoltaic power generation prediction method based on fuzzy reasoning described above can correspond to each other. The apparatus includes an acquisition module 210, a partitioning module 220, an input module 230, an adjustment module 240 and a prediction module 250.

获取模块210用于获取训练环境数据和训练光伏数据;The acquisition module 210 is used to acquire training environment data and training photovoltaic data;

划分模块220用于对所述训练环境数据进行模糊划分,得到训练环境数据集,对所述训练光伏数据进行模糊划分,得到训练光伏数据集,所述训练环境数据集包括若干对环境数据对,所述环境数据对包括训练环境数据值和每一个所述训练环境数据值对应的环境标签,所述训练光伏数据集包括若干对光伏数据对,所述光伏数据对包括训练光伏数据值和每一个所述训练光伏数据值对应的光伏标签;The division module 220 is used to perform fuzzy division on the training environment data to obtain a training environment data set, and perform fuzzy division on the training photovoltaic data to obtain a training photovoltaic data set. The training environment data set includes several pairs of environmental data pairs, The environmental data pairs include training environment data values and environmental labels corresponding to each training environment data value. The training photovoltaic data set includes several pairs of photovoltaic data pairs. The photovoltaic data pairs include training photovoltaic data values and each The photovoltaic tag corresponding to the training photovoltaic data value;

输入模块230用于将所述训练环境数据集输入至预设的神经网络中,并控制所述神经网络对所述训练环境数据集进行预测,得到所述训练环境数据集对应的预测光伏数据集,所述神经网络中包括模糊函数;The input module 230 is used to input the training environment data set into a preset neural network, and control the neural network to predict the training environment data set to obtain a predicted photovoltaic data set corresponding to the training environment data set. , the neural network includes a fuzzy function;

调整模块240用于根据所述预测光伏数据集和所述训练光伏数据集,对所述神经网络进行参数调整,直至所述神经网络收敛,得到光伏预测模型;The adjustment module 240 is configured to adjust parameters of the neural network according to the predicted photovoltaic data set and the training photovoltaic data set until the neural network converges to obtain a photovoltaic prediction model;

预测模块250用于当获取当前环境数据时,基于所述光伏预测模型,计算所述当前环境数据对应的当前光伏预测值。The prediction module 250 is configured to calculate the current photovoltaic prediction value corresponding to the current environmental data based on the photovoltaic prediction model when current environmental data is obtained.

图3示例了一种电子设备的实体结构示意图,如图3所示,该电子设备可以包括:处理器(processor)310、通信接口(Communications Interface)320、存储器(memory)330和通信总线340,其中,处理器310,通信接口320,存储器330通过通信总线340完成相互间的通信。处理器310可以调用存储器330中的逻辑指令,以执行基于模糊推理的光伏发电预测方法,该方法包括:Figure 3 illustrates a schematic diagram of the physical structure of an electronic device. As shown in Figure 3, the electronic device may include: a processor (processor) 310, a communications interface (Communications Interface) 320, a memory (memory) 330 and a communication bus 340. Among them, the processor 310, the communication interface 320, and the memory 330 complete communication with each other through the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute a photovoltaic power generation prediction method based on fuzzy reasoning, which method includes:

获取训练环境数据和训练光伏数据;Obtain training environment data and training photovoltaic data;

对所述训练环境数据进行模糊划分,得到训练环境数据集,对所述训练光伏数据进行模糊划分,得到训练光伏数据集,所述训练环境数据集包括若干对环境数据对,所述环境数据对包括训练环境数据值和每一个所述训练环境数据值对应的环境标签,所述训练光伏数据集包括若干对光伏数据对,所述光伏数据对包括训练光伏数据值和每一个所述训练光伏数据值对应的光伏标签;Fuzzy division is performed on the training environment data to obtain a training environment data set. Fuzzy division is performed on the training photovoltaic data to obtain a training photovoltaic data set. The training environment data set includes several pairs of environmental data. The pairs of environmental data are including training environment data values and environment labels corresponding to each training environment data value; the training photovoltaic data set includes several pairs of photovoltaic data pairs; the photovoltaic data pairs include training photovoltaic data values and each of the training photovoltaic data The photovoltaic tag corresponding to the value;

将所述训练环境数据集输入至预设的神经网络中,并控制所述神经网络对所述训练环境数据集进行预测,得到所述训练环境数据集对应的预测光伏数据集,所述神经网络中包括模糊函数;The training environment data set is input into a preset neural network, and the neural network is controlled to predict the training environment data set to obtain a predicted photovoltaic data set corresponding to the training environment data set. The neural network Includes fuzzy functions;

根据所述预测光伏数据集和所述训练光伏数据集,对所述神经网络进行参数调整,直至所述神经网络收敛,得到光伏预测模型;According to the predicted photovoltaic data set and the training photovoltaic data set, adjust parameters of the neural network until the neural network converges to obtain a photovoltaic prediction model;

当获取当前环境数据时,基于所述光伏预测模型,计算所述当前环境数据对应的当前光伏预测值。When current environmental data is obtained, the current photovoltaic prediction value corresponding to the current environmental data is calculated based on the photovoltaic prediction model.

此外,上述的存储器330中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, the above-mentioned logical instructions in the memory 330 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code. .

又一方面,本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现以执行上述各方法提供的基于模糊推理的光伏发电预测方法,该方法包括:In another aspect, the present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored, which is implemented when executed by a processor to execute the fuzzy inference-based photovoltaic power generation prediction method provided by the above methods. , the method includes:

获取训练环境数据和训练光伏数据;Obtain training environment data and training photovoltaic data;

对所述训练环境数据进行模糊划分,得到训练环境数据集,对所述训练光伏数据进行模糊划分,得到训练光伏数据集,所述训练环境数据集包括若干对环境数据对,所述环境数据对包括训练环境数据值和每一个所述训练环境数据值对应的环境标签,所述训练光伏数据集包括若干对光伏数据对,所述光伏数据对包括训练光伏数据值和每一个所述训练光伏数据值对应的光伏标签;Fuzzy division is performed on the training environment data to obtain a training environment data set. Fuzzy division is performed on the training photovoltaic data to obtain a training photovoltaic data set. The training environment data set includes several pairs of environmental data. The pairs of environmental data are including training environment data values and environment labels corresponding to each training environment data value; the training photovoltaic data set includes several pairs of photovoltaic data pairs; the photovoltaic data pairs include training photovoltaic data values and each of the training photovoltaic data The photovoltaic tag corresponding to the value;

将所述训练环境数据集输入至预设的神经网络中,并控制所述神经网络对所述训练环境数据集进行预测,得到所述训练环境数据集对应的预测光伏数据集,所述神经网络中包括模糊函数;The training environment data set is input into a preset neural network, and the neural network is controlled to predict the training environment data set to obtain a predicted photovoltaic data set corresponding to the training environment data set. The neural network Includes fuzzy functions;

根据所述预测光伏数据集和所述训练光伏数据集,对所述神经网络进行参数调整,直至所述神经网络收敛,得到光伏预测模型;According to the predicted photovoltaic data set and the training photovoltaic data set, adjust parameters of the neural network until the neural network converges to obtain a photovoltaic prediction model;

当获取当前环境数据时,基于所述光伏预测模型,计算所述当前环境数据对应的当前光伏预测值。When current environmental data is obtained, the current photovoltaic prediction value corresponding to the current environmental data is calculated based on the photovoltaic prediction model.

以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in One location, or it can be distributed across multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Persons of ordinary skill in the art can understand and implement the method without any creative effort.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the part of the above technical solution that essentially contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disc, optical disk, etc., including a number of instructions to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or certain parts of the embodiments.

最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still be used Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent substitutions are made to some of the technical features; however, these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A photovoltaic power generation prediction method based on fuzzy reasoning is characterized by comprising the following steps:
acquiring training environment data and training photovoltaic data;
performing fuzzy division on the training environment data to obtain a training environment data set, performing fuzzy division on the training photovoltaic data to obtain a training photovoltaic data set, wherein the training environment data set comprises a plurality of pairs of environment data pairs, each pair of environment data comprises a training environment data value and an environment label corresponding to each training environment data value, the training photovoltaic data set comprises a plurality of pairs of photovoltaic data, and each pair of photovoltaic data comprises a training photovoltaic data value and a photovoltaic label corresponding to each training photovoltaic data value;
Inputting the training environment data set into a preset neural network, and controlling the neural network to predict the training environment data set to obtain a predicted photovoltaic data set corresponding to the training environment data set, wherein the neural network comprises a fuzzy function;
according to the predicted photovoltaic data set and the training photovoltaic data set, parameter adjustment is carried out on the neural network until the neural network converges, and a photovoltaic prediction model is obtained;
when current environment data are acquired, calculating a current photovoltaic predicted value corresponding to the current environment data based on the photovoltaic predicted model;
the performing fuzzy division on the training environment data to obtain a training environment data set comprises:
calculating an environment characteristic vector corresponding to each training environment data;
according to the similarity between the environment feature vectors, primarily classifying the training environment data to obtain a plurality of initial environment clusters;
performing similarity calculation on the initial environment clusters to obtain cluster similarity values;
combining the initial environment clusters according to the cluster similarity value, and updating the data in the combined initial environment clusters until the initial environment clusters meet a preset stopping standard to obtain a plurality of target environment clusters and environment labels corresponding to the target environment clusters;
Generating an environment data pair according to the target environment cluster and the environment label;
the step of performing fuzzy division on the training photovoltaic data to obtain a training photovoltaic data set comprises the following steps: calculating a photovoltaic sign vector corresponding to each piece of training photovoltaic data;
according to the similarity between the photovoltaic sign vectors, primarily classifying the training photovoltaic data to obtain a plurality of initial lights Fu Julei;
performing similarity calculation on the initial photovoltaic clusters to obtain cluster similarity values;
combining the initial photovoltaic clusters according to the cluster similarity value, and updating the data in the combined initial photovoltaic clusters until the initial photovoltaic clusters meet a preset stopping standard to obtain a plurality of target photovoltaic clusters and photovoltaic labels corresponding to the target photovoltaic clusters;
generating a photovoltaic data pair according to the target photovoltaic cluster and the photovoltaic label;
the initial classification of the training environment data according to the similarity between the environment feature vectors, and the obtaining of a plurality of initial environment clusters comprises:
splitting the environment feature vector to obtain a first environment comparison value and a second environment comparison value corresponding to the environment feature vector;
Calculating a first similarity between the first environmental comparison values;
dividing the environmental feature vectors according to the first similarity to obtain a first cluster;
calculating a second similarity between the second environmental comparison values in the first cluster;
dividing the environment feature vector according to the second similarity to obtain an initial environment cluster;
the training photovoltaic data is initially classified according to the similarity between the photovoltaic sign vectors to obtain a plurality of initial photovoltaic clusters, including:
splitting the photovoltaic sign vector to obtain a first photovoltaic comparison value and a second photovoltaic comparison value corresponding to the photovoltaic sign vector;
calculating a third similarity between the first photovoltaic comparison values;
dividing the photovoltaic sign vector according to the third similarity to obtain a second cluster;
calculating a fourth similarity between the second photovoltaic comparison values in the second clusters;
and dividing the photovoltaic sign vector according to the fourth similarity to obtain an initial photovoltaic cluster.
2. The fuzzy inference based photovoltaic power generation prediction method of claim 1, further comprising, prior to the acquiring the training environment data and the training photovoltaic data:
Acquiring historical environment data, updated environment data, historical photovoltaic data and updated photovoltaic data;
according to a preset updating period, the updating environment data and the historical environment data are decimated to obtain training environment data; the method comprises the steps of,
and decimating the historical photovoltaic data and the updated photovoltaic data to obtain training photovoltaic data.
3. The fuzzy inference-based photovoltaic power generation prediction method according to claim 2, wherein the decimating the updated environmental data and the historical environmental data according to a preset update period to obtain training environmental data includes:
determining candidate environmental data in the updated environmental data and the historical environmental data according to the updating period;
comparing the candidate environment data with reference environment data corresponding to candidate environment time, and determining an abnormal value in the candidate environment data, wherein the candidate environment time is the time corresponding to the candidate environment data;
and adjusting the candidate environment data according to the abnormal value and the candidate environment time to obtain training environment data.
4. The fuzzy inference-based photovoltaic power generation prediction method of claim 3, wherein the comparing the candidate environmental data with reference environmental data corresponding to a candidate environmental time, determining an outlier in the candidate environmental data comprises:
Determining a prediction parameter based on the reference environmental data;
generating an environment prediction model according to the reference environment data and the prediction parameters;
generating predicted environment data corresponding to the candidate environment time based on the environment prediction model;
comparing the predicted environment data with the candidate environment data, and determining an abnormal value in the candidate environment data.
5. The photovoltaic power generation prediction method based on fuzzy inference according to any one of claims 1 to 4, wherein the inputting the training environment data set into a preset neural network, and controlling the neural network to predict the training environment data set, to obtain a predicted photovoltaic data set corresponding to the training environment data set includes:
inputting the training environment data set to an input layer of the neural network, and controlling the input layer to transmit the training environment data set to a hidden layer of the neural network;
controlling each computing node in the hidden layer to compute the training environment data set to obtain a corresponding initial value;
inputting the initial value into the fuzzy function, and controlling the fuzzy function to perform fuzzy calculation on the initial value to obtain predicted photovoltaic data;
And controlling the predicted photovoltaic data to be transmitted to an output layer of the neural network, and controlling the output layer to output.
6. A photovoltaic power generation prediction device based on fuzzy reasoning is characterized by comprising:
the acquisition module is used for acquiring training environment data and training photovoltaic data;
the system comprises a dividing module, a fuzzy dividing module and a fuzzy dividing module, wherein the dividing module is used for carrying out fuzzy dividing on training environment data to obtain a training environment data set and carrying out fuzzy dividing on the training photovoltaic data to obtain a training photovoltaic data set, the training environment data set comprises a plurality of pairs of environment data pairs, the environment data pairs comprise training environment data values and environment labels corresponding to each training environment data value, the training photovoltaic data set comprises a plurality of pairs of photovoltaic data, and the photovoltaic data pairs comprise training photovoltaic data values and photovoltaic labels corresponding to each training photovoltaic data value;
the input module is used for inputting the training environment data set into a preset neural network, controlling the neural network to predict the training environment data set, and obtaining a predicted photovoltaic data set corresponding to the training environment data set, wherein the neural network comprises a fuzzy function;
The adjustment module is used for carrying out parameter adjustment on the neural network according to the predicted photovoltaic data set and the training photovoltaic data set until the neural network converges to obtain a photovoltaic prediction model;
the prediction module is used for calculating a current photovoltaic predicted value corresponding to the current environment data based on the photovoltaic predicted model when the current environment data are acquired;
the performing fuzzy division on the training environment data to obtain a training environment data set comprises:
calculating an environment characteristic vector corresponding to each training environment data;
according to the similarity between the environment feature vectors, primarily classifying the training environment data to obtain a plurality of initial environment clusters;
performing similarity calculation on the initial environment clusters to obtain cluster similarity values;
combining the initial environment clusters according to the cluster similarity value, and updating the data in the combined initial environment clusters until the initial environment clusters meet a preset stopping standard to obtain a plurality of target environment clusters and environment labels corresponding to the target environment clusters;
generating an environment data pair according to the target environment cluster and the environment label;
The step of performing fuzzy division on the training photovoltaic data to obtain a training photovoltaic data set comprises the following steps: calculating a photovoltaic sign vector corresponding to each piece of training photovoltaic data;
according to the similarity between the photovoltaic sign vectors, primarily classifying the training photovoltaic data to obtain a plurality of initial lights Fu Julei;
performing similarity calculation on the initial photovoltaic clusters to obtain cluster similarity values;
combining the initial photovoltaic clusters according to the cluster similarity value, and updating the data in the combined initial photovoltaic clusters until the initial photovoltaic clusters meet a preset stopping standard to obtain a plurality of target photovoltaic clusters and photovoltaic labels corresponding to the target photovoltaic clusters;
generating a photovoltaic data pair according to the target photovoltaic cluster and the photovoltaic label;
the initial classification of the training environment data according to the similarity between the environment feature vectors, and the obtaining of a plurality of initial environment clusters comprises:
splitting the environment feature vector to obtain a first environment comparison value and a second environment comparison value corresponding to the environment feature vector;
calculating a first similarity between the first environmental comparison values;
Dividing the environmental feature vectors according to the first similarity to obtain a first cluster;
calculating a second similarity between the second environmental comparison values in the first cluster;
dividing the environment feature vector according to the second similarity to obtain an initial environment cluster;
the training photovoltaic data is initially classified according to the similarity between the photovoltaic sign vectors to obtain a plurality of initial photovoltaic clusters, including:
splitting the photovoltaic sign vector to obtain a first photovoltaic comparison value and a second photovoltaic comparison value corresponding to the photovoltaic sign vector;
calculating a third similarity between the first photovoltaic comparison values;
dividing the photovoltaic sign vector according to the third similarity to obtain a second cluster;
calculating a fourth similarity between the second photovoltaic comparison values in the second clusters;
and dividing the photovoltaic sign vector according to the fourth similarity to obtain an initial photovoltaic cluster.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the fuzzy inference based photovoltaic power generation prediction method of any of claims 1 to 5 when the computer program is executed by the processor.
8. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the fuzzy inference based photovoltaic power generation prediction method of any of claims 1 to 5.
CN202310997292.XA 2023-08-09 2023-08-09 Photovoltaic power generation prediction method and related equipment based on fuzzy reasoning Active CN116706907B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310997292.XA CN116706907B (en) 2023-08-09 2023-08-09 Photovoltaic power generation prediction method and related equipment based on fuzzy reasoning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310997292.XA CN116706907B (en) 2023-08-09 2023-08-09 Photovoltaic power generation prediction method and related equipment based on fuzzy reasoning

Publications (2)

Publication Number Publication Date
CN116706907A CN116706907A (en) 2023-09-05
CN116706907B true CN116706907B (en) 2024-01-23

Family

ID=87831625

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310997292.XA Active CN116706907B (en) 2023-08-09 2023-08-09 Photovoltaic power generation prediction method and related equipment based on fuzzy reasoning

Country Status (1)

Country Link
CN (1) CN116706907B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117522156B (en) * 2023-10-17 2024-09-17 江苏尚诚能源科技有限公司 Distributed photovoltaic prediction evaluation method and system based on big data analysis

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106544A (en) * 2013-02-01 2013-05-15 东南大学 Photovoltaic power generation prediction system based on T-S-type fuzzy neural network
CN109858665A (en) * 2018-12-06 2019-06-07 国网河北省电力有限公司 Short-term photovoltaic power prediction method based on feature screening and ANFIS-PSO
CN109978284A (en) * 2019-04-25 2019-07-05 中国人民解放军国防科技大学 A Time-sharing Prediction Method of Photovoltaic Power Generation Based on Hybrid Neural Network Model
CN110705760A (en) * 2019-09-19 2020-01-17 广东工业大学 A photovoltaic power generation power prediction method based on deep belief network
CN114638396A (en) * 2022-01-14 2022-06-17 中国电力科学研究院有限公司 Photovoltaic power prediction method and system based on neural network instantiation
CN115345301A (en) * 2022-08-26 2022-11-15 深圳依时货拉拉科技有限公司 Model training method and device based on mixed disturbance, storage medium and server
CN115907195A (en) * 2022-12-08 2023-04-04 国电和风风电开发有限公司 Photovoltaic power generation power prediction method, system, electronic device and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9461535B2 (en) * 2013-12-30 2016-10-04 King Fahd University Of Petroleum And Minerals Photovoltaic systems with maximum power point tracking controller

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106544A (en) * 2013-02-01 2013-05-15 东南大学 Photovoltaic power generation prediction system based on T-S-type fuzzy neural network
CN109858665A (en) * 2018-12-06 2019-06-07 国网河北省电力有限公司 Short-term photovoltaic power prediction method based on feature screening and ANFIS-PSO
CN109978284A (en) * 2019-04-25 2019-07-05 中国人民解放军国防科技大学 A Time-sharing Prediction Method of Photovoltaic Power Generation Based on Hybrid Neural Network Model
CN110705760A (en) * 2019-09-19 2020-01-17 广东工业大学 A photovoltaic power generation power prediction method based on deep belief network
CN114638396A (en) * 2022-01-14 2022-06-17 中国电力科学研究院有限公司 Photovoltaic power prediction method and system based on neural network instantiation
CN115345301A (en) * 2022-08-26 2022-11-15 深圳依时货拉拉科技有限公司 Model training method and device based on mixed disturbance, storage medium and server
CN115907195A (en) * 2022-12-08 2023-04-04 国电和风风电开发有限公司 Photovoltaic power generation power prediction method, system, electronic device and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于相似日聚类和贝叶斯神经网络的光伏发电功率预测研究;嵇灵 等;《中国管理科学》(第03期);第118-122页 *

Also Published As

Publication number Publication date
CN116706907A (en) 2023-09-05

Similar Documents

Publication Publication Date Title
CN112365040B (en) Short-term wind power prediction method based on multi-channel convolution neural network and time convolution network
US20220373984A1 (en) Hybrid photovoltaic power prediction method and system based on multi-source data fusion
US12431708B1 (en) Method for predicting distributed regional generated power based on stacked integrated model
Xiao et al. Online sequential extreme learning machine algorithm for better predispatch electricity price forecasting grids
CN118199061A (en) A short-term power prediction method and system for renewable energy
CN118483770B (en) A wind speed prediction method based on graph embedding and GIN-GRU for multiple wind farm features
CN117236488A (en) Photovoltaic power online probability prediction method under complex concept drift
CN115293395A (en) CS (circuit switched) optimization-based VMD (virtual machine description) and CNN-LSTM (neural network-local transformation) combined prediction model
Aliberti et al. Forecasting Short-term Solar Radiation for Photovoltaic Energy Predictions.
CN120408238A (en) Wind speed prediction method and system based on hybrid convolutional network and parallel prediction model
Wang et al. Short-term power prediction method of wind farm cluster based on deep spatiotemporal correlation mining
CN116706907B (en) Photovoltaic power generation prediction method and related equipment based on fuzzy reasoning
CN118734158A (en) Cloud microphysical parameterization method, device and storage medium for numerical weather forecast model
CN120675046A (en) Wind power cluster power prediction method, device, equipment and storage medium
CN110019167B (en) A method and system for constructing a medium- and long-term new energy resource database
CN118380990A (en) Construction method of photovoltaic power prediction digital twin system based on ABC optimized BSTS model
Su et al. A short-term PV power forecasting method based on NWP correction considering meteorological coupling correlation
CN117217357A (en) Construction and prediction methods of photovoltaic cluster prediction models and construction and prediction systems
CN115062762A (en) Ocean current trajectory prediction method
Wang et al. Optimization of Convolutional Long Short-Term Memory Hybrid Neural Network Model Based on Genetic Algorithm for Weather Prediction
Zhang Deep learning-based hybrid short-term solar forecast using sky images and meteorological data
CN112348070A (en) Method and system for forecasting medium and short term loads of smart power grid
CN120150122B (en) Method and device for improving power system operation safety driven by model data hybrid
KR102590753B1 (en) High resolution device for predicting heat illness occurrence probability based on detailed weather observation and weather numerical model information and method thereof
CN111580999A (en) CPS Software Reliability Prediction System Based on Long Short-Term Memory Network

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
TR01 Transfer of patent right

Effective date of registration: 20250515

Address after: Building A, 3rd Floor, No.19 Third Industrial Zone, Xiacun Community, Gongming Street, Guangming District, Shenzhen City, Guangdong Province 518000

Patentee after: Shenzhen Baidali Heng Technology Co.,Ltd.

Country or region after: China

Address before: 518000 Room 101, No. 19, No. 3 industrial zone, Xiacun community, Gongming street, Guangming District, Shenzhen, Guangdong

Patentee before: Shenzhen Aerospace Science and Technology Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right