Load loss rate prediction method based on voltage sag and related device

By automatically identifying voltage and power mutation points and using a deep neural network model to predict load loss rates, the inefficiency problem caused by manual feature engineering in traditional methods is solved, and real-time and efficient load loss assessment of the power grid is achieved.

CN120824734APending Publication Date: 2025-10-21SHENZHEN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510919397.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2025-10-21

Smart Images

  • Figure CN120824734A_ABST
    Figure CN120824734A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a load loss rate prediction method based on voltage sag and a related device. The method comprises the following steps: acquiring target voltage data and target power data of a target load node in a current time period; determining a voltage abrupt change point and a power abrupt change point of the current time period according to the target voltage data and the target power data; determining a target voltage sag characteristic index of the current time period according to the voltage abrupt change point and the power abrupt change point; and inputting the target voltage sag characteristic index into a pre-trained target prediction model to obtain a target load loss rate corresponding to the current time period. By adopting the embodiment of the invention, when the voltage sag event occurs, the load loss rate caused by the voltage sag can be efficiently determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electric power technology, and in particular to a method and related device for predicting a load loss rate based on voltage sag. Background Art

[0002] Voltage sag is a key issue for power quality in power systems. It refers to a sudden drop in the RMS value of the power frequency voltage at a point in the system, typically to 0.1-0.9 pu, which persists for a brief period of 10ms-1 minute before returning to normal. With the rapid development of industrial automation and informatization, sensitive loads such as industrial automation equipment, precision instruments, and computer systems are placing increasing demands on power quality. Voltage sags can trigger the protective devices of these sensitive loads, causing production line tripping or equipment downtime, resulting in significant economic losses for users.

[0003] However, traditional load loss determination methods usually rely on a large amount of manual feature engineering, which is difficult to meet the needs of scenarios with large data volumes and high real-time requirements, such as real-time evaluation of power grids and rapid screening of large-scale loads. This results in low efficiency of load loss assessment in actual applications. Summary of the Invention

[0004] To solve the above problems, an embodiment of the present invention provides a method and related apparatus for predicting a load loss rate based on voltage sag, which can efficiently determine the load loss rate caused by the voltage sag when a voltage sag event occurs.

[0005] In a first aspect, an embodiment of the present invention provides a method for predicting a load loss rate based on voltage sag, comprising:

[0006] Obtain target voltage data and target power data of the target load node in the current time period;

[0007] Determining a voltage mutation point and a power mutation point in the current time period according to the target voltage data and the target power data;

[0008] Determining a target voltage sag characteristic index for the current time period according to the voltage mutation point and the power mutation point;

[0009] The target voltage sag characteristic index is input into a pre-trained target prediction model to obtain a target load loss rate corresponding to the current time period.

[0010] In a second aspect, an embodiment of the present invention provides a device for predicting a load loss rate based on voltage sag, the device comprising an acquisition unit and a processing unit;

[0011] The acquisition unit is used to acquire target voltage data and target power data of the target load node in the current time period;

[0012] The processing unit is configured to determine a voltage mutation point and a power mutation point in the current time period according to the target voltage data and the target power data;

[0013] Determining a target voltage sag characteristic index for the current time period according to the voltage mutation point and the power mutation point;

[0014] The target voltage sag characteristic index is input into a pre-trained target prediction model to obtain a target load loss rate corresponding to the current time period.

[0015] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory so that the electronic device performs the method described in the first aspect.

[0016] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method as described in the first aspect.

[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer is operable to enable the computer to execute the method described in the first aspect.

[0018] The implementation of the embodiments of the present application has the following beneficial effects:

[0019] In an embodiment of the present application, the target voltage data and target power data of the target load node in the current time period are first obtained. When a voltage sag event occurs, the target voltage data and target power data can reflect the voltage change and power change caused by the voltage sag event. Then, based on the target voltage data and target power data, the voltage mutation point and power mutation point of the current time period are determined, and based on the voltage mutation point and power mutation point, the target voltage sag characteristic index of the current time period is determined. Finally, the target voltage sag characteristic index is input into a pre-trained target prediction model to obtain the target load loss rate corresponding to the current time period. By automating data collection, mutation point detection, and feature index extraction, and determining the target load loss rate based on the target prediction model, the time spent on load loss assessment is greatly reduced, which is different from the method of manual feature engineering. When a voltage sag event occurs, the load loss rate caused by the voltage sag can be efficiently determined. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 This is a flow chart of a method for predicting load loss rate based on voltage sag provided in an embodiment of the present application;

[0022] Figure 2 This is a schematic diagram of the location of a target load node provided in an embodiment of the present application;

[0023] Figure 3 This is a schematic diagram of a voltage mutation point provided in an embodiment of the present application;

[0024] Figure 4 This is a schematic diagram of a power mutation point provided in an embodiment of the present application;

[0025] Figure 5 is a schematic diagram of a voltage and a normalized first mutual information provided by an embodiment of the present application;

[0026] Figure 6 is a schematic diagram of power and normalized second mutual information provided by an embodiment of the present application;

[0027] Figure 7 Schematic diagram of the model structure of an initial neural network model provided in an embodiment of the present application;

[0028] Figure 8 This is a schematic structural diagram of a load loss rate prediction device based on voltage sag provided in an embodiment of the present application;

[0029] Figure 9 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0031] The terms "first," "second," "third," and "fourth," etc., in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, rather than to describe a particular order. In addition, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or modules is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other steps or modules inherent to the process, method, product, or apparatus.

[0032] References herein to "embodiments" mean that a particular feature, result, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0033] The following describes the relevant contents, concepts, technical issues, technical solutions, beneficial effects, etc. involved in the embodiments of this application.

