Green power data monitoring optimization method and system based on particle swarm optimization

Through the green electricity data monitoring and optimization method based on particle swarm algorithm, the problems of low monitoring accuracy, slow response speed and insufficient scalability in the prior art are solved, and efficient and stable monitoring of the green electricity system status is achieved.

CN119622244APending Publication Date: 2025-03-14YINCHUAN POWER SUPPLY COMPANY OF STATE GRID NINGXIA ELECTRIC POWER
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411683972.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing Green Electric data monitoring methods have problems such as low monitoring accuracy, slow response speed and insufficient scalability, which are difficult to meet the needs of efficient and stable operation of modern Green Electric systems.

Method used

The green electricity data monitoring and optimization method based on the particle swarm algorithm is adopted. By acquiring and preprocessing the green electricity data, the features are extracted and the convolutional neural network monitoring model is constructed, the model parameters are optimized using the particle swarm optimization algorithm, and the early warning threshold is set for comparison.

Benefits of technology

It improves the accuracy and response speed of Green Electric data monitoring, enhances the scalability of the system, can better adapt to the characteristics and monitoring goals of Green Electric data, and improves the accuracy of monitoring the status of Green Electric system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622244A_ABST
    Figure CN119622244A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of green power data monitoring, in particular to a green power data monitoring optimization method and system based on a particle swarm algorithm. The method comprises the following steps: acquiring green power data, namely acquiring generating capacity, power, voltage, current and environmental parameters in a green power system, performing preprocessing based on the acquired green power data, performing feature extraction on the preprocessed green power data, constructing a monitoring model by using the green power data after feature extraction, and optimizing model parameters based on the monitoring model. Comprising the steps of performing model parameter optimization by using a particle swarm optimization algorithm; and setting an early warning threshold according to the characteristics of the green power system and the monitoring target, and comparing the output of the monitoring model with the early warning threshold. According to the method, the particle swarm is divided into a plurality of sub-groups through a multi-group collaborative optimization mechanism, and information exchange is carried out, so that the search diversity can be increased, and the probability of finding a globally optimal solution is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of green electricity data monitoring, and in particular relates to a green electricity data monitoring optimization method and system based on a particle swarm algorithm. Background Art

[0002] With the increasing attention paid to environmental protection and sustainable development around the world, green electricity, as a clean and renewable energy form, has been more and more widely used and developed. Green electricity mainly includes renewable energy generation such as solar energy, wind energy, hydropower, and biomass energy. It is of great significance in reducing greenhouse gas emissions and alleviating energy crises. However, the production and supply of green electricity are intermittent, volatile, and uncertain, which brings great challenges to the monitoring and management of green electricity data. Traditional green electricity data monitoring methods mainly rely on manual monitoring and empirical judgment, and have problems such as low monitoring accuracy, slow response speed, and limited data processing capabilities. It is difficult to meet the needs of efficient and stable operation of modern green electricity systems.

[0003] In order to solve the above problems, in recent years, with the continuous development of information technology and intelligent algorithms, more and more advanced technologies have been applied to the field of green electricity data monitoring. Among them, particle swarm optimization, as an optimization algorithm based on swarm intelligence, has the advantages of fast convergence speed, strong global search ability, and simple parameter setting. It has great potential in green electricity data monitoring optimization. At present, although some studies have applied particle swarm optimization to green electricity data monitoring, there are still some shortcomings. For example, existing methods often only consider a single optimization goal, such as minimizing prediction error or maximizing system reliability, while ignoring the influence of other important factors; in addition, when processing large-scale green electricity data, the computational efficiency and scalability of existing methods need to be improved. At this stage, a green electricity data monitoring optimization method and system based on particle swarm optimization is needed. Summary of the invention

[0004] In order to solve the deficiencies in the prior art, the present invention provides a green electricity data monitoring optimization method and system based on a particle swarm algorithm, which solves the problems of low monitoring accuracy, slow response speed and insufficient scalability in green electricity data monitoring.

[0005] The present invention adopts the following technical solution.

[0006] The present invention provides a green electricity data monitoring optimization method based on a particle swarm algorithm, which is characterized by comprising:

[0007] Obtain green power data, including the power generation, power, voltage, current and environmental parameters in the green power system;

[0008] Preprocessing is performed based on the acquired green electricity data, including cleaning, denoising and normalizing the collected green electricity data;

[0009] The pre-processed green electricity data is subjected to feature extraction, including extracting data features using time domain analysis and frequency domain analysis, and using principal component analysis to reduce dimensional features;

[0010] Using the green power data after feature extraction to build a monitoring model, including building a monitoring model based on a convolutional neural network architecture;

[0011] Optimize model parameters based on the monitoring model, including using particle swarm optimization algorithm to optimize model parameters;

[0012] Set the warning threshold and compare the output of the monitoring model with the warning threshold.

[0013] Preferably, the collected data is cleaned, denoised and normalized, including filling missing values ​​with interpolation, and screening outliers according to the mean and standard deviation of the acquired green electricity data, then performing wavelet transform on the screened green electricity data and calculating the wavelet coefficients according to the wavelet function, performing inverse wavelet transform based on the wavelet coefficients to obtain the denoised green electricity data, and finally performing Z-score normalization on the denoised green electricity data.

