Reactive power regulation method, system, device and medium based on distributed power access

By employing an LSTM-BiGRU hybrid neural network and a method of dynamic switching of triple reactive power modes, combined with a safety constraint optimization algorithm, the voltage over-limit problem caused by distributed photovoltaic grid connection was solved. This method achieves voltage regulation with fast response and equipment safety, adapts to different operating conditions, and reduces voltage surges.

CN120879811BActive Publication Date: 2026-01-27SHANDONG LUNENG SOFTWARE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511383640.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2026-01-27
Estimated Expiration
2045-09-26

AI Technical Summary

Technical Problem

The voltage over-limit problem caused by distributed photovoltaic grid connection is difficult to respond to quickly by existing technologies. The single control mode is not adaptable enough, and the multi-machine collaborative optimization is prone to inverter overload. There is a lack of flexible shutdown mechanism, and the traditional sudden stop method causes secondary voltage impact.

Method used

The voltage baseline is predicted using an LSTM-BiGRU hybrid neural network model. Combined with dynamic switching of triple reactive power modes and cluster optimization algorithm with safety constraints, voltage regulation is achieved by coordinating reactive power output through inverters. A ramp-out mechanism is used to avoid sudden voltage changes.

Benefits of technology

It enables rapid response to photovoltaic fluctuations, avoids voltage overruns, ensures equipment safety, reduces voltage surges, adapts to different operating conditions, and improves the flexibility and stability of voltage regulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120879811B_ABST
    Figure CN120879811B_ABST
Patent Text Reader

Abstract

The application provides a reactive power regulation method, system, device and medium based on distributed power access, belonging to the field of new energy grid connection technology. The method comprises the following steps: inputting the obtained historical voltage sequence, photovoltaic active power output, load reactive power demand, environmental temperature and power grid power factor into a hybrid neural network model, and the hybrid neural network model outputs a voltage baseline for predicting a future preset time period; judging whether the reactive power regulation trigger condition is met according to the deviation of the three-phase voltage real-time data and the voltage baseline; when the trigger condition is met, calculating the reactive power output target value of each inverter according to the preset reactive power mode; coordinating the reactive power outputs of multiple inverters through an optimization algorithm, so that the cluster reactive power output approximates the global optimal value and meets the safety constraint; and sending the optimized reactive power output instruction to the corresponding inverter for execution. Active power loss is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of new energy grid connection technology, and in particular relates to a reactive power control method, system, equipment and medium based on distributed power source access. Background Technology

[0002] With the large-scale integration of distributed photovoltaic (PV) power into the distribution network, the volatility of its active power leads to frequent voltage exceedances at the grid connection point, seriously threatening power supply quality. Traditional voltage regulation relies on on-load tap changers or capacitor switching at substations, but the response speed is difficult to match the minute-level fluctuations in PV power. The industry urgently needs to utilize the reactive power regulation capabilities of inverters to achieve rapid voltage support and avoid grid disconnection accidents caused by protection actions triggered by voltage exceedances.

[0003] Existing technologies primarily employ fixed power factor mode or reactive power compensation strategies based on local voltage feedback. Some solutions adjust inverter reactive power output by pre-setting a power factor curve, while others calculate the compensation amount based on real-time voltage deviation and use a PI controller to output reactive power commands. At the cluster control level, existing methods have attempted to allocate reactive power output tasks among multiple inverters based on the principle of equal capacity.

[0004] However, existing technologies still have significant shortcomings: First, static control strategies are difficult to adapt to rapid voltage fluctuations caused by sudden changes in photovoltaic output, and do not combine historical voltage trends with environmental parameters to predict voltage change baselines; second, a single control mode cannot take into account the needs of different operating conditions, such as suppressing voltage rise during periods of high irradiance, while preventing voltage drops during cloud cover conditions; third, the safety boundary constraints of equipment are ignored when optimizing multi-machine collaboration, which can easily lead to overload of some inverters; and fourth, there is a lack of flexible shutdown mechanisms, and traditional sudden shutdown methods can easily cause secondary voltage surges. Summary of the Invention

[0005] This invention provides a reactive power regulation method, system, device, and medium based on distributed power source access, so as to at least solve the problem of voltage exceeding the limit caused by distributed photovoltaic grid connection in the prior art.

[0006] In a first aspect, embodiments of this application provide a reactive power regulation method based on distributed power source access, the method comprising the following steps:

[0007] Obtain historical voltage sequences, photovoltaic active power output, load reactive power demand, ambient temperature, and grid power factor of the distribution network;

[0008] The acquired historical voltage sequence, photovoltaic active power output, load reactive power demand, ambient temperature and grid power factor are input into the hybrid neural network model, and the hybrid neural network model outputs the voltage baseline for the future preset period.