[0034] First, some professional terms involved in this application are explained:

[0035] Voltage sag: A power quality phenomenon in which the effective value of the supply voltage drops rapidly to 0.1 to 0.9 pu and lasts for 0.5 cycles to 1 minute.

[0036] Voltage sag amplitude: the minimum RMS value of voltage during a voltage sag.

[0037] Voltage sag duration: the duration of a voltage sag event that reaches the voltage sag threshold (generally less than or equal to 0.9 pu).

[0038] Load Loss Rate (LLR): This refers to the ratio of active power lost due to sensitive load tripping caused by voltage sag to the total rated power of the user's load. It is used to objectively describe the impact of voltage sag on user loads.

[0039] Deep Neural Network (DNN): A neural network with multiple hidden layers that can automatically extract complex patterns and relationships in data and is suitable for handling complex nonlinear problems.

[0040] Mutual Information Method: A statistical method to measure the mutual dependence between two variables, used to detect the sudden change points of voltage sag trajectory.

[0041] Normalization: The process of scaling data so that it falls into a specific range (such as [0, 1]), which helps improve the training stability and prediction accuracy of the model.

[0042] Adam optimization algorithm: an adaptive optimization algorithm that combines the advantages of momentum and RMSProp, used to adjust model parameters and improve the convergence speed and performance of the model.

[0043] L2 Regularization: A technique to prevent model overfitting by limiting the size of model weights by adding a sum of squares of weights to the loss function.

[0044] For voltage sag events, first, a sag event confirmation is performed to check whether the lowest voltage point falls within the voltage sag standard range. Then, the total duration is checked to see if it falls within the standard sag event time range. This allows a determination of whether a voltage sag event has occurred. In this embodiment of the present invention, the voltage sag event focused on is that caused by a short circuit fault.

[0045] In this embodiment of the present invention, the load loss ratio is used as an indicator to evaluate user load loss. This load loss ratio objectively describes the impact of voltage sag on user loads. The load loss ratio is defined as the ratio of active power lost due to sensitive load tripping caused by voltage sag to the total rated power of the user load.

[0046] It should be noted that the embodiments of the present application can be applied to a server or a local computer in a power system. The server or local computer receives voltage and power data collected by a data acquisition device and calculates the voltage and power data based on a target prediction model to obtain a load loss rate.

[0047] The servers offer high computing and storage capabilities, supporting batch evaluation of large-scale load nodes, such as parallel calculation of sag loss rates for thousands of load nodes within a regional power grid, and complex training tasks for deep learning models. For power system field equipment, such as smart meters and distribution automation terminals, lightweight algorithm designs, such as simplified mutation point detection and lightweight machine learning models, enable the deployment of local computers, enabling rapid response on local hardware with limited computing resources.

[0048] For details, see Figure 1 , Figure 1 The flowchart of a method for predicting load loss rate based on voltage sag provided by an embodiment of the present application is as follows. The method for predicting load loss rate based on voltage sag provided by an embodiment of the present application includes but is not limited to the following steps:

[0049] Step S101: Acquire target voltage data and target power data of a target load node in the current time period;

[0050] Step S102: determining the voltage mutation point and the power mutation point of the current time period according to the target voltage data and the target power data;

[0051] Step S103: determining a target voltage sag characteristic index for the current time period according to the voltage mutation point and the power mutation point;

[0052] Step S104: inputting the target voltage sag characteristic index into a pre-trained target prediction model to obtain a target load loss rate corresponding to the current time period.

[0053] For details, see Figure 2 , Figure 2 This is a schematic diagram of the location of a target load node provided in an embodiment of the present application. The target load node can be a common connection point (PCC), that is, a connection point of more than one user load in the power system, located between the substation and the user load. At the target load node, the target voltage data can be collected by a voltage acquisition device. During the collection, the voltage of each collection cycle can be obtained according to the collection cycle of the voltage acquisition device. The current time period can be the length of one collection cycle or the length of multiple collection cycles. Generally speaking, according to the voltage characteristics of the voltage sag event, four voltage mutation points can be obtained according to the voltage data when the voltage sag event occurs. However, since the collection of voltage data is carried out according to the collection cycle, it may be necessary to obtain a complete voltage waveform representing the voltage sag event through multiple adjacent collection cycles. For example, if only a part of the waveform of the voltage sag event is detected in the previous collection cycle according to the voltage data collected in the previous collection cycle, and another part of the waveform of the voltage sag event is detected in the current collection cycle, then the length of the current time period can be the sum of the lengths of the previous collection cycle and the current collection cycle.

[0054] In the embodiment of the present application, the target prediction model is obtained by training based on training set data, and the training set data is historical voltage data and historical power data of the target load node.

[0055] In one possible embodiment, after step S104, the target load loss rate can be classified according to its magnitude, for example, into three levels: low, medium, and high. This level of processing is then performed based on the level, allowing for early prevention of events with high predicted values. The load loss rate can also be quantified as economic loss, and the effectiveness of the control can be evaluated by comparing the load loss rates before and after the installation of the control device.

[0056] In the embodiment of the present application, the voltage and power data of the target load node are acquired in real time, directly reflecting the change in the electrical quantity of the sag event. The data acquisition process is fully automated without the need for human intervention. Based on the mutual information analysis or derivative mutation detection of the voltage and power data, the start and end times of the sag are automatically identified, avoiding the time-consuming and subjective nature of manual waveform analysis. Combined with online learning, the model can automatically update parameters using newly occurring sag events, continuously improving the prediction accuracy, without the need for manual redesign of features or adjustment of the model structure, adapting to the dynamic changes of the grid topology and load types. Both feature extraction and model reasoning support distributed computing, and can simultaneously perform loss rate assessments on hundreds of load nodes. Traditional methods can only handle a single or a small number of loads due to limitations of manual intervention. Through a full-process closed loop of automated data acquisition, intelligent mutation detection, algorithmic feature extraction, and real-time model prediction, the time-consuming manual links in the traditional method are replaced with automatic algorithmic processing, enabling the load loss rate assessment to be upgraded from manual hour-level analysis to machine millisecond-level response, which is particularly suitable for scenarios with extremely high efficiency requirements, such as real-time monitoring of power grids and rapid screening of large-scale loads.

