Power quality prediction method and device containing distributed photovoltaic power distribution network, and terminal

By obtaining the power quality indicators and influence parameter sequences of distributed photovoltaic distribution networks, combining dynamic time regularization and neural networks, and optimizing the training model, the problem of low prediction accuracy of power quality in distributed photovoltaic distribution networks is solved, and the prediction accuracy and Stability ensures the safety of the power grid.

CN119168148APending Publication Date: 2024-12-20NORTH CHINA ELECTRIC POWER UNIV +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411279681.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The existing power quality prediction method is low when dealing with distributed photovoltaic distribution networks, especially because the distributed photovoltaic output is volatile due to natural factors such as weather. The existing method has the ability to model nonlinear relationships. It is limited, easily affected by extreme values, and the prediction accuracy of a single prediction model is not high.

Method used

By obtaining the power quality index sequence and influence parameter sequence in the distributed photovoltaic distribution network, including the solar irradiance sequence, determining the time weight, using dynamic time regularization algorithm to calculate the minimum cumulative distance, combining convolutional neural network and bidirectional long and short-term memory The network constructs an initial prediction model and uses the chaotic cloud quantum bat algorithm optimization training to obtain the power quality prediction model.

Benefits of technology

Improve the accuracy of power quality prediction, reduce the impact of distributed photovoltaic grid connection on the power quality of distribution network, ensure the safe and reliable operation of the power grid, fully explore multi-dimensional feature data features, reduce long-term series feature loss, and realize Hyperparameters are automatically selected.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168148A_ABST
    Figure CN119168148A_ABST
Patent Text Reader

Abstract

The invention provides an electric energy quality prediction method and device containing a distributed photovoltaic power distribution network, and a terminal. The method comprises the following steps: obtaining each electric energy quality index sequence in the distributed photovoltaic power distribution network and each influence parameter sequence influencing the electric energy quality, wherein the influence parameter sequence comprises a solar irradiance sequence; according to the solar irradiance sequence, determining a time weight influencing the electric energy quality; based on the time weight, a dynamic time warping algorithm is adopted to calculate the minimum cumulative distance between each influence parameter sequence and each power quality index sequence; determining the influence parameter sequence of which the minimum cumulative distance is smaller than a set threshold value as a target influence parameter sequence, and training according to the target influence parameter sequence to obtain a power quality prediction model; and predicting each power quality index in the distributed photovoltaic power distribution network according to the power quality prediction model. According to the invention, the trained power quality prediction model is more practical, and the prediction precision of the power quality index is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power quality prediction, and in particular to a method, device and terminal for predicting power quality of a distributed photovoltaic distribution network. Background Art

[0002] Environmental pollution has led to increasingly serious climate change, which has promoted the urgent demand for "green and low-carbon" energy around the world. In this context, in order to meet the growing energy demand, building a new power system with new energy as the main body has become an effective solution.

[0003] In the process of building a new power system with new energy as the main body, the penetration rate of distributed photovoltaic power generation in the distribution network has gradually increased. However, its output is affected by natural factors such as weather, and is volatile and uncertain. In addition, the access of distributed photovoltaic power generation close to the user side will also seriously affect the power quality in the power grid. Therefore, it is helpful to perceive the changing trend of various power quality indicators in the power grid in advance and conduct power quality management, which will help reduce the impact of distributed photovoltaic grid connection on the power quality of the distribution network and ensure the safe and reliable operation of the power grid.

[0004] In order to perceive the changing trends of various power quality indicators in the power grid in advance, power quality prediction is usually carried out through statistical methods, machine learning methods or combined prediction methods. Among them, statistical methods are based on the regularity and trend of historical data for prediction, mainly including time series analysis, regression analysis, etc. Time series analysis focuses on the time patterns in historical data, and uses statistical techniques to identify and use these patterns for future predictions. Regression analysis establishes a relationship model between variables, and infers future trends through regression analysis of historical data. The main features of this type of method are simple models and simple calculation processes. However, many statistical methods are based on linear assumptions, and their modeling capabilities for nonlinear relationships are relatively limited. They are also sensitive to outliers and may be affected by extreme values, resulting in reduced prediction accuracy. Machine learning methods use algorithms and models to learn from data and can adapt to changing environments. They mainly include support vector machines, artificial neural networks, decision trees, etc. This type of method learns a large amount of historical data and builds models to capture patterns and associations in the data, thereby achieving future predictions. Its main feature is that it can handle nonlinear problems well. However, machine learning methods have overfitting problems, performing well on training data but poorly on new data, and the prediction accuracy of a single prediction model is not high. The combined prediction method combines multiple prediction models and integrates their prediction results to improve accuracy and robustness, mainly including weighted average, ensemble learning, etc. This type of method can reduce the bias and variance of a single model by integrating the advantages of different models, thereby improving the overall prediction performance. However, the combined prediction method usually requires additional parameter adjustments, which increases the complexity of the model, and in some cases the combined method may require more computing resources and time.

[0005] Therefore, how to use appropriate methods to predict the power quality of distributed photovoltaic distribution networks and improve the prediction accuracy has become a problem that needs to be solved. Summary of the invention

[0006] The embodiments of the present invention provide a method, device and terminal for predicting power quality of a distributed photovoltaic distribution network to solve the problem of how to adopt a suitable method to predict power quality and improve prediction accuracy.

[0007] In a first aspect, an embodiment of the present invention provides a method for predicting power quality of a distributed photovoltaic distribution network, comprising:

[0008] Acquire various power quality index sequences and various influencing parameter sequences affecting power quality in a distributed photovoltaic distribution network, wherein the influencing parameter sequence includes a solar irradiance sequence;

[0009] Determining a time weight that affects power quality according to the solar irradiance sequence;

[0010] Based on the time weight, a dynamic time warping algorithm is used to calculate the minimum cumulative distance between each of the influencing parameter sequences and each of the power quality indicator sequences;

[0011] Determine the influencing parameter sequence whose minimum cumulative distance is less than a set threshold as a target influencing parameter sequence, and obtain a power quality prediction model through training according to the target influencing parameter sequence;

