Transformer capacitance compensation through-flow method and system based on deep learning
By using a deep learning-based two-layer restricted Boltzmann machine for feature extraction and parameter generation, the problem of decision instability in capacitor compensation devices under complex disturbance environments is solved, enabling adaptive adjustment and stable execution of capacitor compensation. This method is suitable for capacitor compensation applications in distribution network transformers.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID JIANGSU ELECTRIC POWER CO LTD
- Filing Date
- 2025-11-20
- Publication Date
- 2026-04-21
AI Technical Summary
Existing capacitor compensation devices struggle to achieve stable and efficient reactive power compensation under complex disturbance environments. Their control parameters lack robustness, feature extraction capabilities are limited, and data preprocessing is inconsistent, leading to unstable decision-making and difficulties in rapid model deployment and maintenance.
We employ a deep learning-based two-layer restricted Boltzmann machine for feature extraction and parameter generation. Through standardized input data, unsupervised training, capacitor switching parameter mapping, and closed-loop reconstruction error evaluation, we achieve adaptive adjustment and data retention, thereby improving decision consistency and execution stability.
It improves decision consistency and execution stability of capacitor compensation under complex operating conditions, reduces unnecessary switching and command conflicts, and supports rapid deployment and continuous operation.
Smart Images

Figure CN121906543A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of reactive power compensation technology in power systems, and in particular to a transformer capacitor compensation current-carrying method and system based on deep learning. Background Technology
[0002] With the rapid integration of nonlinear loads, distributed power sources, and impulsive operating conditions into distribution networks, power quality issues are becoming increasingly prominent. Particularly on the distribution transformer side, the switching control of capacitor compensation devices has become a critical link in achieving stable and efficient reactive power compensation and voltage regulation. Existing control methods mainly set fixed thresholds based on power factor or bus voltage, supplemented by hysteresis control logic to implement switching decisions. Some methods introduce fuzzy control or PI control algorithms to improve adaptability, while other studies have attempted to extract features using frequency domain methods such as Fourier transform and wavelet analysis for disturbance identification and compensation decisions.
[0003] However, in practical engineering applications, these methods generally suffer from the following shortcomings. On the one hand, control parameters often rely on manual setting, lacking robustness to complex disturbances and struggling to adapt to scenarios involving three-phase imbalance, non-stationary disturbances, or simultaneous multi-source impacts. On the other hand, feature extraction methods have limited ability to represent operational data, making it difficult to extract discriminative features from unlabeled samples, resulting in unstable decision-making basis and poor parameter transferability. Furthermore, existing methods lack unified standards in the data preprocessing stage, easily leading to model input distribution mismatch and affecting the stability of the control strategy. In the control chain, problems such as ambiguous control interface definitions, inconsistent switching command responses, and untimely status feedback are also common, affecting the determinism and traceability of execution.
[0004] In the performance evaluation stage, current methods mostly rely on static indicators such as power factor, voltage deviation, or harmonic distortion rate (e.g., THD) for offline retesting. However, these methods lack a unified measurement and closed-loop adaptive update mechanism, easily leading to over-compensation, under-compensation, or frequent switching. For supervised learning schemes, model deployment and maintenance are highly dependent on data labeling and parameter tuning, making it difficult to meet the needs of rapid on-site deployment and continuous operation. Summary of the Invention
[0005] Purpose of the invention: To propose a transformer capacitor compensation current-carrying method based on deep learning, and further provide a system capable of running and implementing the above method, aiming to have the functions of feature extraction, parameter distribution, compensation evaluation and closed-loop update, support adaptive adjustment of capacitor switching actions and full-process data retention, improve decision consistency and execution stability under complex working conditions, thereby effectively solving the above-mentioned problems mentioned in the background technology.
[0006] The technical solution of the present invention is as follows: Firstly, a deep learning-based method for compensating transformer capacitance current is proposed, comprising the following steps: Real-time voltage and current signals are collected during transformer operation, and the real-time voltage and current signals are normalized to obtain standardized input data. Construct a two-layer Restricted Boltzmann Machine (RBM), set weight parameters and bias parameters, and perform unsupervised training on the first-layer RBM and the second-layer RBM respectively, updating the weight parameters and bias parameters of each layer; The standardized input data is input into the two-layer restricted Boltzmann machine to generate deep latent feature vectors. The deep hidden feature vectors are mapped to generate capacitor switching parameters according to preset conditions; The capacitor switching parameters are transmitted to the capacitor compensation control hardware to trigger the relay action, complete this round of compensation, and collect the compensated voltage and current signals. The compensated voltage and current signals are re-input into the double-layer restricted Boltzmann machine for reconstruction to obtain the reconstruction error. The reconstruction error is then compared with a preset threshold: when the reconstruction error is less than or equal to the preset threshold, the current switching state of the capacitor bank is maintained; when the reconstruction error is greater than the preset threshold, new capacitor switching parameters are generated and the switching state of the capacitor bank is adjusted.
[0007] In a further improvement to the first aspect, the process of obtaining standardized input data specifically includes: Configure the sampling frequency, time base, and quantization bit depth; Establish voltage and current acquisition channels, complete analog signal acquisition, anti-aliasing filtering, analog-to-digital conversion and time stamping, and obtain the original voltage sequence and the original current sequence. Baseline correction and channel synchronization are performed on the original voltage sequence and the original current sequence; After baseline correction and channel synchronization, the voltage and current sequences are segmented and normalized according to a set window, and the statistics are calculated and standardized. Finally, they are spliced together to generate standardized input data.
[0008] In a further improvement to the first aspect, the process of constructing the double-layer confined Boltzmann machine specifically includes: Set the learning rate, number of steps for comparison divergence, batch size, and number of iteration rounds; Initialize the weight matrices and bias vectors of the first-layer Restricted Boltzmann Machine and the second-layer Restricted Boltzmann Machine to small random values with zero mean; The standardized input data is input into the first layer restricted Boltzmann machine in batches, and the contrastive divergence algorithm is run to update the weight matrix and bias vector of the first layer until the stopping condition is met. The activation vectors of the hidden layers of the first layer Restricted Boltzmann Machine are batched into the first layer hidden feature set, which is used as the training data for the second layer Restricted Boltzmann Machine. The first layer of hidden features is input into the second layer of restricted Boltzmann machine in batches, and the contrastive divergence algorithm is run to update the weight matrix and bias vector of the second layer until the stopping condition is met. The parameters of the first-layer restricted Boltzmann machine and the second-layer restricted Boltzmann machine are fixed after training to form a two-layer restricted Boltzmann machine.
[0009] In a further improvement to the first aspect, the process of generating deep latent feature vectors specifically includes: Organize the standardized input data to form input batches and record the batch index and timestamp; Each input batch is written to the visible layer of the first-level restricted Boltzmann machine; The visible and hidden layers of the first-layer restricted Boltzmann machine are updated sequentially according to the preset number of sampling steps to obtain the first-layer hidden feature vector; The first hidden feature vector is written as input into the visible layer of the second restricted Boltzmann machine; The visible and hidden layer states of the second-layer restricted Boltzmann machine are updated according to the preset number of sampling steps, and the second-layer hidden feature vector is output. The second-layer hidden feature vector is the deep hidden feature vector.
[0010] In a further improvement to the first aspect, the process of mapping the deep hidden feature vector to generate capacitor switching parameters according to preset conditions specifically includes: Establish a capacitor parameter mapping module, defining the input fields as deep implicit feature vector, batch index and time stamp, and defining the output fields as capacitor group number, phase, switching command and target time; Load the capacitor bank configuration table, which includes capacitor bank number, phase, rated capacity, allowed operating status, minimum switching time interval and protection waiting time; Perform dimension normalization and channel alignment on the deep latent feature vectors to form a mapped input vector; Calculate the candidate vector of the switching parameters based on the preset parameter mapping relationship; Candidate vectors are checked and selected in sequence according to phase consistency, minimum switching time interval, protection waiting time and mutual exclusion group constraints; The candidate vectors that pass the verification are encoded according to the field order to generate capacitor switching parameters.
[0011] In a further improvement to the first aspect, the process of transmitting the capacitor switching parameters to the capacitor compensation control hardware to trigger the relay action specifically includes: Configure the control interface of the double-layer restricted Boltzmann machine and establish a communication link with the capacitor compensation control hardware; Define the field order and length of the control frame, wherein the fields include frame header, device address, timestamp, command field and parameter field; The parameter fields are encoded according to the capacitor switching parameters, and a control frame is generated. The control frame is sent to the capacitor compensation control hardware through the control interface, and the command is issued. The switching execution process is triggered in the capacitor compensation control hardware, and the control hardware module receives control commands and triggers relay actions.
[0012] In a further improvement to the first aspect, the process of re-inputting the compensated voltage and current signals into the double-layer restricted Boltzmann machine for reconstruction specifically includes: Standardized input data is generated from the compensated voltage and current signals according to the preprocessing and standardization rules of the data acquisition and standardization module. The standardized input data is input into the first layer restricted Boltzmann machine to obtain the first layer hidden feature vector; The first hidden feature vector is input into the second restricted Boltzmann machine to obtain the second hidden feature vector. The reconstruction sequence is generated sequentially from the second layer to the first layer and then to the input layer according to the reconstruction process. The reconstruction error of the input layer is calculated based on the preset error measurement rules; The reconstruction error is compared with a preset threshold to generate a comparison result.
[0013] Read the generated comparison results: When the comparison result is not exceeded, a hold command is issued and the current capacitor bank switching configuration is maintained. When the comparison result exceeds the threshold, the parameter recalculation process is triggered. The capacitor parameter mapping module is called to generate new capacitor switching parameters. The capacitor switching parameters are encoded into control frames and sent to the capacitor compensation control hardware through the control interface. The capacitor group switching configuration is adjusted and the status change is recorded.
[0014] Further improvements to the first aspect include setting up a recording and backtracking sub-process, which specifically includes: Establish a log table structure and set a time base; record sampling parameters, channel identifiers, and window indexes in the data acquisition and standardization module; In the two-layer restricted Boltzmann machine modeling module, the model version, training epoch, and parameter check code are recorded; in the deep feature extraction module, the batch index and the summary identifier of the deep latent feature vector are recorded. The capacitor switching parameters and generation time are recorded in the capacitor parameter mapping module; the control frame identifier, transmission time and response code are recorded in the control command execution module. The reconstruction evaluation and closed-loop adjustment module records reconstruction errors and threshold versions, switching status changes and effective times; it also generates playback sequences in chronological order and archives them.
[0015] A second aspect of the present invention provides a transformer capacitance compensation current-carrying system, which automatically executes the deep learning-based transformer capacitance compensation current-carrying method described in the first aspect above. The system includes: The data acquisition and standardization module configures sampling parameters, including sampling frequency, time base, and quantization bits. After configuring the sampling parameters, voltage and current acquisition channels are established to complete analog quantity acquisition, anti-aliasing filtering, analog-to-digital conversion, and time stamping to obtain the original voltage and current sequences. The original voltage and current sequences are then baseline-corrected and synchronized. After baseline correction and synchronization, the data is segmented and normalized according to a set window, and statistics are calculated and standardized. Finally, the data is spliced together to generate standardized input data. The two-layer restricted Boltzmann machine modeling module initializes the first-layer and second-layer restricted Boltzmann machines, sets the weight parameters and bias parameters, and uses the contrastive divergence algorithm to perform unsupervised training on the first-layer and second-layer restricted Boltzmann machines respectively. It then updates the weight parameters and bias parameters of each layer to complete the modeling of the first-layer and second-layer restricted Boltzmann machines. The deep feature extraction module organizes the standardized input data obtained from the data acquisition and standardization module into input batches and records the batch index and time stamp; each input batch is written into the visible layer of the first layer Restricted Boltzmann Machine; the visible and hidden layer states of the first layer Restricted Boltzmann Machine are updated sequentially according to a preset number of sampling steps to obtain the first layer hidden feature vector; the first layer hidden feature vector is used as input and written into the visible layer of the second layer Restricted Boltzmann Machine; the visible and hidden layer states of the second layer Restricted Boltzmann Machine are updated according to a preset number of sampling steps, and the second layer hidden feature vector is output, which is the deep latent feature vector; The capacitor parameter mapping module is established by defining the input fields as deep implicit feature vectors, batch indexes, and timestamps, and the output fields as capacitor group number, phase, switching command, and target time. The module loads the capacitor group configuration table, which includes capacitor group number, phase, rated capacity, allowed operating status, minimum switching interval, and protection waiting time. Dimensional normalization and channel alignment are performed on the deep implicit feature vectors to form a mapped input vector. Candidate vectors for switching parameters are calculated based on preset parameter mapping relationships. Candidate vectors are checked and filtered according to phase consistency, minimum switching interval, protection waiting time, and mutual exclusion group constraints. The candidate vectors that pass the checks are encoded according to the field order to generate capacitor switching parameters. The control command execution module configures the control interface of the dual-layer restricted Boltzmann machine and establishes a communication link with the capacitor compensation control hardware; defines the field order and length of the control frame, including a frame header, device address, timestamp, command field, and parameter field; encodes the parameter field according to the capacitor switching parameters and generates a control frame; sends the control frame to the capacitor compensation control hardware through the control interface and completes the command issuance; triggers the switching execution process in the capacitor compensation control hardware, and receives the control command through the control hardware module and triggers the relay action.
[0016] The reconstruction evaluation and closed-loop adjustment module generates standardized input data from the compensated voltage and current signals according to the preprocessing and standardization rules of the data acquisition and standardization module. This standardized input data is then input into a first-layer restricted Boltzmann machine to obtain a first-layer hidden feature vector. The first-layer hidden feature vector is then input into a second-layer restricted Boltzmann machine to obtain a second-layer hidden feature vector. A reconstruction sequence is generated sequentially from the second layer to the first layer and then to the input layer according to the reconstruction process. The reconstruction error of the input layer is calculated based on preset error measurement rules. The reconstruction error is compared with a preset threshold to generate a comparison result. The generated comparison result is read. If the comparison result does not exceed the threshold, a hold command is issued to maintain the current capacitor bank switching configuration. If the comparison result exceeds the threshold, a parameter recalculation process is triggered, calling the capacitor parameter mapping module to generate new capacitor switching parameters. These parameters are encoded into control frames and sent to the capacitor compensation control hardware via the control interface to adjust the capacitor bank switching configuration and record the state changes.
[0017] In the second aspect of further improvement, the data acquisition and standardization module specifically includes: Configure sampling frequency, time base, and quantization bit depth to establish voltage and current acquisition channels; acquire analog voltage and analog current, perform anti-aliasing filtering and analog-to-digital conversion, and add time stamps to obtain the original voltage and current sequences; perform baseline correction and channel synchronization on the original voltage and current sequences to form aligned voltage and current sequences; segment the aligned voltage and current sequences according to a preset window length and step size, and record the segment number and start and end times to obtain segmented voltage and current sequences; perform per-unit amplitude normalization on the segmented voltage and current sequences using the voltage and current base values; calculate intra-segment statistics and perform zero-mean and unit-variance standardization to generate standardized voltage and current sequences; concatenate the standardized voltage and current sequences in chronological order along the channel dimension to form standardized input data.
[0018] In a further improvement in the second aspect, the training process of the double-layer restricted Boltzmann machine is specifically as follows: The structure of a first-layer Restricted Boltzmann Machine (RBM) and a second-layer RBM is established, and the number of visible and hidden units in each layer is determined. The learning rate, contrastive divergence steps, batch size, and number of iterations are set. The weight matrices and bias vectors of the first-layer and second-layer RBMs are initialized to small random values with zero mean. Standardized input data is input into the first-layer RBM in batches, and the contrastive divergence algorithm is run to update the parameters of the first layer until the stopping condition is met. The activation vectors of the hidden layers of the first-layer RBM are batched into the first-layer hidden feature set and used as the training data for the second-layer RBM. The first-layer hidden feature set is input into the second-layer RBM in batches, and the contrastive divergence algorithm is run to update the parameters of the second layer until the stopping condition is met. The parameters of the first-layer and second-layer RBMs are fixed after training to form a two-layer RBM model. The stopping condition is that the training number is satisfied, the preset reconstruction error target is reached, or the performance of the validation set no longer improves.
[0019] In the second aspect of further improvement, the deep feature extraction module specifically comprises: Standardized input data is organized into batches according to window order, and batch indices and timestamps are recorded. Each input batch is written into the visible layer of the first Restricted Boltzmann Machine (RBM). The visible layer of the first RBM consists of several real-valued neurons, used to receive standardized electrical signals with the same dimension as the input vector. These neurons are fully connected to the hidden layer neurons through a weight matrix. The states of the first visible layer and the hidden layer are updated sequentially according to a preset number of sampling steps to obtain the first hidden state vector. The first hidden state vector is written into the visible layer of the second RBM. The visible layer of the second RBM consists of multiple neuron units, usually represented in vector form. Each neuron corresponds to a feature dimension in the hidden feature vector output by the first RBM after training. The overall structure is an input structure with the same dimension as the output of the first hidden layer. This visible layer can be composed of real-valued or multi-scale neurons to adapt to the deep features extracted from the first layer, supporting diverse expressions of complex perturbations, harmonics, and unbalanced components at different time scales. Each neuron in the visible layer is connected to all neurons in the second hidden layer through a structurally adjustable weight matrix. The weight matrix can introduce sparse connection rules or regularization mechanisms to improve the ability to suppress feature redundancy and the stability of model training. The states of the second visible layer and the hidden layer are updated according to a preset number of sampling steps, and the second hidden state vector is output as the deep hidden feature vector.
[0020] In a further improvement in the second aspect, the capacitance parameter mapping module includes: The input fields are defined as deep implicit feature vectors, batch indexes, and timestamps. The output fields are defined as capacitor bank number, phase, switching command, and target time. A capacitor bank configuration table containing capacitor bank number, phase, rated capacity, allowed operating status, minimum switching time interval, and protection waiting time is loaded. When generating switching parameters, the capacitor parameter mapping module performs phase consistency checks, mutual exclusion checks, and control feasibility verification based on this configuration table to ensure that the output switching parameters meet actual engineering constraints. Dimensional normalization and channel alignment are performed on the deep implicit feature vectors to form a mapping output that can be used to generate capacitor switching parameters. The input vector is used to calculate candidate vectors for switching parameters based on a preset parameter mapping relationship. Candidate vectors are checked and selected in sequence according to phase consistency, minimum switching time interval, protection waiting time, and mutual exclusion group constraints. The candidate vectors that pass the check are encoded into capacitor switching parameters according to the field order. The candidate vector refers to a set of capacitor switching parameter expressions with candidate qualifications generated by the restricted Boltzmann machine model through the capacitor parameter mapping module after receiving the deep implicit feature vector. Each candidate vector contains fields such as capacitor group number, target phase, control command, and target time, which are used to form the parameter fields of the control frame.
[0021] In a further improvement in the second aspect, the control instruction execution module specifically comprises: Configure the control interface of the restricted Boltzmann machine and establish a communication link with the capacitor compensation control hardware. Define the order and length of the control frame fields, which include a frame header, device address, timestamp, command field, and parameter field. Encode the parameter field according to the capacitor switching parameters and generate a control frame. Send the control frame to the capacitor compensation control hardware through the control interface and trigger the switching execution process on the device side to receive control commands and trigger relay actions through the control hardware module.
[0022] In the second aspect of further improvement, the reconstruction evaluation and closed-loop adjustment module specifically includes: The compensated voltage and current signals are processed according to the preprocessing and standardization rules of the data acquisition and standardization module to generate standardized input data. These data are then sequentially input into the first-layer restricted Boltzmann machine and the second-layer restricted Boltzmann machine to generate a reconstruction sequence according to the reconstruction process. The reconstruction error of the input layer is calculated according to the preset error measurement rules and compared with a preset threshold to generate a comparison result. A reconstruction error threshold is set and the threshold version and update time are recorded. The comparison result is read. When the comparison result is within the threshold, a hold command is issued to maintain the current capacitor bank switching configuration. When the comparison result exceeds the threshold, a parameter recalculation process is triggered. The capacitor parameter mapping module is called to generate new capacitor switching parameters. The capacitor switching parameters are encoded into control frames and sent to the capacitor compensation control hardware through the control interface to update the capacitor bank switching configuration and record the status change.
[0023] A third aspect of the present invention provides an electronic device comprising a processor and a memory storing computer program instructions; wherein the processor, when executing the computer program instructions, implements the deep learning-based transformer capacitance compensation current-carrying method described in the first aspect.
[0024] Beneficial effects: This invention first constructs standardized input data under unified sampling, segmentation, per-unitization, and standardization rules. It then uses a two-layer restricted Boltzmann machine for layer-by-layer training and inference to obtain a deep implicit feature vector with stable characterization capabilities for harmonics, non-stationary disturbances, and three-phase imbalance. During parameter generation, a capacitor parameter mapping module is set up to structurally map the deep implicit feature vector into a parameter set containing capacitor group numbers, phases, switching commands, and target times. Engineering constraints such as minimum switching time intervals, phase consistency, and mutually exclusive groups are checked within the mapping link to reduce unnecessary switching and command conflicts. In the execution phase, control... The interface and control frame field order are directly linked with the capacitor compensation control hardware through response, timeout, and retransmission mechanisms, enabling deterministic issuance and execution confirmation of capacitor switching parameters. In the post-compensation evaluation stage, the same restricted Boltzmann machine is used to reconstruct the real-time signal, calculate the reconstruction error, and compare it with a preset threshold. The switching status is adaptively updated according to the "hold / recalculate-issue" process, forming a closed-loop judgment consistent with feature modeling. Simultaneously, a recording and backtracking sub-process is set up to structurally retain sampling configurations, model versions, feature summaries, capacitor switching parameters, control frames, and reconstruction errors, supporting operational auditing and problem localization. Overall, this invention has significant advantages in decision consistency, execution determinism, and adaptability to complex operating conditions, making it suitable for engineering capacitor compensation applications in distribution network transformers. Attached Figure Description
[0025] Figure 1 This is a flowchart of the transformer capacitor compensation current-carrying method based on deep learning proposed in this invention.
[0026] Figure 2 This is a structural diagram of the deep learning-based capacitance compensation system proposed in this invention. Detailed Implementation
[0027] In the following description, numerous specific details are set forth in order to provide a more thorough understanding of the invention. However, it will be apparent to those skilled in the art that the invention can be practiced without one or more of these details. In other instances, certain technical features well-known in the art have not been described in order to avoid obscuring the invention.
[0028] refer to Figures 1 to 2This embodiment discloses a transformer capacitor compensation current-carrying system based on deep learning. It combines unsupervised feature modeling of a two-layer restricted Boltzmann machine with closed-loop judgment driven by reconstruction error. It focuses on an integrated process of "standardized input data - deep hidden feature vector - capacitor parameter mapping - control interface execution - reconstruction error threshold comparison". It addresses the problems in the prior art such as inconsistent data pipeline, unrobust feature representation, lack of structured constraints in the generation of switching parameters, non-standard command issuance interface, and lack of unified metric for post-compensation evaluation. It proposes a capacitor compensation method for field working conditions.
[0029] In this embodiment, the transformer capacitor compensation current-carrying system consists of the following modules: The data acquisition and standardization module configures sampling parameters, including sampling frequency, time base, and quantization bit depth. After configuring the sampling parameters, voltage and current acquisition channels are established to complete analog signal acquisition, anti-aliasing filtering, analog-to-digital conversion, and time stamping to obtain the original voltage and current sequences. Baseline correction and channel synchronization are performed on the original voltage and current sequences. After baseline correction and synchronization, the data is segmented and normalized according to a set window, and statistics are calculated and standardized. Finally, the data is spliced together to generate standardized input data.
[0030] The two-layer Restricted Boltzmann Machine (RBM) modeling module initializes the first-layer RBM and the second-layer RBM, sets the weight parameters and bias parameters, and uses the contrastive divergence algorithm to perform unsupervised training on the first-layer RBM and the second-layer RBM respectively. The weight parameters and bias parameters of each layer are then updated to complete the modeling of the first-layer RBM and the second-layer RBM.
[0031] The deep feature extraction module organizes the standardized input data obtained from the data acquisition and standardization module into input batches and records the batch index and time stamp; each input batch is written into the visible layer of the first layer Restricted Boltzmann Machine; the visible and hidden layer states of the first layer Restricted Boltzmann Machine are updated sequentially according to a preset number of sampling steps to obtain the first layer hidden feature vector; the first layer hidden feature vector is used as input and written into the visible layer of the second layer Restricted Boltzmann Machine; the visible and hidden layer states of the second layer Restricted Boltzmann Machine are updated according to a preset number of sampling steps, and the second layer hidden feature vector is output. The second layer hidden feature vector is the deep latent feature vector.
[0032] The capacitor parameter mapping module is established by defining the input fields as deep implicit feature vectors, batch indexes, and timestamps, and the output fields as capacitor group number, phase, switching command, and target time. It loads the capacitor group configuration table, which includes capacitor group number, phase, rated capacity, allowed operating status, minimum switching interval, and protection waiting time. The deep implicit feature vectors are normalized and aligned to form a mapped input vector. Candidate vectors for switching parameters are calculated based on preset parameter mapping relationships. Candidate vectors are checked and selected according to phase consistency, minimum switching interval, protection waiting time, and mutual exclusion group constraints. The checked candidate vectors are then encoded according to field order to generate capacitor switching parameters.
[0033] The control command execution module configures the control interface of the dual-layer restricted Boltzmann machine and establishes a communication link with the capacitor compensation control hardware; defines the field order and length of the control frame, including the frame header, device address, timestamp, command field, and parameter field; encodes the parameter field according to the capacitor switching parameters and generates a control frame; sends the control frame to the capacitor compensation control hardware through the control interface and completes the command issuance; triggers the switching execution process in the capacitor compensation control hardware, and receives control commands through the control hardware module and triggers relay actions.
[0034] The reconstruction evaluation and closed-loop adjustment module generates standardized input data from the compensated voltage and current signals according to the preprocessing and standardization rules of the data acquisition and standardization module. This standardized input data is then input into a first-layer restricted Boltzmann machine to obtain the first-layer hidden feature vector. The first-layer hidden feature vector is then input into a second-layer restricted Boltzmann machine to obtain the second-layer hidden feature vector. Following the reconstruction process, a reconstruction sequence is generated sequentially from the second layer to the first layer and then to the input layer. The reconstruction error of the input layer is calculated according to preset error measurement rules. The reconstruction error is compared with a preset threshold to generate a comparison result. The generated comparison result is read. If the comparison result does not exceed the threshold, a hold command is issued to maintain the current capacitor bank switching configuration. If the comparison result exceeds the threshold, a parameter recalculation process is triggered, calling the capacitor parameter mapping module to generate new capacitor switching parameters. These parameters are encoded into control frames and sent to the capacitor compensation control hardware via the control interface to adjust the capacitor bank switching configuration and record the state changes.
[0035] In this embodiment, the data acquisition and standardization module specifically comprises: Configure the sampling frequency, time base, and quantization bit depth to establish voltage and current acquisition channels; Analog voltage and analog current are acquired, anti-aliasing filtering and analog-to-digital conversion are performed, and time stamps are added to obtain the original voltage sequence and the original current sequence. Baseline correction and channel synchronization are performed on the original voltage and current sequences to form aligned voltage and current sequences. The aligned voltage sequence and aligned current sequence are segmented according to the preset window length and step size, and the segment number and start and end time are recorded to obtain the segmented voltage sequence and segmented current sequence. The amplitude of the segmented voltage and current sequences is normalized per unit based on the voltage base value and the current base value; Calculate the within-segment statistic and perform zero-mean and unit-variance standardization:
[0036] in, This represents the standardized value after the normalization operation. Represents the original input value. This represents the mean of the data segment. This represents the standard deviation of the data segment.
[0037] The voltage and current normalization sequences are spliced together in chronological order along the channel dimension to form normalized input data.
[0038] In this embodiment, the double-layer confined Boltzmann machine modeling module is specifically as follows: Establish the structures of the first-layer restricted Boltzmann machine and the second-layer restricted Boltzmann machine, and determine the number of visible units and the number of hidden units for each; Set the training hyperparameters, including learning rate, contrastive divergence steps, batch size, and number of iterations; Initialize the weight matrices and bias vectors of the first-layer Restricted Boltzmann Machine and the second-layer Restricted Boltzmann Machine to small random values with zero mean; During training, the Restricted Boltzmann Machine (RBM) performs unsupervised learning with the objective of minimizing the following energy function:
[0039] in, Represents the visible layer node With hidden layer nodes The energy function value corresponding to the combination state, This represents the bias parameter of the visible layer node i. Represents hidden layer nodes bias parameters Represents node i and node Connection weights between them and These represent the node states of the visible and hidden layers, respectively. This function guides the model to progressively optimize its internal weights and biases after inputting standardized data, thereby extracting effective hidden feature structures.
[0040] The standardized input data obtained from the data acquisition and standardization module is input into the first layer of the restricted Boltzmann machine in batches, and the contrastive divergence algorithm is run to update the weight matrix and bias vector of the first layer until the stopping condition is met. The activation vectors of the hidden layers of the first layer Restricted Boltzmann Machine are batched into the first layer hidden feature set, which is used as the training data for the second layer Restricted Boltzmann Machine. The first layer of hidden features is input into the second layer of restricted Boltzmann machine in batches, and the contrastive divergence algorithm is run to update the weight matrix and bias vector of the second layer until the stopping condition is met. The parameters of the first and second layers are fixed after training to form a two-layer restricted Boltzmann machine model.
[0041] In this embodiment, the deep feature extraction module specifically comprises: The standardized input data obtained by the data acquisition and standardization module is used to form input batches and record batch indexes and timestamps. Each input batch is written to the visible layer of the first-level restricted Boltzmann machine; The visible and hidden layers of the first-layer restricted Boltzmann machine are updated sequentially according to the preset number of sampling steps to obtain the first-layer hidden feature vector; The first hidden feature vector is written as input into the visible layer of the second restricted Boltzmann machine; Update the visible and hidden layer states of the second-layer restricted Boltzmann machine according to the preset number of sampling steps, and output the second-layer hidden feature vector, which is the deep hidden feature vector.
[0042] In this embodiment, the capacitance parameter mapping module specifically comprises: Establish a capacitor parameter mapping module, defining the input fields as deep implicit feature vector, batch index and time stamp, and defining the output fields as capacitor group number, phase, switching command and target time; Load the capacitor bank configuration table, which includes the capacitor bank number, phase, rated capacity, allowed operating status, minimum switching interval and protection waiting time; Dimension normalization and channel alignment are performed on the deep latent feature vectors to form a mapped input vector that can be used to generate capacitor switching parameters; Calculate candidate vectors for switching parameters based on preset parameter mapping relationships; check and filter the candidate vectors in sequence according to phase consistency, minimum switching time interval, protection waiting time and mutual exclusion group constraints; The candidate vectors that pass the verification are encoded according to the field order to generate capacitor switching parameters.
[0043] In this embodiment, the control instruction execution module specifically comprises: Configure the control interface of the restricted Boltzmann machine and establish a communication link with the capacitor compensation control hardware. The communication link is used to support the encapsulation, transmission and response feedback of control frames. Define the field order and length of the control frame. The fields include frame header, device address, timestamp, command field, and parameter field. Encode the parameter field according to the capacitor switching parameters and generate the control frame. The control frame is sent to the capacitor compensation control hardware through the control interface; the switching execution process is triggered in the capacitor compensation control hardware, which drives the control hardware module to receive control commands and execute relay actions, ensuring the real-time and deterministic nature of the control process.
[0044] In this embodiment, the reconstruction evaluation and closed-loop adjustment module specifically includes: Standardized input data is generated from the compensated voltage and current signals according to the preprocessing and standardization rules of the data acquisition and standardization module. The standardized input data is fed into the first layer of the restricted Boltzmann machine to obtain the first layer of hidden feature vectors; The first-layer hidden feature vector is input into the second-layer restricted Boltzmann machine to obtain the second-layer hidden feature vector; The reconstruction sequence is generated sequentially from the second layer to the first layer and then to the input layer according to the reconstruction process. The reconstruction error of the input layer is calculated based on the preset error measurement rules; The reconstruction error is compared with a preset threshold to generate a comparison result. When the comparison result is not exceeded, a hold command is issued and the current capacitor bank switching configuration is maintained. When the comparison result exceeds the threshold, the parameter recalculation process is triggered. The capacitor parameter mapping module is called to generate new capacitor switching parameters. The capacitor switching parameters are encoded into control frames and sent to the capacitor compensation control hardware through the control interface. The capacitor group switching configuration is adjusted and the status change is recorded.
[0045] In this embodiment, a recording and backtracking sub-process is set in the method flow. The recording and backtracking sub-process includes: establishing a log table structure and setting a time base. The data acquisition and standardization module records sampling parameters, channel identifiers, and window indexes; the two-layer restricted Boltzmann machine modeling module records model version, training rounds, and parameter check codes. The deep feature extraction module records the batch index and the summary identifier of the deep hidden feature vector; The capacitor switching parameters and generation time are recorded in the capacitor parameter mapping module; The control command execution module records the control frame identifier, transmission time, and response code. The reconstruction evaluation and closed-loop adjustment module records reconstruction errors and threshold versions; it generates playback sequences in chronological order and archives them.
[0046] To verify the feasibility of this invention, the deep learning-based transformer capacitor compensation current-carrying system disclosed in the above embodiments was deployed in a smart power quality management subsystem of a real power distribution system. This system includes three sets of controllable capacitor switching devices connected to three different branch points of a 10kV distribution line. It is used for rapid response and automatic compensation of reactive power fluctuations under typical load disturbance scenarios, thereby improving the system power factor and voltage stability.
[0047] In this embodiment, the acquisition nodes are installed on the low-voltage side of three transformers, each equipped with voltage and current sampling modules, and the synchronous sampling frequency is set to 10kHz with a data acquisition precision of 12 bits. The acquired raw analog signals are processed by an anti-aliasing filter and then converted into digital signals in real time by a high-performance analog-to-digital converter, forming a time-aligned multi-channel input data stream.
[0048] For the collected voltage and current signals, the system performs normalization and standardization preprocessing operations. The amplitude of each unit value is normalized and then zero-mean standardization is performed to suppress the interference of amplitude fluctuations on feature extraction. The processed data is organized into a sliding window sequence with a length of 5 seconds and an overlap of 50%, and each segment serves as the input unit for the restricted Boltzmann machine model.
[0049] During the training phase, normal operating data was used as unsupervised training samples to complete the pre-training process of the two-layer Restricted Boltzmann Machine (RBM). The specific configuration was as follows: the first-layer RBM had 256 visible units and 128 hidden units; the second-layer RBM had an input dimension of 128 and an output dimension of 64. The Contrastive Divergence (CD-1) algorithm was used for training, with a learning rate of 0.01, a batch size of 128, and 100 training epochs. After obtaining a stable parameter matrix, the model was used to generate deep latent feature vectors and drive the capacitor switching module.
[0050] During actual operation, when significant load changes occur within a certain sampling period (e.g., centralized starting of motor clusters, sudden disconnection of inductive loads), this system extracts the deep feature vector of this data segment in real time and maps it to the capacitor parameter output module, automatically generating capacitor group number, phase, and switching command. After completing the control frame encoding, it is sent to the compensation device via the control interface to drive the corresponding capacitor switching action. The compensated signal is then input again into the restricted Boltzmann machine model for reconstruction. If the reconstruction error meets the set threshold condition (set to 0.015 in this experiment), the current compensation state is maintained; if it exceeds the threshold, the switching parameters are regenerated, and the next round of adjustment begins.
[0051] In this experiment, 15 load disturbance scenarios were selected for verification testing. The duration of each disturbance was approximately 8 to 15 seconds, and the system collected a total of approximately 3.2 GB of raw data. The results are shown in Table 1. Compared with the traditional fixed threshold voltage offset compensation scheme, the method proposed in this invention performs better in terms of response speed, power factor improvement, and overcompensation probability control.
[0052] Table 1. Performance Comparison of the Invention Method and Traditional Capacitor Switching Schemes
[0053] As can be seen from the table, the response delay of the method of the present invention is significantly reduced, from 220ms in the traditional scheme to 112ms, almost halved, significantly improving the system's rapid compensation capability. In terms of power factor control, the present invention achieves an average improvement of 12.3%, which is better than the 6.8% of the traditional method, demonstrating the adaptability of the restricted Boltzmann machine model to complex load scenarios.
[0054] Furthermore, in terms of control stability, the overcompensation trigger rate decreased from 9.6% to 2.1%, and the control frame false transmission rate also decreased by 69.2%, indicating that this method significantly improves both compensation accuracy and execution stability. Particularly regarding the error feedback mechanism, this method introduces reconstruction error as a control indicator, which remained below 0.01 in all 15 test sets, far exceeding the set threshold, demonstrating excellent model reconstruction capability, sensitive anomaly detection, and good generalization ability and robustness.
[0055] In summary, data verification under real substation operating conditions demonstrates that the deep learning-based transformer capacitor compensation current-carrying system proposed in this invention can achieve a dynamic reactive power compensation control scheme with high precision, low latency, and low overcompensation rate. It exhibits significant advantages in operational stability, power quality improvement, and system compatibility, providing new ideas and technical support for intelligent compensation systems in medium-voltage distribution networks.
[0056] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A transformer capacitor compensation current-carrying method based on deep learning, characterized in that, Includes the following steps: Real-time voltage and current signals are collected during transformer operation, and the real-time voltage and current signals are normalized to obtain standardized input data. Construct a two-layer Restricted Boltzmann Machine (RBM), set weight parameters and bias parameters, and perform unsupervised training on the first-layer RBM and the second-layer RBM respectively, updating the weight parameters and bias parameters of each layer; The standardized input data is input into the two-layer restricted Boltzmann machine to generate deep latent feature vectors. The deep hidden feature vectors are mapped to generate capacitor switching parameters according to preset conditions; The capacitor switching parameters are transmitted to the capacitor compensation control hardware to trigger the relay action, complete this round of compensation, and collect the compensated voltage and current signals. The compensated voltage and current signals are then input again into the double-layer restricted Boltzmann machine for reconstruction to obtain the reconstruction error, which is then compared with a preset threshold. When the reconstruction error is less than or equal to a preset threshold, the current switching state of the capacitor bank is maintained. When the reconstruction error is greater than a preset threshold, new capacitor switching parameters are generated and the capacitor bank switching status is adjusted.
2. The transformer capacitor compensation current-carrying method based on deep learning according to claim 1, characterized in that, The obtained standardized input data specifically includes: Configure the sampling frequency, time base, and quantization bit depth; Establish voltage and current acquisition channels, complete analog signal acquisition, anti-aliasing filtering, analog-to-digital conversion and time stamping, and obtain the original voltage sequence and the original current sequence. Baseline correction and channel synchronization are performed on the original voltage sequence and the original current sequence; After baseline correction and channel synchronization, the voltage and current sequences are segmented and normalized according to a set window, and the statistics are calculated and standardized. Finally, they are spliced together to generate standardized input data.
3. The transformer capacitor compensation current-carrying method based on deep learning according to claim 1, characterized in that, The construction of the bilayer confined Boltzmann machine specifically includes: Set the learning rate, number of steps for comparison divergence, batch size, and number of iteration rounds; Initialize the weight matrices and bias vectors of the first-layer Restricted Boltzmann Machine and the second-layer Restricted Boltzmann Machine to small random values with zero mean; The standardized input data is input into the first layer restricted Boltzmann machine in batches, and the contrastive divergence algorithm is run to update the weight matrix and bias vector of the first layer until the stopping condition is met. The activation vectors of the hidden layers of the first layer Restricted Boltzmann Machine are batched into the first layer hidden feature set, which is used as the training data for the second layer Restricted Boltzmann Machine. The first layer of hidden features is input into the second layer of restricted Boltzmann machine in batches, and the contrastive divergence algorithm is run to update the weight matrix and bias vector of the second layer until the stopping condition is met. The parameters of the first-layer restricted Boltzmann machine and the second-layer restricted Boltzmann machine are fixed after training to form a two-layer restricted Boltzmann machine.
4. The transformer capacitor compensation current-carrying method based on deep learning according to claim 1, characterized in that, The generation of deep latent feature vectors specifically includes: Organize the standardized input data to form input batches and record the batch index and timestamp; Each input batch is written to the visible layer of the first-level restricted Boltzmann machine; The visible and hidden layers of the first-layer restricted Boltzmann machine are updated sequentially according to the preset number of sampling steps to obtain the first-layer hidden feature vector; The first hidden feature vector is written as input into the visible layer of the second restricted Boltzmann machine; The visible and hidden layer states of the second-layer restricted Boltzmann machine are updated according to the preset number of sampling steps, and the second-layer hidden feature vector is output. The second-layer hidden feature vector is the deep hidden feature vector.
5. The transformer capacitor compensation current-carrying method based on deep learning according to claim 1, characterized in that, The deep hidden feature vector is mapped to generate capacitor switching parameters according to preset conditions, specifically including: Establish a capacitor parameter mapping module, defining the input fields as deep implicit feature vector, batch index and time stamp, and defining the output fields as capacitor group number, phase, switching command and target time; Load the capacitor bank configuration table, which includes capacitor bank number, phase, rated capacity, allowed operating status, minimum switching time interval and protection waiting time; Perform dimension normalization and channel alignment on the deep latent feature vectors to form a mapped input vector; Calculate the candidate vector of the switching parameters based on the preset parameter mapping relationship; Candidate vectors are checked and selected in sequence according to phase consistency, minimum switching time interval, protection waiting time and mutual exclusion group constraints; The candidate vectors that pass the verification are encoded according to the field order to generate capacitor switching parameters.
6. The transformer capacitor compensation current-carrying method based on deep learning according to claim 1, characterized in that, The capacitor switching parameters are transmitted to the capacitor compensation control hardware to trigger the relay action, specifically including: Configure the control interface of the double-layer restricted Boltzmann machine and establish a communication link with the capacitor compensation control hardware; Define the field order and length of the control frame, wherein the fields include frame header, device address, timestamp, command field and parameter field; The parameter fields are encoded according to the capacitor switching parameters, and a control frame is generated. The control frame is sent to the capacitor compensation control hardware through the control interface, and the command is issued. The switching execution process is triggered in the capacitor compensation control hardware, and the control hardware module receives control commands and triggers relay actions.
7. The transformer capacitor compensation current-carrying method based on deep learning according to claim 1, characterized in that, The compensated voltage and current signals are then re-input into the double-layer restricted Boltzmann machine for reconstruction, specifically including: Standardized input data is generated from the compensated voltage and current signals according to the preprocessing and standardization rules of the data acquisition and standardization module. The standardized input data is input into the first layer restricted Boltzmann machine to obtain the first layer hidden feature vector; The first hidden feature vector is input into the second restricted Boltzmann machine to obtain the second hidden feature vector. The reconstruction sequence is generated sequentially from the second layer to the first layer and then to the input layer according to the reconstruction process. The reconstruction error of the input layer is calculated based on the preset error measurement rules; The reconstruction error is compared with a preset threshold to generate a comparison result; Read the generated comparison results: When the comparison result is not exceeded, a hold command is issued and the current capacitor bank switching configuration is maintained. When the comparison result exceeds the threshold, the parameter recalculation process is triggered. The capacitor parameter mapping module is called to generate new capacitor switching parameters. The capacitor switching parameters are encoded into control frames and sent to the capacitor compensation control hardware through the control interface. The capacitor group switching configuration is adjusted and the status change is recorded.
8. The transformer capacitor compensation current-carrying method based on deep learning according to claim 1, characterized in that, It also includes a setting record and backtracking sub-process, which specifically includes: Establish a log table structure and set a time base; record sampling parameters, channel identifiers, and window indexes in the data acquisition and standardization module; In the two-layer restricted Boltzmann machine modeling module, the model version, training epoch, and parameter check code are recorded; in the deep feature extraction module, the batch index and the summary identifier of the deep latent feature vector are recorded. The capacitor switching parameters and generation time are recorded in the capacitor parameter mapping module; the control frame identifier, transmission time and response code are recorded in the control command execution module. The reconstruction evaluation and closed-loop adjustment module records reconstruction errors and threshold versions, switching status changes and effective times; it also generates playback sequences in chronological order and archives them.
9. A transformer capacitor compensation current-carrying system, characterized in that, The system is used to automatically execute the deep learning-based transformer capacitor compensation current-carrying method according to any one of claims 1 to 8, the system comprising: Data acquisition and standardization module; the data acquisition and standardization module is used to acquire real-time voltage signals and real-time current signals during transformer operation, and to normalize the real-time voltage signals and real-time current signals to obtain standardized input data; A two-layer restricted Boltzmann machine (RBM) modeling module is used to initialize a first-layer RBM and a second-layer RBM, set weight parameters and bias parameters, perform unsupervised training on the first-layer RBM and the second-layer RBM respectively using a contrastive divergence algorithm, update the weight parameters and bias parameters of each layer, and finally construct a two-layer RBM. A deep feature extraction module; the deep feature extraction module is used to input the standardized input data into a two-layer restricted Boltzmann machine to generate deep latent feature vectors; Capacitor parameter mapping module; The capacitor parameter mapping module is used to input the deep hidden feature vector into the capacitor parameter mapping module to generate capacitor switching parameters; A control command execution module; the control command execution module is used to transmit the capacitor switching parameters to the capacitor compensation control hardware through the control interface of the restricted Boltzmann machine, and to receive control commands and trigger relay actions through the control hardware module. The reconstruction evaluation and closed-loop adjustment module is used to re-input the compensated voltage signal and current signal into the double-layer restricted Boltzmann machine for reconstruction, obtain the reconstruction error, and compare the reconstruction error with a preset threshold. When the reconstruction error is less than or equal to the preset threshold, the current switching state of the capacitor bank is maintained. When the reconstruction error is greater than the preset threshold, new capacitor switching parameters are generated and the switching state of the capacitor bank is adjusted.
10. An electronic device, characterized in that, include: Processor and memory storing computer program instructions; When the processor executes the computer program instructions, it implements the deep learning-based transformer capacitor compensation current-carrying method as described in any one of claims 1 to 8.