Reactive power dynamic on-site balancing method based on ai model algorithm

By constructing an orthogonally decoupled intention coordinate system and a spatiotemporal credit funnel region, and combining it with a feature prediction model, the multi-objective conflict between performance evaluation and physical safety in traditional reactive power compensation methods is resolved. This enables efficient reactive power management in complex power distribution networks, ensuring equipment safety and economic benefits.

CN121643022BActive Publication Date: 2026-05-29GUIZHOU FENGLI SPACE TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUIZHOU FENGLI SPACE TECH CO LTD
Filing Date
2026-02-05
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Traditional reactive power compensation methods cannot achieve global optimization in complex frequency domains, cannot resolve the multi-objective conflict between performance evaluation and physical safety, and cannot adapt to the complex power distribution network governance needs after the popularization of nonlinear loads and distributed photovoltaics.

Method used

By constructing an orthogonally decoupled intention coordinate system, a spatiotemporal credit funnel region, and a dynamic impedance target region, and combining it with a feature prediction model, the final confirmation of load switching intentions and effective shielding of harmonic interference can be achieved, enabling multi-objective optimization decisions and avoiding reactive power deficits and resonance risks.

Benefits of technology

It achieves multi-objective optimization decision-making while meeting long-term performance targets, reduces ineffective switching actions of reactive power compensation components, extends equipment life, avoids equipment wear and oscillation accidents, and ensures the balance between physical safety and economic benefits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121643022B_ABST
    Figure CN121643022B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of power quality control, and discloses a reactive power dynamic on-site balancing method based on an AI model algorithm, which comprises the following steps: acquiring three-phase waveform data and denoising, extracting dynamic characteristics to construct an orthogonal decoupled intention coordinate system, demarcating a steady-state region and constructing a time sequence characteristic set, and outputting an intention state set through logical judgment; constructing a time-space credit funnel region based on the intention state set, deducing a time-space state point trajectory and generating a time-space instruction by using a characteristic prediction model; performing impedance safety checking on the time-space instruction to obtain an action signal; analyzing the action signal to generate a physical control instruction, and obtaining a strategy parameter set through a posterior adjustment mechanism. The present application solves the problems of time-space mismatch and frequency domain dimension collapse of differential control and integral assessment, and realizes the global optimization of reactive power compensation between assessment compliance and physical safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power quality control technology, and more specifically, to a method for dynamic local reactive power balancing based on AI model algorithms. Background Technology

[0002] With the increasing prevalence of nonlinear loads and distributed photovoltaics, power quality management in distribution networks is becoming increasingly complex. However, traditional reactive power compensation methods based on instantaneous power factor thresholds generally face the paradox of "instrument compliance but performance breach," meaning that instantaneous indicators meet standards, but monthly weighted assessments still result in penalties. Existing technologies mostly rely on differential feedback control at a single time point or passive harmonic protection mechanisms. They ignore the spatiotemporal mismatch between control logic and integral assessment mechanisms, meaning the controller cannot perceive the cumulative credit status throughout the entire cycle. Furthermore, simplifying nonlinear impedance to a fundamental wave model in complex frequency domains makes capacitors prone to falling into a vicious cycle of "distortion upon connection, undercompensation upon disconnection" in harmonic environments, accelerating equipment wear. Traditional methods, lacking foresight regarding future trends and proactive harmonic impedance avoidance, cannot achieve global optimization under switch life constraints. Therefore, how to shift from instantaneous control to full-cycle dynamic planning, transforming passive protection into proactive spectral impedance avoidance, and resolving the multi-objective conflict between performance compliance and physical safety is a key technical challenge to be addressed in this field.

[0003] In the prior art, Chinese patent application CN121012044A discloses a dynamic reactive power compensation method, system, equipment, and medium for power grids based on MPC. This system includes a data acquisition module, an MPC optimization unit, and a hybrid energy storage control terminal, enabling functions such as power grid reactive power demand prediction, energy storage status monitoring, and collaborative control strategy generation. It improves the reactive power compensation response speed by constructing a multi-objective optimization function and combining it with a rolling optimization algorithm, balancing power grid stability and the economic efficiency of energy storage equipment, and reducing voltage deviation lag issues. Chinese patent application CN120389394A discloses a reactive power compensation control system and method based on artificial intelligence autonomous learning. This system adopts a four-layer architecture, including a data acquisition layer, an AI decision-making layer, a compensation execution layer, and a feedback optimization layer, respectively realizing electrical parameter acquisition, dynamic optimization of compensation strategies, hybrid compensation execution, and model iterative updates. It establishes a reactive power prediction model through AI autonomous learning, achieving collaborative control of SVG instantaneous reactive power prediction and TBB / TSC steady-state compensation, improving the accuracy and long-term operational adaptability of the compensation strategy.

[0004] However, while the two existing technologies mentioned above have some value in terms of reactive power compensation response speed, prediction accuracy, and equipment loss control, they fail to address the core pain point of the multi-objective conflict between performance evaluation and physical safety in current distribution networks. Specifically, Chinese patent CN121012044A focuses on short-term dynamic optimization of the MPC algorithm, neglecting the full-cycle integral characteristics of monthly weighted assessments, thus failing to resolve the paradox of "instruments complying but failing performance evaluations." Chinese patent CN120389394A focuses on AI model prediction and collaborative control, but fails to accurately model nonlinear impedances in complex frequency domains and lacks active harmonic impedance avoidance design, easily leading to capacitors falling into an oscillating cycle of "distortion upon activation, undercompensation upon deactivation." Neither technology achieves a shift from instantaneous control to full-cycle dynamic planning; neither can perceive the cumulative credit status throughout the entire cycle to meet assessment requirements, nor can they balance compensation effects and equipment safety under switch life constraints, making them unsuitable for the complex distribution network governance needs following the widespread adoption of nonlinear loads and distributed photovoltaics. Summary of the Invention

[0005] This invention is applicable to power distribution circuits containing equipment such as three-phase asynchronous motors and high-power frequency converters, and can meet the reactive power management needs under scenarios with severe nonlinear load fluctuations. Through a nonlinear sliding window median filtering algorithm, an intent coordinate system, and three-layer logic judgment, an orthogonally decoupled intent recognition mechanism is constructed, achieving final confirmation of load switching intent and effective shielding against harmonic interference. Based on the intent state set, a spatiotemporal credit funnel region combined with a feature prediction model transforms the monthly cumulative weighted power factor into a dynamic geometric constraint corridor, realizing multi-objective optimization decision-making under the premise of meeting long-term assessment goals, avoiding blind switching and reactive power deficits. Impedance safety verification, by constructing a dynamic impedance target area, transforms the complex physical resonance risk into an intuitive geometric inclusion relationship judgment, constituting a safety veto for spatiotemporal commands, completely eliminating the risk of switching oscillations. The posterior adjustment mechanism realizes continuous optimization of the adaptive optimization strategy parameter set, ensuring the system's efficiency and safety in long-term operation.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] The reactive power dynamic local balancing method based on AI model algorithms includes:

[0008] Acquire three-phase waveform data representing the real-time operating status of the end-user load. Construct an intention coordinate system with orthogonal decoupled load properties based on the three-phase waveform data. Define a steady-state region in the intention coordinate system to filter background noise. Construct a time-series feature set based on the steady-state region. Perform three-layer logic judgment on the time-series feature set to obtain the intention state set.

[0009] A spatiotemporal credit funnel region for multi-objective optimization decision-making is constructed based on the intention state set. A feature prediction model is constructed and trained based on the spatiotemporal credit funnel region. The spatiotemporal state point trajectory is predicted using the feature prediction model. The positional relationship of the spatiotemporal state point trajectory is judged to obtain the spatiotemporal command. The impedance safety check is performed on the spatiotemporal command to obtain the action signal used to drive the reactive power compensation branch that can be independently switched.

[0010] The action signals are analyzed and responded to to obtain physical control commands. A posterior adjustment mechanism is then executed on the physical control commands to obtain an adaptive optimization strategy parameter set.

[0011] Furthermore, the method for obtaining the steady-state region includes:

[0012] Denoising is performed on the three-phase waveform data to extract dynamic features including the rate of change of fundamental active power and the rate of change of total harmonic distortion.

[0013] A target coordinate system is constructed with the fundamental active power change rate on the horizontal axis and the total harmonic distortion rate change rate on the vertical axis. The fundamental active power change rate and the total harmonic distortion rate change rate are used as coordinate values ​​and mapped to a coordinate point in the target coordinate system, namely the state vector point.

[0014] The steady-state region is a square region with the origin of the intended coordinate system as its geometric center. When the state vector point falls outside the steady-state region, the vertical distance from the state vector point to the horizontal axis is calculated as the harmonic pollution index, the vertical distance from the state vector point to the vertical axis is calculated as the true load variation index, and the angle between the line connecting the state vector point and the origin and the horizontal axis is calculated as the pure load angle.