[0012] The power quality prediction model is used to predict various power quality indicators in a distributed photovoltaic distribution network.

[0013] In a possible implementation, determining the time weight affecting the power quality according to the solar irradiance sequence includes:

[0014] according to Determine the time weights that affect power quality;

[0015] Among them, ω i,j is the time weight corresponding to the i-th sample point in each of the influencing parameter sequences and the j-th sample point in each of the power quality indicator sequences, ω d is the first weight corresponding to solar irradiance greater than zero, ω n is the second weight corresponding to solar irradiance equal to zero, I i,j It is the value between the i-th sample point in each of the influencing parameter sequences in the solar irradiance sequence and the j-th sample point in each of the power quality indicator sequences.

[0016] In a possible implementation, based on the time weight, a dynamic time warping algorithm is used to calculate the minimum cumulative distance between each of the influencing parameter sequences and each of the power quality indicator sequences, including:

[0017] Respectively calculating the derivatives of each of the influencing parameter sequences and each of the power quality index sequences, recorded as the first derivative sequence and the second reciprocal sequence;

[0018] Based on the time weight, and according to the first derivative sequence and the second derivative sequence, a distance matrix between each of the influencing parameter sequences and each of the power quality indicator sequences is calculated;

[0019] Based on the distance matrix, a dynamic time warping algorithm is used to calculate the minimum cumulative distance between each of the influencing parameter sequences and each of the power quality indicator sequences.

[0020] In a possible implementation, the derivatives of each of the influencing parameter sequences and each of the power quality indicator sequences are calculated respectively, recorded as a first derivative sequence and a second reciprocal sequence, including:

[0021] according to Calculate the derivative of each of the influencing parameter sequences, and record it as the first derivative sequence;

[0022] according to Calculating the derivative of each of the power quality indicator sequences, recorded as a second derivative sequence;

[0023] Among them, x′ pi is the derivative of the i-th sample point in the p-th influencing parameter sequence, x pi+1 is the i+1th sample point in the pth influencing parameter sequence, x pi-1 is the i-1th sample point in the pth influencing parameter sequence, i=1,2,…,n, n is the number of sample points in the pth influencing parameter sequence, y′ qj is the derivative of the jth sample point in the qth power quality indicator sequence, y qj+1 is the j+1th sample point in the qth power quality indicator sequence, y qj-1 is the j-1th sample point in the qth power quality indicator sequence, j=1, 2, ..., m, and m is the number of sample points in the qth power quality indicator sequence.

[0024] In a possible implementation, based on the time weight and according to the first derivative sequence and the second derivative sequence, a distance matrix between each of the influencing parameter sequences and each of the power quality indicator sequences is calculated, including:

[0025] According to D pq (i,j)=ω i,j ||x′ pi -y′ qj || P , calculating the distance matrix between each of the influencing parameter sequences and each of the power quality indicator sequences;

[0026] Among them, D pq is the distance matrix between the pth influencing parameter sequence and the qth power quality indicator sequence, D pq (i, j) is the distance between the i-th sample point in the p-th influencing parameter sequence and the j-th sample point in the q-th power quality indicator sequence, ω i,j is the time weight corresponding to the i-th sample point in each of the influencing parameter sequences and the j-th sample point in each of the power quality indicator sequences, x′ pi is the derivative of the i-th sample point in the p-th influencing parameter sequence, y′ qj is the derivative of the jth sample point in the qth power quality indicator sequence, || || p represents the p-norm.

[0027] In a possible implementation, after obtaining each power quality indicator sequence and each influencing parameter sequence affecting power quality in the distributed photovoltaic distribution network, the method further includes:

[0028] Normalization processing is performed on each of the power quality indicator sequences and each of the influencing parameter sequences.

[0029] In a possible implementation, training a power quality prediction model according to the target influencing parameter sequence includes:

[0030] Construct an initial prediction model based on convolutional neural network and bidirectional long short-term memory network;

[0031] The target influencing parameter sequence is used as the input of the initial prediction model, and each of the power quality indicator sequences is used as the output of the initial prediction model. The parameters of the initial prediction model are optimized and trained based on the chaotic cloud quantum bat algorithm to obtain a power quality prediction model.

[0032] In a second aspect, an embodiment of the present invention provides a power quality prediction device for a distributed photovoltaic distribution network, comprising:

[0033] An acquisition module, used to acquire various power quality index sequences and various influencing parameter sequences affecting power quality in a distributed photovoltaic distribution network, wherein the influencing parameter sequence includes a solar irradiance sequence;

[0034] A first processing module, configured to determine a time weight affecting power quality according to the solar irradiance sequence;

[0035] A second processing module, configured to calculate the minimum cumulative distance between each of the influencing parameter sequences and each of the power quality indicator sequences using a dynamic time warping algorithm based on the time weight;

[0036] A training module, used for determining the influencing parameter sequence whose minimum cumulative distance is less than a set threshold as a target influencing parameter sequence, and obtaining a power quality prediction model through training according to the target influencing parameter sequence;

[0037] The prediction module is used to predict various power quality indicators in the distributed photovoltaic distribution network according to the power quality prediction model.

[0038] In a third aspect, an embodiment of the present invention provides a terminal, comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to perform the steps of the method described in the first aspect or any possible implementation of the first aspect.

[0039] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect or any possible implementation method of the first aspect are implemented.

[0040] The embodiment of the present invention provides a method, device and terminal for predicting power quality of a distributed photovoltaic distribution network. By obtaining various power quality indicator sequences and various influencing parameter sequences affecting power quality in the distributed photovoltaic distribution network, and the influencing parameter sequence includes a solar irradiance sequence, the time weight affecting power quality is determined according to the solar irradiance sequence, so that the time weight is considered in the subsequent training of the power quality prediction model, that is, in combination with the actual situation of the distributed photovoltaic distribution network, the influence of the change of distributed photovoltaic output over time on the power quality in the power grid is considered, so that the trained power quality prediction model is more in line with reality, and the prediction accuracy of various power quality indicators in the distributed photovoltaic distribution network obtained based on the power quality prediction model is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0042] Figure 1 It is a flow chart of an implementation method of a power quality prediction method for a distributed photovoltaic distribution network provided by an embodiment of the present invention;

