Photovoltaic array composite fault diagnosis method and system based on quantum LSTM
Through the photovoltaic array composite fault diagnosis method based on quantum LSTM, the hyperparameters of the LSTM network model are optimized using quantum evolution algorithms, and the problem of low composite fault diagnosis efficiency and accuracy of photovoltaic systems in the existing technology is solved, achieving efficient and accurate fault identification and diagnosis.
Patent Information
- Application Number
- CN202411984895.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-06-03
AI Technical Summary
When existing photovoltaic system fault detection methods face complex scenarios where multiple faults are intertwined and coexist, the diagnostic efficiency and accuracy are significantly reduced, making it difficult to accurately identify composite faults.
The photovoltaic array composite fault diagnosis method is adopted based on quantum LSTM. By acquiring the operating data of the photovoltaic array, it is input into the pre-constructed quantum LSTM network model for fault diagnosis. This model optimizes hyperparameters in the LSTM network model based on quantum evolution algorithms, and uses quantum entanglement effects to capture potential associations in complex failures.
It improves the speed and diagnostic accuracy of complex data processing of photovoltaic arrays, can effectively identify multiple types of composite faults, significantly improves diagnostic efficiency and accuracy, and reduces system failure rate and maintenance costs.
Smart Images

Figure CN120086515A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of new energy system fault diagnosis and artificial intelligence, and particularly to a photovoltaic array composite fault diagnosis method and system based on quantum LSTM. Background Art
[0002] During the long-term operation of a photovoltaic power generation system, affected by environmental factors, component aging, and external interference, different types of faults often occur. These faults not only reduce the power generation efficiency of the photovoltaic system but may also cause more serious equipment damage, increase maintenance costs, and further affect the stability of the system. Therefore, being able to timely and accurately diagnose faults in the photovoltaic system, especially complex composite faults, is the key to ensuring the stable operation of the photovoltaic system. However, the fault types of the photovoltaic array are diverse, and there are complex correlations between faults, making traditional fault detection technologies face huge challenges.
[0003] Currently, the fault detection methods for photovoltaic systems mainly include infrared imaging method and I-U characteristic curve measurement method, etc. However, these methods have their limitations in practical applications: the infrared imaging method relies on infrared imaging equipment and is easily affected by noise and uneven imaging, resulting in inaccurate final fault detection results; the I-U characteristic curve measurement method is not sensitive to fault problems such as abnormal aging, and no significant changes will be shown in the curve. Therefore, the existing fault detection methods for photovoltaic systems have low accuracy, and the diagnostic efficiency and accuracy are even lower when facing complex scenarios where multiple faults coexist. Summary of the Invention
[0004] To overcome the deficiencies of the above-mentioned prior art, the present invention proposes a photovoltaic array composite fault diagnosis method based on quantum LSTM, including:
[0005] Obtain the data to be diagnosed during the operation of the photovoltaic array;
[0006] Input the data to be diagnosed into a pre-constructed quantum LSTM network model for fault diagnosis to obtain the fault diagnosis result of the photovoltaic array;
[0007] The quantum LSTM network model is obtained by optimizing the hyperparameters in the pre-constructed LSTM network model based on the typical characteristic data during the operation of the photovoltaic array and combining with the quantum evolutionary algorithm.
[0008] Optionally, the pre-construction process of the quantum LSTM network model includes:
[0009] Extract typical characteristic data from the operation data of the photovoltaic array in multiple operating states, and divide the operation data after feature extraction into a training set and a validation set;
[0010] Optimize the hyperparameters in the LSTM network model based on the training set and the validation set using the quantum evolutionary algorithm to obtain the optimal hyperparameters;
[0011] Train the LSTM network model with the optimal hyperparameters based on the training set to obtain a trained quantum LSTM network model.
[0012] Optionally, the step of optimizing the hyperparameters in the LSTM network model based on the training set and the validation set using the quantum evolutionary algorithm to obtain the optimal hyperparameters includes:
[0013] Based on the preset population size in the quantum evolutionary algorithm and the preset value range of the hyperparameters to be optimized in the LSTM network model, initialize the population of the quantum evolutionary algorithm using the niche algorithm to obtain multiple population individuals in each population, where each population individual corresponds to a set of the hyperparameters;
[0014] Based on each population individual, update the hyperparameters of the LSTM network model using the population individual, train the updated LSTM network model based on the training set to obtain the trained LSTM network model; validate the trained LSTM network model using the validation set to obtain the fitness of the population individual;
[0015] Perform quantum crossover and mutation on each population individual to obtain new population individuals, and obtain the fitness of each new population individual;
[0016] Based on the population individual and the population individual with the highest fitness among the new population individuals, perform quantum rotation on the new population individuals to obtain the next-generation population individuals;
[0017] If the next-generation population individuals meet the iteration termination condition, use the hyperparameters corresponding to the population individual with the highest fitness among the next-generation population individuals as the optimal hyperparameters, otherwise perform quantum crossover and mutation on the next-generation population individuals and continue to iterate until the iteration termination condition is reached.
[0018] Optionally, after performing quantum crossover and mutation on each population individual to obtain new population individuals and obtaining the fitness of each new population individual, it further includes:
[0019] Use the elitist retention strategy to obtain and retain the population individual with the highest fitness from each population individual and the new population individuals;
[0020] The retained population individual with the highest fitness is used to integrate into the next-generation population individuals.
[0021] Optionally, validating the trained LSTM network model using the validation set to obtain the fitness of the population individuals includes:
[0022] Using the trained LSTM network model to predict the validation set to obtain a prediction result;
[0023] Validating the accuracy rate of the prediction result and using the accuracy rate as the fitness of the population individuals.
[0024] Optionally, updating the hyperparameters of the LSTM network model using the population individuals includes:
[0025] Decoding the rabbit individuals in the population individuals to obtain the hyperparameters in the population individuals;
[0026] Updating the hyperparameters of the LSTM network model using the hyperparameters of the population individuals to obtain the updated LSTM network model.
[0027] Optionally, performing quantum rotation on the new population individuals based on the population individuals and the population individual with the highest fitness in the new population individuals to obtain the next-generation population individuals includes:
[0028] Comparing the fitness of the new population individuals with the fitness of the population individual with the highest fitness in the population individuals to determine the rotation direction of the new population individuals;
[0029] Selecting the rotation angle of the new population individuals according to the qubit measurement results and quantum probability amplitudes of the new population individuals;
[0030] Performing a quantum rotation operation on the new population individuals based on the rotation angle and rotation direction to obtain the next-generation population individuals.
[0031] Optionally, extracting typical characteristic data from the operation data of the photovoltaic array under multiple operating states includes:
[0032] Based on the simulation model of the photovoltaic array, extracting typical characteristic data from the operation data of the photovoltaic array under multiple operating states to obtain the typical characteristic data of the photovoltaic array under multiple operating states;
[0033] The multiple operating states include one or more of the following: normal working state, short-circuit fault state, open-circuit fault state, aging fault state, partial shading state, aging fault state, short-circuit shading state, and open-circuit shading state;
[0034] The typical characteristic data includes one or more of the following: open-circuit voltage, short-circuit current, maximum power point voltage, maximum power current, maximum power, fill factor, temperature, and light intensity.
[0035] Optionally, the LSTM network model is constructed by adding a regularization layer after each of the two LSTM layers of the original LSTM network model;
[0036] The original LSTM network model includes an input layer, two LSTM layers, a fully connected layer, and an output layer connected in sequence.
[0037] Based on the same inventive concept, the present invention proposes a photovoltaic array composite fault diagnosis system based on quantum LSTM, including:
[0038] A data acquisition module for acquiring data to be diagnosed during the operation of the photovoltaic array;
[0039] A fault diagnosis module for inputting the data to be diagnosed into a pre-constructed quantum LSTM network model for fault diagnosis to obtain a fault diagnosis result of the photovoltaic array;
[0040] The quantum LSTM network model is obtained by optimizing hyperparameters in a pre-constructed LSTM network model based on typical feature data during the operation of the photovoltaic array and combining a quantum evolutionary algorithm.
[0041] Optionally, the system further includes a model pre-construction module for:
[0042] Extracting typical feature data from the operation data of the photovoltaic array in multiple operating states, and dividing the operation data after feature extraction into a training set and a validation set;
[0043] Using a quantum evolutionary algorithm based on the training set and the validation set to optimize hyperparameters in the LSTM network model to obtain optimal hyperparameters;
[0044] Training the LSTM network model with the optimal hyperparameters based on the training set to obtain a quantum LSTM network model that has completed training.
[0045] Optionally, the model pre-construction module is specifically used for:
[0046] Based on the preset population size in the quantum evolutionary algorithm and the preset value range of the hyperparameters to be optimized in the LSTM network model, initializing the population of the quantum evolutionary algorithm using a niche algorithm to obtain multiple population individuals in each population, where each population individual corresponds to a set of hyperparameters;
[0047] Based on each of the population individuals, use the population individuals to update the hyperparameters of the LSTM network model, and train the updated LSTM network model based on the training set to obtain the trained LSTM network model; use the validation set to validate the trained LSTM network model to obtain the fitness of the population individuals;
[0048] Perform quantum crossover and mutation on each of the population individuals to obtain new population individuals, and obtain the fitness of each of the new population individuals;
[0049] Based on the population individual with the highest fitness among the population individuals and the new population individuals, perform quantum rotation on the new population individuals to obtain the next generation of population individuals;
[0050] If the next generation of population individuals meets the iteration termination condition, use the hyperparameters corresponding to the population individual with the highest fitness among the next generation of population individuals as the optimal hyperparameters, otherwise perform quantum crossover and mutation on the next generation of population individuals and continue to iterate until the iteration termination condition is reached.
[0051] Optionally, the model pre-construction module is further configured to:
[0052] Use the elite retention strategy to obtain and retain the population individual with the highest fitness from each of the population individuals and the new population individuals;
[0053] The retained population individual with the highest fitness is used to integrate into the next generation of population individuals.
[0054] Optionally, the model pre-construction module is specifically configured to:
[0055] Use the trained LSTM network model to predict the validation set to obtain a prediction result;
[0056] Verify the accuracy rate of the prediction result and use the accuracy rate as the fitness of the population individual.
[0057] Optionally, the model pre-construction module is specifically configured to:
[0058] Decode the rabbit individuals of the population individuals to obtain the hyperparameters in the population individuals;
[0059] Use the hyperparameters of the population individuals to update the hyperparameters of the LSTM network model to obtain the updated LSTM network model.
[0060] Optionally, the model pre-construction module is specifically configured to:
[0061] Compare the fitness of the new population individuals with the fitness of the population individual with the highest fitness in the population to determine the rotation direction of the new population individuals;
[0062] Select the rotation angle of the new population individuals according to the qubit measurement results and quantum probability amplitudes of the new population individuals;
[0063] Perform a quantum rotation operation on the new population individuals based on the rotation angle and rotation direction to obtain the population individuals of the next generation.
[0064] Optionally, the model pre-construction module is specifically configured to:
[0065] Based on the simulation model of the photovoltaic array, extract typical characteristic data from the operation data of the photovoltaic array in multiple operation states to obtain the typical characteristic data of the photovoltaic array in multiple operation states;
[0066] The multiple operation states include one or more of the following: normal working state, short-circuit fault state, open-circuit fault state, aging fault state, partial shading state, aging fault state, short-circuit shading state, and open-circuit shading state;
[0067] The typical characteristic data includes one or more of the following: open-circuit voltage, short-circuit current, maximum power point voltage, maximum power current, maximum power, fill factor, temperature, and light intensity.
[0068] Optionally, the LSTM network model in the system is constructed by adding a regularization layer after each of the two LSTM layers of the original LSTM network model;
[0069] The original LSTM network model includes an input layer, two LSTM layers, a fully connected layer, and an output layer connected in sequence.
[0070] On the other hand, the present application also provides an electronic device, including: at least one processor and a memory; the memory and the processor are connected by a bus;
[0071] The memory is used to store one or more programs;
[0072] When the one or more programs are executed by the at least one processor, the photovoltaic array composite fault diagnosis method based on quantum LSTM as described above is implemented.
[0073] On the other hand, the present application also provides a computer-readable storage medium, on which an execution program is stored, and when the execution program is executed, the photovoltaic array composite fault diagnosis method based on quantum LSTM as described above is implemented.
[0074] Compared with the closest prior art, the beneficial effects of the present invention are as follows:
[0075] The photovoltaic array composite fault diagnosis method and system based on quantum LSTM provided by the present invention include: obtaining the data to be diagnosed during the operation of the photovoltaic array; inputting the data to be diagnosed into a pre-constructed quantum LSTM network model for fault diagnosis to obtain the fault diagnosis result of the photovoltaic array; the quantum LSTM network model is obtained by optimizing the hyperparameters in the pre-constructed LSTM network model based on the typical characteristic data during the operation of the photovoltaic array and combining with the quantum evolutionary algorithm. The quantum LSTM network model of the present invention can capture the potential correlations in complex faults through the quantum entanglement effect, and the LSTM network can efficiently identify and diagnose under incomplete data. Therefore, using the quantum algorithm to optimize the hyperparameters of LSTM can improve the diagnosis efficiency and accuracy of the model; training the optimized LSTM network model based on the typical characteristic data can enable the model to identify the faults in the operation data and achieve the purpose of fault diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 It is a schematic flowchart of the photovoltaic array composite fault diagnosis method based on quantum LSTM provided by the present invention;
[0077] Figure 2 It is a schematic flowchart of the construction method of the quantum LSTM network model provided by the present invention;
[0078] Figure 3 It is the single-diode five-parameter equivalent circuit of the photovoltaic cell provided by the present invention;
[0079] Figure 4 It is the I-U output characteristic curve and P-U output characteristic curve at different temperatures provided by the present invention;
[0080] Figure 5 It is the I-U output characteristic curve and P-U output characteristic curve at different light intensities provided by the present invention;
[0081] Figure 6 It is the photovoltaic array model built in the Simulink environment provided by the present invention;
[0082] Figure 7 It is the structural schematic diagram of the LSTM network model provided by the present invention;
[0083] Figure 8 It is the schematic diagram of the elitist retention strategy provided by the present invention;
[0084] Figure 9 It is the schematic flowchart of the quantum evolutionary algorithm provided by the present invention;
[0085] Figure 10 Schematic diagram of the structure of the photovoltaic array composite fault diagnosis system based on quantum LSTM provided by the present invention;
[0086] Figure 11 Schematic diagram of the structure of an electronic device provided by the present invention. Specific embodiments
[0087] The fault problem of the photovoltaic array is the main difficulty and challenge faced by the safe, reliable and economic operation of the photovoltaic power generation system. From a safety perspective, such faults threaten the safety of power station equipment and operation and maintenance personnel, increase the accident risk and pose potential safety hazards; from a reliability perspective, such faults accelerate the equipment damage, reduce the maintainability of the equipment, and affect the equipment life and performance; from an economic perspective, such faults increase the power generation loss, reduce the overall revenue of the power station, and accelerate the asset depreciation speed.
[0088] Regarding the intelligent diagnosis problem of various types of composite faults caused by complex environmental conditions, component aging and external disturbances during the long-term operation of the photovoltaic array. In addition to the infrared imaging method and the I-U characteristic curve measurement method mentioned above, the existing photovoltaic array fault detection methods also include the circuit structure analysis method and the mathematical model method. The circuit structure analysis method requires complex hardware installation and has a high cost; the mathematical model method requires accurate modeling and consideration of various parameters in the photovoltaic system, otherwise it is difficult to fully reflect the actual operating state of the system.
[0089] In summary, the existing photovoltaic array fault detection methods have significantly reduced diagnostic efficiency and accuracy when facing complex scenarios where multiple faults are intertwined. Therefore, an efficient, intelligent method that can diagnose various types of composite faults and has good practicability is needed to solve the limitations in the prior art, ensure the efficient and stable operation of the photovoltaic system, and provide important technical support for the maintenance and management of the photovoltaic system. The photovoltaic array composite fault diagnosis method and system based on quantum LSTM provided by the present invention aim to solve the intelligent diagnosis problem of various types of composite faults caused by complex environmental conditions, component aging and external disturbances during the long-term operation of the photovoltaic array, and have broad application prospects and practical value.
[0090] The following further elaborates on the specific embodiments of the present invention with reference to the accompanying drawings.
[0091] Embodiment 1
[0092] The photovoltaic array composite fault diagnosis method based on quantum LSTM provided by the present invention, as Figure 1 shown, includes:
[0093] S1. Obtain the data to be diagnosed during the operation of the photovoltaic array;
[0094] S2. Input the data to be diagnosed into a pre-constructed quantum LSTM network model for fault diagnosis to obtain the fault diagnosis result of the photovoltaic array;
[0095] The quantum LSTM network model is obtained by optimizing the hyperparameters in a pre-constructed LSTM network model based on the typical characteristic data during the operation of the photovoltaic array and combining with the quantum evolutionary algorithm.
[0096] In step S2, before performing fault detection on the data to be diagnosed, a quantum LSTM network model for fault detection needs to be pre-constructed.
[0097] S21. As Figure 2 shown, construct the quantum LSTM network model in the following manner.
[0098] S21-1. Select the machine learning features for constructing the quantum LSTM network model during the operation of the photovoltaic array.
[0099] As the basic unit of a photovoltaic module, a photovoltaic cell will absorb photons inside under sunlight irradiation, generating electron-hole pairs. Due to the existence of an electric field, electrons start to move and form a terminal voltage after a period of aggregation. When the two ends of the cell are connected to a load, current flows through the load, thus generating power. During actual use, the output of a photovoltaic cell is affected by various uncertain factors, such as environmental conditions (temperature, light intensity, etc.), resulting in unstable output.
[0100] A photovoltaic module is composed of multiple photovoltaic cells connected in series, and a photovoltaic array is formed by connecting photovoltaic modules in series and parallel. In an ideal situation, a photovoltaic cell can be equivalent to an ideal DC power source and is connected in parallel with a diode. As Figure 3 shown, it is the single-diode five-parameter equivalent circuit of a photovoltaic cell. Figure 3 In it, R s represents the equivalent series resistance, R sh represents the shunt resistance, C represents the capacitance. According to Kirchhoff's current law, we can get:
[0101] I = I Ph - I 0 - I RS
[0102] Among them, I represents the output current of the photovoltaic cell; I Ph is the photocurrent; I 0 represents the reverse saturation current of the diode; I RS is the current flowing through the equivalent series resistance R s .
[0103] The output characteristic equation of the photovoltaic cell equivalent circuit is:
[0104]
[0105] Among them, A represents the ideality factor of the P-N diode of the photovoltaic cell; T represents the actual temperature of the photovoltaic cell; k is the Boltzmann constant, k = 1.381×10 -23 J / K, where J / K represents the ratio of energy change with temperature; q represents the charge constant, q = 1.602×10 -19 C, where C represents the charge unit coulomb; U represents the output voltage of the photovoltaic cell; exp represents the exponential function.
[0106] According to the output characteristic equation, the I-U output characteristics of the photovoltaic module are affected by 5 internal parameters I Ph 、I 0 、A、R s 、R sh . When the internal parameters change due to faults or environmental factors, the output characteristics of the photovoltaic module will also change accordingly.
[0107] In the equivalent circuit model of the photovoltaic cell, the series resistance R s and the parallel resistance R sh directly affect the output characteristics of the cell, such as the open-circuit voltage, short-circuit current, maximum power point voltage and current. The goal is to achieve fault diagnosis based on the input characteristics observed externally, which have indirectly reflected the changes in the internal parameters.
[0108] The influence of external environmental factors on the output characteristics of the photovoltaic module is particularly significant. Especially, the changes in the light intensity G and temperature T play a dominant role in the output characteristics. Figure 4 and Figure 5 respectively show the output characteristic curves of the photovoltaic array under temperature change and light intensity change. Figure 4 The left curve graph represents the I-U output characteristic curves at different temperatures. The horizontal axis represents the output voltage of the photovoltaic cell, and the vertical axis represents the output current of the photovoltaic cell; the right curve graph represents the P-U output characteristic curves at different temperatures. The horizontal axis represents the output voltage of the photovoltaic cell, and the vertical axis represents the output power of the photovoltaic cell. As Figure 4 shown, when the light intensity is fixed at G = 1000 W / m 2 (where W / m 2 represents the radiation power received per unit area), as the temperature increases, the short-circuit current is less affected by the temperature, while the open-circuit voltage decreases, and the maximum power voltage and maximum power current gradually decrease, resulting in a decrease in the maximum power.
[0109] Figure 5The left curve graph shows the I-U output characteristic curves under different light intensities. The horizontal axis represents the output voltage of the photovoltaic cell, and the vertical axis represents the output current of the photovoltaic cell. The right curve graph shows the P-U output characteristic curves under different light intensities. The horizontal axis represents the output voltage of the photovoltaic cell, and the vertical axis represents the output power of the photovoltaic cell. When the ambient temperature is fixed at T = 25 °C, as the light intensity increases, the short-circuit current increases significantly, and the maximum power also increases significantly, while the maximum power voltage and the open-circuit voltage remain almost unchanged.
[0110] Under standard conditions, there are four typical single faults in a photovoltaic array, namely short circuit, open circuit, aging, and partial shading. During actual on-site operation, more than one type of fault may occur in the photovoltaic array during operation, such as combined faults like short-circuit shading, open-circuit shading, and aging shading occurring simultaneously. A short-circuit fault occurs due to an accidental short circuit between two different potential points in the photovoltaic array. In an actual system, the probability of multiple branches opening simultaneously is extremely low. In most cases, an open-circuit fault means that one line in the photovoltaic array is disconnected, resulting in no current loop. Most aging faults refer to an increase in the internal series resistance due to the extended operation time of the photovoltaic array. Since the photovoltaic array is prone to being blocked by trees, buildings, etc., local shading phenomena will occur, affecting the output power of the photovoltaic array. The three combined faults are formed by the above simulations.
[0111] The fill factor (FF) is an important factor for measuring the conversion efficiency of a photovoltaic cell and is one of the important indicators for measuring the performance of photovoltaic cell chips. The higher the fill factor, the better the performance of the photovoltaic cell.
[0112]
[0113] Among them, I m is the maximum power current on the I-U curve of the photovoltaic cell, U m is the maximum power voltage on the I-U curve of the photovoltaic cell, I SC is the short-circuit current, U OC is the open-circuit voltage.
[0114] According to the above fault analysis, each type of fault will cause obvious changes in several variables among the maximum power current I m , the maximum power P m , the open-circuit voltage U OC , the short-circuit current I SC and the fill factor FF. Since, through the above analysis, the temperature T and light intensity G of the external environment will also affect the fault characteristics, therefore, in this solution, the open-circuit voltage U OC , the short-circuit current I SC , the maximum power point voltage U m , the maximum power current Im 、 The maximum power P m 、 The fill factor FF, temperature T, and light intensity G, these 8 features are used as machine learning features for constructing a quantum LSTM network model, that is, as the input layer variables of the fault diagnosis model (quantum LSTM network model).
[0115] At the same time, according to the fault types of the photovoltaic array, 8 output layer variables of the diagnostic model are correspondingly defined. The 8 output layer variables are normal operating state, short - circuit fault state, open - circuit fault state, aging fault state, partial shading state, aging fault state, short - circuit shading state, and open - circuit shading state respectively.
[0116] S21 - 2. Extract typical feature data from the operation data of the photovoltaic array under various operating states, and divide the operation data after feature extraction into a training set and a validation set.
[0117] Specifically, build a simulation model of a photovoltaic array with a scale of 3×3 (photovoltaic modules) in the MATLAB / Simulink environment (Simulink is an add - on component in MATLAB, a graphical environment for multi - domain simulation and model - based design), as Figure 6 shown.
[0118] Figure 6 In which m represents the output terminal or connection point of the photovoltaic module; Ir represents the solar irradiance intensity (radiation), with the unit of W / m 2 ; T represents the temperature (Temperature), with the unit of degrees Celsius; E represents an element in the equivalent circuit of the photovoltaic array; Ipv represents the output current of the photovoltaic array; Vpv represents the output voltage of the photovoltaic array; Ppv represents the output power of the photovoltaic array; R1 and R2 both represent the resistances in the photovoltaic cell.
[0119] By running the simulation model, obtain the operation data of the photovoltaic array under various operating states, and extract fault data and normal operation data from the operation data. Respectively perform typical feature data extraction on the fault data and normal operation data to obtain the typical feature data of the photovoltaic array under various operating states.
[0120] The various operating states include one or more of the following: normal operating state, short - circuit fault state, open - circuit fault state, aging fault state, partial shading state, aging fault state, short - circuit shading state, and open - circuit shading state;
[0121] The typical feature data includes one or more of the following: open - circuit voltage, short - circuit current, maximum power point voltage, maximum power current, maximum power, fill factor, temperature, and light intensity.
[0122] Divide the operation data after feature extraction into a training set and a validation set. It also includes dividing a part of the test set for validating the constructed quantum LSTM network model.
[0123] S21-3: Use the quantum evolutionary algorithm to optimize the hyperparameters in the LSTM network model based on the training set and the validation set to obtain the optimal hyperparameters.
[0124] Among them, the LSTM network model, that is, the Long Short-Term Memory (LSTM) is a special type of Recurrent Neural Network (RNN). It has the characteristics of most RNN network models, introduces memory cells, can maintain information in long sequences, and avoids the gradient vanishing or explosion problems in traditional RNNs. LSTM is often used to process and predict time series data and has the ability to capture long-term dependencies with memory cells. The LSTM network architecture adopts a gating mechanism (input gate, forget gate, and output gate) and memory cells to learn and remember long-term dependencies, and effectively manages and filters the current input information. Dropout (a regularization technique) is a method of randomly deactivating some nodes during the training of a neural network, which can reduce the overfitting phenomenon of the model. Therefore, a Dropout layer is added to the LSTM model architecture to prevent overfitting during model training.
[0125] After trial calculations, it is determined that using two LSTM and Dropout layers connected in sequence, with the node failure probability set to 0.2, and using the Adam (Adaptive Moment Estimation) optimization algorithm to train the network, the composed model architecture can well balance the stability and accuracy of training.
[0126] Specifically, the LSTM network model used in this solution is constructed by adding a regularization layer (Dropout layer) after each of the two LSTM layers in the original LSTM network model, as Figure 7 shown;
[0127] The original LSTM network model includes an input layer, two LSTM layers, a fully connected layer (Dense layer), and an output layer connected in sequence.
[0128] When constructing an LSTM network model, multiple hyperparameters need to be set, such as the initial learning rate, the number of neurons in the hidden layer, etc. The selection of these hyperparameters has an important impact on the performance of the LSTM. However, there is currently no mature theoretical method to accurately select them. Usually, the selection of hyperparameters depends on empirical estimation or through repeated experiments to determine a suitable range to ensure that the trained model can achieve the required accuracy, which also leads to the inefficiency of the modeling process. In order to improve the performance of the LSTM network, it is particularly important to select a suitable optimization algorithm. By validating 10 different types of test functions, it is proved that the quantum evolutionary algorithm performs the best among the selected algorithms.
[0129] Therefore, in this solution, the quantum evolutionary algorithm is used to optimize the following three hyperparameters in the LSTM model architecture: the initial learning rate, the number of neurons in hidden layer 1, and the number of neurons in hidden layer 2. The quantum evolutionary algorithm is combined with the LSTM architecture model to construct a quantum LSTM model.
[0130] Among them, the quantum evolutionary algorithm is a type of intelligent algorithm that has developed rapidly since the beginning of the 21st century. It is an evolutionary algorithm based on quantum computing and has great research and application value. The essential characteristics of quantum algorithms lie in the coherence, superposition, and entanglement of their quantum states, while quantum algorithms are the products in the field of intelligent algorithms, and their most significant feature is the quantum parallelism. Due to the inherent uncertainty and randomness in the quantum computing process itself, its information processing is more complex than classical information processing. Quantum algorithms and probabilistic algorithms show similar characteristics to some extent. In probabilistic algorithms, the state of the system is not uniquely determined but is closely related to the probabilities of each state. Quantum algorithms can achieve their randomness by performing random operations on the quantum system. Similar to probabilistic algorithms, quantum algorithms also need to consider the problem of normalizing the probability amplitudes of quantum states, which is particularly important in quantum algorithms.
[0131] In this solution, based on the standard quantum evolutionary algorithm, by introducing the niche co-evolution strategy during the population initialization process, the entire population is divided into multiple niches (i.e., multiple sub-populations with different adaptabilities), thereby simulating the co-evolution relationship between different habitats in nature and enhancing the population diversity and local optimization ability. A niche, in a biological sense, refers to a living environment under specific circumstances; and its manifestation in nature is that some individuals with very similar characteristics, shapes, etc. are together, which can be said to reproduce offspring with their own kind. The niche technology will classify each generation specifically, then select the best individuals from the classified individuals, and finally cross these best varieties of different categories to generate a new population of individuals. On this basis, adopting the elitist retention strategy means that the individual with the highest fitness in each generation will be directly retained to ensure that the optimal solution is not lost, thus accelerating the convergence process. In addition, the Cauchy-Gaussian mutation strategy combines the mutation methods of the Cauchy distribution and the Gaussian distribution, enabling the quantum genetic algorithm to achieve a better balance between global search and local search and enhancing the algorithm's ability to jump out of local optimal solutions.
[0132] In the standard quantum evolutionary algorithm, the individuals of the offspring population all come from the parent population, and the excellent individuals of the parent population are destroyed during the iteration in the evolutionary process. Therefore, this problem is solved by the elitist retention strategy. As Figure 8 shown, NP is the number of population individuals. First, search and evaluate the optimal individual best in the parent population Q(t), store best in the elite library. After each quantum crossover and mutation operation, evaluate the offspring population Q(t + 1), discard the individual with the worst fitness value in Q(t + 1), and merge the optimal individual best in the elite library into Q(t + 1) to finally form the offspring population Q'(t + 1), and then perform the quantum gate operation.
[0133] Combined with the above elitist retention strategy, the process of the quantum evolutionary algorithm is as Figure 9 shown:
[0134] Step 1: Initialize the niche population. Determine the number of niche populations and the values of parameters such as the range of hyperparameters to be optimized.
[0135] Step 2: Fitness evaluation. Calculate the fitness value of the current individual, decode the population individuals, use them as new hyperparameters of the LSTM network and train, and predict and evaluate the validation set. Use the accuracy of the validation set as the fitness function to find the optimal solution.
[0136] Step 3: Quantum crossover and mutation. The crossover operation adopts single-point crossover. A crossover point is randomly generated, and then the qubits after the crossover bit are swapped, while other segments remain unchanged. The mutation operation adopts quantum NOT gate mutation. The probability amplitudes of the selected quantum mutation bits are operated on by the quantum NOT gate to swap the probabilities of the quantum observing the 0 or 1 state, thereby changing the result of the chromosome observation.
[0137] Step 4: Elite retention strategy. The above elite retention strategy is adopted to directly retain the individual with the highest fitness in each generation, ensuring that the optimal solution is not lost, thereby accelerating the convergence process.
[0138] Step 5: Quantum rotation gate update. The quantum rotation gate compares the fitness value of each individual with the optimal individual in the population, selects the rotation angle according to the qubit measurement result and the value of the quantum probability amplitude, and performs a rotation operation on the current individual, so that the individuals in the entire population converge towards the optimal individual.
[0139] Step 6: Perform the Cauchy-Gaussian mutation strategy operation on the population individuals.
[0140] Step 7: Determine whether the termination condition is satisfied. If satisfied, output the optimal parameters; otherwise, return to Step 2.
[0141] Combined with the above quantum evolutionary algorithm, based on the training set and the validation set, the hyperparameters in the above pre-constructed LSTM network model are optimized to obtain the optimal hyperparameters. Specifically:
[0142] S21-3-1. Based on the preset population size in the quantum evolutionary algorithm and the preset value range of the hyperparameters to be optimized in the LSTM network model, the population of the quantum evolutionary algorithm is initialized using the niche algorithm to obtain multiple population individuals in each population, where each population individual corresponds to a set of the hyperparameters.
[0143] Specifically, determine the niche population size, the hyperparameters to be optimized, and the value range. The specific parameter values are shown in Table 1. Initialize 2 niche populations according to the values in Table 1, and initialize n population individuals, where each population individual corresponds to a set of the hyperparameters (learning rate, number of neurons in hidden layer 1, and number of neurons in hidden layer 2).
[0144] Table 1 Parameter Values
[0145]
[0146] Among them, the method based on probability division is used to initialize n population individuals. The niche co-evolution strategy based on probability division is introduced into the population initialization process. The main idea is to divide the qubits into N probability spaces. By dividing the probability spaces through the following formula, each sub-population will have the same frequency when initialized:
[0147]
[0148] Among them, α k represents the probability amplitude that the qubit is in the ∣0> state, β k represents the probability amplitude that the qubit is in the ∣1> state, N represents that a population is divided into N niche populations, and the probability amplitudes of the individuals in each niche population are the same (with the same frequency). i represents the i-th niche population (i ranges from 1 to N).
[0149] Through the probability-based division, the distribution of each sub-population in the probability space is uniform, which means that the frequencies of the individuals in each sub-population in the probability space are the same. This uniform distribution ensures that the coverage of each sub-population in the probability space is balanced, and the number of individuals and the distribution frequency of each sub-population are the same, thus ensuring the diversity and balance of the initialized population; the algorithm uses two populations to increase the diversity of the search.
[0150] So far, the population individuals after the initialization of each population are obtained.
[0151] S21-3-2. Based on each of the population individuals, use the population individuals to update the hyperparameters of the LSTM network model, and train the updated LSTM network model based on the training set to obtain the trained LSTM network model; use the validation set to verify the trained LSTM network model to obtain the fitness of the population individuals (i.e., Figure 2 the fitness measurement in).
[0152] Specifically, based on each of the population individuals, decode the population individuals as rabbit individuals to obtain the hyperparameters in the population individuals; use the hyperparameters of the population individuals to update the hyperparameters of the LSTM network model to obtain the updated LSTM network model;
[0153] Train the updated LSTM network model based on the training set to obtain the trained LSTM network model;
[0154] Use the trained LSTM network model to predict the validation set to obtain the prediction result; verify the accuracy rate of the prediction result, and use the accuracy rate as the fitness of the population individuals to find the optimal solution.
[0155] S21-3-3. Perform quantum crossover and mutation on each of the population individuals to obtain new population individuals, and obtain the fitness of each of the new population individuals.
[0156] To ensure that the optimal solution is not lost, use the elitist retention strategy to obtain and retain the population individual with the highest fitness from each of the population individuals and the new population individuals.
[0157] The retained population individual with the highest fitness is used to integrate into the population individuals of the next generation.
[0158] S21-3-4. Based on the population individual and the population individual with the highest fitness among the new population individuals, perform quantum rotation on the new population individuals to obtain the population individuals of the next generation.
[0159] Specifically, compare the fitness of the new population individuals with the fitness of the population individual with the highest fitness among the population individuals to determine the rotation direction of the new population individuals.
[0160] According to the qubit measurement results and quantum probability amplitudes of the new population individuals, select the rotation angle of the new population individuals.
[0161] Perform a quantum rotation operation on the new population individuals based on the rotation angle and rotation direction to obtain the population individuals of the next generation.
[0162] Optionally, after obtaining the population individuals of the next generation, it further includes performing a Cauchy-Gaussian mutation strategy operation on the population individuals of the next generation to update the population individuals of the next generation, so that the quantum genetic algorithm achieves a better balance between global search and local search.
[0163] S21-3-5. If the population individuals of the next generation meet the iteration termination condition, then use the corresponding hyperparameters in the population individual with the highest fitness among the population individuals of the next generation as the optimal hyperparameters; otherwise, perform quantum crossover and mutation on the population individuals of the next generation and continue to iterate until the iteration termination condition is reached.
[0164] The iteration termination condition in this embodiment is a preset number of iterations.
[0165] Thus, the LSTM network model with the optimal hyperparameters is obtained.
[0166] S21-4. Train the LSTM network model with the optimal hyperparameters based on the training set to obtain a trained quantum LSTM network model.
[0167] Specifically, the output optimal parameters are input into the LSTM network model for initialization operation, and the initialized LSTM network model is trained and fitted using the training set to obtain a trained quantum LSTM network model.
[0168] The obtained test set is used to evaluate the quantum LSTM network model, which is used to evaluate the generalization ability of the model (only test data can reflect the performance of the model on unseen data); detect overfitting and underfitting of the model (through the evaluation of the test set, the current generalization state of the model can be clearly judged, and then it can be determined whether a more complex model is needed to address underfitting or regularization and other constraint strategies to address overfitting); the core purpose is to measure the generalization performance of the model to ensure that the model can perform well on unseen data.
[0169] S22. Input the data to be diagnosed into the above-mentioned trained quantum LSTM network model for fault diagnosis to obtain the fault diagnosis result of the photovoltaic array.
[0170] The photovoltaic array composite fault diagnosis method based on quantum LSTM provided by the present invention combines the characteristics of quantum computing and the time series analysis ability of the long short-term memory network (LSTM). Through the superposition and entanglement effects of quantum states, the processing speed and diagnosis accuracy of complex data of the photovoltaic array are greatly improved. Through the quantum LSTM diagnosis model of the present invention, various types of composite faults in the photovoltaic array can be effectively identified, and the faults can be identified efficiently and accurately.
[0171] This solution provides a scientific and systematic process, including collecting operation data of the photovoltaic array in multiple dimensions (multiple typical features) and performing feature extraction; combining the superposition state and entanglement effect of quantum computing with the time series processing ability of the LSTM network to construct a quantum LSTM network model suitable for fault detection of the photovoltaic array; finally, using the quantum LSTM network model to extract and classify features of multiple types of faults, and identifying potential composite fault modes through predictive analysis.
[0172] The present invention introduces quantum computing technology into the field of photovoltaic array fault diagnosis, breaking through the limitations of traditional LSTM models in terms of data processing complexity and effectively addressing the limitations of other traditional fault diagnosis methods in dealing with complexity, dimensionality disasters, etc. At the same time, multi-type composite faults in photovoltaic arrays often manifest as the superposition and interaction of multiple different fault types, which are difficult to quickly and accurately identify by traditional methods. However, quantum LSTM can more efficiently capture the potential correlations in these complex fault patterns through its quantum superposition state and quantum entanglement effect, significantly improving the diagnostic efficiency. Through the quantum LSTM diagnostic method, multi-type composite faults in the photovoltaic system can be identified in real time and accurately, especially maintaining a high prediction accuracy and showing superiority when facing high-dimensional and non-linear data. It can significantly improve the operation stability, fault detection speed and accuracy of photovoltaic arrays. Through the efficient data processing ability of quantum LSTM, multi-type composite faults can be quickly detected and identified, avoiding missed or misdiagnosed cases of traditional methods. It reduces the system failure rate and maintenance costs, and through real-time monitoring and fault prediction, reduces the fault downtime and maintenance overhead of the photovoltaic system, and improves the service life of the equipment.
[0173] In summary, the composite fault diagnosis method for photovoltaic arrays based on quantum LSTM provided by the present invention undoubtedly brings a breakthrough innovation to the field of fault detection and diagnosis of photovoltaic systems. It shows unparalleled advantages in terms of accuracy, real-time performance and complex fault handling ability.
[0174] In the fault diagnosis of photovoltaic arrays, the equipment working environment is complex and affected by various uncertain factors such as the external environment, equipment aging, and system noise. By combining the probability of quantum states with the time series memory ability of LSTM, quantum LSTM can perform efficient diagnosis under incomplete and uncertain data conditions, overcoming the limitations of traditional methods. At the same time, while realizing the recognition of complex fault patterns, this method maintains sensitivity to abnormal data fluctuations, thus ensuring the reliability and stability of the diagnostic results.
[0175] The fault diagnosis method combining quantum computing and LSTM provided by this solution not only stands out in the field of photovoltaic system fault diagnosis, but also its intelligent fault handling ability and highly accurate prediction performance for complex systems will provide strong technical support and theoretical basis for the operation and maintenance of photovoltaic systems, greatly promoting the development of photovoltaic system intelligent diagnosis technology.
[0176] Embodiment 2
[0177] A specific embodiment is provided for the composite fault diagnosis method for photovoltaic arrays based on quantum LSTM of the present invention.
[0178] Build a simulation model of a multi - type composite - fault photovoltaic array with a scale of 3×3 (photovoltaic modules) in the MATLAB / Simulink environment, as Figure 6 shown. Control the open - circuit and aging faults by adjusting the resistance value of the photovoltaic cell resistance R1. When the resistance value of R1 is infinite, an open - circuit fault occurs in the photovoltaic array; when the resistance value of R1 is 5Ω, an aging fault occurs in the photovoltaic array. Simulate the short - circuit fault by connecting a resistor R2 with a resistance value of 1e - 6 in parallel with a photovoltaic module. Simulate the partial shading by reducing the light intensity of radiation1 (irradiance) to 60%.
[0179] According to the output characteristic curves of the photovoltaic array under 7 faults and normal conditions in the Simulink environment. After the short - circuit fault occurs, the short - circuit current hardly changes, while the open - circuit voltage and maximum power decrease significantly. Compared with the output characteristics under normal operation, for the open - circuit fault, the maximum - power current and short - circuit current decrease significantly, while the maximum - power voltage and open - circuit voltage remain basically unchanged. When partial - shading faults and composite - shading faults occur in the photovoltaic module, compared with the original state, the I - U curve will show a "multi - knee" phenomenon, and the P - U curve will show a "multi - peak" phenomenon.
[0180] Select 7 fault characteristics and normal - state data in the photovoltaic - array fault data as the research objects. Select the light - intensity range from 300W / m 2 to 1000W / m 2 , with an interval of 20W / m 2 and the temperature range from 15℃ to 45℃, with an interval of 3℃ as the data input of the MATLAB / Simulink simulation platform. Collect 3168 groups of fault data as the training set and validation set to train the model and evaluate the model, with a division ratio of 4:1. The data volume of the training set and validation set for each type of fault is 317 and 79 respectively. Generate 100 groups of fault data with random light intensity and random temperature in the range of light intensity from 300W / m 2 to 1000W / m 2 and temperature from 15 to 45℃ for 8 types of faults, a total of 800 groups as the test set for the final model - performance test. Some data samples (training set, validation set, test set) are shown in Table 2.
[0181]
[0182] The results show that the fault diagnosis accuracies of the LSTM, SSA-LSTM (Salp Swarm Algorithm-Long Short-Term Memory), GWO-LSTM (Grey Wolf Optimizer-Long Short-Term Memory), ARO-LSTM (Attention-based Recurrent Optimization-Long Short-Term Memory) to the quantum LSTM network model for the training set, validation set, and test set show an upward trend. For the same data set, the fault diagnosis accuracy of the LSTM model is less than 90%, while the other models can all reach more than 90%. The accuracies of the five models for the test set are 87.5%, 91.13%, 93%, 96.75%, and 97.5% respectively. Among them, the diagnosis accuracy of the quantum LSTM network model reaches 97.5%, which is higher than other models, further verifying the superiority of the quantum LSTM network model on each data set.
[0183] Embodiment 3
[0184] Based on the same inventive concept, the present invention also provides a photovoltaic array composite fault diagnosis system based on quantum LSTM, as Figure 10 shown, including:
[0185] A data acquisition module, configured to acquire the data to be diagnosed during the operation of the photovoltaic array;
[0186] A fault diagnosis module, configured to input the data to be diagnosed into a pre-constructed quantum LSTM network model for fault diagnosis to obtain the fault diagnosis result of the photovoltaic array;
[0187] The quantum LSTM network model is obtained by optimizing the hyperparameters in the pre-constructed LSTM network model based on the typical characteristic data during the operation of the photovoltaic array and combining with the quantum evolutionary algorithm.
[0188] In a possible implementation manner, the above system further includes a model pre-construction module, configured to:
[0189] Extract typical characteristic data from the operation data of the photovoltaic array in various operation states, and divide the operation data after feature extraction into a training set and a validation set;
[0190] Use the quantum evolutionary algorithm to optimize the hyperparameters in the LSTM network model based on the training set and the validation set to obtain the optimal hyperparameters;
[0191] Train the LSTM network model with the optimal hyperparameters based on the training set to obtain a trained quantum LSTM network model.
[0192] In a possible implementation, the above model pre-construction module is specifically used for:
[0193] Based on the preset population size in the quantum evolutionary algorithm and the preset value range of the hyperparameters to be optimized in the LSTM network model, initialize the population of the quantum evolutionary algorithm using the niche algorithm to obtain multiple population individuals in each population, where each population individual corresponds to a set of the hyperparameters;
[0194] Based on each population individual, update the hyperparameters of the LSTM network model using the population individual, train the updated LSTM network model based on the training set to obtain the trained LSTM network model; verify the trained LSTM network model using the validation set to obtain the fitness of the population individual;
[0195] Perform quantum crossover and mutation on each population individual to obtain new population individuals, and obtain the fitness of each new population individual;
[0196] Based on the population individual and the population individual with the highest fitness among the new population individuals, perform quantum rotation on the new population individuals to obtain the next-generation population individuals;
[0197] If the next-generation population individuals meet the iteration termination condition, use the hyperparameters corresponding to the population individual with the highest fitness among the next-generation population individuals as the optimal hyperparameters, otherwise perform quantum crossover and mutation on the next-generation population individuals and continue to iterate until the iteration termination condition is reached.
[0198] In a possible implementation, the above model pre-construction module is further used to obtain and retain the population individual with the highest fitness from each population individual and the new population individuals using the elitist retention strategy;
[0199] The retained population individual with the highest fitness is used to integrate into the next-generation population individuals.
[0200] In a possible implementation, the above model pre-construction module is specifically used for:
[0201] Use the trained LSTM network model to predict the validation set to obtain a prediction result;
[0202] Verify the accuracy of the prediction result and use the accuracy as the fitness of the population individual.
[0203] In a possible implementation, the above-mentioned model pre-construction module is specifically used for:
[0204] Decode the rabbit individuals in the population individuals to obtain the hyperparameters in the population individuals;
[0205] Update the hyperparameters of the LSTM network model using the hyperparameters of the population individuals to obtain the updated LSTM network model.
[0206] In a possible implementation, the above-mentioned model pre-construction module is specifically used for:
[0207] Compare the fitness of the new population individuals with the fitness of the population individual with the highest fitness in the population individuals to determine the rotation direction of the new population individuals;
[0208] Select the rotation angle of the new population individuals according to the qubit measurement results and quantum probability amplitudes of the new population individuals;
[0209] Perform a quantum rotation operation on the new population individuals based on the rotation angle and rotation direction to obtain the population individuals of the next generation.
[0210] In a possible implementation, the above-mentioned model pre-construction module is specifically used for:
[0211] Extract typical feature data from the operation data of the photovoltaic array in multiple operation states, and divide the operation data after feature extraction into a training set and a validation set;
[0212] The multiple operation states include one or more of the following: normal working state, short-circuit fault state, open-circuit fault state, aging fault state, partial shading state, aging fault state, short-circuit shading state, and open-circuit shading state;
[0213] The typical feature data includes one or more of the following: open-circuit voltage, short-circuit current, maximum power point voltage, maximum power current, maximum power, fill factor, temperature, and light intensity.
[0214] In a possible implementation, the LSTM network model in the above-mentioned system is constructed by adding a regularization layer after each of the two LSTM layers of the original LSTM network model;
[0215] The original LSTM network model includes an input layer, two LSTM layers, a fully connected layer, and an output layer connected in sequence.
[0216] Embodiment 4
[0217] As Figure 11As shown, the present invention also provides an electronic device, which may be a computer device, a single-chip microcomputer device, a smart mobile device, etc. The electronic device in this embodiment may include a processor, a memory, a transceiver component, etc. The memory, the processor, and the transceiver component are connected through a bus; the memory can be used to store an execution program, and an exemplary execution program may include instructions; the processor is used to execute the instructions stored in the memory. The memory can also be used to store data, and this data can be called and / or modified when the instructions are executed.
[0218] The processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, and is suitable for implementing one or more instructions. Specifically, it is suitable for loading and executing one or more instructions in the storage medium to implement the corresponding method flow or corresponding function, so as to implement the steps of the photovoltaic array composite fault diagnosis method based on quantum LSTM in the above embodiments.
[0219] (Application SpecificIntegrated Circuit, ASIC), Field-Programmable GateArray (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, and is suitable for implementing one or more instructions. Specifically, it is suitable for loading and executing one or more instructions in the storage medium to implement the corresponding method flow or corresponding function, so as to implement the steps of the photovoltaic array composite fault diagnosis method based on quantum LSTM in the above embodiments.
[0220] Embodiment 5
[0221] Based on the same inventive concept, the present invention also provides a readable storage medium, specifically an electronic device-readable storage medium (Memory). The electronic device-readable storage medium is a memory device in the electronic device and is used to store programs and data. It can be understood that the storage medium here can include both the built-in storage medium in the electronic device and, of course, the extended storage medium supported by the electronic device. The storage medium provides a storage space, and the operating system of the terminal is stored in this storage space. And, one or more instructions suitable for being loaded and executed by the processor are also stored in this storage space. These instructions can be one or more execution programs (including program codes). It should be noted that the storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. By the processor loading and executing one or more instructions stored in the storage medium, the steps of the photovoltaic array composite fault diagnosis method based on quantum LSTM in the above embodiments can be implemented.
[0222] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.
[0223] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices produce means for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0224] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing devices to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means that implement the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0225] These computer program instructions can also be loaded onto a computer or other programmable data processing devices, such that a series of operation steps are executed on the computer or other programmable devices to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable devices provide steps for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0226] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the scope of its protection. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that after reading the present invention, various changes, modifications, or equivalent replacements can still be made to the specific implementation manners of the application. However, these changes, modifications, or equivalent replacements are all within the scope of the protection of the pending claims of the application.
Claims
1. A photovoltaic array composite fault diagnosis method based on quantum LSTM, characterized in that: include: Obtain the diagnostic data during the operation of the photovoltaic array; Inputting the data to be diagnosed into a pre-built quantum LSTM network model for fault diagnosis to obtain a fault diagnosis result of the photovoltaic array; The quantum LSTM network model is obtained by optimizing the hyperparameters in the pre-built LSTM network model based on typical characteristic data during the operation of the photovoltaic array in combination with a quantum evolutionary algorithm.
2. The method according to claim 1, characterized in that The pre-construction process of the quantum LSTM network model includes: Extracting typical feature data from the operating data of the photovoltaic array under various operating states, and dividing the operating data after feature extraction into a training set and a validation set; The quantum evolutionary algorithm is used to optimize the hyperparameters in the LSTM network model based on the training set and the validation set to obtain the optimal hyperparameters. The LSTM network model with the optimal hyperparameters is trained based on the training set to obtain a trained quantum LSTM network model.
3. The method according to claim 2, characterized in that The quantum evolutionary algorithm is used to optimize the hyperparameters in the LSTM network model based on the training set and the validation set to obtain the optimal hyperparameters, including: Based on the preset number of populations in the quantum evolutionary algorithm and the preset value range of the hyperparameters to be optimized in the LSTM network model, the population of the quantum evolutionary algorithm is initialized using a niche algorithm to obtain a plurality of population individuals in each of the populations, wherein each of the population individuals corresponds to a set of the hyperparameters; Based on each of the population individuals, the hyperparameters of the LSTM network model are updated using the population individuals, and the updated LSTM network model is trained based on the training set to obtain the trained LSTM network model; the trained LSTM network model is verified using the verification set to obtain the fitness of the population individuals; Performing quantum crossover and mutation on each population individual to obtain a new population individual, and obtaining the fitness of each new population individual; Based on the population individual with the highest fitness among the population individuals and the new population individuals, the new population individuals are quantum rotated to obtain the next generation of population individuals; If the next generation population individuals meet the iteration termination condition, the hyperparameter corresponding to the population individual with the highest fitness in the next generation population individuals is used as the optimal hyperparameter; otherwise, quantum crossover and mutation are performed on the next generation population individuals, and iteration is continued until the iteration termination condition is reached.
4. The method according to claim 3, characterized in that After performing quantum crossover and mutation on each population individual to obtain a new population individual and obtaining the fitness of each new population individual, the method further includes: Using an elite retention strategy, obtain and retain the population individual with the highest fitness from each of the population individuals and the new population individuals; The population individuals with the highest fitness that are retained are used to be integrated into the population individuals of the next generation.
5. The method according to claim 3, characterized in that The step of using the validation set to validate the trained LSTM network model to obtain the fitness of the individuals in the population includes: The trained LSTM network model is used to predict the validation set to obtain a prediction result; The accuracy of the prediction result is verified, and the accuracy is used as the fitness of the individuals in the population.
6. The method according to claim 3, characterized in that The method of updating the hyper parameters of the LSTM network model by using the population individuals includes: Perform rabbit individual decoding on the individuals of the population to obtain hyperparameters in the individuals of the population; The hyperparameters of the population individuals are used to update the hyperparameters of the LSTM network model to obtain the updated LSTM network model.
7. The method according to claim 3, characterized in that The step of performing quantum rotation on the new population individual based on the population individual with the highest fitness among the population individual and the new population individual to obtain the next generation of population individuals includes: Comparing the fitness of the new population individual with the fitness of the population individual with the highest fitness among the population individuals, and determining the rotation direction of the new population individual; Selecting a rotation angle of the new population individual according to the qubit measurement result and quantum probability amplitude of the new population individual; Based on the rotation angle and the rotation direction, a quantum rotation operation is performed on the new population individuals to obtain the next generation of population individuals.
8. The method according to claim 2, characterized in that The extracting of typical characteristic data from the operation data of the photovoltaic array under various operation states includes: Based on the simulation model of the photovoltaic array, typical characteristic data are extracted from the operation data of the photovoltaic array under various operation states to obtain the typical characteristic data of the photovoltaic array under various operation states; The multiple operating states include one or more of the following: normal operating state, short circuit fault state, open circuit fault state, aging fault state, partial shading state, aging fault state, short circuit shading state and open circuit shading state; The typical characteristic data include one or more of the following: open circuit voltage, short circuit current, maximum power point voltage, maximum power current, maximum power, fill factor, temperature and light intensity.
9. The method according to any one of claims 1 to 6, characterized in that: The LSTM network model is constructed by adding a regularization layer after each of the two LSTM layers of the original LSTM network model; The original LSTM network model includes an input layer, two LSTM layers, a fully connected layer and an output layer connected in sequence.
10. Photovoltaic array composite fault diagnosis system based on quantum LSTM, characterized by: include: A data acquisition module is used to acquire the data to be diagnosed during the operation of the photovoltaic array; A fault diagnosis module, used for inputting the data to be diagnosed into a pre-built quantum LSTM network model for fault diagnosis, and obtaining a fault diagnosis result of the photovoltaic array; The quantum LSTM network model is obtained by optimizing the hyperparameters in the pre-built LSTM network model based on typical characteristic data during the operation of the photovoltaic array in combination with a quantum evolutionary algorithm.