[0015] Furthermore, the method for obtaining the intent state set includes:

[0016] Set up a verification window with a length of N sampling periods, cache the harmonic pollution index, the actual load variation index and the clean load angle within N consecutive sampling periods, and combine them into a time series feature set;

[0017] The system executes three layers of logical judgment. The first layer of logical judgment is to determine whether the real load variation index in the time series feature set shows a monotonically increasing trend over time. The second layer of logical judgment is to determine whether the harmonic pollution index in the time series feature set is always less than the preset low harmonic pollution threshold. The third layer of logical judgment is to determine whether each pure load angle in the time series feature set is less than the preset pure load angle threshold.

[0018] If all three layers of judgment logic result in true, a strong intent state is generated; otherwise, a weak intent state is generated. The strong intent state and the weak intent state are combined to obtain an intent state set.

[0019] Furthermore, the method for obtaining the spatiotemporal credit funnel region includes:

[0020] When the intent state set is a strong intent state, obtain the monthly cumulative weighted power factor and calculate the difference between it and the preset target assessment value, which is defined as the cumulative reactive power credit deviation; obtain the remaining time until the end of the monthly assessment cycle, which is defined as the remaining assessment time.

[0021] A spatiotemporal coordinate system is constructed with the remaining assessment time as the horizontal axis and the cumulative reactive credit deviation as the vertical axis. In the spatiotemporal coordinate system, the horizontal straight line with a vertical axis value of zero is defined as the zero axis, and two boundary curves are drawn that converge toward the zero axis as the remaining assessment time decreases. The upper boundary curve above the zero axis is defined as the overcompensation warning line, and the lower boundary curve below the zero axis is defined as the penalty risk warning line. The closed area enclosed by the two is the spatiotemporal credit funnel area.

[0022] Furthermore, the method for constructing the feature prediction model includes:

[0023] A running dataset is constructed based on three-phase waveform data, and the running dataset is cleaned and standardized to obtain input feature vectors. The input feature vectors are then divided into training and validation sets.

[0024] The feature prediction model is an improvement on the traditional LSTM model. It embeds a feature attention mechanism layer in series between the output of the input layer and the input of the first LSTM hidden layer in the network topology of the traditional LSTM model. The feature attention mechanism layer is used to receive the input feature vector, dynamically adjust the weights according to the input feature vector, and obtain a weighted input feature vector, which is used as the input of the first LSTM hidden layer.

[0025] The LSTM hidden layer performs temporal feature learning on the weighted input feature vector, and maps it to active power prediction value and reactive power prediction value through the output layer.

[0026] The mean squared error is used as the loss function, and the feature prediction model is iteratively trained using the training set until the loss function value on the validation set converges to a preset accuracy threshold, thus obtaining the feature prediction model.

[0027] Furthermore, the method for obtaining the spatiotemporal instructions includes:

[0028] The real-time operating data at the moment of generating strong intention state is input into the feature prediction model to predict the trend of active power change and reactive power demand change within the future preset time window.

[0029] Based on the predicted trends of active power and reactive power demand, the predicted cumulative reactive power credit deviation at each future time is calculated and connected in the spatiotemporal coordinate system to obtain the spatiotemporal state point trajectory.

[0030] If the trajectory of the spatiotemporal state point is located inside the spatiotemporal credit funnel region, a silent maintenance instruction is generated; if the trajectory will cross below the penalty risk warning line, a mandatory compensation instruction is generated; if the trajectory penetrates above the overcompensation warning line, a mandatory cut-off instruction is generated; the silent maintenance instruction, mandatory compensation instruction, and mandatory cut-off instruction are combined to form a spatiotemporal instruction.

[0031] Furthermore, the method for acquiring the action signal includes:

[0032] The background impedance is calculated by detecting the voltage and current differences in the power distribution circuit generated at the moment of switch action in real time. The background impedance is a complex physical quantity, including a real part and an imaginary part. The real part is defined as resistance and the imaginary part is defined as reactance. An impedance coordinate system is constructed with resistance as the real axis and reactance as the imaginary axis.

[0033] Based on the analysis of three-phase waveform data, the characteristic harmonic frequencies are obtained. For each characteristic harmonic frequency in the impedance coordinate system, the center of the circle is determined by the reactance, and the resonant trap region is calibrated with the preset safety impedance margin as the radius.

[0034] Starting from the origin of the impedance coordinate system, a polygonal region that is geometrically completely avoided from all resonant trap regions is constructed and defined as the dynamic impedance target region.

[0035] Calculate the total system impedance after the proposed switching based on the time and space instructions and map it to the impedance coordinate system;

[0036] If the total impedance of the system after the proposed switch falls within the dynamic impedance target area, an action execution signal is generated; if it falls outside the dynamic impedance target area, an action blocking signal is generated; the action execution signal and the action blocking signal are combined into an action signal.

[0037] Furthermore, the method for constructing the dynamic impedance target region includes:

[0038] In the impedance coordinate system, determine the center coordinates and radius of all resonant trap regions, and sort them in ascending order of the imaginary part of the center coordinates of each resonant trap region.

[0039] Starting from the origin, draw two tangent lines to the first resonant trap region, and select the tangent point located outside the resonant trap region;

[0040] Tangents are drawn sequentially to each of the subsequent resonant trap regions, and the outer tangent points are selected. The tangent points corresponding to adjacent harmonic frequencies are connected sequentially by straight line segments to form an outer envelope broken line, which is then enclosed with the positive half-axis of the impedance coordinate system to form a dynamic impedance target region.

[0041] Furthermore, the physical control commands include:

[0042] If the action signal is an action execution signal, the physical control command is to drive the reactive power compensation controller used to perform the switching operation, send the switching command to the reactive power compensation branch specified in the reactive power compensation element group used for reactive power compensation that can be independently switched, and update the monthly cumulative weighted power factor.

[0043] If the action signal is an action blocking signal, the physical control command will not send any switching command to the reactive power compensation controller, and will force the current switching state of the reactive power compensation element group to remain unchanged, and will execute the resonance warning.

[0044] The resonance early warning includes pushing alarm information to the remote operation and maintenance platform, which includes the characteristic harmonic frequency that causes resonance risk and the current moment when the action lockout occurs.

[0045] Furthermore, the strategy parameter set includes:

[0046] A retrospective analysis of the running dataset is performed at a pre-set evaluation cycle;

[0047] During the evaluation period, the difference between the cumulative reactive power credit deviation before and after each physical control command execution and the ratio of the rated capacity marked on the nameplate of the corresponding reactive power compensation branch are recorded and calculated to obtain the compensation contribution. If the proportion of times the average compensation contribution of the reactive power compensation branch is continuously less than the preset contribution threshold is greater than the preset failure judgment ratio, the reactive power compensation branch is judged to be in failure and the switching priority is reduced.

[0048] The total number of times the resonant warning is executed within the statistical evaluation period is calculated. If the number of warnings executed exceeds the preset warning frequency threshold, the boundary parameters of the spatiotemporal credit funnel region are adjusted.

[0049] The mean square error of the feature prediction model during the evaluation period is calculated. If the mean square error is greater than the retraining threshold, the feature prediction model is iteratively optimized to obtain a new feature prediction model. Finally, a set of strategy parameters is obtained, which includes the updated reactive power compensation branch switching priority list, the spatiotemporal credit funnel region boundary parameters, and the new feature prediction model.

[0050] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0051] This invention achieves orthogonal decoupling between the actual load switching intention and harmonic interference through an intention coordinate system, a steady-state region, and three-layer logic judgment. This solves the problem that traditional technologies cannot distinguish between benign loads and malicious harmonic interference based solely on a single instantaneous threshold. The spatiotemporal credit funnel region, combined with a feature prediction model, transforms the traditional reactive power compensation differential feedback control into full-cycle dynamic programming. It utilizes the credit surplus during off-peak periods to offset the instantaneous deficit during peak periods, significantly reducing ineffective switching actions of reactive power compensation components and extending equipment lifespan while ensuring that the monthly cumulative weighted power factor meets the target. The dynamic impedance target region transforms the complex physical resonance criterion into an efficient geometric inclusion relationship verification, enabling pre-emptive avoidance of resonance risks. This solves the problem of equipment burnout and oscillation accidents caused by blind switching in nonlinear power grids, achieving a perfect balance between physical safety and economic benefits. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 This is a flowchart of a method for dynamic local reactive power balancing based on an AI model algorithm provided in an embodiment of the present invention.

[0054] Figure 2 A schematic diagram of an intentional coordinate system and quantization analysis including a steady-state region is provided for an embodiment of the present invention;