[0014] Preferably, the extracting of data features by using time domain analysis and frequency domain analysis includes obtaining time domain data in green electricity data by using time domain analysis, performing fast Fourier transform on the time domain data as input to obtain a spectrum, and extracting data features by using the spectrum. The calculation formula of the spectrum is:

[0015]

[0016] Wherein, p[c] represents the discrete time-domain sample sequence of green power data, the discrete time-domain sample value of green power data at time c, P[k] represents the spectrum, j represents the imaginary unit, k represents the frequency index, Expressed as the basic unit of discrete frequency, Expressed as a complex exponential function.

[0017] Preferably, the use of principal component analysis to reduce dimensional features includes centralizing the feature matrix obtained through time domain and frequency domain analysis, calculating the covariance matrix of the centered data matrix, solving the eigenvalues ​​and eigenvectors of the covariance matrix, sorting the eigenvalues ​​from large to small, and calculating the cumulative variance contribution rate through the eigenvalues, selecting the principal components according to the cumulative variance contribution rate, and projecting the original data onto the selected principal components to obtain the data after dimensionality reduction.

[0018] Preferably, the monitoring model is established with the convolutional neural network as the architecture, including constructing an input layer, a convolution layer, a pooling layer and a fully connected layer, wherein the construction of the input layer determines the number of input layer nodes according to the dimension of the green electricity data after feature extraction, the input layer passes the one-dimensional green electricity data feature vector to the convolution layer, the convolution layer performs a convolution operation according to the convolution kernel size and step size adapted to the input data, and adds a Tanh activation function to pass the output one-dimensional feature sequence to the pooling layer for downsampling operation, and finally adds a fully connected layer, and uses the softmax activation function to convert the output vector of the fully connected layer into a probability distribution of each category.

[0019] Preferably, the method of optimizing the model parameters using a particle swarm optimization algorithm includes encoding and initializing a particle swarm according to monitoring model parameters, defining a fitness function using a mean square error, updating particle speed and position according to a speed update formula and a position update formula, and finally setting an iteration termination condition according to a global optimal fitness value.

[0020] Preferably, the use of a particle swarm optimization algorithm to optimize model parameters also includes adopting an adaptive parameter adjustment strategy during the optimization process, adaptively adjusting the inertia weight according to the number of iterations, dynamically adjusting the learning factor according to the distance between the particle and the optimal position, adopting a multi-group collaborative optimization mechanism, dividing the particle swarm into multiple sub-groups for information exchange, and combining the model structure with adaptive adjustment to adjust the monitoring model structure according to model performance feedback.

[0021] The present invention also provides a green electricity data monitoring and optimization system based on a particle swarm algorithm, the system is a system used by the aforementioned green electricity data monitoring and optimization method based on a particle swarm algorithm, and is characterized by comprising:

[0022] The data acquisition module is configured to: acquire green power data, including power generation, power, voltage, current and environmental parameters in the green power system;

[0023] The preprocessing module is configured to: perform preprocessing based on the acquired green power data, including cleaning, denoising and normalizing the acquired green power data;

[0024] The feature extraction module is configured to: extract features from the pre-processed green electricity data, including extracting data features using time domain analysis and frequency domain analysis, and reducing dimensional features using principal component analysis;

[0025] The model module is configured to: construct a monitoring model using the feature-extracted green power data, including establishing a monitoring model using a convolutional neural network as an architecture;

[0026] The optimization module is configured to: optimize the model parameters based on the monitoring model, including optimizing the model parameters using a particle swarm optimization algorithm;

[0027] The output module is configured to: set a warning threshold according to the characteristics of the green power system and the monitoring target, and compare the output of the monitoring model with the warning threshold.

[0028] The present invention also provides a computer-readable storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded by a processor of a terminal device and executing the aforementioned green electricity data monitoring optimization method based on a particle swarm algorithm.

[0029] The present invention also provides a terminal device, including a processor and a computer-readable storage medium, the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, characterized in that the instructions are suitable for being loaded by the processor and executing the aforementioned green electricity data monitoring optimization method based on particle swarm algorithm.

[0030] The beneficial effect of the present invention is that, compared with the prior art,

[0031] 1. The monitoring model established by the present invention with convolutional neural network as the architecture has strong feature learning ability. The structure of constructing input layer, convolution layer, pooling layer and fully connected layer can automatically learn complex patterns in green power data. The convolution layer can automatically extract local features in the data through the sliding convolution operation of the convolution kernel. The use of Tanh activation function introduces nonlinear factors to the convolution layer, so that the model can handle nonlinear relationships in green power data, especially the relationship between power and environmental factors in green power data is often nonlinear. This structure of CNN can effectively capture this complex relationship, thereby improving the monitoring accuracy of the green power system status.

[0032] 2. The present invention can increase the diversity of search and further improve the probability of finding the global optimal solution by dividing the particle group into multiple sub-groups and exchanging information through a multi-group collaborative optimization mechanism. Combined with the adaptive adjustment of the model structure, the monitoring model structure can be dynamically adjusted according to the model performance feedback, so that the model can better adapt to the characteristics of green electricity data and monitoring objectives. For example, if the model overfits during the optimization process, the number of layers or nodes of the fully connected layer can be reduced in time; if the poor performance of the model is due to the simple structure, the number of nodes in the convolutional layer or the fully connected layer can be increased, etc., thereby improving the performance and scalability of the model.

