A method and system for controlling the power factor of an incoming line of a photovoltaic grid-connected system

By combining high-precision electrical parameter acquisition and LSTM neural network prediction with inverter dynamic adjustment, the problems of insufficient prediction and inflexible compensation in power factor control of photovoltaic grid-connected systems are solved. This achieves accurate prediction and adaptive compensation for the interaction of multiple factors, improving the stability and economy of the system.

CN120934064BActive Publication Date: 2026-01-27SHANDONG KECHUANG POWER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511461951.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2026-01-27
Estimated Expiration
2045-10-14

AI Technical Summary

Technical Problem

In existing grid-connected photovoltaic systems, the prediction stage relies on insufficient historical data analysis in power factor control, making it difficult to fully reflect the changing trends of multiple factors interacting in actual operation. The compensation stage lacks dynamic adjustment mechanisms and error correction capabilities, resulting in response lag or overcompensation.

Method used

By employing high-precision electrical parameter acquisition, fast Fourier transform, and digital notch filter to remove harmonic interference, combined with LSTM neural network to predict future power factor changes, the inverter dynamically adjusts reactive power to achieve multi-scenario adaptive parameter optimization, ensuring that the reactive power compensation output of the inverter meets actual needs.

Benefits of technology

It improves the accuracy of judging the trend of power factor change and the flexibility and stability of the compensation link. The system can actively adapt to the changes in the operating environment under different working conditions, reduce response lag and resource waste, and improve the stability and reliability of system operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120934064B_ABST
    Figure CN120934064B_ABST
Patent Text Reader

Abstract

The application discloses a kind of photovoltaic grid-connected system incoming line power factor control method and system.In the present application, firstly, the judgment accuracy of power factor change trend is improved in prediction link.Light intensity, load power and other key variables are included in the model, and the dynamic correlation of power factor, light change and load power consumption is analyzed synchronously.The correlation is captured and learned by the model.Therefore, when predicting future power factor, the interaction of multiple factors in actual operation can be considered more comprehensively, the prediction result is closer to the real trend, the system can predict the change direction of power factor in advance, and the mode of passive response problem of traditional method is changed, the flexibility and stability of regulation are strengthened in compensation link.The calculation of adaptive reactive power compensation quantity is not only based on future prediction value, but also dynamically adjusts the compensation strength according to the accuracy of historical prediction, which also prevents resource waste caused by excessive compensation, and effectively improves the stability and reliability of system operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of photovoltaic grid-connected system control technology, specifically a method and system for controlling the incoming power factor of a photovoltaic grid-connected system. Background Technology

[0002] The incoming power factor of a photovoltaic (PV) grid-connected system refers to the ratio of active power to apparent power at the connection point between the PV system and the grid. It is a crucial electrical parameter for measuring the system's energy utilization efficiency. During PV grid-connected operation, the power factor directly affects the grid's voltage stability, line losses, and the overall economy and reliability of the system. Modern PV grid-connected systems are typically equipped with power factor regulation (PFG) functions. Through dynamic inverter control, the system can provide or absorb reactive power according to grid requirements, maintaining the incoming power factor within a reasonable range, thereby improving system operating efficiency and meeting grid connection standards. PV grid-connected system incoming power factor control refers to the technical means of adjusting the reactive power output of the inverter to maintain the power factor at the grid connection point within a set range, thus meeting grid operation requirements and improving energy utilization efficiency. This control method is usually integrated into the PV inverter, dynamically adjusting the phase of the output current by real-time monitoring of system operating parameters such as active power, reactive power, and voltage, thereby changing the power factor.

[0003] However, existing technologies have two main shortcomings in power factor control: First, the prediction stage relies solely on historical power factor data for analysis, making it difficult to fully reflect the changing trends under the interaction of multiple factors in actual operation; second, the compensation stage calculates the compensation amount based only on the current power factor deviation, lacking a dynamic adjustment mechanism and error correction capability for the accuracy of historical predictions. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for controlling the incoming power factor of a photovoltaic grid-connected system in order to solve the problems mentioned above.

[0005] The technical solution adopted in this invention is as follows: A method for controlling the incoming power factor of a photovoltaic grid-connected system, the method comprising the following steps:

[0006] S1: Synchronous acquisition of grid-connected side electrical parameters; The power factor detection module synchronously acquires the instantaneous voltage value u(t) and instantaneous current value i(t) at the input end of the photovoltaic grid-connected system through high-precision voltage transformers and current transformers. The sampling frequency is set to 10kHz to ensure signal integrity. The acquired data is transmitted in real time to the power factor calculation and adjustment module as the raw input.