[0057] Optional, see Figure 3 , Figure 3 This is a schematic diagram of a voltage mutation point provided by an embodiment of the present application. The voltage mutation points include a first voltage mutation point, a second voltage mutation point, a third voltage mutation point, and a fourth voltage mutation point in the order of their occurrence time. Figure 4 , Figure 4 This is a schematic diagram of a power mutation point provided in an embodiment of the present application. The power mutation points include a first power mutation point, a second power mutation point, a third power mutation point and a fourth power mutation point in the order of occurrence time.

[0058] Furthermore, step S102, determining the voltage mutation point and the power mutation point of the current time period according to the target voltage data and the target power data, may include the following steps:

[0059] Step S201: Calculating the first mutual information between the voltage and time in the current time period according to the target voltage data;

[0060] Step S202: Calculating the second mutual information between power and time in the current time period according to the target power data;

[0061] Step S203: normalizing the first mutual information and the second mutual information;

[0062] Step S204: determining a first mutation points according to the first mutation point determination threshold and the normalized first mutual information;

[0063] Step S205: determining b second mutation points according to the second mutation point determination threshold and the normalized second mutual information;

[0064] Step S206: determining a first voltage mutation point, a second voltage mutation point, a third voltage mutation point, and a fourth voltage mutation point from the a first mutation points;

[0065] Step S207: determining a first power mutation point, a second power mutation point, a third power mutation point, and a fourth power mutation point from the b second mutation points.

[0066] Specifically, to improve the accuracy of feature extraction, the mutual information method is used to detect trajectory mutation points, which offers faster computational speed and greater accuracy. Mutual information (I(X;Y)) measures the interdependence between two variables, X and Y. It is calculated as: I(X;Y) = H(X) + H(Y) - H(X,Y), where H(X) and H(Y) are the entropies of X and Y, respectively, and H(X,Y) is the joint entropy of X and Y. During normal operation, P and U exhibit regular temporal variations, such as periodic load fluctuations, resulting in high mutual information. However, when sudden changes occur, such as voltage sags or load trips, the temporal regularity of P or U is disrupted, causing a sharp drop in mutual information and the formation of a local minimum. When a voltage sag occurs, voltage U suddenly drops, disrupting its original correlation with time T and creating a trough in the I(U;T) curve. Therefore, mutual information can be used to identify voltage and power mutation points.

[0067] Furthermore, in order to make the mutual information value independent of the distribution of variables, normalization is performed to map the mutual information value to the interval [0,1], such as dividing it by the maximum possible mutual information, to facilitate comparison in different scenarios. For example:

[0068] In a specific embodiment, the focus is on the relationship between voltage U and time T, and between power P and time T. By calculating the first mutual information I(U; T) and the second mutual information I(P; T) and normalizing them, the normalized first mutual information NMI(U; T) and the normalized second mutual information NMI(P; T) are obtained. According to the first mutation point determination threshold and the second mutation point determination threshold, by finding the point where the mutual information curve drops sharply, the mutation points where the power and voltage change over time are identified.

[0069] Generally speaking, the number of a and b is 4. If redundant first or second mutation points are detected due to voltage fluctuations, for example, a or b is a positive integer greater than 4, then a determination is made based on the synchronous mutation of the voltage and power curves to remove redundant mutation points. For example, in power systems, voltage sags are often accompanied by mutations in active power P, such as load tripping. Therefore, the mutation points should satisfy the requirement that the I(P; T) and I(U; T) curves simultaneously show declining valleys, and the time points are close. For example, at the start of the voltage sag, I(U; T) first decreases, followed by I(P; T) due to load response. The interval between the two mutation points should conform to physical laws, such as within a few milliseconds.

[0070] Optionally, the target voltage sag characteristic index includes: average voltage sag drop amplitude, voltage sag duration, duration of the lowest voltage sag point, voltage amplitude difference caused by the voltage sag, power difference caused by the voltage sag, power change duration, average power drop amplitude, and duration of the lowest power point. Furthermore, step S103, determining the target voltage sag characteristic index for the current time period based on the voltage mutation point and the power mutation point, may include the following steps:

[0071] Step S301: determining an average voltage sag amplitude according to the vertical coordinate of each of the first voltage mutation point, the second voltage mutation point, and the third voltage mutation point;

[0072] Step S302: determining the duration of the voltage sag according to the abscissa of each of the first voltage mutation point and the fourth voltage mutation point;

[0073] Step S303: determining the duration of the lowest voltage sag point according to the abscissa of each of the second voltage mutation point and the third voltage mutation point;

[0074] Step S304: determining a voltage amplitude difference caused by the voltage sag according to the ordinate of each of the first voltage mutation point and the fourth voltage mutation point;

[0075] Step S305: determining the power difference caused by the voltage sag according to the vertical coordinate of each power mutation point in the first power mutation point and the fourth power mutation point;

[0076] Step S306: determining the power change duration according to the abscissa of each of the first power mutation point and the fourth power mutation point;

[0077] Step S307: determining an average power drop amplitude according to the vertical coordinate of each of the first power mutation point, the second power mutation point, and the third power mutation point;

