An energy storage control method for reducing transformer loss based on an LSTM energy storage on a power grid side

By using an LSTM-based energy storage control method, accurate modeling of transformer hysteresis memory characteristics and precise control of loss-sensitive frequencies are achieved, solving the problems of increased transformer losses and shortened equipment lifespan in existing technologies, and realizing accurate prediction and adaptive control of transformer losses.

CN121308046BActive Publication Date: 2026-03-17TONGBIAN ELECTRIC APP +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511861657.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-03-17
Estimated Expiration
2045-12-11

AI Technical Summary

Technical Problem

Existing technologies cannot accurately model the hysteresis memory characteristics of transformers, resulting in insufficient accuracy in iron loss prediction, inability to optimize for loss-sensitive frequencies, and static control strategies that cannot adapt to individual equipment differences and changes in aging characteristics, leading to increased transformer losses and shortened equipment lifespan.

Method used

An LSTM-based energy storage control method is adopted, which uses a long short-term memory network with hysteresis memory embedding and correction layer for loss decomposition prediction. Combined with multi-head harmonic sensitivity decoding and online loss gradient perturbation, a rolling prediction optimization and control barrier mechanism is established to achieve precise control and adaptive capability of transformer loss.

Benefits of technology

It significantly improves the accuracy and stability of transformer loss prediction, reduces iron loss, copper loss and stray loss, extends equipment life, and ensures power quality and thermal safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121308046B_ABST
    Figure CN121308046B_ABST
Patent Text Reader

Abstract

The application discloses an energy storage control method for reducing transformer loss based on an LSTM power grid side energy storage, and relates to the technical field of power system automatic control, wherein three-phase voltage and current waveforms and related state information are acquired through data acquisition and feature construction, a long short-term memory network containing a hysteresis memory embedding and a correction layer is used to predict transformer loss decomposition, the hysteresis memory embedding is characterized by a discretized magnetization state vector and is updated with a magnetic zero event and a peak event. The marginal sensitivity and priority score of the amplitude and phase of each harmonic current are obtained. A real gradient is obtained by injecting an auditable perturbation, and small-step calibration is performed on the model parameters. An optimization problem with loss decomposition weighted sum as the target is established, a control barrier mechanism is used to define the constraint margin and implement constraint clipping. The harmonic frequency points are selected according to the priority score for injection. The method realizes the comprehensive optimization of iron loss, copper loss and stray loss, and significantly reduces the transformer loss under the premise of ensuring power quality and thermal safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system automation control technology, specifically an energy storage control method based on LSTM for grid-side energy storage to reduce transformer losses. Background Technology

[0002] With the rapid growth of new energy power generation and the increasing complexity of power load characteristics, grid-side transformers face operational challenges such as frequent load fluctuations, increased harmonic content, and deteriorating power factor, leading to a significant increase in transformer losses, exacerbated hot spot temperature rise, and shortened equipment lifespan. Grid-side energy storage systems, as flexible power regulation devices, provide a new technical approach to optimizing transformer losses.

[0003] In existing technologies, transformer loss control mainly employs static compensation or control strategies based on preset rules. Traditional reactive power compensation devices adjust the power factor through capacitor bank switching or static var compensators, but lack in-depth modeling of the transformer loss mechanism, failing to achieve precise loss minimization control. Some energy storage control methods employ harmonic compensation strategies based on instantaneous power theory, suppressing harmonics by calculating reference current and controlling inverter output. However, these methods aim to minimize total harmonic distortion, neglecting the differentiated impact of different frequency harmonics on transformer losses. Furthermore, some studies use model predictive control methods to achieve multi-objective optimization of energy storage, but the loss models used are mostly static estimates based on current electrical quantities, ignoring the hysteresis characteristics and magnetization path dependence of the transformer core.

[0004] Existing technologies optimize transformer losses through static loss models and traditional control algorithms, but they still have certain limitations. For example, the lack of modeling for hysteresis memory effect leads to insufficient accuracy in iron loss prediction; the control objective based on minimizing total harmonic distortion fails to optimize for loss-sensitive frequencies; static control strategies cannot adapt to individual differences in equipment and changes in aging characteristics; and real-time optimization under multiple constraints has high computational complexity and makes it difficult to guarantee system safety.

[0005] Therefore, there is an urgent need for an intelligent energy storage control method that can accurately model the hysteresis memory characteristics of transformers, achieve precise control of loss-sensitive frequency points, possess online adaptive capabilities, and ensure power quality and thermal safety. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the prior art and propose an energy storage control method based on LSTM to reduce transformer losses in grid-side energy storage, so as to solve the above-mentioned problems.

[0007] The objective of this invention is achieved through the following technical solution: an energy storage control method for reducing transformer losses based on LSTM grid-side energy storage. The method takes minimizing transformer losses as its direct control objective and is executed in conjunction with a grid-connected energy storage device and a measurement and acquisition device. It includes the following steps:

[0008] S1 Data Acquisition and Feature Construction: Collect three-phase voltage and current waveforms, extract the fundamental amplitude and phase, positive sequence component, negative sequence component, zero sequence component, and amplitude and phase of a preset set of harmonic orders, and obtain information related to oil temperature or hot spot temperature, ambient temperature, energy storage state of charge, primary equipment status, and topology status; estimate equivalent magnetic flux based on voltage and current and construct magnetization history-related features;

[0009] S2 Hysteresis Memory Prediction: The features obtained from S1 are input into a long short-term memory network containing hysteresis memory embedding and a correction layer. The hysteresis memory embedding is represented by an updatable discrete magnetization state vector and is updated with the zero and peak events of the magnetic field. The network outputs a transformer loss decomposition prediction for future time periods, including at least iron loss, copper loss and stray loss.

[0010] S3 Multi-head Harmonic Sensitivity Decoding: Based on a shared encoder, a multi-head decoder is set up so that each decoder corresponds to an element of a preset set of harmonic orders. The output shows the marginal sensitivity of the total loss to the amplitude and phase of each harmonic current and generates a priority score for control decision.

[0011] S4 Online Loss Gradient Perturbation and Estimation: In time slots where power quality and thermal safety meet preset margins, auditable perturbations with small amplitudes and short durations are injected into selected harmonic frequencies or fundamental reactive power channels, and cooling intervals are set for the same frequency. Within the perturbation window, the port active power change, port reactive power change, and hot spot temperature change rate are measured. The gradient of total loss with respect to the control quantity is estimated by combining the thermal model, and the parameters of the correction layer and multi-head decoder are calibrated online in small steps accordingly.

[0012] S5 Rolling Prediction Optimization and Constraint Execution: A rolling prediction optimization problem is established, with the weighted sum of losses during the prediction period as the objective function. Constraints are set for inverter apparent capacity, state of charge, power ramp-up, power quality indicators, hotspot temperature, and hotspot temperature change rate. A control barrier mechanism is used to implement constraint pruning. In this method, constraint redundancy is defined as the residual measure of the safety function constructed by the control barrier mechanism for the constrained variables relative to the corresponding threshold. The control quantities obtained include fundamental reactive power and the amplitude and phase injected into harmonic frequencies where the priority score reaches the preset threshold.