[0043] Figure 2 It is an overall framework diagram of a method for predicting power quality of a distributed photovoltaic distribution network provided by an embodiment of the present invention;

[0044] Figure 3 It is a flow chart of power quality prediction of distributed photovoltaic distribution network based on CBLCQB provided by an embodiment of the present invention;

[0045] Figure 4 It is a structural schematic diagram of a power quality prediction device including a distributed photovoltaic distribution network provided by an embodiment of the present invention;

[0046] Figure 5 is a schematic diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0048] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0049] See also Figure 1 , which shows a flow chart of the implementation of the power quality prediction method of the distributed photovoltaic distribution network provided by the embodiment of the present invention, which is described in detail as follows:

[0050] In step 101, various power quality index sequences and various influencing parameter sequences influencing power quality in a distributed photovoltaic distribution network are obtained, wherein the influencing parameter sequence includes a solar irradiance sequence.

[0051] In this embodiment, considering that the current power quality prediction lacks effective feature extraction for multi-dimensional grid operation data and environmental data, and there is a problem of feature information loss for long time series, the prediction accuracy is limited. Figure 2 As shown in the figure, it is considered to apply situation awareness technology to the power quality prediction of distribution network to predict the changing trend of power quality index values, so as to accurately control the operation status of distribution network and reserve time for power quality management.

[0052] Among them, the concept of situational awareness was first proposed in the military field. It mainly includes three aspects: situational awareness, situational understanding and situational prediction. It is a technology for extracting, analyzing and predicting various factors in the environment. Later, some scholars introduced situational awareness technology into the power grid. By real-time sensing of the operating status of the distribution network, changes in the external environment, and distributed photovoltaic output, various information can be perceived and understood, and the future situation of the distribution network can be predicted.

[0053] This embodiment applies situation awareness technology to the prediction of power quality in the distribution network. First, data collection is performed in the situation awareness stage to obtain the operating data and environmental data in the distributed photovoltaic distribution network. Then, in the situation understanding stage, knowledge is obtained through data analysis, the obtained multi-dimensional feature data is calculated, and the features with strong correlation with the power quality indicators are obtained by screening the input features. Finally, in the situation prediction stage, the future development trend is predicted, and a power quality prediction method based on convolutional neural network-bidirectional long short-term memory network-chaotic cloud quantum bat algorithm (i.e., CBLCQB model) is proposed to obtain the future situation of five power quality indicators: voltage deviation, frequency deviation, voltage total harmonic distortion rate, voltage fluctuation, and three-phase voltage imbalance. Thus, by introducing situation awareness into the field of power quality prediction, the power quality of the distribution system under the future situation is obtained through the situation awareness framework. At the same time, the prediction method can fully explore the multi-dimensional data features and reduce the loss of long-term series features and realize the automatic optimization of hyperparameters, improve the prediction accuracy, and ensure the high-quality supply of power quality.

[0054] Combination Figure 2 As shown in the figure, the overall framework of the power quality prediction method of distributed photovoltaic distribution network under the situation awareness framework can include the following four parts:

[0055] 1. Obtain operating and environmental data in distributed photovoltaic distribution networks.

[0056] 2. Calculate the acquired multi-dimensional feature data and filter the input features to obtain features that are highly correlated with power quality indicators.

[0057] 3. Build a prediction model and predict the power quality situation based on the CBLCQB algorithm.

[0058] 4. Use mean absolute error, root mean square error and mean absolute percentage error to evaluate the prediction effect of the model.

[0059] The acquisition of operating data and environmental data in the distributed photovoltaic distribution network corresponds to the acquisition of various influencing parameter sequences influencing power quality in the distributed photovoltaic distribution network in step 101.

[0060] For example, data collection can be performed in the situation awareness stage, and data can be collected through smart meters, sensors and other equipment. The operating data may include voltage, current, active power, reactive power and frequency, and the environmental data may include solar irradiance, temperature and relative humidity. Each operating data or each environmental data in the distributed photovoltaic distribution network corresponds to a sequence of influencing parameters that affect the power quality. Obtaining the sequences of various influencing parameters that affect the power quality in the distributed photovoltaic distribution network is mainly to provide a data basis for situation understanding and situation prediction.

[0061] Exemplarily, after obtaining each power quality indicator sequence and each influencing parameter sequence affecting power quality in the distributed photovoltaic distribution network, the following may also be included:

[0062] Each power quality index sequence and each influencing parameter sequence are normalized.

[0063] In this embodiment, in order to calculate the acquired multi-dimensional feature data, the input features are screened to obtain features with strong correlation with the power quality indicators, and knowledge is obtained through data analysis in the situation understanding stage:

[0064] In order to better perform data analysis, the acquired multi-dimensional feature data such as voltage, current, active power, reactive power, frequency, solar irradiance, temperature and relative humidity can be preprocessed first. For example, since the dimensions and magnitudes of the data are not uniform, data normalization can be used to preprocess the data.

[0065] The method for normalizing a certain feature data can be shown as follows, mapping the data to the range of 0 to 1 through linear transformation.

[0066]

[0067] Where: is the normalized data, x is the original data sample, and x min is the minimum value of the sample, x max is the sample maximum value.

[0068] The following are other data analysis steps after normalization and other preprocessing:

[0069] In step 102, the time weight affecting the power quality is determined according to the solar irradiance sequence.

[0070] In one embodiment, determining the time weight affecting the power quality according to the solar irradiance sequence may include:

[0071] according to Determine the time weights that affect power quality.

[0072] Among them, ω i,j is the time weight corresponding to the i-th sample point in each influencing parameter sequence and the j-th sample point in each power quality indicator sequence, ω d is the first weight corresponding to solar irradiance greater than zero, ω n is the second weight corresponding to solar irradiance equal to zero, I i,j It is the value between the i-th sample point in each influencing parameter sequence in the solar irradiance sequence and the j-th sample point in each power quality index sequence.