[0078] Step S308: determining the duration of the lowest power point according to the horizontal coordinate of each of the second power mutation point and the third power mutation point.

[0079] For details, see Figure 5 , Figure 5 is a schematic diagram of a voltage and a normalized first mutual information provided by an embodiment of the present application, and, see Figure 6 , Figure 6 is a schematic diagram of a power and a normalized second mutual information provided by an embodiment of the present application, Figure 5 and Figure 6 According to the normalized first mutual information NMI(U;T) and the normalized second mutual information NMI(P;T), the voltage mutation point and the power mutation point can be determined. Furthermore, the horizontal coordinates of the first voltage mutation point, the second voltage mutation point, the third voltage mutation point and the fourth voltage mutation point are respectively expressed by t u1 ~t u4 The vertical coordinates are represented by u1~u4 respectively, and the horizontal coordinates of the first power mutation point, the second power mutation point, the third power mutation point and the fourth power mutation point are represented by t p1 ~t p4 The vertical coordinates are represented by p1 to p4 respectively.

[0080] Furthermore, the average voltage sag amplitude is determined based on the vertical coordinate of each of the first voltage mutation point, the second voltage mutation point, and the third voltage mutation point. Among them, U fall The larger it is, the more significant the voltage drop is, and the more loads are affected by the voltage sag, especially the voltage-sensitive equipment.

[0081] Furthermore, the duration of the voltage sag is determined based on the horizontal coordinate of each of the first voltage mutation point and the fourth voltage mutation point. duration =t u4 -t u1 The longer the duration, the longer the load will withstand low voltage, and the greater the impact on the normal operation of the load and even the life of the equipment.

[0082] Furthermore, the duration of the lowest point of the voltage sag is determined based on the horizontal coordinate of each of the second voltage mutation point and the third voltage mutation point. Umin =t u3 -t u2 , T UminThe longer the voltage is, the longer it will be in the worst (lowest) state, and the higher the risk of damage or tripping to sensitive loads with strict lower voltage requirements.

[0083] Furthermore, the voltage amplitude difference caused by the voltage sag is determined based on the ordinate of each voltage mutation point in the first voltage mutation point and the fourth voltage mutation point. The voltage amplitude difference caused by the voltage sag is the voltage amplitude difference before and after the event ends, U difference =U1-U4, U difference The larger the value, the more likely it is that the system voltage has not recovered to the level before the event after the event. This may indicate that the system operating state has undergone a continuous change, which may have a potential impact on the long-term stable operation of the load.

[0084] Furthermore, the power difference caused by the voltage sag is determined based on the ordinate of each power mutation point in the first power mutation point and the fourth power mutation point. The power difference caused by the voltage sag is the difference in active power before and after the event ends, P difference =P1-P4, P difference The larger the value, the greater the permanent change in the active power balance in the system caused by the event (such as load shedding without recovery).

[0085] Furthermore, the power change duration is determined based on the horizontal coordinate of each power mutation point in the first power mutation point and the fourth power mutation point. The power change duration, that is, the active power change duration T vary =t p4 -t p1 , T vary The longer it is, the longer the power adjustment or fluctuation process lasts, which may be accompanied by frequency or voltage fluctuations. Loads (especially motors) and related protection devices are more likely to trip due to their inability to adapt to the long transition process.

[0086] Furthermore, the average power drop amplitude is determined based on the vertical coordinate of each power mutation point among the first power mutation point, the second power mutation point and the third power mutation point. The average power drop amplitude, that is, the average active power drop amplitude P fall The larger the value, the more severe the power loss or demand drop during the event, the greater the impact on loads that rely on stable power supply, and may also reflect more severe system disturbances or load shedding.

[0087] Furthermore, the duration of the lowest power point is determined based on the horizontal coordinate of each power mutation point in the second power mutation point and the third power mutation point. The duration of the lowest power point, that is, the duration of the lowest active power point T Pmin =t p3 -t p2The longer the duration, the longer the power remains at the lowest level. The load may experience a longer power shortage or deterioration of operating conditions, increasing the risk of operation interruption or equipment failure.

[0088] Therefore, the target voltage sag characteristic index can be determined through the above calculation method.

[0089] Optionally, before step S104: inputting the target voltage sag characteristic index into a pre-trained target prediction model to obtain a target load loss rate corresponding to the current time period, the following steps may also be included:

[0090] Step S401: Acquire a training data set, where the training data set includes first voltage data and first power data of a target load node in a first time period, where the end time of the first time period is earlier than the start time of the current time period;

[0091] Step S402: determining a first voltage sag characteristic index in a first time period according to the first voltage data and the first power data;

[0092] Step S403: determining a first load loss rate corresponding to a first time period according to the first voltage data and the first power data;

[0093] Step S404: training the initial neural network structure according to the first voltage sag characteristic index and the first load loss rate to obtain a target prediction model.

[0094] Specifically, the method for determining the first voltage sag characteristic index in the first time period is consistent with the method for determining the target voltage sag characteristic index in the current time period.

[0095] In a possible embodiment, a first load loss rate corresponding to the first time period is determined based on the first voltage data and the first power data. The first load loss rate is calculated using the active power of the target load node. For example, when the target load node is a PCC point, the active power of the PCC point can be expressed as: p PCC (t) = p Z (t)+p I (t)+p P (t)+p M (t)-p trip (t), where p z (t),p P (t) and p I (t) represents the active power consumed by constant impedance load, constant power load and constant current load respectively, P M (t) is the active power consumed by the induction motor, P trip (t) represents the power lost due to the tripping of sensitive load. Among them, t begin is the time when the voltage sag begins, t end The time it takes for the voltage to return to normal.