[0013] S6 Frequency Selective Injection and Three-Phase Decoupling: Select harmonic frequencies within a preset upper limit according to priority scoring to implement injection; when the grid-connected energy storage device has phase independent control capability, implement three-phase decoupling injection to suppress negative sequence components or zero sequence components.

[0014] S7 Carrier and Modulation Avoidance: Based on online identification or knowledge base, determine the carrier sensitive window related to spurious loss, adjust the carrier frequency, carrier phase or modulation depth of pulse width modulation to avoid the window, and maintain grid-connected stability;

[0015] S8 Control Strategy and Continuous Calibration: The control strategy takes power quality compliance as a hard constraint and aims to minimize total loss; the online loss gradient obtained from S4 is used for continuous calibration of the long short-term memory network and multi-head decoder to reduce the sum of iron loss, copper loss and stray loss.

[0016] Hysteresis memory embedding consists of Preisach-type raster vectors or equivalent discretized magnetization state vectors, and includes auxiliary variables reflecting low-frequency bias and remanent magnetization state; path consistency regularization is introduced during training or online learning to ensure that the output of samples with equal amplitude but different historical paths conforms to the hysteresis law.

[0017] The online loss gradient perturbation is generated using an orthogonal sequence method or a single-frequency single-pulse method, and is triggered in time slots with low load change rate, sufficient power quality margin, and stable hot spot temperature rise. Gradient estimation is achieved through recursive least squares or Bayesian linear regression, and the hot spot temperature change rate is obtained by fusing the thermal model and the filter.

[0018] Priority scoring comprehensively considers amplitude sensitivity, phase sensitivity, inverter harmonic injection cost factor and constraint margin. During control execution, only harmonic frequency points with scores reaching the preset threshold and whose number does not exceed the preset upper limit are selected for injection, while maintaining the power quality indicators to continuously meet the margin requirements of grid connection specifications.

[0019] The control barrier mechanism includes: constructing safety functions for total harmonic distortion, negative sequence components, hot spot temperature, and hot spot temperature change rate, respectively, so that the corresponding safety function is not lower than a preset threshold to indicate that the constraint is satisfied; during rolling prediction optimization and real-time execution, the control quantity is pruned according to the value of the safety function or a penalty term is introduced into the objective function to keep each safety function not lower than the corresponding threshold.

[0020] The method further includes: using a three-phase four-arm inverter or a multi-level grid-connected inverter as a grid-connected energy storage device during implementation, and allocating the apparent capacity in the active channel, fundamental reactive channel and harmonic channel in the control process, while setting an independent budget for the harmonic channel to ensure that it has injection capability during high loss sensitive periods.

[0021] Carrier and modulation avoidance identifies the correlation between spurious loss and carrier parameters online and adaptively adjusts the carrier and modulation strategy without introducing subsynchronous oscillation or subresonance risks, prioritizing the avoidance of spectral regions that lead to increased spurious loss.

[0022] The method includes harmonic budget management of the state of charge: reserving an energy window for harmonic and fundamental reactive power regulation in the state of charge limit, dynamically adjusting the energy allocation ratio according to priority scoring and constraint margin, and replenishing the state of charge through energy dispatch after the control demand ends.

[0023] The method coordinates with the operating cycle of on-load tap changers or capacitor banks: when it is predicted that the switching of primary equipment will cause inrush current or harmonic fluctuations, a phase-optimized canceling waveform is injected briefly before and after the operation to smooth the transition, reduce instantaneous copper losses and stray losses, and reduce the mechanical operating load of the primary equipment.

[0024] The online updates of the long short-term memory network and multi-head decoder adopt a combination of federated aggregation and local limiting adaptation: cross-site aggregation of model parameters or gradients without transmitting the original data, and local smooth updates of calibration layer parameters and multi-head decoder parameters; when measurement anomalies, communication loss of synchronization or protection device alarms are detected, the control strategy degenerates into a conservative mode mainly based on power factor support or voltage support.

[0025] The beneficial effects of this invention are:

[0026] This invention achieves accurate modeling of the magnetization path-dependent characteristics of transformers by embedding hysteresis memory into a long short-term memory network. This enables iron loss prediction to reflect the influence of low-frequency bias and historical remanence, overcoming the limitations of traditional static models that estimate based solely on current amplitude and phase. The hysteresis memory embedding employs an updatable discretized magnetization state vector, dynamically updated with zero and peak events, and uses path consistency regularization to ensure that the outputs of samples with the same amplitude but different historical paths conform to the hysteresis law, significantly improving the accuracy and stability of loss decomposition prediction.

[0027] The multi-head harmonic sensitivity decoding mechanism transforms the goal of minimizing losses into an executable frequency domain control quantity. By calculating the marginal sensitivity of total loss to amplitude and phase for each preset set of harmonic orders, and generating a priority score that comprehensively considers sensitivity and injection cost, the control strategy can selectively handle the harmonic frequencies that have the greatest impact on losses under power quality constraints. This realizes a shift from the traditional "minimizing total harmonic distortion" to "optimizing loss-sensitive frequencies," significantly improving the utilization efficiency of control resources.

[0028] The online loss gradient perturbation and estimation mechanism injects small-amplitude, short-duration, auditable perturbations in time slots when power quality and thermal safety meet preset margins. This obtains the true gradient feedback of the control quantity on the total loss, and uses this feedback to perform small-step calibration of the parameters of the correction layer and multi-head decoder. This effectively solves the problem of model adaptability to individual equipment differences, seasonal changes, and aging characteristics, ensuring that the prediction-control link remains aligned in the long term and suppressing model drift.

[0029] The rolling prediction optimization and control barrier mechanism establishes a unified framework for target optimization and constraint protection. By defining the constraint margin as the residual measure of the safety function relative to the threshold, it realizes the linkage control of total harmonic distortion, negative sequence component, hot spot temperature and hot spot temperature change rate. When the constrained variable approaches the boundary, it automatically implements protective concession to ensure that the bottom line of power quality and thermal safety is not breached.

[0030] Frequency-selective injection and three-phase decoupling execution transform the optimization results into specific current spectrum control commands. By prioritizing the selection of harmonic frequencies and implementing three-phase decoupling when phase-independent control is available, the negative-sequence and zero-sequence components are directly acted upon to reduce the additional losses caused by imbalance. Combined with the carrier and modulation avoidance mechanism, the stray loss sensitive window is actively avoided, further reducing the additional losses caused by the coupling between the carrier spectrum and the transformer structure.

[0031] The apparent capacity budget allocation and state-of-charge harmonic budget management mechanism ensures the sustainable execution of the control strategy under hardware and energy constraints. By dynamically allocating the capacity occupancy of active power, fundamental reactive power and harmonic channels, and reserving a dedicated energy window at the end of the state-of-charge period, the injection capability of loss-sensitive frequencies is guaranteed for a long time, avoiding control interruptions caused by insufficient capacity or lack of energy.