[0007] S2: Fundamental component extraction and noise suppression; The power factor calculation and adjustment module performs a fast Fourier transform on the instantaneous voltage value u(t) and the instantaneous current value i(t) to separate the 50Hz fundamental voltage u1(t) and fundamental current i1(t). At the same time, it filters out the 2nd to 13th harmonic interference through a digital notch filter. The processed data is then transmitted to the next step as an effective input for power factor calculation.

[0008] S3: Calculation of multi-window sliding power factor; Calculation of instantaneous active power based on u1(t) and i1(t): p(t)=u1(t)·i1(t);

[0009] The instantaneous apparent power is: s(t) = |u1(t)|·|i1(t)|;

[0010] The average power factor is calculated using a 50ms sliding window: PF=Σp(t) / Σs(t). The calculation results are synchronously stored in the historical database and transmitted to the deviation analysis stage.

[0011] S4: LSTM-based dynamic compensation prediction; The power factor calculation and adjustment module calls samples of [actual PF value, illuminance, and active power of load] from the historical database for the past 10 periods, predicts the power factor change trend for the next 2 periods through a pre-trained LSTM neural network, and calculates the reactive power to be compensated based on the target power factor PF_target: ΔQ=S·(sinθ_target-sinθ_actual);

[0012] Where S is the apparent power and θ is the power factor angle;

[0013] S5: Inverter output constraint verification; Input ΔQ into the capacity model of the inverter control module and verify whether the following condition is met: |ΔQ|≤Q inv_max ;

[0014] Q_inv_max represents the inverter's maximum reactive power output capability. If this capability is exceeded, the target PF_target is adjusted to the optimal achievable value and fed back to S4 for recalculation. If the target is met, a reactive current reference value is generated. U rms This is the effective value of the line voltage;

[0015] S6: Real-time adjustment of inverter reactive power output; the inverter control module adopts a direct current control strategy, adjusting the reactive current reference value i. q_ref Compared with the actual output reactive current i q_real In comparison, the PWM drive signal generated by the PI controller is used to adjust the phase angle δ of the inverter output voltage, thereby changing the output reactive power and realizing the dynamic adjustment of the input power factor.

[0016] S7: Closed-loop verification of adjustment effect; 100ms after the adjustment action is executed, the power factor detection module repeats the S1-S3 process to obtain a new actual power factor value PF. actual_new ;

[0017] If |PF actual_new -PF target If |≤0.01, the system enters a stable state; if it exceeds the tolerance, the error amount e=PF. target -PF_ actual_new Feedback is sent to the LSTM model in S4 to correct the prediction parameters and improve the accuracy of the next adjustment.

[0018] S8: Performs multi-scenario adaptive parameter optimization; after every 50 adjustment cycles, the power factor calculation and adjustment module analyzes the correlation between [illuminance - load type - PF adjustment time - inverter loss] in historical data, automatically adjusts the LSTM learning rate: increases the learning rate to accelerate response under strong light and high load, and decreases the learning rate to reduce loss under weak light and low load, and updates the PF. target The dynamic threshold, such as the target PF being adjusted to 0.92 when the nighttime load is <50%, is used to reduce inverter switching losses.

[0019] In a preferred embodiment, in step S1, after the device is started, preset basic control parameters are first loaded, including the target power factor, data sampling period, maximum output limit of the reactive power compensation device, and initial weight parameters of the LSTM prediction model; at the same time, the system will self-check the storage unit to confirm that the operating data of the past 72 hours in the historical database is complete and usable; if data loss is detected, the system will automatically use the data of the previous 3 days in the backup storage as a temporary supplement to ensure that the subsequent steps have a reliable data foundation.

[0020] In a preferred embodiment, in step S2, the system synchronously collects three types of data through a distributed sensor network: electrical parameter data, power and energy consumption data, and voltage data; the power factor meter measures the real-time power factor of the grid connection point at a frequency of 20ms / time; the photovoltaic array's light sensor records the light intensity once every 20ms; and the smart meter on the load side synchronously collects the active power value.

[0021] In a preferred embodiment, in step S3, after receiving the data, the central processing unit first performs quality screening: setting a reasonable range of 0.85 to 1.0 for the power factor, setting a natural extreme value of 0 to 1200 W / m² for the illuminance, and setting a fluctuation threshold of 0 to 1.5 times the rated load for the load power; for marked abnormal data, the system calls the sliding window mean algorithm for interpolation replacement; if the same sensor shows abnormality 5 times consecutively, an alarm is triggered and the system switches to backup sensor data to ensure that the data entering subsequent analysis is true and reliable.

[0022] In a preferred embodiment, in step S4, the power factor calculation and adjustment module retrieves the operating data of the most recent 10 cycles from the historical database, which includes three core pieces of information: the actual measured real-time power factor value, the real-time illuminance of the photovoltaic array, and the active power of the load at the grid connection point; these three sets of data are arranged in chronological order to form a "time series profile", which serves as the input to the LSTM neural network;