[0096] Specifically, in a possible embodiment, see Figure 7 , Figure 7 This is a schematic diagram of the model structure of an initial neural network model provided in an embodiment of the present application. The initial neural network structure includes an input layer, a hidden layer, and an output layer, wherein the hidden layer includes a first fully connected layer and a second fully connected layer.

[0097] Furthermore, the input layer has 8 neurons, each fully connected layer has 10 neurons, and the output layer uses a single-neuron linear output. The input layer's input data consists of voltage sag characteristic indicators, including the characteristics of the UT and PT trajectories. This data is normalized and scaled to the range of [0, 1] to improve model training stability. The activation function for the hidden layer is ReLU (Rectified Linear Unit), with the mathematical expression: f(x) = max(0, x). The output layer performs regression prediction of the load loss rate.

[0098] Further, after analysis and calculation, the total formula from input to output is as follows:

[0099]

[0100] in, is the output of the i-th neuron in the input layer; W 1ij is the weight from the i-th neuron in the input layer to the j-th neuron in the first hidden layer, b 1j is the bias of the jth neuron in the first hidden layer. W 2jk is the weight from the jth neuron in the first hidden layer to the kth neuron in the second hidden layer, b 2k is the bias of the kth neuron in the second hidden layer. W 3k is the weight vector of the output layer, b3 is the bias term of the output layer, is the load loss rate predicted by the model. m is set to 10.

[0101] Therefore, for forward propagation, the eight trajectory features are used as input data starting from the input layer, passing through the calculation of each layer of neurons in turn, and finally reaching the output layer to obtain the predicted result of the load loss rate.

[0102] In the embodiment of the present application, parameter optimization is performed during model training.

[0103] Specifically, regularization technology is applied to prevent model overfitting and improve the generalization ability of the model. L2 regularization, that is, the weight attenuation coefficient, is used to prevent overfitting. Specifically, the loss function of L2 regularization can be expressed by the following formula:

[0104] L reg =L ori +λ∑ i ||W i || 2 ,

[0105] Among them, L ori is the original loss function, L reg is the loss function after regularization, λ is the regularization parameter used to control the strength of regularization, W i is the weight parameter of the model. The original loss function uses the mean square error (MSE) as the loss function to measure the difference between the model's load loss rate prediction value (training set) and the true value.

[0106] Specifically, the Adam (Adaptive Moment Estimation) optimization algorithm is used for parameter updates. This algorithm is an adaptive optimization algorithm that combines the advantages of momentum and RMSProp. Adam adjusts the learning rate by calculating the first-order and second-order moment estimates of the gradient, providing different learning rates for each parameter during training. This not only speeds up the model's convergence but also enhances its adaptability to different input feature distributions, leading to more accurate predictions of load loss rates.

[0107] Optionally, step S404, training the initial neural network structure according to the first voltage sag characteristic index and the first load loss rate to obtain a target prediction model, may include the following steps:

[0108] Step S501: training an initial neural network structure according to a first voltage sag characteristic index, a first load loss rate, and an initial maximum training number to obtain a candidate neural network structure corresponding to the initial maximum training number;

[0109] Step S502: determining a target prediction model based on the candidate neural network structure corresponding to the initial maximum number of training times;

[0110] If the current number of training times is less than or equal to the initial maximum number of training times, repeat the following steps S1-S6:

[0111] S1: Get the initial weight, initial bias and initial learning rate of the initial neural network structure corresponding to the current number of training times;

[0112] S2: Performing a feedforward calculation on the first voltage sag characteristic indicator according to the initial weight and the initial bias to obtain a first reference result corresponding to the current number of training times;

[0113] S3: Determine a loss function value corresponding to the current number of training times based on the first reference result, the first load loss rate, and a weight decay term, where the weight decay term is used to indicate regularization strength;

[0114] S4: Determine the weight gradient corresponding to the current number of training times based on the loss function value and the back propagation algorithm;

[0115] S5: Get the weight adjustment value according to the weight gradient and initial learning rate;

[0116] S6: Adjust the initial weight according to the weight adjustment value to obtain the target weight corresponding to the current number of training times.

[0117] In a possible embodiment, in addition to determining whether to stop model training based on the current number of training times and the initial maximum number of training times, whether to stop model training is also determined based on whether the model converges during the training process.

[0118] Specifically, the weights and biases use the He initialization strategy to determine their initial values, and the subsequent values ​​are determined by the back propagation of the DNN model, that is, by training.

[0119] Specifically, during the initial neural network training process, parameters are initialized—that is, all weights and biases in the network are randomly initialized—to ensure good convergence at the start of training. Then, forward propagation is performed, feeding the training data, namely, trajectory characteristics and their corresponding load loss rates, into the network. Feedforward calculations are performed to obtain the network output. Loss is then calculated, comparing the network's predicted output with the actual load loss rate. The loss function is calculated to evaluate the model's current performance. An L2 regularization term, or weight decay, is added to the loss function to prevent overfitting and improve generalization. Next, backpropagation is performed. Based on the loss function value, the backpropagation algorithm is used to calculate the gradient of each weight, determining the direction and magnitude of the weight update. Weights are then updated using the Adam optimization algorithm based on the gradients, adjusting the network parameters to minimize the loss function. This process of forward propagation, loss calculation, backpropagation, and weight update is repeated until the loss function converges to a satisfactory level, indicating no significant improvement in model performance. At this point, model training is terminated to conserve computing resources. For example, the convergence of the model is determined by judging whether the value of the loss function approaches 0 based on the loss function change curve after regularization.

