A method for evaluating maximum safe access capacity of photovoltaic in medium voltage distribution network
By constructing a power flow solver model based on a two-layer neural network and a multilayer perceptron, and combining it with the Monte Carlo simulation method, the problems of incomplete and dynamically changing topology information in medium-voltage distribution networks were solved, achieving high-precision and low-cost assessment of the maximum safe access capacity of photovoltaic power, and improving the adaptability and robustness of the system.
Patent Information
- Application Number
- CN202510486689.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-04-18
AI Technical Summary
Incomplete topology information and dynamic changes in operating status of medium-voltage distribution networks render traditional capacity assessment methods ineffective. Existing solutions rely on complete topology parameters, making it difficult to cope with high-frequency reconfiguration scenarios.
A power flow solver model based on a two-layer neural network and a multilayer perceptron is adopted, combined with Monte Carlo simulation. By collecting node voltage data for prediction and training, a hybrid regularization model is constructed to handle topology parameter uncertainties and enhance the model's generalization ability and robustness.
It improves the accuracy and efficiency of assessing the maximum safe access capacity of photovoltaic power in medium-voltage distribution networks, reduces operation and maintenance costs, and enhances the system's adaptability and generalization capabilities.
Smart Images

Figure CN120414489B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of power distribution network, and particularly relates to a method for evaluating maximum safe access capacity of photovoltaic in medium-voltage power distribution network. BACKGROUND
[0002] Current medium-voltage power distribution network has technical challenges such as incomplete topology information (such as incorrect line connection relationship, missing branch parameters) and dynamic changes in operating state (frequent reconstruction, insufficient measurement information), which leads to the failure of traditional capacity evaluation methods based on physical power flow equations. Existing solutions (such as genetic algorithm, cluster analysis) rely on complete topology parameters, are prone to errors due to information loss, and are difficult to cope with high-frequency reconstruction scenarios. SUMMARY
[0003] In order to solve the above technical problems, the present application provides a method for evaluating maximum safe access capacity of photovoltaic in medium-voltage power distribution network, which has high precision, fast efficiency and low operation and maintenance cost.
[0004] The technical solution of the present application to solve the above technical problems is: a method for evaluating maximum safe access capacity of photovoltaic in medium-voltage power distribution network, comprising the following steps:
[0005] S1: Collecting the voltage, phase angle, actual active power and actual reactive power of each node in the actual power distribution area, and calculating the real part and imaginary part of the voltage of each node;
[0006] S2: Taking the real part and imaginary part of the voltage of each node as the input of a two-layer neural network, pre-training the two-layer neural network, initializing the weight matrix using the sparsity and symmetry of the admittance matrix, and setting physical constraints to obtain a reconstructed power flow model;
[0007] S3: Establishing a power flow solver model based on a multi-layer perceptron (MLP), and inputting the active power and reactive power of each node to predict the real part and imaginary part of the voltage;
[0008] S4: Inputting the real part and imaginary part of the voltage predicted by the power flow solver model into the reconstructed power flow model to obtain the active power and reactive power, comparing the obtained active power and reactive power with the actual active power and actual reactive power collected in step S1, and adding the comparison result as a regularization term to the power flow solver model to obtain a trained power flow solver model;
[0009] S5: Generating a plurality of photovoltaic deployment scenarios by Monte Carlo simulation, inputting the actual active power and actual reactive power of each node under all photovoltaic deployment scenarios into the trained power flow solver model, predicting the voltage of each node, and screening and statistically obtaining the maximum access capacity of photovoltaic in the safe domain.
[0010] The method for evaluating the maximum safe access capacity of photovoltaic in a medium-voltage distribution network, in step S1, the real part and the imaginary part of the voltage of each node are represented as:
[0011]
[0012] where i=1,…,n, n is the number of nodes of the distribution network, |v i | is the voltage amplitude at the i-th node, θ i is the voltage phase angle difference between the i-th node and the reference node (distribution network bus joint node), u i and ω i are the real part and the imaginary part of the voltage phasor at the i-th node, respectively.
[0013] The method for evaluating the maximum safe access capacity of photovoltaic in a medium-voltage distribution network, in step S2, the structure of the two-layer neural network includes an input layer, a multiplication layer, and a linear layer:
[0014] The input layer receives the real part and the imaginary part of the voltage of each node;
[0015] The multiplication layer extracts the features of the input data;
[0016] The linear layer performs weighted summation on the output of the multiplication layer to predict the output of the power flow model.
[0017] The method for evaluating the maximum safe access capacity of photovoltaic in a medium-voltage distribution network, step S2, the specific process is as follows:
[0018] The mapping fS1 of the two-layer neural network is represented as fS1(x)=W1δ1(x), where δ1(x) represents the mapping of the input x to the multiplication term, and W1 is the weight matrix of the linear layer; for fS1, the mean square error MSE of the output result is taken as the objective function, and the l1 norm of W1 is added as a regularization term to enhance sparsity:
[0019]
[0020] where L MSE is the mean square error loss function, which is used to measure the error between the predicted value of the model and the true value; is a normalization factor for the number of samples N, which is used to calculate the average error; y n is the true value of the n-th sample; x n represents the n-th sample, that is, the real part and the imaginary part of the n-th node voltage; ||·|| p is the l p norm, and λ1 is a constant;
[0021] The elements corresponding to the node pairs without relationship in W1 are set to 0, and the elements in W1 are constrained according to the symmetry of the admittance matrix, so that the elements corresponding to the node pairs with relationship in W1 are equal, and the elements corresponding to the node pairs without relationship in W1 are equal. i u p and v i v p The elements corresponding to the node pairs without relationship in W1 are equal. i u p and u p u i The elements corresponding to the node pairs without relationship in W1 are equal.
[0022] The evaluation method of the maximum safe access capacity of the medium-voltage distribution network photovoltaic power in the above embodiment, in step S3, the multi-layer perceptron (MLP) based power flow solver model is: a single hidden layer MLP for voltage prediction of an n-node distribution system, the input layer of the power flow solver model includes 2n linear neurons, the hidden layer and the output layer include m and 2n neurons respectively; indexes r, j and k are used to indicate the neurons of the input layer, the hidden layer and the output layer respectively, where r=1, 2, …, 2n, j=1, 2, …, m, and k=1, 2, …, 2n; the result of multiplying the weighted vector by the input vector is added to the bias vector as the input of the transfer function in the forward propagation, and the output of the transfer function is the input of the next layer; each layer has a weighted vector and a bias vector, and in the forward propagation, for the input X=(x1, x2, …, xn), the output of the input layer is calculated as follows: 2n ) T where x 2n is the feature element of the 2n input sample, the feature element includes the actual active power P and the actual reactive power Q, the superscript T represents transposition, the input layer does not use an activation function, and the calculation function f1(x r ) of the rth neuron x r of the input layer is as follows:
[0023] f1(x r )=x r ,r=1,...,2n
[0024] The hidden layer uses a sigmoid activation function, and the calculation of the jth neuron z j of the hidden layer is as follows:
[0025]
[0026]
[0027] wherein, is the weighted vector between the input layer and the hidden layer, is the bias vector between the input layer and the hidden layer, and sigmoid(z j ) is the activation of z j .
[0028] the output of the kth neuron of the output layer k is:
[0029] o k = f1(y k ) = y k , k = 1, 2,..., 2n
[0030]
[0031] where y k is the weighted sum of sigmoid(z j ), is the weight vector between the hidden layer and the output layer, is the bias vector between the hidden layer and the output layer.
[0032] In the above method for evaluating the maximum safe access capacity of photovoltaics in a medium-voltage distribution network, in step S3, the power flow solver model is trained using a standard backpropagation algorithm, and the gradient of the loss function with respect to the weights and biases is calculated layer by layer through the chain rule. The core process includes: first, calculate the gradient of the loss with respect to the activation values from the output layer, and combine the derivative of the activation function to obtain the error term; then, propagate the error back through the weight matrix to the hidden layer, while calculating the gradient of the weights and biases of each layer; finally, update the weights and biases of the model according to the learning rate using gradient descent, so as to minimize the loss function E:
[0033]
[0034] where E is the root mean square error corresponding to the input x, d k is the expected output of the neuron k of the output layer corresponding to o k .
[0035] In the above method for evaluating the maximum safe access capacity of photovoltaics in a medium-voltage distribution network, in step S3, during the training process of the power flow solver model, Gaussian noise is added to the input data, and the expression of the noise input is as follows:
[0036] s (n) = x (n) + d
[0037] where x (n) is the training input data without error, s (n) is the input data with error, and d is a random variable.
[0038] In the above-mentioned method for assessing the maximum safe access capacity of photovoltaic power in medium-voltage distribution networks, step S4 introduces a regularizer through multi-task learning. Inspired by supervised autoencoders, the regularizer consists of two parts: an encoder and a decoder, which focus on the inverse problem and the forward problem, respectively: power flow solution and power flow modeling. The encoder part is a noise-injection-based MLP, which focuses on solving the power flow problem by learning the mapping from power flow input to bus voltage, and introduces random noise to ensure the network's resistance to noise.
[0039] The decoder part is a neural network that performs auxiliary tasks, namely reconstructing the power flow model, mapping the bus voltage to power injection, and the decoder output is y. PQ :
[0040] y PQ =f de (y uω W de b de )
[0041] In the formula f de To compute the function, y uω W is the output of the MLP encoder. de b is the weighted vector between the encoder and decoder in the computation function. de The weighted bias vector between the encoder and decoder;
[0042] The total loss function is a weighted sum of the voltage prediction loss generated by the encoder and the power reconstruction loss generated by the decoder, let Δμω=[μ;ω]-y μω ΔPQ=[P;Q]-y PQ Where Δμω is the voltage prediction loss, [μ;ω] is the actual voltage, and y μω The voltage generated by the encoder, ΔPQ is the power reconstruction loss, and y PQ The power generated by the decoder, the total loss E of a single training sample 总 for:
[0043] E 总 =α MLP ζ(Δuω)+α SNN ζ(ΔPQ)
[0044] In the formula, ξ() represents the mean square error function, α MLP It is the weight of the supervised loss, α SNN It is the weight of the unsupervised loss, α MLP and α SNN These are the hyperparameters for the balanced encoder and decoder, respectively.
[0045] The evaluation method of the maximum safe access capacity of the photovoltaic in the medium-voltage distribution network, in step S4, the power flow solver model is trained to find the parameters that minimize the total loss function; when the power flow solver model is trained, the error of the voltage prediction layer is:
[0046]
[0047] The first term Δuω points the learning process of the MLP encoder to the parameters that are effective for minimizing the total bus voltage prediction error, and the second term guides the learning algorithm to prefer parameters that produce small power mismatches in the effective parameters that produce voltage estimates.
[0048] The evaluation method of the maximum safe access capacity of the photovoltaic in the medium-voltage distribution network, in step S5, the process of screening and statistically obtaining the maximum access capacity of the photovoltaic in the safe domain is: judging whether the predicted node voltage is within the set voltage safe domain range, if it is within the safe domain range, increasing the amount of photovoltaic deployed by randomly generating the photovoltaic scene, if it is not within the set voltage safe domain, saving the total value of the photovoltaic of the previous scheme, and outputting the maximum result when the total number of photovoltaic deployment schemes is reached.
[0049] The present application has the beneficial effects that: a hybrid regularization MLP power flow solver model based on physical consistency is constructed to replace the traditional physical model, the distribution network with uncertain topology parameters is processed, and the generalization ability and adaptability of the evaluation system are improved. The noise injection technology is adopted to enhance the resistance of the model to noise and uncertainty, and the generalization ability and robustness are improved. BRIEF DESCRIPTION OF DRAWINGS
[0050] Figure 1 The overall flowchart of the present application. DETAILED DESCRIPTION
[0051] The present application will be further described below in combination with the drawings and examples.
[0052] As Figure 1 shown, an evaluation method of the maximum safe access capacity of photovoltaic in a medium-voltage distribution network includes the following steps:
[0053] S1: Collect the voltage, phase angle, actual active power and actual reactive power of each node in the actual distribution area, and calculate the real part and imaginary part of each node voltage.
[0054] The real part and imaginary part of each node voltage are represented as:
[0055]
[0056] In the formula, i=1,…,n, n is the number of nodes of the distribution network, |v i | is the voltage amplitude at the i-th node, and θi a voltage phase angle difference between the ith node and the reference node (a distribution network bus junction), u i and ω i are the real and imaginary parts of the voltage phasor at the ith node, respectively.
[0057] S2: taking the real and imaginary parts of the voltage of each node as the input of a two-layer neural network, pre-training the two-layer neural network, initializing the weight matrix according to the sparsity and symmetry of the admittance matrix, and setting physical constraints to obtain a reconstructed power flow model.
[0058] The structure of the two-layer neural network includes an input layer, a multiplication layer and a linear layer:
[0059] The input layer receives the real and imaginary parts of the voltage of each node;
[0060] The multiplication layer extracts features of the input data;
[0061] The linear layer performs weighted summation on the output of the multiplication layer to predict the output of the power flow model.
[0062] The specific process of step S2 is as follows:
[0063] The mapping fS1 of the two-layer neural network is expressed as fS1(x) = W1δ1(x), where δ1(x) represents the mapping of the input x to the multiplication term, and W1 is the weight matrix of the linear layer; for fS1, the mean square error MSE of the output result is taken as the objective function, and the l1 norm of W1 is added as a regularization term to enhance sparsity:
[0064]
[0065] In the formula, L MSE is the mean square error loss function, which is used to measure the error between the predicted value of the model and the true value; is a normalization factor for the sample number N, which is used to calculate the average error; y n is the true value of the nth sample; x n represents the nth sample, that is, the real and imaginary parts of the voltage of the nth node; ||·|| p is the l p norm, and λ1 is a constant;
[0066] The two-layer neural network is pre-trained, the elements corresponding to the nodes without relationship in W1 are set to 0, and the elements in W1 are constrained according to the symmetry of the admittance matrix, so that u i u p and v i v p corresponding elements in W1 are equal, u i u pWith u p u i The corresponding elements in W1 are equal.
[0067] S3: Establish a power flow solver model based on multi-layer perceptron (MLP), input the active power and reactive power of each node to predict the real part and imaginary part of the voltage.
[0068] The power flow solver model based on multi-layer perceptron (MLP) is: a single hidden layer MLP for voltage prediction of an n-node distribution system, the input layer of the power flow solver model contains 2n linear neurons, the hidden layer and the output layer contain m and 2n neurons respectively; indexes r, j and k are used to indicate the neurons of the input layer, the hidden layer and the output layer respectively, where r = 1, 2, …, 2n, j = 1, 2, …, m, k = 1, 2, …, 2n; the result of multiplying the weighted vector by the input vector is added to the bias vector as the input of the transfer function in forward propagation, and the output of the transfer function is the input of the next layer; each layer has a weighted vector and a bias vector, in forward propagation, for input X = (x1, x2, …, xn), the output of the input layer is calculated as follows: 2n ) T where x 2n is the feature element of the 2n input sample, the feature element includes the actual active power P and the actual reactive power Q, the superscript T represents transposition, the input layer does not use an activation function, and the calculation function f1(x r ) of the rth neuron x r of the input layer is as follows:
[0069] f1(x r ) = x r , r = 1, …, 2n
[0070] The hidden layer uses a sigmoid activation function, and the calculation of the jth neuron z j of the hidden layer is as follows:
[0071]
[0072] wherein, is the weighted vector between the input layer and the hidden layer, is the bias vector between the input layer and the hidden layer, and sigmoid(z j ) is the activation of z j ;
[0073] The output o k of the kth neuron of the output layer is:
[0074] o k = f1(y k ) = y k , k = 1, 2, …, 2n
[0075]
[0076] where y k is the weighted sum of sigmoid(z j ), is the weight vector between the hidden layer and the output layer, is the bias vector between the hidden layer and the output layer.
[0077] The power flow solver model is trained using the standard backpropagation algorithm, which calculates the gradient of the loss function with respect to the weights and biases layer by layer through the chain rule. The core process includes: first, calculate the gradient of the loss with respect to the activation values from the output layer, and combine the derivative of the activation function to get the error term; then, propagate the error back through the weight matrix to the hidden layer, while calculating the gradient of each layer weight and bias; finally, update the model's weights and biases according to the learning rate using gradient descent, so as to minimize the loss function E:
[0078]
[0079] where E is the root mean square error corresponding to the input x, d k is the expected output of neuron k in the output layer corresponding to o k .
[0080] During the training process of the power flow solver model, Gaussian noise is added to the input data, and the expression of the noisy input is as follows:
[0081] s (n) = x (n) + d
[0082] where x (n) is the training input data without error, s (n) is the input data with error, and d is a random variable.
[0083] S4: input the real and imaginary parts of the voltage predicted by the power flow solver model into the reconstructed power flow model to obtain the active power and reactive power, compare the obtained active power and reactive power with the actual active power and actual reactive power collected in step S1, and add the comparison results as regularization terms to the power flow solver model to obtain the trained power flow solver model.
[0084] In step S4, a regularizer is introduced by multi-task learning, which is inspired by supervised autoencoder and consists of two parts, encoder and decoder, focusing on inverse and direct problems respectively: power flow solving and power flow modeling; the encoder part is a noise-injected MLP, focusing on solving power flow problem by learning the mapping from power flow input to bus voltage, and ensuring the network's resistance to noise by introducing random noise;
[0085] The decoder part is a neural network that performs auxiliary tasks, i.e., reconstructing the power flow model, mapping bus voltage to power injection, and the decoder output is y PQ :
[0086] y PQ =f de (y uω ;W de ,b de )
[0087] where f de is a computational function, y uω is the output of the MLP encoder, W de is the weighted vector between the encoder and the decoder in the computational function, and b de is the weighted vector bias vector between the encoder and the decoder.
[0088] The total loss function is the weighted sum of the voltage prediction loss generated by the encoder and the power reconstruction loss generated by the decoder, let Δμω=[μ;ω]-y μω , ΔPQ=[P;Q]-y PQ , where Δμωis the voltage prediction loss, [μ;ω] is the actual voltage, y μω is the voltage generated by the encoder, ΔPQis the power reconstruction loss, y PQ is the power generated by the decoder, and the total loss E 总 of a single training sample is:
[0089] E 总 =α MLP ζ(Δuω)+α SNN ζ(ΔPQ)
[0090] where ξ() represents the mean square error function, α MLP is the weight of the supervised loss (voltage prediction error), α SNN is the weight of the unsupervised loss (power reconstruction error), and α MLP and α SNN are hyperparameters that balance the encoder and decoder parts respectively.
[0091] training the power flow solver model to find parameters that minimize the total loss function; when training the power flow solver model, the error of the voltage prediction layer is:
[0092]
[0093] where the first term Auωpoints the learning process of the MLP encoder towards parameters that are effective in minimizing the total line voltage prediction error, which is the main training objective, however, training the MLP only based on the supervised loss is an under-constrained problem and will find parameters that overfit the data and do not generalize well. The second term guides the learning algorithm to prioritize parameters that produce small power mismatches in the effective parameters that produce voltage estimates. In this way, the combination of these two types of losses generates a power flow solver that is physically consistent.
[0094] S5: generating multiple photovoltaic deployment scenarios by Monte Carlo simulation method, inputting the actual active power and actual reactive power of each node under all photovoltaic deployment scenarios into the trained power flow solver model, predicting the voltage of each node, and screening and statistically obtaining the maximum access capacity of photovoltaic within the safety domain.
[0095] The process of screening and statistically obtaining the maximum access capacity of photovoltaic within the safety domain is: judging whether the predicted voltage of each node is within the set voltage safety domain range, if it is within the safety domain range, increasing the amount of photovoltaic deployed in the randomly generated photovoltaic scenario, if it is not within the set voltage safety domain, saving the total value of photovoltaic of the previous scheme, when the total number of photovoltaic deployment schemes is reached, outputting the maximum result.
Claims
1. A method for assessing the maximum safe access capacity of photovoltaic power in a medium-voltage distribution network, characterized in that, Includes the following steps: S1: Collect the voltage, phase angle, actual active power and actual reactive power of each node in the actual distribution area, and calculate the real part and imaginary part of the voltage of each node. S2: The real and imaginary parts of the voltage at each node are used as inputs to a two-layer neural network. The two-layer neural network is pre-trained, and the sparsity and symmetry of the admittance matrix are used to initialize the weight matrix. Physical constraints are set to obtain the reconstructed power flow model. S3: Establish a power flow solver model based on multilayer perceptron (MLP), and input the active power and reactive power of each node to predict the real and imaginary parts of the voltage. S4: Input the real and imaginary parts of the voltage predicted by the power flow solver model into the reconstructed power flow model to obtain active power and reactive power. Compare the obtained active power and reactive power with the actual active power and actual reactive power collected in step S1, and add the comparison result as a regularization term to the power flow solver model to obtain the trained power flow solver model. S5: Generate multiple photovoltaic deployment scenarios using the Monte Carlo simulation method, input the actual active power and actual reactive power of each node in all photovoltaic deployment scenarios into the trained power flow solver model, predict the voltage of each node, and filter and statistically obtain the maximum allowable capacity of photovoltaics within the safe domain.
2. The method for assessing the maximum safe access capacity of photovoltaic power in medium-voltage distribution networks according to claim 1, characterized in that, In step S1, the real and imaginary parts of the voltage at each node are expressed as follows: In the formula, i = 1, ..., n, where n is the number of nodes in the distribution network, |v i | is the voltage magnitude at the i-th node, θ i It is the voltage phase angle difference between the i-th node and the reference node, u i and ω i These are the real and imaginary parts of the voltage phasor at the i-th node, respectively.
3. The method for assessing the maximum safe access capacity of photovoltaic power in medium-voltage distribution networks according to claim 2, characterized in that, In step S2, the structure of the two-layer neural network includes an input layer, a multiplication layer, and a linear layer: Input layer: Receives the real and imaginary parts of the voltage data of each node; Multiplication layer: Extracts features from input data; Linear layer: The output of the multiplication layer is weighted and summed to predict the output of the power flow model.
4. The method for evaluating the maximum safe access capacity of photovoltaic power in medium-voltage distribution networks according to claim 2, characterized in that, The specific process of step S2 is as follows: The mapping fS1 of the two-layer neural network is represented as fS1(x) = W1δ1(x), where δ1(x) represents the mapping from the input x to the multiplication term, and W1 is the weight matrix of the linear layer. For fS1, the mean squared error (MSE) of the output is used as the objective function, and the l1 norm of W1 is added as a regularization term to enhance sparsity. In the formula L MSE It is the mean squared error loss function, used to measure the error between the model's predicted value and the true value; This represents the normalization factor with respect to the sample size N, used to calculate the average error; y n It is the true value of the nth sample; x n This represents the real and imaginary parts of the voltage at the nth sample, which is also the nth node; ||·|| p It is l p Norm, where λ1 is a positive constant; The two-layer neural network is pre-trained. Elements corresponding to unrelated nodes in W1 are set to 0. Then, the elements in W1 are constrained based on the symmetry of the admittance matrix, such that u i u p With v i v p The corresponding elements in W1 are equal, u i u p with u p u i The corresponding elements in W1 are equal.
5. The method for evaluating the maximum safe access capacity of photovoltaic power in medium-voltage distribution networks according to claim 4, characterized in that, In step S3, the power flow solver model based on a multilayer perceptron (MLP) is a single hidden layer MLP for voltage prediction of an n-node distribution system. The input layer of the power flow solver model contains 2n linear neurons, and the hidden and output layers contain m and 2n neurons, respectively. Indices r, j, and k are used to indicate the neurons in the input, hidden, and output layers, respectively, where r = 1, 2, ..., 2n, j = 1, 2, ..., m, and k = 1, 2, ..., 2n. Forward propagation adds the result of multiplying the weighted vector with the input vector to the bias vector, which serves as the input to the transfer function. The output of the transfer function becomes the input to the next layer. Each layer has a weighted vector and a bias vector. In forward propagation, for the input X = (x1, x2, ..., x...), ... 2n ) T When, where x 2n Let be the feature element of the 2nth input sample. This includes actual active power P and actual reactive power Q. The superscript T indicates transpose. The input layer does not use an activation function. The r-th neuron in the input layer is x. r The computation function f1(x) r )as follows: f1(x r )=x r ,r=1,...,2n The hidden layer uses the sigmoid activation function, and the j-th neuron z in the hidden layer... j The calculation is as follows: In the formula, It is a weighted vector between the input layer and the hidden layer. The bias vector between the input layer and the hidden layer is sigmoid(z). j ) is for z j Activation; The output o of the k-th neuron in the output layer k for: o k =f1(y k )=y k ,k=1,2,...,2n In the formula, y k For sigmoid(z j The weighted sum of ) It is a weighted vector between the hidden layer and the output layer. This is the bias vector between the hidden layer and the output layer.
6. The method for assessing the maximum safe access capacity of photovoltaic power in medium-voltage distribution networks according to claim 5, characterized in that, In step S3, the power flow solver model is trained using the standard backpropagation algorithm. The gradient of the loss function with respect to the weights and biases is calculated layer by layer using the chain rule. The core process includes: first, calculating the gradient of the loss with respect to the activation values from the output layer, and then obtaining the error term by combining the derivative of the activation function; then, backpropagating the error layer by layer through the weight matrix to the hidden layers, while simultaneously calculating the gradient of the weights and biases at each layer; finally, using gradient descent to update the model's weights and biases according to the learning rate, thereby minimizing the loss function E. In the formula, E is the root mean square error corresponding to the input x, and d k It corresponds to o k The expected output of neuron k in the output layer.
7. The method for evaluating the maximum safe access capacity of photovoltaic power in medium-voltage distribution networks according to claim 6, characterized in that, In step S3, during the training of the power flow solver model, Gaussian noise is added to the input data. The expression for the noise input is as follows: s (n) =x (n) +d In the formula, x (n) For training input data with no error, s (n) Given input data with errors, d is a random variable.
8. The method for assessing the maximum safe access capacity of photovoltaic power in medium-voltage distribution networks according to claim 7, characterized in that, In step S4, a regularizer is introduced through multi-task learning. Inspired by supervised autoencoders, the regularizer consists of two parts: an encoder and a decoder, which focus on the inverse problem and the forward problem, respectively: power flow solution and power flow modeling. The encoder part is a noise-injection-based MLP that focuses on solving the power flow problem by learning the mapping from the power flow input to the bus voltage, and introduces random noise to ensure the network's resistance to noise. The decoder part is a neural network that performs auxiliary tasks, namely reconstructing the power flow model, mapping the bus voltage to power injection, and the decoder output is y. PQ : y PQ =f de (y uω ;W de ,b de ) In the formula f de For the calculation function, y uω W is the output of the MLP encoder. de b is the weighted vector between the encoder and decoder in the computation function. de The weighted bias vector between the encoder and decoder; The total loss function is a weighted sum of the voltage prediction loss generated by the encoder and the power reconstruction loss generated by the decoder, let Δμω=[μ;ω]-y μω ΔPQ=[P;Q]-y PQ Where Δμω is the voltage prediction loss, [μ;ω] is the actual voltage, and y μω The voltage generated by the encoder, ΔPQ is the power reconstruction loss, and y PQ The power generated by the decoder, the total loss E of a single training sample 总 for: E 总 =a MLP g(Duω)+a SNN g(ΔPQ) In the formula, ξ() represents the mean square error function, α MLP It is the weight of the supervised loss, α SNN It is the weight of the unsupervised loss, α MLP and α SNN These are the hyperparameters for the balanced encoder and decoder, respectively.
9. The method for evaluating the maximum safe access capacity of photovoltaic power in medium-voltage distribution networks according to claim 8, characterized in that, In step S4, the power flow solver model is trained to find parameters that minimize the total loss function; when training the power flow solver model, the error of the voltage prediction layer is: The first term Δuω in the formula directs the learning process of the MLP encoder toward parameters that are effective in minimizing bus voltage prediction error, while the second term... Under the guidance of this algorithm, among the effective parameters for generating voltage estimates, the learning algorithm prioritizes parameters that produce small power mismatches.
10. The method for evaluating the maximum safe access capacity of photovoltaic power in medium-voltage distribution networks according to claim 9, characterized in that, In step S5, the process of filtering and statistically obtaining the maximum allowable capacity of photovoltaics within the safety domain is as follows: determine whether the predicted voltage of each node is within the set voltage safety domain. If it is within the safety domain, increase the amount of photovoltaics deployed in the randomly generated photovoltaic scenario. If it is not within the set voltage safety domain, save the total photovoltaic value of the previous scheme. When the total number of photovoltaic deployment schemes is reached, output the maximum result.