[0033] 3. The present invention uses a combination of time domain analysis and frequency domain analysis to extract data features, and can mine information on green electricity data in different dimensions. Time domain analysis can obtain the characteristics of data in time series, such as statistical characteristics such as mean and variance that reflect the fluctuation of data, while frequency domain analysis obtains the spectrum through fast Fourier transform. The different frequency components in the spectrum can reveal the periodic information in the green electricity data or characteristics related to the operating frequency of the equipment. Through frequency domain analysis, it may be found that the power generation power has abnormal fluctuations at certain specific frequencies, thereby providing an important basis for equipment fault diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a schematic diagram of the overall process of a green electricity data monitoring optimization method based on a particle swarm algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.

[0036] like Figure 1 As shown, embodiment 1 of the present invention provides a green electricity data monitoring optimization method based on a particle swarm algorithm, comprising:

[0037] Obtain green power data, including the power generation, power, voltage, current and environmental parameters in the green power system;

[0038] Preprocessing is performed based on the acquired green electricity data, including cleaning, denoising and normalizing the collected green electricity data;

[0039] The pre-processed green electricity data is subjected to feature extraction, including extracting data features using time domain analysis and frequency domain analysis, and using principal component analysis to reduce dimensional features;

[0040] Using the green power data after feature extraction to build a monitoring model, including building a monitoring model based on a convolutional neural network architecture;

[0041] Optimize model parameters based on the monitoring model, including using particle swarm optimization algorithm to optimize model parameters;

[0042] The warning threshold is set according to the characteristics of the green power system and the monitoring objectives, and the output of the monitoring model is compared with the warning threshold.

[0043] Specifically, a green electricity data monitoring optimization method based on particle swarm algorithm includes the following steps;

[0044] like Figure 1 As shown, S1, obtaining green power data, including obtaining power generation, power, voltage, current and environmental parameters in the green power system;

[0045] Green power data is collected using a variety of sensors and monitoring equipment, including voltage sensors, current sensors, power sensors, ambient temperature sensors, light intensity sensors, etc., to collect different types of data in the green power system in real time. Data is collected from the green power system at certain time intervals to form continuous time series data. Power generation data is collected every hour, and power data is recorded at shorter time intervals (such as every minute). The collection frequency of voltage and current data matches that of power data, and environmental parameters (such as wind speed, light intensity, temperature, etc.) are collected according to the set frequency of the environmental monitoring equipment. The collected raw green power data is aggregated into a data repository, awaiting further preprocessing operations.

[0046] S2. Preprocessing the acquired green electricity data, including cleaning, denoising and normalizing the acquired green electricity data;

[0047] For the missing values ​​in the collected green power data, interpolation method is used to fill them. Specifically, this embodiment adopts linear interpolation method. Taking green power data as an example, it is assumed that there is missing power data in a certain period of time. It is assumed that the power values ​​at time t1 and t3 are P(t1) and P(t3) respectively, and the power value at time t2 is missing. According to the linear interpolation formula:

[0048]

[0049] Wherein, t2 is represented as any time between t1 and t3, and the filling value at time t2 is calculated. For other green power data (such as power generation, voltage, current, etc.), the missing values ​​are filled according to the previous and next valid data points of the data in the time series in the same way as the linear interpolation method. The valid data points are represented as a green power data sequence arranged in time order, for example, P i is a missing value, then the normal value of P i+1 and P i-1 That is P iAfter the valid data points, outlier screening is performed based on the mean and standard deviation of the collected green electricity data, and the mean μ and standard deviation σ of each parameter of the green electricity data (such as power generation, power, voltage, current, etc.) are calculated. The judgment range of outliers is set, and data beyond the range of μ±3σ is judged as outliers. Taking green electricity power data as an example, if the power value P at a certain moment satisfies P<μ-3σ or P>μ-3σ, the data point is marked as an outlier. For data points marked as outliers, they are processed according to the specific situation. If the outlier is a one-time anomaly caused by equipment failure or temporary interference, the above-mentioned interpolation method can be used for correction. If the frequency of occurrence of outliers is high, it may be necessary to further check whether there is a problem with the data acquisition equipment or system.

[0050] Finally, the data is denoised using wavelet transform, and a suitable wavelet function is selected according to the characteristics of the green power data. In this embodiment, the Daubechies wavelet function is selected. The Daubechies wavelet function has good time-frequency localization characteristics and is suitable for analyzing green power data with mutation and non-stationary characteristics. The selected green power data (such as power data) is subjected to wavelet transform. Let x[n] be the cleaned green power data sequence (n=0,1,…,N-1), and according to the selected wavelet function ψ(t), the wavelet coefficient W(a,b) is calculated:

[0051]

[0052] Among them, a represents the scale factor, b represents the translation factor, and by adjusting the scale factor and the translation factor, the frequency characteristics of green electricity data can be analyzed at different scales and positions.