[0023] After completing the trend prediction, the power factor calculation and adjustment module will combine the preset target power factor. The module will first convert the current measured power factor and the predicted future power factor into the corresponding power factor angles, and then combine them with the current apparent power of the control system to calculate the reactive power that the inverter needs to output or absorb.

[0024] Among them, the LSTM power factor prediction formula with multi-feature fusion is:

[0025] ;

[0026] in:

[0027] PF t+2 This represents the predicted power factor value for the next t+2 periods.

[0028] σ(·) represents the sigmoid activation function of the LSTM output layer;

[0029] Wh and Wx represent the weight matrices of the LSTM hidden state ht and the input feature matrix Xt;

[0030] b represents the bias term, indicating the balance of the effects of different characteristics; the formula for calculating adaptive dynamic reactive power compensation is:

[0031]

[0032] In the formula:

[0033] t represents the index of the time period;

[0034] ΔQ t This indicates the reactive power that needs to be compensated at the current moment;

[0035] α t Indicates the adaptive compensation coefficient;

[0036] S t This indicates the apparent power of the grid-connected system at the current moment;

[0037] θ target The phase angle corresponding to the target power factor is expressed by:

[0038] θ target =arccos(PFtarget )calculate,

[0039] PF target Set it to 0.98;

[0040] θ^ t+2 This represents the predicted power factor angle for the (t+2)th future period;

[0041] δ t This indicates the error correction term.

[0042] In a preferred embodiment, in step S5, based on the dynamic reactive power compensation amount ΔQ calculated in step S4, the system converts it into a control command for the inverter: if ΔQ is positive, a positive PWM pulse signal is generated; if ΔQ is negative, the pulse phase is adjusted to be reversed; the output frequency of the command is strictly synchronized with the grid cycle, and the pulse width accuracy is controlled within ±0.1μs.

[0043] In a preferred embodiment, in step S6, after receiving the compensation command, the inverter quickly adjusts the phase of the output current through the IGBT power module: when inductive reactive power is output, the angle of current lagging behind voltage gradually increases; when capacitive reactive power is absorbed, the angle of current leading voltage gradually decreases; the response time of the equipment is strictly controlled within 10ms, the reactive power output accuracy needs to reach ±2% of the rated capacity, and the dynamic adjustment range covers -100% to +100% of inductive reactive power to ensure that it can adapt to the compensation requirements under different operating conditions.

[0044] In a preferred embodiment, in step S7, the power factor meter at the grid connection point monitors the actual power factor after compensation in real time at a frequency of 50 milliseconds / time, and the control system compares it with the target value of 0.98, allowing a fluctuation range of ±0.02; if the actual value is lower than 0.96 or higher than 1.02 for three consecutive cycles, the system will mark the compensation effect as abnormal.

[0045] In a preferred embodiment, in step S8, after each hour of continuous operation, the system automatically starts a parameter optimization program: retrieves four sets of data from the past hour: “predicted value – actual value – compensation amount – effect”, calculates the prediction error of the LSTM model, and if the error exceeds the standard, fine-tunes the network weights with a learning rate of 0.001; at the same time, it analyzes the correlation between the historical values ​​of the adaptive compensation coefficient and the compensation effect.

[0046] In a preferred embodiment, a control system for the incoming power factor of a photovoltaic grid-connected system includes a power factor detection module, a power factor calculation and adjustment module, and an inverter control module.

[0047] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0048] 1. This invention first improves the accuracy of predicting power factor change trends in the prediction stage. Key variables such as light intensity and load power are incorporated into the model, simultaneously analyzing the dynamic correlation between power factor, light intensity changes, and load power consumption—for example, when light intensity suddenly drops, the load may experience increased power demand due to the activation of backup power; this correlation is captured and learned by the model. Therefore, when predicting future power factors, the interaction of multiple factors in actual operation can be considered more comprehensively, resulting in predictions closer to the true trend. The system can predict the direction of power factor changes in advance, changing the traditional passive response mode.

[0049] 2. In this invention, the flexibility and stability of the adjustment are enhanced in the compensation stage. The calculation of the adaptive dynamic reactive power compensation is not only based on future predicted values, but also dynamically adjusts the compensation level according to the accuracy of historical predictions: if the previous prediction error is large, the compensation level will be reduced accordingly; if the prediction result is reliable, the compensation level will be appropriately increased to ensure that the adjustment action is synchronized with the actual demand. In addition, the system will correct the current compensation level based on recent prediction errors. For example, if the power factor predicted in the last time was lower than the actual value, the compensation level will be appropriately increased to make up for the error. This intelligent adjustment mechanism based on the operating status avoids insufficient compensation due to response lag and also prevents resource waste caused by over-compensation, effectively improving the stability and reliability of system operation.