[0055] Figure 3 A schematic diagram illustrating the construction of a spatiotemporal credit funnel region provided in an embodiment of the present invention;

[0056] Figure 4 This is a schematic diagram of impedance security verification based on the impedance coordinate system provided in an embodiment of the present invention. Detailed Implementation

[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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.

[0058] Example 1

[0059] Please see Figure 1As shown, this embodiment provides a dynamic local reactive power balancing method based on AI model algorithms, including:

[0060] Step S10: Obtain three-phase waveform data representing the real-time operating status of the end-user load; construct an intention coordinate system with orthogonal decoupled load properties based on the three-phase waveform data; delineate a steady-state region in the intention coordinate system for filtering background noise; construct a time-series feature set based on the steady-state region; perform three-layer logic judgment on the time-series feature set to obtain the intention state set.

[0061] Further, step S10 includes:

[0062] Step S11: Obtain three-phase waveform data representing the real-time operating status of the end-user load, perform denoising and dynamic feature extraction on the three-phase waveform data, and construct an intention coordinate system with orthogonal decoupled load properties.

[0063] In the operating environment of modern smart distribution networks, distribution circuits bear the responsibility of transmitting electrical energy from the low-voltage side of transformers to end-user loads. These end-user loads typically include three-phase AC electrical equipment such as three-phase asynchronous motors and high-power frequency converters. Therefore, the physical structure of a distribution circuit includes A-phase, B-phase, and C-phase transmission conductors for transmitting electrical energy. Voltage and current signals in the distribution circuit are the most fundamental physical quantities reflecting the system's operating state. However, traditional low-voltage reactive power compensation controllers, limited by hardware computing power, often only collect the effective values ​​of voltage and current at a low sampling frequency, such as 32 points per cycle. This low-frequency sampling loses a large amount of high-frequency information containing transient load characteristics. The reactive power compensation controller is a device that includes hardware such as contactors and reactive power compensation element groups to perform switching operations. The reactive power compensation element group is a collective reactive power regulation device composed of several independently switchable reactive power compensation branches, containing two types of core functional branches: one is a capacitive reactive power compensation branch, composed of capacitors and series reactors connected in series and parallel, whose function is to provide capacitive reactive power to the distribution circuit to offset the reactive power consumption of inductive loads; the other is an inductive reactive power compensation branch, composed of parallel reactors, whose core function is to absorb excess capacitive reactive power in the distribution circuit, avoiding overcompensation or resonance risks. To capture high-frequency information, a core sensing unit with edge computing capabilities is used, such as an intelligent power distribution monitoring and control terminal. This core sensing unit has a built-in analog-to-digital converter and is configured with a sampling frequency that meets the requirements of high-order harmonic analysis of power quality. The sampling frequency is based on the Nyquist sampling theorem. This is to recover the signal characteristics of the highest harmonic order that may exist in the power grid without distortion, ensuring that the core sensing unit can capture voltage transients and current waveform distortions in the distribution circuit, ultimately outputting three-phase waveform data containing rich spectral information. The three-phase waveform data refers to a set of discrete digital sequences arranged in chronological order, covering six channels corresponding to the voltage and current of each of the aforementioned A, B, and C phase transmission conductors. Each independent value in this set is defined as a sampling point, and all sampling points together constitute a sampling point sequence, reflecting the original dataset of the real-time physical state of the distribution circuit.

[0064] The three-phase waveform data contains non-periodic impulse noise, which typically originates from lightning surges, electromagnetic interference from high-power switching operations, or poor contact in the measurement circuit. Therefore, a nonlinear sliding window median filtering algorithm is used to denoise the three-phase waveform data. This algorithm has an "edge-preserving" characteristic, resolving the contradiction between "removing random noise" and "preserving load mutation characteristics." It addresses the problem that traditional filtering blurs the steep edges of data generated by load mutations, leading to phase lag in the recognition of transient events such as motor startup, thus failing to meet the real-time requirements of intent recognition. Specifically, a filtering window of length L is defined. The length L is determined based on the duration of typical impulse interference in the power distribution system and the sampling frequency, and L is less than the total number of sampling points in the three-phase waveform data. Furthermore, L is set to an odd number to directly lock the unique intermediate sampling point after sorting, avoiding additional calculation errors introduced by an even-numbered length. The filtering window slides point by point across the sampling point sequence of the three-phase waveform data. During each slide, the filtering window covers L consecutive sampling points in the sampling point sequence. The values ​​corresponding to the L sampling points covered by the filtering window are extracted, monotonically sorted according to their numerical values, and a sorted temporary array is generated. The value located in the middle position is selected as the filtering output value. The selected filtering output value replaces the value of the original sampling point corresponding to the center position of the filtering window. The filtering window is then moved to the next sampling point. The above process is repeated until the entire three-phase waveform data is traversed to obtain the denoised three-phase waveform data. The denoised three-phase waveform data eliminates isolated maximum or minimum pulses and completely preserves the true signal transition edges.

[0065] A Fast Fourier Transform (FFT) is performed on the denoised three-phase waveform data. The continuously generated three-phase waveform data is segmented according to a preset number of continuous sampling points. Each time segment containing the preset number of continuous sampling points is defined as a sampling period. The preset number of continuous sampling points is set based on the total number of theoretical sampling points corresponding to an integer multiple of the fundamental frequency of the distribution circuit; for example, the number is set to 400. The time-domain signal is converted into a frequency-domain signal, and the frequency-domain spectrum data is extracted. The frequency-domain spectrum data includes the fundamental frequency component and the total harmonic distortion (THD) of the current. The fundamental frequency component represents the voltage and current vector components operating at the standard power frequency in the distribution circuit. It is calculated based on the amplitude and phase information corresponding to the spectral lines with frequencies equal to the standard power frequency in the frequency domain spectrum data, reflecting the main component of the effective power transmitted in the power grid. The total harmonic distortion rate of the current represents the degree of deviation of the current waveform in the distribution circuit from the ideal sine wave. It is calculated based on the ratio of the square root of the sum of the squares of the amplitudes of all harmonic frequency components higher than the standard power frequency in the frequency domain spectrum data to the amplitude of the current in the fundamental frequency component, reflecting the pollution level of power quality by nonlinear loads. Dynamic characteristics are further calculated using the frequency domain spectrum data; these dynamic characteristics include the fundamental active power change rate. Total harmonic distortion rate of change The fundamental active power change rate represents the instantaneous fluctuation intensity of the effective energy transmission scale in the distribution circuit, and is used to quantify benign load switching behavior. The formula for calculating the fundamental active power change rate is: ,in, The fundamental active power in the current sampling period. The fundamental active power in the previous sampling period is P, where P is the rated power, determined based on the nameplate rating of the transformer or main switch connected to the distribution circuit. The purpose is to normalize and eliminate dimensional differences between different capacities, making the fundamental active power change rate a universal indicator. The total harmonic distortion rate (THD) represents the direction and rate of change of power quality pollution in the distribution circuit, used to quantify the activity of malignant nonlinear harmonic sources. The formula for calculating the THD is: ,in, This represents the total harmonic distortion (THD) of the current during the current sampling period. This represents the total harmonic distortion (THD) of the current in the previous sampling period; the purpose of the THD change rate is to capture the dynamic changes in the degree of distortion.

[0066] An intentional coordinate system was constructed to integrate the dynamic characteristics into a unified analytical framework. The fundamental active power change rate is plotted on the horizontal axis, with the positive direction pointing towards drastic changes in active power, representing an enhancement of the "work" attribute in the power grid. The total harmonic distortion rate change rate is plotted on the vertical axis, with the positive direction pointing towards increased waveform distortion, representing an enhancement of the "pollution" attribute in the power grid. The intentional coordinate system maps the fundamental active power change rate and total harmonic distortion rate change rate calculated at any given time to a coordinate point in the intentional coordinate system, i.e., a state vector point. The load state refers to the combination of power fluctuation characteristics and power quality characteristics of the distribution circuit at the sampling time, specifically uniquely determined by the two values ​​of the fundamental active power change rate and total harmonic distortion rate change rate calculated at that time.

[0067] Achieving orthogonal decoupling of signals: when an ideal linear load is applied, the state vector point moves along the horizontal axis; when a pure harmonic source is applied, the state vector point mainly moves along the vertical axis. By using geometric calculations to identify complex load characteristics, this solves the technical problem in traditional techniques where a single threshold judgment cannot distinguish between "high-power linear loads" and "low-power strong harmonic sources," providing a mathematical benchmark with clear physical meaning for subsequent implementation.

[0068] Step S12: Define a steady-state region in the intended coordinate system for filtering background noise.

[0069] After constructing the intended coordinate system, to further enhance anti-interference capabilities in complex electromagnetic environments and focus on load variations with substantial physical significance, a refined functional partitioning of the state space within the intended coordinate system is achieved by establishing clear geometric boundaries. Considering the inherent line thermal noise and measurement errors in the distribution network under normal operating conditions, a square region is defined as the steady-state region, with the origin as the geometric center. The side length of the steady-state region is... The side length is set based on the capacity of the power distribution circuit equipment and the environmental noise level. Its value is based on 1% to 2% of the rated capacity of the transformer or main switch equipment connected to the power distribution circuit, and is corrected by the background noise benchmark value obtained from the statistical analysis of the power distribution circuit operation dataset. The steady-state region geometrically covers the small fluctuation range around the origin of the intended coordinate system, where the origin represents the ideal steady-state point without change.

[0070] For any real-time state vector point, determine its positional relationship with the steady-state region. If the state vector point falls within the steady-state region, the system determines that the rate of change of fundamental active power and the rate of change of total harmonic distortion at the current moment do not exceed the background noise threshold, and it belongs to non-active background fluctuations; the state vector point is marked as invalid data, and any reactive power compensation control commands are prohibited from being generated based on the data of the current sampling period; if the state vector point falls outside the steady-state region, it indicates that a state change exceeding the background noise level has occurred, and quantitative analysis is performed on the state vector point. Specifically, the vertical distance from the state vector point coordinates to the horizontal axis is calculated, which is the harmonic pollution index. This harmonic pollution index is the projection component of the state vector point along the vertical axis, quantifying the degree to which the current state vector point deviates from the ideal sine wave. The vertical distance from the state vector point to the vertical axis is also calculated, which is the actual load variation index. This actual load variation index is the projection component of the state vector point along the horizontal axis, quantifying the amplitude of the fundamental active power jump. Finally, the angle between the line connecting the state vector point and the origin and the horizontal axis is calculated, which is the pure load angle. This pure load angle is calculated using the arctangent function, for example, the harmonic pollution index is... The actual load variation index is ,but ,in, Indicates the angle between the pure loads. The pure load angle is expressed as the arctangent function. It adopts the ratio of the harmonic pollution index to the actual load variation index, making the pure load angle a dimensionless normalized index independent of the absolute load power. This eliminates the influence of load capacity and reflects only the relative proportion of the current load variation. See also... Figure 2 This is a schematic diagram of an intentional coordinate system and quantization analysis including a steady-state region, provided by an embodiment of the present invention. As shown in the figure... , O and O represent the vertical axis, horizontal axis, and origin of the intended coordinate system, respectively. At the origin O, the horizontal axis and vertical axis intersect two lines perpendicular to the coordinate axes, each with a length of... The fixed small square region enclosed by the dashed line segments is the steady-state region. The figure shows the side length of the steady-state region. A state vector point that falls outside the steady-state region is shown in the figure, and its geometric characteristics are decomposed and quantified. The harmonic pollution index is represented by the dashed line segment that is the vertical projection of the state vector point onto the horizontal axis. For easy distinction, the real load variation index is shown as a thick solid line segment below the horizontal axis in the figure. The length of this thick solid line segment corresponds to the projection component of the state vector point on the horizontal axis. The pure load angle is indicated by the arc of the line connecting the state vector point and the origin relative to the horizontal axis in the figure.

[0071] Step S13: Construct a temporal feature set based on the steady-state region, perform three-layer logical judgment on the temporal feature set, and obtain the intention state set.

[0072] After quantifying the geometric features of the state vector points and steady-state regions within a single sampling period, a time-series-based continuity verification mechanism was introduced to further improve the confidence level of the recognition results in the time domain and accurately capture the dynamic evolution patterns during load startup. By jointly analyzing the trajectory features of the state vector points in the spatiotemporal sequence across multiple consecutive sampling periods, the final determination of the load switching intention was achieved.

[0073] Specifically, a verification window is set, the length of which is N sampling periods. N is set according to the transient process duration of typical impact loads in the power distribution circuit. Typical impact loads include high-power motor starting and transformer no-load closing; for example, it is set to 3. Harmonic pollution indicators, actual load variation indicators, and clean load angles within the most recent N consecutive sampling periods are cached and monitored in real time. The cached sequences of harmonic pollution indicators, actual load variation indicators, and clean load angles containing time sequence information are combined into a time-series feature set, which constitutes the data foundation for analyzing load dynamic behavior.

[0074] A three-layer logical judgment is performed on the time-series feature set. The first layer of logical judgment is: whether the pure load angle of each load within N consecutive sampling periods in the time-series feature set is less than a preset pure load angle threshold. The pure load angle threshold is used to distinguish the boundary angle between linear and nonlinear loads. It is set based on the typical characteristic that the active power increases sharply while the harmonic distortion remains low when a linear load starts up, in order to eliminate harmonic source interference. For example, it is set between 15 degrees and 30 degrees. If the pure load angle of each load within N consecutive sampling periods in the time-series feature set is less than the preset pure load angle threshold, then the first layer of logical judgment is satisfied. The second layer of logical judgment is: judging the actual load variation within N consecutive sampling periods in the time-series feature set. Whether the indicator shows a monotonically increasing trend over time, that is, the actual load change indicator in any sampling period is greater than the value in the previous sampling period; reflects that the load is undergoing a gradual energy release or build-up process, rather than instantaneous pulse interference; the third layer of logic judgment is: to judge whether the harmonic pollution indicator in the time sequence feature set is always less than the preset harmonic pollution low threshold in N consecutive sampling periods. The harmonic pollution low threshold is a safety tolerance parameter set based on the power quality standard limit value. It is set at 50%-80% of the allowable value of harmonic current of the public power grid corresponding to the voltage level of the distribution circuit. The purpose is to ensure that harmonic pollution is always within a controllable and safe range and to prevent power quality deterioration caused by nonlinear load operation.

[0075] If all three judgment conditions in the three-level logic judgment are true (i.e., the first, second, and third level logic judgments are all true), then the current load change is confirmed as a genuine, benign power increase event dominated by linear load, thus generating a strong intention state. In the strong intention state, the difference between the actual reactive power value of the distribution circuit at the current moment and the preset target value is calculated, and this difference is defined as the reactive power deficit. The actual reactive power value is obtained by extracting the fundamental frequency component and using a frequency domain reactive power calculation algorithm. The preset target value is set according to the power factor assessment standard stipulated by the power supply department. The purpose of calculating the reactive power deficit is to quantify the reactive power capacity that the distribution circuit still needs to compensate to reach the assessment standard, providing a quantitative target basis for the subsequent switching of reactive power compensation element groups.

[0076] If any one of the three-level logic judgments is false (i.e., any one of the first, second, or third-level logic judgments is invalid), the power distribution circuit is determined to be in a nonlinear fluctuation state dominated by harmonic pollution or an unstable transient interference state, generating a weak intention state. This indicates that although the current fluctuation leads to an increase in apparent power, its physical nature is not due to a stable reactive power demand caused by a linear load. If the reactive power compensation element group is activated in this state, there is a risk of triggering harmonic amplification or causing system overcompensation. A transient blocking process is performed for the weak intention state, forcibly maintaining the switching state of the reactive power compensation element group at the current moment, without responding to reactive power deficits, until the signal returns to normal or the judgment condition for generating a strong intention state is met. Combining the weak and strong intention states into an intention state set effectively solves the problem of potential deception in data at a single moment, ensuring that every transfer of control is based on unwavering certainty about the load characteristics, greatly improving the robustness and security of reactive power compensation.

[0077] Step S10, through three-phase waveform data, an intention coordinate system, a steady-state region, and three-layer logic judgment, solves the technical problem of traditional technology's inability to distinguish between benign loads and malicious harmonic interference based solely on a single instantaneous value, leading to frequent malfunctions of the compensation controller under complex operating conditions. It achieves accurate identification and classification of load switching intentions and ultimately outputs a set of intention states representing the actual demand. Specifically, the intention coordinate system transforms the complex power quality problem into an intuitive two-dimensional geometric problem, achieving mathematical decoupling between the attributes of "work" and "pollution"; the steady-state region delineation and geometric feature quantification constitute the initial screening of valid signals; and the three-layer logic judgment, by introducing a continuity check in the time dimension, ultimately completes the accurate determination of the load intention.

[0078] Step S20: Construct a spatiotemporal credit funnel region for multi-objective optimization decision based on the intention state set; construct and train a feature prediction model based on the spatiotemporal credit funnel region; predict the trajectory of spatiotemporal state points using the feature prediction model; perform positional relationship judgment on the trajectory of spatiotemporal state points to obtain spatiotemporal commands; perform impedance safety verification on the spatiotemporal commands to obtain the action signal used to drive the reactive power compensation branch that can be independently switched.

[0079] Further, step S20 includes:

[0080] Step S21: Construct a spatiotemporal credit funnel region for multi-objective optimization decision-making based on the intent state set.

[0081] After completing the three-layer logic judgment and outputting the intention state set, if the intention state set indicates that the current state is a strong intention state, it means that there is a real reactive power deficit in the power distribution circuit caused by the linear load. In order to resolve the multi-objective optimization conflict between the monthly integral assessment index and the instantaneous switch action life, a spatiotemporal credit funnel region with convergence characteristics is constructed. The spatiotemporal credit funnel region no longer views the current reactive power deficit in isolation, but rather places it within the spatiotemporal framework of the entire monthly assessment cycle for dynamic evaluation.

[0082] The core sensing unit reads the current monthly cumulative weighted power factor, which represents the average reactive power compensation performance of the distribution circuit from the start of the current assessment period to the current time. Its value is calculated based on the accumulated active and reactive power using the same weighted average algorithm as the power supply department's billing system. Simultaneously, a target assessment value is preset. This target assessment value is the minimum compliance threshold set according to the "Power Factor Adjustment Electricity Fee Method" issued by the power supply department or the local power grid access standard. For example, for industrial users of 100 kVA and above, the target assessment value is typically set at 0.9. The difference between the monthly cumulative weighted power factor and the target assessment value is calculated and defined as the cumulative reactive power credit deviation. This cumulative reactive power credit deviation quantifies whether the distribution circuit is in a surplus or deficit state relative to the current assessment progress. Furthermore, the remaining time from the current time to the end of the current monthly assessment period is obtained and defined as the remaining assessment time.

[0083] A spatiotemporal coordinate system is constructed with the remaining assessment time as the horizontal axis and the accumulated reactive power credit deviation as the vertical axis. The coordinate position determined by the current remaining assessment time and the accumulated reactive power credit deviation is defined as the spatiotemporal state point. In this spatiotemporal coordinate system, the horizontal line with a vertical axis value of zero is defined as the zero axis. Two boundary curves are plotted that converge towards the zero axis as the remaining assessment time decreases: one is the upper boundary curve located above the zero axis, defined as the overcompensation warning line. If the spatiotemporal state point is located above the overcompensation warning line, it means that too much reactive power is being fed back to the grid; the other is the lower boundary curve located below the zero axis, defined as the penalty risk warning line. If the spatiotemporal state point is located below the penalty risk warning line, it means that the accumulated monthly reactive power credit deviation has become too large to be compensated for in the remaining time. The mathematical expression for the overcompensation warning line is: The mathematical expression for the penalty risk warning line is: .in, For the remaining assessment time, The total duration of the monthly assessment cycle is set according to the billing and settlement cycle of the power supply department. , This is the boundary amplitude coefficient, and its value is determined based on the maximum fluctuation range of the accumulated reactive power credit deviation in the running dataset at the beginning of the assessment period. For example... , The values ​​are set to 0.05 and 0.03 respectively, indicating that at the beginning of the assessment period, the cumulative reactive power credit deviation is allowed to fluctuate within a range of -3% to +5%. The convergence index, with a value greater than 1, is used to achieve nonlinear convergence. A larger value indicates a faster convergence speed of the penalty risk warning line towards the zero axis, requiring higher control precision. For example, a convergence index of 2 indicates a parabolic convergence curve. The overcompensation warning line and penalty risk warning line are constructed based on the nonlinear convergence curve generated by the time value decay theory. The rationale for this construction is as follows: In the early stages of the assessment period, due to ample remaining assessment time, there is a long period to smooth future random fluctuations, thus allowing for larger cumulative deviations. At this time, the warning line is far from the zero axis, forming a wider safety corridor, aiming to reduce unnecessary switching actions. As the assessment period nears its end, the remaining assessment time decreases sharply, and the ability to correct cumulative deviations decays nonlinearly, compressing the fault tolerance space. Therefore, the warning line must converge towards the zero axis faster than linearly, forcing a forced return to the target value, thereby ensuring absolute compliance with the monthly assessment. The closed region enclosed by the overcompensation warning line and penalty risk warning line constitutes the spatiotemporal credit funnel region. See also... Figure 3This is a schematic diagram illustrating the construction of a spatiotemporal credit funnel region according to an embodiment of the present invention. The horizontal axis of the spatiotemporal coordinate system represents the remaining assessment time, decreasing from left to right, with the left side representing the beginning of the month and the right side representing the end of the month; the vertical axis represents the cumulative reactive power credit deviation. The dashed line in the diagram represents the zero axis, signifying a supply-demand balance. The overcompensation warning line is a solid curve above the zero axis, converging towards the zero axis as the remaining assessment time decreases. The penalty risk warning line is a solid curve below the zero axis, also converging towards the zero axis as the remaining assessment time decreases. The region enclosed by the overcompensation warning line, the penalty risk warning line, and the left vertical axis is the spatiotemporal credit funnel region. Spatiotemporal state points are indicated by solid dots in the diagram, representing the specific state position at the current moment.

[0084] Step S22: Construct and train a feature prediction model based on the spatiotemporal credit funnel region, use the feature prediction model to predict the trajectory of spatiotemporal state points, perform positional relationship judgment on the trajectory of spatiotemporal state points, and obtain spatiotemporal instructions.

[0085] After constructing a spatiotemporal credit funnel region reflecting monthly performance constraints, a deep learning-based predictive control mechanism was introduced to proactively mitigate future risks. To ensure the accuracy and robustness of the prediction results, a feature prediction model was constructed and trained.

[0086] The construction process of the feature prediction model is as follows: In the data acquisition and selection stage, a multi-dimensional operational dataset was constructed as the basis for model training. This operational dataset specifically includes the following three types of data sources: The first type is a basic electrical parameter sequence, including a three-phase active power sequence and a three-phase reactive power sequence. The three-phase active power sequence refers to the set of active power values ​​for phases A, B, and C in a distribution circuit recorded in chronological order. The three-phase reactive power sequence refers to the set of reactive power values ​​for phases A, B, and C in a distribution circuit recorded in chronological order. The basic electrical parameter sequence utilizes historical three-phase waveform data... The data consists of three categories: 1) Overpower calculation algorithm, which calculates data periodically and stores it in chronological order; 2) High-dimensional geometric feature sequences, including harmonic pollution index sequences, actual load variation index sequences, and clean load angle sequences; and 3) Environmental and temporal context data, including date type labels and ambient temperature data. Date type labels are discrete variables identifying the load pattern attributes of the day, obtained based on the system clock of the core sensing unit, used to distinguish between weekday and holiday electricity consumption behavior. Ambient temperature data are continuous variables characterizing the thermal environment of the power distribution site, collected in real-time by integrated or external temperature sensors of the core sensing unit. The rationale for selecting these three types of data is as follows: Active and reactive power sequences reflect the basic energy consumption patterns of the load; harmonic pollution and actual load variation indices, after orthogonal decoupling through the intended coordinate system, provide clean load behavior characteristics free from noise interference, better distinguishing the evolution trends of linear loads and nonlinear disturbances; and date and temperature data provide macroscopic environmental context information, such as the differences in load patterns between weekdays and holidays and the impact of temperature on air conditioning load.