[0053] After the wavelet coefficients are calculated, threshold processing is performed on the wavelet coefficients. This implementation adopts a soft threshold processing method, sets a threshold T, and for the wavelet coefficients W(a,b), if |W(a,b)|≤T, it is set to 0; if |W(a,b)|>T, it is updated to sgn(W(a,b))(|W(a,b)|-T), where sgn is a sign function, and performs an inverse wavelet transform on the wavelet coefficients after threshold processing to obtain the denoised green power data x denoised [n], the inverse wavelet transform formula is:

[0054]

[0055] Where C is the normalization constant,

[0056] Recalculate the mean μ of the denoised green power data denoised and standard deviation σ denoised , for each data point x denoised[n], normalized according to the Z-score normalization formula, the Z-score normalization formula is:

[0057]

[0058] After Z-score normalization, the green electricity data (including power generation, power, voltage, current and other parameters) are converted into a standard normal distribution with a mean of 0 and a standard deviation of 1, making the data between different parameters comparable.

[0059] S3. Extracting features from the pre-processed green electricity data, including extracting data features using time domain analysis and frequency domain analysis, and reducing dimensional features using principal component analysis;

[0060] The pre-processed green power data (such as power generation, power, voltage, current and other data after cleaning, denoising and normalization) is analyzed in the time domain. First, the basic time domain characteristics are calculated, including mean, variance, standard deviation, peak-to-peak value and root mean square value. These time domain characteristics can reflect the basic characteristics of green power data in the time domain, such as the average level and fluctuation degree of power. The time domain sequence of green power data in the above time domain analysis is used as input for fast Fourier transform (FFT) to obtain the spectrum P[k]. According to the discrete Fourier transform (DFT) formula:

[0061]

[0062] Where p[c] represents the discrete sample sequence of green power data in the time domain, that is, the value of the signal at time c, P[k] represents the spectrum, j represents the imaginary unit, and k represents the frequency index. Expressed as the basic unit of discrete frequency, It is expressed as a complex exponential function. In actual calculation, the existing FFT algorithm library (such as FFTW library) is used to efficiently calculate the spectrum P[k]. FFT converts time domain data into frequency domain data, so that green power data can be analyzed from the perspective of frequency.

[0063] Based on the obtained spectrum P[k], the following frequency domain features are extracted:

[0064] Calculate spectral energy Spectral energy reflects the total energy distribution of a signal in the frequency domain. In green power data, the energy distribution of different frequency components can reveal information related to the operating status of power generation equipment, environmental factors, etc. For example, in wind power generation, if the spectrum energy within a certain frequency range changes, it may be related to the rotation frequency of the wind turbine blades and their harmonic frequencies.

[0065] Main frequency: Find the frequency value corresponding to the frequency component with the largest amplitude in the spectrum, which is the main frequency. The main frequency can be used as an important indicator of the operating status of the green power system. For example, in some stable power generation equipment, the main frequency has a relatively stable value. If the main frequency is offset, it may indicate that the equipment is faulty or subject to external interference.

[0066] Harmonic content: Analyze the frequency components other than the main frequency in the spectrum, especially the amplitude and energy of the harmonic frequency components that are integer multiples of the main frequency. Changes in harmonic content can reflect the nonlinear characteristics of the equipment or interference in the power system. For example, during power transmission, if there are too many harmonics, it may affect the power quality and the service life of the equipment.

[0067] The features obtained through time domain analysis and frequency domain analysis are combined into a feature matrix X, where each row represents a sample (such as green power data samples at different times) and each column represents a feature (such as the mean and variance in the time domain features, and the spectrum energy and main frequency in the frequency domain features).

[0068] Center the feature matrix X and calculate the mean of each feature:

[0069]

[0070] Among them, q is the number of samples, m is the number of features, and x ij for different elements in the original data matrix, and then for each element x in the original data matrix ij Convert to x ij -μ j , and get the centralized feature matrix X c , then calculate the centralized data matrix X c The covariance matrix of The covariance matrix Σ reflects the correlation between each feature, and its element σ ij represents the covariance between the i-th feature and the j-th feature, solves the characteristic equation of the covariance matrix Σ |Σ-λI|=0, and obtains m eigenvalues ​​λ1,λ2,…,λ m , where λ is the eigenvalue and I is the identity matrix. For each eigenvalue λ i , solve the corresponding eigenvector v i , satisfying Σv i =λ i v i , the eigenvalues ​​and eigenvectors are solved by numerical calculation methods.

[0071] Sort the eigenvalues ​​in descending order, that is, λ1≥λ2≥…≥λ m , calculate the cumulative variance contribution rate based on the eigenvalue By setting a threshold (such as CVR ≥ 0.9), selecting the first k principal components that meet the threshold, the original data matrix X c Project it onto the selected principal component to obtain the reduced dimension data Y=X c V k , where V k =[v1,v2,…,v k ] is a matrix composed of the eigenvectors corresponding to the selected principal components. The dimension-reduced data Y greatly reduces the dimension of the data while retaining the key information of the original data, thereby improving the efficiency of subsequent data processing and model building.

[0072] S4. Building a monitoring model using the green electricity data after feature extraction, including building a monitoring model based on a convolutional neural network architecture;