[0009] Based on the deviation between the real-time three-phase voltage data and the voltage baseline, determine whether the reactive power regulation triggering conditions are met.

[0010] When the triggering condition is met, the reactive power output target value of each inverter is calculated according to the preset reactive power mode.

[0011] By optimizing the algorithm to coordinate the reactive power output of multiple inverters, the reactive power output of the cluster approaches the global optimum and meets the safety constraints.

[0012] The optimized reactive power output command is sent to the corresponding inverter for execution.

[0013] Furthermore, the hybrid neural network model is an LSTM-BiGRU hybrid neural network model, and its expression is:

[0014]

[0015] In the formula, This indicates that the LSTM-BiGRU hybrid neural network model predicts the power grid in... The reference voltage value at that moment. Represents historical voltage sequences, Indicates the active power output of photovoltaic power generation. Reactive power of load Ambient temperature, Power factor of the power grid.

[0016] Furthermore, the reactive power mode includes:

[0017] Constant power factor mode: Outputs commands according to a fixed power factor value;

[0018] Power factor-active control mode: The power factor is dynamically calculated based on the proportion of active power output of the inverter;

[0019] Reactive power-voltage control mode: Calculate reactive power output based on real-time voltage deviation;

[0020] When the voltage fluctuation rate exceeds 2%, it automatically switches to reactive power-voltage control mode as the dominant mode.

[0021] Furthermore, the objective function of the optimization algorithm is:

[0022]

[0023] In the formula, For the first The reactive power output of the inverter To achieve the globally optimal reactive power output value, This is the reactive power output ratio coefficient between inverters. These are the weighting coefficients.

[0024] Furthermore, the constraints include:

[0025] Single unit reactive power capacity limit: ;

[0026] Node voltage deviation <1.5%;

[0027] Power factor .

[0028] Furthermore, the triggering condition is that the average three-phase voltage on the user side is higher than the first preset voltage value for a first preset duration, and the exit condition is that the voltage is lower than the second preset voltage value for a second preset duration.

[0029] Furthermore, the exit process employs a ramp exit mechanism, and the k value supports remote configuration.

[0030] Secondly, embodiments of this application also provide a system for reactive power regulation methods based on distributed power source access as described in the above aspects, the system comprising:

[0031] Obtain historical voltage sequences, photovoltaic active power output, load reactive power demand, ambient temperature, and grid power factor of the distribution network;

[0032] The acquired historical voltage sequence, photovoltaic active power output, load reactive power demand, ambient temperature and grid power factor are input into the hybrid neural network model, and the hybrid neural network model outputs the voltage baseline for the future preset period.

[0033] Based on the deviation between the real-time three-phase voltage data and the voltage baseline, determine whether the reactive power regulation triggering conditions are met.

[0034] When the triggering condition is met, the reactive power output target value of each inverter is calculated according to the preset reactive power mode.

[0035] By optimizing the algorithm to coordinate the reactive power output of multiple inverters, the reactive power output of the cluster approaches the global optimum and meets the safety constraints.

[0036] The optimized reactive power output command is sent to the corresponding inverter for execution.

[0037] Thirdly, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the reactive power control method based on distributed power source access as described in the preceding aspects.

[0038] Fourthly, a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the reactive power control method based on distributed power source access as described in the preceding aspects.

[0039] As can be seen from the above technical solutions, the present invention has the following advantages:

[0040] The reactive power regulation method based on distributed power source access provided in this application dynamically compensates for voltage deviation by utilizing the reactive power output capability of the inverter, thereby avoiding active power loss and adapting to different inverter protocols.

[0041] By using an LSTM-BiGRU hybrid neural network to predict the dynamic voltage baseline, the problem of lag in the response of static strategies is solved, and the trend of voltage fluctuations can be predicted in advance. This method integrates multi-source data such as historical voltage sequences and photovoltaic active power output to generate a prediction baseline, providing a forward-looking criterion for regulation.

[0042] The triple reactive power mode dynamic switching mechanism overcomes the shortcomings of insufficient adaptability of a single control mode. When the voltage fluctuation rate is greater than 2%, it automatically switches to reactive power-voltage control mode and intelligently selects the optimal strategy between constant power factor mode and power factor-active power control mode.

[0043] By employing a cluster optimization algorithm with safety constraints, the overload risk in multi-machine collaboration is eliminated. The algorithm coordinates output based on an objective function while simultaneously satisfying constraints, ensuring safe equipment operation.

[0044] The ramp-out mechanism solves the problem of secondary voltage surges caused by traditional sudden stops. It sets up a remotely configurable k-value to reduce reactive power output in stages, and achieves a flexible exit when the voltage recovers to below 234.7V. Attached Figure Description