[0087] In the data preprocessing stage, the running dataset is cleaned and standardized to remove missing and outlier values ​​caused by communication failures or equipment maintenance. Linear interpolation is used to complete the data. Normalization methods, such as Min-Max normalization, are used to map the values ​​of all dimensions in the running dataset to the [0,1] interval to eliminate different physical dimensions. The three-phase active power, three-phase reactive power, harmonic pollution index, real load variation index, clean load angle, date type label, and ambient temperature data at the same sampling point are combined into a multi-dimensional input feature vector. In the model building phase, to address the issue of traditional LSTM averaging the weights of all input features, an improved design was introduced into the network topology. Specifically, a feature attention mechanism layer was directly embedded in series between the output of the input layer and the input of the first LSTM hidden layer. This feature attention mechanism layer receives the input feature vector from the input layer, learns a weight vector through a fully connected neural network, and dynamically adjusts its contribution to the prediction result based on the values ​​of each feature dimension and its temporal fluctuation characteristics. The weighted and adjusted input feature vector is then used as the input signal for the first LSTM hidden layer. Specifically, when the input clean load angle sequence exhibits drastic fluctuations, the attention mechanism automatically increases the weights, thus overcoming the lag in response of standard LSTM when processing abrupt signals. The hidden layer consists of two stacked LSTM units. Each LSTM unit is the basic operational core of a Long Short-Term Memory (LSTM) network, containing three gate structures: a forget gate, an input gate, and an output gate. These gates selectively remember or forget historical information, effectively capturing long-term dependencies in time-series data. The weighted input feature vector is fed into a hidden layer consisting of two stacked LSTM units for temporal feature learning. The first layer contains 128 neurons, and the second layer contains 64 neurons. The LSTM unit is the basic operational kernel of the Long Short-Term Memory network. It contains three gate structures: a forget gate, an input gate, and an output gate. It can selectively remember or forget historical information, thereby effectively capturing long-term dependencies in time series data. The hidden state vector output from the second LSTM hidden layer is then passed through an output layer containing two fully connected nodes, which are mapped to the active power value and reactive power value at the prediction time, respectively.