[0120] Furthermore, during model training, in order to avoid the situation where convergence has not occurred after reaching the maximum number of training times, the data can be divided into three parts: training set, validation set and test set. The training set is used for model training, and the validation set is used to test the quality of the model. After each training, the evaluation index of the validation set is calculated. The evaluation index can be the mean absolute error. When the validation set index does not change significantly, the training is stopped. There is no need to determine the maximum number of training times. The maximum number of training times can be set to a larger number of training times. The model will automatically stop training before the current number of training times reaches the maximum number of training times.

[0121] Optionally, step S502, determining a target prediction model based on a candidate neural network structure corresponding to the initial maximum number of training times, may include the following steps:

[0122] Step S601: Calculating the prediction accuracy of the candidate neural network structure corresponding to the initial maximum number of training times according to the weight of the candidate neural network structure of the initial maximum number of training times;

[0123] Step S602: adjusting the initial maximum number of training times according to the prediction accuracy to obtain the target maximum number of training times;

[0124] Step S603: training the initial neural network structure according to the target maximum number of training times, the first voltage sag characteristic index and the first load loss rate to obtain a target prediction model.

[0125] Specifically, for the calculation of prediction accuracy, the following model performance evaluation indicators can be used: Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Square Error (RMSE) and Determination Coefficient R 2 .

[0126] Furthermore, MAE calculates the average of the absolute values ​​of the prediction errors, which directly reflects the average deviation of the model prediction results from the true value. The calculation formula is: Among them, y i is the actual load loss rate, is the load loss rate predicted by the model, and n is the number of samples in the test set.

[0127] Furthermore, the mean square error is used to measure the average square deviation between the predicted value and the actual value, and the calculation formula is:

[0128] Furthermore, the root mean square error is used to reflect the degree of deviation of the predicted value, and the formula is:

[0129] Furthermore, the coefficient of determination R 2 It is used to reflect the linear correlation between the predicted value and the actual value. The formula is: Where, is the sample mean of the actual value. 2 The closer the value is to 1, the better the model fits the data distribution.

[0130] In one possible embodiment, the initial maximum number of training runs is adjusted based on the prediction accuracy to obtain a target maximum number of training runs. If the mean absolute error, mean square error, and root mean square error are large on the training and test sets, and the R-squared is low, this indicates that the model is underfitting. Increase the learning rate, increase the number of model training rounds, and intensify training. If the training set performs well but the test set performs poorly, this indicates that the model is overfitting. Increase the strength of L2 regularization or reduce the number of training rounds to improve the model's generalization ability.

[0131] In one possible embodiment, an initial neural network structure is trained based on a target maximum number of training cycles, a first voltage sag characteristic indicator, and a first load loss rate to obtain a target prediction model. If the target maximum number of training cycles is greater than the initial maximum number of training cycles, further training is performed based on the training results for the initial maximum number of training cycles, i.e., the candidate neural network structure for the initial maximum number of training cycles. If the target maximum number of training cycles is less than the initial maximum number of training cycles, multiple historical training results within the initial maximum number of training cycles are loaded, and a training point corresponding to the target maximum number of training cycles is determined. The training result corresponding to this training point is used as the target prediction model. This reduces redundant training cycles and improves model training efficiency. For example, after model training is completed, the maximum number of model training cycles is adjusted based on the four model evaluation indicators. If the maximum number of training cycles is adjusted from 80 to 100, training is continued for 20 cycles based on the 80 training cycles. If the maximum number of training cycles is adjusted from 80 to 50, the model corresponding to the 50th training cycle of the 80 training cycles is used as the adjusted model.

[0132] In one possible embodiment, if the model evaluation index is still lower than the threshold after adjusting the maximum number of model training times, and if the model has difficulty learning the data patterns due to too few samples of real temporary drop events, the number of data sets can be expanded, or the complexity of the model can be increased, such as the number of hidden layers and the number of neurons.

[0133] Optionally, the target load node is used to supply power to the target electrical equipment. Further, after step S104: inputting the target voltage sag characteristic index into a pre-trained target prediction model to obtain the target load loss rate corresponding to the current time period, the following steps may also be included:

[0134] Step S701: Determine the load loss level of the target load node according to the target load loss rate;

[0135] Step S702: Determine the voltage compensation amount of the load protection device for the target electrical equipment according to the load loss level;

[0136] Step S703: Control the load protection device to perform voltage compensation on the target electrical equipment according to the voltage compensation amount.

[0137] Specifically, the target electrical equipment includes c sub-electrical equipment, where c is a positive integer. The equipment types of each sub-electrical equipment are different, and the impact of voltage sags on each sub-electrical equipment is also different. For example, sensitive loads such as industrial automation equipment, precision instruments, and computer systems are more affected by voltage sag events.

[0138] In a possible embodiment, the load loss level of the target load node is determined according to the target load loss rate. The load loss level includes three levels of loss: slight loss, medium loss, and severe loss. The target load loss rate is input into a preset threshold table to automatically match the corresponding level. For example, if LLR = 25%, it is determined as medium loss. If the load loss rate LLR ≤ 10%, it is slight loss. At this time, the equipment is not shut down but its performance slightly decreases, such as LED lights flickering. If 10% < LLR ≤ 30%, it is medium loss. At this time, some equipment trips, such as non-critical motors shutting down. If LLR > 30%, it is severe loss. At this time, core equipment fails, such as semiconductor lithography machines being interrupted.

[0139] In a possible embodiment, the voltage compensation amount of the load protection device for the target electrical equipment is determined according to the load loss level. Exemplarily, for slight loss, the compensated voltage amplitude is 30% - 50% of the sag amplitude, and the duration covers the sag duration. For example, if the rated voltage sags by 70%, it is compensated to 85% of the rated voltage. For medium loss, it is compensated to 90% - 95% of the rated voltage, and the compensation duration is extended by 100 ms to cope with the inertial shutdown of motor equipment. For severe loss, it is fully compensated to the rated voltage, and the standby power supply is switched on.