[0050] 3. In this invention, historical operating data is analyzed periodically (every hour) to compare and verify the predicted power factor value with the actual measured value, and the compensation amount with the actual effect, dynamically adjusting the core model parameters and compensation strategy. For example, if the prediction error of the LSTM model is found to be consistently large under specific operating conditions (such as sudden changes in light intensity or load fluctuations), the system will specifically optimize the model weight parameters to gradually improve the accuracy of future predictions. If overcompensation or undercompensation frequently occurs during the adjustment of the compensation coefficient, the adjustment step size will be reduced based on historical data feedback to make the compensation amount more in line with actual needs. This continuous self-calibration capability allows the system to proactively adapt to changes in the operating environment under different seasons, time periods, or operating conditions (such as the difference between strong sunlight in summer and weak sunlight in winter, and the fluctuation between high load during the day and low load at night), avoiding a decrease in compensation effect due to fixed parameters failing to match the dynamic environment. As the operating time increases, the prediction accuracy and compensation strategy of the system will become increasingly aligned with the actual scenario, reducing the need for manual intervention and ensuring the stability and effectiveness of power factor control in long-term operation. Attached Figure Description

[0051] Figure 1 This is a schematic diagram illustrating the process principle of the present invention;

[0052] Figure 2 This is a system block diagram of the present invention.

[0053] The diagram is labeled as follows: 1 - Power factor detection module, 2 - Power factor calculation and adjustment module, 3 - Inverter control module. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0055] Reference Figure 1-2 ,

[0056] A method for controlling the incoming power factor of a photovoltaic grid-connected system, the method comprising the following steps:

[0057] S1: Synchronous acquisition of grid-connected side electrical parameters. The power factor detection module synchronously acquires the instantaneous voltage value u(t) and instantaneous current value i(t) at the input terminal of the photovoltaic grid-connected system through high-precision voltage transformers and current transformers. The sampling frequency is set to 10kHz to ensure signal integrity. The acquired data is transmitted in real time to the power factor calculation and adjustment module as the raw input.

[0058] S2: Fundamental component extraction and noise suppression. The power factor calculation and adjustment module performs a Fast Fourier Transform (FFT) on the instantaneous voltage value u(t) and the instantaneous current value i(t) to separate the 50Hz fundamental voltage u1(t) and fundamental current i1(t). At the same time, it filters out the 2nd to 13th harmonic interference through a digital notch filter. The processed data is then transmitted to the next step as a valid input for power factor calculation.

[0059] S3: Multi-window sliding power factor calculation. Instantaneous active power is calculated based on u1(t) and i1(t): p(t) = u1(t)·i1(t);

[0060] The instantaneous apparent power is: s(t) = |u1(t)|·|i1(t)|;

[0061] The average power factor is calculated using a 50ms sliding window: PF=Σp(t) / Σs(t) (t∈window). Compared with single-point calculation, this method can better reflect the actual operating status of the system. The calculation results are synchronously stored in the historical database and transmitted to the deviation analysis stage.

[0062] S4: LSTM-based dynamic compensation prediction. The power factor calculation and adjustment module calls upon samples of [actual PF value, illuminance, and active power of load] from the historical database for the past 10 periods. Using a pre-trained LSTM neural network, it predicts the power factor change trend for the next two periods (200ms), and combines this with the target power factor PF. targetCalculate the reactive power that needs to be compensated: ΔQ = S·(sinθ) target -sinθ actual );

[0063] Where S is the apparent power, θ is the power factor angle, and sinθ target : The sine value of the target power factor angle; sinθ actual The sine value of the actual power factor angle solves the lag problem of traditional PID control.

[0064] S5: Inverter output constraint verification. Input ΔQ into the capacity model of the inverter control module and verify whether it satisfies: |ΔQ|≤Q_inv_max;

[0065] Q_inv_max represents the inverter's maximum reactive power output capability. If this is exceeded, the target power factor (PF) will be adjusted. target The optimal achievable value is fed back to S4 for recalculation. If satisfied, a reactive current reference value is generated. U rms This is the effective value of the line voltage.

[0066] S6: Real-time adjustment of inverter reactive power output. The inverter control module adopts a direct current control strategy, adjusting the reactive current reference value i... q_ref Compared with the actual output reactive current i q_real In comparison, a PWM drive signal is generated by a PI controller to adjust the phase angle δ of the inverter output voltage (δ=arcsin(i...). q_ref ·X_s / U_rms), where X_s is the system equivalent reactance), thereby changing the output reactive power and realizing dynamic adjustment of the incoming power factor.

[0067] S7: Closed-loop verification of adjustment effect. The power factor detection module repeats the S1-S3 process 100ms after the adjustment action to obtain a new actual power factor value (PF). actual_new ;