[0073] The number of nodes in the input layer is determined according to the dimension of the green electricity data after feature extraction. Due to the previous feature extraction operations (such as time domain analysis, frequency domain analysis, and dimensionality reduction operations after principal component analysis), the green electricity data exists in the form of a one-dimensional feature vector. The length of the feature vector of the green electricity data obtained after feature extraction is L, and the number of nodes in the input layer is set to L. This feature vector contains comprehensive information about the relevant features of the green electricity data such as processed power, voltage, current, etc., and it is completely used as the input of the input layer.

[0074] The size and step length of the convolution kernel are determined according to the input data of the input layer (i.e., the one-dimensional feature vector of the green electricity data). For the green electricity data, considering the complexity of the data and the feature scale that needs to be captured, the convolution kernel size is set to k1 (e.g., k1=3) and the step length is set to s. The selection of these parameters is based on the preliminary analysis of the characteristics of the green electricity data and the results of multiple experiments. The number of convolution kernels is determined, and the convolution layer performs convolution operations on the input data according to the determined convolution kernel size, step length, and number. For the input one-dimensional green electricity data feature vector x (length L), convolution kernel w (size k1), step length s, the convolution calculation of the i-th convolution kernel at position j is:

[0075]

[0076] Among them, i represents the index of the convolution kernel, j represents the position index of the convolution kernel sliding on the input data, x represents the input one-dimensional green electricity data feature vector, w represents the convolution kernel, and after the convolution operation, the Tanh activation function is added to the convolution layer. For the output z of the convolution layer, the output after the Tanh activation function is:

[0077]

[0078] Among them, z is the output of the convolution layer, and g is the output after the Tanh activation function. The Tanh activation function can map the output of the convolution layer to the (-1,1) interval, introduce nonlinear factors, and enable the model to better fit the complex relationship in the green power data, such as the nonlinear relationship between power generation and environmental factors in the green power data. 1. In green power data, nonlinear factors refer to those factors whose changing laws cannot be described by simple linear equations. Taking power generation and environmental factors as an example, environmental factors include wind speed, light intensity, temperature and other factors. The relationship between these factors and power generation is not a simple proportional relationship. 2. Nonlinear relationship. In the green power system, there is a complex interaction between power generation and environmental factors, showing a nonlinear relationship. In wind power generation, the relationship between power generation and wind speed is nonlinear. When the wind speed is low, the power generation may be zero or very low; as the wind speed increases, the power generation begins to increase, but it is not a simple linear growth. When the wind speed exceeds the rated wind speed of the wind turbine, in order to protect the wind turbine equipment, a control strategy is usually used to keep the power generation near the rated power, rather than continuing to increase indefinitely with the increase in wind speed. This relationship curve is curved, not a straight line, reflecting the nonlinear relationship between power generation and wind speed; 3. Corresponding processing of the model: First, the use of activation function. When constructing a convolutional neural network monitoring model, a nonlinear activation function is added after the convolution layer. This embodiment uses the Tanh activation function to introduce nonlinear factors. Tanh function For example, the output z of the convolutional layer is nonlinearly mapped. Assuming that the features extracted by the convolutional layer are intermediate feature representations related to power generation and environmental factors, these features are mapped to the (-1, 1) interval after the Tanh function, changing the distribution and representation of the features. This nonlinear mapping enables the model to learn the complex nonlinear relationship between power generation and environmental factors. For example, if the input feature combination represents a growth trend of power generation with environmental factors within a certain range, after the Tanh function, the model can learn how this growth trend changes with different input combinations based on subsequent training data, and can learn different change trends that may occur in other ranges, such as saturation or decline.

[0079] Combination of multi-layer structures: The multi-layer structure of convolutional neural networks is used to process nonlinear relationships. In the model, the input layer receives green power data after feature extraction, and the convolution layer extracts local features through the convolution kernel. These features are passed to the pooling layer after nonlinear processing by the activation function. The pooling layer further compresses the data, retains the main features, and then passes it to the fully connected layer. The fully connected layer integrates the feature information of the previous layers and continuously introduces nonlinear factors between the layers through the activation function. This combination of multi-layer structures enables the model to gradually learn the nonlinear relationships of different levels in the green power data. For example, in a model containing multiple convolutional layers and fully connected layers, the first convolutional layer may learn the preliminary nonlinear relationship between power generation and wind speed, such as the power change characteristics in the low wind speed area; as the data is passed backward in the network, the subsequent layers can learn more complex relationships, such as the comprehensive change characteristics of power generation under different wind speed and temperature combinations, so as to better fit the complex nonlinear relationships in the entire green power data. After the convolution operation and activation function processing, the convolution layer outputs a one-dimensional feature sequence, and the maximum pooling method is selected to downsample the one-dimensional feature sequence output by the convolution layer.

[0080] Finally, the fully connected layer fully connects the feature vector output by the pooling layer with its own neurons. Suppose the feature vector output by the pooling layer is z (length is N), the weight matrix of the fully connected layer is W (dimension is N×l), and the bias vector is h (length is l). Then the output of the fully connected layer is o=f(Wz+h), where f is the activation function.

[0081] In this embodiment, for classification tasks, the ReLU activation function is selected (except for the last fully connected layer). The ReLU function can accelerate model training and avoid the gradient vanishing problem. For the last fully connected layer, the softmax activation function is used to convert the output vector into the probability distribution of each category in the classification task. The last fully connected layer does not use the softmax activation function, but directly outputs the predicted value.