[0045] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 This is a flowchart of a reactive power control method based on distributed power source access in one embodiment of the present invention.

[0047] Figure 2 This is a schematic diagram of the dynamic power factor control principle of the power factor-active power control mode in one embodiment of the present invention.

[0048] Figure 3 This is a schematic diagram of the dynamic power factor control principle of the reactive power-voltage control mode in one embodiment of the present invention. Detailed Implementation

[0049] To make the purpose, features, and advantages of this application more apparent and understandable, specific embodiments and accompanying drawings will be used to clearly and completely describe the technical solution protected by this application. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this patent, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this patent.

[0050] This application provides a reactive power regulation method, system, device, and medium based on distributed power source access, which solves the urgent technical problem of voltage exceeding limits caused by distributed photovoltaic grid connection.

[0051] The technical solutions proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0052] Figure 1 A flowchart illustrating a reactive power control method based on distributed power source access, provided as an embodiment of this application. Figure 1 As shown in the figure, the reactive power regulation method based on distributed power source access provided in this application embodiment specifically includes the following steps:

[0053] Obtain historical voltage sequences, photovoltaic active power output, load reactive power demand, ambient temperature, and grid power factor of the distribution network;

[0054] The acquired historical voltage sequence, photovoltaic active power output, load reactive power demand, ambient temperature and grid power factor are input into the hybrid neural network model, and the hybrid neural network model outputs the voltage baseline for the future preset period.

[0055] Based on the deviation between the real-time three-phase voltage data and the voltage baseline, determine whether the reactive power regulation triggering conditions are met.

[0056] When the triggering condition is met, the reactive power output target value of each inverter is calculated according to the preset reactive power mode.

[0057] By optimizing the algorithm to coordinate the reactive power output of multiple inverters, the reactive power output of the cluster approaches the global optimum and meets the safety constraints.

[0058] The optimized reactive power output command is sent to the corresponding inverter for execution. The control command is converted into communication protocols supported by different inverter brands, including those from Huawei and Sungrow, through a protocol adaptation layer.

[0059] In an exemplary embodiment, the hybrid neural network model is an LSTM-BiGRU hybrid neural network model, and its expression is:

[0060]

[0061] In the formula, This indicates that the LSTM-BiGRU hybrid neural network model predicts the power grid in... The reference voltage value at a given time is used to assess whether voltage regulation control needs to be triggered. Represents historical voltage sequences, Indicates the active power output of photovoltaic power generation. Reactive power of load Ambient temperature, Power factor of the power grid.

[0062] Historical voltage sequences are generated by collecting real-time three-phase voltage data (synchronously sampled at 128 points / cycle) on the user side using DPAU equipment. High-frequency sampling can capture instantaneous voltage fluctuations, such as millisecond-level voltage drops caused by photovoltaic cloud obstruction, improving control accuracy. Local deployment of the LSTM-BiGRU hybrid neural network model avoids cloud communication latency, meeting the 500ms real-time response requirement.

[0063] Historical voltage sequence It reflects the voltage change trend of distribution network nodes and is used to capture periodic voltage fluctuations, such as voltage rises caused by peak daytime photovoltaic active power output.

[0064] Obtain photovoltaic active power output through inverter communication interface (Modbus / 698 protocol) Photovoltaics contribute both power and energy. The real-time power generation capacity of distributed photovoltaics directly affects the voltage level at the grid connection point; the greater the active power output of photovoltaics, the more significant the voltage rise effect.

[0065] Reactive power of the load is obtained by measuring the reactive power value of the smart meter or DPAU device. Reactive load It reflects the dynamic changes in reactive load on the user side and is used to predict the reactive power compensation demand for voltage, such as voltage drops caused by a sudden increase in inductive load.

[0066] Ambient temperature is obtained by temperature sensors deployed on the photovoltaic array. Ambient temperature It affects the output efficiency of photovoltaic modules (increased temperature leads to decreased efficiency) and the impedance characteristics of the line (temperature changes cause fluctuations in resistance).

[0067] Synchronously obtain power factor of the power grid with the interface of the distribution network dispatching system Power factor of the power grid It reflects the reactive power balance status on the power grid side and is used to dynamically adjust local reactive power compensation strategies to match power grid dispatching needs.

[0068] According to another embodiment of the present invention, the reactive power mode includes:

[0069] Constant power factor mode: Outputs commands according to a fixed power factor value;

[0070] Power factor-active control mode: The power factor is dynamically calculated based on the proportion of active power output of the inverter;