[0068] If |PF_actual_new - PF_target| ≤ 0.01, the system enters a stable state. If the error exceeds the limit, the error e = PF_target - PF_actual_new is fed back to the LSTM model in S4 to correct the prediction parameters and improve the accuracy of the next adjustment.

[0069] S8: Performs multi-scenario adaptive parameter optimization. After every 50 adjustment cycles, the power factor calculation and adjustment module analyzes the correlation between [illuminance - load type - PF adjustment time - inverter loss] in historical data and automatically adjusts the LSTM learning rate: increasing the learning rate to accelerate response under strong light and high load, and decreasing the learning rate to reduce loss under weak light and low load.

[0070] And update the dynamic threshold of PF_target, such as adjusting the target PF to 0.92 when the night load is <50% to reduce inverter switching losses and achieve optimal control under all operating conditions.

[0071] In step S1, after the equipment starts up, it first loads the preset basic control parameters, including the target power factor (default setting is 0.98 hysteresis), data sampling period (fixed at 20ms), maximum output limit of the reactive power compensation device (generally 80% of the inverter's rated capacity), and initial weight parameters of the LSTM prediction model (obtained through offline historical data training). Simultaneously, the system self-checks the storage unit to confirm that the operating data (including key indicators such as power factor, illuminance, and load power) for the past 72 hours in the historical database is complete and usable. If data loss is detected, it automatically uses the data from the previous 3 days in the backup storage as a temporary supplement to ensure a reliable data foundation for subsequent steps.

[0072] In step S2, the system synchronously collects three types of data through a distributed sensor network: a power factor meter measures the real-time power factor of the grid-connected point at a frequency of 20ms / time; a solar irradiance sensor (accuracy ±5W / m²) of the photovoltaic array records the irradiance every 20ms; and a smart meter on the load side (accuracy class 0.5) synchronously collects the active power value. All sensors are calibrated using the same clock source to ensure that the timestamp error of the three types of data does not exceed 1ms, avoiding deviations in subsequent analysis due to time asynchrony. The collected data is temporarily stored in a local cache, and after every 10 cycles (200ms) of collection, it is packaged and sent to the central processing unit.

[0073] In step S3, after receiving the data, the central processing unit first performs quality screening: a reasonable range of 0.85 to 1.0 is set for the power factor (if it exceeds this range, it is marked as abnormal); a natural extreme value of 0 to 1200 W / m² is set for the illuminance (if it exceeds this range, it is determined to be a sensor fault); and a fluctuation threshold of 0 to 1.5 times the rated load is set for the load power (if the fluctuation exceeds 20% for 3 consecutive times, it is marked). For the marked abnormal data, the system calls the sliding window mean algorithm (window size is 5 periods) for interpolation replacement; if the same sensor shows abnormalities 5 times consecutively, an alarm is triggered and the system switches to backup sensor data to ensure that the data entering subsequent analysis is true and reliable.

[0074] In step S4, the power factor calculation and adjustment module retrieves the operating data from the historical database for the most recent 10 cycles, containing three core pieces of information: the actual measured real-time power factor value, the real-time irradiance of the photovoltaic array (reflecting the fluctuations on the power generation side, such as sudden drops in irradiance caused by cloud cover), and the active power of the load at the grid connection point (reflecting the dynamics on the power consumption side, such as sudden load increases caused by equipment startup). These three sets of data are arranged in chronological order to form a "time series profile," which serves as the input to the LSTM neural network.

[0075] After completing the trend prediction, the power factor calculation and adjustment module will combine the preset target power factor. The module will first convert the current measured power factor and the predicted future power factor into the corresponding power factor angles, and then combine them with the current apparent power of the control system to calculate the reactive power that the inverter needs to output or absorb.

[0076] Among them, the LSTM power factor prediction formula with multi-feature fusion is:

[0077] ;

[0078] in:

[0079] PF t+2 This represents the predicted power factor value for the next t+2 period (dimensionless).

[0080] σ(·) represents the sigmoid activation function of the LSTM output layer (which restricts the output to the range of 0 to 1, in accordance with the physical meaning of power factor).

[0081] Wh and Wx represent the weight matrices (optimized through training) of the LSTM hidden state ht and the input feature matrix Xt.

[0082] b represents the bias term, which balances the influence of different features. The innovation of this formula lies in the fact that traditional prediction models usually only input a single feature (such as only the historical value of the power factor), while here, three types of features—illuminance, load power, and power factor—are fused into a three-dimensional input matrix Xt. The temporal coupling relationship between different features is automatically learned through the gating mechanism of LSTM, which significantly improves the accuracy of prediction.

[0083] The formula for calculating adaptive dynamic reactive power compensation is:

[0084]

[0085] In the formula:

[0086] t represents the index of the time period;

[0087] ΔQ tThis represents the reactive power that needs to be compensated at the current moment (unit: kvar).

[0088] α t Represents the adaptive compensation coefficient (α) t =1−0.1·MSE t−3:t MSE t−3:t (The root mean square of the prediction error over the last three periods).

[0089] S t This represents the apparent power of the grid-connected system at the current moment (unit: kVA).

[0090] θ target The phase angle corresponding to the target power factor is expressed by:

[0091] θ target =arccos(PF target )calculate,

[0092] PF target It is usually set to 0.98;

[0093] θ^ t+2 The angle representing the predicted power factor for the (t+2)th future period (in radians);

[0094] δ t Indicates the error correction term:

[0095] (δ) t =0.5·(PF t−1 -PF actual,t−1 )⋅S t−1 This is used to correct the impact of the previous prediction error on the current compensation. The creativity of this formula lies in two aspects: first, the introduction of an adaptive coefficient α. t The compensation intensity is dynamically adjusted based on historical prediction errors (the larger the error, the greater the α). t The smaller the value, the less likely it is to cause overcompensation due to inaccurate predictions; secondly, to increase the error correction term δ. t By using the prediction deviation from the previous step to correct the current compensation amount, a closed-loop mechanism of "prediction-compensation-correction" is formed, which is more robust than the traditional static formula.

[0096] In step S5, based on the dynamic reactive power compensation amount ΔQ calculated in step S4, the system converts it into control commands for the inverter: if ΔQ is positive (inductive reactive power needs to be output), a positive PWM pulse signal is generated (the duty cycle is positively correlated with the magnitude of ΔQ); if ΔQ is negative (capacitive reactive power needs to be absorbed), the pulse phase is adjusted to reverse. The output frequency of the command is strictly synchronized with the grid cycle (50Hz), and the pulse width accuracy is controlled within ±0.1μs to ensure that the reactive power output by the inverter can accurately track the calculated value, avoiding deviations in the compensation effect due to command delays or errors.

[0097] In step S6, after receiving the compensation command, the inverter quickly adjusts the phase of the output current through the IGBT power module: when outputting inductive reactive power, the angle of the current lagging behind the voltage gradually increases; when absorbing capacitive reactive power, the angle of the current leading the voltage gradually decreases. The response time of the equipment is strictly controlled within 10ms (from the receipt of the command to the stable reactive power output), and the reactive power output accuracy must reach ±2% of the rated capacity (e.g., when the rated capacity is 100kvar, the error does not exceed 2kvar), and the dynamic adjustment range covers -100% to +100% of inductive reactive power (i.e., it can output maximum inductive reactive power and absorb maximum capacitive reactive power) to ensure that it can adapt to the compensation requirements under different operating conditions.

[0098] In step S7, the power factor meter at the grid connection point monitors the actual power factor after compensation in real time at a frequency of 50 milliseconds / time. The control system compares it with the target value of 0.98, allowing a fluctuation range of ±0.02 (i.e., the actual value is considered normal if it is between 0.96 and 1.02). If the actual value is lower than 0.96 or higher than 1.02 for three consecutive cycles (60 milliseconds), the system will mark it as "abnormal compensation effect"; if it is within the normal range, the system will record the correspondence between the current compensation amount and the actual effect as the basis for subsequent parameter optimization.

[0099] In step S8, after each hour of continuous operation, the system automatically starts the parameter optimization program: it retrieves four sets of data from the past hour: “predicted value – actual value – compensation amount – effect”, calculates the prediction error of the LSTM model (the root mean square error must be controlled within 0.01), and if the error exceeds the standard, it fine-tunes the network weights with a learning rate of 0.001; at the same time, it analyzes the correlation between the historical values ​​of the adaptive compensation coefficient and the compensation effect. If it is found that the coefficient is too large and frequent overcompensation occurs, the adjustment step size will be gradually reduced (for example, from 0.05 / time to 0.03 / time), thereby improving the long-term operational stability of the system through dynamic parameter optimization.

[0100] A control system for the incoming power factor of a photovoltaic grid-connected system, wherein the system operates the aforementioned control method for the incoming power factor of the photovoltaic grid-connected system during use;

[0101] The system includes a power factor detection module 1, a power factor calculation and adjustment module 2, and an inverter control module 3.

[0102] From the above, we can conclude that:

[0103] This invention first improves the accuracy of predicting power factor change trends in the prediction stage. Key variables such as light intensity and load power are incorporated into the model, simultaneously analyzing the dynamic correlation between power factor, changes in light intensity, and load power consumption—for example, when light intensity suddenly drops, the load may experience increased power demand due to the activation of backup power; this correlation is captured and learned by the model. Therefore, when predicting future power factors, the interaction of multiple factors in actual operation can be considered more comprehensively, resulting in predictions closer to the actual trend. The system can predict the direction of power factor changes in advance, changing the traditional passive response mode.

[0104] In this invention, the flexibility and stability of the adjustment are enhanced in the compensation stage. The calculation of the adaptive dynamic reactive power compensation is not only based on future predicted values, but also dynamically adjusts the compensation level according to the accuracy of historical predictions: if the previous prediction error is large, the compensation level will be reduced accordingly; if the prediction result is reliable, the compensation level will be appropriately increased to ensure that the adjustment action is synchronized with actual demand. In addition, the system will correct the current compensation level based on recent prediction errors. For example, if the power factor predicted in the last time was lower than the actual value, the compensation level will be appropriately increased to make up for the error. This intelligent adjustment mechanism based on operating status avoids insufficient compensation due to response lag and prevents resource waste caused by over-compensation, effectively improving the stability and reliability of system operation.

[0105] In this invention, historical operating data is analyzed periodically (every hour) to compare and verify the predicted power factor with the actual measured value, and the compensation amount with the actual effect, dynamically adjusting the core model parameters and compensation strategy. For example, if the prediction error of the LSTM model is found to be consistently large under specific operating conditions (such as sudden changes in light intensity or load fluctuations), the system will specifically optimize the model weight parameters to gradually improve the accuracy of future predictions. If overcompensation or undercompensation frequently occurs during the adjustment of compensation coefficients, the adjustment step size will be reduced based on historical data feedback to make the compensation amount more in line with actual needs. This continuous self-calibration capability allows the system to proactively adapt to changes in the operating environment under different seasons, time periods, or operating conditions (such as the difference between strong sunlight in summer and weak sunlight in winter, and the fluctuation between high load during the day and low load at night), avoiding a decrease in compensation effect due to fixed parameters failing to match the dynamic environment. As the operating time increases, the system's prediction accuracy and compensation strategy become increasingly aligned with the actual scenario, reducing the need for manual intervention and ensuring the stability and effectiveness of power factor control in long-term operation.

[0106] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "comprising" or any other variations thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0107] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for controlling the incoming power factor of a photovoltaic grid-connected system, characterized in that: The method is based on a system that includes the following modules during operation: a power factor detection module (1), a power factor calculation and adjustment module (2), an inverter control module (3), a power factor detection module, a central processing unit, and an IGBT power module. The method includes the following steps: S1: Synchronous acquisition of electrical parameters on the grid-connected side; S2: Fundamental component extraction and noise suppression; S3: Multi-window sliding power factor calculation; instantaneous active power is calculated based on the instantaneous value of 50Hz fundamental voltage u1(t) and the instantaneous value of 50Hz fundamental current i1(t): p(t)=u1(t)·i1(t); The instantaneous apparent power is: s(t) = |u1(t)|·|i1(t)|; The average power factor is calculated using a sliding window: PF=Σp(t) / Σs(t), and the calculation results are synchronously stored in the historical database and transmitted to the deviation analysis stage. S4: LSTM-based dynamic compensation prediction; the power factor calculation and adjustment module calls samples from the historical database and uses a pre-trained LSTM neural network to predict future power factor trends, combined with the target power factor PF. target Calculate the reactive power that needs to be compensated: ΔQ = S·(sinθ) target -sinθ actual ); Where S is the apparent power, θ is the power factor angle, and sinθ target : The sine value of the target power factor angle; sinθ actual The sine value of the actual power factor angle; In step S4, the power factor calculation and adjustment module retrieves the most recent operating data from the historical database, which includes three sets of data: the actual measured real-time power factor value, the real-time irradiance of the photovoltaic array, and the active power of the load at the grid connection point; these three sets of data are arranged in chronological order and used as the input to the LSTM neural network. After completing the trend prediction, the power factor calculation and adjustment module will combine the preset target power factor. The power factor calculation and adjustment module first converts the current measured power factor and the predicted future power factor into the corresponding power factor angles, and then combines the current apparent power of the control system to calculate the reactive power that the inverter needs to output or absorb. Among them, the LSTM power factor prediction formula with multi-feature fusion is: ; in: PF t+2 This represents the predicted power factor value for the next t+2 periods. σ(·) represents the sigmoid activation function of the LSTM output layer; Wh and Wx represent the weight matrices of the LSTM hidden state ht and the input feature matrix Xt; b represents the bias term, indicating the balance of the effects of different characteristics; the formula for calculating adaptive dynamic reactive power compensation is: ; In the formula: t represents the index of the time period; ΔQ t This indicates the reactive power that needs to be compensated at the current moment; α t Indicates the adaptive compensation coefficient; S t This represents the apparent power of the grid-connected system at the current moment; θ target The phase angle corresponding to the target power factor is expressed by: θ target =arccos(PF target )calculate, PF target Set it to 0.98; θ t+2 This represents the predicted power factor angle for the (t+2)th future period; δ t Indicates the error correction term; S5: Inverter output constraint verification; Input the dynamic reactive power compensation amount ΔQ into the capacity model of the inverter control module and verify whether it satisfies: |ΔQ|≤Q_inv_max; Q_inv_max represents the inverter's maximum reactive power output capability. If this capability is exceeded, the target PF_target is adjusted to the optimal achievable value and fed back to S4 for recalculation. If the target is met, a reactive current reference value is generated. ;, U rms This is the effective value of the line voltage; S6: Real-time adjustment of inverter reactive power output; S7: Closed-loop verification of adjustment effect; 100ms after the adjustment action is executed, the power factor detection module repeats the S1-S3 process to obtain a new actual power factor value PF. actual_new ; S8: Perform multi-scenario adaptive parameter optimization.