[0073] In step 103, based on the time weight, a dynamic time warping algorithm is used to calculate the minimum cumulative distance between each influencing parameter sequence and each power quality indicator sequence.

[0074] In one embodiment, based on the time weight, a dynamic time warping algorithm is used to calculate the minimum cumulative distance between each influencing parameter sequence and each power quality indicator sequence, which may include:

[0075] The derivatives of each influencing parameter sequence and each power quality index sequence are calculated respectively, and recorded as the first derivative sequence and the second reciprocal sequence.

[0076] Based on the time weight, a distance matrix between each influencing parameter sequence and each power quality indicator sequence is calculated according to the first derivative sequence and the second derivative sequence.

[0077] Based on the distance matrix, the dynamic time warping algorithm is used to calculate the minimum cumulative distance between each influencing parameter sequence and each power quality indicator sequence.

[0078] Exemplarily, respectively calculating the derivatives of each influencing parameter sequence and each power quality indicator sequence, recorded as a first derivative sequence and a second reciprocal sequence, may include:

[0079] according to Calculate the derivative of each influencing parameter sequence and record it as the first derivative sequence.

[0080] according to Calculate the derivative of each power quality index sequence and record it as the second derivative sequence.

[0081] Among them, x′ pi is the derivative of the i-th sample point in the p-th influencing parameter sequence, x pi+1 is the i+1th sample point in the pth influencing parameter sequence, x pi-1 is the i-1th sample point in the pth influencing parameter sequence, i = 1, 2, ..., n, n is the number of sample points in the pth influencing parameter sequence, y′ qj is the derivative of the jth sample point in the qth power quality indicator sequence, y qj+1 is the j+1th sample point in the qth power quality indicator sequence, y qj-1 is the j-1th sample point in the qth power quality indicator sequence, j=1, 2, …, m, and m is the number of sample points in the qth power quality indicator sequence.

[0082] Exemplarily, based on the time weight, according to the first derivative sequence and the second derivative sequence, calculating the distance matrix between each influencing parameter sequence and each power quality indicator sequence may include:

[0083] According to Dpq (i,j)=ω i,j ||x′ pi -y′ qj || P , calculate the distance matrix between each influencing parameter sequence and each power quality index sequence.

[0084] Among them, D pq is the distance matrix between the pth influencing parameter sequence and the qth power quality index sequence, D pq (i,j) is the distance between the i-th sample point in the p-th influencing parameter sequence and the j-th sample point in the q-th power quality index sequence, ω i,j is the time weight corresponding to the i-th sample point in each influencing parameter sequence and the j-th sample point in each power quality index sequence, x′ pi is the derivative of the i-th sample point in the p-th influencing parameter sequence, y′ qj is the derivative of the jth sample point in the qth power quality indicator sequence, || || p represents the p-norm.

[0085] In step 104, the influencing parameter sequence whose minimum cumulative distance is less than a set threshold is determined as a target influencing parameter sequence, and a power quality prediction model is obtained by training according to the target influencing parameter sequence.

[0086] The main purpose of the above steps is feature screening:

[0087] For multi-dimensional feature data that can characterize power quality information, it is necessary to fully mine and obtain valuable information in the data and reduce the impact of redundant features. Therefore, the pre-processed multi-dimensional feature data is screened and selected.

[0088] Assume that two random variables X and Y represent the operation influencing parameter sequence (i.e., operation data or environmental data) and the power quality index sequence respectively. X is the collected influencing parameter sequence such as voltage, current, active power, reactive power, frequency, solar irradiance, temperature and relative humidity. Y is the power quality index sequence such as voltage deviation, frequency deviation, voltage total harmonic distortion rate, voltage fluctuation, three-phase voltage unbalance, as shown in the following formula:

[0089]

[0090] Where: p is the number of types of influencing parameter sequences, q is the number of types of power quality indicator sequences, x pn is the nth sample data of the pth type influencing parameter sequence, y qm is the mth sample data of the qth type power quality indicator sequence.

[0091] The following is a sequence of influencing parameters X1 And a certain power quality index sequence Y 1 Take 2012 as an example to illustrate the process of calculating the minimum cumulative distance between each influencing parameter sequence and each power quality indicator sequence based on time weight using the dynamic time warping algorithm:

[0092] (1) Calculate the time series derivative

[0093] For the time series X 1 and Y 1 , calculate its derivative sequence X′ 1 and Y 1 ′:

[0094]

[0095] Where: X 1 The derivative of the first and nth points is 0, Y 1 The derivative of the 1st and mth points is 0.

[0096] (2) Define the time weight function

[0097] Since the solar irradiance in the environmental data is only available during the day, and the greater the solar irradiance, the more it will affect the grid operation data, thereby affecting the power quality, a time weight function is defined, which assigns a higher weight during the day (when the solar irradiance is greater than zero) and a lower weight at night (when the solar irradiance is zero).

[0098]

[0099] Where: d is the first weight corresponding to the solar irradiance being greater than zero, representing the weight during the day, ω n is the second weight corresponding to the solar irradiance equal to zero, representing the weight at night, which can be determined according to the actual situation. d and ω n The specific value of .

[0100] (3) Calculate the distance matrix

[0101] Calculate the distance matrix D for each time point 11 , adjust the distance calculation according to the time weight factor:

[0102] D 11 (i,j)=ω i,j ||x′ 1i -y′ 1j || P ;

[0103] (4) Calculate the cumulative distance matrix

[0104] The dynamic programming algorithm is used to calculate the cumulative distance matrix C, which is the minimum cumulative distance from the starting point to each time step. The update formula of the cumulative distance matrix is:

[0105]

[0106] The boundary conditions are:

[0107] C(1,1)=D 11 (1,1);

[0108] C(i,1)=D 11 (i,1)+C(i-1,1),i>1;