[0088] During the model training phase, mean squared error (MSE) is used as the loss function. The MSE is calculated by averaging the squares of the differences between the predicted active power and reactive power values ​​and the corresponding actual active power and reactive power values ​​in the running dataset. This aims to quantify the deviation of the prediction results. The Adam optimizer is used for parameter updates, with an initial learning rate set to 0.001. The running dataset is divided chronologically, with the first 80% as the training set and the last 20% as the validation set. The backpropagation algorithm iteratively adjusts all trainable parameters in the feature attention mechanism layer, LSTM hidden layer, and output layer until the loss function value on the validation set converges to a preset accuracy threshold, completing model training. For example, setting the accuracy threshold to 0.01 indicates that the allowed average prediction error is within 1% of the normalized value; at this point, model training is considered complete. The trained feature prediction model can receive real-time multi-dimensional input feature vectors and output predicted reactive power values ​​for future time periods.

[0089] During the prediction and decision-making phase, a real-time operational dataset is collected to generate the state at the moment of strong intent. This dataset includes three-phase active power values, three-phase reactive power values, harmonic pollution indicators, actual load variation indicators, clean load angle, date type labels, and ambient temperature data, which are combined into a real-time input feature vector consistent with the format used in the model training phase. This real-time input feature vector is then input into the pre-trained feature prediction model, which simultaneously predicts the active power and reactive power demand trends within a preset future time window. Specifically, this is represented by a series of predicted active and reactive power values ​​output in chronological order. The preset future time window is set based on control response requirements to cover typical daily load fluctuation cycles; for example, it is set to the next 4 to 24 hours. Based on the predicted trends of active and reactive power, and combined with the currently known cumulative active and reactive power, the predicted cumulative active and reactive power are calculated at each future time by integrating the predicted active and reactive power value sequences. Then, the predicted monthly cumulative weighted power factor is calculated based on the predicted cumulative active and reactive power at each future time. Finally, the predicted cumulative reactive power credit deviation at each future time is obtained, and these future coordinate points are connected into a continuous curve, which is defined as the spatiotemporal state point trajectory.