[0071] Reactive power-voltage control mode: Calculate reactive power output based on real-time voltage deviation;

[0072] When the voltage fluctuation rate exceeds 2%, it automatically switches to reactive power-voltage control mode as the dominant mode.

[0073] According to an embodiment of this application, the objective function of the optimization algorithm is:

[0074]

[0075] In the formula, For the first The reactive power output of the inverter, the real-time reactive power output of a single inverter, must meet its rated capacity limit. For example, the rated capacity limit is ±48% of the rated capacity. The globally optimal reactive power output value is the ideal reactive power compensation value calculated by the prediction model, which is used to minimize the overall voltage deviation. The reactive power output ratio coefficient between inverters is a coordination ratio set according to the capacity difference of inverters (such as larger capacity inverters undertaking more reactive power compensation) to ensure balanced output of the cluster. is the weighting coefficient; used to balance the weights of "single-machine output optimization" and "cluster synergy", and is dynamically adjusted through reinforcement learning. For example, the weighting coefficient is 0.5.

[0076] In one embodiment, the constraints include:

[0077] Single unit reactive power capacity limit: Prevent inverter overload and ensure safe equipment operation;

[0078] The node voltage deviation is <1.5%; it meets the mandatory requirements for voltage quality in the national standard GB / T 12325-2008, and avoids exceeding the limit and causing the protection device to operate;

[0079] Power factor This meets the power grid company's assessment standards for grid-connected power factor, thus avoiding fines for failing to meet the power factor requirements.

[0080] As an example, the trigger condition is that the average three-phase voltage on the user side is higher than a first preset voltage value for a first preset duration, and the exit condition is that the voltage is lower than a second preset voltage value for a second preset duration. The first preset voltage value is 235.1V, the second preset voltage value is 234.7V, and both the first and second preset durations are 120 seconds.

[0081] It should be noted that the exit process adopts a ramp exit mechanism, reducing the original reactive power output by k% at each sampling point. The value of k can be configured remotely. The ramp exit coefficient k% is set to 0.1, and the value of k is dynamically adjusted by the gradient descent method to balance "rapid exit" and "secondary over-limit risk" during the voltage recovery process.

[0082] All operating parameters are remotely configured and monitored through data objects defined by the 698 protocol, including:

[0083] Reactive power mode switch status (on / off);

[0084] Threshold parameters for three reactive power modes;

[0085] Voltage trigger / exit threshold and duration.

[0086] When using this method:

[0087] 1. Test whether the reactive power mode can be remotely turned on / off;

[0088] 2. Test whether the reactive power mode strategy can be switched remotely;

[0089] 3. Test whether the reactive power strategy program can be upgraded remotely;

[0090] 4. During the daily inverter self-test, the reactive power mode and strategy remain unchanged, and all adjustable parameters of the current strategy remain unchanged.

[0091] 5. Test whether reactive power control is triggered and deactivated according to the following rules.

[0092] When the user-side voltage (three-phase average value) is higher than 235.1V for 120 seconds (2 points), the judgment and reactive power regulation will begin according to the set reactive power regulation strategy.

[0093] When the user-side voltage (three-phase average value) is below 234.7V for 120 seconds (2 points), the reactive power control will be terminated according to the set slope exit coefficient k% (each sampling point reduces by k% * original reactive power output);

[0094] When exiting via ramp, if the user-side voltage is found to be higher than 234.7V (1 point), the exit will be paused and the current reactive power output will be maintained.

[0095] The trigger and exit voltages and times (italicized data), as well as the ramp exit coefficient, should all be remotely adjustable.

[0096] 6. Test whether the adjustable parameters of each strategy can be modified remotely, and if not modified, always maintain the value of the parameter;

[0097] 7. During the reactive power control process of each strategy, when the master station closes the reactive power mode, the power factor is set to 1 and the reactive power value / percentage is set to 0 before the reactive power mode is closed.

[0098] 8. Test the specific details of each strategy, specifically test whether it can correctly collect inverter data, correctly output corresponding instructions according to the input, and record the adjustment response time.

[0099] ① Strategy 1: Constant Power Factor Mode

[0100] Collection items: None;

[0101] Control item: Power factor value;

[0102] Parameter: Power factor;

[0103] Strategy 2: Power Factor-Active Power Control Mode

[0104] Data collected: Current active power output, rated output power;

[0105] Control item: Power factor value;

[0106] Parameters: Start-up threshold, exit threshold, exit power factor;

[0107] Every minute, the current "current active output power / rated output power" is collected and calculated, the corresponding power factor value is converted, and sent to the inverter.

[0108] If the inverter does not support the acquisition of rated output power, the test should support the manual input of the rated output power value.