[0032] The coordination mechanism with the primary equipment operation cycle predicts the switching action of the on-load tap changer or capacitor bank, generates cancellation and mitigation waveforms before and after the action, effectively smooths the impact of voltage steps and phase disturbances on losses during equipment switching, reduces the increase in copper loss and stray loss under transient conditions, and reduces the mechanical and electromagnetic stress of the primary equipment.

[0033] Federated learning and local limiting adaptive update mechanism achieve multi-site collaborative optimization without transmitting the original data. By aggregating parameters across sites, the model’s adaptability to different equipment types and operating conditions is improved. At the same time, the limiting update strategy dominated by gradient consistency error effectively suppresses parameter mutations caused by abnormal samples and short-term fluctuations, ensuring the stability and controllability of the online calibration process.

[0034] The anomaly detection and conservative degradation control mechanism can promptly identify system anomalies and trigger protective mode switching by monitoring multiple signals such as constraint redundancy, consistency residuals, and communication status. When measurement anomalies, communication out-of-step, or power quality indicators approach the boundary, the system quickly degrades to a conservative mode of power factor support or voltage support, ensuring high reliability of the system in complex field environments.

[0035] This invention achieves comprehensive and optimized control of transformer iron loss, copper loss and stray loss. Under the premise of ensuring power quality and thermal safety, it significantly reduces transformer losses, reduces hot spot temperature rise peaks, and reduces the operating frequency of on-load tap changers and capacitor banks. It provides a complete and feasible technical solution for the engineering application of grid-side energy storage in transformer loss optimization. Attached Figure Description

[0036] Figure 1 The process of this invention Figure 1 ;

[0037] Figure 2 The process of this invention Figure 2 ;

[0038] Figure 3 The process of this invention Figure 3 . Detailed Implementation

[0039] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0040] It should be noted that the directional concepts of "left", "right", "up", "down", "front", "back", "inner", and "outer" in the following scheme are all relative directions, and will not be listed one by one here.

[0041] Example 1

[0042] like Figure 1 As shown, this embodiment is geared towards the grid-connected scenario where distribution transformers are located. It adopts a collaborative approach between grid-connected energy storage devices and measurement and acquisition devices. The approach revolves around data acquisition and feature construction, loss decomposition prediction of long short-term memory networks with hysteresis memory embedding and correction layers, harmonic marginal sensitivity and priority scoring of multi-head decoder output, online loss gradient perturbation and gradient estimation for small-step calibration, rolling prediction optimization and control barrier mechanism and constraint redundancy definition and execution, frequency selective injection and three-phase decoupling execution link when necessary, forming a closed-loop control scheme of "LSTM-loss-aware spectrum control".

[0043] The measurement and acquisition device synchronously acquires three-phase voltage and current waveforms at a sampling frequency of no less than 10 kHz to obtain transient characteristics. Simultaneously, control sampling is performed at a frequency of 1 kHz, recording information related to oil temperature or hot spot temperature, ambient temperature, energy storage state of charge, primary equipment status, and topology status. Based on the voltage and current, an observable measurement of equivalent magnetic flux is constructed. Path information of the magnetization history is extracted through zero-crossing and peak events of the magnetic flux, serving as the update trigger for hysteresis memory embedding. On the control side, achieving power quality standards is used as a hard constraint, and minimizing total loss is the objective. Harmonic frequencies and phases are selected according to the marginal sensitivity and priority scores given by the multi-head decoder. Fundamental reactive power and frequency-selective injection are performed, and the model is continuously calibrated using online loss gradients to ensure that the sum of iron loss, copper loss, and stray loss decreases.

[0044] During the feature construction stage, the measurement and acquisition device acquires the three-phase voltage. and three-phase current The waveform data is obtained, and the fundamental amplitude and phase are extracted using Fast Fourier Transform or other spectral analysis methods. Simultaneously, the positive-sequence component, negative-sequence component, zero-sequence component, and a preset set of harmonic orders are calculated. The amplitude and phase characteristics. The equivalent magnetic flux estimation uses an integral method, with the core relationship being:

[0045]

[0046] in, Let be the estimated equivalent magnetic flux at time t. This is the instantaneous port voltage. This is the instantaneous port current. Where N is the equivalent leakage resistance of the transformer, and N is the equivalent turns ratio. Magnetization history characteristics are detected... The zero-crossing events and extreme events are used to construct a discretized magnetization state vector. .

[0047] In the model layer, a long short-term memory network with hysteresis memory embedding and correction layers is used as the core predictor. The input consists of a temporal feature sequence and a magnetization history state vector generated by the measurement and acquisition device; the output is a loss decomposition prediction for future time periods. The core mapping relationship is: ;

[0048] in, For the future The loss decomposition prediction vector, the components of which include (Iron loss prediction) (Copper loss prediction) and (Scattered loss prediction); The input feature sequence is of length T, containing the fundamental amplitude and phase, positive sequence components, negative sequence components, zero sequence components, and a preset set of harmonic orders. Amplitude and phase, oil temperature or hot spot temperature related information, ambient temperature, energy storage state of charge, primary equipment status and topology status; It is a discretized magnetization state vector, which is updated with the magnetic zero event and peak event to characterize the hysteresis memory embedding; For the parameter set A defined nonlinear temporal mapping between the long short-term memory network and the correction layer; To predict the time step, a value of 0.5-2 minutes is typically used.

[0049] Hysteresis memory embedding uses a 32-64 dimensional Preisach lattice vector to represent the historical magnetization state, which is based on the equivalent magnetic flux. The zero-crossing and peak events are updated. Specifically, when a magnetic zero-crossing is detected, the corresponding grid cell is activated or deactivated, thus recording the historical dependence of the magnetization path. The hidden state vector of the Long Short-Term Memory network... With magnetization state vector The spliced ​​data forms an enhanced state representation. In addition, auxiliary variables reflecting low-frequency bias and remanence are added to ensure that the hysteresis characteristics are fully encoded.

[0050] To minimize losses and reduce the target to a frequency-domain controllable value, a multi-head decoder is used to provide the marginal sensitivity of losses for each preset harmonic order set, and a priority score is generated accordingly. The core quantization relationship is:

[0051]

[0052] in, A scalar for predicting total loss; and These represent the amplitude and phase injected into the power grid at the k-th harmonic frequency, respectively. and These represent the marginal sensitivity of the total loss to the amplitude and phase at that frequency. Prioritization scores are used for control decisions; This is a tradeoff factor used to balance amplitude sensitivity, phase sensitivity, and injection cost; The cost factor for injecting inverter harmonics at this frequency point is determined. Through priority scoring, the control layer selects several frequency points with scores reaching a preset threshold within a preset upper limit for injection, thereby achieving the maximum loss reduction with the fewest control dimensions under power quality constraints.