[0090] The system performs collision detection on the trajectory and boundaries to determine the positional relationship between the generated spatiotemporal state point trajectory and the spatiotemporal credit funnel region. If the spatiotemporal state point trajectory is entirely within the spatiotemporal credit funnel region, it indicates that, under the premise of maintaining the current reactive power compensation control strategy, even if the load fluctuates in the future, the accumulated reactive power credit deviation will naturally converge to the target assessment value without violating the overcompensation limit. A silent hold instruction is generated to keep the switching state of the reactive power compensation element group unchanged, thereby minimizing the mechanical losses of the switching equipment. If the spatiotemporal state point trajectory will cross from inside the spatiotemporal credit funnel region to below the penalty risk warning line in the future, it indicates that if the reactive power compensation control strategy remains unchanged, the future accumulated monthly accumulated reactive power credit deviation will cause the monthly accumulated weighted power factor to be less than the target assessment value. A forced compensation instruction is generated to control the reactive power compensation element group to perform the operation to increase the reactive power compensation amount, thereby correcting the spatiotemporal state point trajectory and causing it to return to the spatiotemporal credit funnel region. If the spatiotemporal state point trajectory penetrates above the overcompensation warning line at a future time, it indicates that the future reactive power surplus will exceed the grid's allowable range, posing a risk of voltage exceeding limits. A forced disconnection command is generated to control the reactive power compensation element group to perform a disconnection operation to reduce the reactive power compensation amount, thereby lowering the spatiotemporal state point trajectory. The silent hold command, forced compensation command, and forced disconnection command are combined into a spatiotemporal command. This achieves a leap from traditional ex-post correction to ex-ante management, ensuring that the reactive power compensation control strategy possesses global optimality while meeting performance requirements.

[0091] Step S23: Perform impedance safety verification for the time-space command to obtain the action signal for driving the reactive power compensation branch that can be independently switched.

[0092] After receiving the spatiotemporal command, in order to prevent the action of the actuator from causing physical resonance on the power grid side, a safety firewall based on impedance characteristics is set up before the control command is issued.

[0093] Specifically, by utilizing the high-frequency transient capture capability of the core sensing unit, the voltage difference in the power distribution circuit generated at the moment of the most recent switching action is monitored in real time. With current difference Based on Thevenin's equivalent theorem, the background impedance of the distribution circuit connection point at the analyzed characteristic harmonic frequency H is calculated. ,Right now .in, This represents the voltage phasor difference at point H before and after the switch operation. The background impedance is the phasor difference of the current at point H before and after the switching action. It is a complex physical quantity with a real and imaginary part. The real part is defined as resistance R, and the imaginary part as reactance E. An impedance coordinate system is constructed with resistance as the real axis and reactance as the imaginary axis. The reason for constructing this coordinate system is that the physical essence of power grid resonance is a complex impedance matching problem between the system inductive reactance and the capacitive reactance of the compensation capacitor at a specific frequency. By constructing this coordinate system, the abstract physical conditions of resonance can be transformed into an intuitive two-dimensional planar geometric region, realizing the visualization of physical risks and the efficiency of calculation. For each characteristic harmonic frequency, a circular region with the system inductive reactance as the center and a preset safety impedance margin as the radius is defined as the resonance trap region. Here, system inductive reactance is the numerical representation of reactance, and the safety impedance margin is a protection radius set based on the accuracy of distribution network impedance measurement and environmental influence factors. Its value is usually set to 10% to 20% of the system inductive reactance modulus to balance safety and the adjustable range of compensation capacity. The basis for constructing the resonant trap region is as follows: considering the dynamic drift of the real and imaginary parts of the system background impedance due to factors such as temperature and aging, as well as the objective errors in the measurement process, the physical resonance risk point is not an absolutely fixed geometric point, but a neighborhood around the theoretical resonance value. The purpose of the resonant trap region is to provide sufficient safety margin to prevent accidental triggering of parallel resonance due to small fluctuations in impedance parameters. Starting from the origin of the impedance coordinate system, a polygonal region that geometrically avoids all resonant trap regions is constructed, defined as the dynamic impedance target region. Specifically, the center coordinates and radii of all resonant trap regions are determined in the impedance coordinate system. The resonant trap regions are sorted according to the imaginary part of their center coordinates from smallest to largest. Starting from the origin, two tangent lines are drawn to each resonant trap region, and the tangent point located outside the resonant trap region is selected. Tangent lines are drawn to subsequent resonant trap regions in sequence, and the outer tangent points are selected. All the outer tangent points are connected sequentially by straight line segments and enclosed with the positive semi-axis of the impedance coordinate system to form a closed polygonal region, defined as the dynamic impedance target region.

[0094] For the time-space command to perform impedance safety verification, if the time-space command is a silent hold command, since it does not involve the switching action of the reactive power compensation element group, it will not change the system impedance structure, and the verification is judged to pass, and the current switching state of the reactive power compensation element group remains unchanged. If the time-space command is a forced compensation command or a forced disconnection command, the rated capacity of the capacitor and the reactance of the reactor are extracted by querying the nameplate of the corresponding reactive power compensation element group. The total impedance of the system after the proposed switching is calculated using the parallel circuit impedance calculation formula. The total impedance of the system after the proposed switching is mapped to the impedance coordinate system. It is determined whether the total impedance of the system after the proposed switching falls within the dynamic impedance target area. If it does, it indicates that harmonic resonance will not be triggered, and an action execution signal is generated to drive the reactive power compensation controller to execute the corresponding forced compensation command or forced disconnection command. If the total impedance of the system after the proposed switching falls outside the dynamic impedance target area, it indicates that there is an extremely high risk of resonance. An attempt is made to select alternative reactive power compensation branches with different rated capacities or different reactance rates, and the total impedance of the system after the proposed switching is recalculated and verified. For example, three different alternative reactive power compensation branches are selected. If all alternative reactive power compensation branches fail the verification, an action blocking signal is generated to force the current reactive power compensation element group switching state to remain unchanged, and a resonance warning signal is issued. The action blocking signal and the action execution signal are combined into an action signal. This solves the problem of equipment burnout accidents caused by blind switching in nonlinear power grids, achieving a perfect balance between physical safety and control objectives. See also Figure 4 This is a schematic diagram of impedance security verification based on an impedance coordinate system provided in an embodiment of the present invention. Figure 4 As shown, the horizontal axis is the real axis R, and the vertical axis is the imaginary axis E. The two dashed circles in the example represent the resonance trap region, which represents the high-risk impedance range where resonance occurs. The polygonal region enclosed by the thick solid line in the figure is the dynamic impedance target region. Its boundary is defined by the outer envelope of the tangent lines drawn from the origin to each resonance trap region and the coordinate axis. Geometrically, it avoids all resonance trap regions and represents the safe impedance range for system operation. The solid circle in the figure represents the total impedance of the system after the proposed switching. Since it falls outside the dynamic impedance target region, an action blocking signal will be generated.

