A method and system for evaluating power grid stability in large-scale electric vehicle access
By using the Riemannian manifold feature diffusion and nonlinear system coupled learning methods, generative adversarial networks and extreme learning machine algorithms are used to solve the grid stability problem caused by electric vehicles connecting to the grid, and achieve efficient and accurate grid stability assessment.
Patent Information
- Application Number
- CN202411618251.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-11-13
AI Technical Summary
With the popularization of electric vehicles, the fluctuation of power load and the dynamic electricity demand in the power grid have led to grid stability problems. Especially during peak charging hours, the power grid faces challenges such as sharp increase in power load, frequency fluctuation and reduced power factor, which affect the safe operation of the power grid.
The power grid data is expanded using the generative adversarial network algorithm based on Riemannian manifold feature diffusion, and the power grid stability assessment model is trained by combining the extreme learning machine algorithm based on nonlinear system coupling learning. Through data collection, classification and labeling, and data preprocessing, high-quality power grid data samples are generated to evaluate the power grid stability level.
The training performance of the power grid stability assessment model and its ability to adapt to complex nonlinear data are improved, data distortion is reduced, and the accuracy and efficiency of power grid stability assessment are improved.
Smart Images

Figure CN119831388B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of power grid stability evaluation, and particularly relates to a power grid stability evaluation method and system for large-scale electric vehicle access. BACKGROUND
[0002] With the development and popularization of electric vehicles, the number of electric vehicles accessing the power grid increases rapidly, and more and more vehicles need to be charged frequently, resulting in severe fluctuations in power load and high dynamicity of power demand in the power grid. The power grid not only needs to meet the growing power demand, but also needs to adapt to the randomness and concentration of electric vehicle charging behaviors, especially during the peak charging period. The power grid is prone to problems such as rapid increase in power load, frequency fluctuation, and reduction in power factor, which brings great uncertainty and pressure to the stability of the traditional power grid and directly affects the safe operation of the power grid. SUMMARY
[0003] The application aims to solve the above problems in the prior art and provides a power grid stability evaluation method and system for large-scale electric vehicle access.
[0004] To achieve the above purpose, the technical scheme of the application is as follows:
[0005] In a first aspect, the application provides a power grid stability evaluation method for large-scale electric vehicle access, comprising:
[0006] S1, collecting a power grid data set related to electric vehicles in the power grid, classifying and labeling the power grid data set, and obtaining an original power grid data training set;
[0007] S2, based on a Riemann manifold feature diffusion generative adversarial network algorithm, data augmentation is performed on the original power grid data training set, a data augmentation model is trained, and an augmented power grid data training set is obtained;
[0008] S3, based on a nonlinear system coupling learning extreme learning machine algorithm, the augmented power grid data training set is input into a power grid stability evaluation model for training, and a trained power grid stability evaluation model is obtained;
[0009] S4, a new power grid data set sample related to electric vehicles in the power grid is input into the trained power grid stability evaluation model for evaluation, and then an evaluation grade of the power grid stability is obtained.
[0010] The S2 comprises:
[0011] S21, initializing a maximum number of iterations of a preset generative adversarial network, taking the original power grid data training set as a quantum ground state set, and the ground state set containing Ke quantum ground states |φ kThe quantum computing strategy is used for an input layer of a generator of the generative adversarial network to generate a series of initial quantum state power grid data points;
[0012] The quantum computing strategy is:
[0013]
[0014] In the formula, ψ c is the generated initial quantum state power grid data point, Ke is the total number of quantum ground states, α c,k is a complex coefficient of the quantum state, |φ k > is a quantum ground state;
[0015] S22, the generator G c receives the initial quantum state power grid data point, and generates a new power grid data point by performing data diffusion on a Riemannian manifold to make the initial quantum state power grid data point obtain new power grid data characteristics;
[0016] The data diffusion mode on the Riemannian manifold is:
[0017]
[0018] In the formula, x is the power grid data point of the t th iteration, the power grid data point when t is 0 is the initial quantum state power grid data point, τ c is a diffusion step length, is a manifold diffusion operator based on a gradient on the Riemannian manifold, is a loss function on the Riemannian manifold, is a Riemannian metric matrix dynamically adjusted according to the position of the power grid data point on the Riemannian manifold, μ c is a mean value of the current iteration batch power grid data, σ c is a scale parameter of the current iteration batch power grid data, and I is a unit matrix;
[0019] S23, based on the generated new power grid data point, a loss function is used to optimize the generator and the discriminator of the generative adversarial network, and the new power grid data point is corrected in characteristics;
[0020] The constraint condition for the loss function to optimize the generator and the discriminator of the generative adversarial network is:
[0021]
[0022] In the formula, L is a loss function of the generative adversarial network, G c is a generator, D c is a discriminator, Loss for the discriminator, Loss for the generator, D c (x) is the score of the discriminator for data point x in the original grid data training set, G c (z) is the grid data generated by the generator from random noise z, i.e. p data (x) is the distribution of data points in the original grid data training set, p z (z) is the probability distribution of the input noise;
[0023] The way of feature correction for the new grid data point is:
[0024]
[0025] In the above formula, is the corrected grid data, Proj S ( ) is the operation of projecting the grid data onto the Riemannian manifold, η c is the learning rate, is the gradient of the t+1 iteration, RS( ) is the regularization function of correction, λ c,i is the correction strength parameter, is the i-th grid data point in the t+1 iteration, is the average of all grid data points in the t+1 iteration;
[0026] S24, calculate the quality score of the corrected new grid data point, use the discriminator D c Evaluate the similarity of the new grid data and the real grid data, when the quality score of the new grid data point is greater than the preset similarity threshold, the generated new grid data point is retained, otherwise the new grid data point is discarded;
[0027] The quality score of the corrected new grid data point is calculated by the following formula:
[0028]
[0029] In the above formula, is the quality score of the new grid data point, d( ) is the distance measurement function between the mean values of two grid data point sets, X real is the real grid data, || || is the Euclidean distance;
[0030] S25, use the adaptive semantic space mapping strategy to adjust the semantic of the new grid data point G c (z) retained by the generator in S24 to obtain the semantic adjusted new grid data point:
[0031] Sc (G c (z))=G c (z)+β c ·tanh(Ω c ·BERT(G c (z)));
[0032] In the above formula, S c () is a meaning adjustment function of the meaning space mapping module, β c is a weight parameter, tanh() is a hyperbolic tangent activation function, Ω c is a learnable conversion matrix, and BERT(G c (z)) is a deep meaning feature extracted using a pre-trained BERT model.
[0033] S26, using a dynamic meaning perception adjustment mechanism, the new power grid data points adjusted by the meaning are adjusted again, and the generation process of the new power grid data points is dynamically adjusted:
[0034]
[0035] In the above formula, X c,adjusted is a new sample adjusted by the dynamic meaning perception, that is, the final generated sample, γ c is an adjustment weight, softmax() is a Softmax function, Θ c is a learnable conversion matrix, Attn() is a self-attention function, and X u is a front and rear data vector of the power grid data.
[0036] S27, let the iteration number be increased by 1, return to step S22, input the power grid data points adjusted twice into the generator of the generative adversarial network, repeat the above operation steps until the preset maximum iteration number is reached, the data expansion model training is completed, and the generated new power grid data points are superimposed to the original power grid data training set to obtain the expanded power grid data training set.
[0037] The S3 comprises:
[0038] S31, randomly initialize the hidden layer neurons of the extreme learning machine:
[0039] W u =rande(N u , D u );
[0040] b u =rande(n u , 1);
[0041] In the above formula, W uis the weight matrix of the neurons in the hidden layer of the extreme learning machine, N u is the number of neurons in the hidden layer of the extreme learning machine, D u is the dimension of the input to the extreme learning machine feature, b u is the bias vector of the hidden layer neurons of the extreme learning machine, rande(N u , D u ) function represents the generation of an N u ×D u A matrix whose elements are random numbers, rande(N u , 1) Function represents the generation of an N u ×1 vector, where the elements are random numbers;
[0042] S32. Input the expanded power grid data training set into the randomly initialized extreme learning machine hidden layer neurons, and calculate the output of the extreme learning machine hidden layer neurons:
[0043] y u,j =f u (W u,j ·x u,j +b u,j );
[0044] In the above formula, y u,j is the output of the jth hidden neuron of the extreme learning machine, f u () is the activation function of the extreme learning machine, W u,j is the weight of the jth hidden neuron of the extreme learning machine, x u,j is the power grid data input into the jth hidden neuron of the extreme learning machine, b u,j is the bias vector of the jth hidden neuron of the extreme learning machine;
[0045] S33, calculating an adaptive threshold of the error based on the error between the output of the hidden layer neurons of the extreme learning machine and the target output, and dynamically adjusting the learning rate of the extreme learning machine by the adaptive threshold, thereby dynamically adjusting the weights and biases of the hidden layer neurons of the extreme learning machine;
[0046] The adaptive threshold of the error is calculated using the following formula:
[0047]
[0048] The learning rate of the extreme learning machine is calculated using the following formula:
[0049]
[0050] The weights and biases of the neurons in the hidden layer of the extreme learning machine are calculated using the following formula:
[0051]
[0052] In the above formula, is the adaptive threshold of the error of the tth iteration, β is the smoothing coefficient, std() is the function for calculating the standard deviation, E (t-1) is the error set of all samples in the last iteration, η(t) is the learning rate of the tth iteration extreme learning machine, η0 is the initial learning rate, is the average error absolute value of the tth iteration, is the weight of the tth iteration extreme learning machine, is the gradient of the loss function L() with respect to the weight, L() is the loss function of the extreme learning machine, X u , Y u are the input and output of the extreme learning machine respectively, μ is the change amount influence factor of the extreme learning machine, is the change amount of the weight of the extreme learning machine between this iteration and the last iteration, is the bias of the tth iteration extreme learning machine, is the gradient of the loss function L() with respect to the bias, is the change amount of the bias of the extreme learning machine between this iteration and the last iteration, M u is the number of samples of the current iteration batch input of the hidden layer neurons in the extreme learning machine, is the cross-entropy loss of a single sample, λ is the regularization term coefficient of the extreme learning machine, is the regularization term of the extreme learning machine;
[0053] S34, based on the dynamically adjusted weights and biases of the hidden layer neurons of the extreme learning machine, the gradient of each extreme learning machine hidden layer neuron is calculated through the reversible neuron, and the weights and biases of the extreme learning machine hidden layer neurons are further updated:
[0054]
[0055]
[0056] In the above formula, ← is the parameter update operation, a is the learning rate of the reversible neuron, δ u,j is the gradient of the jth hidden neuron of the extreme learning machine, is the transpose of the input grid data of the jth hidden neuron of the extreme learning machine, is the predicted label of the jth hidden neuron sample of the extreme learning machine, f′ u () is the derivative of the activation function of the extreme learning machine, z u,j is the activation function feature vector input to the jth hidden neuron of the extreme learning machine;
[0057] S35, using the updated weights and biases of the extreme learning machine hidden layer neurons, returning to S32 to recalculate the output of the extreme learning machine hidden layer neurons, and defining the convergence function of the output power grid data, judging whether the convergence function is less than the set threshold, if yes, considering that the power grid stability evaluation model has been stable and ending the training, if not, returning to S33 to re-adjust and update the weights and biases of the extreme learning machine hidden layer neurons until the convergence function of the output power grid data is less than the set threshold, obtaining the trained power grid stability evaluation model;
[0058] The convergence function of the output power grid data is:
[0059]
[0060] In the above formula, C u is the convergence function of the output power grid data.
[0061] In S1, the power grid data set related to electric vehicles in the power grid includes: obtaining data of electric vehicle use frequency and driving mode from the transportation department, obtaining data of electric vehicle distribution from the electric vehicle registration database, and obtaining data of charging station geographic location and its operation from the charging infrastructure database;
[0062] The classification and labeling are performed, and the labeled category is the evaluation level of stability, which is specifically divided into five levels, including unstable, sub-stable, relatively stable, stable and high stability, and the higher the level, the more stable the power grid.
[0063] In a second aspect, the present application provides a power grid stability evaluation system for large-scale electric vehicle access, including a training set data acquisition module, a power grid data set expansion module, a power grid stability evaluation model training module and a power grid stability level evaluation module.
[0064] The training set data acquisition module is used to acquire the power grid data set related to electric vehicles in the power grid, and to classify and label it to obtain the original power grid data training set.
[0065] The power grid data set expansion module is used to expand the data of the original power grid data training set based on the Riemann manifold feature diffusion generative adversarial network algorithm, and train the data expansion model to obtain the expanded power grid data training set.
[0066] The power grid stability evaluation model training module is used to input the expanded power grid data training set into the power grid stability evaluation model for training based on the extreme learning machine algorithm of nonlinear system coupling learning, to obtain the trained power grid stability evaluation model.
[0067] The power grid stability level evaluation module is configured to input a new power grid data set sample related to the electric vehicle in the power grid into the trained power grid stability evaluation model for evaluation, and obtain an evaluation level of the power grid stability.
[0068] The power grid data set expansion module comprises a quantum state power grid data point generation unit, a new power grid data point generation unit, an optimization and feature correction unit, a quality score unit, a meaning adjustment unit, a secondary adjustment unit, and an iteration unit.
[0069] The quantum state power grid data point generation unit is configured to initialize a maximum number of iterations of a preset generative adversarial network, and use an original power grid data training set as a quantum ground state set, wherein the ground state set comprises Ke quantum ground states |φ k The generator input layer of the generative adversarial network uses a quantum computing strategy to generate a series of initial quantum state power grid data points.
[0070] The quantum computing strategy is as follows:
[0071]
[0072] In the above formula, ψ c represents the generated initial quantum state power grid data point, Ke represents the total number of quantum ground states, α c,k represents a complex coefficient of the quantum state, and |φ k represents a quantum ground state.
[0073] The new power grid data point generation unit is configured to receive the initial quantum state power grid data point, and generate a new power grid data point by diffusing data on a Riemannian manifold to make the initial quantum state power grid data point obtain new power grid data characteristics. c
[0074] The data diffusion method on the Riemannian manifold is as follows:
[0075]
[0076] In the above formula, x represents the power grid data point of the tth iteration, the power grid data point when t is 0 is the initial quantum state power grid data point, τ c represents a diffusion step length, represents a manifold diffusion operator based on a gradient on the Riemannian manifold, represents a loss function on the Riemannian manifold, represents a Riemannian metric matrix dynamically adjusted according to the position of the power grid data point on the Riemannian manifold, μ c represents a mean value of the current iteration batch of power grid data, and σ c is a scale parameter of the current iteration batch grid data, I is an identity matrix;
[0077] The optimization and feature correction unit is configured to optimize the generator and the discriminator of the generative adversarial network by using the loss function based on the generated new grid data point, and perform feature correction on the new grid data point;
[0078] The constraint condition for the loss function to optimize the generator and the discriminator of the generative adversarial network is:
[0079]
[0080] In the above formula, is the loss function of the generative adversarial network, G c is the generator, D c is the discriminator, is the loss of the discriminator, is the loss of the generator, D c (x) is the score of the discriminator on the data point x in the original grid data training set, G c (z) is the grid data generated by the generator according to the random noise z, that is, the grid data generated by the generator according to the random noise z is p data (x) is the distribution of the data point in the original grid data training set, p z (z) is the probability distribution of the input noise;
[0081] The feature correction manner of the new grid data point is:
[0082]
[0083] In the above formula, is the corrected grid data, Proj S () is the operation of projecting the grid data onto the Riemann manifold, η c is the learning rate, is the gradient of the t+1 iteration, RS() is the regularization function of the correction, λ c,i is the correction strength parameter, is the i-th grid data point in the t+1 iteration, is the average value of all grid data points in the t+1 iteration;
[0084] The quality score unit is configured to calculate the quality score of the corrected new grid data point, and use the discriminator D c to evaluate the similarity between the new grid data and the real grid data, when the quality score of the new grid data point is greater than a preset similarity threshold, the generated new grid data point is retained, otherwise the new grid data point is discarded;
[0085] The quality score of the corrected new grid data point is calculated using the following formula:
[0086]
[0087] In the above formula, is the quality score of the new grid data point, d() is the distance metric function between the mean values of two grid data point sets, X real is the real grid data, and || || is the Euclidean distance.
[0088] The meaning adjustment unit is configured to perform meaning adjustment on the new grid data point G c (z) reserved by the quality score unit using an adaptive meaning space mapping strategy to obtain the meaning-adjusted new grid data point:
[0089] S c (G c (z))=G c (z)+β c ·tanh(Ω c ·BERT(G c (z)));
[0090] In the above formula, S c () is the meaning adjustment function of the adaptive meaning space mapping module, β c is a weight parameter, tanh() is the hyperbolic tangent activation function, Ω c is a learnable conversion matrix, and BERT(G c (z)) is the deep meaning feature extracted using the pre-trained BERT model.
[0091] The secondary adjustment unit is configured to perform secondary adjustment on the meaning-adjusted new grid data point using a dynamic meaning-aware adjustment mechanism to dynamically adjust the generation process of the new grid data point.
[0092]
[0093] In the above formula, X c,adjusted is the new sample after dynamic meaning-aware adjustment, i.e., the final generated sample, γ c is an adjustment weight, softmax() is the Softmax function, Θ c is a learnable conversion matrix, and Attn() is a self-attention function, is the front and back data vectors of the grid data.
[0094] The iteration unit is used for increasing the iteration number by 1, and a new power grid data point generation unit inputs the twice adjusted power grid data point into a generator of the generative adversarial network, and the above operation steps are repeated until a preset maximum iteration number is reached, and the data expansion model training is completed, and the generated new power grid data point is superimposed to the original power grid data training set to obtain an expanded power grid data training set.
[0095] The power grid stability evaluation model training module comprises a random initialization unit, an output calculation unit, a weight and bias dynamic adjustment unit, a weight and bias updating unit and a loop unit.
[0096] The random initialization unit is used for randomly initializing hidden layer neurons of the extreme learning machine.
[0097] W u =rande(N u ,D u );
[0098] b u =rande(N u ,1);
[0099] In the above formula, W u is a weight matrix of hidden layer neurons of the extreme learning machine, N u is the number of hidden layer neurons of the extreme learning machine, D u is the dimension of the input feature of the extreme learning machine, b u is a bias vector of hidden layer neurons of the extreme learning machine, rande(N u , D u ) function represents generating an N u ×D u matrix, and the elements in the matrix are random numbers, and rande(N u , 1) function represents generating an N u ×1 vector, and the elements in the vector are random numbers.
[0100] The output calculation unit is used for inputting the expanded power grid data training set into the randomly initialized hidden layer neurons of the extreme learning machine, and calculating the output of the hidden layer neurons of the extreme learning machine.
[0101] y u,j =f u (W u,j ·x u,j +b u,j );
[0102] In the above formula, y u,j is the output of the jth hidden neuron of the extreme learning machine, f u () is an activation function of the extreme learning machine, Wu,j is the weight of the jth hidden neuron of the extreme learning machine, x u,j is the grid data input in the jth hidden neuron of the extreme learning machine, b u,j is the bias vector of the jth hidden neuron of the extreme learning machine;
[0103] The weight and bias dynamic adjustment unit is used to calculate an adaptive threshold of the error according to the error between the output of the hidden layer neuron of the extreme learning machine and the target output, and dynamically adjust the learning rate of the extreme learning machine through the adaptive threshold, and further dynamically adjust the weight and bias of the hidden layer neuron of the extreme learning machine.
[0104] The adaptive threshold of the error is calculated by the following formula:
[0105]
[0106] The learning rate of the extreme learning machine is calculated by the following formula:
[0107]
[0108] The weight and bias of the hidden layer neuron of the extreme learning machine are calculated by the following formula:
[0109]
[0110] In the above formula, is the adaptive threshold of the error of the tth iteration, β is a smoothing coefficient, std() is a function for calculating the standard deviation, E (t-1) is the error set of all samples in the last iteration, η(t) is the learning rate of the extreme learning machine in the tth iteration, η0 is the initial learning rate, is the average absolute error of the tth iteration, is the weight of the extreme learning machine in the tth iteration, is the gradient of the loss function L() with respect to the weight, L() is the loss function of the extreme learning machine, X u , Y u are the input and output of the extreme learning machine respectively, μ is a change amount influence factor of the extreme learning machine, is the change amount of the weight of the extreme learning machine between this iteration and the last iteration, is the bias of the extreme learning machine in the tth iteration, is the gradient of the loss function L() with respect to the bias, is the change amount of the bias of the extreme learning machine between this iteration and the last iteration, M u is the number of samples in the current iteration batch input to the hidden layer neuron of the extreme learning machine, is the cross-entropy loss of a single sample, and λ is the regularization term coefficient of the extreme learning machine, is the regularization term of the extreme learning machine;
[0111] The weight and bias updating unit is configured to calculate the gradient of each extreme learning machine hidden layer neuron by the reversible neuron based on the dynamically adjusted weights and biases of the extreme learning machine hidden layer neurons, and further update the weights and biases of the extreme learning machine hidden layer neurons:
[0112]
[0113] In the above formula, is the parameter updating operation, is the learning rate of the reversible neuron, and δ u,j is the gradient of the jth hidden neuron of the extreme learning machine, is the transpose of the input grid data of the jth hidden neuron of the extreme learning machine, is the predicted label of the jth hidden neuron sample of the extreme learning machine, and f′ u is the derivative of the activation function of the extreme learning machine, and z u,j is the activation function feature vector input to the jth hidden neuron of the extreme learning machine;
[0114] The loop unit is configured to return the output calculation unit to recalculate the output of the extreme learning machine hidden layer neurons by using the updated weights and biases of the extreme learning machine hidden layer neurons, and define a convergence function of the output grid data to determine whether the convergence function is less than a set threshold value, if so, it is considered that the power grid stability evaluation model has been stabilized and the training is ended, if not, return the weight and bias dynamic adjustment unit to adjust and update the weights and biases of the extreme learning machine hidden layer neurons until the convergence function of the output grid data is less than the set threshold value, and obtain the trained power grid stability evaluation model;
[0115] The convergence function of the output grid data is:
[0116]
[0117] In the above formula, C u is the convergence function of the output grid data.
[0118] In the training set data acquisition module, the power grid data set related to the electric vehicle in the power grid includes: obtaining the data of the electric vehicle usage frequency and driving mode from the traffic department, obtaining the data of the electric vehicle distribution from the electric vehicle registration database, and obtaining the data of the geographic location and operation of the charging station from the charging infrastructure database;
[0119] The classification labeling is performed, and the labeled category is an evaluation level of stability, which is specifically divided into five levels, including unstable, sub-stable, relatively stable, stable, and high stability, and the higher the level, the more stable the power grid.
[0120] In a third aspect, the present application provides a power grid stability evaluation device for large-scale electric vehicle access, comprising a processor and a memory;
[0121] The memory is used for storing computer program codes and transmitting the computer program codes to the processor.
[0122] The processor is used for executing the foregoing power grid stability evaluation method for large-scale electric vehicle access according to instructions in the computer program codes.
[0123] In a fourth aspect, the present application provides a computer storage medium having computer programs stored thereon.
[0124] The computer program is executed by the processor to realize the steps of the foregoing power grid stability evaluation method for large-scale electric vehicle access.
[0125] Compared with the prior art, the present application has the following beneficial effects:
[0126] 1. The present application provides a power grid stability evaluation method and system for large-scale electric vehicle access. The method first collects power grid data sets related to electric vehicles in the power grid, and classifies and labels them to obtain an original power grid data training set. Then, based on the Riemann manifold feature diffusion generative adversarial network algorithm, the original power grid data training set is expanded, the data expansion model is trained, and the expanded power grid data training set is obtained. Based on the nonlinear system coupling learning limit learning machine algorithm, the expanded power grid data training set is input into the power grid stability evaluation model for training to obtain the trained power grid stability evaluation model. Finally, the new power grid data set sample related to electric vehicles in the power grid is input into the trained power grid stability evaluation model for evaluation, and the evaluation level of the power grid stability is obtained. The method collects power grid data sets related to electric vehicles in the power grid from multiple aspects, comprehensively reflects the multidimensional influence of electric vehicles accessing the power grid, labels and preprocesses the training set power grid data, reduces data distortion, and improves the training performance of the model.
[0127] 2. The application provides a power grid stability evaluation method and system for large-scale electric vehicle access, based on a Riemannian manifold feature diffusion generative adversarial network algorithm, data augmentation is performed on an original power grid data training set, and a data augmentation model is trained to obtain an augmented power grid data training set; on the one hand, the method uses quantum computing strategy to generate initial power grid data points based on the randomness of the input layer of the generative adversarial network generator in the quantum state, so that the initial power grid data points have high randomness and coverage in distribution, which helps to explore the potential space of the power grid data, thereby generating more rich and diverse power grid data; on the other hand, the method performs data diffusion on the Riemannian manifold to maintain the essential properties of the data features, generates power grid data similar to the real data, enhances the diversity and authenticity of the data, and in the training process of the data augmentation model, through the feature correction and meaning adjustment mechanism, the accuracy and stability of the generated data are ensured, and the quality of data augmentation is further improved.
[0128] 3. The application provides a power grid stability evaluation method and system for large-scale electric vehicle access, based on a nonlinear system coupling learning limit learning machine algorithm, the augmented power grid data training set is input into the power grid stability evaluation model for training to obtain a trained power grid stability evaluation model; on the one hand, the method adopts an adaptive error threshold adjustment mechanism to dynamically adjust the learning rate of the limit learning machine in real time, enhances the flexibility and convergence speed of the limit learning machine when facing different types of data, and reduces the training time of the model; on the other hand, the method is aimed at the high nonlinearity and dynamic change of the power grid data, and based on the traditional limit learning machine algorithm, the reversible neurons are used to adaptively adjust the gradient of the limit learning machine hidden layer neurons in the training process, allowing the model to dynamically update the weights and biases of the limit learning machine hidden layer neurons according to the error feedback in the training process, so as to better match and identify the influencing factors of the power grid stability, and improve the adaptability of the model to complex nonlinear data and the evaluation ability of the model to the stability of the complex power grid operation environment. BRIEF DESCRIPTION OF DRAWINGS
[0129] Figure 1 The method described in the application is a whole flow chart.
[0130] Figure 2 The structure diagram of the system described in the application.
[0131] Figure 3 The structure diagram of the device described in Example 3. DETAILED DESCRIPTION
[0132] The application will be further described in detail below in combination with specific embodiments and drawings.
[0133] The present invention proposes a grid stability assessment method and system for large-scale electric vehicle access. By collecting, preprocessing, and labeling grid data from a multi-source training set, the system expands the grid data by combining quantum computing with a generative adversarial network that uses Riemannian manifold feature diffusion to generate high-quality grid data samples. Subsequently, an extreme learning machine algorithm based on nonlinear system coupling learning is used to model the complex nonlinear characteristics of the grid for grid stability assessment, thereby achieving grid stability assessment for large-scale electric vehicle access.
[0134] Example 1:
[0135] like Figure 1 As shown in FIG, a method for evaluating the stability of a power grid with large-scale electric vehicle access is performed in the following steps:
[0136] 1. Collect electric vehicle-related grid data sets from the power grid, classify and label them, and obtain the original grid data training set;
[0137] Electric vehicle-related grid datasets include: data on electric vehicle usage frequency and driving patterns from the transportation department, data on electric vehicle distribution from the electric vehicle registration database, and data on the location and operation of charging stations from the charging infrastructure database. The collection of electric vehicle-related grid datasets relies on data transmission through API interfaces and on-site data collection equipment, and the collected data is stored in JSON format.
[0138] The attributes of the power grid dataset are shown in Table 1, including: Ra represents the regional power grid code, Da represents the increase or decrease in power demand during the time period, Ca represents the power load of the charging station, Pa represents the peak charging period, Ta represents the impact of temperature on charging efficiency, Ma represents the grid dispatch response time, Na represents the proportion of renewable energy input, Fa represents the frequency regulation sensitivity, Ga represents the power factor, and Ha represents the voltage fluctuation range. In practical applications, the attributes of the data are usually more than 10, and the number of attributes of the data may reach dozens or even hundreds.
[0139] Table 1 Attribute table of power grid dataset
[0140] Ra Da Ca Pa Ta Ma Na Fa Ga Ha 101 Increase 10% 60 MW 18:00-20:00 -5°C impact 2 min 30% High 0.95 ±5% 102 Decrease 5% 45 MW 12:00-14:00 No impact 5 min 50% Medium 0.98 ±2% 103 Increase 20% 80 MW 06:00-08:00 -10°C impact 1 min 20% Low 0.90 ±10% 104 Stable 50 MW 21:00-23:00 5°C impact 3 min 40% High 0.93 ±3% 105 Decrease 15% 35 MW 09:00-11:00 15°C impact 6 min 60% Medium 0.97 ±1% ;
[0141] The grid data sets related to electric vehicles in the power grid were manually classified and labeled. The labeled categories were the stability assessment levels, which were divided into five levels: unstable, unstable, relatively stable, stable, and highly stable. The higher the level, the more stable the grid.
[0142] The preprocessing manner of the labeled power grid dataset includes missing value processing, outlier processing, standardization, normalization and the like. The labeled power grid dataset is preprocessed to ensure that the power grid dataset related to the electric vehicle in the power grid is uniform in format when entering the subsequent algorithm processing.
[0143] If a certain attribute a of the power grid dataset i is continuous and has missing values, mean imputation is adopted for missing value processing.
[0144]
[0145] In the above formula, a i is an attribute of the power grid dataset, N is the sample number of the power grid dataset, a ij is the attribute value of the jth sample.
[0146] If a certain attribute a of the power grid dataset i is discrete and has missing values, mode imputation is adopted for missing value processing.
[0147] The outlier processing is performed on the power grid data with attribute a i , the outliers are filtered and deleted, and the following formula is used to determine the outlier range of the power grid data with attribute a i .
[0148] Q ycz < Q1(a i )-1.5*IQR(a i ).
[0149] Q ycz > Q3(a i )+1.5*IQR(a i ).
[0150] Q1(a i )=percentile(a i ,25).
[0151] Q3(a i )=percentile(a i ,75).
[0152] IQR(a i )=Q3(a i )-Q1(a i ).
[0153] In the above formula, Q ycz is an outlier, percentile is a percentile function, Q1 and Q3 are the first quartile and the third quartile respectively, and IQR is the interquartile range.
[0154] In order to make the grid data attributes on the same scale, the grid data with attribute a i is subjected to a standardization operation:
[0155]
[0156] In the above formula, b i is the grid data with attribute a i after standardization, μ(a i ) is the mean of the grid data with attribute a i , and σ(a i ) is the standard deviation of the grid data with attribute a i ;
[0157] The grid data with attribute a i is converted to the range [0, 1] and subjected to a normalization operation:
[0158]
[0159] In the above formula, c i is the grid data with attribute a i after normalization.
[0160] 2. A generative adversarial network algorithm based on Riemannian manifold feature diffusion is used to perform data augmentation on the original grid data training set, and a data augmentation model is trained to obtain an augmented grid data training set;
[0161] The generative adversarial network algorithm based on Riemannian manifold feature diffusion is used to generate samples of the original grid data training set, thereby realizing the augmentation of the grid data. The algorithm consists of a generator and a discriminator. The generator is used to generate grid data vectors that are close to real grid data vectors, and the discriminator is used to distinguish between the generated vectors and real grid data vectors.
[0162] The specific process of generating grid data set samples by the generative adversarial network algorithm based on Riemannian manifold feature diffusion is as follows:
[0163] The maximum number of iterations of the preset generative adversarial network is initialized to 500, and the original grid data training set is used as a quantum ground state set. The ground state set contains Ke quantum ground states |φ k >. The randomness of the quantum state is used in the input layer of the generator of the generative adversarial network to generate a series of initial quantum state grid data points by superimposing the original grid data training set of random qubits using quantum computing strategies. The generated initial grid data points exhibit high randomness and coverage in the distribution state, which helps to explore the potential space of the grid data and thus generate more diverse and rich grid data.
[0164] The quantum computing strategy is:
[0165]
[0166] In the above formula, ψ c is the generated initial quantum state grid data point, Ke is the total number of quantum ground states, set to 50, α c,k is the complex coefficient of the quantum state, |φ k > is the quantum ground state;
[0167] Generator G c Receive the power grid data points in the initial quantum state, and by performing data diffusion on the Riemann manifold, obtain a new power grid data vector feature representation while maintaining the essential vector properties of the power grid data points in the initial quantum state, thereby generating new power grid data points;
[0168] The data diffusion method on the Riemann manifold is:
[0169]
[0170] In the above formula, is the grid data point of the t-th iteration. The grid data point when t is 0 is the grid data point of the initial quantum state. c is the diffusion step size, set to 0.01, For gradient-based The manifold diffusion operator, is the loss function on the Riemannian manifold, Based on the grid data points The Riemannian metric matrix, μ, is dynamically adjusted on the Riemannian manifold. c is the mean of the current iteration batch power grid data, σ c is the scale parameter of the current iteration batch power grid data, I is the unit matrix;
[0171] Based on the generated new power grid data points, the loss function is used to optimize the generator and discriminator of the generative adversarial network, and the features of the new power grid data points are corrected to ensure the correctness of the power grid data features on the Riemannian manifold;
[0172] The constraints of the generator and discriminator of the loss function to optimize the generative adversarial network are:
[0173]
[0174] In the above formula, G is the loss function of the generated adversarial network. c is the generator, D c is the discriminator, is the loss of the discriminator, For the loss of the generator, D c (x) is the score of the discriminator for the data point x in the original power grid data training set, G c (z) is the power grid data generated by the generator according to the random noise z, that is, the power grid data generated by the generator according to the random noise z is p data (x) is the distribution of the data points in the original power grid data training set, p z (z) is the probability distribution of the input noise;
[0175] The way of feature correction for the new power grid data point is:
[0176]
[0177] In the above formula, is the corrected power grid data, Proj S ( ) is the operation of projecting the power grid data onto the Riemann manifold, η c is the learning rate, set to 0.01, is the gradient of the t+1 iteration, RS( ) is the regularization function of the correction, λ c,i is the correction strength parameter, set to 0.05, is the i-th power grid data point in the t+1 iteration, is the average value of all power grid data points in the t+1 iteration;
[0178] After the generator generates new power grid data point vectors, the discriminator evaluates the similarity of these data point vectors with the real power grid data point vectors;
[0179] The quality score of the corrected new power grid data point is calculated, and the discriminator D c The similarity of the new power grid data and the real power grid data is evaluated, and when the quality score of the new power grid data point is greater than the preset similarity threshold, the generated new power grid data point is retained, otherwise the new power grid data point is discarded;
[0180] The following formula is used to calculate the quality score of the corrected new power grid data point:
[0181]
[0182] In the above formula, is the quality score of the new power grid data point, d( ) is the distance measurement function between the mean values of the two power grid data point sets, X real is the real power grid data, || || is the Euclidean distance, that is, the L2 norm;
[0183] The adaptive semantic space mapping strategy is used to retain the new power grid data point Gc (z) is a new power grid data point after meaning adjustment:
[0184] S c (G c (z))=G c (z)+β c ·tanh(Ω c ·BERT(G c (z)));
[0185] In the above formula, S c () is a meaning adjustment function of the meaning space mapping module, which extracts deep meaning features of the power grid data based on an existing meaning analysis model, and adjusts these features to optimize them through an adaptive learning mechanism, the meaning analysis model is a pre-trained BERT model, β c is a weight parameter, set to 0.1, tanh() is a hyperbolic tangent activation function, Ω c is a learnable conversion matrix, and BERT(G c (z)) is a deep meaning feature extracted using a pre-trained BERT model.
[0186] A dynamic meaning perception adjustment mechanism is used to adjust the new power grid data point after meaning adjustment, a self-attention mechanism is used to capture the before-and-after relationship in the power grid data, and the before-and-after factors of the power grid data are generated by analysis to dynamically adjust the generation process of the new power grid data point:
[0187]
[0188] In the above formula, X c,adjusted is a new sample after dynamic meaning perception adjustment, i.e. the final generated sample, γ c is an adjustment weight, set to 0.1, softmax() is a Softmax function, Θ c is a learnable conversion matrix, and Attn() is a self-attention function, is a before-and-after data vector of the power grid data.
[0189] Let the iteration number be incremented by 1, input the twice adjusted power grid data point into the generator of the generative adversarial network, repeat the above operation steps until the preset maximum iteration number is reached, the data augmentation model training is completed, the generated new power grid data point is superimposed to the original power grid data training set, and an augmented power grid data training set is obtained. The original obtained power grid data training set sample is 800, the generated new power grid data is 200, and the augmented power grid data set contains 1000 samples.
[0190] 3. The limit learning machine algorithm based on nonlinear system coupling learning, wherein the expanded power grid data training set is input into the power grid stability evaluation model for training to obtain the trained power grid stability evaluation model;
[0191] The limit learning machine algorithm based on nonlinear system coupling learning adjusts the activation function of the hidden layer reversible neuron in the training process adaptively, allows the power grid stability evaluation model to dynamically adjust the parameters of the neuron according to the error feedback in the training process, and better matches and identifies the nonlinear, complex and stability-affecting factors in the power grid based on the traditional limit learning machine algorithm.
[0192] The specific training process of the limit learning machine algorithm based on nonlinear system coupling learning includes:
[0193] Randomly initialize the hidden layer neurons of the limit learning machine:
[0194] W u =rande(N u ,D u );
[0195] b u =rande(N u ,1);
[0196] In the above formula, W u is the weight matrix of the hidden layer neurons of the limit learning machine, N u is the number of hidden layer neurons of the limit learning machine, D u is the dimension of the features input to the limit learning machine, b u is the bias vector of the hidden layer neurons of the limit learning machine, the rande(N u , D u ) function represents generating an N u ×D u matrix, and the elements in the matrix are random numbers, the rande(N u , 1) function represents generating an N u ×1 vector, and the elements in the vector are random numbers.
[0197] The expanded power grid data training set is input into the randomly initialized hidden layer neurons of the limit learning machine, and the output of the hidden layer neurons of the limit learning machine is calculated.
[0198] y u,j =f u (W u,j ·X u,j +b u,j );
[0199] In the above formula, y u,jis the output of the jth hidden neuron of the extreme learning machine, f u is an activation function of the extreme learning machine, W u,j is the weight of the jth hidden neuron of the extreme learning machine, x u,j is the grid data input into the jth hidden neuron of the extreme learning machine, b u,j is the bias vector of the jth hidden neuron of the extreme learning machine;
[0200] According to the error between the output of the hidden layer neuron of the extreme learning machine and the target output, an adaptive threshold of the error is calculated, and the learning rate of the extreme learning machine is dynamically adjusted through the adaptive threshold, and then the weight and bias of the hidden layer neuron of the extreme learning machine are dynamically adjusted.
[0201] The adaptive threshold of the error is calculated by the following formula:
[0202]
[0203] The learning rate of the extreme learning machine is calculated by the following formula:
[0204]
[0205] The weight and bias of the hidden layer neuron of the extreme learning machine are calculated by the following formula:
[0206]
[0207] In the above formula, is the adaptive threshold of the error of the tth iteration, β is a smoothing coefficient for adjusting the influence of historical errors, std( ) is a function for calculating the standard deviation, E (t-1) is the error set of all samples in the last iteration, η(t) is the learning rate of the extreme learning machine in the tth iteration, η0 is the initial learning rate, is the average absolute value of the error of the tth iteration, is the weight of the extreme learning machine in the tth iteration, is the gradient of the loss function L with respect to the weight, L is the loss function of the extreme learning machine, which is a composite function integrating classification accuracy and model complexity, X u , Y u are the input and output of the extreme learning machine respectively, μ is the change amount influence factor of the extreme learning machine, is the change amount of the weight of the extreme learning machine between the current iteration and the last iteration, is the bias of the extreme learning machine in the tth iteration, is the gradient of the loss function L with respect to the bias, is the change amount of the bias of the extreme learning machine between the current iteration and the last iteration, Mu is the number of samples in the current iteration batch input to the hidden layer neurons of the extreme learning machine, is the cross-entropy loss of a single sample, and λ is the regularization term coefficient of the extreme learning machine, is the regularization term of the extreme learning machine;
[0208] Based on the characteristics of real-time data flow, a dynamic error correction mechanism with adaptive threshold is used to dynamically adjust the current error and correct the threshold to achieve a more accurate learning process and faster model adaptability. The adaptive threshold is dynamically adjusted based on the average error calculated in each iteration. The purpose of the adaptive threshold is to adjust the sensitivity of learning at each step of model training according to the actual error situation, so that the model shows higher flexibility and efficiency when facing different types of data distribution;
[0209] Based on the dynamically adjusted weights and biases of the hidden layer neurons of the extreme learning machine, the gradients of each extreme learning machine hidden layer neuron are calculated through the reversible neurons to further update the weights and biases of the extreme learning machine hidden layer neurons:
[0210]
[0211] After each forward propagation, the gradients of each parameter are calculated using the backpropagation algorithm through the reversible neurons. Specifically, for each neuron in the hidden layer of the extreme learning machine, the gradient calculation method is represented as:
[0212]
[0213] In the above formula, ← is the parameter update operation, α is the learning rate of the reversible neuron, δ u,j is the gradient of the jth hidden neuron of the extreme learning machine, is the transpose of the input grid data of the jth hidden neuron of the extreme learning machine, is the predicted label of the jth hidden neuron sample of the extreme learning machine, f′ u is the derivative of the activation function of the extreme learning machine, z u,j is the activation function feature vector input to the jth hidden neuron of the extreme learning machine;
[0214] Using the updated weights and biases of the hidden layer neurons of the extreme learning machine, the output of the hidden layer neurons of the extreme learning machine is recalculated, and a convergence function of the output grid data is defined to determine whether the convergence function is less than a set threshold. If yes, it is considered that the power grid stability evaluation model has been stabilized and the training is ended. If not, the weights and biases of the hidden layer neurons of the extreme learning machine are adjusted and updated again until the convergence function of the output grid data is less than the set threshold, and the trained power grid stability evaluation model is obtained;
[0215] The convergence function of the output power grid data is:
[0216]
[0217] In the above formula, C u is a convergence function of the output power grid data.
[0218] 4. A new power grid data set sample related to the electric vehicle in the power grid is input into the trained power grid stability evaluation model for evaluation, and then the evaluation level of the power grid stability is obtained;
[0219] After training, a new electric vehicle data set sample in the power grid is input into the trained power grid stability evaluation model to evaluate the influence of large-scale electric vehicle access on the stability of the power grid. The evaluation level of stability includes unstable, less stable, relatively stable, stable, and high stability. The higher the level, the more stable the power grid.
[0220] Embodiment 2:
[0221] As shown in Figure 2 , a power grid stability evaluation system for large-scale electric vehicle access includes a training set data acquisition module, a power grid data set expansion module, a power grid stability evaluation model training module, and a power grid stability level evaluation module.
[0222] The training set data acquisition module is used to acquire the power grid data set related to the electric vehicle in the power grid, and to classify and label it to obtain the original power grid data training set.
[0223] The power grid data set expansion module is used to perform data expansion on the original power grid data training set based on the Riemann manifold feature diffusion generative adversarial network algorithm, and to train the data expansion model to obtain the expanded power grid data training set.
[0224] The power grid stability evaluation model training module is used to input the expanded power grid data training set into the power grid stability evaluation model for training based on the nonlinear system coupling learning extreme learning machine algorithm, to obtain the trained power grid stability evaluation model.
[0225] The power grid stability level evaluation module is used to input a new power grid data set sample related to the electric vehicle in the power grid into the trained power grid stability evaluation model for evaluation, and then obtain the evaluation level of the power grid stability.
[0226] In the training set data collection module, the power grid data set related to the electric vehicle in the power grid comprises: obtaining data of electric vehicle use frequency and driving mode from the traffic department, obtaining data of electric vehicle distribution from the electric vehicle registration database, and obtaining data of charging station geographic position and operation from the charging infrastructure database;
[0227] The classification and labeling are performed, and the labeled category is an evaluation level of stability, which is specifically divided into five levels, including unstable, sub-stable, relatively stable, stable and high stability, and the higher the level is, the more stable the power grid is.
[0228] The power grid data set expansion module comprises a quantum state power grid data point generation unit, a new power grid data point generation unit, an optimization and feature correction unit, a quality scoring unit, a meaning adjustment unit, a secondary adjustment unit and an iteration unit.
[0229] The quantum state power grid data point generation unit is used to initialize the maximum number of iterations of the preset generative adversarial network, and the original power grid data training set is used as a quantum ground state set, wherein the ground state set comprises Ke quantum ground states |φ k The generator input layer of the generative adversarial network uses a quantum computing strategy to generate a series of initial quantum state power grid data points.
[0230] The quantum computing strategy is:
[0231]
[0232] In the above formula, ψ c is the generated initial quantum state power grid data point, Ke is the total number of quantum ground states, α c,k is the complex coefficient of the quantum state, |φ k > is the quantum ground state.
[0233] The new power grid data point generation unit is used for the generator G c to receive the initial quantum state power grid data point, and to generate a new power grid data point by performing data diffusion on the Riemann manifold to make the initial quantum state power grid data point obtain new power grid data characteristics.
[0234] The data diffusion mode on the Riemann manifold is:
[0235]
[0236] In the above formula, is the power grid data point of the tth iteration, the power grid data point when t is 0 is the initial quantum state power grid data point, τ c is the diffusion step length, is a manifold diffusion operator based on the gradient on the Riemann manifold. is a loss function on a Riemannian manifold, is a current iteration batch of power grid data is a position dynamically adjusted Riemannian metric matrix, μ c is a mean of the current iteration batch of power grid data, σ c is a scale parameter of the current iteration batch of power grid data, I is an identity matrix;
[0237] The optimization and feature correction unit is configured to optimize the generator and the discriminator of the generative adversarial network by using the loss function based on the generated new power grid data point, and perform feature correction on the new power grid data point.
[0238] The constraint condition for the loss function to optimize the generator and the discriminator of the generative adversarial network is:
[0239]
[0240] In the above formula, is a loss function of the generative adversarial network, G c is a generator, D c is a discriminator, is a loss of the discriminator, is a loss of the generator, D c (x) is a score of the discriminator on a data point x in the original power grid data training set, G c (z) is power grid data generated by the generator according to random noise z, that is, the power grid data generated by the generator according to random noise z is p data (x) is a distribution of data points in the original power grid data training set, p z (z) is a probability distribution of input noise;
[0241] The feature correction manner for the new power grid data point is:
[0242]
[0243] In the above formula, is the corrected power grid data, Proj S ( ) is an operation of projecting the power grid data onto a Riemannian manifold, η c is a learning rate, is a gradient of the t+1 iteration, RS() is a regularization function of correction, λ c,i is a correction strength parameter, is the i-th power grid data point in the t+1 iteration, is the mean of all power grid data points in the t+1 iteration;
[0244] The quality score unit is configured to calculate a quality score of the corrected new power grid data point, using the discriminator D c The new power grid data is evaluated for similarity to the real power grid data, and when the quality score of the new power grid data point is greater than a preset similarity threshold, the generated new power grid data point is retained, otherwise the new power grid data point is discarded.
[0245] The quality score of the corrected new power grid data point is calculated using the following formula:
[0246]
[0247] In the above formula, is the quality score of the new power grid data point, d() is a distance measurement function between the mean values of two power grid data point sets, X real is the real power grid data, and ||| is the Euclidean distance.
[0248] The meaning adjustment unit is configured to adjust the meaning of the new power grid data point G c (z) generated by the quality score unit using an adaptive meaning space mapping strategy, to obtain a meaning-adjusted new power grid data point:
[0249] S c (G c (z))=G c (z)+β c ·tanh(Ω c ·BERT(G c (z)));
[0250] In the above formula, S c () is a meaning adjustment function of the adaptive meaning space mapping module, β c is a weight parameter, tanh() is a hyperbolic tangent activation function, Ω c is a learnable conversion matrix, and BERT(G c (z)) is a deep meaning feature extracted using a pre-trained BERT model.
[0251] The secondary adjustment unit is configured to use a dynamic meaning-aware adjustment mechanism to perform secondary adjustment on the meaning-adjusted new power grid data point, and dynamically adjust the generation process of the new power grid data point:
[0252]
[0253] In the above formula, X c,adjusted is the new sample after dynamic meaning-aware adjustment, i.e., the final generated sample, γ c is an adjustment weight, softmax() is a Softmax function, and Θ cis a learnable conversion matrix, Attn() is a self-attention function, is a previous data vector of the power grid data;
[0254] The iteration unit is configured to increase the iteration number by 1, and the new power grid data point generation unit inputs the twice adjusted power grid data point into the generator of the generative adversarial network, and repeats the above operation steps until a preset maximum iteration number is reached, and the data expansion model training is completed.
[0255] The power grid stability evaluation model training module comprises a random initialization unit, an output calculation unit, a weight and bias dynamic adjustment unit, a weight and bias updating unit, and a loop unit.
[0256] The random initialization unit is configured to randomly initialize hidden layer neurons of the extreme learning machine:
[0257] W u =rande(N u ,D u );
[0258] b u =rande(N u ,1);
[0259] In the above formula, W u is a weight matrix of the hidden layer neurons of the extreme learning machine, N u is the number of hidden layer neurons of the extreme learning machine, D u is the dimension of the input feature of the extreme learning machine, b u is a bias vector of the hidden layer neurons of the extreme learning machine, rande(N u , D u ) function represents generating an N u ×D u matrix, and the elements in the matrix are random numbers, rande(N u , 1) function represents generating an N u ×1 vector, and the elements in the vector are random numbers.
[0260] The output calculation unit is configured to input the expanded power grid data training set into the randomly initialized hidden layer neurons of the extreme learning machine, and calculate the output of the hidden layer neurons of the extreme learning machine:
[0261] y u,j =f u (W u,j ·x u,j +b u,j );
[0262] In the above formula, y u,j is the output of the jth hidden neuron of the extreme learning machine, f u is the activation function of the extreme learning machine, W u,j is the weight of the jth hidden neuron of the extreme learning machine, x u,j is the grid data input into the jth hidden neuron of the extreme learning machine, b u,j is the bias vector of the jth hidden neuron of the extreme learning machine;
[0263] The weight and bias dynamic adjustment unit is configured to calculate an adaptive threshold of the error according to the error between the output of the hidden layer neuron of the extreme learning machine and the target output, and dynamically adjust the learning rate of the extreme learning machine through the adaptive threshold, and further dynamically adjust the weight and bias of the hidden layer neuron of the extreme learning machine.
[0264] The adaptive threshold of the error is calculated by the following formula:
[0265]
[0266] The learning rate of the extreme learning machine is calculated by the following formula:
[0267]
[0268] The weight and bias of the hidden layer neuron of the extreme learning machine are calculated by the following formula:
[0269]
[0270] In the above formula, is the adaptive threshold of the error of the tth iteration, β is a smoothing coefficient, std() is a function for calculating the standard deviation, E (t-1) is a set of errors of all samples in the last iteration, η(t) is the learning rate of the extreme learning machine in the tth iteration, η0 is an initial learning rate, is the average absolute value of the error of the tth iteration, is the weight of the extreme learning machine in the tth iteration, is the gradient of the loss function L() with respect to the weight, L() is the loss function of the extreme learning machine, X u , Y u are the input and output of the extreme learning machine respectively, μ is a change amount influence factor of the extreme learning machine, is the change amount of the weight of the extreme learning machine between the current iteration and the last iteration, is the bias of the extreme learning machine in the tth iteration, is the gradient of the loss function L() with respect to the bias, is the change amount of the bias of the extreme learning machine between the current iteration and the last iteration, Mu is the number of samples input to the current iteration batch of hidden layer neurons in the extreme learning machine, is the cross entropy loss of a single sample, λ is the regularization coefficient of the extreme learning machine, is the regularization term of the extreme learning machine;
[0271] The weight and bias updating unit is used to calculate the gradient of each extreme learning machine hidden layer neuron through the reversible neuron based on the dynamically adjusted weights and biases of the extreme learning machine hidden layer neurons, and further update the weights and biases of the extreme learning machine hidden layer neurons:
[0272]
[0273] In the above formula, ← is the parameter update operation, α is the learning rate of the reversible neuron, and δ u,j is the gradient of the jth hidden neuron of the extreme learning machine, is the transpose of the input grid data of the jth hidden neuron of the extreme learning machine, is the predicted label of the extreme learning machine for the jth hidden neuron sample, f′ u () is the derivative of the extreme learning machine activation function, z u,j is the activation function feature vector input to the jth hidden neuron of the extreme learning machine;
[0274] The cyclic unit is used to use the updated weights and biases of the hidden layer neurons of the extreme learning machine to return to the output calculation unit to recalculate the outputs of the hidden layer neurons of the extreme learning machine, and define a convergence function of the output power grid data, and determine whether the convergence function is less than a set threshold. If so, it is considered that the power grid stability assessment model has stabilized and the training is terminated. If not, it returns to the weight and bias dynamic adjustment unit to readjust and update the weights and biases of the hidden layer neurons of the extreme learning machine until the convergence function of the output power grid data is less than the set threshold, thereby obtaining a trained power grid stability assessment model;
[0275] The convergence function of the output power grid data is:
[0276]
[0277] In the above formula, C u is the convergence function of the output power grid data.
[0278] Example 3:
[0279] like Figure 3 As shown, a power grid stability assessment device for large-scale electric vehicle access includes a processor and a memory;
[0280] The memory is configured to store computer program code and transmit the computer program code to the processor.
[0281] The processor is configured to execute instructions in the computer program code to perform the method for evaluating power grid stability with large-scale electric vehicles according to embodiment 1.
[0282] Embodiment 4:
[0283] A computer storage medium having a computer program stored thereon;
[0284] The computer program is executed by the processor to implement the steps of the method for evaluating power grid stability with large-scale electric vehicles according to the present solution.
Claims
1. A method for evaluating the stability of a power grid with large-scale electric vehicle access, characterized in that: The method comprises: S1. Collecting and classifying electric vehicle-related grid data sets in the power grid to obtain a training set of original grid data; the grid data sets related to electric vehicles in the power grid include: data on the frequency of use and driving patterns of electric vehicles obtained from the transportation department, data on the distribution of electric vehicles obtained from the electric vehicle registration database, and data on the geographical location and operation of charging stations obtained from the charging infrastructure database; the classification and labeling are performed, and the labeled categories are stability assessment levels, which are specifically divided into five levels, including unstable, unstable, relatively stable, stable, and highly stable, and the higher the level, the more stable the grid; S2. A generative adversarial network algorithm based on Riemannian manifold feature diffusion performs data expansion on the original power grid data training set and trains a data expansion model to obtain an expanded power grid data training set; the data expansion of the original power grid data training set includes using the original power grid data training set as a quantum basis state set, using a quantum computing strategy in the generator input layer of the generative adversarial network to generate a series of power grid data points in an initial quantum state; the generator receives the power grid data points in the initial quantum state, and by performing data diffusion on the Riemannian manifold, causes the power grid data points in the initial quantum state to obtain new power grid data features, thereby generating new power grid data points; S3. An extreme learning machine algorithm based on nonlinear system coupling learning, inputting the expanded power grid data training set into the power grid stability assessment model for training to obtain a trained power grid stability assessment model, including dynamically adjusting the learning rate of the extreme learning machine through an adaptive threshold, and then dynamically adjusting the weights and biases of the extreme learning machine hidden layer neurons; and based on the dynamically adjusted weights and biases of the extreme learning machine hidden layer neurons, calculating the gradient of each extreme learning machine hidden layer neuron through a reversible neuron, and further updating the weights and biases of the extreme learning machine hidden layer neurons; S4. Input new grid data set samples related to electric vehicles in the grid into the trained grid stability assessment model for evaluation, thereby obtaining an assessment level of grid stability.
2. A method for evaluating the stability of a power grid with large-scale electric vehicle access according to claim 1, characterized in that: The S2 includes: S21, initialize the maximum number of iterations of the preset generative adversarial network, use the original power grid data training set as the quantum basis state set, the basis state set contains quantum ground state , using quantum computing strategies in the generator input layer of the generative adversarial network to generate a series of initial quantum state power grid data points; The quantum computing strategy is: ; In the above formula, is the generated initial quantum state grid data point, is the total number of quantum ground states, is the complex coefficient of the quantum state, is the quantum ground state; S22. Generator Receive the power grid data points in the initial quantum state, and by performing data diffusion on the Riemann manifold, make the power grid data points in the initial quantum state acquire new power grid data features, thereby generating new power grid data points; The data diffusion method on the Riemann manifold is: ; ; ; In the above formula, For the The grid data points of the iteration, The grid data point when is 0 is the grid data point of the initial quantum state. is the diffusion step length, For gradient-based The manifold diffusion operator, is the loss function on the Riemannian manifold, Based on the grid data points The Riemannian metric matrix whose position on the Riemannian manifold is dynamically adjusted, is the mean of the current iteration batch power grid data, is the scale parameter of the current iteration batch power grid data, is the identity matrix; S23. Based on the generated new power grid data points, the loss function is used to optimize the generator and discriminator of the generative adversarial network, and feature correction is performed on the new power grid data points. The constraints of the generator and discriminator of the loss function to optimize the generative adversarial network are: ; ; ; In the above formula, is the loss function of the generative adversarial network, For the generator, is the discriminator, is the loss of the discriminator, is the loss of the generator, is the score of the discriminator on the data points in the original power grid data training set, For the generator based on random noise The grid data is generated by the generator according to the random noise The generated power grid data is , is the distribution of data points in the original power grid data training set, is the probability distribution of input noise; The method of performing feature correction on the new power grid data point is: ; ; In the above formula, is the corrected power grid data, To project the power grid data onto the Riemann manifold, is the learning rate, For the The gradient of the iteration, is the regularization function for correction, To calibrate the intensity parameters, For the In the iteration Grid data points, For the The average value of all grid data points in the iteration; S24, calculate the quality score of the corrected new power grid data point, and use the discriminator Evaluate the similarity between the new grid data and the real grid data. If the quality score of the new grid data point is greater than the preset similarity threshold, the new grid data point of the generator is retained; otherwise, the new grid data point is discarded. The quality score of the corrected new grid data point is calculated using the following formula: ; ; In the above formula, Score the quality of new grid data points, is the distance metric function between the means of two power grid data point sets, is the real power grid data, is the Euclidean distance; S25, using adaptive meaning space mapping strategy to the new grid data points of the generator retained by S24 Make meaning adjustments to obtain new power grid data points after meaning adjustments: ; In the above formula, To adapt the meaning adjustment function of the meaning space mapping module, is the weight parameter, is the hyperbolic tangent activation function, is the learnable transformation matrix, Deep meaning features extracted using the pre-trained BERT model; S26. Using a dynamic meaning perception adjustment mechanism, a secondary adjustment is performed on the new power grid data point after the meaning adjustment, and the generation process of the new power grid data point is dynamically adjusted: ; In the above formula, is the new sample after dynamic meaning perception adjustment, that is, the final sample generated. To adjust the weights, is the Softmax function, is the learnable transformation matrix, is the self-attention function, is the before and after data vector of the power grid data; S27. Add 1 to the number of iterations, return to step S22, input the second-adjusted power grid data points into the generator of the generative adversarial network, repeat the above steps until the preset maximum number of iterations is reached, and the data expansion model training is completed. The generated new power grid data points are superimposed on the original power grid data training set to obtain the expanded power grid data training set.
3. The method for evaluating the stability of a power grid with large-scale electric vehicle access according to claim 1, characterized in that: The S3 includes: S31. Randomly initialize the hidden layer neurons of the extreme learning machine: ; ; In the above formula, is the weight matrix of the neurons in the hidden layer of the extreme learning machine, is the number of neurons in the hidden layer of the extreme learning machine, is the dimension of the feature input to the extreme learning machine, is the bias vector of the hidden layer neurons of the extreme learning machine, Function represents the generation of a A matrix whose elements are random numbers, Function represents the generation of a A vector of which the elements are random numbers; S32. Input the expanded power grid data training set into the randomly initialized extreme learning machine hidden layer neurons, and calculate the output of the extreme learning machine hidden layer neurons: ; In the above formula, For the extreme learning machine The output of hidden neurons, is the activation function of the extreme learning machine, For the extreme learning machine The weights of the hidden neurons, For the extreme learning machine The input grid data is fed into hidden neurons, For the extreme learning machine The bias vector of each hidden neuron; S33, calculating an adaptive threshold of the error based on the error between the output of the hidden layer neurons of the extreme learning machine and the target output, and dynamically adjusting the learning rate of the extreme learning machine by the adaptive threshold, thereby dynamically adjusting the weights and biases of the hidden layer neurons of the extreme learning machine; The adaptive threshold of the error is calculated using the following formula: ; The learning rate of the extreme learning machine is calculated using the following formula: ; The weights and biases of the neurons in the hidden layer of the extreme learning machine are calculated using the following formula: ; ; ; In the above formula, For the The adaptive threshold of the iterative error, is the smoothing coefficient, is the function for calculating the standard deviation, is the error set of all samples in the previous iteration, For the The learning rate of the extreme learning machine of the iteration, is the initial learning rate, For the The average absolute error of the iterations, For the The weight of the extreme learning machine at the iteration, is the loss function The gradient of the weights, is the loss function of the extreme learning machine, 、 are the input and output of the extreme learning machine, is the influence factor of the change of the extreme learning machine, is the weight change of the extreme learning machine between this iteration and the previous iteration, No. The bias of the extreme learning machine in the iteration, is the loss function The gradient of the bias, is the change in bias of the extreme learning machine between this iteration and the previous iteration, is the number of samples input to the current iteration batch of hidden layer neurons in the extreme learning machine, is the cross entropy loss of a single sample, is the regularization coefficient of the extreme learning machine, is the regularization term of the extreme learning machine; S34. Based on the dynamically adjusted weights and biases of the neurons in the hidden layer of the extreme learning machine, the gradient of each neuron in the hidden layer of the extreme learning machine is calculated through the reversible neurons, and the weights and biases of the neurons in the hidden layer of the extreme learning machine are further updated: ; ; ; In the above formula, is the parameter update operation, is the learning rate of the reversible neuron, For the extreme learning machine The gradient of the hidden neurons, For the extreme learning machine The transpose of the input grid data for each hidden neuron, For the extreme learning machine The predicted label of the hidden neuron sample, is the derivative of the extreme learning machine activation function, is the input to the extreme learning machine The activation function feature vector of hidden neurons; S35. Using the updated weights and biases of the hidden layer neurons of the extreme learning machine, return to S32 to recalculate the outputs of the hidden layer neurons of the extreme learning machine, and define a convergence function of the output power grid data to determine whether the convergence function is less than a set threshold. If so, it is considered that the power grid stability assessment model has stabilized and the training is terminated. If not, return to S33 to readjust and update the weights and biases of the hidden layer neurons of the extreme learning machine until the convergence function of the output power grid data is less than the set threshold, thereby obtaining a trained power grid stability assessment model. The convergence function of the output power grid data is: ; In the above formula, is the convergence function of the output power grid data.
4. A grid stability assessment system for large-scale electric vehicle access, characterized in that: The system includes a training set data acquisition module, a power grid data set expansion module, a power grid stability assessment model training module, and a power grid stability level assessment module; The training set data acquisition module is used to collect power grid data sets related to electric vehicles in the power grid, classify and annotate them, and obtain a training set of original power grid data; the power grid data sets related to electric vehicles in the power grid include: data on the use frequency and driving mode of electric vehicles obtained from the transportation department, data on the distribution of electric vehicles obtained from the electric vehicle registration database, and data on the geographical location and operation of charging stations obtained from the charging infrastructure database; the classification and annotating are performed, and the annotated categories are stability assessment levels, which are specifically divided into five levels, including unstable, unstable, relatively stable, stable, and highly stable, and the higher the level, the more stable the power grid; The power grid data set expansion module is used to perform data expansion on the original power grid data training set based on the generative adversarial network algorithm of Riemannian manifold feature diffusion, and train the data expansion model to obtain the expanded power grid data training set; the data expansion of the original power grid data training set includes using the original power grid data training set as a quantum basis state set, using a quantum computing strategy in the generator input layer of the generative adversarial network to generate a series of power grid data points in an initial quantum state; the generator receives the power grid data points in the initial quantum state, and by performing data diffusion on the Riemannian manifold, the power grid data points in the initial quantum state acquire new power grid data features, thereby generating new power grid data points; The power grid stability assessment model training module is used for an extreme learning machine algorithm based on nonlinear system coupling learning, inputting the expanded power grid data training set into the power grid stability assessment model for training to obtain a trained power grid stability assessment model, including dynamically adjusting the learning rate of the extreme learning machine through an adaptive threshold, and then dynamically adjusting the weights and biases of the extreme learning machine hidden layer neurons; and based on the dynamically adjusted weights and biases of the extreme learning machine hidden layer neurons, calculating the gradient of each extreme learning machine hidden layer neuron through a reversible neuron, and further updating the weights and biases of the extreme learning machine hidden layer neurons; The grid stability level assessment module is used to input new grid data set samples related to electric vehicles in the grid into the trained grid stability assessment model for assessment, thereby obtaining an assessment level of grid stability.
5. A grid stability assessment system for large-scale electric vehicle access according to claim 4, characterized in that: The power grid data set expansion module includes a quantum state power grid data point generation unit, a new power grid data point generation unit, an optimization and feature correction unit, a quality scoring unit, a meaning adjustment unit, a secondary adjustment unit, and an iteration unit; The quantum state power grid data point generation unit is used to initialize the maximum number of iterations of the preset generative adversarial network, and use the original power grid data training set as the quantum basis state set, which contains quantum ground state , using quantum computing strategies in the generator input layer of the generative adversarial network to generate a series of initial quantum state power grid data points; The quantum computing strategy is: ; In the above formula, is the generated initial quantum state grid data point, is the total number of quantum ground states, is the complex coefficient of the quantum state, is the quantum ground state; The new power grid data point generation unit is used to generate Receive the power grid data points in the initial quantum state, and by performing data diffusion on the Riemann manifold, make the power grid data points in the initial quantum state acquire new power grid data features, thereby generating new power grid data points; The data diffusion method on the Riemann manifold is: ; ; ; In the above formula, For the The grid data points of the iteration, The grid data point when is 0 is the grid data point of the initial quantum state. is the diffusion step length, For gradient-based The manifold diffusion operator, is the loss function on the Riemannian manifold, Based on the grid data points The Riemannian metric matrix whose position on the Riemannian manifold is dynamically adjusted, is the mean of the current iteration batch power grid data, is the scale parameter of the current iteration batch power grid data, is the identity matrix; The optimization and feature correction unit is used to optimize the generator and discriminator of the generative adversarial network based on the generated new power grid data points using a loss function, and perform feature correction on the new power grid data points; The constraints of the generator and discriminator of the loss function to optimize the generative adversarial network are: ; ; ; In the above formula, is the loss function of the generative adversarial network, For the generator, is the discriminator, is the loss of the discriminator, is the loss of the generator, The discriminator is trained on the original power grid data. Rating, For the generator based on random noise The grid data is generated by the generator according to the random noise The generated power grid data is , is the distribution of data points in the original power grid data training set, is the probability distribution of input noise; The method of performing feature correction on the new power grid data point is: ; ; In the above formula, is the corrected power grid data, To project the power grid data onto the Riemann manifold, is the learning rate, For the The gradient of the iteration, is the regularization function for correction, To calibrate the intensity parameters, For the In the iteration Grid data points, For the The average value of all grid data points in the iteration; The quality scoring unit is used to calculate the quality score of the corrected new power grid data point, using the discriminator Evaluate the similarity between the new grid data and the real grid data. If the quality score of the new grid data point is greater than the preset similarity threshold, the generated new grid data point is retained; otherwise, the new grid data point is discarded. The quality score of the corrected new grid data point is calculated using the following formula: ; ; In the above formula, Score the quality of new grid data points, is the distance metric function between the means of two power grid data point sets, is the real power grid data, is the Euclidean distance; The meaning adjustment unit is used to use an adaptive meaning space mapping strategy to adjust the new power grid data points of the generator retained by the quality scoring unit. Make meaning adjustments to obtain new power grid data points after meaning adjustments: ; In the above formula, To adapt the meaning adjustment function of the meaning space mapping module, is the weight parameter, is the hyperbolic tangent activation function, is the learnable transformation matrix, Deep meaning features extracted using the pre-trained BERT model; The secondary adjustment unit is used to adopt a dynamic meaning perception adjustment mechanism to perform secondary adjustments on the new power grid data points after the meaning adjustment, and dynamically adjust the generation process of the new power grid data points: ; In the above formula, is the new sample after dynamic meaning perception adjustment, that is, the final sample generated. To adjust the weights, is the Softmax function, is the learnable transformation matrix, is the self-attention function, is the before and after data vector of the power grid data; The iteration unit is used to increase the number of iterations by 1, return the new power grid data point generation unit, input the second-adjusted power grid data point into the generator of the generative adversarial network, repeat the above operation steps until the preset maximum number of iterations is reached, the data expansion model training is completed, and the generated new power grid data points are superimposed on the original power grid data training set to obtain the expanded power grid data training set.
6. A grid stability assessment system for large-scale electric vehicle access according to claim 4, characterized in that: The power grid stability assessment model training module includes a random initialization unit, an output calculation unit, a weight and bias dynamic adjustment unit, a weight and bias update unit, and a circulation unit; The random initialization unit is used to randomly initialize the hidden layer neurons of the extreme learning machine: ; ; In the above formula, is the weight matrix of the neurons in the hidden layer of the extreme learning machine, is the number of neurons in the hidden layer of the extreme learning machine, is the dimension of the feature input to the extreme learning machine, is the bias vector of the hidden layer neurons of the extreme learning machine, Function represents the generation of a A matrix whose elements are random numbers, Function represents the generation of a A vector of which the elements are random numbers; The output calculation unit is used to input the expanded power grid data training set into the randomly initialized extreme learning machine hidden layer neurons, and calculate the output of the extreme learning machine hidden layer neurons: ; In the above formula, For the extreme learning machine The output of hidden neurons, is the activation function of the extreme learning machine, For the extreme learning machine The weights of the hidden neurons, For the extreme learning machine The input grid data is fed into hidden neurons, For the extreme learning machine The bias vector of each hidden neuron; The weight and bias dynamic adjustment unit is used to calculate an adaptive threshold of the error based on the error between the output of the hidden layer neurons of the extreme learning machine and the target output, and dynamically adjust the learning rate of the extreme learning machine through the adaptive threshold, thereby dynamically adjusting the weight and bias of the hidden layer neurons of the extreme learning machine; The adaptive threshold of the error is calculated using the following formula: ; The learning rate of the extreme learning machine is calculated using the following formula: ; The weights and biases of the neurons in the hidden layer of the extreme learning machine are calculated using the following formula: ; ; ; In the above formula, For the The adaptive threshold of the iterative error, is the smoothing coefficient, is the function for calculating the standard deviation, is the error set of all samples in the previous iteration, For the The learning rate of the extreme learning machine of the iteration, is the initial learning rate, For the The average absolute error of the iterations, For the The weight of the extreme learning machine at the iteration, is the loss function The gradient of the weights, is the loss function of the extreme learning machine, 、 are the input and output of the extreme learning machine, is the influence factor of the change of the extreme learning machine, is the weight change of the extreme learning machine between this iteration and the previous iteration, No. The bias of the extreme learning machine in the iteration, is the loss function The gradient of the bias, is the change in bias of the extreme learning machine between this iteration and the previous iteration, is the number of samples input to the current iteration batch of hidden layer neurons in the extreme learning machine, is the cross entropy loss of a single sample, is the regularization coefficient of the extreme learning machine, is the regularization term of the extreme learning machine; The weight and bias updating unit is used to calculate the gradient of each extreme learning machine hidden layer neuron through the reversible neuron based on the dynamically adjusted weights and biases of the extreme learning machine hidden layer neurons, and further update the weights and biases of the extreme learning machine hidden layer neurons: ; ; ; In the above formula, is the parameter update operation, is the learning rate of the reversible neuron, For the extreme learning machine The gradient of the hidden neurons, For the extreme learning machine The transpose of the input grid data for each hidden neuron, For the extreme learning machine The predicted label of the hidden neuron sample, is the derivative of the extreme learning machine activation function, is the input to the extreme learning machine The activation function feature vector of hidden neurons; The cyclic unit is used to use the updated weights and biases of the hidden layer neurons of the extreme learning machine to return to the output calculation unit to recalculate the outputs of the hidden layer neurons of the extreme learning machine, and define a convergence function of the output power grid data, and determine whether the convergence function is less than a set threshold. If so, it is considered that the power grid stability assessment model has stabilized and the training is terminated. If not, it returns to the weight and bias dynamic adjustment unit to readjust and update the weights and biases of the hidden layer neurons of the extreme learning machine until the convergence function of the output power grid data is less than the set threshold, thereby obtaining a trained power grid stability assessment model; The convergence function of the output power grid data is: ; In the above formula, is the convergence function of the output power grid data.
7. A device for evaluating the stability of a power grid connected to large-scale electric vehicles, characterized in that: including a processor and a memory; The memory is used to store computer program code and transmit the computer program code to the processor; The processor is used to execute the grid stability assessment method for large-scale electric vehicle access according to any one of claims 1 to 3 according to the instructions in the computer program code.
8. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a method for evaluating the stability of a power grid with large-scale electric vehicle access according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Aero-engine fault diagnosis method based on enhanced gated recurrent neural network
CN111523081A
Lung CT image lesion area diffusion model detection method
CN117670787A