[0109] C(1,j)=D 11 (1,j)+C(1,j-1),j>1;

[0110] (5) Calculate the minimum cumulative distance

[0111] The final update formula based on the cumulative distance matrix is ​​C(n,m), which affects the parameter sequence X 1 And the power quality index sequence Y 1 The minimum cumulative distance IMDTW, that is, the influence parameter sequence X 1 And the power quality index sequence Y 1 The similarity metric distance is:

[0112] IMDTW(X 1 ,Y 1 )=C(n,m);

[0113] The IMDTW distance calculation method for the remaining influencing parameter sequences and power quality index sequences is the same as above. Finally, the IMDTW distance between each type of influencing parameter and each power quality index can be obtained. The smaller the distance, the stronger the correlation between the influencing parameter and the power quality index. Therefore, the influencing parameter sequence with the minimum cumulative distance IMDTW less than the set threshold can be selected as the target influencing parameter sequence as the input variable for training the power quality prediction model.

[0114] In the process of calculating the minimum cumulative distance IMDTW, this embodiment takes into account that the dynamic time warping algorithm (Dynamic Time Warping, DTW) is a similarity measurement directly based on the sum of the distances between the points of two time series. However, when the overall trends of the two time series are similar and there is local noise or amplitude changes, the alignment path is prone to be unstable and the overall trend cannot be accurately captured. Therefore, by aligning the derivatives of the time series to ignore local noise or amplitude changes, the overall change trend can be captured more accurately. At the same time, the time weight function is defined according to the actual situation of the distributed photovoltaic distribution network, and the impact of the change of distributed photovoltaic output over time on the power quality in the power grid can be considered, which is more in line with reality, thereby more accurately measuring the similarity measurement distance between the influencing parameter sequence and the power quality indicator sequence, so as to make more accurate power quality predictions in the future.

[0115] In one embodiment, the power quality prediction model is obtained by training according to the target influencing parameter sequence, including:

[0116] The initial prediction model is constructed based on convolutional neural network and bidirectional long short-term memory network.

[0117] The target influencing parameter sequence is used as the input of the initial prediction model, and the power quality indicator sequence is used as the output of the initial prediction model. The parameters of the initial prediction model are optimized and trained based on the chaotic cloud quantum bat algorithm to obtain the power quality prediction model.

[0118] Combination Figure 2 ,This embodiment constructs a prediction model and performs a situation prediction of the power quality based on the CBLCQB algorithm.

[0119] Specifically, in the situation prediction stage, the future development trend is predicted, and a prediction model is constructed. The strongly correlated feature vector (i.e., the target influencing parameter sequence) obtained in the above steps is used as the input variable, and the five power quality data of voltage deviation, frequency deviation, voltage total harmonic distortion rate, voltage fluctuation, and three-phase voltage imbalance are used as the output variables.

[0120] The power quality prediction flow chart of the distributed photovoltaic distribution network based on CBLCQB is as follows: Figure 3 As shown in the figure, the algorithm integrates convolutional neural network and bidirectional long short-term memory network and combines it with chaotic cloud quantum bat algorithm to automatically optimize hyperparameters. The main prediction steps are as follows.

[0121] (1) The input layer receives raw input operation data, including voltage, current, active power, reactive power and frequency, and environmental data including solar irradiance, temperature and relative humidity.

[0122] (2) Perform feature screening according to step 102 and step 103, and use the screened features that are highly correlated with the power quality index as model input.

[0123] (3) The convolution layer uses the convolution kernel (filter) to perform a convolution operation on the input data, and extracts features from the input data through two layers of one-dimensional convolution layers that are continuously deepened, as shown in the following formula:

[0124] α 1 =σ(α 0 ×W+b);

[0125] Where: α 1 is the output of the convolutional layer, σ is the activation function, b is the bias, W is the intermediate filter matrix, α 0 It is the input of the convolutional layer.

[0126] The nonlinear mapping of the output results of the convolutional layer is achieved by applying the Relu activation function. The Relu activation function is shown as follows:

[0127]

[0128] (4) The pooling layer performs dimensionality reduction processing on the feature data to reduce the amount of calculation. Maximum pooling is used to take the maximum value in the pooling window.

[0129] The original input feature map generated by convolution is I, the pooling window size is m×n, and the step sizes in the horizontal and vertical directions are S respectively. x and S y , by locating the corresponding area on the input feature map, the coordinates of the upper left corner of the area are (S x ×x,S y ×y), in this m×n area, select the largest value as the value of the output feature map O(x,y), as shown in the following formula:

[0130] O(x,y)=max(I(S x ×x:S x ×x+m,S y ×y:S y ×y+n));

[0131] (5) LSTM network calculation

[0132] There are three gated units in LSTM: forget gate, input gate, and output gate. The previous state of the unit goes into the current state controlled by the forget gate, the input gate determines how much of the current input goes into the current unit state, and the output gate is used to determine the output at the current moment, which combines the current memory and the long-term state.

[0133] The calculation formula for each gate function and state transition process in the LSTM module is as follows:

[0134] f t =σ(P f [h t-1 ,x t ]+r f );

[0135] i t =σ(P i [h t-1 ,x t ]+r i );

[0136] o t =σ(P o [h t-1 ,x t ]+r o );

[0137]

[0138] h t =o t ×tanh(c t );

[0139] Where: f t 、i t and t are the outputs of the forget gate, input gate, and output gate respectively; h t-1 and h t is the previous value and the current value in the network; c t-1 、c t The status at the previous time and the current time respectively; is the current memory of the network; P f 、r f , P i 、r i , P o 、r o , P c 、r c They are the weight matrices and bias terms of the forget gate, input gate, output gate, and computing element respectively; σ and tanh are both nonlinear activation functions.

[0140] (6) BiLSTM network calculation

[0141] BiLSTM can synthesize the outputs in two directions to adjust the weight values. Reading time series data from two directions can greatly improve the accuracy of training. Providing information between the past and the future for features is the design concept of Bi-LSTM.

[0142] The states of the forward and backward hidden layers are as follows:

