A method for automatic correction of comprehensive load model parameters based on neural network
Through the neural network-based method, the comprehensive load model parameters are automatically corrected, which solves the problem of inefficiency in the existing technology that relies on manual experience, and realizes efficient load model parameter correction, meets the requirements of large-scale power grid analysis and calculation, and improves the safety and stability of power grid operation.
Patent Information
- Application Number
- CN202411676697.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2044-11-22
AI Technical Summary
The existing load model correction method relies on manual experience and is inefficient, making it difficult to meet the strict requirements of large-scale grid analysis and calculations for load models, and lacks effective verification methods, which affects the safety and stability of power grid operation.
The automatic correction method of comprehensive load model parameters based on neural network is adopted. By obtaining fault recording data and simulated system status data, the Simpsons integral area difference of transient voltage is calculated, and the change response relationship between load parameters and area difference is established. The neural network is optimized by using the Levenberg-Marquardt algorithm, and the load model parameters are automatically corrected in combination with the sequential quadratic planning algorithm.
Automatic correction of load model parameters is realized, and it does not rely on manual experience, improves parameter correction efficiency, can meet the strict requirements for load model in large-scale grid analysis and calculation, and improves the safety and stability of grid operation.
Smart Images

Figure CN119180220B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power systems, and in particular to a method for automatically correcting parameters of a comprehensive load model based on a neural network. Background Art
[0002] With the rapid expansion of distributed generation, traditional load models are no longer keeping pace with the times. There is an urgent need to develop next-generation load models that adapt to the development of new power systems. This new demand stems from significant changes in the power system operating environment. The limitations of traditional models are becoming increasingly prominent, and they are unable to fully reflect the complex characteristics of current power loads. However, the accuracy of the new-generation load models still faces the challenge of insufficient verification methods. Due to the lack of effective verification methods, the reliability and accuracy of the models are difficult to guarantee. This issue may affect the safety and stability of power grid operations in practical applications. Therefore, developing and improving verification methods for the new-generation load models is a key focus of current research and application.
[0003] Currently, there are three main methods for load model correction: statistical synthesis, overall measurement, and fault fitting. The basic idea of the statistical synthesis method is to treat the load connected to the substation bus node as a collection of multiple power users, each of which is also a collection of various types of power load devices. The basic idea of the overall measurement method is to treat the overall load as a black box. After determining the load model structure, it combines collected dynamic measurement data with optimization algorithms for identification to obtain load model parameters. The fault fitting method adjusts the load model parameters in the simulation system to fit the actual system fault condition until a simulation curve that closely matches the actual fault curve is obtained, corresponding to the optimal load model parameters. However, in practice, traditional fault fitting methods mainly rely on manual parameter adjustment and manually modifying the load parameters to calculate the system's dynamic response to achieve the desired fit. However, this method has a relatively narrow objective, and parameter adjustment and fitting evaluation rely on manual experience. This is not only inefficient, but the resulting model cannot meet the stringent load model requirements for large-scale power grid analysis and calculations.
[0004] Therefore, it is necessary to design an automatic correction method for comprehensive load model parameters based on neural networks. Summary of the Invention
[0005] The purpose of the present invention is to solve at least one of the technical problems existing in the prior art and to provide a method for automatically correcting parameters of a comprehensive load model based on a neural network.
[0006] To achieve the above object, the present invention adopts the following technical solution: a method for automatically correcting parameters of a comprehensive load model based on a neural network, comprising the following steps:
[0007] Step 1: Acquire actual fault recording data of the integrated load system to extract the actual value of the transient voltage;
[0008] Step 2, simulating system state data of the comprehensive load model when parameters change, and extracting simulation values of transient voltages;
[0009] Step 3: Based on the Simpson 1 / 3 rule, calculate the Simpson integral area difference between the simulated transient voltage change curve and the original fault recording transient voltage change curve, and construct a data set;
[0010] Step 4: Based on the neural network optimized by the Levenberg-Marquardt algorithm, a change response relationship between the load parameter and the area difference is established;
[0011] Step 5: Establish a normalized error function through the trained neural network;
[0012] Step 6: Based on the error function, the sequential quadratic programming algorithm is used to minimize the Simpson integral area difference to obtain the inverse normalized comprehensive load model parameters.
[0013] Furthermore, in step 1, the transient voltage value of the busbar every 0.01s after the fault occurs is extracted from the fault recording data. , as the original fault recording transient voltage change curve.
[0014] Furthermore, in said step 2, it specifically includes:
[0015] The parameters for selecting the comprehensive load model include:
[0016] XL={x1,x2,x3,x4,x5,x6,x7}={stator resistance, stator reactance, magnetizing reactance, rotor resistance, rotor reactance, inertia time constant, initial active load factor};
[0017] The parameter values of the integrated load model are gradually modified in the form of ±20% of the original parameter value, so as to obtain the transient voltage change curve of the node when the system fails under different conditions of integrated load model parameter changes.
[0018] Furthermore, in step 3, the following steps are specifically included:
[0019] Step 3.1, assuming that the transient voltage change curve under the condition of comprehensive load model parameter change is , the original fault recording transient voltage change curve is ; Calculate each The difference between the points gives the difference curve:
[0020] (1);
[0021] Step 3.2, As a new curve, Perform integration; assuming there is points ,in is an even number, so that the number of points is odd, and the difference corresponding to each point is ; Then the formula for calculating the area difference between the two curves using Simpson's 1 / 3 rule is:
[0022] (2);
[0023] in, In each The difference between the two curves in position; is the distance between adjacent points;
[0024] In step 3.3, based on the comprehensive load model parameters in step 2, randomly change these load parameters in the simulation software as the input of the neural network. The Simpson integral area difference between the corresponding transient voltage change curve and the original fault recording transient voltage change curve is used as the output of the neural network. Construct a data set, and take 80% as the training set and 20% as the test set.
[0025] Furthermore, the step 4 specifically includes the following steps:
[0026] Step 4.1, create an initialized neural network, including input layer, hidden layer and output layer;
[0027] In step 4.2, the number of input neurons in the input layer is the number of comprehensive load model parameters selected in step 2, and the number of neurons in the hidden layer is set to , the output layer is the Simpson integral area difference between the simulation value and the actual value corresponding to step 3, and the number of neurons is set to 1;
[0028] Step 4.3, assuming the input vector is , the output of the hidden layer Calculated as follows:
[0029] (3);
[0030] Where, The input layer neurons to the hidden layer The weight of a neuron, The hidden layer The bias of a neuron, is the activation function;
[0031] Step 4.4, output of the output layer Calculated by the following formula:
[0032] (4);
[0033] Where, is the weight from the hidden layer to the output layer, is the bias of the output layer;
[0034] Step 4.5, use mean square error Measuring the output of a neural network Simpson area difference with the training set the differences between;
[0035] Step 4.6, calculate the partial derivatives of the output layer weights and biases, first the mean square error with respect to the weights and bias The partial derivatives are:
[0036] (5);
[0037] (6);
[0038] Where, ; is the derivative of the activation function;
[0039] Step 4.7, calculate the mean square error of the weight and bias Partial derivatives of :
[0040] (7);
[0041] (8);
[0042] Step 4.8, starting from the output layer, calculate the partial derivatives of the error with respect to each parameter layer by layer through step 4.7, and use these partial derivatives to update the weights and biases; the Levenberg-Marquardt algorithm combines the gradient descent method and the Gauss-Newton method. The Levenberg-Marquardt algorithm optimizes the weight and bias updates of the neural network according to the following formula:
[0043] (9);
[0044] Where, is the update amount for weights and biases, is the Jacobian matrix, which represents the partial derivative of each neural network parameter, is the transpose of the Jacobian matrix, is the adjustment parameter, is the identity matrix; is the error vector, which represents the difference between the actual output and the network output;
[0045] Step 4.9, if the current iteration reduces the error, then reduce The value of is closer to the Gauss-Newton method. If the current iteration increases the error, increase The value is closer to the gradient descent method; it is adjusted repeatedly in the iteration until the mean square error When a preset minimum value is reached, the operation ends;
[0046] Step 4.10, evaluate the trained neural network model using the coefficient of determination and mean square error. The coefficient of determination is denoted as , which is defined as:
[0047] (10);
[0048] is the residual sum of squares, which represents the sum of squares of the differences between the model's predicted values and the actual values: ,here is the Simpson area difference in the test set, is the Simpson area difference of the neural network output;
[0049] is the total sum of squares, which represents the sum of squares of the differences between the actual values and the mean: ,here is the average of the Simpson area differences output by the neural network.
[0050] Furthermore, the step 5 specifically includes the following steps:
[0051] Step 5.1: Before establishing the error function, normalize the input and output parameters. Assume that the input parameter vector is , the minimum and maximum values of each feature are and , use the following formula to normalize the input feature vector to scope:
[0052] (11);
[0053] Step 5.2, determine the output of the network based on the weights and biases of the neural network trained in step 4:
[0054] (12);
[0055] in, It is The weight matrix of the layer, It is The bias vector of the layer; is the activation function; is the number of layers in the network;
[0056] Step 5.4, by adjusting the input vector , so that the Simpson area difference of the output of the neural network is as close to 0 as possible, and define the error function :
[0057] (13).
[0058] Furthermore, the step 6 specifically includes the following steps:
[0059] Step 6.1, based on the error function in step 5, define the optimization objective as ;in, is the input parameter vector, and the goal is to minimize the Simpson area difference of the neural network output to find the optimal input parameters;
[0060] Step 6.2, input parameters The uniform initialization value is 0.5;
[0061] Step 6.3, in each iteration, based on the current parameters , for the error function Perform Taylor expansion and take its quadratic approximation:
[0062] (14);
[0063] in, The objective function is The gradient vector at The objective function is The Hessian matrix of or its approximation;
[0064] Step 6.4, in the sequential quadratic programming algorithm, in order to find the optimal step vector , we need to solve the following quadratic programming problem:
[0065] (15);
[0066] Solution is the direction and step size that should be moved at the current iteration point;
[0067] Step 6.5, set the step size The boundary constraints are:
[0068] (16);
[0069] Step 6.6, construct the Lagrangian function:
[0070] (17);
[0071] in, and is the Lagrange multiplier;
[0072] Step 6.7, for the Lagrangian function about , , Taking the derivative and setting it to zero, we can get the following conditions:
[0073] about The first-order conditions are:
[0074] (18);
[0075] Feasibility conditions for constraints:
[0076] (19);
[0077] Regarding the satisfaction of the boundary constraints of step size d:
[0078] (20);
[0079] Solving for optimal conditions , get the next iteration point :
[0080] (twenty one);
[0081] Step 6.8, verify the current solution Whether the convergence criterion is met; the convergence criterion is the tolerance of the objective function value , that is, the change in parameter updates between two adjacent iterations; the default value is , the maximum number of function evaluations , the default is 5000 times;
[0082] In step 6.9, when the convergence criterion is met, the evaluation ends and the normalized input parameters are converted back to the original scale. The denormalization formula is defined as:
[0083] (twenty two);
[0084] in, is the original scale value of the optimized input parameter vector after denormalization.
[0085] As can be seen from the above description of the present invention, compared to the prior art, the present invention's method for automatically correcting integrated load model parameters extracts simulated values of transient voltages when simulated parameters of the integrated load model change, deriving the Simpson integral area difference between the simulated values and the actual values of the load system; establishes a change-response relationship using a neural network based on the Levenberg-Marquardt algorithm; establishes a normalized error function using the trained neural network; and, based on a sequential quadratic programming algorithm with the goal of minimizing the deviation, calculates the denormalized integrated load model parameters. By automatically correcting integrated load model parameters, the present invention does not rely on manual experience, offers high parameter correction efficiency, and can meet the stringent requirements for integrated load models in large-scale power grid analysis and calculations. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] Figure 1 The present invention is a flowchart of a method for automatically correcting parameters of a comprehensive load model based on a neural network in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0087] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of the present invention.
[0088] Reference Figure 1 As shown, a preferred embodiment of the present invention is a method for automatically correcting parameters of a comprehensive load model based on a neural network, comprising the following steps:
[0089] Step 1: Acquire actual fault recording data of the integrated load system to extract the actual value of the transient voltage;
[0090] Step 2, simulating system state data of the comprehensive load model when parameters change, and extracting simulation values of transient voltages;
[0091] Step 3: Based on the Simpson 1 / 3 rule, calculate the Simpson integral area difference between the simulated transient voltage change curve and the original fault recording transient voltage change curve, and construct a data set;
[0092] Step 4: Based on the neural network optimized by the Levenberg-Marquardt algorithm, a change response relationship between the load parameter and the area difference is established;
[0093] Step 5: Establish a normalized error function through the trained neural network;
[0094] Step 6: Based on the error function, the sequential quadratic programming algorithm is used to minimize the Simpson integral area difference to obtain the inverse normalized comprehensive load model parameters.
[0095] As a preferred embodiment of the present invention, it may also have the following additional technical features:
[0096] In this embodiment, in step 1, the transient voltage value of the busbar every 0.01s after the fault occurs is extracted from the fault recording data. , as the original fault recording transient voltage change curve.
[0097] In this embodiment, step 2 specifically includes:
[0098] The parameters for selecting the comprehensive load model include:
[0099] XL={x1,x2,x3,x4,x5,x6,x7}={stator resistance, stator reactance, magnetizing reactance, rotor resistance, rotor reactance, inertia time constant, initial active load factor};
[0100] The parameter values of the integrated load model are gradually modified in the form of ±20% of the original parameter value, so as to obtain the transient voltage change curve of the node when the system fails under different conditions of integrated load model parameter changes.
[0101] In this embodiment, step 3 specifically includes:
[0102] Step 3.1, assuming that the transient voltage change curve under the condition of comprehensive load model parameter change is , the original fault recording transient voltage change curve is ; Calculate each The difference between the points gives the difference curve:
[0103] (1);
[0104] Step 3.2, As a new curve, Perform integration; assuming there is points ,in is an even number, so that the number of points is odd, and the difference corresponding to each point is ; Then the formula for calculating the area difference between the two curves using Simpson's 1 / 3 rule is:
[0105] (2);
[0106] in, In each The difference between the two curves in position; is the distance between adjacent points;
[0107] In step 3.3, based on the comprehensive load model parameters in step 2, randomly change these load parameters in the simulation software as the input of the neural network. The Simpson integral area difference between the corresponding transient voltage change curve and the original fault recording transient voltage change curve is used as the output of the neural network. Construct a data set, and take 80% as the training set and 20% as the test set.
[0108] In this embodiment, step 4 specifically includes the following steps:
[0109] Step 4.1, create an initialized neural network, including input layer, hidden layer and output layer;
[0110] In step 4.2, the number of input neurons in the input layer is the number of comprehensive load model parameters selected in step 2, and the number of neurons in the hidden layer is set to , the output layer is the Simpson integral area difference between the simulation value and the actual value corresponding to step 3, and the number of neurons is set to 1;
[0111] Step 4.3, assuming the input vector is , the output of the hidden layer Calculated as follows:
[0112] (3);
[0113] Where, The input layer neurons to the hidden layer The weight of a neuron, The hidden layer The bias of a neuron, is the activation function;
[0114] Step 4.4, output of the output layer Calculated by the following formula:
[0115] (4);
[0116] Where, is the weight from the hidden layer to the output layer, is the bias of the output layer;
[0117] Step 4.5, use mean square error Measuring the output of a neural network Simpson area difference with the training set the differences between;
[0118] Step 4.6, calculate the partial derivatives of the output layer weights and biases, first the mean square error with respect to the weights and bias The partial derivatives are:
[0119] (5);
[0120] (6);
[0121] Where, ; is the derivative of the activation function;
[0122] Step 4.7, calculate the mean square error of the weight and bias Partial derivatives of :
[0123] (7);
[0124] (8);
[0125] Step 4.8, starting from the output layer, calculate the partial derivatives of the error with respect to each parameter layer by layer through step 4.7, and use these partial derivatives to update the weights and biases; the Levenberg-Marquardt algorithm combines the gradient descent method and the Gauss-Newton method. The Levenberg-Marquardt algorithm optimizes the weight and bias updates of the neural network according to the following formula:
[0126] (9);
[0127] Where, is the update amount for weights and biases, is the Jacobian matrix, which represents the partial derivative of each neural network parameter, is the transpose of the Jacobian matrix, is the adjustment parameter, is the identity matrix; is the error vector, which represents the difference between the actual output and the network output;
[0128] Step 4.9, if the current iteration reduces the error, then reduce The value of is closer to the Gauss-Newton method. If the current iteration increases the error, increase The value is closer to the gradient descent method; it is adjusted repeatedly in the iteration until the mean square error When a preset minimum value is reached, the operation ends;
[0129] Step 4.10, evaluate the trained neural network model using the coefficient of determination and mean square error. The coefficient of determination is denoted as , which is defined as:
[0130] (10);
[0131] is the residual sum of squares, which represents the sum of squares of the differences between the model's predicted values and the actual values: ,here is the Simpson area difference in the test set, is the Simpson area difference of the neural network output;
[0132] is the total sum of squares, which represents the sum of squares of the differences between the actual values and the mean: ,here is the average of the Simpson area differences output by the neural network.
[0133] In this embodiment, step 5 specifically includes the following steps:
[0134] Step 5.1: Before establishing the error function, normalize the input and output parameters. Assume that the input parameter vector is , the minimum and maximum values of each feature are and , use the following formula to normalize the input feature vector to scope:
[0135] (11);
[0136] Step 5.2, determine the output of the network based on the weights and biases of the neural network trained in step 4:
[0137] (12);
[0138] in, It is The weight matrix of the layer, It is The bias vector of the layer; is the activation function; is the number of layers in the network;
[0139] Step 5.4, by adjusting the input vector , so that the Simpson area difference of the output of the neural network is as close to 0 as possible, and define the error function :
[0140] (13).
[0141] In this embodiment, step 6 specifically includes the following steps:
[0142] Step 6.1, based on the error function in step 5, define the optimization objective as ;in, is the input parameter vector, and the goal is to minimize the Simpson area difference of the neural network output to find the optimal input parameters;
[0143] Step 6.2, input parameters The uniform initialization value is 0.5;
[0144] Step 6.3, in each iteration, based on the current parameters , for the error function Perform Taylor expansion and take its quadratic approximation:
[0145] (14);
[0146] in, The objective function is The gradient vector at The objective function is The Hessian matrix of or its approximation;
[0147] Step 6.4, in the sequential quadratic programming algorithm, in order to find the optimal step vector , we need to solve the following quadratic programming problem:
[0148] (15);
[0149] Solution is the direction and step size that should be moved at the current iteration point;
[0150] Step 6.5, set the step size The boundary constraints are:
[0151] (16);
[0152] Step 6.6, construct the Lagrangian function:
[0153] (17);
[0154] in, and is the Lagrange multiplier;
[0155] Step 6.7, for the Lagrangian function about , , Taking the derivative and setting it to zero, we can get the following conditions:
[0156] about The first-order conditions are:
[0157] (18);
[0158] Feasibility conditions for constraints:
[0159] (19);
[0160] Regarding the satisfaction of the boundary constraints of step size d:
[0161] (20);
[0162] Solving for optimal conditions , get the next iteration point :
[0163] (twenty one);
[0164] Step 6.8, verify the current solution Whether the convergence criterion is met; the convergence criterion is the tolerance of the objective function value , that is, the change in parameter updates between two adjacent iterations; the default value is , the maximum number of function evaluations , the default is 5000 times;
[0165] In step 6.9, when the convergence criterion is met, the evaluation ends and the normalized input parameters are converted back to the original scale. The denormalization formula is defined as:
[0166] (twenty two);
[0167] in, is the original scale value of the optimized input parameter vector after denormalization.
[0168] The method for automatically correcting integrated load model parameters proposed in this paper has been put into practical use in a certain power grid. The integrated load model includes 15,995 busbars, 701 generators, 6,194 loads, 4,137 AC lines, and 6 DC lines. A three-phase short-circuit grounding fault at the 220kV Ganhong Bridge was simulated using this integrated load model. The fault process is as follows: the integrated load model experienced a three-phase short-circuit grounding fault at 1 second, and the fault began to recover 0.12 seconds after the onset of the three-phase short-circuit grounding fault.
[0169] The parameters of the comprehensive load model are corrected by the automatic correction method of the present invention to obtain a simulation curve that is closest to the actual fault curve, that is, the corresponding optimal parameters. The transient voltage change curve under the corrected parameters is compared with the transient voltage change curve under the original parameters. It is found that the Simpson integral area difference under the original parameters is 0.03, and the correction effect of the present invention is good.
[0170] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes based on the technical solutions and improved concepts of the present invention within the technical scope disclosed by the present invention, and these changes should be covered by the scope of protection of the present invention.
Claims
1. A method for automatically correcting parameters of a comprehensive load model based on a neural network, characterized in that: The following steps are involved: Step 1, obtaining actual fault recording data of the integrated load system to extract the actual value of the transient voltage; Step 2, simulating system state data of the comprehensive load model when parameters change, and extracting simulation values of transient voltages; Step 3, based on the Simpson 1 / 3 rule, calculate the Simpson integral area difference between the simulated transient voltage change curve and the original fault recording transient voltage change curve, and construct a data set; Step 4, based on the neural network optimized by the Levenberg-Marquardt algorithm, establish the change response relationship between the load parameter and the area difference; Step 5, establishing a normalized error function through the trained neural network; Step 6: Based on the error function, the sequential quadratic programming algorithm is used to minimize the Simpson integral area difference to obtain the inverse normalized comprehensive load model parameters.
2. The method for automatically correcting comprehensive load model parameters based on a neural network according to claim 1, characterized in that: In step 1, the transient voltage value of the busbar every 0.01s after the fault occurs is extracted from the fault recording data. , as the original fault recording transient voltage change curve.
3. The method for automatically correcting comprehensive load model parameters based on a neural network according to claim 2, characterized in that: In the step 2, it specifically includes: The parameters for selecting the comprehensive load model include: XL={x1,x2,x3,x4,x5,x6,x7}={stator resistance, stator reactance, magnetizing reactance, rotor resistance, rotor reactance, inertia time constant, initial active load rate}; The parameter values of the comprehensive load model are gradually modified in the form of ±20% of the original parameter value, so as to obtain the transient voltage change curve of the node when the system fails under different changes in the parameters of the comprehensive load model.
4. The method for automatically correcting parameters of a comprehensive load model based on a neural network according to claim 3, characterized in that: In the step 3, it specifically includes: Step 3.1, assuming that the transient voltage change curve under the condition of comprehensive load model parameter change is , the original fault recording transient voltage change curve is: ; Calculate each The difference between the points gives the difference curve: (1); Step 3.2, As a new curve, Perform integration; assuming that Points ,in is an even number, so that the number of points is an odd number, and the difference corresponding to each point is ; Then the formula for calculating the area difference between the two curves using Simpson's 1 / 3 rule is: (2); in, In each The difference between the two curves in position; is the distance between adjacent points; Step 3.3, according to the comprehensive load model parameters in step 2, randomly change these load parameters in the simulation software as the input of the neural network, and use the Simpson integral area difference between the corresponding transient voltage change curve and the original fault recording transient voltage change curve as the output of the neural network. Construct a data set, and take 80% as the training set and 20% as the test set.
5. The method for automatically correcting parameters of a comprehensive load model based on a neural network according to claim 4, characterized in that: The step 4 specifically comprises the following steps: Step 4.1, create an initialized neural network, including input layer, hidden layer and output layer; Step 4.2: The number of input neurons in the input layer is the number of comprehensive load model parameters selected in step 2, and the number of neurons in the hidden layer is set to , the output layer is the Simpson integral area difference between the simulation value and the actual value corresponding to step 3, and the number of neurons is set to 1; Step 4.3, assuming the input vector is , the output of the hidden layer Calculated by: (3); In the formula, The input layer neurons to the hidden layer The weight of a neuron, is the hidden layer The bias of a neuron, is the activation function; Step 4.4, output of the output layer It is calculated by the following formula: (4); In the formula, is the weight from the hidden layer to the output layer, is the bias of the output layer; Step 4.5, use mean square error Measuring the output of a neural network Simpson area difference with the training set The difference between Step 4.6, calculate the partial derivatives of the output layer weights and biases, first the mean square error with respect to the weights and bias The partial derivatives are: (5); (6); In the formula, ; is the derivative of the activation function; Step 4.7, calculate the mean square error with respect to weight and bias The partial derivative of : (7); (8); Step 4.8, starting from the output layer, calculate the partial derivative of the error with respect to each parameter layer by layer through step 4.7, and use these partial derivatives to update the weights and biases; the Levenberg-Marquardt algorithm combines the gradient descent method and the Gauss-Newton method. The Levenberg-Marquardt algorithm optimizes the weight and bias updates of the neural network according to the following formula: (9); In the formula, is the update amount for weights and biases, is the Jacobian matrix, representing the partial derivatives of each neural network parameter, is the transpose of the Jacobian matrix, is the adjustment parameter, is the identity matrix; is the error vector, which represents the difference between the actual output and the network output; Step 4.9, if the current iteration reduces the error, then reduce The value of is closer to the Gauss-Newton method. If the current iteration increases the error, increase The value of is closer to the gradient descent method; it is adjusted repeatedly in iteration until the mean square error When a preset minimum value is reached, the operation ends; Step 4.10, evaluate the trained neural network model, and use the coefficient of determination and mean square error to evaluate the neural network model; the coefficient of determination is recorded as , which is defined as: (10); is the residual sum of squares, which represents the sum of squares of the differences between the model's predicted values and the actual values: ,here is the Simpson area difference in the test set, is the Simpson area difference of the neural network output; is the total sum of squares, which represents the sum of squared differences between the actual values and the mean: ,here is the average of the Simpson area differences output by the neural network.
6. The method for automatically correcting comprehensive load model parameters based on a neural network according to claim 5, characterized in that: The step 5 specifically comprises the following steps: Step 5.1, before establishing the error function, normalize the input and output parameters. Assume that the input parameter vector is , the minimum and maximum values of each feature are and , use the following formula to normalize the input feature vector to scope: (11); Step 5.2, determine the output of the network based on the weights and biases of the neural network trained in step 4: (12); in, It is The weight matrix of the layer, It is The bias vector of the layer; is the activation function; is the number of layers in the network; Step 5.4, by adjusting the input vector , so that the Simpson area difference of the output of the neural network is as close to 0 as possible, and define the error function : (13)。 7. The method for automatically correcting parameters of a comprehensive load model based on a neural network according to claim 6, characterized in that: The step 6 specifically comprises the following steps: Step 6.1, based on the error function in step 5, define the optimization objective as ;in, is the input parameter vector, and the goal is to minimize the Simpson area difference of the neural network output to find the optimal input parameters; Step 6.2, input parameters The uniform initialization is 0.5; Step 6.3, in each iteration, based on the current parameters , for the error function Perform Taylor expansion and take its quadratic approximation: (14); in, is the objective function The gradient vector at The objective function is The Hessian matrix of or its approximation; Step 6.4, in the sequential quadratic programming algorithm, in order to find the optimal step vector , we need to solve the following quadratic programming problem: (15); Solution is the direction and step size that should be moved at the current iteration point; Step 6.5, set the step size The boundary constraints are: (16); Step 6.6, construct the Lagrangian function: (17); in, and is the Lagrange multiplier; Step 6.7, for the Lagrangian function about , , Taking the derivative and setting it to zero, we get the following condition: about The first-order condition is: (18); Feasibility conditions for constraints: (19); Regarding the satisfaction of the boundary constraints of step size d: (20); Finding the optimal conditions , get the next iteration point : (21); Step 6.8, verify the current solution Whether the convergence criterion is met; the convergence criterion is the tolerance of the objective function value , that is, the change in parameter updates between two adjacent iterations; the default value is , the maximum number of function evaluations , the default is 5000 times; Step 6.9, when the convergence criterion is met, the evaluation is terminated and the normalized input parameters are converted back to the original scale. The denormalization formula is defined as: (22); in, is the original scale value of the optimized input parameter vector after denormalization.
Citation Information
Patent Citations
Multi-time scale load prediction method based on hybrid neural network
CN116402194A
Transient stability assessment method for an electric power system
US20220360084A1