[0082] S5. Optimizing model parameters based on the monitoring model, including optimizing model parameters using a particle swarm optimization algorithm;

[0083] Determine the monitoring model parameters to be optimized, such as the number, size, and step size of convolution kernels, the number of nodes in the fully connected layer, and the learning rate, and encode them into particle position vectors. Set the particle swarm size M, and randomly initialize the position vector and velocity vector for each particle. Each element is randomly selected within the corresponding value range. In the green power data monitoring model, the mean square error (MSE) is used as the fitness function to evaluate the quality of the model parameters represented by the particle. For the training data set {(x p ,y p )}(where x pis the input green electricity data sample, y p is the corresponding real label, such as the real fault type of the equipment or the actual power generation value), and a monitoring model is constructed for a set of model parameters represented by each particle. Compute the model's predicted output on the training dataset

[0084] Then according to the mean square error formula Calculate the mean square error corresponding to the particle, where n1 is the number of samples in the training data set, x p is the input green electricity data sample, y p is the corresponding true label, and the calculated mean square error MSE i As the fitness function value of particle i, Fitness i ,In the particle swarm optimization algorithm, the goal is to minimize the ,fitness function value, that is to find a set of model parameters that minimize the ,mean square error.

[0085] According to the basic principle of particle swarm optimization algorithm, the particle velocity update formula is:

[0086]

[0087] in, is the velocity of the ith particle in the dth dimension (corresponding to a certain parameter) at the t+1th iteration, is the velocity of the ith particle in the dth dimension at the tth iteration, w is the inertia weight, c1 and c2 are learning factors, r1 and r2 are random numbers between 0 and 1, and pbest i,d is the historical optimal position of the ith particle in the dth dimension, is the position of the ith particle in the dth dimension at the tth iteration, gbest d is the global optimal position of the entire particle swarm in the dth dimension. At each iteration t, each dimension d of the velocity vector of each particle is updated according to the above formula. The particle position update formula is: That is, the position of the particle in the dth dimension at the t+1th iteration is equal to its position at the tth iteration plus the updated velocity.

[0088] Then, based on the termination condition of the global optimal fitness value, a threshold ∈ of the global optimal fitness value improvement is set. In each iteration, the global optimal fitness value is recorded. (i.e. the minimum fitness value among all particles at present), in n2 consecutive iterations The algorithm is considered to have converged and the iteration stops.

[0089] Finally, an adaptive parameter adjustment strategy is used in the optimization process to adaptively adjust the inertia weight according to the number of iterations, using the formula:

[0090]

[0091] To adjust the inertia weight w, where w max and w min are the maximum and minimum values ​​of the inertia weight, t is the current number of iterations, and T is the maximum number of iterations. In the early stage of iteration, t is small and the inertia weight w is large, which makes the particle have a larger speed and can explore in a larger search space, which is conducive to finding the global optimal area. As the number of iterations increases, the inertia weight gradually decreases, and the particle speed also gradually decreases, so that the particle can perform more refined local search in the later stage, and improve the probability of finding the exact optimal solution.

[0092] According to the particle and the optimal position pbest i,d The distance between the particle and its own historical optimal position is dynamically adjusted to adjust the learning factor. And the distance from particle i to the global optimal position, when If it is larger, increase c1, for example, according to the formula Among them, c 10 and c 11 are the upper and lower limits of c1, is the maximum value of the distance from all particles to their own historical optimal position. In this way, particles can move closer to their own historical optimal position faster, enhance local search capabilities, and adopt a multi-group collaborative optimization mechanism to divide the particle swarm into multiple subgroups for information exchange. First, the particle swarm is divided into several subgroups, such as a specific number of subgroups, and the size of each subgroup can be the same, such as each subgroup contains a certain number of particles. After that, each subgroup independently carries out iterative optimization work, covering parameter encoding, initialization, fitness function calculation, particle speed and position update and other links. Next is the information exchange link. After each specific number of iterations, the subgroups share information, specifically, each subgroup provides its own local optimal solution to other subgroups. Then each subgroup compares the fitness function value with its own original global optimal solution based on the local optimal solution received from other subgroups, and selects the solution with a smaller fitness function value as the new global optimal solution. In this way, the particle swarm can explore in a wider search space, prevent the subgroup from falling into the dilemma of local optimal solution, and thus increase the probability of finding the global optimal solution, and combine the adaptive adjustment of the model structure to adjust the monitoring model structure according to the model performance feedback. For example, if the model overfits during the optimization process, the number of layers or nodes in the fully connected layer can be reduced in time; if the poor performance of the model is due to the simple structure, the number of nodes in the convolutional layer or the fully connected layer can be increased, so as to improve the performance and scalability of the model. The adjustment of the model structure is carried out step by step. After each adjustment, the model must be retrained and verified to evaluate the effect of the adjustment. The cross-validation method is used to ensure the reliability and stability of the adjustment. For example, the green power data is divided into a training set, a validation set, and a test set. After adjusting the model structure, the training set is first trained, and then the performance of the model is evaluated on the validation set. If the performance is improved, the next adjustment can be continued; if the performance does not improve or even decreases, the adjustment strategy needs to be reconsidered. The adjustment of the model structure is combined with the parameter optimization of the particle swarm optimization algorithm. While adjusting the model structure, the particle swarm optimization algorithm is continued to be used to optimize the parameters of the model to find the best parameter combination. For example, after adjusting the number of convolutional layers or the number of nodes in the fully connected layer, the particle swarm optimization algorithm can be used to optimize the convolution kernel size, step size, learning rate and other parameters to improve the performance of the model.