[0109] ③ Strategy 3: Reactive Power-Voltage Control Mode

[0110] Data collected: Current three-phase voltage average value, inverter maximum reactive power output;

[0111] Control item: Reactive power;

[0112] Parameters: High voltage start voltage, high voltage exit voltage, low voltage start voltage, low voltage exit voltage, high voltage exit reactive power value, low voltage exit reactive power value, low voltage stop threshold voltage;

[0113] Every minute, the current three-phase voltage average value is collected and calculated, and the corresponding reactive power value that needs to be adjusted is calculated. If the inverter protocol only supports the identification of reactive power percentage, the algorithm should support the calculation of reactive power value into the corresponding reactive power percentage.

[0114] When the reactive power value needs to be set to be greater than or equal to the inverter's maximum reactive power output, output should be supported according to the maximum reactive power output value.

[0115] If the inverter does not shut down at night and the voltage is 0, in order to avoid issuing a reverse reactive power command, a low-voltage stop threshold voltage is set. When the voltage is lower than this value, a reactive power command of 0 is issued.

[0116] Assuming the inverter does not support the acquisition of rated reactive power, the test should support manual input of the rated reactive power value. Considering that some inverters do not support reading the rated reactive power output, the reactive power output value should be set to 0.48PN (rated active power). If the inverter is found to be unresponsive or reporting an error exceeding the rated reactive power, it should be gradually reduced to limit the output.

[0117] It should be noted that the DPAU device data definition is shown in Table 1:

[0118] Table 1 DPAU Device Data Definitions

[0119]

[0120] The specific definition of the photovoltaic reactive power control method is as follows:

[0121] Attribute 2 (Power Mode Switch) ::= enum{Off (0), On (1)}

[0122] The default is "Off (0)".

[0123] Attribute 3 (Local reactive mode) ::=enum

[0124] {

[0125] Constant power factor mode (0).

[0126] Power factor-active control mode (1).

[0127] Reactive power-voltage control mode (2)

[0128] }

[0129] The default is "Reactive Power-Voltage Control Mode (2)".

[0130] Attribute 4 (Reactive power regulation trigger exit parameter) ::= structure

[0131] {

[0132] Start-up reactive power regulation voltage value (long-unsigned, unit: V, conversion: -1).

[0133] The voltage meets the start-up conditions for a duration of long-unsigned (unit: s, equivalent to 0).

[0134] Exit reactive power regulation voltage value long-unsigned (unit: V, conversion: -1).

[0135] The duration for which the voltage meets the exit condition is long-unsigned (unit: s, equivalent to 0).

[0136] Termination and exit adjustment judgment time: long-unsigned (unit: s, conversion: 0).

[0137] Slope exit coefficient (long) (unit: %, conversion: -1)

[0138] }

[0139] Attribute 5: Constant Power Factor (Constant Power Factor Mode) := long, Unit: None, Conversion: -3

[0140] Attribute 6 (Power Factor - Active Power Control Mode Parameter) ::= structure

[0141] {

[0142] Power factor start-up threshold (unit: none, conversion: -3).

[0143] Power factor exit threshold long (unit: none, conversion: -3).

[0144] Exit power factor (long) (unit: none, conversion: -3)

[0145] }

[0146] Attribute 7 (Reactive Power Automatic Control Voltage Threshold Parameter) ::= structure

[0147] {

[0148] High voltage starting voltage (long-unsigned, unit: V, conversion: -1).

[0149] High voltage exit voltage (long-unsigned, unit: V, conversion: -1).

[0150] Low-voltage start-up voltage (long-unsigned, unit: V, conversion: -1).

[0151] Low-voltage exit voltage (long-unsigned, unit: V, conversion: -1).

[0152] Low-voltage stop threshold voltage (long-unsigned, unit: V, conversion: -1).

[0153] High-voltage reactive power output value (double-long, unit: kvar, conversion: -4).

[0154] Low-voltage reactive power output value (double-long, unit: kvar, conversion: -4)

[0155] }

[0156] Taking a 35kW photovoltaic project in a certain district as an example:

[0157] Before regulation: The grid-connected voltage consistently exceeded 245V (peak value 252V).

[0158] Implementing this invention:

[0159] Deploy DPAU devices;

[0160] Enable voltage-reactive main mode + active-power factor auxiliary mode;

[0161] The dynamic baseline voltage is set at 235.1V ± 0.5%.

[0162] Regulation effect: The voltage is stabilized in the range of 234.5-235.6V, with a maximum drop of 7V, and the impact of active power fluctuation is <0.5V.

[0163] The core code framework of this invention is as follows, covering dynamic baseline prediction, multi-mode control, and optimization algorithms:

[0164] import numpy as np

[0165] import tensorflow as tf

[0166] from tensorflow.keras.layers import LSTM, Bidirectional, GRU, Dense

[0167] from scipy.optimize import minimize

[0168] # 1. LSTM-BiGRU Hybrid Neural Network Voltage Prediction Model

[0169] class VoltagePredictor(tf.keras.Model):

[0170] def __init__(self, input_dim=12):

[0171] super().__init__()

[0172] self.lstm = Bidirectional(LSTM(64, return_sequences=True))

[0173] self.gru = GRU(32)

[0174] self.dense = Dense(1)

[0175] def call(self, inputs):

[0176] x = self.lstm(inputs)

[0177] x = self.gru(x)

[0178] return self.dense(x)

[0179] # 2. Reactive Power Optimization Algorithm for Clusters

[0180] def reactive_optimization(Q_opt, capacities, R_matrix, lambda_val = 0.1):

[0181] n = len(capacities)

[0182] def objective(Q):

[0183] term1 = np.sum((Q - Q_opt)**2)

[0184] term2 = 0

[0185] for i in range(n):

[0186] for j in range(n):

[0187] if i != j:

[0188] term2 += (Q[i] / Q[j] - R_matrix[i, j])**2

[0189] return term1 + lambda_val * term2

[0190] # Constraints

[0191] constraints = [

[0192] {'type': 'ineq', 'fun': lambda Q: 0.95 - np.abs(np.cos(np.arctan(Q / Q_opt)))}, # Power factor constraint

[0193] {'type': 'ineq', 'fun': lambda Q: capacities - np.abs(Q)}# Capacity Limits ]

[0195] res=minimize(objective,x0=np.zeros(n), constraints=constraints)

[0196] return res.x

[0197] # 3. DPAU Control Core Class

[0198] class DPAUController:

[0199] def __init__(self):

[0200] self.reactive_mode = 0 # 0 - Off, 1 - On

[0201] self.current_mode = "voltage_reactive" # Current control mode

[0202] self.params = {

[0203] 'start_voltage': 235.1,

[0204] 'start_duration': 120,

[0205] 'exit_voltage': 234.7,

[0206] 'exit_duration': 120,

[0207] 'ramp_rate': 0.1

[0208] }

[0209] self.voltage_buffer = []

[0210] def update_voltage(self, voltage):

[0211] """Update voltage sampling data"""

[0212] self.voltage_buffer.append(voltage)

[0213] If len(self.voltage_buffer) > 120: # Retain data for 2 minutes.

[0214] self.voltage_buffer.pop(0)

[0215] def check_trigger_condition(self):

[0216] """Check trigger conditions"""

[0217] If len(self.voltage_buffer) <self.params['start_duration']:

[0218] return False

[0219] avg_voltage= np.mean(self.voltage_buffer[-self.params['start_duration']:])

[0220] return avg_voltage>self.params['start_voltage']

[0221] def control_loop(self, current_voltage):

[0222] """Main Control Loop"""

[0223] self.update_voltage(current_voltage)

[0224] if self.check_trigger_condition():

[0225] if self.current_mode == "voltage_reactive":

[0226] q_output = self.voltage_reactive_mode()

[0227] elif self.current_mode == "power_factor":

[0228] q_output = self.constant_power_factor()

[0229] # Send control commands to the inverter

[0230] self.send_control_command(q_output)

[0231] def voltage_reactive_mode(self):

[0232] "Voltage-Reactive Power Control Mode"

[0233] # Implement the logic for voltage-reactive power curve calculation

[0234] return calculated_q

[0235] def constant_power_factor(self, pf=0.95):

[0236] "Constant Power Factor Mode"

[0237] return pf

[0238] # 4. Protocol Interface Adaptation Layer

[0239] class InverterProtocolAdapter:

[0240] def __init__(self, inverter_type):

[0241] self.protocol_map = {

[0242] 'Huawei': self._huawei_interface,

[0243] 'Sungrow': self._sungrow_interface

[0244] }

[0245] self.interface = self.protocol_map.get(inverter_type)

[0246] def send_command(self, command):

[0247] "Unified command sending interface"

[0248] return self.interface(command)

[0249] def _huawei_interface(self, cmd):

[0250] # Huawei Inverter Protocol Implementation

[0251] pass

[0252] def _sungrow_interface(self, cmd):

[0253] # Sungrow Power Protocol Implementation

[0254] pass

[0255] # Example usage

[0256] if __name__ == "__main__":

[0257] # Initialize the controller

[0258] controller = DPAUController()

[0259] # Analog voltage input

[0260] for voltage in np.random.normal(235, 5, 1000):

[0261] controller.control_loop(voltage)

[0262] # Optimized calculation example

[0263] Q_opt = np.array([10, 15, 20])

[0264] capacities = np.array([15, 20, 25])

[0265] R_matrix = np.eye(3)

[0266] optimal_Q = reactive_optimization(Q_opt, capacities, R_matrix)

[0267] The present invention also provides a system for reactive power regulation based on distributed power source access as described in the above embodiments, the system comprising:

[0268] Obtain historical voltage sequences, photovoltaic active power output, load reactive power demand, ambient temperature, and grid power factor of the distribution network;

[0269] The acquired historical voltage sequence, photovoltaic active power output, load reactive power demand, ambient temperature and grid power factor are input into the hybrid neural network model, and the hybrid neural network model outputs the voltage baseline for the future preset period.

[0270] Based on the deviation between the real-time three-phase voltage data and the voltage baseline, determine whether the reactive power regulation triggering conditions are met.

[0271] When the triggering condition is met, the reactive power output target value of each inverter is calculated according to the preset reactive power mode.

[0272] By optimizing the algorithm to coordinate the reactive power output of multiple inverters, the reactive power output of the cluster approaches the global optimum and meets the safety constraints.

[0273] The optimized reactive power output command is sent to the corresponding inverter for execution.

[0274] The reactive power regulation method based on distributed power supply access provided in this application can be applied to electronic devices. Those skilled in the art will understand that the electronic device structure involved in the embodiments of this invention does not constitute a limitation on the electronic device. An electronic device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of this invention, the electronic device includes, but is not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of this application described and / or claimed herein.

[0275] Electronic devices may include processors, external memory interfaces, internal memory, universal serial bus (USB) interfaces, charging management modules, power management modules, batteries, wireless communication modules, audio modules, speakers, microphones, sensor modules, buttons, cameras, displays, and SIM card interfaces, etc.

[0276] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0277] A processor may include one or more processing units, such as: a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0278] The processor can serve as the nerve center and command center of an electronic device. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.