[0140] In one possible embodiment, based on the voltage compensation amount, the load protection device is controlled to perform voltage compensation on the target electrical equipment. For example, for minor losses, the dynamic voltage restorer can be activated to output a preset compensation voltage with a response time of <10ms; for moderate losses, the dynamic voltage restorer is used for full compensation and the motor soft starter is pre-charged to prevent overcurrent after restart after a temporary drop; for severe losses, the static switching switch is used to switch to the backup power supply within 4ms, and non-critical load shedding is triggered at the same time. In addition, the voltage and power at the device end after compensation are monitored in real time. If the compensation amount is insufficient, such as if the LLR is still greater than the threshold, additional compensation is automatically applied, such as the dynamic voltage restorer increasing the output voltage by 5%.

[0141] In the embodiment of the present application, the response speed of the device is matched according to the loss level to ensure that compensation is completed within the tolerance time of the equipment, and the load loss assessment of the voltage sag is converted into a quantifiable and operational engineering process. By predicting the load loss in advance, a protection system is formed by rapid detection, prediction and warning, and millisecond-level response of voltage sag events, thereby reducing the losses caused to the power system by voltage sag events.

[0142] This invention defines the load loss rate and constructs a voltage sag characteristic indicator system consisting of eight characteristic indicators. It then uses a deep neural network to automatically extract complex patterns and relationships in the data, effectively reducing reliance on manual feature selection, lowering the difficulty and cost of model development, and improving the model's operability and adaptability. By constructing a deep neural network model consisting of two fully connected hidden layers, using the ReLU activation function to enhance nonlinear expression capabilities, and combining the Adam optimization algorithm with L2 regularization technology to optimize model parameters, this method overcomes the traditional methods' reliance on large amounts of historical data and lack of adaptability to complex nonlinear problems. This method significantly improves the accuracy of load loss rate predictions and enhances the model's generalization capabilities in the face of new voltage sag events, making it suitable for practical engineering scenarios where data is scarce.

[0143] In summary, in the embodiment of the present application, the target voltage data and target power data of the target load node in the current time period are first obtained. When a voltage sag event occurs, the target voltage data and target power data can reflect the voltage change and power change caused by the voltage sag event. Then, based on the target voltage data and target power data, the voltage mutation point and power mutation point of the current time period are determined, and based on the voltage mutation point and power mutation point, the target voltage sag characteristic index of the current time period is determined. Finally, the target voltage sag characteristic index is input into the pre-trained target prediction model to obtain the target load loss rate corresponding to the current time period. By automating data collection, mutation point detection and feature index extraction, and determining the target load loss rate based on the target prediction model, the time spent on load loss assessment is greatly reduced, which is different from the method of manual feature engineering. When a voltage sag event occurs, the load loss rate caused by the voltage sag can be efficiently determined.

[0144] The above describes in detail the method according to the embodiment of the present invention. The following provides an apparatus according to the embodiment of the present invention.

[0145] See Figure 8 , Figure 8 Schematic diagram of a load loss rate prediction device based on voltage sag provided in an embodiment of the present application. Figure 8 As shown, the load loss rate prediction device 800 based on voltage sag includes an acquisition unit 801 and a processing unit 802; the acquisition unit 801 is used to obtain target voltage data and target power data of the target load node in the current time period; the processing unit 802 is used to determine the voltage mutation point and power mutation point of the current time period based on the target voltage data and target power data; determine the target voltage sag characteristic index of the current time period based on the voltage mutation point and the power mutation point; input the target voltage sag characteristic index into a pre-trained target prediction model to obtain the target load loss rate corresponding to the current time period.

[0146] In a specific implementation, the acquisition unit 801 and the processing unit 802 in the embodiment of the present application may also execute other implementations described in the load loss rate prediction method based on voltage sag in the above embodiment of the present application, which will not be repeated here.

[0147] See Figure 9 , Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 9As shown, the electronic device 900 includes a transceiver 901, a processor 902, and a memory 903, which are connected via a bus 904. The memory 903 is used to store computer programs and data, and can transmit the data stored in the memory 903 to the processor 902. The electronic device 900 can be the above-mentioned load loss rate prediction device 800 based on voltage sag, and the processor 902 can be the above-mentioned acquisition unit 801 and processing unit 802. In this embodiment of the present application, the processor 902 is used to read the computer program in the memory 903 to execute some or all steps of the above-mentioned load loss rate prediction method based on voltage sag.

[0148] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The computer program is executed by a processor to implement part or all of the steps of any one of the load loss rate prediction methods based on voltage sag as described in the above method embodiments.

[0149] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any one of the load loss rate prediction methods based on voltage sag as described in the above method embodiments.

[0150] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions and modules involved are not necessarily required by this application.

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

[0152] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical or other forms.

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

[0154] In addition, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or software program modules.

[0155] If the integrated module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0156] The above is a detailed introduction to the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for those skilled in the art, according to the idea of ​​the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for predicting load loss rate based on voltage sag, characterized in that: include: Obtain target voltage data and target power data of the target load node in the current time period; Determining a voltage mutation point and a power mutation point in the current time period according to the target voltage data and the target power data; Determining a target voltage sag characteristic index for the current time period according to the voltage mutation point and the power mutation point; The target voltage sag characteristic index is input into a pre-trained target prediction model to obtain a target load loss rate corresponding to the current time period.