2. The method for controlling the incoming power factor of a photovoltaic grid-connected system as described in claim 1, characterized in that: In step S1, after the device is started, the preset basic control parameters are first loaded, including the target power factor, data sampling period, maximum output limit of the reactive power compensation device, and initial weight parameters of the LSTM prediction model; at the same time, the system self-tests the storage unit to confirm that the running data in the historical database is complete and usable; if data is detected as missing, the backup stored data is automatically used as a temporary supplement. The power factor detection module synchronously collects the instantaneous voltage value u(t) and instantaneous current value i(t) at the incoming terminal of the photovoltaic grid-connected system through voltage transformers and current transformers.

3. The method for controlling the incoming power factor of a photovoltaic grid-connected system as described in claim 1, characterized in that: In step S2, the control system synchronously collects three types of data through a distributed sensor network: electrical parameter data, power and energy consumption data, and voltage data; the smart meter on the load side synchronously collects the active power value. The power factor calculation and adjustment module performs a fast Fourier transform on the instantaneous voltage value u(t) and the instantaneous current value i(t) to separate the fundamental voltage u1(t) and the fundamental current i1(t). At the same time, it filters out the 2nd to 13th harmonic interference through a digital notch filter. The processed data is transmitted to S3 as the effective input for power factor calculation.