[0279] The processor may also include memory for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. This memory can store instructions or data that the processor has just used or that are used repeatedly. If the processor needs to use the instruction or data again, it can retrieve it directly from this memory. This avoids repeated accesses, reduces processor latency, and thus improves system efficiency.

[0280] An external storage interface (ESI) can be used to connect external memory cards, such as microSD cards, to expand the storage capacity of electronic devices. The external memory card communicates with the processor through the ESI to perform data storage functions, such as saving music and video files on the external memory card.

[0281] Internal memory can be used to store computer executable program code, which includes instructions. The processor executes various functional applications and data processing of electronic devices by running the instructions stored in internal memory. Internal memory can include a program storage area and a data storage area. Internal memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0282] Wireless communication functionality in electronic devices can be achieved through antennas, wireless communication modules, modem processors, and baseband processors.

[0283] Wireless communication modules can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.

[0284] Electronic devices can implement audio functions through audio modules, speakers, receivers, microphones, headphone jacks, and application processors.

[0285] Electronic devices can achieve shooting functions through ISPs, cameras, video codecs, GPUs, displays, and application processors.

[0286] Electronic devices can achieve display functions through GPUs, displays, and application processors.

[0287] A GPU is a microprocessor for image processing, connected to the display screen and application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. A processor may include one or more GPUs, which execute program instructions to generate or modify display information.

[0288] A display screen is used to display images, videos, etc. A display screen includes a display panel.

[0289] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0290] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0291] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, apparatuses, or units, or they may be electrical, mechanical, or other forms of connection.

[0292] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a full understanding of embodiments of the invention. However, those skilled in the art will recognize that the technical solutions of the invention can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of the invention.

[0293] The aforementioned electronic equipment implements the reactive power control method based on distributed power source access in this application. It inputs the acquired historical voltage sequence, photovoltaic active power output, load reactive power demand, ambient temperature, and grid power factor into a hybrid neural network model. The hybrid neural network model outputs a predicted voltage baseline for a future preset period. Based on the deviation between the real-time three-phase voltage data and the voltage baseline, it determines whether the reactive power control triggering condition is met. When the triggering condition is met, it calculates the target reactive power output value of each inverter according to the preset reactive power mode. Through an optimization algorithm, it coordinates the reactive power output of multiple inverters, making the cluster reactive power output approach the global optimum and satisfying safety constraints. The optimized reactive power output command is sent to the corresponding inverter for execution, thus avoiding active power loss.

[0294] The storage medium provided in this application stores a program product capable of implementing a reactive power control method based on distributed power source access.