[0095] Step S20, through the spatiotemporal credit funnel region, feature prediction model, and impedance safety verification, solves the technical problem that traditional reactive power compensation strategies only focus on instantaneous power factor while ignoring monthly cumulative assessment indicators, and cannot avoid the risk of physical resonance. It achieves multi-objective optimization decision-making under the dual constraints of meeting long-term assessment goals and ensuring physical safety, and ultimately outputs action signals for driving or blocking the switching of reactive power compensation element groups. Specifically, the spatiotemporal credit funnel region concretizes the abstract monthly assessment target into a geometrically constrained corridor that converges over time; the feature prediction model, through deep learning of historical patterns, achieves forward-looking prediction of future reactive power demand trends; and the impedance safety verification constitutes a safe veto for the command.

[0096] Step S30: Analyze and respond to the action signal to obtain physical control commands, execute the a posteriori adjustment mechanism on the physical control commands, and obtain an adaptive optimization strategy parameter set.

[0097] Further, step S30 includes:

[0098] Step S31: Analyze and respond to the action signal, and convert the action signal into differentiated physical control commands.

[0099] After outputting the action signal, in order to transform the abstract action signal into precise physical control behavior in the power distribution circuit and update the system status in real time to form a closed-loop feedback, a bridge connecting the decision-making layer and the physical execution layer is built by parsing and responding to the action signal.

[0100] Specifically, if the action signal is an action execution signal, the physical control instruction is: drive the reactive power compensation controller in the power distribution circuit to send a switching command to the designated reactive power compensation branch to complete a safe reactive power compensation operation. Within a stable cycle after the reactive power compensation operation is completed, re-collect three-phase waveform data, update the current cumulative active power and cumulative reactive power values, and then refresh the monthly cumulative weighted power factor in real time. This ensures that the spatiotemporal credit funnel area can be evaluated according to the latest data during the next cycle decision, forming a complete closed loop from decision-making, execution to status feedback. If the action signal is an action lockout signal, the physical control instruction is: determine that the current conditions for safe switching are not met. In this case, do not send any switching command to the reactive power compensation controller, and forcibly maintain the current switching state of the reactive power compensation element group unchanged. At the same time, execute the resonance warning, which includes: popping up a bright alarm window on the local display screen of the core sensing unit, and pushing alarm information including the characteristic harmonic frequency that causes resonance risk and the current time of action lockout to the remote operation and maintenance platform through the communication interface. The aim is to promptly notify maintenance personnel of any abnormal states in the power grid, providing a basis for decision-making regarding subsequent manual intervention or power quality management. By differentiating the processing of action execution signals and action blocking signals, dynamic local balancing of reactive power is achieved while ensuring physical safety.

[0101] Step S32: Execute a post-hoc adjustment mechanism on the physical control commands to obtain an adaptively optimized set of strategy parameters.

[0102] After the physical control command is executed, in order to cope with the slow changes or sudden changes in the load characteristics of the power distribution circuit, a post-hoc adjustment mechanism for strategy evaluation and model optimization is constructed.

[0103] A retrospective analysis of the operational dataset is conducted over a pre-defined evaluation period, such as weekly or monthly. The post-hoc adjustment mechanism includes compensation benefit assessment, operational safety assessment, and model accuracy assessment. The compensation benefit assessment involves recording the cumulative reactive power credit deviation before each physical control command and recalculating the updated cumulative reactive power credit deviation after each switching operation. The ratio of the change in cumulative reactive power credit deviation before and after the physical control command to the rated capacity indicated on the nameplate of the corresponding reactive power compensation branch is defined as the compensation contribution. If, within the evaluation period, the percentage of times the average compensation contribution of a reactive power compensation branch is consistently less than a pre-defined contribution threshold exceeds the failure determination ratio, then the reactive power compensation branch is determined to be failed. For reactive power compensation branches determined to be failed, the switching priority weight or ranking of these branches among all reactive power compensation branches is reduced to decrease the frequency of their use in decision-making. Among them, the reactive power compensation branch refers to a circuit unit in the reactive power compensation equipment in the power distribution circuit that can be independently switched and includes capacitors and reactors. The contribution threshold is based on the distribution of the compensation contribution values ​​of all historical effective compensation operations, and the 10th percentile of its statistical distribution is selected as the minimum efficiency standard. The failure judgment ratio is used as the statistical threshold to determine whether the reactive power compensation branch should be identified as a failure due to performance degradation. For example, the failure judgment ratio is set to 80%.

[0104] Operational safety assessment refers to the statistical analysis of the total number of resonance warnings executed and the number of warnings corresponding to each characteristic harmonic frequency within the assessment period. If the number of resonance warnings executed for a specific characteristic harmonic frequency exceeds a preset warning frequency threshold, it is determined that the harmonic environment of the power distribution circuit has continuously deteriorated. Simultaneously, the boundary parameters of the spatiotemporal credit funnel region will be dynamically adjusted. For example, the lower limit can be appropriately relaxed by reducing the slope of the penalty risk warning line, thereby reducing the sensitivity of triggering compensation actions during periods of high harmonic incidence and prioritizing equipment operational safety. The warning frequency threshold is used as a statistical boundary to determine whether the harmonic environment constitutes a continuous risk. Its value is based on operation and maintenance management experience or relevant power quality standards, combined with the maximum tolerable number of alarms set according to the assessment period length. For example, the warning frequency threshold is set to 5 times. Model accuracy evaluation and retraining refers to comparing the predicted reactive power values ​​of the feature prediction model with the actual reactive power values ​​within the evaluation period, calculating the overall mean square error. If the mean square error exceeds a preset retraining threshold, it indicates that the model's prediction accuracy can no longer meet the requirements of the current operating conditions. Newly collected operational datasets from the evaluation period are then added to the training set for iterative optimization, generating a new feature prediction model more suited to the current load characteristics. The retraining threshold is used to determine whether the accuracy of the current feature prediction model has significantly deviated from the acceptable range. Its setting is based on the best performance achieved on the validation set when the feature prediction model was initially trained. For example, the retraining threshold is set to twice the mean square error of the validation set when the initial training was completed. Through posterior adjustment mechanisms for compensation benefit evaluation, operational safety evaluation, and model accuracy evaluation, continuous self-optimization of the entire control strategy is achieved. Ultimately, a strategy parameter set containing an updated reactive power compensation branch switching priority list, spatiotemporal credit funnel region boundary parameters, and a new feature prediction model is generated, ensuring the efficiency, safety, and adaptability of the reactive power compensation method during long-term operation.

[0105] Step S30, through the analysis and response to action signals and the posterior adjustment mechanism, solves the technical problem of the control system lacking state feedback and adaptive strategy optimization capabilities after decision execution. It achieves a complete adaptive control loop from decision execution to state closure and then to strategy evolution, ultimately generating an adaptive control strategy parameter set to guide the operation of the next evaluation cycle. Specifically, the differentiated analysis and response to action signals ensures the reliable execution of safety commands and the effective blocking of dangerous commands, and completes real-time updates of the system state; the posterior adjustment mechanism enables continuous self-optimization of the reactive power compensation branch priority, funnel boundary parameters, and prediction model weights.

[0106] The methods and systems of this application may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the method is for illustrative purposes only, and the steps of the method of this application are not limited to the order specifically described above, unless otherwise specifically stated.

[0107] In addition, the parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of the corresponding technical solutions in the prior art have not been described in detail, so as to avoid excessive elaboration.