[0143]

[0144] The calculation formula of the output layer is as follows:

[0145] O t =H t P hq +r q ;

[0146] Where: is the state of the forward hidden layer and the reverse hidden layer, where n and h are the number of samples and the number of hidden units respectively; X t ∈R n×h Used to represent the input (i.e., the features after convolution and pooling), where n and d are the number of samples and input; δ is used to represent the activation function of the hidden layer; and r q ∈R 1 ×q Indicates the size of different weights and biases; O t represents the output of the output layer; H t (H t ∈R n×2h ) is the final state of the hidden layer, and synthesis.

[0147] (7) Automatic optimization of CCQBA algorithm parameters

[0148] 1) Initialization

[0149] Initialize the bat population. Each bat in the bat population corresponds to the parameters that need to be optimized in the convolutional neural network and the bidirectional long short-term memory network, which can include the convolution kernel size, the number of convolution kernels, the number of hidden units, the number of LSTM layers, the learning rate, the number of training rounds, etc. For each bat i, randomly assign the position Xi and speed Vi, and initialize the frequency fi, loudness Ai, and pulse rate ri. Initialize the population size n, the maximum number of iterations gen, and the mixed execution parameter mix. Define the frequency range fmin and fmax, and initialize the global optimal solution X*.

[0150] 2) Quantum position update

[0151] For each bat i, quantum behavior is used to update its position. The concept of quantum bit is introduced, where the super position state of the quantum bit can be simulated by the following formula:

[0152]

[0153] Where: X* is the current global optimal position, ε is the quantum probability amplitude, which controls the search range of the quantum state, and Levy(fi ) is a Levy flight, which is used to simulate the random search behavior of bats.

[0154] 3) Cloud model local search

[0155] For bats with good fitness values, the cloud model is used for local search to finely explore the neighborhood of the current solution. The cloud model update formula is:

[0156]

[0157] Where: rand is a random number between [0,1], E n is the entropy, which controls the size of the search range, He is the super entropy, which controls the uncertainty of entropy, and N(0,1) is a Gaussian distributed random number with a mean of 0 and a variance of 1.

[0158] 4) Chaotic global disturbance

[0159] For bats with poor fitness values, chaotic mapping is used to reinitialize the positions of some bats to increase the diversity of the population. The chaotic position initialization formula is:

[0160]

[0161] Where: X min and X max They represent the boundaries of the search space respectively, chaos is a value in the chaotic sequence, and can be generated by logical mapping or other chaotic mapping.

[0162] 5) Update loudness and pulse firing rate

[0163] Update the loudness Ai and pulse emission rate ri of each bat according to the new solution obtained.

[0164] The loudness update formula is:

[0165]

[0166] The pulse emission rate update formula is:

[0167]

[0168] Where: α and γ are the attenuation coefficients, and t is the current iteration number.

[0169] 6) Select and update the global optimal solution

[0170] All bats’ solutions are evaluated and the best one is selected as the new global optimal solution X*.

[0171] 7) Termination conditions

[0172] Checks whether the maximum number of iterations gen has been reached.

[0173] (8) Substitute the test set data into the model, output the prediction results, and obtain the future power quality prediction value.

[0174] After training the power quality prediction model, the prediction effect of the model can be evaluated.

[0175] For example, the mean absolute error, root mean square error, and mean absolute percentage error can be used to evaluate the prediction effect of the model. The calculation method is as follows:

[0176]

[0177] Where: y i is the true value of the i-th sample; is the predicted value of the i-th sample.

[0178] In this embodiment, by establishing a CBLCQB model for prediction in the situation prediction stage, it is possible to fully explore the multidimensional data features, reduce the loss of long time series features, and achieve automatic optimization of hyperparameters to obtain more accurate prediction results.

[0179] In step 105, various power quality indicators in the distributed photovoltaic distribution network are predicted according to the power quality prediction model.

[0180] This embodiment predicts the power quality of a distributed photovoltaic distribution network based on situational awareness, introduces situational awareness into the field of power quality prediction, collects multi-dimensional operation data and environmental data through smart meters, sensors and other equipment, obtains knowledge through data analysis based on feature selection, and then derives the power quality of the distribution system under the future situation through the situational awareness framework. By mining the operation data and surrounding environmental data in the distribution network, the changing trends of various power quality indicators in the power grid can be perceived in advance to manage the power quality, significantly reducing the impact of distributed photovoltaic grid connection on the power quality of the distribution network, and ensuring the safe and reliable operation of the power grid.

[0181] The embodiment of the present invention obtains each power quality indicator sequence and each influencing parameter sequence affecting the power quality in the distributed photovoltaic distribution network, and the influencing parameter sequence includes a solar irradiance sequence, and then determines the time weight affecting the power quality according to the solar irradiance sequence, so as to consider the time weight in the subsequent training of the power quality prediction model, that is, in combination with the actual situation of the distributed photovoltaic distribution network, consider the influence of the change of distributed photovoltaic output over time on the power quality in the power grid, so as to make the trained power quality prediction model more in line with reality, and improve the prediction accuracy of each power quality indicator in the distributed photovoltaic distribution network obtained based on the power quality prediction model.

[0182] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0183] The following is an embodiment of the device of the present invention. For details not described in detail therein, reference may be made to the corresponding method embodiment described above.

[0184] Figure 4 The following is a schematic diagram of the structure of a power quality prediction device including a distributed photovoltaic distribution network provided by an embodiment of the present invention. For ease of explanation, only the parts related to the embodiment of the present invention are shown, which are described in detail as follows:

[0185] like Figure 4 As shown, the power quality prediction device including a distributed photovoltaic distribution network includes: an acquisition module 41 , a first processing module 42 , a second processing module 43 , a training module 44 and a prediction module 45 .

[0186] An acquisition module 41 is used to acquire various power quality index sequences and various influencing parameter sequences affecting power quality in a distributed photovoltaic distribution network, wherein the influencing parameter sequence includes a solar irradiance sequence;