[0295] The reactive power regulation method based on distributed power source access includes: inputting historical voltage sequences, photovoltaic active power output, load reactive power demand, ambient temperature, and grid power factor into a hybrid neural network model; the hybrid neural network model outputs a predicted voltage baseline for a future preset period; determining whether reactive power regulation triggering conditions are met based on the deviation between real-time three-phase voltage data and the voltage baseline; when the triggering conditions are met, calculating the target reactive power output value of each inverter according to a preset reactive power mode; coordinating the reactive power output of multiple inverters through optimization algorithms to make the cluster reactive power output approach the global optimum and meet safety constraints; and sending the optimized reactive power output command to the corresponding inverter for execution. This avoids active power loss.

[0296] In some possible implementations, the reactive power regulation method based on distributed power source access of this disclosure can be implemented as a program product, which includes program code. When the program product is run on a terminal device, the program code is used to cause the terminal device to perform the steps described in the "Exemplary Methods" section above according to various exemplary embodiments of this disclosure.

[0297] The storage medium disclosed herein may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0298] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0299] Any changes, modifications, substitutions, and variations made to the embodiments without departing from the principles and spirit of the present invention still fall within the protection scope of the present invention.

Claims

1. A reactive power control method based on distributed power source access, characterized in that, The method includes the following steps: Obtain historical voltage sequences, photovoltaic active power output, load reactive power demand, ambient temperature, and grid power factor of the distribution network; The acquired historical voltage sequence, photovoltaic active power output, load reactive power demand, ambient temperature and grid power factor are input into the hybrid neural network model, and the hybrid neural network model outputs the voltage baseline for the future preset period. Based on the deviation between the real-time three-phase voltage data and the voltage baseline, determine whether the reactive power regulation triggering conditions are met. When the triggering condition is met, the reactive power output target value of each inverter is calculated according to the preset reactive power mode. By optimizing the algorithm to coordinate the reactive power output of multiple inverters, the reactive power output of the cluster approaches the global optimum and meets the safety constraints. The optimized reactive power output command is sent to the corresponding inverter for execution. The reactive power mode includes: Constant power factor mode: Outputs commands according to a fixed power factor value; Power factor-active control mode: The power factor is dynamically calculated based on the proportion of active power output of the inverter; Reactive power-voltage control mode: Calculate reactive power output based on real-time voltage deviation; When the voltage fluctuation rate exceeds 2%, it automatically switches to reactive power-voltage control mode as the dominant mode; The objective function of the optimization algorithm is: In the formula, For the first The reactive power output of the inverter To achieve the globally optimal reactive power output value, This is the reactive power output ratio coefficient between inverters. These are the weighting coefficients; The trigger condition is that the average three-phase voltage on the user side is higher than the first preset voltage value for a first preset duration, and the exit condition is that the voltage is lower than the second preset voltage value for a second preset duration. The exit process adopts a ramp exit mechanism, exiting reactive power control according to the set ramp exit coefficient k%, and the k value can be remotely configured.

2. The method according to claim 1, characterized in that: The hybrid neural network model is an LSTM-BiGRU hybrid neural network model, and its expression is: In the formula, This indicates that the LSTM-BiGRU hybrid neural network model predicts the power grid in... The reference voltage value at that moment. Represents historical voltage sequences, Indicates the active power output of photovoltaic power generation. Reactive power of load Ambient temperature, Power factor of the power grid.

3. The method according to claim 1, characterized in that: The constraints include: Single unit reactive power capacity limit: ; Node voltage deviation <1.5%; Power factor .

4. A system applied to the reactive power control method based on distributed power source access as described in any one of claims 1-3, characterized in that, The system includes: Obtain historical voltage sequences, photovoltaic active power output, load reactive power demand, ambient temperature, and grid power factor of the distribution network; The acquired historical voltage sequence, photovoltaic active power output, load reactive power demand, ambient temperature and grid power factor are input into the hybrid neural network model, and the hybrid neural network model outputs the voltage baseline for the future preset period. Based on the deviation between the real-time three-phase voltage data and the voltage baseline, determine whether the reactive power regulation triggering conditions are met. When the triggering condition is met, the reactive power output target value of each inverter is calculated according to the preset reactive power mode. By optimizing the algorithm to coordinate the reactive power output of multiple inverters, the reactive power output of the cluster approaches the global optimum and meets the safety constraints. The optimized reactive power output command is sent to the corresponding inverter for execution.

5. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the reactive power control method based on distributed power source access as described in any one of claims 1-3.

6. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the reactive power control method based on distributed power source access as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Distribution network multi-time scale reactive power control method for inhibition of photovoltaic grid connection point voltage fluctuation

    CN108321810A

  • New energy grid-connected reactive voltage regulation method based on MPC

    CN113852091A