CN117154698A - Photovoltaic power prediction method and device, medium and electronic device - Google Patents
Photovoltaic power prediction method and device, medium and electronic device Download PDFInfo
- Publication number
- CN117154698A CN117154698A CN202311088128.3A CN202311088128A CN117154698A CN 117154698 A CN117154698 A CN 117154698A CN 202311088128 A CN202311088128 A CN 202311088128A CN 117154698 A CN117154698 A CN 117154698A
- Authority
- CN
- China
- Prior art keywords
- photovoltaic power
- quantum
- time
- circuit
- power prediction
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 59
- 230000015654 memory Effects 0.000 claims abstract description 146
- 238000010248 power generation Methods 0.000 claims abstract description 26
- 239000011159 matrix material Substances 0.000 claims description 95
- 230000006870 function Effects 0.000 claims description 69
- 239000002096 quantum dot Substances 0.000 claims description 50
- 230000004913 activation Effects 0.000 claims description 37
- 238000004590 computer program Methods 0.000 claims description 14
- 238000000354 decomposition reaction Methods 0.000 claims description 13
- 238000012935 Averaging Methods 0.000 claims description 10
- 238000012549 training Methods 0.000 claims description 7
- 230000036961 partial effect Effects 0.000 claims description 6
- 230000003213 activating effect Effects 0.000 claims description 5
- 238000004422 calculation algorithm Methods 0.000 description 20
- 238000010586 diagram Methods 0.000 description 12
- 238000004364 calculation method Methods 0.000 description 11
- 238000013461 design Methods 0.000 description 9
- 230000007787 long-term memory Effects 0.000 description 9
- 230000006403 short-term memory Effects 0.000 description 9
- 238000013528 artificial neural network Methods 0.000 description 8
- 238000005286 illumination Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 7
- 230000002829 reductive effect Effects 0.000 description 7
- 230000008859 change Effects 0.000 description 6
- 230000007774 longterm Effects 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 238000013507 mapping Methods 0.000 description 5
- 238000011161 development Methods 0.000 description 4
- 230000007613 environmental effect Effects 0.000 description 4
- 230000000737 periodic effect Effects 0.000 description 4
- 238000001228 spectrum Methods 0.000 description 4
- 230000009466 transformation Effects 0.000 description 4
- XUIMIQQOPSSXEZ-UHFFFAOYSA-N Silicon Chemical compound [Si] XUIMIQQOPSSXEZ-UHFFFAOYSA-N 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 3
- 239000000463 material Substances 0.000 description 3
- 238000005259 measurement Methods 0.000 description 3
- 238000005457 optimization Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 125000004122 cyclic group Chemical group 0.000 description 2
- 238000009499 grossing Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000003062 neural network model Methods 0.000 description 2
- 238000007781 pre-processing Methods 0.000 description 2
- 230000000306 recurrent effect Effects 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 241001522296 Erithacus rubecula Species 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 230000001174 ascending effect Effects 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000000670 limiting effect Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 229910052710 silicon Inorganic materials 0.000 description 1
- 239000010703 silicon Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N10/00—Quantum computing, i.e. information processing based on quantum-mechanical phenomena
- G06N10/20—Models of quantum computing, e.g. quantum circuits or universal quantum computers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
- G06N3/0442—Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J3/00—Circuit arrangements for ac mains or ac distribution networks
- H02J3/004—Generation forecast, e.g. methods or systems for forecasting future energy generation
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J3/00—Circuit arrangements for ac mains or ac distribution networks
- H02J3/38—Arrangements for parallely feeding a single network by two or more generators, converters or transformers
- H02J3/381—Dispersed generators
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J2203/00—Indexing scheme relating to details of circuit arrangements for AC mains or AC distribution networks
- H02J2203/20—Simulating, e g planning, reliability check, modelling or computer assisted design [CAD]
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J2300/00—Systems for supplying or distributing electric power characterised by decentralized, dispersed, or local generation
- H02J2300/20—The dispersed energy generation being of renewable origin
- H02J2300/22—The renewable source being solar energy
- H02J2300/24—The renewable source being solar energy of photovoltaic origin
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Evolutionary Computation (AREA)
- Power Engineering (AREA)
- Artificial Intelligence (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Computing Systems (AREA)
- Pure & Applied Mathematics (AREA)
- Computational Mathematics (AREA)
- Mathematical Optimization (AREA)
- Mathematical Analysis (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Condensed Matter Physics & Semiconductors (AREA)
- Photovoltaic Devices (AREA)
Abstract
The application discloses a photovoltaic power prediction method, a device, a medium and an electronic device, wherein the method comprises the following steps: inputting photovoltaic power prediction data of a plurality of time nodes before a time node to be predicted into a quantum long-short-time memory network, and operating the quantum long-short-time memory network to obtain a photovoltaic power value of the time node to be predicted, wherein the photovoltaic power prediction data are external environment data influencing photovoltaic power generation and attribute data of a photovoltaic panel, the quantum long-short-time memory network comprises a variable component sub-circuit, and parameters of part of logic gates in the variable component sub-circuit are determined based on the photovoltaic power prediction data; and determining a photovoltaic power prediction result of the time node to be predicted based on the photovoltaic power value of the time node to be predicted. The accuracy of photovoltaic power prediction can be improved.
Description
Technical Field
The application belongs to the technical field of quantum computing, and particularly relates to a photovoltaic power prediction method, a device, a medium and an electronic device.
Background
The photovoltaic power represents the electric energy generated by the photovoltaic panel in unit time, and is an important index for measuring the output electric energy of the photovoltaic power generation system, and the actual power generation capacity and economic benefit of the photovoltaic panel are directly influenced by the magnitude of the photovoltaic power. Through photovoltaic power prediction, an operation manager of a photovoltaic power generation system can be helped to determine reasonable photovoltaic power generation capacity and distribution, the energy utilization efficiency is improved, the energy cost is reduced, and the sustainable development of renewable energy sources is promoted.
At present, the machine learning method is widely applied to the field of photovoltaic power prediction, and the relation between photovoltaic power prediction data and photovoltaic power can be learned by utilizing neural network models such as a cyclic neural network, a convolutional neural network, a feedforward neural network and the like, so that the power of photovoltaic power generation is predicted.
However, the photovoltaic power prediction data often has the characteristics of high dimensionality, nonlinearity and complexity, the existing photovoltaic power prediction method is still based on a classical computer to construct a neural network model, the model is limited by the operation performance of the classical computer, the complex nonlinear relation between the photovoltaic power prediction data cannot be fully captured, and the accuracy of the photovoltaic power prediction is low.
Content of the application
The application aims to provide a photovoltaic power prediction method, a device, a medium and an electronic device, which aim to improve the accuracy of photovoltaic power prediction.
One embodiment of the present application provides a photovoltaic power prediction method, the method comprising:
inputting photovoltaic power prediction data of a plurality of time nodes before a time node to be predicted into a quantum long-short-time memory network, and operating the quantum long-short-time memory network to obtain a photovoltaic power value of the time node to be predicted, wherein the photovoltaic power prediction data are external environment data influencing photovoltaic power generation and attribute data of a photovoltaic panel, the quantum long-short-time memory network comprises a variable component sub-circuit, and parameters of part of logic gates in the variable component sub-circuit are determined based on the photovoltaic power prediction data;
And determining a photovoltaic power prediction result of the time node to be predicted based on the photovoltaic power value of the time node to be predicted.
Optionally, the variable component sub-circuit includes a coding circuit and a variable component circuit connected in sequence, the coding circuit includes a first single-quantum logic gate acting on each qubit, the partial logic gates include the first single-quantum logic gate, and the variable component circuit includes a second single-quantum logic gate acting on each qubit and a multiple-quantum logic gate acting on multiple qubits; parameters of the second single quantum logic gate and the multiple quantum logic gate are determined based on training, and the variation circuit is used for performing variable component sub-coding on the quantum bit.
Optionally, the encoding circuit is configured to load the photovoltaic power prediction data or a hidden state corresponding to the photovoltaic power prediction data into a qubit, and the parameter of the first single quantum logic gate is determined based on the photovoltaic power prediction data or the hidden state corresponding to the photovoltaic power prediction data.
Optionally, the variable component sub-circuit further includes a RELU function circuit connected to the encoding circuit, the encoding circuit is configured to load a RELU activation value to a qubit, the parameter of the first single quantum logic gate is determined based on the RELU activation value, and the RELU activation value is obtained by activating the photovoltaic power prediction data or a hidden state corresponding to the photovoltaic power prediction data by the RELU function circuit.
Optionally, the number of RELU function circuits is one, the number of the coding circuits and the variation circuits is at least two, at least two coding circuits and the variation circuits are connected alternately, a parameter of a first single-quantum logic gate in the coding circuit connected with the RELU function circuits is determined based on the RELU activation value, and a parameter of a first single-quantum logic gate in the coding circuit not connected with the RELU function circuits is determined based on the output value of the variation circuit.
Optionally, the matrix form of the multiple quantum logic gate is:
wherein θ is a parameter of the multiple quantum logic gate.
Optionally, the attribute data of the photovoltaic panel includes a photovoltaic power value, a power trend value, and a power period value, and before the photovoltaic power prediction data of a plurality of time nodes before the time node to be predicted is input to the quantum long and short time memory network, the method further includes:
acquiring photovoltaic power values of a plurality of time nodes before the time node to be predicted;
constructing a track matrix of the photovoltaic power values, and carrying out singular value decomposition on the track matrix of the photovoltaic power values to obtain the product of a left singular matrix, a right singular matrix and a singular value matrix;
Characteristic grouping is carried out on products of the left singular matrix, the right singular matrix and the singular value matrix, so that a trend part and a period part are obtained;
and respectively carrying out diagonal averaging treatment on the trend part and the period part to obtain power trend values and power period values of a plurality of time nodes before the time node to be predicted.
Optionally, the inputting the photovoltaic power prediction data of the time nodes before the time node to be predicted to the quantum long-short-time memory network, and operating the quantum long-short-time memory network to obtain the photovoltaic power value of the time node to be predicted includes:
inputting photovoltaic power prediction data and a hidden state of a kth time node before a time node to be predicted into a quantum long-short-time memory network, and operating the quantum long-short-time memory network to obtain the hidden state of a kth+1th time node, wherein the initial value of k is 1;
let k=k+1, and return to execute the step to input the photovoltaic power prediction data and the hidden state of the kth time node before the time node to be predicted to the quantum long-short time memory network;
when k=u, determining a photovoltaic power value of the time node to be predicted based on the hidden state of the (k+1) th time node, wherein u is the number of time nodes before the time node to be predicted;
Wherein, the hidden state of the 1 st time node is a preset value.
Yet another embodiment of the present application provides a photovoltaic power prediction apparatus, the apparatus comprising:
the operation module is used for inputting photovoltaic power prediction data of a plurality of time nodes before the time node to be predicted into a quantum long-short time memory network, and operating the quantum long-short time memory network to obtain a photovoltaic power value of the time node to be predicted, wherein the photovoltaic power prediction data are external environment data influencing photovoltaic power generation and attribute data of a photovoltaic panel, the quantum long-short time memory network comprises a variable component sub-circuit, and parameters of part of logic gates in the variable component sub-circuit are determined based on the photovoltaic power prediction data;
and the determining module is used for determining a photovoltaic power prediction result of the time node to be predicted based on the photovoltaic power value of the time node to be predicted.
A further embodiment of the application provides a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the method of any of the preceding claims when run.
Yet another embodiment of the application provides an electronic device comprising a memory having a computer program stored therein and a processor configured to run the computer program to perform the method described in any of the above.
The application realizes photovoltaic power prediction based on the quantum computer, breaks through the limitation of the operation capability of the classical computer, and the quantum bit in the quantum computer can be in the superposition state of a plurality of states instead of only 0 or 1, thus simultaneously representing a plurality of possibilities and efficiently capturing the complex nonlinear relation between photovoltaic power prediction data; the parameter-containing sub logic gate of the quantum long-short time memory network is constructed based on the variable component sub algorithm, and compared with the traditional calculation method, the method can provide stronger calculation capability due to quantum superposition and quantum entanglement characteristics of quantum states, and can accurately model a complex nonlinear relation between photovoltaic power prediction data by iteratively updating parameters of the parameter-containing sub logic gate, so that the performance of the network in processing the photovoltaic power prediction data is further improved; compared with the existing photovoltaic power prediction method, the photovoltaic power prediction method provided by the embodiment of the application greatly improves the accuracy of photovoltaic power prediction.
Drawings
Fig. 1 is a hardware block diagram of a computer terminal of a photovoltaic power prediction method according to an embodiment of the present application;
Fig. 2 is a schematic flow chart of a photovoltaic power prediction method according to an embodiment of the present application;
FIG. 3 is an exemplary schematic diagram of a quantum long and short time memory circuit according to an embodiment of the present application;
FIG. 4 is an exemplary schematic diagram of another quantum long and short time memory circuit according to an embodiment of the present application;
FIG. 5 is an exemplary schematic diagram of yet another quantum long and short-term memory circuit provided by an embodiment of the present application;
FIG. 6 is an exemplary schematic diagram of a quantum long and short time memory network provided by an embodiment of the present application;
fig. 7 is a schematic flow chart of another photovoltaic power prediction method according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a photovoltaic power prediction apparatus according to an embodiment of the present application.
Detailed Description
The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the application.
Fig. 1 is a network block diagram of a photovoltaic power prediction system according to an embodiment of the present application. The photovoltaic power prediction system may include a network 110, a server 120, a wireless device 130, a client 140, a store 150, a classical computing unit 160, a quantum computing unit 170, and may also include additional memory, classical processors, quantum processors, and other devices not shown.
Network 110 is a medium used to provide a communication link between various devices and computers connected together within the photovoltaic power generation system, including but not limited to the internet, intranets, local area networks, mobile communication networks, and combinations thereof, by wired, wireless communication links, or fiber optic cables, etc.
Server 120, wireless device 130, and client 140 are conventional data processing systems that may contain data and have applications or software tools that perform conventional computing processes. The client 140 may be a personal computer or a network computer, so the data may also be provided by the server 120. The wireless device 130 may be a smart phone, tablet, notebook, smart wearable device, or the like. The memory unit 150 may include a database 151 that may be configured to store data of qubit parameters, quantum logic gate parameters, quantum circuits, quantum programs, and the like.
Classical computing unit 160 (quantum computing unit 170) may include classical processor 161 (quantum processor 171) for processing classical data (quantum data), which may be boot files, operating system images, and application 163 (application 173), and memory 162 (memory 172) for storing classical data (quantum data), which may be quantum algorithms compiled for implementing the photovoltaic power prediction method provided according to embodiments of the present application, application 163 (application 173).
Any data or information stored or generated in classical computing unit 160 (quantum computing unit 170) may also be configured to be stored or generated in another classical (quantum) processing system in a similar manner, as may any application program that it executes.
It should be noted that, the real quantum computer is a hybrid structure, and it includes at least two major parts in fig. 1: a classical calculation unit 160 responsible for performing classical calculations and controls; the quantum computing unit 170 is responsible for running a quantum program to realize quantum computing.
The classical computing unit 160 and the quantum computing unit 170 may be integrated in one device or may be distributed among two different devices. A first device, for example, comprising a classical computing unit 160 runs a classical computer operating system on which quantum application development tools and services are provided, and also the storage and network services required for quantum applications. The user develops the quantum program through a quantum application development tool and service thereon, and transmits the quantum program to a second device including the quantum computing unit 170 through a web service thereon. The second device runs a quantum computer operating system, the code of the quantum program is analyzed and compiled into an instruction which can be identified and executed by the quantum processor 170 through the quantum computer operating system, and the quantum processor 170 realizes a quantum algorithm corresponding to the quantum program according to the instruction.
The computation unit of the classical processor 161 in the classical computation unit 160 is a CMOS tube based on silicon chips, which is not limited by time and coherence, i.e. which is not limited by the time of use, which is available at any time. Furthermore, in silicon chips, the number of such computation units is also sufficient, the number of computation units in a classical processor 161 is now thousands, the number of computation units is sufficient and the CMOS pipe selectable computation logic is fixed, for example: and AND logic. When the CMOS tube is used for operation, a large number of CMOS tubes are combined with limited logic functions, so that the operation effect is realized.
The basic computational unit of quantum processor 171 in quantum computational unit 170 is a qubit, the input of which is limited by coherence and also by coherence time, i.e., the qubit is limited in terms of time of use and is not readily available. Full use of qubits within the usable lifetime of the qubits is a critical challenge for quantum computing. Furthermore, the number of qubits in a quantum computer is one of the representative indicators of the performance of the quantum computer, each of the qubits realizes a calculation function by a logic function configured as needed, whereas the logic function in the field of quantum calculation is diversified in view of the limited number of qubits, for example: hadamard gates (Hadamard gates, H gates), brix gates (X gates), brix-Y gates (Y gates), brix-Z gates (Z gates), X gates, RY gates, RZ gates, CNOT gates, CR gates, issnap gates, toffoli gates, and the like. In quantum computation, the operation effect is realized by combining limited quantum bits with various logic function combinations.
Based on these differences, the design of classical logic functions acting on CMOS transistors and the design of quantum logic functions acting on qubits are significantly and essentially different; the classical logic function acts on the design of the CMOS tube without considering the individuality of the CMOS tube, such as the individuality identification and the position of the CMOS tube in the silicon chip, and the usable time length of each CMOS tube, so the classical algorithm formed by the classical logic function only expresses the operation relation of the algorithm, and does not express the dependence of the algorithm on the individuals of the CMOS tube.
The quantum logic function acts on the qubit, and the individuality of the qubit needs to be considered, such as the individuality identification, the position and the relation with surrounding qubits of the number of the qubit in the quantum chip, and the usable duration of each qubit. Therefore, the quantum algorithm formed by the quantum logic functions not only expresses the operation relation of the algorithm, but also expresses the dependence of the algorithm on quantum bit individuals.
Exemplary:
quantum algorithm one: h1, H2, CNOT (1, 3), H3, CNOT (2, 3);
and a quantum algorithm II: h1, H2, CNOT (1, 2), H3, CNOT (2, 3);
wherein 1/2/3 respectively represents three sequentially connected qubits Q1, Q2, Q3 or mutually connected qubits Q1, Q2, Q3;
An exemplary explanation of the quantum algorithm's influence by the quantum bit coherence time is as follows:
defining the execution time of a single-quantum bit logic gate as t, and 1 two single-quantum bit logic gates acting on adjacent bits as 2t; then:
when three Q1, Q2, Q3 are mutually connected, the first quantum algorithm needs to be calculated in 6t and 4 time periods, the time period needed by each time period is respectively t,2t, and the operations executed in each time period are as follows: h1 and H2; CNOT (1, 3); h3; CNOT (2, 3);
the first quantum algorithm is calculated by 5t and is carried out in 3 time periods, the time duration required by each time period is t,2t and 2t respectively, and the operation executed in each time period is as follows: h1, H2, H3; CNOT (1, 2); CNOT (2, 3);
when the Q1, the Q2 and the Q3 are connected in sequence, the quantum algorithm one needs to be equivalent to: h1 and H2; swap (1, 2), CNOT (2, 3), swap (1, 2); h3; CNOT (2, 3); the equivalent quantum algorithm I needs 10t to be calculated, and 4 time periods are divided, and the time duration needed by each time period is t,6t, t and 2t respectively. The operations performed in each time period are: h1 and H2; swap (1, 2), CNOT (2, 3), swap (1, 2); h3; CNOT (2, 3).
Therefore, the design of the quantum logic function acting on the quantum bit (including the design of whether the quantum bit is used or not and the design of the use efficiency of each quantum bit) is the key for improving the operation performance of the quantum computer, and special design is required, which is the uniqueness of the quantum algorithm realized based on the quantum logic function and is different from the nature and the significance of the classical algorithm realized based on the classical logic function. The above design for qubits is a technical problem that is not considered nor faced by common computing devices. Based on the above, the application provides a photovoltaic power prediction method and a related device aiming at how to realize photovoltaic power prediction in quantum computation, aiming at improving the accuracy of photovoltaic power prediction.
Referring to fig. 2, fig. 2 is a schematic flow chart of a photovoltaic power prediction method according to an embodiment of the present application, which may include the following steps:
s201, photovoltaic power prediction data of a plurality of time nodes before a time node to be predicted are input into a quantum long-short-time memory network, the quantum long-short-time memory network is operated to obtain a photovoltaic power value of the time node to be predicted, the photovoltaic power prediction data are external environment data affecting photovoltaic power generation and attribute data of a photovoltaic panel, the quantum long-short-time memory network comprises a variable component sub-circuit, and parameters of partial logic gates in the variable component sub-circuit are determined based on the photovoltaic power prediction data;
Photovoltaic power generation is a renewable energy power generation mode for directly converting light energy into electric energy by utilizing solar energy, and sunlight is mainly converted into electric energy through a solar cell panel (also called a photovoltaic cell panel and a photovoltaic panel). The photovoltaic panel is composed of a plurality of photovoltaic cells, each of which is composed of two layers of semiconductors of different materials, and when sunlight irradiates the photovoltaic cells, photons excite electrons to transition from one material to the other material, forming a current.
The photovoltaic power value represents the electric energy generated by the photovoltaic panel in unit time, and is an important index for measuring the output electric energy of the photovoltaic power generation system. The magnitude of the photovoltaic power value directly influences the actual power generation capacity and economic benefit of the photovoltaic panel. Through photovoltaic power prediction, an operation manager of a photovoltaic power generation system can be helped to determine reasonable photovoltaic power generation capacity and distribution, the energy utilization efficiency is improved, the energy cost is reduced, and the sustainable development of renewable energy sources is promoted.
The attribute data of the photovoltaic panel may be obtained in a variety of ways, for example, photovoltaic panel power may be obtained by a monitoring system or data recording device. The current and voltage sensors can be installed on the photovoltaic battery pack, current and voltage values can be measured in real time, and the photovoltaic power value can be calculated. The method for acquiring the power trend value and the power cycle value will be described below.
The variable component sub-circuit is a quantum circuit composed of parameter sub-logic gates, when the problem is solved, the variable component sub-circuit is used for representing the solution space of the problem, the variable of the problem is represented by the parameters of the quantum logic gates, and by adjusting the parameters of the quantum logic gates, a high-adjustable quantum circuit is constructed, so that the circuit can perform different modes of transformation on input data, and thus, various different problems can be dealt with. And, unlike the traditional quantum circuit, the variable component sub-circuit searches the optimal parameter capable of minimizing the problem loss through the variable component optimization algorithm, so that the approximate solution of the problem is obtained, and the calculation efficiency is greatly improved.
Long and short term memory networks (LSTM) are one type of recurrent neural network. Long and short term memory networks are derived from improvements and optimizations to recurrent neural networks and can be used to address more complex time series problems. The long-time and short-time memory neural network can learn long-time information through a gating system with unique design, so that the long-time memory of data of the input neural network is realized. The quantum long-short-time memory network (QLSTM) is implemented by using a long-short-time memory network or a part of the long-short-time memory network in the form of a quantum circuit.
The power of photovoltaic power generation is affected by various external environmental data, such as illumination intensity, temperature, geographic location, altitude, etc. The most direct and important influencing factor of photovoltaic power generation is the illumination intensity. The electric power output of the photovoltaic cell is directly related to the illumination intensity, and the stronger the illumination is, the higher the generated power is. Meanwhile, the electric energy conversion efficiency of the photovoltaic cell is reduced due to the fact that the temperature of the battery plate is increased, the output voltage of the battery is reduced, and the generated power is affected.
External environmental data affecting photovoltaic power generation may be acquired in a variety of ways, for example, real-time illumination intensity and temperature data may be acquired using devices such as weather stations, weather sensors, or solar radiometers. These devices may be installed at or near the photovoltaic panel for monitoring and recording environmental conditions.
The attribute data of the photovoltaic panel refers to various relevant parameters and indexes of the photovoltaic panel when the photovoltaic panel is measured, monitored or predicted, and can include, but is not limited to, the following parameters and indexes: photovoltaic power value, power trend value, power cycle value, current value, voltage value, inclination angle, fill factor, conversion efficiency, etc.
The power trend value is the power variation trend of the photovoltaic panel under different conditions. The method can be used for analyzing the change condition of the output power of the photovoltaic panel and judging the performance of the photovoltaic panel under different conditions. When the power trend is in an ascending trend, the output power of the photovoltaic panel is gradually increased; when the power trend is in a decreasing trend, the output power of the photovoltaic panel is gradually reduced. When the power trend is a steady trend, it means that the output power of the photovoltaic panel remains substantially unchanged. When the power trend is nonlinear, it means that there is a complex nonlinear relationship between the output power of the photovoltaic panel and other factors.
The power cycle value refers to the variation of the output power of the photovoltaic panel in one cycle, and can be used for describing the power fluctuation of the photovoltaic panel in different time periods and the performance of the photovoltaic panel under different conditions. The power cycle value may include a power peak value, a power valley value, an average power value, etc., where the power peak value represents a highest power value reached by the photovoltaic panel in the cycle, the power valley value represents a lowest power value reached by the photovoltaic panel in the cycle, and the average power value represents a power value of an average output of the photovoltaic panel in the cycle.
In the embodiment of the application, the external environment data influencing the photovoltaic power generation can be selected as temperature, and the attribute data of the photovoltaic panel can be selected as photovoltaic power value, power trend value and power period value.
For example, the photovoltaic power prediction data may be:
can be expressed in a matrix as:
the selection mode and the acquisition method of the photovoltaic power prediction data are not particularly limited, and the photovoltaic power prediction data are set according to actual requirements.
S202, determining a photovoltaic power prediction result of the time node to be predicted based on the photovoltaic power value of the time node to be predicted.
In one embodiment of the application, the photovoltaic power value of the time node to be predicted can be directly used as the photovoltaic power prediction result of the time node to be predicted.
In one embodiment of the present application, the variable component sub-circuit includes a coding circuit and a variable component circuit connected in sequence, the coding circuit includes a first single-quantum logic gate acting on each qubit, the partial logic gate includes the first single-quantum logic gate, and the variable component circuit includes a second single-quantum logic gate acting on each qubit and a multiple-quantum logic gate acting on a plurality of qubits; parameters of the second single quantum logic gate and the multiple quantum logic gate are determined based on training, and the variation circuit is used for performing variable component sub-coding on the quantum bit.
The single quantum logic gate is a quantum logic gate used for operating single quantum bits in a quantum circuit, and comprises a Hadamard gate, a phase gate, a single quantum rotating gate and the like, and can be used for realizing the state transformation of the single quantum bits and realizing basic operation and algorithm in quantum computation.
A multiple quantum logic gate is a quantum logic gate in a quantum circuit for operating multiple qubits, including CRX, CRY, CRZ, CNOT gates, SWAP gates, toffoli gates, etc., which can be used not only to effect state transitions of a single qubit, but also to effect control and interaction between multiple qubits.
Variable component quantum encoding refers to quantum state encoding of a qubit using a variable component sub-circuit. The variable component sub-circuits have been described in the above embodiments of the present application, and are not described herein.
For convenience of explanation, the variable component sub-circuit included in the quantum long and short time memory network is referred to as a quantum long and short time memory circuit in the embodiment of the present application.
Referring to fig. 3, fig. 3 is an exemplary schematic diagram of a quantum long and short time memory circuit according to an embodiment of the present application. The quantum long-short-time memory circuit shown in fig. 3 comprises 4 quantum bits, and comprises a coding circuit, a variation circuit and a measuring layer which are sequentially connected, wherein the measuring layer is used for measuring quantum states of the quantum bits, and a measuring result is obtained.
The encoding circuit includes: first single quantum logic gate RX (θ 1 ) A first single quantum logic gate RX (θ 2 ) A first single quantum logic gate RX (θ 3 ) A first single quantum logic gate RX (θ 4 ) The method comprises the steps of carrying out a first treatment on the surface of the First single quantum logic gate RX (θ 1 ) Parameter θ 1 First single quantum logic gate RX (θ 2 ) Parameter θ 2 First, aSingle quantum logic gate RX (θ) 3 ) Parameter θ 3 First single quantum logic gate RX (θ 4 ) Parameter θ 4 Are each determined based on the photovoltaic power prediction data or a hidden state corresponding to the photovoltaic power prediction data.
Taking the above photovoltaic power prediction data provided by the present application as an example, the first single quantum logic gate RX (θ 1 ) Parameter θ 1 First single quantum logic gate RX (θ 2 ) Parameter θ 2 First single quantum logic gate RX (θ 3 ) Parameter θ 3 First single quantum logic gate RX (θ 4 ) Parameter θ 4 The matrix determination corresponding to the photovoltaic power prediction data provided by the application can be based on that the specific corresponding relation between the parameters and the elements in the matrix depends on the actual coding mode, for example, when the parameters are original values of classical arctangent functions, the first single quantum logic gate RX (θ 1 ) Parameter θ 1 May be based on a matrixNormalized resultsThe one-dimensional vector |0.3.5-0.1.0.7| of the first row in (a) is determined; first single quantum logic gate RX (θ 2 ) Parameter θ 2 Can be determined based on the one-dimensional vector |0.60.70.40.7| of the second row, θ 2 =arctan([0.6,0.7,0.4,0.7]) The method comprises the steps of carrying out a first treatment on the surface of the First single quantum logic gate RX (θ 3 ) Parameter θ 3 May be determined based on the one-dimensional vector |0.60.60.3.0.7| of the third row, θ 3 =arctan([0.6,0.6,0.3,0.7]) The method comprises the steps of carrying out a first treatment on the surface of the First single quantum logic gate RX (θ 4 ) Parameter θ 4 May be determined based on the one-dimensional vector |0.3-0.2-0.1.0.7| of the fourth row, θ 4 =arctan([0.3,-0.2,-0.1,0.7])。
When the parameters of the first single quantum logic gate are determined based on the hidden states corresponding to the photovoltaic power prediction data, the encoding mode is similar, and will not be described herein.
The variation circuit includes: second single quantum logic gate RX (. Beta.) acting on 1 st qubit 1 ) A second single quantum logic gate RX (β) acting on the 2 nd qubit 2 ) Second single quantum logic gate RX (. Beta.) acting on the 3 rd qubit 3 ) A second single quantum logic gate RX (β 4 ) The method comprises the steps of carrying out a first treatment on the surface of the Second single quantum logic gate RX (beta) 1 ) Parameter beta of (2) 1 Second single quantum logic gate RX (beta 2 ) Parameter beta of (2) 2 Second single quantum logic gate RX (beta 3 ) Parameter beta of (2) 3 Second single quantum logic gate RX (beta 4 ) Parameter beta of (2) 4 Are determined based on training.
The variation circuit further includes: multiple quantum logic gate RXX (alpha) acting on 1 st and 2 nd qubits 1 ) Wherein the control bit is the 1 st quantum bit, and the controlled bit is the 2 nd quantum bit; multiple quantum logic gate RXX (alpha) acting on the 2 nd and 3 rd qubits 2 ) Wherein the control bit is the 2 nd quantum bit, and the controlled bit is the 3 rd quantum bit; multiple quantum logic gate RXX (alpha) acting on the 3 rd and 4 th qubits 3 ) Wherein the control bit is the 3 rd quantum bit and the controlled bit is the 4 th quantum bit; multiple quantum logic gate RXX (alpha) acting on 1 st and 4 th qubits 4 ) Wherein the control bit is the 4 th quantum bit, and the controlled bit is the 1 st quantum bit; multiple quantum logic gate RXX (alpha) 1 ) Parameter alpha of (2) 1 Multiple quantum logic gate RXX (alpha) 2 ) Parameter alpha of (2) 2 Multiple quantum logic gate RXX (alpha) 3 ) Parameter alpha of (2) 3 Multiple quantum logic gate RXX (alpha) 4 ) Parameter alpha of (2) 4 Are determined based on training.
In one embodiment of the present application, the encoding circuit is configured to load the photovoltaic power prediction data or a hidden state corresponding to the photovoltaic power prediction data into a qubit, and the parameter of the first single quantum logic gate is determined based on the photovoltaic power prediction data or the hidden state corresponding to the photovoltaic power prediction data.
The hidden state refers to a coded representation of past information when a neural network such as a cyclic network, a long-short-time memory network, a quantum long-short-time memory network and the like processes sequence data, and comprises a memory of a model on the past input data and a summary of processing results.
In one embodiment of the present application, the variable component sub-circuit further comprises a RELU function circuit connected to the encoding circuit, the encoding circuit is configured to load a RELU activation value into a qubit, the parameter of the first single quantum logic gate is determined based on the RELU activation value, and the RELU activation value is obtained by activating the photovoltaic power prediction data or a hidden state corresponding to the photovoltaic power prediction data by the RELU function circuit.
The ReLU function (Rectified Linear Unit) is a commonly used activation function. Formalized expression of the ReLU function is f (x) =max (0, x), i.e. when the input is greater than 0, the output is equal to the input itself; when the input is 0 or less, the output is 0. The RELU function circuit refers to a quantum circuit that implements a RELU function by using quantum gates, and may be constructed by a CNOT gate and a Hadamard gate, for example.
Activation refers to converting photovoltaic power prediction data or hidden states corresponding to photovoltaic power prediction data in a neural network by a RELU function circuit. The RELU activation value is the result of the photovoltaic power prediction data or the hidden state corresponding to the photovoltaic power prediction data being processed by the RELU function circuit,
the RELU activation value is obtained by activating the photovoltaic power prediction data or the hidden state corresponding to the photovoltaic power prediction data by the RELU function circuit, that is, the photovoltaic power prediction data or the hidden state corresponding to the photovoltaic power prediction data can be input into the RELU function circuit, and the RELU function circuit is operated to obtain the RELU activation value output by the RELU function circuit.
Taking the matrix corresponding to the photovoltaic power prediction data provided by the embodiment of the present application as an example, the RELU activation value may be: 0.5.3-0.1.2.
Referring to fig. 4, fig. 4 is an exemplary schematic diagram of another quantum long and short time memory circuit according to an embodiment of the present application. The other quantum long and short time memory circuit shown in fig. 4 comprises 4 quantum bits and comprises a RELU function circuit, a coding circuit, a variation circuit and a measuring layer which are sequentially connected, wherein the coding circuit has the same structure as the coding circuit in the one quantum long and short time memory circuit shown in fig. 3, the variation circuit has the same structure as the variation circuit in the one quantum long and short time memory circuit shown in fig. 3, and the measuring layer has the same structure as the measuring layer in the one quantum long and short time memory circuit shown in fig. 3.
Another quantum long and short time memory circuit shown in fig. 4 is different from one shown in fig. 3 in that:
first single quantum logic gate RX (θ 1 ) Parameter θ 1 First single quantum logic gate RX (θ 2 ) Parameter θ 2 First single quantum logic gate RX (θ 3 ) Parameter θ 3 First single quantum logic gate RX (θ 4 ) Parameter θ 4 Are each determined based on the RELU activation value. The specific correspondence between the parameters and the RELU activation values depends on the actual encoding scheme, e.g. when the parameters are the original values of the classical arctangent function, the first single quantum logic gate RX (θ 1 ) Parameter θ 1 θ can be determined based on element 0.5 in RELU activation value |0.5 0.3-0.1.0.2| 1 Arctan (0.5); first single quantum logic gate RX (θ 2 ) Parameter θ 2 May be determined based on element 0.3 in RELU activation value |0.5.0.3-0.1.0.2|, θ 2 Arctan (0.3); first single quantum logic gate RX (θ 3 ) Parameter θ 3 θ can be determined based on element-0.1 in RELU activation value |0.5.0.3-0.1.2| 3 =arctan (-0.1); first single quantum logic gate RX (θ 4 ) Parameter θ 4 May be determined based on element 0.2 in RELU activation value |0.5 0.3-0.1.0.2|, θ 4 =arctan(0.2)。
The application does not limit the specific structure of the RELU function circuit, and the RELU function circuit is selected according to actual requirements.
In one embodiment of the present application, the number of RELU function circuits is one, the number of the encoding circuits and the variation circuits is at least two, at least two of the encoding circuits and the variation circuits are connected alternately, the parameter of the first single-quantum logic gate in the encoding circuit connected with the RELU function circuit is determined based on the RELU activation value, and the parameter of the first single-quantum logic gate in the encoding circuit not connected with the RELU function circuit is determined based on the output value of the variation circuit.
The at least two coding circuits and the variation circuit are connected alternately, which means that any two coding circuits and the variation circuit are not connected.
Referring to fig. 5, fig. 5 is an exemplary schematic diagram of still another quantum long-short-time memory circuit according to an embodiment of the present application. Still another quantum long and short-term memory circuit shown in fig. 5 includes 4 quantum bits, and includes a RELU function circuit, a first encoding circuit, a first variation circuit, a second encoding circuit, a second variation circuit … … nth encoding circuit, an nth variation circuit, and a measurement layer that are sequentially connected, wherein the first encoding circuit, the second encoding circuit … … nth encoding circuit each have the same structure as the encoding circuit in the other quantum long and short-term memory circuit shown in fig. 4, the first variation circuit, the second variation circuit … … nth variation circuit each have the same structure as the variation circuit in the other quantum long and short-term memory circuit shown in fig. 4, and the measurement layer has the same structure as the measurement layer in the other quantum long and short-term memory circuit shown in fig. 4.
The first encoding circuit in the quantum long and short time memory circuit shown in fig. 5 is configured to load the RELU activation value into the quantum circuit, where the parameter of the first single quantum logic gate included in the first encoding circuit is determined based on the RELU activation value, and when the RELU activation value is the same, the corresponding relationship between the parameter and the element in the RELU activation value is the same as the corresponding relationship between the parameter of the first single quantum logic gate included in the encoding circuit in the other quantum long and short time memory circuit shown in fig. 4 and the element in the RELU activation value, which is not repeated herein.
The parameters of the encoding circuit in the further quantum long short time memory circuit shown in fig. 5 are different from those of the encoding circuit in the further quantum long time memory circuit shown in fig. 4 as follows:
parameters of the second encoding circuit are determined based on the output of the first variation circuit, parameters of the third encoding circuit are determined … … based on the output of the second variation circuit, and parameters of the nth encoding circuit are determined based on the output of the N-1 th variation circuit. And so on.
In one embodiment of the present application, the matrix form of the multiple quantum logic gate is:
wherein θ is a parameter of the multiple quantum logic gate.
i being imaginary units, i.e.
The variable component sub-circuit provided by the application comprises a logic gate with variable parameters, and the prediction error can be minimized by adjusting the parameters in the circuit, so that the performance of a model is optimized to the greatest extent; the Relu quantum circuit included in the variable component sub circuit can perform nonlinear transformation on input data, and nonlinear characteristics of the input data are further increased, so that a complex relation in photovoltaic power prediction is better captured; any one of photovoltaic power prediction data, a hidden state and a Relu activation value is loaded to a quantum bit by using an encoding circuit, wherein parameters of a single quantum logic gate are original values of a classical arctangent function, and the linear characteristic embedding circuit can ensure that the relative value of input data is kept unchanged, so that all correlations among the original data are reserved to the greatest extent; in the coding circuit, a single quantum logic gate acts on each quantum bit, so that adverse effects of noise in a complex circuit are avoided, and the quality of quantum input characteristic mapping is improved.
The variable component circuit is used for carrying out variable component sub-coding on the quantum bits, wherein a multi-quantum logic gate RXX gate can establish entanglement relation among the quantum bits, the interaction among the quantum bits is enhanced, the relevance in data is better captured, and the forced maximum entanglement is relaxed, so that the variable component sub-circuit can learn the mapping function in a larger search space; by repeatedly applying the same coding circuit and variation circuit, the depth of the circuit and the number of parameters in the circuit can be increased, more calculation layers are introduced, more abstract features and association relations in the photovoltaic power prediction data are captured, and more complex quantum calculation operation is facilitated.
Based on the above reasons, the variable component sub-circuit provided by the embodiment of the application greatly improves the accuracy of photovoltaic power prediction.
In one embodiment of the present application, the attribute data of the photovoltaic panel includes a photovoltaic power value, a power trend value, and a power period value, and before the photovoltaic power prediction data of a plurality of time nodes before the time node to be predicted is input to the quantum long short-time memory network, the method further includes:
acquiring photovoltaic power values of a plurality of time nodes before the time node to be predicted;
Constructing a track matrix of the photovoltaic power values, and carrying out singular value decomposition on the track matrix of the photovoltaic power values to obtain the product of a left singular matrix, a right singular matrix and a singular value matrix;
characteristic grouping is carried out on products of the left singular matrix, the right singular matrix and the singular value matrix, so that a trend part and a period part are obtained;
and respectively carrying out diagonal averaging treatment on the trend part and the period part to obtain power trend values and power period values of a plurality of time nodes before the time node to be predicted.
The attribute data of the photovoltaic panel refers to various relevant parameters and indexes of the photovoltaic panel when the photovoltaic panel is measured, monitored or predicted, and can include, but is not limited to, the following parameters and indexes: photovoltaic power value, power trend value, power cycle value, current value, voltage value, inclination angle, fill factor, conversion efficiency, etc.
The track matrix refers to a matrix which can represent a time sequence evolution track by dividing time sequence data into a plurality of subsequences according to a certain time window and then stacking the subsequences together according to a time sequence, wherein each column in the track matrix represents one subsequence, and each row represents one time point in the subsequence.
When the time series data is Y n =(y 1 ,y 2 ,...,y n ) The equal-length subsequences in the time sequence can be sequentially taken out from the time sequence according to the fixed length to obtain a track matrix:
where L is the number of subsequences and D is the sliding window length.
Singular value decomposition (Singular Value Decomposition, SVD for short) is a matrix decomposition method. For a real or complex matrix, SVD decomposes it into the product of three matrices, i.e., x=uΣvχ, where X is an lxd matrix, U is an lxl unitary matrix, i.e., left singular matrix, Σ is an lxd diagonal matrix, i.e., singular value matrix, and vχ is a dxd unitary matrix, i.e., right singular matrix. Through SVD decomposition, the original matrix can be represented as a linear combination of a set of eigenvectors and singular values, thereby better understanding and manipulating the structure and properties of the matrix.
Singular value decomposition is performed on the matrix X:
X=U∑V T
wherein U is E R L×L ,∑∈R L×D ,V∈R D×D 。
In particular, the singular value decomposition may be performed using the np.ling.svd () function provided by python or selecting other means.
The left singular matrix is an lxl unitary matrix (orthogonal matrix in the real case), its column vector is the eigenvector of X-TX, and its column vector is also called the left singular vector. The left singular matrix U describes the orthogonal basis of the column space of X.
The right singular matrix is a D x D unitary matrix (in the real case, the conjugate transpose of the orthogonal matrix) whose column vector is the eigenvector of XX-T, and whose column vector is also called the right singular vector. The right singular matrix V2T describes the orthogonal basis of the row space of X.
The singular value matrix is an L x D diagonal matrix, with the elements on the diagonal being called singular values. The non-zero elements of the singular value matrix Σ are arranged in order from large to small. The diagonal elements of the singular value matrix Σ represent the singular values of X, which are non-negative real numbers.
The feature grouping refers to dividing the product of the left singular matrix, the right singular matrix and the singular value matrix into a plurality of sub-matrices which are independent of the linearity of the product according to certain requirements and rules. By grouping the singular values, important feature combinations can be selectively reserved, so that the dimension of the data is reduced, and main information of the data is extracted.
The trend part is a part describing a long-term trend of the time-series data in the product of the left singular matrix, the right singular matrix, and the singular value matrix, and corresponds to a low frequency region in the frequency spectrum, representing a long-term trend of change in the time-series data, such as linear increase or decrease. The trend portions generally correspond to smaller singular values because they correspond to low energy components in the spectrum.
The period part is a component describing periodic variation in time series data in the product of the left singular matrix, the right singular matrix and the singular value matrix. It corresponds to the medium-high frequency region in the spectrum, representing periodic variations in time series data. The periodic portions generally correspond to larger singular values because they correspond to high energy components in the spectrum.
The diagonal averaging process is an operation for smoothing a matrix, and by averaging each element of the matrix with adjacent elements on its diagonal, noise or variation in the smoothed matrix can be reduced, and in order to prevent loss of detail, the relationship between smoothing and preserving detail needs to be weighed.
For a matrix (such as a matrix corresponding to a trend part and a matrix corresponding to a period part), the calculation formula of the diagonal averaging process is as follows:
wherein t is c Representing time node before waiting for predictionC-th element, T, in power trend values and power period values of a plurality of time nodes a,b Represents the element of row a, column b in the matrix, and a+b=d+1
According to the embodiment of the application, the track matrix is constructed based on the photovoltaic power prediction data, so that the time series data can be converted into a two-dimensional matrix form, and the subsequent singular value decomposition and characteristic grouping operation are facilitated; singular value decomposition is carried out on the track matrix to obtain the product of the left singular matrix, the right singular matrix and the singular value matrix, so that the main characteristics in the data, namely the periodicity and the trend of the power, can be extracted; the products of the left singular matrix, the right singular matrix and the singular value matrix are subjected to characteristic grouping, data can be divided into different characteristic groups, and each characteristic group represents different power change modes, namely periodicity and trending, so that the change rule of photovoltaic power is better analyzed; and then, carrying out diagonal averaging processing on the result of the feature group to obtain power trend values and power cycle values of a plurality of time nodes before the time node to be predicted, comprehensively considering the information of different feature groups, and averaging the influence of the information. Based on the above reasons, the photovoltaic power prediction data preprocessing method for constructing a series of photovoltaic power prediction data preprocessing methods such as track matrix, singular value decomposition, feature grouping and diagonal averaging processing greatly improves the accuracy of photovoltaic power prediction.
In one embodiment of the present application, the inputting the photovoltaic power prediction data of a plurality of time nodes before the time node to be predicted to the quantum long short time memory network, and operating the quantum long time memory network, to obtain the photovoltaic power value of the time node to be predicted, includes:
inputting photovoltaic power prediction data and a hidden state of a kth time node before a time node to be predicted into a quantum long-short-time memory network, and operating the quantum long-short-time memory network to obtain the hidden state of a kth+1th time node, wherein the initial value of k is 1;
let k=k+1, and return to execute the step to input the photovoltaic power prediction data and the hidden state of the kth time node before the time node to be predicted to the quantum long-short time memory network;
when k=u, determining a photovoltaic power value of the time node to be predicted based on the hidden state of the (k+1) th time node, wherein u is the number of time nodes before the time node to be predicted;
wherein, the hidden state of the 1 st time node is a preset value.
The following provides the above photovoltaic power prediction data provided by the embodiment of the present applicationFor example, a method of inputting photovoltaic power prediction data of a plurality of time nodes before a time node to be predicted into a quantum long short time memory network and operating the quantum long time memory network to obtain photovoltaic power values of the time node to be predicted is illustrated.
The photovoltaic power prediction data |25 100 2 60| and the preset hidden state h1 of the 1 st time node are input to an encoder of a quantum long-short-time memory network, and the quantum long-short-time memory network is operated to obtain the hidden state h2 of the 2 nd time node;
the photovoltaic power prediction data (26 102 8 60) and the hidden state h2 of the 2 nd time node are input to an encoder of a quantum long-short-time memory network, and the quantum long-short-time memory network is operated to obtain the hidden state h3 of the 3 rd time node;
the photovoltaic power prediction data |26-3| and the hidden state h3 of the 3 rd time node are input to an encoder of a quantum long-short-time memory network, and the quantum long-short-time memory network is operated to obtain the hidden state h4 of the 4 th time node;
and inputting photovoltaic power prediction data |25 107 6 60| and a hidden state h4 of the 4 th time node into an encoder of a quantum long and short time memory network, and operating the quantum long and short time memory network to obtain a hidden state h5 of the 5 th time node, wherein at the moment, K=u=4, and determining the photovoltaic power value of the time node to be predicted based on the hidden state h5 of the 5 th time node.
The encoder and decoder are two components in the quantum long and short duration memory network, the encoder encodes the input sequence into one encoded state, and the decoder decodes this encoded state into a decoded state for use as input to the next round of the encoder. It should be specifically noted that the structures of the encoder and the decoder are both a quantum long-short time memory network provided by the embodiments of the present application, and the difference is only that the input and the output of the encoder and the decoder are different.
In one embodiment of the present application, the hidden state of the kth time node and the hidden state of the kth+1th time node are both encoded hidden states.
The coding state refers to the input of an encoder in the quantum long and short time memory network at each time node and the output generated by each time node and capable of being used as the input of a subsequent time node, and comprises the input of the current time node and the information of the previous time node, so that the modeling of the time dependency relationship of the quantum long and short time memory network to the sequence data is carried out. The encoded hidden state is the hidden state input by the encoder at each time node, and the hidden state generated by each time node and can be input as a subsequent time node.
In one embodiment of the present application, the determining the photovoltaic power value of the time node to be predicted based on the hidden state of the (k+1) th time node includes:
determining the photovoltaic power value of the time node to be predicted from the hidden state of the (k+1) th time node as a 1 st decoding hidden state;
inputting the j-th coding hidden state into a quantum long-short-time memory network, and operating the quantum long-short-time memory network to obtain the j+1th decoding hidden state, wherein the initial value of j is 1;
Returning to the execution step, and inputting the j-th coding hidden state into a quantum long-short time memory network;
after w times of execution, the j+1th decoding hidden state obtained by w-e times of execution is the photovoltaic power value of the time node to be predicted, and w and e are preset values.
The concept of decoding state and encoding state is basically the same, except that the decoding state is the input/output of the decoder of the quantum long short time memory network at each time node. The decoding hidden state is the hidden state input or output by the decoder of the quantum long-short-time memory network at each time node.
The method for determining the photovoltaic power value of the time node to be predicted based on the hidden state of the (k+1) th time node is still described below by taking the above photovoltaic power prediction data provided by the embodiment of the present application as an example.
Taking the hidden state h5 of the 5 th time node as a 1 st decoding hidden state q1;
inputting the 1 st decoding hidden state q1 into a quantum long-short-time memory network, and operating the quantum long-short-time memory network to obtain a 2 nd decoding hidden state q2;
inputting the 2 nd decoding hidden state q2 into a quantum long-short-time memory network, and operating the quantum long-short-time memory network to obtain the 3 rd decoding hidden state q3;
Inputting the 3 rd decoding hidden state q3 into a quantum long-short-time memory network, and operating the quantum long-short-time memory network to obtain a 4 th decoding hidden state q4;
inputting the 4 th decoding hidden state q4 into a quantum long-short-time memory network, and operating the quantum long-short-time memory network to obtain the 5 th decoding hidden state q5;
inputting the 5 th decoding hidden state q5 into a quantum long-short-time memory network, and operating the quantum long-short-time memory network to obtain the 6 th decoding hidden state q6;
w is 5,e and is 3, and the 4 th decoding hidden state q4 obtained by the 3 rd execution is executed 5 times,
The 5 th decoding hidden state q5 obtained by the 4 th execution and the 6 th decoding hidden state q6 obtained by the 5 th execution are the photovoltaic power values of the time node to be predicted;
the 4 th decoding hidden state q4 obtained by the 3 rd execution is the time node to be predicted 10: the 5 th decoding hidden state q5 obtained by the 4 th execution of the photovoltaic power value of 00 is the time node to be predicted 10:01, and the 6 th decoding hidden state q6 obtained by the 5 th execution is the time node to be predicted 10: 02.
In one embodiment of the application, the quantum long and short time memory network comprises a forgetting gate, an input gate, a memory gate and an output gate, wherein the forgetting gate, the input gate and the output gate comprise the variable component sub-circuit.
In one embodiment of the present application, the quantum long-short-time memory network further includes a sigmoid function and a tanh function.
The Sigmoid Function (Sigmoid Function) is an activation Function for mapping input values to successive outputs between 0 and 1. The mathematical definition is as follows:
σ(r)=1/(1+e^(-r))
where r is the input value and e is the base of the natural logarithm.
the tanh function (Hyperbolic Tangent Function), also known as the hyperbolic tangent function, is another activation function for mapping input values to a continuous output between-1 and 1. The mathematical definition is as follows:
tanh(r)=(e^r-e^(-r))/(e^r+e^(-r))
where r is the input value and e is the base of the natural logarithm.
The Sigmoid function and the tanh function are nonlinear functions, can perform nonlinear transformation on the output of a gating unit in a network, map the output into a specific range, have continuous and conductive properties, and facilitate model training and optimization.
Referring to fig. 6, fig. 6 is an exemplary schematic diagram of a quantum long and short time memory network provided by the present application. The quantum long and short time memory network shown in fig. 6 also comprises addition operationProduct operation->
In FIG. 6, when the input is photovoltaic power prediction data and its corresponding encoded hidden state, x t Photovoltaic power prediction data representing a t-th time node, h t Representing the t-th time sectionHidden state of point code, h t+1 Representing the encoded hidden state of the t +1 time node,representing the encoded cell state C of the calculated t+1st time node t+1 Intermediate value of C t Representing the encoded cell state of the t-th time node, C t+1 The encoded cell state of the t+1st time node is indicated.
The cell state refers to an internal state in a quantum long and short-term memory network for storing and transmitting information, and is a key component of the quantum long and short-term memory network for solving the problem of long-term dependence and controlling the flow of information. The cell state is updated at each time node and is passed on to the next time node in a round robin fashion, with the definition and update of the cell state being controlled by the gating mechanism of the quantum long short duration memory network to decide which information needs to be forgotten or retained and optionally to introduce new information from the input. The definition and updating process of the cell state enables the quantum long-short-term memory network to capture and memorize long-term dependency more effectively.
The quantum long and short time memory network shown in fig. 6 can process photovoltaic power prediction data x of the t-th time node according to the following formula t Coding hidden state h of t-th time node t Coded cell state C of the t-th time node t And obtains the coding hidden state h of the (t+1) th time node t+1 And encodes cell state C t+1 :
f t =σ(VQC fx (w fx x t )+VQC fh (w fh h t ))
O t =σ(VQC ox (w ox x t )+VQC oh (w oh h t ))
Sigma represents a sigmoid function, tanh represents a tanh function, and the forgetting gate comprises a variable component sub-circuit VQC fx And variable component sub-circuit VQC fh The input gate includes a variable component sub-circuit VQC ix And variable component sub-circuit VQC ih The memory gate includes a variable component sub-circuit VQC cx And variable component sub-circuit VQC ch The output gate includes a variable component sub-circuit VQC ox And variable component sub-circuit VQC oh ;VQC fx (w fx x t ) Photovoltaic power prediction data x representing the t-th time node t Input variable component sub-circuit VQC fx After that, VQC fx Wherein w is fx Weighting photovoltaic power prediction data for forgetting gate about t-th time node, VQC fh (w fh h t ) Representing the input of the coded hidden state of the t-th time node into the variable component sub-circuit VQC fh After that, VQC fh Wherein w is fh A weight of the code hidden state of the t time node for the forget gate; VQC (virtual QC) ix (w ix x t ) Photovoltaic power prediction data x representing the t-th time node t Input variable component sub-circuit VQC ix After that, VQC ix Wherein w is ix Weighting photovoltaic power prediction data of input gate with respect to t-th time node, VQC ih (w ih h t ) Representing the encoded hidden state h of the t-th time node t Input variable component sub-circuit VQC ih After that, VQC ih Wherein w is ih A weight for the code hidden state of the input gate with respect to the t-th time node;
VQC ox (w ox x t ) Photovoltaic power prediction data x representing the t-th time node t Input variable component sub-circuit VQC ox After that, VQC ox Wherein w is ox For outputting weights of photovoltaic power prediction data of gate about the t-th time node, VQC oh (w oh h t ) Representing the encoded hidden state h of the t-th time node t Input variable component sub-circuit VQC oh After that, VQC oh Wherein w is oh A weight of the code hidden state of the t-th time node for the output gate; VQC (virtual QC) cx (w cx x t ) Photovoltaic power prediction data x representing the t-th time node t Input variable component sub-circuit VQC cx After that, VQC cx Wherein w is cx Weighting of photovoltaic power prediction data for memory gate with respect to the t-th time node, VQC ch (w ch h t ) Representing the encoded hidden state h of the t-th time node t Input variable component sub-circuit VQC ch After that, VQC ch Wherein w is ch The weights of the hidden states for the codes of the memory gates with respect to the t-th time node.
In FIG. 6, x is when the input is the decode hidden state t Null value, h t Represents the t decoding hidden state, h t+1 Indicating the t +1 decoding hidden state, Representing the calculation of the t+1st decoded cell state C t+1 Intermediate value of C t Represents the t-th decoded cell state, C t+1 Represents the t+1st decoded cell state.
The quantum long and short time memory network shown in fig. 6 can process the t decoding hidden state h according to the following formula t T-th decoded cell state C t And obtains the (t+1) th decoding hidden state h t+1 And decoding cell state C t+1 :
f t =σ(VQC fh (w fh h t ))
i t =σ(VQ i C h (w ih h t ))
O t =σ(VQC oh (w oh h t ))
The forgetting gate comprises a variable component sub-circuit VQC fh The input gate includes a variable component sub-circuit VQC ih The memory gate includes a variable component sub-circuit VQC ch The output gate includes a variable component sub-circuit VQC oh ;VQC fh (w fh h t ) Representing the input of the t decoding hidden state into variable component sub-circuit VQC fh After that, VQC fh Wherein w is fh Weights for the forget gate about the t decoding hidden state; VQC (virtual QC) ih (w ih h t ) Representing the decoded hidden state h of the t t Input variable component sub-circuit VQC ih After that, VQC ih Wherein w is ih Weights for the input gate with respect to the t decoding hidden state; VQC (virtual QC) oh (w oh h t ) Representing the decoded hidden state h of the t t Input variable component sub-circuit VQC oh After that, VQC oh Wherein w is oh The weight of the decoding hidden state of the t-th decoding is outputted for the output gate; VQC (virtual QC) ch (w ch h t ) Representing the decoded hidden state h of the t t Input variable component sub-circuit VQC ch After that, VQC ch Wherein w is ch Weights for the memory gate with respect to the t decoding hidden state.
The quantum long-short-term memory network provided by the embodiment of the application comprises a forgetting gate, an input gate, a memory gate, an output gate and other gate control units, so that the time sequence relation in time sequence data can be effectively captured, and simultaneously, the characteristics on different space dimensions can be learned, thereby more comprehensively modeling the time-space relation; the quantum long-short time memory network allows information to be transferred and stored in the network, so that long-term dependence can be captured when time series data are processed, and the long-term dependence comprises the influence of past prediction data in photovoltaic power prediction on future photovoltaic power change; the combination of the activation function and the gating unit enables the quantum long-short-term memory network to have strong nonlinear mapping capability, and complex nonlinear relations in photovoltaic power data can be fitted better; meanwhile, the quantum long-short-term memory network can learn modes and rules in time sequence data, and has strong generalization capability. Based on the reasons, the quantum long-short time memory network provided by the embodiment of the application greatly improves the accuracy of photovoltaic power prediction.
In one embodiment of the application, the attribute data of the photovoltaic panel comprises a photovoltaic power value, a power trend value and a power period value, and the external environment data influencing photovoltaic power generation comprises temperature and illumination intensity.
According to the embodiment of the application, the model can be helped to better understand the running state of the photovoltaic system by adding the characteristic information input into the quantum long-short time memory network. The power trend value and the period value can capture the change trend and the periodic characteristic of the photovoltaic power, the temperature and the illumination intensity can reflect the environmental conditions of the photovoltaic system, and by taking the data as input, various aspects of the photovoltaic system can be more comprehensively considered, so that the accuracy of photovoltaic power prediction is greatly improved.
Referring to fig. 7, fig. 7 is a schematic flow chart of another photovoltaic power prediction method provided by the embodiment of the present application, and the following describes the flow chart of another photovoltaic power prediction method provided by the embodiment of the present application by taking fig. 7 as an example:
the method comprises the steps that photovoltaic power prediction data and corresponding coding states of a plurality of time nodes before a time node to be predicted are sequentially input to an encoder of a quantum long and short time memory network according to a time node sequence, the quantum long and short time memory network is operated, a 1 st time node coding state preset value is required to be input before the quantum long and short time memory network is operated each time, the photovoltaic power prediction data and the corresponding coding states of 1 time node are required to be input, and the coding state of the next time node of the time node, which is output by the quantum long and short time memory network and corresponds to the photovoltaic power prediction data input in the current operation, is obtained;
The quantum long and short time memory network comprises a forgetting gate, an input gate, a memory gate and an output gate, wherein the forgetting gate, the input gate, the memory gate and the output gate comprise a quantum long and short time memory circuit, and parameters of the quantum long and short time memory circuit are determined based on photovoltaic power prediction data or coding states corresponding to the photovoltaic power prediction data.
And after the last photovoltaic power prediction data and the corresponding coding state are input to the coder of the quantum long-short-time memory network and the quantum long-short-time memory network is operated, the coding state of the next time node of the time node corresponding to the last photovoltaic power prediction data can be obtained.
And executing the preset times to input the previous decoding state to a decoder of the quantum long-short time memory network and operating to obtain the next decoding state, wherein the 1 st decoding state is the encoding state of the next time node of the time nodes corresponding to the last photovoltaic power prediction data.
After the preset times are executed, the decoding hidden state output by the first preset time is the photovoltaic power value of the time node to be predicted.
And determining a photovoltaic power prediction result of the time node to be predicted based on the photovoltaic power value of the time node to be predicted.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a photovoltaic power prediction apparatus according to an embodiment of the present application, corresponding to the flow shown in fig. 8, where the apparatus includes:
the operation module 801 is configured to input photovoltaic power prediction data of a plurality of time nodes before a time node to be predicted to a quantum long-short time memory network, and operate the quantum long-short time memory network to obtain a photovoltaic power value of the time node to be predicted, where the photovoltaic power prediction data is external environment data affecting photovoltaic power generation and attribute data of a photovoltaic panel, and the quantum long-short time memory network includes a variable component sub-circuit, and parameters of part of logic gates in the variable component sub-circuit are determined based on the photovoltaic power prediction data;
a determining module 802, configured to determine a photovoltaic power prediction result of the time node to be predicted based on the photovoltaic power value of the time node to be predicted.
Optionally, the variable component sub-circuit includes a coding circuit and a variable component circuit connected in sequence, the coding circuit includes a first single-quantum logic gate acting on each qubit, the partial logic gates include the first single-quantum logic gate, and the variable component circuit includes a second single-quantum logic gate acting on each qubit and a multiple-quantum logic gate acting on multiple qubits; parameters of the second single quantum logic gate and the multiple quantum logic gate are determined based on training, and the variation circuit is used for performing variable component sub-coding on the quantum bit.
Optionally, the encoding circuit is configured to load the photovoltaic power prediction data or a hidden state corresponding to the photovoltaic power prediction data into a qubit, and the parameter of the first single quantum logic gate is determined based on the photovoltaic power prediction data or the hidden state corresponding to the photovoltaic power prediction data.
Optionally, the variable component sub-circuit further includes a RELU function circuit connected to the encoding circuit, the encoding circuit is configured to load a RELU activation value to a qubit, the parameter of the first single quantum logic gate is determined based on the RELU activation value, and the RELU activation value is obtained by activating the photovoltaic power prediction data or a hidden state corresponding to the photovoltaic power prediction data by the RELU function circuit.
Optionally, the number of RELU function circuits is one, the number of the coding circuits and the variation circuits is at least two, at least two coding circuits and the variation circuits are connected alternately, a parameter of a first single-quantum logic gate in the coding circuit connected with the RELU function circuits is determined based on the RELU activation value, and a parameter of a first single-quantum logic gate in the coding circuit not connected with the RELU function circuits is determined based on the output value of the variation circuit.
Optionally, the matrix form of the multiple quantum logic gate is:
wherein θ is a parameter of the multiple quantum logic gate.
Optionally, the attribute data of the photovoltaic panel includes a photovoltaic power value, a power trend value, and a power period value, and before the photovoltaic power prediction data of a plurality of time nodes before the time node to be predicted is input to the quantum long and short time memory network, the method further includes:
acquiring photovoltaic power values of a plurality of time nodes before the time node to be predicted;
constructing a track matrix of the photovoltaic power values, and carrying out singular value decomposition on the track matrix of the photovoltaic power values to obtain the product of a left singular matrix, a right singular matrix and a singular value matrix;
characteristic grouping is carried out on products of the left singular matrix, the right singular matrix and the singular value matrix, so that a trend part and a period part are obtained;
and respectively carrying out diagonal averaging treatment on the trend part and the period part to obtain power trend values and power period values of a plurality of time nodes before the time node to be predicted.
Optionally, the inputting the photovoltaic power prediction data of the time nodes before the time node to be predicted to the quantum long-short-time memory network, and operating the quantum long-short-time memory network to obtain the photovoltaic power value of the time node to be predicted includes:
Inputting photovoltaic power prediction data and a hidden state of a kth time node before a time node to be predicted into a quantum long-short-time memory network, and operating the quantum long-short-time memory network to obtain the hidden state of a kth+1th time node, wherein the initial value of k is 1;
let k=k+1, and return to execute the step to input the photovoltaic power prediction data and the hidden state of the kth time node before the time node to be predicted to the quantum long-short time memory network;
when k=u, determining a photovoltaic power value of the time node to be predicted based on the hidden state of the (k+1) th time node, wherein u is the number of time nodes before the time node to be predicted;
wherein, the hidden state of the 1 st time node is a preset value.
The embodiment of the application also provides a storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the method embodiments described above when run.
Specifically, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Still another embodiment of the present application provides an electronic device comprising a memory having a computer program stored therein and a processor configured to run the computer program to perform the steps of the method embodiment of any of the above.
Specifically, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Specifically, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, photovoltaic power prediction data of a plurality of time nodes before a time node to be predicted are input into a quantum long-short-time memory network, the quantum long-short-time memory network is operated to obtain a photovoltaic power value of the time node to be predicted, the photovoltaic power prediction data are external environment data affecting photovoltaic power generation and attribute data of a photovoltaic panel, the quantum long-short-time memory network comprises a variable component sub-circuit, and parameters of partial logic gates in the variable component sub-circuit are determined based on the photovoltaic power prediction data;
s2, determining a photovoltaic power prediction result of the time node to be predicted based on the photovoltaic power value of the time node to be predicted.
Specifically, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the optional implementation manners, and this embodiment is not repeated herein.
While the foregoing is directed to embodiments of the present application, other and further embodiments of the application may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow.
Claims (11)
1. A method of photovoltaic power prediction, the method comprising:
inputting photovoltaic power prediction data of a plurality of time nodes before a time node to be predicted into a quantum long-short-time memory network, and operating the quantum long-short-time memory network to obtain a photovoltaic power value of the time node to be predicted, wherein the photovoltaic power prediction data are external environment data influencing photovoltaic power generation and attribute data of a photovoltaic panel, the quantum long-short-time memory network comprises a variable component sub-circuit, and parameters of part of logic gates in the variable component sub-circuit are determined based on the photovoltaic power prediction data;
And determining a photovoltaic power prediction result of the time node to be predicted based on the photovoltaic power value of the time node to be predicted.
2. The method of claim 1, wherein the variable component sub-circuit comprises a coding circuit and a variable component circuit connected in sequence, the coding circuit comprising a first single-quantum logic gate acting on each qubit, the partial logic gates comprising the first single-quantum logic gate, the variable component circuit comprising a second single-quantum logic gate acting on each qubit and a multiple-quantum logic gate acting on multiple qubits; parameters of the second single quantum logic gate and the multiple quantum logic gate are determined based on training, and the variation circuit is used for performing variable component sub-coding on the quantum bit.
3. The method of claim 2, wherein the encoding circuit is to load the photovoltaic power prediction data or a hidden state corresponding to the photovoltaic power prediction data to a qubit, and wherein the parameter of the first single quantum logic gate is determined based on the photovoltaic power prediction data or the hidden state corresponding to the photovoltaic power prediction data.
4. The method of claim 2, wherein the variable component sub-circuit further comprises a RELU function circuit coupled to a coding circuit for loading a RELU activation value to a qubit, the parameter of the first single quantum logic gate being determined based on the RELU activation value, the RELU activation value resulting from the RELU function circuit activating the photovoltaic power prediction data or a hidden state corresponding to the photovoltaic power prediction data.
5. The method of claim 4, wherein the number of RELU function circuits is one, the number of encoding circuits and variation circuits is at least two, at least two of the encoding circuits and variation circuits are connected alternately, a parameter of a first single quantum logic gate in the encoding circuit connected to the RELU function circuit is determined based on the RELU activation value, and a parameter of a first single quantum logic gate in the encoding circuit not connected to the RELU function circuit is determined based on an output value of the variation circuit.
6. A method according to any one of claims 2 to 5, wherein the matrix form of the multiple quantum logic gate is:
wherein θ is a parameter of the multiple quantum logic gate.
7. The method of claim 1, wherein the attribute data of the photovoltaic panel includes a photovoltaic power value, a power trend value, a power period value, and wherein the method further comprises, prior to inputting the photovoltaic power prediction data for a plurality of time nodes prior to the time node to be predicted to the quantum long short time memory network:
acquiring photovoltaic power values of a plurality of time nodes before the time node to be predicted;
constructing a track matrix of the photovoltaic power values, and carrying out singular value decomposition on the track matrix of the photovoltaic power values to obtain the product of a left singular matrix, a right singular matrix and a singular value matrix;
Characteristic grouping is carried out on products of the left singular matrix, the right singular matrix and the singular value matrix, so that a trend part and a period part are obtained;
and respectively carrying out diagonal averaging treatment on the trend part and the period part to obtain power trend values and power period values of a plurality of time nodes before the time node to be predicted.
8. The method of claim 1, wherein inputting the photovoltaic power prediction data of the plurality of time nodes before the time node to be predicted into a quantum long short time memory network, and operating the quantum long time memory network to obtain the photovoltaic power value of the time node to be predicted comprises:
inputting photovoltaic power prediction data and a hidden state of a kth time node before a time node to be predicted into a quantum long-short-time memory network, and operating the quantum long-short-time memory network to obtain the hidden state of a kth+1th time node, wherein the initial value of k is 1;
let k=k+1, and return to execute the step to input the photovoltaic power prediction data and the hidden state of the kth time node before the time node to be predicted to the quantum long-short time memory network;
when k=u, determining a photovoltaic power value of the time node to be predicted based on the hidden state of the (k+1) th time node, wherein u is the number of time nodes before the time node to be predicted;
Wherein, the hidden state of the 1 st time node is a preset value.
9. A photovoltaic power generation apparatus, the apparatus comprising:
the operation module is used for inputting photovoltaic power prediction data of a plurality of time nodes before the time node to be predicted into a quantum long-short time memory network, and operating the quantum long-short time memory network to obtain a photovoltaic power value of the time node to be predicted, wherein the photovoltaic power prediction data are external environment data influencing photovoltaic power generation and attribute data of a photovoltaic panel, the quantum long-short time memory network comprises a variable component sub-circuit, and parameters of part of logic gates in the variable component sub-circuit are determined based on the photovoltaic power prediction data;
and the determining module is used for determining a photovoltaic power prediction result of the time node to be predicted based on the photovoltaic power value of the time node to be predicted.
10. A storage medium having a computer program stored therein, wherein the computer program is arranged to perform the method of any of claims 1 to 8 when run.
11. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of the claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311088128.3A CN117154698A (en) | 2023-08-25 | 2023-08-25 | Photovoltaic power prediction method and device, medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311088128.3A CN117154698A (en) | 2023-08-25 | 2023-08-25 | Photovoltaic power prediction method and device, medium and electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117154698A true CN117154698A (en) | 2023-12-01 |
Family
ID=88886031
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311088128.3A Pending CN117154698A (en) | 2023-08-25 | 2023-08-25 | Photovoltaic power prediction method and device, medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117154698A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117933754A (en) * | 2024-01-30 | 2024-04-26 | 华北电力大学 | Comprehensive energy microgrid evaluation generation system and method based on variable component sub-algorithm |
-
2023
- 2023-08-25 CN CN202311088128.3A patent/CN117154698A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117933754A (en) * | 2024-01-30 | 2024-04-26 | 华北电力大学 | Comprehensive energy microgrid evaluation generation system and method based on variable component sub-algorithm |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Yang et al. | Fast economic dispatch in smart grids using deep learning: An active constraint screening approach | |
Martinez et al. | LSQ++: Lower running time and higher recall in multi-codebook quantization | |
US11699079B2 (en) | Systems and methods for time series analysis using attention models | |
CN112766078A (en) | Power load level prediction method of GRU-NN based on EMD-SVR-MLR and attention mechanism | |
CN117154698A (en) | Photovoltaic power prediction method and device, medium and electronic device | |
CN109934295B (en) | Image classification and reconstruction method based on transfinite hidden feature learning model | |
Chitty-Venkata et al. | A survey of techniques for optimizing transformer inference | |
CN115699029A (en) | Knowledge distillation using back-propagation knowledge in neural networks | |
Li et al. | Training neural networks by lifted proximal operator machines | |
CN116187548A (en) | Photovoltaic power generation power prediction method and device, storage medium and electronic device | |
Zhou et al. | IF2CNN: Towards non-stationary time series feature extraction by integrating iterative filtering and convolutional neural networks | |
Tabani et al. | Improving the efficiency of transformers for resource-constrained devices | |
CN116014722A (en) | Sub-solar photovoltaic power generation prediction method and system based on seasonal decomposition and convolution network | |
CN114897274A (en) | Method and system for improving time sequence prediction effect | |
Zhu et al. | Associative learning mechanism for drug‐target interaction prediction | |
Feng et al. | Orthogonal random projection for tensor completion | |
Paul et al. | Non-iterative online sequential learning strategy for autoencoder and classifier | |
CN117744855A (en) | Load prediction system and method based on machine learning | |
CN116611313A (en) | Wind power generation power prediction method based on Transformer and oriented to super computing platform | |
CN115577872A (en) | Structured data prediction optimization method based on multi-energy intelligent agent deep reinforcement learning | |
CN111984418B (en) | Automatic adjusting and optimizing method and device for granularity parameters of sparse matrix vector multiplication parallel tasks | |
He | A Survey on Time Series Forecasting | |
CN117674091A (en) | Photovoltaic output power prediction method and related device based on dual-attention network | |
CN116415741B (en) | Coal consumption prediction method and system for coal-fired power plant based on deep learning | |
Wang et al. | Stock price forecasting based on wavelet filtering and ensembled machine learning model |
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 |