[0053] To ensure the long-term alignment of the predictive-control link with individual equipment differences and environmental changes, an identification layer for online loss gradient perturbation and gradient estimation is designed. During time slots where power quality and thermal safety meet preset margins, auditable perturbations with small amplitudes and short durations are applied to the fundamental reactive power channel or selected harmonic frequencies. The perturbation amplitude is controlled within the range of 0.2%-0.5% of the rated current, and the duration is 1-3 power frequency cycles (16.7-50 ms), with a cooling interval of no less than 10 minutes for the same frequency. The perturbation signal is generated using orthogonal sequences or single pulses to avoid crosstalk between different frequency points.

[0054] Measuring port active power change within a perturbation window Port reactive power change With hot spot temperature change rate The observed increments are then regressed to a linear approximate gradient of the control quantity with respect to the total loss. The core estimation formula is:

[0055]

[0056] in, This represents the observed change in total loss within the perturbation window; This represents a small change in the fundamental reactive power command. and For each set The minute changes in amplitude and phase applied at the k-th harmonic frequency; These are the local gradient coefficients of total loss with respect to fundamental reactive power, harmonic amplitude, and harmonic phase, respectively. The estimated gradient vectors are then... Intra-model sensitivity given by multi-head decoder Alignment is performed using small-step calibration at the correction layer to reduce deviation. The consistency metric used is:

[0057]

[0058] in, This refers to gradient consistency error; This is the true gradient vector obtained through perturbation-regression; This is the model sensitivity vector output by the multi-head decoder. To achieve the desired effect, the parameters of the calibration layer and multi-head decoder are updated using a limit-smooth method to avoid model drift.

[0059] At the optimization and execution layer, a rolling predictive optimization problem is constructed. The loss decomposition and weighted sum over several prediction periods is used as the objective, with penalties for changes in control variables added. Furthermore, a control barrier mechanism integrates power quality and thermal safety constraints into the objective as a safety function or is used for real-time control variable tailoring. The core objective and constraints are expressed as follows:

[0060]

[0061]

[0062] in, From the current time t to the predicted horizon The control quantity sequence; The components include the fundamental reactive power q and the amplitude and phase injected into the selected frequency point. It is the difference between adjacent control quantities; For the first The loss decomposition prediction vector for each step; This is the weight vector for loss decomposition; H is the tradeoff coefficient for controlling the change in the quantity; H is the number of steps to predict the horizon, usually taken as 3-6 steps. It is a set of restricted variables, including total harmonic distortion, negative order components, hot spot temperature and hot spot temperature change rate; Let j be the monitoring quantity of the j-th restricted variable; A safety function constructed for the j-th restricted variable; This is the threshold corresponding to the security function; Constraint redundancy represents the residual measure of the safety function relative to the threshold. Let be the penalty function for constraint redundancy, when Decreasing the penalty when approaching the threshold reduces the control quantity, thus pruning the control quantity during optimization and real-time execution.

[0063] The safety function for the control barrier mechanism is designed separately for different constraint types. For total harmonic distortion (THD) constraints, the safety function is defined as:

[0064] in, This is the current measured value of total harmonic distortion. This is the maximum permissible total harmonic distortion limit. When When the preset safety threshold is met, the constraint is satisfied; when near At that time, the penalty function Increase, automatically limit harmonic injection amplitude.

[0065] During operation, the measurement and acquisition device continuously provides time-series data. The feature construction module completes the extraction of sequence components and harmonic features, equivalent flux estimation, and magnetization history feature updates. The Long Short-Term Memory (LSTM) network outputs loss decomposition predictions and sensitivity every 50-200 milliseconds using a sliding window approach. The identification layer applies auditable perturbations in time slots where power quality and thermal safety meet preset margins according to a triggering strategy. True gradients are generated through recursive least squares or Bayesian linear regression for small-step calibration of the correction layer and multi-head decoder. The thermal model uses a first- or second-order thermal network structure to provide Kalman filter estimates of the hotspot temperature change rate. The optimization and execution layer solves the objective function with a fixed step size. The control barrier mechanism prunes the control quantity or penalizes the objective based on constraint redundancy, and finally issues fundamental reactive power commands and frequency-selective injection commands to the current inner loop and harmonic injector of the grid-connected energy storage device.

[0066] When a grid-connected energy storage device has three-phase independent control capability, three-phase decoupling injection is implemented to suppress negative-sequence or zero-sequence components. Three-phase decoupling is achieved by injecting optimized harmonic currents of different amplitudes and phases into phases A, B, and C, thereby directly acting on the negative-sequence and zero-sequence channels and reducing additional copper losses and stray losses caused by imbalance.

[0067] The carrier and modulation avoidance mechanism determines the carrier sensitivity window related to spurious losses based on online identification or a preset knowledge base, and avoids sensitive areas by adjusting the carrier frequency, carrier phase, or modulation depth of pulse width modulation. When it is detected that certain carrier frequencies are coupled with the transformer structure, resulting in increased spurious losses, the control system automatically switches to a carrier setting with lower losses, while ensuring that the stability of the grid-connected side is not affected.

[0068] First, a long short-term memory network with hysteresis memory embedding and correction layers is employed to introduce magnetization path dependence into loss decomposition prediction. This accurately expresses the response of iron loss to low-frequency bias and historical remanence, avoiding systematic bias caused by static estimation based solely on current amplitude and phase, thus improving prediction accuracy compared to traditional methods. Second, a multi-head decoder outputs marginal sensitivity and forms a priority score, replacing the traditional objective of "minimizing total harmonic distortion" with "selective injection of loss-sensitive frequencies." Under the premise of meeting power quality standards, resources are concentrated on processing the frequencies that have the greatest impact on copper loss and stray loss, improving control efficiency. Third, online loss gradient perturbation and gradient estimation provide true gradient feedback on control variables. Combined with small-step calibration, the model keeps track of individual equipment differences, seasonal changes, and aging. In long-term operation, the loss prediction error is controlled within 5%, effectively suppressing model drift. Fourth, the rolling predictive optimization and control barrier mechanism establishes a calculable unified framework between the objective and constraints. Through real-time monitoring of constraint redundancy, it enables coordinated control of total harmonic distortion, negative sequence components, hot spot temperature, and hot spot temperature change rate. This allows the control quantity to automatically yield when approaching the constraint boundary, ensuring grid-connected stability and thermal safety. Fifth, frequency-selective injection and three-phase decoupling transform the optimization results into executable current spectrum control and phase compensation, directly acting on the negative and zero sequence channels. This reduces the additional components of copper losses and stray losses. Combined with reactive power support from hysteresis sensing, this leads to an overall reduction in transformer losses and a decrease in the peak value of hot spot temperature rise.

[0069] Example 2

[0070] like Figure 1 and Figure 2 As shown, this embodiment introduces engineering enhancements and primary equipment collaboration on the aforementioned closed-loop basis. It is geared towards the actual deployment of three-phase four-arm inverters or multi-level grid-connected inverters. It focuses on the budget allocation of apparent capacity among the active, fundamental reactive, and harmonic channels, carrier and modulation avoidance to avoid stray loss sensitive windows, harmonic budget management of state of charge, and collaboration with the action rhythm of on-load tap changers and capacitor banks. It constructs an integrated execution layer of "capacity-energy-spectral morphology-primary equipment", so that loss-sensing spectrum control can have continuous and schedulable injection capabilities while meeting grid-connected stability and thermal safety.