[0093] S6. Set the warning threshold according to the characteristics of the green power system and the monitoring objectives, and compare the output of the monitoring model with the warning threshold.

[0094] The monitoring model processes the operating data of the green power system (such as power, voltage, current, environmental factors, etc.) in real time and outputs results related to the monitoring target. For example, for power prediction tasks, the model will output the predicted power value at each moment; for fault diagnosis tasks, the model will output the probability of the equipment being in different fault states or directly determine whether there is a fault, and compare these output results with the pre-set warning threshold in real time. If it is a power prediction value, when the predicted value is lower than the power lower limit warning threshold or higher than the power upper limit warning threshold, the warning mechanism is triggered.

[0095] Example 2

[0096] The difference between this embodiment and embodiment 1 is that this embodiment provides a green electricity data monitoring and optimization system based on a particle swarm algorithm, including:

[0097] The data acquisition module is configured to: acquire green power data, including power generation, power, voltage, current and environmental parameters in the green power system;

[0098] The preprocessing module is configured to: perform preprocessing based on the acquired green power data, including cleaning, denoising and normalizing the acquired green power data;

[0099] The feature extraction module is configured to: extract features from the pre-processed green electricity data, including extracting data features using time domain analysis and frequency domain analysis, and reducing dimensional features using principal component analysis;

[0100] The model module is configured to: construct a monitoring model using the feature-extracted green power data, including establishing a monitoring model using a convolutional neural network as an architecture;

[0101] The optimization module is configured to: optimize the model parameters based on the monitoring model, including optimizing the model parameters using a particle swarm optimization algorithm;

[0102] The output module is configured to: set a warning threshold according to the characteristics of the green power system and the monitoring target, and compare the output of the monitoring model with the warning threshold.

[0103] A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device, a green electricity data monitoring optimization method based on a particle swarm algorithm.

[0104] A terminal device includes a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, wherein the instructions are suitable for being loaded and executed by the processor to implement a green electricity data monitoring optimization method based on a particle swarm algorithm.

[0105] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.

[0106] The beneficial effect of the present invention is that, compared with the prior art,

[0107] 1. The monitoring model established by the present invention with convolutional neural network as the architecture has strong feature learning ability. The structure of constructing input layer, convolution layer, pooling layer and fully connected layer can automatically learn complex patterns in green power data. The convolution layer can automatically extract local features in the data through the sliding convolution operation of the convolution kernel. The use of Tanh activation function introduces nonlinear factors to the convolution layer, so that the model can handle nonlinear relationships in green power data, especially the relationship between power and environmental factors in green power data is often nonlinear. This structure of CNN can effectively capture this complex relationship, thereby improving the monitoring accuracy of the green power system status.

[0108] 2. The present invention can increase the diversity of search and further improve the probability of finding the global optimal solution by dividing the particle group into multiple sub-groups and exchanging information through a multi-group collaborative optimization mechanism. Combined with the adaptive adjustment of the model structure, the monitoring model structure can be dynamically adjusted according to the model performance feedback, so that the model can better adapt to the characteristics of green electricity data and monitoring objectives. For example, if the model overfits during the optimization process, the number of layers or nodes of the fully connected layer can be reduced in time; if the poor performance of the model is due to the simple structure, the number of nodes in the convolutional layer or the fully connected layer can be increased, etc., thereby improving the performance and scalability of the model.

[0109] 3. The present invention uses a combination of time domain analysis and frequency domain analysis to extract data features, and can mine information on green electricity data in different dimensions. Time domain analysis can obtain the characteristics of data in time series, such as statistical characteristics such as mean and variance that reflect the fluctuation of data, while frequency domain analysis obtains the spectrum through fast Fourier transform. The different frequency components in the spectrum can reveal the periodic information in the green electricity data or characteristics related to the operating frequency of the equipment. Through frequency domain analysis, it may be found that the power generation power has abnormal fluctuations at certain specific frequencies, thereby providing an important basis for equipment fault diagnosis.

[0110] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0111] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0112] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0113] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0114] 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 it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A green electricity data monitoring optimization method based on particle swarm algorithm, characterized in that: include: Obtain green power data, including the power generation, power, voltage, current and environmental parameters in the green power system; Preprocessing is performed based on the acquired green electricity data, including cleaning, denoising and normalizing the collected green electricity data; The pre-processed green electricity data is subjected to feature extraction, including extracting data features using time domain analysis and frequency domain analysis, and using principal component analysis to reduce dimensional features; Using the green power data after feature extraction to build a monitoring model, including building a monitoring model based on a convolutional neural network architecture; Optimize model parameters based on the monitoring model, including using particle swarm optimization algorithm to optimize model parameters; Set the warning threshold and compare the output of the monitoring model with the warning threshold.