2. The method according to claim 1, wherein The voltage mutation points include a first voltage mutation point, a second voltage mutation point, a third voltage mutation point, and a fourth voltage mutation point; the power mutation points include a first power mutation point, a second power mutation point, a third power mutation point, and a fourth power mutation point; and determining the voltage mutation point and the power mutation point of the current time period according to the target voltage data and the target power data includes: Calculating, according to the target voltage data, a first mutual information between the voltage and time in the current time period; Calculating, according to the target power data, second mutual information between power and time in the current time period; performing normalization processing on the first mutual information and the second mutual information; Determine a first mutation points according to the first mutation point determination threshold and the normalized first mutual information; Determine b second mutation points according to the second mutation point determination threshold and the normalized second mutual information; Determine the first voltage mutation point, the second voltage mutation point, the third voltage mutation point and the fourth voltage mutation point from the a first mutation points; The first power mutation point, the second power mutation point, the third power mutation point and the fourth power mutation point are determined from the b second mutation points.

3. The method according to claim 2, wherein The target voltage sag characteristic index includes: average voltage sag drop amplitude, voltage sag duration, duration of the lowest voltage sag point, voltage amplitude difference caused by voltage sag, power difference caused by voltage sag, power change duration, average power drop amplitude, and duration of the lowest power point; determining the target voltage sag characteristic index for the current time period based on the voltage mutation point and the power mutation point includes: determining an average voltage sag amplitude according to the ordinate of each of the first voltage mutation point, the second voltage mutation point, and the third voltage mutation point; determining a duration of the voltage sag according to the abscissa of each of the first voltage mutation point and the fourth voltage mutation point; determining a duration of the lowest point of the voltage sag according to the abscissa of each of the second voltage mutation point and the third voltage mutation point; determining a voltage amplitude difference caused by the voltage sag according to a vertical coordinate of each of the first voltage mutation point and the fourth voltage mutation point; determining a power difference caused by the voltage sag according to a vertical coordinate of each of the first power mutation point and the fourth power mutation point; Determining the power change duration according to the abscissa of each of the first power mutation point and the fourth power mutation point; determining the average power drop amplitude according to the ordinate of each power mutation point among the first power mutation point, the second power mutation point, and the third power mutation point; The duration of the lowest power point is determined according to the abscissa of each of the second power mutation point and the third power mutation point.

4. The method according to any one of claims 1 to 3, wherein Before inputting the target voltage sag characteristic index into a pre-trained target prediction model to obtain the target load loss rate corresponding to the current time period, the method further includes: Acquire a training data set, the training data set including first voltage data and first power data of the target load node in a first time period, where the end time of the first time period is earlier than the start time of the current time period; determining a first voltage sag characteristic index for the first time period according to the first voltage data and the first power data; determining a first load loss rate corresponding to the first time period according to the first voltage data and the first power data; An initial neural network structure is trained according to the first voltage sag characteristic index and the first load loss rate to obtain the target prediction model.

5. The method according to claim 4, wherein The training of the initial neural network structure according to the first voltage sag characteristic index and the first load loss rate to obtain the target prediction model includes: Training the initial neural network structure according to the first voltage sag characteristic index and the first load loss rate, and an initial maximum training number, to obtain a candidate neural network structure corresponding to the initial maximum training number; Determining the target prediction model based on the candidate neural network structure corresponding to the initial maximum training number; If the current number of training times is less than or equal to the initial maximum number of training times, repeat the following steps S1-S6: S1: Obtaining the initial weight, initial bias and initial learning rate of the initial neural network structure corresponding to the current number of training times; S2: performing feedforward calculation on the first voltage sag characteristic indicator according to the initial weight and the initial bias to obtain a first reference result corresponding to the current training number; S3: Determine a loss function value corresponding to the current number of training times based on the first reference result, the first load loss rate, and a weight decay term, where the weight decay term is used to indicate regularization strength; S4: Determine the weight gradient corresponding to the current number of training times according to the loss function value and the back propagation algorithm; S5: Obtaining a weight adjustment value according to the weight gradient and the initial learning rate; S6: Adjust the initial weight according to the weight adjustment value to obtain the target weight corresponding to the current number of training times.

6. The method according to claim 5, wherein The determining of the target prediction model based on the candidate neural network structure corresponding to the initial maximum number of training times includes: Calculating the prediction accuracy of the candidate neural network structure corresponding to the initial maximum number of training times according to the weight of the candidate neural network structure of the initial maximum number of training times; Adjusting the initial maximum number of training times according to the prediction accuracy to obtain a target maximum number of training times; The initial neural network structure is trained according to the target maximum number of training times, the first voltage sag characteristic index, and the first load loss rate to obtain the target prediction model.

7. The method according to claim 1, wherein The target load node is used to supply power to the target electrical equipment; after inputting the target voltage sag characteristic index into a pre-trained target prediction model to obtain the target load loss rate corresponding to the current time period, the method further includes: determining a load loss level of the target load node according to the target load loss rate; determining, according to the load loss level, a voltage compensation amount of the load protection device for the target electrical equipment; According to the voltage compensation amount, the load protection device is controlled to perform voltage compensation on the target electrical equipment.

8. A load loss rate prediction device based on voltage sag, characterized in that: The device includes an acquisition unit and a processing unit; The acquisition unit is used to acquire target voltage data and target power data of the target load node in the current time period; The processing unit is configured to determine a voltage mutation point and a power mutation point in the current time period according to the target voltage data and the target power data; Determining a target voltage sag characteristic index for the current time period according to the voltage mutation point and the power mutation point; The target voltage sag characteristic index is input into a pre-trained target prediction model to obtain a target load loss rate corresponding to the current time period.

9. An electronic device, characterized in that: include: A processor and a memory, the processor being connected to the memory, the memory being used to store a computer program, and the processor being used to execute the computer program stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 7.