[0071] The grid-connected energy storage device adopts a three-phase four-bridge inverter or multi-level grid-connected inverter structure, possessing independent zero-sequence control capability and abundant harmonic injection capability. The rated capacity of the device is designed according to active energy storage requirements, while reserving a 10%-20% capacity margin for reactive power compensation and harmonic injection. In addition to providing basic three-phase voltage and current waveforms, temperature information, and energy storage status, the measurement and acquisition device also monitors the status of primary equipment in real time, including the position of on-load tap changers, capacitor bank switching status, circuit breaker status, etc., and obtains equipment operation plans through the IEC 61850 protocol or other communication methods.

[0072] To ensure that the inverter's injection does not exceed the hardware capability boundary at any given time, this embodiment establishes an apparent capacity budget allocation mechanism. The inverter's output current is decomposed into equivalent currents corresponding to active, fundamental, and harmonic components, and managed uniformly using apparent capacity constraints. The core constraint relationship is expressed as follows:

[0073]

[0074] in, This represents the effective value of the output current of the grid-connected energy storage device. This is the upper limit of the current allowed by the device. For the equivalent active current component, This is the equivalent fundamental reactive current component. For sets The equivalent harmonic current component at the activated harmonic frequency point. This represents the subset of harmonic frequencies currently selected for injection. The capacity budgeter calculates the current occupancy of each channel in real time and dynamically adjusts the allocation ratio based on priority scores and system operating status.

[0075] The capacity budget allocation strategy employs a hierarchical priority mechanism. First, it ensures the basic needs for active power regulation; second, it allocates the capacity required for fundamental reactive power; and finally, it allocates the remaining capacity to harmonic channels according to priority. The specific allocation algorithm is as follows:

[0076]

[0077] in, These represent the capacity occupancy ratios of active power, fundamental reactive power, and harmonic channels, respectively. and These are reference values ​​for active and reactive power. This is the maximum apparent capacity of the inverter. At this time, the harmonic channel injection is paused to ensure basic power regulation requirements.

[0078] To maintain continuous power injection to loss-sensitive frequencies under state-of-charge (POC) constraints, this embodiment establishes a harmonic budget management mechanism for POC. A dedicated energy window is reserved within the POC constraint for harmonic and fundamental reactive power regulation, and dynamically allocated based on priority scoring and constraint margin. The current set of selected frequencies is set as follows: The harmonic budget manager assigns priority scores to the reference amplitude coefficients at each frequency point and scales them according to global constraint redundancy. The core allocation relationship is represented as follows:

[0079]

[0080] in, This is the reference amplitude coefficient for the k-th harmonic frequency. To satisfy the global scaling factor for both capacity and energy window constraints, For the non-negative priority score of the k-th frequency point, For the current set of selected frequency points, Regarding global constraint redundancy The monotonically non-increasing modulation function, Represents the set of restricted variables Constraint margin calculated item by item (including total harmonic distortion, negative sequence component, hotspot temperature and hotspot temperature change rate) The minimum value.

[0081] Energy window management employs a strategy combining moving averages and forecasting. The system continuously monitors the power consumption of harmonic injection and reserves sufficient energy reserves based on load forecasting and energy storage scheduling plans. The energy window size is dynamically adjusted based on historical statistics and real-time demand, with a typical value of 3%-8% of the total capacity. When the energy window is insufficient, the system automatically reduces the harmonic injection intensity, prioritizing long-term continuous operation.

[0082] To reduce spurious losses caused by the coupling between the inverter carrier spectrum and the structurally sensitive area of ​​the transformer, this embodiment designs a carrier and modulation avoidance mechanism. This mechanism adaptively adjusts the carrier and modulation strategies based on online identification or a pre-set knowledge base. The avoidance mechanism defines a feasible region from the set of selectable carrier frequencies and the set of modulation strategies, and performs optimal selection of the combination based on a spurious loss sensitivity indicator function. The core selection rule is expressed as follows:

[0083]

[0084] in, The optimal carrier frequency was selected. The permissible set of carrier frequencies typically includes several discrete frequency points within the range of 8-20kHz. This is a stray loss sensitivity indicator function. This is the loss decomposition prediction vector output by the model layer. It is a discrete magnetization state vector embedded in hysteresis memory.

[0085] The spurious loss sensitivity indicator function was established through a combination of offline experiments and online learning. In the offline phase, frequency sweep tests were used to determine the spurious loss response characteristics at different carrier frequencies, establishing an initial sensitivity mapping table. During online operation, the system periodically subjected small carrier frequency disturbances during low-risk periods, measuring spurious loss changes and updating the sensitivity mapping. The avoidance strategy prioritized carrier settings with low spurious loss sensitivity without affecting the current closed-loop stability.

[0086] To achieve coordinated optimization with primary equipment such as on-load tap changers and capacitor banks, this embodiment establishes an action timing coordination mechanism. The timing coordinator acquires the action plans of the primary equipment through a communication network and, upon predicting an impending switching action, generates a pre-action cancellation waveform and a post-action mitigation waveform to minimize the impact of inrush current and harmonic fluctuations on losses and thermal response. The coordinator uses the weighted integral of the loss increment and the squared current increment as the transient cost within the action window and solves for the optimal waveform parameters. The core objective relationship is expressed as:

[0087]

[0088] in, A parameter vector is injected into the waveform before and after the action, containing parameters such as amplitude, phase, and duration. The transient value within the action window. The expected operating time of a single device. This is half the width of the action window, typically set to 50-200 milliseconds. This represents the instantaneous increase in total loss relative to the case without injection. This represents the instantaneous squared current increment relative to the case without injection. and This is the trade-off coefficient between the two costs.

[0089] The waveform cancellation design is based on the electrical characteristics of primary equipment operation. For on-load tap changer operation, the voltage step amplitude and phase change it causes are predicted, and reverse compensation voltage or current injection is designed. For capacitor bank switching, the reactive power surges and harmonic disturbances it causes are predicted, and a smooth transition reactive power and harmonic injection sequence is designed. Waveform parameters are solved using numerical optimization methods, with constraints including inverter capacity limitations, power quality boundaries, and thermal safety requirements.

[0090] During operation, the capacity budgeter reads the inverter current measurement and reference control values ​​every control cycle (50-200 milliseconds), and performs real-time trimming of the reference values ​​for the active, fundamental reactive, and harmonic channels based on apparent capacity constraints, outputting the available upper limit for each channel. The harmonic budget manager reads the priority score given by the model layer and the constraint margin of each constrained variable returned by the control barrier mechanism, generates the reference amplitude coefficient for each selected frequency point according to the allocation relationship, and synthesizes it with the phase reference given by the optimization layer to form a complete harmonic injection command. When the constraint margin decreases to near the threshold or the energy window is lower than the target range, the manager automatically reduces the occupancy of the harmonic channels and prioritizes fundamental reactive power support.