4. The method for controlling the incoming power factor of a photovoltaic grid-connected system as described in claim 1, characterized in that: In step S3, after receiving the data, the central processing unit first performs quality screening: it sets a natural extreme value of 0~1200W / m² for the light intensity and a fluctuation threshold of 0~1.5 times the rated load for the load power; for the marked abnormal data, the control system calls the sliding window mean algorithm to perform interpolation replacement; if the same sensor continuously shows abnormalities, it triggers an alarm and switches to the backup sensor data.

5. The method for controlling the incoming power factor of a photovoltaic grid-connected system as described in claim 1, characterized in that: In step S5, based on the dynamic reactive power compensation amount ΔQ calculated in step S4, the grid-connected system converts it into control commands for the inverter: if ΔQ is positive, a positive PWM pulse signal is generated. If ΔQ is negative, the adjustment pulse phase is reversed; the output frequency of the command is strictly synchronized with the power grid cycle.

6. The method for controlling the incoming power factor of a photovoltaic grid-connected system as described in claim 1, characterized in that: In step S6, after receiving the compensation command, the inverter quickly adjusts the phase of the output current through the IGBT power module: when inductive reactive power is output, the angle of the current lagging behind the voltage gradually increases; when capacitive reactive power is absorbed, the angle of the current leading the voltage gradually decreases, and the dynamic adjustment range covers -100% to +100% inductive reactive power to ensure that it can adapt to the compensation requirements under different operating conditions. The inverter control module adopts a direct current control strategy, which sets the reactive current reference value i... q_ref Compared with the actual output reactive current i q_real In comparison, the PWM drive signal generated by the PI controller is used to adjust the phase angle δ of the inverter output voltage, thereby changing the output reactive power and realizing the dynamic adjustment of the input power factor.

7. The method for controlling the incoming power factor of a photovoltaic grid-connected system as described in claim 1, characterized in that: In step S7, the power factor at the grid connection point represents the actual power factor after real-time monitoring and compensation. The control system compares it with the target value Pf. target The comparison is 0.98, allowing a fluctuation range of ±0.02; if the actual value is continuously lower than 0.96 or higher than 1.02, the control system will mark the compensation effect as abnormal. If |PF_actual_new-PF_target|≤0.01, the system enters a stable state; otherwise, if the error exceeds the limit, the error e=PF_target-PF_actual_new is fed back to the LSTM model in S4 to correct the prediction parameters.

Citation Information

Patent Citations

  • Distributed control method for household photovoltaic grid-connected inverter based on voltage sensitivity matrix

    CN110460095A

  • Power grid AVC system operation parameter prediction method and system, and storage medium

    CN114243702A