[0108] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A dynamic local reactive power balancing method based on AI model algorithms, characterized in that, The method includes: Acquire three-phase waveform data representing the real-time operating status of the end-user load. Construct an intention coordinate system with orthogonal decoupled load properties based on the three-phase waveform data. Define a steady-state region in the intention coordinate system to filter background noise. Construct a time-series feature set based on the steady-state region. Perform three-layer logic judgment on the time-series feature set to obtain the intention state set. A spatiotemporal credit funnel region for multi-objective optimization decision-making is constructed based on the intention state set. A feature prediction model is constructed and trained based on the spatiotemporal credit funnel region. The spatiotemporal state point trajectory is predicted using the feature prediction model. The positional relationship of the spatiotemporal state point trajectory is judged to obtain the spatiotemporal command. The impedance safety check is performed on the spatiotemporal command to obtain the action signal used to drive the reactive power compensation branch that can be independently switched. The action signal is parsed and responded to to obtain physical control commands. The a posteriori adjustment mechanism is executed on the physical control commands to obtain an adaptive optimization strategy parameter set. The method for obtaining the spatiotemporal credit funnel region includes: when the intent state set is a strong intent state, obtaining the monthly cumulative weighted power factor and calculating the difference between it and the preset target assessment value, which is defined as the cumulative reactive power credit deviation; obtaining the remaining time until the end of the monthly assessment cycle, which is defined as the remaining assessment time. A spatiotemporal coordinate system is constructed with the remaining assessment time as the horizontal axis and the cumulative reactive credit deviation as the vertical axis. In the spatiotemporal coordinate system, the horizontal straight line with a vertical axis coordinate value of zero is defined as the zero axis, and two boundary curves are drawn that converge toward the zero axis as the remaining assessment time decreases. The upper boundary curve above the zero axis is defined as the overcompensation warning line, and the lower boundary curve below the zero axis is defined as the penalty risk warning line. The closed area enclosed by the two is the spatiotemporal credit funnel area. The method for obtaining the spatiotemporal instructions includes: inputting real-time operating data at the moment of generating the strong intention state into a feature prediction model to predict the active power change trend and reactive power demand change trend within a future preset time window; Based on the predicted trends of active power and reactive power demand, the predicted cumulative reactive power credit deviation at each future time is calculated and connected in the spatiotemporal coordinate system to obtain the spatiotemporal state point trajectory. If the trajectory of the spatiotemporal state point is located inside the spatiotemporal credit funnel region, a silent maintenance instruction is generated; if the trajectory will cross below the penalty risk warning line, a mandatory compensation instruction is generated; if the trajectory penetrates above the overcompensation warning line, a mandatory cut-off instruction is generated; the silent maintenance instruction, mandatory compensation instruction, and mandatory cut-off instruction are combined to form a spatiotemporal instruction.

2. The reactive power dynamic local balancing method based on AI model algorithm as described in claim 1, characterized in that, The method for obtaining the steady-state region includes: Denoising is performed on the three-phase waveform data to extract dynamic features including the rate of change of fundamental active power and the rate of change of total harmonic distortion. A target coordinate system is constructed with the fundamental active power change rate on the horizontal axis and the total harmonic distortion rate change rate on the vertical axis. The fundamental active power change rate and the total harmonic distortion rate change rate are used as coordinate values ​​and mapped to a coordinate point in the target coordinate system, namely the state vector point. The steady-state region is a square region with the origin of the intended coordinate system as its geometric center. When the state vector point falls outside the steady-state region, the vertical distance from the state vector point to the horizontal axis is calculated as the harmonic pollution index, the vertical distance from the state vector point to the vertical axis is calculated as the true load variation index, and the angle between the line connecting the state vector point and the origin and the horizontal axis is calculated as the pure load angle.

3. The reactive power dynamic local balancing method based on AI model algorithm as described in claim 2, characterized in that, The method for obtaining the intent state set includes: Set up a verification window with a length of N sampling periods, cache the harmonic pollution index, the actual load variation index and the clean load angle within N consecutive sampling periods, and combine them into a time series feature set; The system executes three layers of logical judgment. The first layer of logical judgment is to determine whether the real load variation index in the time series feature set shows a monotonically increasing trend over time. The second layer of logical judgment is to determine whether the harmonic pollution index in the time series feature set is always less than the preset low harmonic pollution threshold. The third layer of logical judgment is to determine whether each pure load angle in the time series feature set is less than the preset pure load angle threshold. If all three layers of judgment logic result in true, a strong intent state is generated; otherwise, a weak intent state is generated. The strong intent state and the weak intent state are combined to obtain an intent state set.

4. The reactive power dynamic local balancing method based on AI model algorithm as described in claim 3, characterized in that, The method for constructing the feature prediction model includes: A running dataset is constructed based on three-phase waveform data, and the running dataset is cleaned and standardized to obtain input feature vectors. The input feature vectors are then divided into training and validation sets. The feature prediction model is an improvement on the traditional LSTM model. It embeds a feature attention mechanism layer in series between the output of the input layer and the input of the first LSTM hidden layer in the network topology of the traditional LSTM model. The feature attention mechanism layer is used to receive the input feature vector, dynamically adjust the weights according to the input feature vector, and obtain a weighted input feature vector, which is used as the input of the first LSTM hidden layer. The LSTM hidden layer performs temporal feature learning on the weighted input feature vector, and maps it to active power prediction value and reactive power prediction value through the output layer. The mean squared error is used as the loss function, and the feature prediction model is iteratively trained using the training set until the loss function value on the validation set converges to a preset accuracy threshold, thus obtaining the feature prediction model.

5. The reactive power dynamic local balancing method based on AI model algorithm as described in claim 4, characterized in that, The method for acquiring the action signal includes: The background impedance is calculated by detecting the voltage and current differences in the power distribution circuit generated at the moment of switch action in real time. The background impedance is a complex physical quantity, including a real part and an imaginary part. The real part is defined as resistance and the imaginary part is defined as reactance. An impedance coordinate system is constructed with resistance as the real axis and reactance as the imaginary axis. Based on the analysis of three-phase waveform data, the characteristic harmonic frequencies are obtained. For each characteristic harmonic frequency in the impedance coordinate system, the center of the circle is determined by the reactance, and the resonant trap region is calibrated with the preset safety impedance margin as the radius. Starting from the origin of the impedance coordinate system, a polygonal region that is geometrically completely avoided from all resonant trap regions is constructed and defined as the dynamic impedance target region. Calculate the total system impedance after the proposed switching based on the time and space instructions and map it to the impedance coordinate system; If the total impedance of the system after the proposed switch falls within the dynamic impedance target area, an action execution signal is generated; if it falls outside the dynamic impedance target area, an action blocking signal is generated; the action execution signal and the action blocking signal are combined into an action signal.

6. The reactive power dynamic local balancing method based on AI model algorithm as described in claim 5, characterized in that, The method for constructing the dynamic impedance target region includes: In the impedance coordinate system, determine the center coordinates and radius of all resonant trap regions, and sort them in ascending order of the imaginary part of the center coordinates of each resonant trap region. Starting from the origin, draw two tangent lines to the first resonant trap region, and select the tangent point located outside the resonant trap region; Tangents are drawn sequentially to each of the subsequent resonant trap regions, and the outer tangent points are selected. The tangent points corresponding to adjacent harmonic frequencies are connected sequentially by straight line segments to form an outer envelope broken line, which is then enclosed with the positive half-axis of the impedance coordinate system to form a dynamic impedance target region.

7. The reactive power dynamic local balancing method based on AI model algorithm as described in claim 6, characterized in that, The physical control commands include: If the action signal is an action execution signal, the physical control command is to drive the reactive power compensation controller used to perform the switching operation, send the switching command to the reactive power compensation branch specified in the reactive power compensation element group used for reactive power compensation that can be independently switched, and update the monthly cumulative weighted power factor. If the action signal is an action blocking signal, the physical control command will not send any switching command to the reactive power compensation controller, and will force the current switching state of the reactive power compensation element group to remain unchanged, and will execute the resonance warning. The resonance early warning includes pushing alarm information to the remote operation and maintenance platform, which includes the characteristic harmonic frequency that causes resonance risk and the current moment when the action lockout occurs.

8. The reactive power dynamic local balancing method based on AI model algorithm as described in claim 7, characterized in that, The strategy parameter set includes: A retrospective analysis of the running dataset is performed at a pre-set evaluation cycle; During the evaluation period, the difference between the cumulative reactive power credit deviation before and after each physical control command execution and the ratio of the rated capacity marked on the nameplate of the corresponding reactive power compensation branch are recorded and calculated to obtain the compensation contribution. If the proportion of times the average compensation contribution of the reactive power compensation branch is continuously less than the preset contribution threshold is greater than the preset failure judgment ratio, the reactive power compensation branch is judged to be in failure and the switching priority is reduced. The total number of times the resonant warning is executed within the statistical evaluation period is calculated. If the number of warnings executed exceeds the preset warning frequency threshold, the boundary parameters of the spatiotemporal credit funnel region are adjusted. The mean square error of the feature prediction model during the evaluation period is calculated. If the mean square error is greater than the retraining threshold, the feature prediction model is iteratively optimized to obtain a new feature prediction model. Finally, a set of strategy parameters is obtained, which includes the updated reactive power compensation branch switching priority list, the spatiotemporal credit funnel region boundary parameters, and the new feature prediction model.