[0091] The carrier and modulation avoider periodically evaluates the spurious loss sensitivity indicator function of candidate carrier settings in a separate spectrum identification thread, with an evaluation period typically ranging from 1 to 5 minutes. When it detects that the current carrier setting may lead to an increase in spurious losses, the avoider calculates the optimal handover strategy and performs a seamless handover. The handover process is synchronized with the power inner-loop controller to ensure that it does not disturb the current closed-loop stability. The handover decision employs a hysteresis mechanism to avoid system oscillations caused by frequent handovers.

[0092] The clock coordinator continuously monitors the operation plans or status change predictions of primary equipment via real-time communication. When an operation signal from an on-load tap changer or capacitor bank is detected, the coordinator calculates the optimal parameters for the cancellation and relief waveforms within a prediction window (typically 100-500 milliseconds in advance). The cancellation waveform is injected 10-50 milliseconds before the equipment operation, and its duration covers the entire operation process; the relief waveform starts immediately after the equipment operation, and its duration is determined based on the system's oscillation decay characteristics, typically 100-300 milliseconds. After the waveform injection is complete, the coordinator resets the dedicated waveform channel to zero, and the system returns to the normal loss-aware spectrum control mode.

[0093] The apparent capacity budget allocation mechanism ensures that harmonic injection is "budget-available" under inverter hardware constraints. Through hierarchical prioritization and dynamic allocation strategies, it avoids frequent reference clipping and unpredictable control degradation, ensuring continuous and stable execution of key frequencies identified by priority scoring, thus improving the continuity of harmonic injection. Secondly, state-of-charge (POC) harmonic budget management, through dedicated energy window reservation and dynamic allocation mechanisms, ensures continuous injection capability to loss-sensitive frequencies even under POC fluctuations in the energy storage system, avoiding control interruptions due to insufficient energy and improving energy management efficiency. Thirdly, the carrier and modulation avoidance mechanism actively avoids high stray loss areas coupled with the transformer structure through online sensitive area identification and adaptive adjustment, reducing additional losses caused by the carrier spectrum, thus reducing stray losses and minimizing transformer temperature rise peaks. Fourthly, the coordination mechanism with primary equipment operation cycles effectively smooths voltage steps and phase disturbances during on-load tap changer and capacitor bank operation through predictive cancellation and waveform injection, reducing copper losses and stray loss impacts under transient conditions, while also reducing mechanical and electromagnetic stress on primary equipment and extending equipment lifespan. Fifth, all actions are monitored in real time by the control barrier mechanism and constraint redundancy. When the constrained variable approaches the boundary, protective retreat is automatically implemented to ensure that the power quality indicators continuously meet the grid connection specifications and that the hot spot temperature is always kept within a safe range. Combined with the aforementioned loss-sensing spectrum control's prediction, sensitivity identification, and online calibration capabilities, this embodiment achieves integrated control across the entire chain, from capacity management and energy dispatch to spectrum optimization and equipment coordination. This further reduces the transformer's iron loss, copper loss, and stray loss while meeting grid connection stability and thermal safety requirements, and maintains stable and reliable energy-saving benefits in long-term operation and frequent operational disturbances in the field environment.

[0094] Example 3

[0095] like Figures 1 to 3 As shown, this embodiment adds model governance, federated learning, and robust operation mechanisms on the basis of the aforementioned closed-loop control and engineering enhancement. The goal is to enable the long short-term memory network with hysteresis memory embedding and correction layers and the multi-head decoder to maintain adaptive tracking of individual device differences, seasonal changes and aging characteristics during long-term operation at multiple sites without transmitting the original data. At the same time, it can stably degrade to a conservative mode under abnormal conditions such as measurement anomalies, communication loss of synchronization or protection alarms, to ensure that the bottom line of power quality and thermal safety is not breached.

[0096] On the device side, the grid-connected energy storage device and measurement and acquisition device maintain continuous operation. The model layer maintains the output loss decomposition prediction of the long short-term memory network containing hysteresis memory embedding and correction layers. The multi-head decoder outputs harmonic marginal sensitivity and priority scoring. The identification layer continuously performs online loss gradient perturbation and gradient estimation. The optimization and execution layer continues to employ control barrier mechanisms and constraint redundancy pruning control quantities. Based on this, a model governance layer, a federated learning client, and an anomaly detection module are added, forming a closed loop of parameter updates between the site and the center, and providing multi-layered robust operational assurance.

[0097] To refine the path-dependent encoding of hysteresis memory embeddings and ensure their stability under different magnetization histories, this embodiment introduces a path consistency regularization term during training and online learning. This regularization term imposes constraints on sample pairs with the same amplitude but different historical paths, aligning the differences between loss decomposition predictions with the reference differences based on hysteresis theory. The core path consistency constraint is expressed as:

[0098]

[0099] in, For path consistency regularization; For the parameter set A defined nonlinear temporal mapping between the long short-term memory network and the correction layer; The input feature sequence consists of the same amplitude and phase. These are the discretized magnetization state vectors under two different historical magnetization paths; The reference difference vector is generated by a Preisach-type operator based on flux trajectory or an empirically verified loss difference label, reflecting the difference in loss decomposition that should occur between two magnetization paths under the same electrical conditions.

[0100] Hysteresis memory embedding employs an enhanced Preisach lattice representation, discretizing the continuous magnetization space into 32-64 lattice cells, each corresponding to a specific range of coercivity and interaction field strength. When the equivalent magnetic flux... When a zero-crossing occurs or a local extremum is reached, the corresponding grid cell state flips, thus recording complete magnetization path information. To enhance the robustness of path memory, auxiliary state variables reflecting low-frequency bias integrals and remanence indications are introduced to ensure that hysteresis characteristics are not distorted due to numerical accumulation errors during long-term operation.

[0101] To achieve cross-site collaborative learning and parameter optimization without transmitting raw data, this embodiment adopts a federated learning architecture. Each site only uploads model parameters or gradient statistics, and the central server performs weighted aggregation before distributing updated global parameters. The core aggregation relationship is as follows:

[0102]

[0103] in, The global parameter set obtained by central aggregation mainly includes correction layer parameters and multi-head decoder parameters; Let N be the set of local parameters for the i-th site; N is the number of sites participating in this round of aggregation. Let be the aggregate weight of the i-th site; Let be the effective data sample size for the i-th site in this round of local updates.

[0104] The federated learning process employs a differential privacy protection mechanism, adding calibration noise before parameter upload to protect site privacy. It also utilizes a secure multi-party computation protocol to ensure the central server cannot infer sensitive information from individual sites during the aggregation process. The aggregation frequency is adjusted based on network conditions and model stability requirements, typically 1-3 times daily, ensuring that model timeliness is maintained without significantly burdening site operations with communication overhead.