[0187] A first processing module 42 is used to determine the time weight affecting the power quality according to the solar irradiance sequence;

[0188] A second processing module 43 is used to calculate the minimum cumulative distance between each of the influencing parameter sequences and each of the power quality indicator sequences based on the time weight using a dynamic time warping algorithm;

[0189] A training module 44 is used to determine the influencing parameter sequence whose minimum cumulative distance is less than a set threshold as a target influencing parameter sequence, and train a power quality prediction model according to the target influencing parameter sequence;

[0190] The prediction module 45 is used to predict various power quality indicators in the distributed photovoltaic distribution network according to the power quality prediction model.

[0191] The embodiment of the present invention obtains each power quality indicator sequence and each influencing parameter sequence affecting the power quality in the distributed photovoltaic distribution network, and the influencing parameter sequence includes a solar irradiance sequence, and then determines the time weight affecting the power quality according to the solar irradiance sequence, so as to consider the time weight in the subsequent training of the power quality prediction model, that is, in combination with the actual situation of the distributed photovoltaic distribution network, consider the influence of the change of distributed photovoltaic output over time on the power quality in the power grid, so as to make the trained power quality prediction model more in line with reality, and improve the prediction accuracy of each power quality indicator in the distributed photovoltaic distribution network obtained based on the power quality prediction model.

[0192] In a possible implementation, the first processing module 42 may be configured to: Determine the time weights that affect power quality;

[0193] Among them, ω i,j is the time weight corresponding to the i-th sample point in each of the influencing parameter sequences and the j-th sample point in each of the power quality indicator sequences, ω d is the first weight corresponding to solar irradiance greater than zero, ω n is the second weight corresponding to solar irradiance equal to zero, I i,j It is the value between the i-th sample point in each of the influencing parameter sequences in the solar irradiance sequence and the j-th sample point in each of the power quality indicator sequences.

[0194] In a possible implementation, the second processing module 43 may be used to respectively calculate the derivatives of each of the influencing parameter sequences and each of the power quality indicator sequences, which are recorded as a first derivative sequence and a second reciprocal sequence;

[0195] Based on the time weight, and according to the first derivative sequence and the second derivative sequence, a distance matrix between each of the influencing parameter sequences and each of the power quality indicator sequences is calculated;

[0196] Based on the distance matrix, a dynamic time warping algorithm is used to calculate the minimum cumulative distance between each of the influencing parameter sequences and each of the power quality indicator sequences.

[0197] In a possible implementation, the second processing module 43 may be configured to: Calculate the derivative of each of the influencing parameter sequences, and record it as the first derivative sequence;

[0198] according to Calculating the derivative of each of the power quality indicator sequences, recorded as a second derivative sequence;

[0199] Among them, x′ piis the derivative of the i-th sample point in the p-th influencing parameter sequence, x pi+1 is the i+1th sample point in the pth influencing parameter sequence, x pi-1 is the i-1th sample point in the pth influencing parameter sequence, i=1,2,…,n, n is the number of sample points in the pth influencing parameter sequence, y′ qj is the derivative of the jth sample point in the qth power quality indicator sequence, y qj+1 is the j+1th sample point in the qth power quality indicator sequence, y qj-1 is the j-1th sample point in the qth power quality indicator sequence, j=1, 2, ..., m, and m is the number of sample points in the qth power quality indicator sequence.

[0200] In a possible implementation, the second processing module 43 may be configured to: pq (i,j)=ω i,j ||x′ pi -y′ qj || P , calculating the distance matrix between each of the influencing parameter sequences and each of the power quality indicator sequences;

[0201] Among them, D pq is the distance matrix between the pth influencing parameter sequence and the qth power quality indicator sequence, D pq (i, j) is the distance between the i-th sample point in the p-th influencing parameter sequence and the j-th sample point in the q-th power quality indicator sequence, ω i,j is the time weight corresponding to the i-th sample point in each of the influencing parameter sequences and the j-th sample point in each of the power quality indicator sequences, x′ pi is the derivative of the i-th sample point in the p-th influencing parameter sequence, y′ qj is the derivative of the jth sample point in the qth power quality indicator sequence, || || p represents the p-norm.

[0202] In a possible implementation, the acquisition module 41 may also be used to perform normalization processing on each of the power quality indicator sequences and each of the influencing parameter sequences.

[0203] In a possible implementation, the training module 44 may be used to construct an initial prediction model based on a convolutional neural network and a bidirectional long short-term memory network;

[0204] The target influencing parameter sequence is used as the input of the initial prediction model, and each of the power quality indicator sequences is used as the output of the initial prediction model. The parameters of the initial prediction model are optimized and trained based on the chaotic cloud quantum bat algorithm to obtain a power quality prediction model.

[0205] Figure 5 is a schematic diagram of a terminal provided by an embodiment of the present invention. Figure 5 As shown, the terminal 5 of this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50. When the processor 50 executes the computer program 52, the steps in the above-mentioned various embodiments of the method for predicting power quality of a distributed photovoltaic distribution network are implemented, such as Figure 1 Alternatively, when the processor 50 executes the computer program 52, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 4 Functionality of the modules / units 41 to 45 shown.

[0206] Exemplarily, the computer program 52 may be divided into one or more modules / units, one or more modules / units are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 52 in the terminal 5. For example, the computer program 52 may be divided into Figure 4 Modules / units 41 to 45 are shown.

[0207] The terminal 5 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal 5 may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 5 It is only an example of terminal 5 and does not constitute a limitation on terminal 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.

[0208] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0209] The memory 51 may be an internal storage unit of the terminal 5, such as a hard disk or memory of the terminal 5. The memory 51 may also be an external storage device of the terminal 5, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal 5. Further, the memory 51 may also include both an internal storage unit of the terminal 5 and an external storage device. The memory 51 is used to store computer programs and other programs and data required by the terminal. The memory 51 may also be used to temporarily store data that has been output or is to be output.

[0210] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0211] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0212] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0213] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0214] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0215] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0216] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned embodiments of the power quality prediction method for the distributed photovoltaic distribution network can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium.