2. The green electricity data monitoring optimization method based on particle swarm algorithm according to claim 1 is characterized by: The collected data is cleaned, denoised and normalized, including filling missing values ​​with interpolation, and outliers are screened according to the mean and standard deviation of the acquired green electricity data. Then, the screened green electricity data is subjected to wavelet transform and the wavelet coefficients are calculated according to the wavelet function. The denoised green electricity data is obtained by inverse wavelet transform based on the wavelet coefficients, and finally the denoised green electricity data is normalized by Z-score.

3. The green electricity data monitoring optimization method based on particle swarm algorithm according to claim 2 is characterized in that: The method of extracting data features by using time domain analysis and frequency domain analysis includes obtaining time domain data in green power data by using time domain analysis, performing fast Fourier transform on the time domain data as input to obtain a spectrum, and extracting data features by using the spectrum. The calculation formula of the spectrum is: Wherein, p[c] represents the discrete time-domain sample sequence of green power data, the discrete time-domain sample value of green power data at time c, P[k] represents the spectrum, j represents the imaginary unit, k represents the frequency index, Expressed as the basic unit of discrete frequency, Expressed as a complex exponential function.

4. The green electricity data monitoring optimization method based on particle swarm algorithm according to claim 3 is characterized in that: The principal component analysis is used to reduce dimensional features, including centralizing the feature matrix obtained through time domain and frequency domain analysis, calculating the covariance matrix of the centralized data matrix, solving the eigenvalues ​​and eigenvectors of the covariance matrix, sorting the eigenvalues ​​from large to small, and calculating the cumulative variance contribution rate through the eigenvalues, selecting the principal component according to the cumulative variance contribution rate, and projecting the original data onto the selected principal component to obtain the data after dimensionality reduction.

5. The green electricity data monitoring optimization method based on particle swarm algorithm according to claim 4 is characterized in that: The monitoring model is established with the convolutional neural network as the architecture, including constructing an input layer, a convolution layer, a pooling layer and a fully connected layer, wherein the construction of the input layer determines the number of input layer nodes according to the dimension of the green electricity data after feature extraction, the input layer passes the one-dimensional green electricity data feature vector to the convolution layer, the convolution layer performs convolution operations according to the convolution kernel size and step size adapted to the input data, and adds a Tanh activation function to pass the output one-dimensional feature sequence to the pooling layer for downsampling operations, and finally adds a fully connected layer, and uses the softmax activation function to convert the output vector of the fully connected layer into probability distributions of various categories.

6. The green electricity data monitoring optimization method based on particle swarm algorithm according to claim 5 is characterized in that: The particle swarm optimization algorithm is used to optimize the model parameters, including encoding and initializing the particle swarm according to the monitoring model parameters, defining the fitness function by using the mean square error, updating the particle speed and position according to the speed update formula and the position update formula, and finally setting the iteration termination condition according to the global optimal fitness value.

7. The green electricity data monitoring optimization method based on particle swarm algorithm according to claim 6 is characterized in that: The method of optimizing model parameters by using a particle swarm optimization algorithm also includes adopting an adaptive parameter adjustment strategy during the optimization process, adaptively adjusting the inertia weight according to the number of iterations, dynamically adjusting the learning factor according to the distance between the particle and the optimal position, adopting a multi-group collaborative optimization mechanism, dividing the particle group into multiple sub-groups for information exchange, and combining the model structure with adaptive adjustment to adjust the monitoring model structure according to model performance feedback.

8. A green electricity data monitoring and optimization system based on particle swarm algorithm, the system being the system used by the green electricity data monitoring and optimization method based on particle swarm algorithm as claimed in any one of claims 1 to 7, characterized in that: include: The data acquisition module is configured to: acquire green power data, including power generation, power, voltage, current and environmental parameters in the green power system; The preprocessing module is configured to: perform preprocessing based on the acquired green power data, including cleaning, denoising and normalizing the acquired green power data; The feature extraction module is configured to: extract features from the pre-processed green electricity data, including extracting data features using time domain analysis and frequency domain analysis, and reducing dimensional features using principal component analysis; The model module is configured to: construct a monitoring model using the feature-extracted green power data, including establishing a monitoring model using a convolutional neural network as an architecture; The optimization module is configured to: optimize the model parameters based on the monitoring model, including optimizing the model parameters using a particle swarm optimization algorithm; The output module is configured to: set a warning threshold according to the characteristics of the green power system and the monitoring target, and compare the output of the monitoring model with the warning threshold.

9. A computer-readable storage medium storing a plurality of instructions, characterized in that: The instructions are suitable for being loaded by a processor of a terminal device and executing a green electricity data monitoring optimization method based on a particle swarm algorithm as described in claims 1-7.

10. A terminal device, comprising a processor and a computer-readable storage medium, wherein the processor is used to implement each instruction; and the computer-readable storage medium is used to store multiple instructions, characterized in that: The instructions are suitable for being loaded by a processor and executing a green electricity data monitoring optimization method based on a particle swarm algorithm as described in claims 1-7.

Citation Information

Cited By

  • Multi-platform live broadcasting room data visualization and optimization decision support method and system

    CN119988708A

  • A Method and System for Multi-Platform Live Streaming Room Data Visualization and Optimization Decision Support

    CN119988708B

  • Coal dressing full-process monitoring decision-making method and system based on Internet of Things sensing

    CN120046873A

  • Method and system for detecting working state of photovoltaic panel

    CN120546595A