[0105] To avoid drastic parameter drift during online calibration and suppress abrupt changes introduced by abnormal samples, this embodiment implements local amplitude-limited adaptive updates of the calibration layer parameters and multi-head decoder parameters at the site. The update process uses gradient consistency error as the dominant signal, strictly limiting the step size and amplitude of each update. For any updated parameter block... (Corresponding correction layer) and (Corresponding to multi-head decoder), the core update relationship is:

[0106]

[0107]

[0108] in, and For local parameter increment vectors; For the above boundary A truncation operator that applies a vector norm; This is the local learning rate, typically ranging from 0.001 to 0.01. This is the exponential smoothing coefficient, typically ranging from 0.9 to 0.99; Gradient consistency error is defined as the difference in L2 norm between the online loss gradient and the model sensitivity. and These are the gradients of the gradient consistency error with respect to the corresponding parameter blocks. This update mechanism ensures smooth and controllable parameter changes, avoiding sudden deterioration in model performance due to outlier samples or measurement noise.

[0109] To ensure system safety and rapid recovery under abnormal on-site conditions, this embodiment designs an anomaly detection and conservative degradation control mechanism. The system monitors multiple signals, including constraint redundancy of restricted variables, online consistency residuals, and communication status, to promptly identify abnormal situations and trigger protective mode switching. The core trigger judgment and hybrid control relationship is as follows:

[0110]

[0111]

[0112] in, This is a binary trigger indicator; a value of 0 indicates normal operation, and a value of 1 indicates that abnormal protection has been triggered. For indicator functions; It is a set of restricted variables, including total harmonic distortion, negative order components, hot spot temperature and hot spot temperature change rate; The residual measure of the safety function constructed for the j-th restricted variable to control the barrier mechanism relative to the threshold; To ensure a safe lower limit for constraint margin, it is typically set to 10%-20% of the corresponding threshold. The online consistency residual vector represents the deviation between the online loss gradient and the model sensitivity. This is the outlier threshold for consistent residuals; This is a communication synchronization failure indicator. This is the final control vector issued; The reference control quantities for loss-sensing spectrum control include the fundamental reactive power and the amplitude and phase injected into the selected frequency point; It is a conservative mode control quantity, mainly including power factor support or voltage support commands, and does not contain harmonic injection components.

[0113] The anomaly detection mechanism employs a multi-layered monitoring strategy. The first layer monitors constraint redundancy, issuing an alert when the safety function value of any constrained variable approaches a threshold. The second layer monitors model consistency, indicating potential model failure when the online gradient deviates significantly from the model's prediction sensitivity. The third layer monitors communication status, including federated learning communication with the central server, coordination communication with primary devices, and internal data acquisition communication. When any layer triggers an anomaly, the system immediately executes conservative degradation control.

[0114] In conservative mode, the system suspends all harmonic injection, maintaining only basic power factor correction or voltage support functions. Mode switching employs a smooth transition using a convex combination, completed within one control cycle (50-200 milliseconds) to avoid abrupt changes in control parameters impacting the system. During conservative mode operation, the system continues data acquisition, feature construction, and anomaly monitoring. Once the anomaly is eliminated and the system returns to normal, it automatically switches back to loss-sensing spectral control mode.

[0115] During operation, each site performs local data sampling, feature construction, and hysteresis memory embedding updates at fixed intervals. The Long Short-Term Memory network and the multi-head decoder continuously generate loss decomposition predictions, harmonic marginal sensitivity, and priority scores. Based on power quality and thermal safety margins, the identification layer implements auditable perturbations and estimates the online loss gradient in time slots that meet trigger conditions. The gradient consistency evaluation module calculates the deviation between the online loss gradient and the model sensitivity in real time, forming a gradient consistency error signal. The local limiting adaptor calculates the smooth update increments of the correction layer and the multi-head decoder based on this error signal and implements parameter updates using an exponential smoothing method.

[0116] The federated learning client synchronizes parameters with the central server according to a pre-defined communication schedule (usually 1-3 times daily). During the upload phase, the client uploads the parameters or gradient statistics of its local calibration layer and multi-head decoder to the center after differential privacy processing. During the download phase, the client receives the aggregated global parameter set from the center and updates its corresponding local parameters using a smooth replacement strategy, without interrupting the real-time control loop. Throughout the federated learning process, the weights of the backbone encoder of the Long Short-Term Memory network remain relatively stable, and only the parameters of the task-related calibration layer and multi-head decoder are collaboratively optimized.

[0117] The anomaly detection thread monitors constraint redundancy, consistency residuals, and communication status at a high frequency (10-50 times per second). When an anomaly trigger condition is detected, an anomaly flag is immediately set and the control execution module is notified. Based on the anomaly flag status, the control execution module switches between loss-aware spectral control and conservative modes using a convex combination approach. During the anomaly period, the system continues feature construction, status monitoring, and perturbation identification, but pauses the spectral control output and harmonic injection of the multi-head decoder. Anomaly recovery employs a hysteresis mechanism, requiring the anomaly condition to be eliminated and stabilized for a certain period (usually 2-5 minutes) before allowing a switchback, avoiding system oscillations caused by frequent switching.

[0118] Throughout the entire operation, the control barrier mechanism and constraint redundancy monitoring remain active, implementing real-time adjustments and constraints on control variables at the optimization and execution layers to ensure that all constrained variables remain above safe thresholds. The thermal model and temperature monitoring provide high-precision estimates of hotspot temperatures and temperature change rates, offering a reliable basis for thermal safety constraints. The power quality monitoring module calculates indicators such as total harmonic distortion and negative sequence components in real time, ensuring that power quality consistently meets grid connection specifications.

[0119] Hysteresis memory, embedded under path consistency regularization constraints, maintains stable and identifiable responses to different historical magnetization paths with the same amplitude. This enhances the generalization ability of the long short-term memory network's loss decomposition prediction under seasonal changes, load pattern variations, and equipment aging conditions, improving long-term prediction accuracy compared to benchmark methods and effectively reducing prediction bias caused by path-dependent drift. Second, the federated learning architecture achieves knowledge sharing without transmitting original data through multi-site parameter collaboration and weighted aggregation. This significantly enhances the model's adaptability to different transformer wiring groups, core materials, and operating conditions, shortens the cold start time for new site deployments, and meets the data-without-domain security requirement. Third, the local amplitude-limited adaptive update mechanism uses gradient consistency error as the dominant signal, strictly limiting the step size and magnitude of parameter updates and employing an exponential smoothing strategy. This effectively suppresses model mutations caused by abnormal samples and short-term fluctuations, improving the stability of the parameter update process and ensuring that the online calibration process is controllable and predictable. Fourth, anomaly detection and conservative degradation control achieve rapid anomaly identification and protective switching through triple signal monitoring of constraint redundancy, consistency residuals, and communication status. The switching response time is controlled within one control cycle (50-200 milliseconds). When power quality indicators approach the boundary, measurement system malfunctions, or communication fails to synchronize, the protection mechanism is quickly activated to ensure reliable protection of grid connection stability and thermal safety. Fifth, the parallel operation mechanism of federated updates and online calibration continuously improves long-term alignment capabilities without affecting real-time control performance. This ensures that the suppression of iron loss, copper loss, and stray loss remains stable during long-term operation, achieving a significant reduction in annual average loss and a 3-6K reduction in peak equipment hotspot temperature rise. Combined with the aforementioned end-to-end control capabilities of capacity management, energy dispatch, spectrum optimization, and equipment coordination, this embodiment achieves sustainable, scalable, and highly reliable transformer loss optimization control in complex and variable field environments, providing a complete technical solution for the engineering application of grid-side energy storage.