[0217] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. A method for predicting power quality of a distributed photovoltaic distribution network, characterized in that: include: Acquire various power quality index sequences and various influencing parameter sequences affecting power quality in a distributed photovoltaic distribution network, wherein the influencing parameter sequence includes a solar irradiance sequence; Determining a time weight that affects power quality according to the solar irradiance sequence; Based on the time weight, a dynamic time warping algorithm is used to calculate the minimum cumulative distance between each of the influencing parameter sequences and each of the power quality indicator sequences; Determine the influencing parameter sequence whose minimum cumulative distance is less than a set threshold as a target influencing parameter sequence, and obtain a power quality prediction model through training according to the target influencing parameter sequence; The power quality prediction model is used to predict various power quality indicators in a distributed photovoltaic distribution network.

2. The method for predicting power quality of a distributed photovoltaic distribution network according to claim 1, characterized in that: According to the solar irradiance sequence, the time weight affecting the power quality is determined, including: according to Determine the time weights that affect power quality; Among them, ω i,j is the time weight corresponding to the i-th sample point in each of the influencing parameter sequences and the j-th sample point in each of the power quality indicator sequences, ω d is the first weight corresponding to solar irradiance greater than zero, ω n is the second weight corresponding to solar irradiance equal to zero, I i,j It is the value between the i-th sample point in each of the influencing parameter sequences in the solar irradiance sequence and the j-th sample point in each of the power quality indicator sequences.

3. The method for predicting power quality of a distributed photovoltaic distribution network according to claim 1, characterized in that: Based on the time weight, a dynamic time warping algorithm is used to calculate the minimum cumulative distance between each of the influencing parameter sequences and each of the power quality indicator sequences, including: Respectively calculating the derivatives of each of the influencing parameter sequences and each of the power quality index sequences, recorded as the first derivative sequence and the second reciprocal sequence; Based on the time weight, and according to the first derivative sequence and the second derivative sequence, a distance matrix between each of the influencing parameter sequences and each of the power quality indicator sequences is calculated; Based on the distance matrix, a dynamic time warping algorithm is used to calculate the minimum cumulative distance between each of the influencing parameter sequences and each of the power quality indicator sequences.

4. The method for predicting power quality of a distributed photovoltaic distribution network according to claim 3, characterized in that: The derivatives of each of the influencing parameter sequences and each of the power quality index sequences are calculated respectively, recorded as the first derivative sequence and the second reciprocal sequence, including: according to Calculate the derivative of each of the influencing parameter sequences, and record it as the first derivative sequence; according to Calculating the derivative of each of the power quality indicator sequences, recorded as a second derivative sequence; Among them, x′ pi is the derivative of the i-th sample point in the p-th influencing parameter sequence, x pi+1 is the i+1th sample point in the pth influencing parameter sequence, xpi-1 is the i-1th sample point in the pth influencing parameter sequence, i=1,2,…,n, n is the number of sample points in the pth influencing parameter sequence, y′ qj is the derivative of the jth sample point in the qth power quality indicator sequence, y qj+1 is the j+1th sample point in the qth power quality indicator sequence, y qj -1 is the j-1th sample point in the qth power quality indicator sequence, j=1, 2, ..., m, and m is the number of sample points in the qth power quality indicator sequence.

5. The method for predicting power quality of a distributed photovoltaic distribution network according to claim 3, characterized in that: Based on the time weight, according to the first derivative sequence and the second derivative sequence, a distance matrix between each of the influencing parameter sequences and each of the power quality indicator sequences is calculated, including: According to D pq (i,j)=ω i,j ||x′ pi -y′ qj || P , calculating the distance matrix between each of the influencing parameter sequences and each of the power quality indicator sequences; Among them, D pq is the distance matrix between the pth influencing parameter sequence and the qth power quality indicator sequence, D pq (i, j) is the distance between the i-th sample point in the p-th influencing parameter sequence and the j-th sample point in the q-th power quality indicator sequence, ω i,j is the time weight corresponding to the i-th sample point in each of the influencing parameter sequences and the j-th sample point in each of the power quality indicator sequences, x′ pi is the derivative of the i-th sample point in the p-th influencing parameter sequence, y′ qj is the derivative of the jth sample point in the qth power quality indicator sequence, || || p represents the p-norm.

6. The method for predicting power quality of a distributed photovoltaic distribution network according to claim 1, characterized in that: After obtaining the power quality index sequences and the parameter sequences affecting the power quality in the distributed photovoltaic distribution network, it also includes: Normalization processing is performed on each of the power quality indicator sequences and each of the influencing parameter sequences.

7. The method for predicting power quality of a distributed photovoltaic distribution network according to claim 1, characterized in that: The power quality prediction model is obtained by training the target influencing parameter sequence, including: Construct an initial prediction model based on convolutional neural network and bidirectional long short-term memory network; The target influencing parameter sequence is used as the input of the initial prediction model, and each of the power quality indicator sequences is used as the output of the initial prediction model. The parameters of the initial prediction model are optimized and trained based on the chaotic cloud quantum bat algorithm to obtain a power quality prediction model.

8. A power quality prediction device for a distributed photovoltaic distribution network, characterized in that: include: An acquisition module, used to acquire various power quality index sequences and various influencing parameter sequences affecting power quality in a distributed photovoltaic distribution network, wherein the influencing parameter sequence includes a solar irradiance sequence; A first processing module, configured to determine a time weight affecting power quality according to the solar irradiance sequence; A second processing module, configured to calculate the minimum cumulative distance between each of the influencing parameter sequences and each of the power quality indicator sequences using a dynamic time warping algorithm based on the time weight; A training module, used for determining the influencing parameter sequence whose minimum cumulative distance is less than a set threshold as a target influencing parameter sequence, and obtaining a power quality prediction model through training according to the target influencing parameter sequence; The prediction module is used to predict various power quality indicators in the distributed photovoltaic distribution network according to the power quality prediction model.

9. A terminal, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method as claimed in any one of claims 1 to 7 are implemented.