[0120] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. A method for energy storage control based on LSTM for reducing transformer loss of grid side energy storage, characterized in that, The method minimizes transformer loss as a direct control target, is executed by a grid-connected energy storage device in cooperation with a measurement collection device, and includes the following steps: S1 Data acquisition and feature construction: collect three-phase voltage and current waveforms, extract fundamental amplitude and phase, positive sequence component, negative sequence component, zero sequence component, and amplitude and phase of a preset harmonic number set, obtain oil temperature or hot spot temperature related information, ambient temperature, energy storage state of charge, primary equipment state and topology state; estimate equivalent magnetic flux based on voltage and current and construct magnetization history related features; S2 Hysteresis memory prediction: input the features obtained in S1 into a long short-term memory network containing a hysteresis memory embedding and a correction layer, the hysteresis memory embedding is represented by an updateable discretized magnetization state vector, and is updated with magnetic zero events and peak events; the network outputs transformer loss decomposition prediction for future time periods, including at least iron loss, copper loss and stray loss; S3 Multi-head harmonic sensitivity decoding: set a multi-head decoder based on a shared encoder, so that each decoding head corresponds to an element of the preset harmonic number set, outputs the marginal sensitivity of total loss to the amplitude and phase of each harmonic current, and generates a priority score for control decision; S4 Online loss gradient perturbation and estimation: in time slots where power quality and thermal safety meet the preset margin, inject a small amplitude and short duration auditable perturbation into the selected harmonic frequency or fundamental reactive power channel, and set a cooling interval for the same frequency; Measure the port active power change, port reactive power change and hot spot temperature change rate within the perturbation window, estimate the gradient of total loss to the control variable combined with the thermal model, and calibrate the parameters of the correction layer and the multi-head decoder online in small steps accordingly; S5 Rolling prediction optimization and constraint execution: establish a rolling prediction optimization problem to take the weighted sum of loss decomposition in the prediction period as the objective function, set the inverter apparent capacity, state of charge, power ramping, power quality index, hot spot temperature and hot spot temperature change rate as constraints, implement constraint clipping using a control barrier mechanism, and define the constraint margin in this method as the remaining measure of the safety function constructed by the control barrier mechanism for the limited variable relative to the corresponding threshold; the obtained control variable includes fundamental reactive power, and the amplitude and phase of the injected harmonic frequency with a priority score reaching a preset threshold; S6 Selected frequency injection and three-phase decoupling: select harmonic frequency for injection within a preset upper limit according to the priority score; When the grid-connected energy storage device has phase-independent control capability, implement three-phase decoupling injection to suppress negative sequence components or zero sequence components; S7 Carrier and modulation avoidance: determine the carrier sensitive window related to stray loss based on online identification or knowledge base, adjust the carrier frequency, carrier phase or modulation depth of pulse width modulation to avoid the window, and maintain stability on the grid side; S8 Control strategy and continuous calibration: the control strategy takes power quality compliance as a hard constraint and total loss minimization as a target; use the online loss gradient obtained in S4 for continuous calibration of the long short-term memory network and the multi-head decoder to achieve the decrease of the sum of iron loss, copper loss and stray loss.

2. The method of claim 1, wherein, The hysteresis memory is embedded by Preisach type grid vectors or equivalent discretized magnetization state vectors, and contains auxiliary variables reflecting low frequency bias and residual magnetization state; path consistency regularization is introduced in the training or online learning process, so that the output of samples with equal amplitude but different historical paths meets the hysteresis law.

3. The method of claim 1, wherein, The online loss gradient perturbation is generated in a quadrature sequence mode or a single frequency single pulse mode, and is triggered in a time slot with low load change rate, sufficient power quality margin and stable hot spot temperature rise; the gradient estimation is realized by recursive least squares or Bayesian linear regression, and the hot spot temperature change rate is obtained by fusion of a thermal model and a filter.

4. The method of claim 1, wherein, The priority score comprehensively considers the amplitude sensitivity, phase sensitivity, inverter harmonic injection cost factor and the constraint margin, and only selects harmonic frequencies with scores reaching a preset threshold and a number not exceeding a preset upper limit to implement injection during control execution, and keeps the power quality index continuously meeting the margin requirements of grid connection specifications.

5. The method of claim 1, wherein, The control barrier mechanism includes: constructing safety functions for total harmonic distortion, negative sequence component, hot spot temperature and hot spot temperature change rate respectively, so that when the corresponding safety function is not lower than a preset threshold, it indicates that the constraint is met; during the rolling prediction optimization and real-time execution, the control quantity is clipped or a penalty term is introduced into the objective function according to the value of the safety function, so as to keep each safety function not lower than the corresponding threshold.

6. The method of claim 1, wherein, The method further includes: using a three-phase four-bridge inverter or a multi-level grid-connected inverter as a grid-connected energy storage device during implementation, and pre-budgeting the apparent capacity among the active channel, the fundamental reactive channel and the harmonic channel during control, and setting an independent budget for the harmonic channel to ensure the injection capability during a high loss sensitive period.

7. The method of claim 1, wherein, The carrier and modulation avoidance adaptively adjusts the carrier and modulation strategy to avoid the frequency spectrum region causing the increase of stray loss without introducing the risk of sub-synchronous oscillation or sub-harmonic resonance by online identifying the correlation between stray loss and carrier parameters.

8. The method of claim 1, wherein, The method includes harmonic budget management of state of charge: reserving an energy window for harmonic and fundamental reactive regulation in the lower limit of state of charge, dynamically adjusting the energy allocation ratio according to the priority score and the constraint margin, and replenishing the state of charge through energy scheduling after the control demand ends.

9. The method of claim 1, wherein, The method is coordinated with the action rhythm of on-load tap changer or capacitor bank: when it is predicted that the switching of primary equipment will cause inrush current or harmonic fluctuation, phase-optimized cancellation waveforms are injected for a short time before and after the action to smooth the transition, reduce instantaneous copper loss and stray loss, and reduce the mechanical action load of primary equipment.

10. The method of claim 1, wherein, The online update of the long short-term memory network and the multi-head decoder adopts a combination of federated aggregation and local amplitude adaptation: model parameters or gradients are aggregated across sites without transmitting raw data, and only the correction layer parameters and the multi-head decoder parameters are updated locally; when measurement anomalies, communication out-of-sync or protection device alarms are detected, the control strategy degenerates into a conservative mode mainly supported by power factor or voltage.

Citation Information

Patent Citations

  • Transformer loss calculation method

    CN110008645A

  • Circuit breaker control system based on cloud data

    CN118921366A