Method, device and equipment for optimizing port characteristics of power quality flexible compensation device
By identifying the harmonic spectrum of dynamic loads and constructing a multi-objective optimization model, the port characteristics of the power quality flexible compensation device are adjusted in real time, solving the problems of voltage flicker and harmonic amplification. This achieves millisecond-level matching between port characteristics and dynamic loads, improving compensation accuracy and system robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN POWER SUPPLY BUREAU
- Filing Date
- 2026-05-08
- Publication Date
- 2026-07-24
AI Technical Summary
Existing power quality flexible compensation devices suffer from port characteristic mismatch with the grid and load when facing millisecond-level load changes, leading to problems such as voltage flicker, harmonic amplification, and system resonance. Furthermore, in multi-port power mutual assistance scenarios, there is a lack of coordinated optimization between port characteristics, which can easily lead to circulating current and power imbalance.
By synchronously collecting voltage and current parameters from the grid side and the load side, the harmonic spectrum of the dynamic load is identified using a sliding window fast Fourier transform and a recursive least squares algorithm. The equivalent impedance or admittance parameters of the device port are calculated, and a multi-objective optimization model is constructed. The optimization objectives are port impedance matching degree, harmonic distortion rate, voltage fluctuation rate, power balance degree, and system loss. The port characteristics are adjusted in real time using an adaptive virtual impedance and variable structure control method, and the control parameters are tuned by integrating adaptive proportional-integral-derivative control and fuzzy neural network.
It achieves millisecond-level dynamic matching of port characteristics with dynamic load and grid impedance, effectively eliminating the risks of voltage flicker, harmonic amplification and system resonance, improving compensation accuracy and system robustness, and taking into account harmonic suppression, voltage stability, power balance and loss reduction.
Smart Images

Figure CN122456473A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power distribution network technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for optimizing the port characteristics of a power quality flexible compensation device. Background Technology
[0002] With the intelligent and flexible transformation of power systems, the proportion of dynamic loads with impulsive and fluctuating characteristics, such as rolling mills, electric arc furnaces, and new energy grid-connected units, in distribution networks has increased significantly. These loads are characterized by high fluctuation frequency, large amplitude variations, and high harmonic content, posing a severe challenge to power quality management in distribution networks. Flexible power quality compensation devices (such as active power filters, static var generators, and unified power quality controllers) have become core equipment for addressing these issues, and their port characteristics (such as equivalent impedance / admittance) directly determine the compensation accuracy and system adaptability.
[0003] However, most current compensation devices employ offline tuning modes with fixed port impedances and preset control parameters. While traditional technologies can improve dynamic performance and steady-state accuracy, they still do not address adaptive optimization of port characteristics. This fixed mode can only adapt to steady-state or slowly varying loads. When encountering millisecond-level load surges, the port characteristics are prone to mismatch with the grid and load, leading to technical problems such as voltage flicker, harmonic amplification, and even system resonance. Furthermore, in multi-port power matching scenarios, traditional technologies focus primarily on power allocation logic, lacking coordinated optimization between port characteristics, which easily leads to circulating current generation and power imbalance.
[0004] There is an urgent need for a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for optimizing the port characteristics of a power quality flexible compensation device, which can enable the port characteristics of the power quality flexible compensation device to have dynamic adaptability and achieve multi-objective adaptive optimization. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for optimizing the port characteristics of a power quality flexible compensation device, which enables the port characteristics of the power quality flexible compensation device to have dynamic adaptability and achieve multi-objective adaptive optimization, in order to address the above-mentioned technical problems.
[0006] In a first aspect, this application provides a method for optimizing the port characteristics of a power quality flexible compensation device, including:
[0007] The voltage and current parameters of the grid side and the load side are collected simultaneously. Based on the sliding window fast Fourier transform and recursive least squares algorithm, the harmonic spectrum of the dynamic load is identified, and the equivalent impedance or admittance parameters of the device port are calculated.
[0008] Based on the identified harmonic spectrum and the collected voltage and current parameters, the harmonic distortion rate and voltage fluctuation rate are calculated. Using port impedance matching, the harmonic distortion rate, the voltage fluctuation rate, power balance and system loss as optimization objectives, and capacity, response time and DC bus voltage stability as constraints, a multi-objective optimization model is constructed and the port characteristic optimization method is obtained by solving it.
[0009] Based on the port characteristic optimization method, an adaptive virtual impedance and variable structure control method is adopted to adjust the equivalent impedance or admittance parameters of the device port in real time, and an adaptive proportional-integral-derivative control method and a fuzzy neural network fusion method are used to tune the control parameters.
[0010] In one embodiment, the synchronous acquisition of voltage and current parameters from the grid side and the load side, based on a sliding window fast Fourier transform and recursive least squares algorithm, identifies the harmonic spectrum of the dynamic load and calculates the equivalent impedance or admittance parameters of the device port, including:
[0011] A sliding window fast Fourier transform was used to window and truncate the synchronously acquired voltage and current parameters, and the dynamic load fluctuation frequency, fluctuation amplitude and harmonic spectrum components within each time window were extracted.
[0012] The recursive least squares algorithm is used, with the instantaneous voltage and current parameters of the device port as input variables, to iteratively update the estimation matrix and calculate the equivalent resistance, equivalent inductance or equivalent admittance of the device port.
[0013] In one embodiment, the harmonic distortion rate and voltage fluctuation rate are calculated based on the identified harmonic spectrum and the collected voltage and current parameters. A multi-objective optimization model is constructed, using port impedance matching, the harmonic distortion rate, the voltage fluctuation rate, power balance, and system losses as optimization objectives, and capacity, response time, and DC bus voltage stability as constraints. The method for optimizing port characteristics is then solved, including:
[0014] The total harmonic distortion rate is calculated based on the identified harmonic spectral components; the voltage fluctuation rate is obtained by calculating the fluctuation range of the effective voltage value based on the collected voltage parameters.
[0015] The port impedance matching degree is determined based on the deviation between the equivalent impedance or admittance parameter of the device port and the preset target impedance value.
[0016] The port impedance matching degree, harmonic distortion rate, voltage fluctuation rate, power balance degree and system loss are used as the objective terms of the multi-objective optimization function, and the rated capacity of the device, the maximum allowable response time and the allowable fluctuation range of the DC bus voltage are used as the constraint boundaries to construct a multi-objective optimization model.
[0017] A reinforcement learning algorithm is used to dynamically update the weight parameters in the multi-objective optimization model, and a model predictive control algorithm is used to solve the multi-objective optimization model in the prediction time domain to obtain a port characteristic optimization method.
[0018] In one embodiment, the port characteristic optimization method employs an adaptive virtual impedance and variable structure control method to adjust the equivalent impedance or admittance parameters of the device port in real time, and uses an adaptive proportional-integral-derivative control method and a fuzzy neural network fusion method to tune the control parameters, including:
[0019] The port characteristic optimization method is analyzed to obtain the target equivalent impedance value and the target control parameter value;
[0020] Based on the difference between the target equivalent impedance value and the current equivalent impedance or admittance parameter, the injected value of the virtual impedance is calculated, and the working mode of the device port is switched by a variable structure control method so that the equivalent impedance or admittance parameter of the device port follows the change of the target equivalent impedance value.
[0021] The target control parameter values are used as the initial proportional coefficient, integral coefficient, and derivative coefficient of the adaptive proportional-integral-derivative control method, and the proportional coefficient, integral coefficient, and derivative coefficient are adjusted online using a fuzzy neural network fusion method.
[0022] In one embodiment, the method further includes:
[0023] In multi-port power sharing scenarios, obtain the real-time power parameters, current parameters, and impedance parameters of each port;
[0024] With the goal of suppressing circulating current between ports and minimizing power distribution deviation, the port characteristic optimization methods and power mutual assistance commands of each port are coordinated to generate consistent adjustment amounts for each port.
[0025] The consistency adjustment amount is superimposed on the port characteristic optimization method of each port and synchronously distributed to the real-time control execution unit of each port.
[0026] In one embodiment, the method further includes:
[0027] The harmonic distortion rate and voltage fluctuation rate actually output by the real-time acquisition device port are compared with the target values of harmonic distortion rate and voltage fluctuation rate in the optimization target, respectively, and the deviation is calculated.
[0028] When the deviation exceeds a preset threshold, or when grid parameter perturbation or load disturbance mode changes are detected, the control parameters are retuned online using an adaptive proportional-integral-derivative control method combined with a fuzzy neural network method.
[0029] Secondly, this application also provides a power quality flexible compensation device port characteristic optimization device, comprising:
[0030] The parameter acquisition and identification module is used to simultaneously acquire voltage and current parameters from the grid side and the load side. Based on the sliding window fast Fourier transform and recursive least squares algorithm, it identifies the harmonic spectrum of the dynamic load and calculates the equivalent impedance or admittance parameters of the device port.
[0031] The multi-objective optimization module is used to calculate the harmonic distortion rate and voltage fluctuation rate based on the identified harmonic spectrum and the collected voltage and current parameters. It uses port impedance matching, the harmonic distortion rate, the voltage fluctuation rate, power balance and system loss as optimization objectives, and capacity, response time and DC bus voltage stability as constraints to construct a multi-objective optimization model and solve it to obtain the port characteristic optimization method.
[0032] The dynamic adjustment and control module is used to adjust the equivalent impedance or admittance parameters of the device port in real time according to the port characteristic optimization method, using an adaptive virtual impedance and variable structure control method, and to tune the control parameters using an adaptive proportional-integral-derivative control method and a fuzzy neural network fusion method.
[0033] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0034] The voltage and current parameters of the grid side and the load side are collected simultaneously. Based on the sliding window fast Fourier transform and recursive least squares algorithm, the harmonic spectrum of the dynamic load is identified, and the equivalent impedance or admittance parameters of the device port are calculated.
[0035] Based on the identified harmonic spectrum and the collected voltage and current parameters, the harmonic distortion rate and voltage fluctuation rate are calculated. Using port impedance matching, the harmonic distortion rate, the voltage fluctuation rate, power balance and system loss as optimization objectives, and capacity, response time and DC bus voltage stability as constraints, a multi-objective optimization model is constructed and the port characteristic optimization method is obtained by solving it.
[0036] Based on the port characteristic optimization method, an adaptive virtual impedance and variable structure control method is adopted to adjust the equivalent impedance or admittance parameters of the device port in real time, and an adaptive proportional-integral-derivative control method and a fuzzy neural network fusion method are used to tune the control parameters.
[0037] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0038] The voltage and current parameters of the grid side and the load side are collected simultaneously. Based on the sliding window fast Fourier transform and recursive least squares algorithm, the harmonic spectrum of the dynamic load is identified, and the equivalent impedance or admittance parameters of the device port are calculated.
[0039] Based on the identified harmonic spectrum and the collected voltage and current parameters, the harmonic distortion rate and voltage fluctuation rate are calculated. Using port impedance matching, the harmonic distortion rate, the voltage fluctuation rate, power balance and system loss as optimization objectives, and capacity, response time and DC bus voltage stability as constraints, a multi-objective optimization model is constructed and the port characteristic optimization method is obtained by solving it.
[0040] Based on the port characteristic optimization method, an adaptive virtual impedance and variable structure control method is adopted to adjust the equivalent impedance or admittance parameters of the device port in real time, and an adaptive proportional-integral-derivative control method and a fuzzy neural network fusion method are used to tune the control parameters.
[0041] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0042] The voltage and current parameters of the grid side and the load side are collected simultaneously. Based on the sliding window fast Fourier transform and recursive least squares algorithm, the harmonic spectrum of the dynamic load is identified, and the equivalent impedance or admittance parameters of the device port are calculated.
[0043] Based on the identified harmonic spectrum and the collected voltage and current parameters, the harmonic distortion rate and voltage fluctuation rate are calculated. Using port impedance matching, the harmonic distortion rate, the voltage fluctuation rate, power balance and system loss as optimization objectives, and capacity, response time and DC bus voltage stability as constraints, a multi-objective optimization model is constructed and the port characteristic optimization method is obtained by solving it.
[0044] Based on the port characteristic optimization method, an adaptive virtual impedance and variable structure control method is adopted to adjust the equivalent impedance or admittance parameters of the device port in real time, and an adaptive proportional-integral-derivative control method and a fuzzy neural network fusion method are used to tune the control parameters.
[0045] The aforementioned power quality flexible compensation device port characteristic optimization method, device, computer equipment, computer-readable storage medium, and computer program product, by synchronously collecting voltage and current parameters from the grid side and the load side, and identifying dynamic load harmonic spectra and calculating port equivalent impedance or admittance based on sliding window fast Fourier transform and recursive least squares algorithm, can accurately capture millisecond-level harmonic characteristics and port electrical parameters of dynamic loads, overcoming the problems of low accuracy and slow response of traditional identification methods; by using port impedance matching degree, harmonic distortion rate, voltage fluctuation rate, power balance degree, and system loss as multi-objective optimization functions, and integrating reinforcement learning and model prediction... The measurement and control system constructs and solves a multi-objective optimization model, breaking the limitations of single-objective optimization. It can simultaneously achieve harmonic suppression, voltage stability, power balance, and loss reduction under constraints of device capacity, response time, and DC bus voltage stability, while balancing compensation accuracy and economy. By using adaptive virtual impedance and variable structure control to adjust the port equivalent impedance or admittance in real time based on the optimization results, and by integrating adaptive PID and fuzzy neural network to tune the control parameters, it achieves millisecond-level dynamic matching of port characteristics with dynamic load and grid impedance, effectively eliminating the risks of voltage flicker, harmonic amplification, and system resonance, and significantly improving compensation accuracy and system robustness. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is an application environment diagram of the power quality flexible compensation device port characteristic optimization method in one embodiment;
[0048] Figure 2 This is a flowchart illustrating a method for optimizing the port characteristics of a power quality flexible compensation device in one embodiment.
[0049] Figure 3 This is a schematic diagram of the device system topology in the most detailed embodiment;
[0050] Figure 4 This is a schematic diagram of the control architecture in the most detailed embodiment;
[0051] Figure 5 This is a schematic diagram illustrating real-time identification and multi-target optimization in the most detailed embodiment;
[0052] Figure 6 This is a schematic diagram of the control strategy and real-time adjustment mechanism in the most detailed embodiment;
[0053] Figure 7 This is a schematic diagram comparing voltage harmonic distortion rates in the most detailed embodiment;
[0054] Figure 8 This is a schematic diagram of the multi-port active power mutual assistance function in the most detailed embodiment;
[0055] Figure 9 This is a schematic diagram illustrating the control response speed in the most detailed embodiment;
[0056] Figure 10 This is a schematic diagram of the multi-functional power quality management function in the most detailed embodiment;
[0057] Figure 11 This is a schematic diagram comparing the current THD under parameter perturbation in the most detailed embodiment;
[0058] Figure 12 This is a structural block diagram of a power quality flexible compensation device port characteristic optimization device in one embodiment;
[0059] Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0061] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0062] The power quality flexible compensation device port characteristic optimization method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server.
[0063] The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle systems, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. The server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0064] In one exemplary embodiment, such as Figure 2 As shown, a method for optimizing the port characteristics of a power quality flexible compensation device is provided, which is then applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps S202 to S206. Wherein:
[0065] Step S202: Simultaneously collect voltage and current parameters from the grid side and the load side. Based on the sliding window fast Fourier transform and recursive least squares algorithm, identify the harmonic spectrum of the dynamic load and calculate the equivalent impedance or admittance parameters of the device port.
[0066] Specifically, firstly, three-phase voltage and current parameters from the grid side (point of common coupling) and the load side (dynamic load access point) are simultaneously acquired using a multi-channel high-speed sampling unit. The sampling frequency is set according to the harmonic characteristics of the dynamic load; for example, for a rolling mill load containing the 50th harmonic, the sampling frequency is no less than 12.8 kHz. A hardware phase-locked loop (PLL) is used to achieve strict synchronization of each channel, ensuring accurate phase relationships of the voltage and current data. The acquired data is sent to the FPGA in the adaptive optimization control unit for preprocessing, including anti-aliasing filtering, DC bias removal, and Hanning window processing to suppress spectral leakage. Then, a sliding window fast Fourier transform is used to analyze the data within each time window. The window length is not fixed but adaptively adjusted according to the fluctuation characteristics of the dynamic load: for impact loads (such as the instant of steel biting in the rolling mill), the window length is shortened to 10 ms (half a power frequency cycle) to improve time resolution; for loads with slower fluctuations (such as the electric arc furnace steelmaking cycle), the window length can be extended to one power frequency cycle (20 ms) to obtain a more accurate spectrum. By employing a sliding window FFT, the amplitude and phase of each harmonic in the dynamic load current are extracted, thereby constructing the harmonic spectrum distribution of the dynamic load. Simultaneously, the load fluctuation frequency and amplitude are calculated based on the change in fundamental amplitude over time. On the other hand, a recursive least squares (RLS) algorithm is used to estimate the equivalent impedance or admittance parameters of the power quality flexible compensation device port in real time. The RLS algorithm uses the instantaneous voltage and current measured at the device port as input to establish an autoregressive moving average model describing the electrical relationship of the port. An internal forgetting factor (typically ranging from 0.98 to 0.995) is introduced to gradually reduce the influence of historical data, thus enabling the tracking of the time-varying process of port characteristics. Upon acquiring a new sampling point, the RLS algorithm recursively updates the gain vector and covariance matrix, iteratively correcting the current equivalent impedance or admittance estimate.
[0067] Step S204: Based on the identified harmonic spectrum and the collected voltage and current parameters, calculate the harmonic distortion rate and voltage fluctuation rate; with port impedance matching, harmonic distortion rate, voltage fluctuation rate, power balance and system loss as optimization objectives, and capacity, response time and DC bus voltage stability as constraints, construct a multi-objective optimization model and solve it to obtain the port characteristic optimization method.
[0068] Specifically, based on the identified dynamic load harmonic spectrum, the Total Harmonic Distortion (THD) is calculated, which is the ratio of the square root of the sum of the squares of the effective values of each harmonic current to the effective value of the fundamental current. Simultaneously, based on synchronously acquired voltage parameters, the voltage fluctuation rate is calculated as the percentage of the maximum fluctuation of the effective voltage value within one power frequency cycle to the nominal voltage. Port impedance matching is determined based on the deviation between the calculated current equivalent impedance or admittance of the device port and the preset target impedance or admittance; a smaller deviation indicates a higher matching degree. Power balance is used in multi-port scenarios and is defined as the degree of deviation between the output power of each port and the average power. System losses are estimated based on the active power losses of the internal switching devices, filter inductors, and DC bus. The optimization of these five indicators aims to achieve, for example, THD below 5%, voltage fluctuation rate not exceeding ±1%, port impedance matching improved by more than 75%, power balance reaching more than 95%, and system losses reduced by 18%, with constraints set as follows: device output capacity not exceeding 120% of rated capacity, response time not exceeding 5ms, and DC bus voltage fluctuation maintained within ±5% of the set value. Based on this, a multi-objective optimization model is constructed. This model uses the weighted sum of the five optimization objectives as the comprehensive fitness function, and the weight coefficients can be dynamically adjusted. To solve this model, reinforcement learning and model predictive control are integrated: the reinforcement learning part is responsible for dynamically adjusting the weight parameters in the multi-objective optimization model based on real-time feedback of environmental conditions (such as load fluctuation patterns and grid parameter perturbations), enabling the optimization strategy to adapt to different operating conditions; the model predictive control part uses the established dynamic load feature library to predict load disturbances in the next N steps (e.g., 5-10 power frequency cycles) and solves the multi-objective optimization problem in the prediction time domain, generating a set of optimal control sequences. The first control variable in this sequence is taken as the port characteristic optimization method at the current moment. This method specifically includes the target equivalent impedance value (or admittance value) and target control parameters (such as PID coefficients, virtual impedance injection values, etc.).
[0069] Step S206: Based on the port characteristic optimization method, an adaptive virtual impedance and variable structure control method is adopted to adjust the equivalent impedance or admittance parameters of the device port in real time, and the control parameters are tuned by a fusion method of adaptive proportional-integral-derivative control and fuzzy neural network.
[0070] Specifically, based on the difference between the target equivalent impedance value and the current actual equivalent impedance, the virtual impedance value to be injected is calculated and converted into a voltage compensation amount, which is then superimposed on the modulation wave. However, when the load undergoes drastic changes (such as steel biting in a rolling mill or simultaneous charging of a cluster of electric vehicles), relying solely on linear virtual impedance adjustment may lead to response lag. Therefore, a variable structure control method is introduced: Variable structure control is a nonlinear control strategy whose core is the design of a switching function and a sliding surface. When the system state deviates from the sliding surface, the controller's structure switches, generating a forced approaching motion, thereby enabling the equivalent impedance at the device port to quickly follow the target value. For example, when the load current mutation rate is detected to exceed a set threshold, variable structure control forcibly switches the device port from the current operating mode to another mode (e.g., from voltage source mode to current source mode or changing the conduction mode of the switching transistor), directly stepping the injected virtual impedance value to near the target value, and then finely adjusting it through a sliding surface approach law. This collaborative approach of adaptive virtual impedance and variable structure control allows the adjustment of equivalent impedance or admittance to be completed within 5ms, adapting to millisecond-level dynamic load fluctuations. On the other hand, to tune the control parameters, an adaptive proportional-integral-derivative (PID) control method combined with a fuzzy neural network is adopted. Adaptive PID control can adjust the proportional, integral, and derivative coefficients in real time according to the system state, but the adjustment rules of traditional adaptive PID rely on precise mathematical models, which are insufficient for adapting to highly nonlinear dynamic loads. Therefore, a fuzzy neural network is integrated: the fuzzy neural network combines the reasoning ability of fuzzy logic with the learning ability of a neural network. It takes the deviation and rate of change between the actual output harmonic distortion rate, voltage fluctuation rate, and the target value as input, and outputs the adjustment amount of the PID coefficients after fuzzification, fuzzy inference, and defuzzification. The neural network continuously updates the membership function and fuzzy rule base through online learning, enabling the PID tuning process to adapt to different disturbance modes.
[0071] The aforementioned method for optimizing the port characteristics of a flexible power quality compensation device simultaneously acquires voltage and current parameters from both the grid and load sides. Based on a sliding window fast Fourier transform and recursive least squares algorithm, it identifies the dynamic load harmonic spectrum and calculates the port equivalent impedance or admittance. This method accurately captures the millisecond-level harmonic characteristics and port electrical parameters of dynamic loads, overcoming the problems of low accuracy and slow response in traditional identification methods. Furthermore, by using port impedance matching, harmonic distortion rate, voltage fluctuation rate, power balance, and system loss as multi-objective optimization functions, it integrates reinforcement learning and model predictive control to construct and solve the multi-objective optimization. The model breaks through the limitations of single-objective optimization, and can simultaneously achieve harmonic suppression, voltage stability, power balance and loss reduction under the constraints of device capacity, response time and DC bus voltage stability, while taking into account compensation accuracy and economy. By adopting adaptive virtual impedance and variable structure control to adjust the port equivalent impedance or admittance in real time according to the optimization results, and integrating adaptive PID and fuzzy neural network to tune the control parameters, it achieves millisecond-level dynamic matching of port characteristics with dynamic load and grid impedance, effectively eliminating the risks of voltage flicker, harmonic amplification and system resonance, and significantly improving compensation accuracy and system robustness.
[0072] In an exemplary embodiment, voltage and current parameters from both the grid and load sides are simultaneously acquired. Based on a sliding window fast Fourier transform and recursive least squares algorithm, the harmonic spectrum of the dynamic load is identified, and the equivalent impedance or admittance parameters at the device port are calculated, including:
[0073] A sliding window fast Fourier transform was used to window and truncate the synchronously acquired voltage and current parameters, and the dynamic load fluctuation frequency, fluctuation amplitude and harmonic spectrum components within each time window were extracted.
[0074] The recursive least squares algorithm is used, with the instantaneous voltage and current parameters of the device port as input variables, to iteratively update the estimation matrix and calculate the equivalent resistance, equivalent inductance or equivalent admittance of the device port.
[0075] Specifically, within each window, the voltage and current sampling sequences are windowed and truncated by multiplying them by a Hanning or Hamming window function to suppress spectral leakage caused by non-integer period truncation. A Fast Fourier Transform is then performed on the windowed data to obtain the frequency domain distribution of the signal within that window. From the frequency domain results, the frequency (50Hz) and amplitude of the fundamental component are used to calculate load fluctuations: by continuously comparing the fundamental amplitude changes of adjacent windows, the fluctuation frequency (i.e., the number of fundamental amplitude changes per unit time) and fluctuation amplitude (the maximum difference between the fundamental amplitudes of adjacent windows) of the dynamic load can be obtained. Simultaneously, second-order and higher harmonic components are extracted, and the amplitude and phase of each harmonic are recorded to form the harmonic spectrum components within that window. As the window slides forward (e.g., sliding half a window length each time), a series of continuous spectral analysis results can be obtained, thereby tracking the time-varying characteristics of the dynamic load harmonic spectrum in real time.
[0076] For the recursive least squares algorithm, the input variables are the instantaneous voltage u(n) and instantaneous current i(n) measured at the device port, where n represents the discrete sampling time. The core of the algorithm is to continuously update the parameter estimation vector in a recursive form with a forgetting factor. In practice, a linear regression model describing the electrical relationship of the port is first established. For example, for equivalent impedance estimation, voltage is used as the observed value, current and its historical values are used as regression variables, and the parameter vector θ to be estimated includes equivalent resistance and equivalent inductance (or equivalent admittance). Then, the covariance matrix P(0) and the parameter estimation vector θ(0) are initialized. Usually, P(0) is set as an identity matrix with larger diagonal elements, and θ(0) is set as an empirical initial value. For each new sampling point (u(n), i(n)), the algorithm first calculates the prior estimation error, that is, the difference between the measured voltage and the voltage predicted based on the parameters at the previous time. Then, the gain vector is calculated according to the current covariance matrix. Then, the parameter estimation vector is corrected using the gain vector and the prior error to obtain θ(n) at the current time. Finally, the covariance matrix is updated according to the forgetting factor (typically ranging from 0.98 to 0.995), so that past data influences the current estimate with exponentially decaying weights, thereby maintaining the ability to track time-varying parameters. Through repeated iterations, the algorithm outputs the equivalent resistance, equivalent inductance, or equivalent admittance values of the device ports in real time.
[0077] In this embodiment, by using the windowing truncation and sliding processing of the sliding window FFT, spectral leakage can be effectively suppressed, and the fluctuation frequency, fluctuation amplitude and harmonic spectral components of the dynamic load can be accurately captured. Combined with the forgetting factor recursive update of the recursive least squares algorithm, it can quickly converge to the new equivalent resistance, inductance or admittance value within 1 to 2 power frequency cycles, so as to realize the real-time tracking of port characteristics.
[0078] In an exemplary embodiment, based on the identified harmonic spectrum and the collected voltage and current parameters, the harmonic distortion rate and voltage fluctuation rate are calculated. Using port impedance matching, harmonic distortion rate, voltage fluctuation rate, power balance, and system loss as optimization objectives, and capacity, response time, and DC bus voltage stability as constraints, a multi-objective optimization model is constructed, and the port characteristic optimization method is obtained by solving it, including:
[0079] The total harmonic distortion rate is calculated based on the identified harmonic spectral components; the voltage fluctuation rate is obtained by calculating the fluctuation range of the effective voltage value based on the collected voltage parameters.
[0080] The port impedance matching degree is determined based on the deviation between the equivalent impedance or admittance parameter of the device port and the preset target impedance value.
[0081] The multi-objective optimization model is constructed by taking port impedance matching degree, harmonic distortion rate, voltage fluctuation rate, power balance degree and system loss as the objective terms of the multi-objective optimization function, and taking the rated capacity of the device, the maximum allowable response time and the allowable fluctuation range of DC bus voltage as the constraint boundary.
[0082] A reinforcement learning algorithm is used to dynamically update the weight parameters in a multi-objective optimization model, and a model predictive control algorithm is used to solve the multi-objective optimization model in the prediction time domain to obtain a port characteristic optimization method.
[0083] Specifically, firstly, using the effective values of each harmonic spectral component (e.g., the effective values of the 2nd, 3rd, 5th, and 7th harmonic currents), the square root of the sum of the squares of the effective values of each harmonic is calculated according to the definition of total harmonic distortion (THD), and then divided by the effective value of the fundamental current to obtain the percentage form of the harmonic distortion rate (THD). Simultaneously, based on the collected voltage parameters, the maximum and minimum effective voltage values within one power frequency cycle (20ms) are extracted, and the difference between the two is calculated as a percentage of the nominal voltage to obtain the voltage fluctuation rate. For port impedance matching, the calculated current equivalent impedance (or admittance) of the device port is compared with the preset target impedance (or admittance), and the ratio of the absolute value of the deviation to the target value is taken. The smaller the ratio, the higher the matching degree. In actual optimization, it is usually desirable for the matching degree to approach 1, so the optimization objective can be set to maximize the matching degree or minimize the deviation. Power balance is mainly applied to multi-port scenarios and is defined as the deviation between the actual output power and the average power of each port. The smaller the deviation, the higher the balance. If it is a single-port scenario, this objective can be set to a constant. System losses are estimated based on the conduction losses and switching losses of the power switching devices inside the device, as well as the heat losses of passive components. These losses can be obtained by measuring the difference between the DC bus input power and the AC side output power. After obtaining the above five optimization indices, they are used as the objective terms of a multi-objective optimization function. The multi-objective optimization function typically uses a weighted sum form, where the overall fitness equals the sum of each objective term multiplied by its weight coefficient. Regarding boundary constraints, the rated capacity of the device limits the maximum reactive or active power output of the compensation device; the maximum permissible response time limits the upper limit of the time from detecting a load change to outputting the corresponding compensation amount, for example, 5ms; the permissible fluctuation range of the DC bus voltage is typically set to within ±5% of the set value. When constructing the multi-objective optimization model, these constraints are added to the optimization objective in the form of a penalty function, or as boundary conditions of the feasible region. Then, a reinforcement learning algorithm is used to dynamically update the weight parameters in the multi-objective optimization model. Reinforcement learning uses the current load fluctuation pattern and grid parameter perturbation state as the environment state, the adjustment of each weight parameter as the action, and the improvement in indicators such as THD and voltage fluctuation rate achieved after optimization as the reward. It iterates continuously through methods such as Q-learning or policy gradient, enabling the weight parameters to adapt to different operating conditions. For example, when a sudden increase in harmonic content is detected, reinforcement learning automatically increases the weight of the THD objective term, making the optimization more focused on harmonic suppression. Simultaneously, a model predictive control (MPC) algorithm is used to solve a multi-objective optimization model in the prediction time domain. MPC utilizes an established dynamic load feature library to predict the load current, harmonic spectrum, and voltage fluctuation trends for the next N steps (e.g., 5 steps, each corresponding to one power frequency cycle). At the current moment, MPC aims to minimize the overall fitness in the prediction time domain, considering constraints, and solves for a set of control sequences (including target equivalent impedance, control parameters, etc.) for the next N control cycles.Then, only the first control variable in the sequence is taken as the output of the port characteristic optimization method at the current moment. When the next sampling moment arrives, the prediction and solution are performed again to form a rolling optimization.
[0084] In this embodiment, power quality and adaptability are quantified by calculating total harmonic distortion (THD), voltage fluctuation rate, and port impedance matching. A multi-objective optimization model is constructed using a weighted sum of five objectives, and reinforcement learning is introduced to dynamically update the weights, enabling the optimization strategy to adapt to different disturbance modes. Combined with model predictive control and rolling solution, load changes are anticipated in advance, and an optimization sequence is generated. This method can simultaneously achieve harmonic suppression, voltage stabilization, impedance matching, power balancing, and loss reduction, while meeting capacity, response time, and bus voltage constraints, thereby reducing harmonic distortion, voltage fluctuation rate control, and response time.
[0085] In an exemplary embodiment, based on the port characteristic optimization method, an adaptive virtual impedance and variable structure control method is used to adjust the equivalent impedance or admittance parameters of the device port in real time, and an adaptive proportional-integral-derivative control method and a fuzzy neural network fusion method are used to tune the control parameters, including:
[0086] The port characteristic optimization method is analyzed to obtain the target equivalent impedance value and the target control parameter value;
[0087] Based on the difference between the target equivalent impedance value and the current equivalent impedance or admittance parameter, the injected value of the virtual impedance is calculated, and the working mode of the device port is switched by the variable structure control method so that the equivalent impedance or admittance parameter of the device port follows the change of the target equivalent impedance value.
[0088] The target control parameter values are used as the initial proportional coefficient, integral coefficient, and derivative coefficient of the adaptive proportional-integral-derivative control method, and the proportional coefficient, integral coefficient, and derivative coefficient are adjusted online using a fuzzy neural network fusion method.
[0089] Specifically, the port characteristic optimization method is first analyzed to extract two key outputs: the target equivalent impedance value (or target equivalent admittance value) and the target control parameter values (including proportional coefficient, integral coefficient, and derivative coefficient). The target equivalent impedance value represents the ideal impedance characteristics that the device port should exhibit under the current dynamic load conditions in order to achieve optimal compensation effect and meet the standards for harmonic distortion rate and voltage fluctuation rate; the target control parameter values provide the initial tuning reference for the subsequent PID controller.
[0090] After obtaining the target equivalent impedance value, the system needs to adjust the current equivalent impedance or admittance of the device port to the target value in real time. To this end, a collaborative strategy of adaptive virtual impedance control and variable structure control is adopted. The basic implementation of adaptive virtual impedance control is as follows: calculate the difference ΔZ between the target equivalent impedance value and the current actual equivalent impedance, and determine the virtual impedance value Z_vir to be injected based on the magnitude and direction of the difference. This virtual impedance is not a physical entity, but is achieved by modifying the voltage reference of the controller: for example, a compensation term proportional to the output current is superimposed on the reference voltage of the current inner loop, i.e., U_comp = Z_vir × I_out, causing the equivalent impedance presented by the device port to change. However, when the dynamic load undergoes drastic changes, relying solely on linear adjustment of the virtual impedance may result in a slow response. At this point, a variable structure control method is introduced: the variable structure control pre-designs multiple operating modes and sets switching conditions. When the difference between the target equivalent impedance value and the current actual value exceeds the threshold (e.g., the difference is greater than 50% of the rated impedance) or the load current change rate exceeds the set value (e.g., di / dt > 100A / ms), the variable structure control forces the device port to switch from one working mode to another mode that is closer to the target value instantly, so that the equivalent impedance first jumps to near the target value, and then is finely adjusted through adaptive virtual impedance.
[0091] For control parameter tuning, after parsing the target control parameter values (including initial proportional coefficient Kp0, initial integral coefficient Ki0, and initial derivative coefficient Kd0) from the port characteristic optimization method, these initial values are assigned to the adaptive proportional-integral-derivative (PID) controller. Traditional PID controllers struggle to adapt to time-varying dynamic loads when these initial coefficients are fixed; therefore, a fuzzy neural network method is further integrated for online adjustment. The fuzzy neural network transforms the PID coefficient tuning process into a multi-input, multi-output fuzzy inference and neural network learning problem: using the deviation e between the actual output harmonic distortion rate and the target value, and the rate of change of the deviation ec, as input variables, the inputs pass through a fuzzification layer (converting precise quantities into membership function values), a rule layer (calculating the activation strength of each rule based on a preset fuzzy rule base), a normalization layer, and a defuzzification layer, ultimately outputting the adjustment amounts ΔKp, ΔKi, and ΔKd of the proportional, integral, and derivative coefficients. The neural network part continuously updates the membership function parameters (such as the mean and variance of the Gaussian function) in the fuzzification layer and the connection weights in the rule layer through online learning, so that the tuning rules can be adaptively optimized according to the actual running results.
[0092] In this embodiment, the target equivalent impedance value and initial PID coefficients are obtained through analytical optimization. A collaborative strategy of virtual impedance and variable structure control is used to ensure the port equivalent impedance follows the target value, effectively matching millisecond-level dynamic loads. Simultaneously, a fuzzy neural network is used to adjust the proportional, integral, and derivative coefficients online, enabling the PID controller to adapt to grid perturbations and load mutations. This achieves rapid dynamic matching of port impedance and load, eliminates over-compensation and under-compensation phenomena, and improves the circulating current suppression rate.
[0093] In one exemplary embodiment, the method further includes:
[0094] In multi-port power sharing scenarios, obtain the real-time power parameters, current parameters, and impedance parameters of each port;
[0095] With the goal of suppressing circulating current between ports and minimizing power distribution deviation, the port characteristic optimization methods and power mutual assistance commands of each port are coordinated to generate consistent adjustment amounts for each port.
[0096] The consistency adjustment amount is added to the port characteristic optimization method of each port and synchronously distributed to the real-time control execution unit of each port.
[0097] Specifically, in multi-port power sharing scenarios, such as three-phase interconnection or the coordinated operation of new energy grid connection and energy storage systems, the real-time power parameters (active power and reactive power), current parameters (amplitude and phase of each phase current), and equivalent impedance parameters of each port are first obtained through independent high-speed sampling units at each port. These parameters are then aggregated into a distributed collaborative optimization module in the adaptive optimization control unit. This module aims to minimize circulating current suppression and power allocation deviation between ports. Circulating current refers to the reactive or active circulating current formed between ports due to inconsistencies in the output voltage amplitude, phase, or equivalent impedance of each port. Its existence significantly increases system losses and reduces power sharing efficiency. Power allocation deviation reflects the difference between the actual power carried by each port and the expected allocation command. The specific execution process of collaborative optimization is as follows: First, based on the real-time current parameters of each port, the circulating current components between each pair of ports are calculated. For example, the circulating current amplitude and phase are extracted by decomposing the current of each port into common-mode and differential-mode components. Simultaneously, the power allocation deviation is calculated based on the power sharing command and the current actual power of each port. Then, a collaborative optimization model is constructed. This model aims to minimize the sum of circulating current amplitudes and the sum of power allocation deviations, while using the capacity constraints of each port and the equivalent impedance adjustment range as constraints. To coordinate the port characteristic optimization methods and power mutual assistance commands of each port, the distributed collaborative optimization module adopts a consensus algorithm: each port is treated as a multi-agent system, and each port iteratively updates the consensus adjustment amount based on its own state and information from neighboring ports (through communication network interaction). Based on this, the collaborative optimization module calculates the additional impedance adjustment or voltage compensation amount required for each port according to the magnitude and direction of the circulating current. For example, for ports where circulating current flows in, a positive-sequence virtual impedance is added to suppress the circulating current; for ports where circulating current flows out, a negative-sequence virtual impedance is added. At the same time, based on the power allocation deviation, the additional active / reactive power compensation amount required for each port is calculated. The above impedance adjustment amount and power compensation amount are weighted and merged to generate the consensus adjustment amount for each port. This adjustment amount is applied to the original port characteristic optimization method of each port in a superimposed manner, that is, the updated port characteristic optimization method is equal to the original optimization method plus the consensus adjustment amount. Finally, the updated optimization method is synchronously distributed to the real-time control execution unit of each port, and each port independently executes the adaptive virtual impedance and variable structure control adjustment.
[0098] In this embodiment, by acquiring the real-time power, current and impedance parameters of each port, and taking the suppression of circulating current and the minimization of power distribution deviation as the common goals, a consensus algorithm is used to generate a consensus adjustment amount and superimpose it on the independent optimization strategy of each port. This can effectively suppress the circulating current between ports, achieve balanced power distribution, significantly improve the power mutual assistance efficiency, and reduce the total system loss.
[0099] In one exemplary embodiment, the method further includes:
[0100] The actual harmonic distortion rate and voltage fluctuation rate output by the real-time acquisition device port are compared with the target values of harmonic distortion rate and voltage fluctuation rate in the optimization target, and the deviation is calculated.
[0101] When the deviation exceeds the preset threshold, or when grid parameter perturbation or load disturbance mode changes are detected, the control parameters are retuned online using an adaptive proportional-integral-derivative control method combined with a fuzzy neural network method.
[0102] Specifically, in the closed-loop self-correction process, the actual output voltage and current of the power quality flexible compensation device are first collected in real time by a high-speed sampling unit, and the actual output harmonic distortion rate (THD_actual) and voltage fluctuation rate (Vflicker_actual) are calculated. These two actual values are compared item by item with the target values for harmonic distortion rate (THD_target, e.g., 5%) and voltage fluctuation rate (Vflicker_target, e.g., ±1%) set in the optimization objectives, and the deviations ΔTHD = THD_actual - THD_target and ΔVflicker = Vflicker_actual - Vflicker_target are calculated. The system pre-sets a set of deviation thresholds; for example, if ΔTHD exceeds 2% or ΔVflicker exceeds 0.5%, the performance is considered substandard. At the same time, the system also continuously monitors changes in grid parameters (such as a sudden increase or decrease in the grid's equivalent impedance) and changes in load disturbance modes (such as switching from smooth fluctuations to severe impacts). When any of the above conditions are triggered, the system automatically enters the online retuning process. This process employs an adaptive proportional-integral-derivative (PID) control method combined with a fuzzy neural network, but instead of starting the tuning from scratch, it incrementally adjusts the control parameters based on the current operating state. Specifically, the current actual deviations ΔTHD and ΔVflicker, along with their rates of change, are used as inputs to the fuzzy neural network. After fuzzification, rule-based reasoning, and defuzzification, the adjustment step sizes ΔKp, ΔKi, and ΔKd of the PID coefficients (proportional, integral, and derivative) are output. The coefficients of the current controller are then updated, enabling the device to meet the optimization target requirements again in the shortest possible time.
[0103] In this embodiment, the actual output harmonic distortion rate and voltage fluctuation rate are collected in real time and compared with the target values. When the deviation exceeds the threshold or grid perturbation or load mode change is detected, the system automatically triggers online retuning of the control parameters using adaptive PID and fuzzy neural network. This closed-loop self-correction mechanism can continuously track and correct compensation deviations, ensuring that the harmonic distortion rate and voltage fluctuation rate always meet the standards, effectively suppressing performance degradation caused by external disturbances, and significantly improving the robustness and long-term operational stability of the system.
[0104] The most detailed embodiment of this application is as follows:
[0105] refer to Figure 3 The hardware system in this embodiment is a three-port power quality flexible compensation device, with the following topology: The device includes three AC ports, which are connected to three independent distribution network feeders or transformer substations, namely Grid1, Grid2, and Grid3. Each port is equipped with two access points: one on the grid side and one on the load side. Taking port 1 as an example, the grid-side power P1s+jQ1s is drawn from Grid1, and after internal processing, the power P1i+jQ1i is output on the load side to supply the local dynamic load. Each port is equipped with three-phase voltage and current sampling points: Ua1 and Uab1 represent the phase voltage of phase A and the line voltage of line AB, respectively, and Ia1, Ib1, and Ic1 represent the three-phase current sampling signals, which are used to collect electrical parameters on the grid side and the load side in real time. Each port contains a filter inductor La (used to filter switching ripple) and a three-phase inverter bridge (represented by the IGBT symbol in the diagram) composed of power switching devices. The DC side of the inverter bridge converges to a common DC bus. The DC buses of each port are labeled Udc1, Udc2, and Udc3, respectively, and the DC bus currents Idc1, Idc2, and Idc3 reflect the direction and magnitude of power flow between each port and the DC bus. The DC buses of each port are directly connected in parallel with conductors to form a unified DC bus voltage platform (theoretically, Udc1=Udc2=Udc3), enabling bidirectional exchange of active power between ports and achieving power mutual assistance. On the AC output side of each port, a power mutual assistance path is also provided. In the diagram, P11+jQ11 and P21+jQ21 represent the power distribution relationship at different nodes within the port. Specifically, the device controls the output voltage amplitude and phase of each port inverter to adjust the power flowing from the grid to the device (P1s+jQ1s) and the power flowing from the device to the load side (P1i+jQ1i). The difference between the two (P1s-P1i) is balanced across ports via the DC bus: if the local load demand at port 1 exceeds the grid input, the insufficient power is supplemented by ports 2 and 3 through the DC bus; conversely, if the grid input at port 1 exceeds the local load, the excess power is transmitted to other ports via the DC bus. A multi-channel high-speed sampling unit is equipped with voltage and current sensors on each phase, and the sampled data is sent to an adaptive optimization control unit composed of FPGA+DSP. The drive unit drives the IGBT switches of each port inverter according to the PWM signal generated by the control unit, achieving precise control of the port equivalent impedance, output voltage, and current.
[0106] like Figure 4As shown, the control architecture adopts a three-layer closed-loop adaptive optimization control architecture, including a port characteristic identification layer, a dynamic optimization decision layer, and a real-time control execution layer. The identification layer outputs data for the decision layer to build an optimization model, and the strategy generated by the decision layer is implemented by the execution layer. At the same time, the actual effect of the execution layer is fed back to the identification layer through a feedback loop, forming a closed loop.
[0107] First, perform a real-time identification step, such as... Figure 5 As shown on the left, a sliding window Fast Fourier Transform (FFT) and Recursive Least Squares (RLS) algorithm are used. The window length of the sliding window FFT is adaptively set according to the dynamic load characteristics: for rolling mill impact loads, the window length is set to 10ms (half a power frequency cycle) to capture millisecond-level changes; for loads with slower fluctuations, such as electric arc furnaces, the window is set to 20ms. Within each window, the voltage and current sampling sequences are subjected to FFT after adding a Hanning window to extract the amplitude and phase of each harmonic and record the change of the fundamental amplitude over time, thereby obtaining the fluctuation frequency and amplitude of the dynamic load. At the same time, the RLS algorithm takes the instantaneous voltage u(n) and instantaneous current i(n) of the device port as input, and the forgetting factor can be set to 0.99 to recursively update the parameter estimation vector and calculate the equivalent resistance, equivalent inductance, or equivalent admittance of the port in real time. The identification results are stored in the dynamic load feature database.
[0108] Next, as attached Figure 5 As shown on the right, based on the identified harmonic spectrum and the collected voltage and current parameters, the total harmonic distortion (THD, the square root of the sum of the squares of the effective values of each harmonic divided by the fundamental effective value) and voltage fluctuation rate (the maximum fluctuation of the effective voltage value within one power frequency cycle divided by the nominal voltage) are calculated. The port impedance matching degree is determined according to the deviation between the current port equivalent impedance and the preset target impedance. In multi-port scenarios, the power balance (the deviation of the power of each port from the average power) and system loss (the difference between the DC bus input and AC output power) are also calculated. Using these five indicators as optimization objectives, and with the device rated capacity (not exceeding 120%), response time (≤5ms), and DC bus voltage fluctuation (±5%) as constraints, a weighted sum-form multi-objective optimization model is constructed. A reinforcement learning algorithm is used to dynamically update the weights of each objective in the model: the current load fluctuation mode and grid parameters are taken as states, the weight adjustment is taken as actions, and the improvement of actual THD and voltage fluctuation rate is taken as rewards. Through Q-learning iteration, the weights are made to adapt to different operating conditions. Simultaneously, Model Predictive Control (MPC) is adopted to predict the load disturbance in the next N steps (e.g., 5 power frequency cycles) based on the dynamic load characteristic library. The multi-objective optimization problem is solved in the prediction time domain to obtain the optimal control sequence. The first control variable is taken as the port characteristic optimization method at the current moment. This optimization method includes the target equivalent impedance value and the target control parameter value (initial PID coefficient).
[0109] Then it enters the real-time control execution phase, such as Figure 6 As shown, based on the target equivalent impedance value in the port characteristic optimization method, an adaptive virtual impedance and variable structure control collaborative strategy is adopted. The difference ΔZ between the target impedance and the current actual impedance is calculated, and a virtual impedance injection value Z_vir is generated. The equivalent impedance is linearly adjusted by modifying the voltage reference. When a drastic change in load is detected and ΔZ exceeds the preset threshold, the variable structure control forces a switch in the operating mode of the device port (e.g., from voltage source mode to current source mode), causing the equivalent impedance to quickly step to near the target value. Then, the adaptive virtual impedance is used for fine-tuning, with a total adjustment time of no more than 5ms. Simultaneously, the target PID coefficient is used as the initial value, and the control parameters are tuned online using a fusion method of adaptive proportional-integral-derivative (PID) control and fuzzy neural network. The fuzzy neural network takes the deviation e between the actual output THD and the target value and its rate of change ec as input. After fuzzification, rule reasoning, and defuzzification, it outputs the PID coefficient adjustment amounts ΔKp, ΔKi, and ΔKd, updating the controller parameters in real time to maintain the optimal compensation performance of the device.
[0110] For multi-port power mutual assistance scenarios, this embodiment also includes distributed collaborative optimization: real-time power, current and impedance parameters of each port are obtained, and the collaborative goal is to minimize the circulating current suppression and power distribution deviation between ports. A consensus adjustment amount is generated for each port through a consensus algorithm, and the adjustment amount is superimposed on the port characteristic optimization method of each port and synchronously sent to the real-time control execution unit of each port.
[0111] refer to Figure 7 This figure shows a comparison of voltage harmonic distortion rates. Two sets of waveforms are displayed side-by-side: the left side represents the control group, corresponding to the condition where the adaptive port adjustment function of this solution is disabled; the voltage and current waveforms exhibit significant distortion and high harmonic content. The right side represents the experimental group, corresponding to the condition where the adaptive port adjustment function of this solution is enabled; the voltage and current waveforms show good sinusoidal characteristics, a significantly reduced harmonic distortion rate, and a noticeably narrowed voltage fluctuation range. The comparison demonstrates that this solution can effectively suppress voltage flicker and harmonic amplification, and improve port impedance matching.
[0112] refer to Figure 8 The figure shows the effect of the multi-port active power mutual assistance function. The upper part of the figure shows the current waveforms of each port when using the traditional independent optimization strategy. The three curves have large differences in amplitude and phase shift, indicating that there is obvious power imbalance and circulating current between the ports. The lower part shows the current waveforms of each port after adopting the collaborative optimization strategy of this scheme. The amplitudes of the three curves tend to be consistent and the phases are synchronized, indicating that the circulating current is effectively suppressed, the power distribution tends to be balanced, the power mutual assistance efficiency is significantly improved, and the system loss is reduced accordingly.
[0113] refer to Figure 9 This figure compares the control response speeds. It shows the response waveforms under two control strategies when the command value undergoes a step change: the response curve of traditional PID control rises slowly, exhibits significant overshoot and oscillations, and takes a long time to reach steady state; the response curve of the proposed adaptive PID and fuzzy neural network fusion control rises rapidly, has small overshoot, and can track the command value and enter steady state more quickly. The comparison shows that the control response speed of this scheme is significantly better than that of traditional PID control.
[0114] refer to Figure 10 This diagram illustrates the multi-functional power quality management approach. It includes three sets of curves: the first set shows the load harmonic current waveform, revealing distorted load current; the second set shows the bus current waveform after traditional single-objective optimization, where harmonic components are suppressed to some extent, but reactive power components still exist; the third set shows the bus current waveform after multi-objective optimization in this proposed solution, exhibiting a higher sinusoidal current waveform, indicating that reactive power compensation and power balance are achieved simultaneously while suppressing harmonics. The comparison demonstrates that this solution can simultaneously address multiple power quality management objectives, resulting in a superior overall performance compared to single-objective optimization.
[0115] refer to Figure 11 The figure shows a comparison of the total harmonic distortion (THD) of the current under parameter perturbation. It illustrates the THD curves over time under two control methods when system parameters are perturbed (e.g., sudden changes in active power load): the THD curve corresponding to the traditional control method exhibits a sharp spike at the moment of disturbance and recovers slowly; the THD curve corresponding to this scheme only shows small instantaneous fluctuations and can quickly recover to below the target value. The comparison demonstrates that the closed-loop self-correction mechanism of this scheme can effectively suppress the performance degradation caused by parameter perturbation, significantly improving system robustness.
[0116] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0117] Based on the same inventive concept, this application also provides a power quality flexible compensation device port characteristic optimization device for implementing the aforementioned power quality flexible compensation device port characteristic optimization method. The solution provided by this device is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more power quality flexible compensation device port characteristic optimization device embodiments provided below can be found in the limitations of the power quality flexible compensation device port characteristic optimization method described above, and will not be repeated here.
[0118] In one exemplary embodiment, such as Figure 12 As shown, a power quality flexible compensation device port characteristic optimization device is provided, comprising:
[0119] The parameter acquisition and identification module 1202 is used to simultaneously acquire voltage and current parameters on the grid side and the load side. Based on the sliding window fast Fourier transform and recursive least squares algorithm, it identifies the harmonic spectrum of the dynamic load and calculates the equivalent impedance or admittance parameters of the device port.
[0120] The multi-objective optimization module 1204 is used to calculate the harmonic distortion rate and voltage fluctuation rate based on the identified harmonic spectrum and the collected voltage and current parameters. It constructs a multi-objective optimization model with port impedance matching, harmonic distortion rate, voltage fluctuation rate, power balance and system loss as optimization objectives, and capacity, response time and DC bus voltage stability as constraints, and solves the port characteristic optimization method.
[0121] The dynamic adjustment and control module 1206 is used to adjust the equivalent impedance or admittance parameters of the device port in real time according to the port characteristic optimization method, using an adaptive virtual impedance and variable structure control method, and to tune the control parameters using an adaptive proportional-integral-derivative control method and a fuzzy neural network fusion method.
[0122] In an exemplary embodiment, the parameter acquisition and identification module 1202 is specifically used to perform windowing and truncation processing on the synchronously acquired voltage and current parameters using a sliding window fast Fourier transform, extracting the dynamic load fluctuation frequency, fluctuation amplitude, and harmonic spectrum components within each time window; and using a recursive least squares algorithm, taking the instantaneous voltage and instantaneous current parameters of the device port as input variables, iteratively updating the estimation matrix, and calculating the equivalent resistance, equivalent inductance, or equivalent admittance of the device port.
[0123] In an exemplary embodiment, the multi-objective optimization module 1204 is specifically used to calculate the total harmonic distortion rate based on the identified harmonic spectral components; calculate the fluctuation range of the effective voltage value based on the collected voltage parameters to obtain the voltage fluctuation rate; determine the port impedance matching degree based on the deviation between the equivalent impedance or admittance parameter of the device port and the preset target impedance value; use the port impedance matching degree, harmonic distortion rate, voltage fluctuation rate, power balance, and system loss as the objective terms of the multi-objective optimization function, and use the device rated capacity, maximum allowable response time, and allowable fluctuation range of DC bus voltage as the constraint boundaries to construct a multi-objective optimization model; use a reinforcement learning algorithm to dynamically update the weight parameters in the multi-objective optimization model, and use a model predictive control algorithm to solve the multi-objective optimization model in the prediction time domain to obtain the port characteristic optimization method.
[0124] In an exemplary embodiment, the dynamic adjustment and control module 1206 is specifically used to analyze the port characteristic optimization method to obtain the target equivalent impedance value and the target control parameter value; calculate the virtual impedance injection value based on the difference between the target equivalent impedance value and the current equivalent impedance or admittance parameter; switch the working mode of the device port through a variable structure control method so that the equivalent impedance or admittance parameter of the device port follows the change of the target equivalent impedance value; use the target control parameter value as the initial proportional coefficient, integral coefficient, and derivative coefficient of the adaptive proportional-integral-derivative control method; and use a fuzzy neural network fusion method to adjust the proportional coefficient, integral coefficient, and derivative coefficient online.
[0125] In an exemplary embodiment, the dynamic adjustment and control module 1206 is further configured to acquire the real-time power parameters, current parameters, and impedance parameters of each port in a multi-port power mutual assistance scenario; coordinate the port characteristic optimization methods and power mutual assistance commands of each port with the goal of minimizing inter-port circulating current suppression and power distribution deviation, and generate a consistency adjustment amount for each port; superimpose the consistency adjustment amount into the port characteristic optimization methods of each port, and synchronously send it to the real-time control execution unit of each port.
[0126] In an exemplary embodiment, the dynamic adjustment and control module 1206 is further configured to collect the actual harmonic distortion rate and voltage fluctuation rate output from the device port in real time, compare them with the target values of harmonic distortion rate and voltage fluctuation rate in the optimization target, and calculate the deviation. When the deviation exceeds the preset threshold, or when grid parameter perturbation or load disturbance mode changes are detected, the control parameters are retuned online using an adaptive proportional-integral-derivative control method and a fuzzy neural network fusion method.
[0127] Each module in the aforementioned power quality flexible compensation device port characteristic optimization device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0128] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 13 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores voltage and current parameters from the power grid and load sides. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a method for optimizing the port characteristics of a power quality flexible compensation device.
[0129] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0130] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.
[0131] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0132] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method described above.
[0133] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0134] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0135] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0136] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for optimizing port characteristics of a power quality flexible compensation device, characterized in that, The method includes: The voltage and current parameters of the grid side and the load side are collected simultaneously. Based on the sliding window fast Fourier transform and recursive least squares algorithm, the harmonic spectrum of the dynamic load is identified, and the equivalent impedance or admittance parameters of the device port are calculated. Based on the identified harmonic spectrum and the collected voltage and current parameters, the harmonic distortion rate and voltage fluctuation rate are calculated. Using port impedance matching, the harmonic distortion rate, the voltage fluctuation rate, power balance and system loss as optimization objectives, and capacity, response time and DC bus voltage stability as constraints, a multi-objective optimization model is constructed and the port characteristic optimization method is obtained by solving it. Based on the port characteristic optimization method, an adaptive virtual impedance and variable structure control method is adopted to adjust the equivalent impedance or admittance parameters of the device port in real time, and an adaptive proportional-integral-derivative control method and a fuzzy neural network fusion method are used to tune the control parameters.
2. The method according to claim 1, characterized in that, The synchronous acquisition of voltage and current parameters from the grid and load sides, based on the sliding window fast Fourier transform and recursive least squares algorithm, identifies the harmonic spectrum of the dynamic load and calculates the equivalent impedance or admittance parameters of the device ports, including: A sliding window fast Fourier transform was used to window and truncate the synchronously acquired voltage and current parameters, and the dynamic load fluctuation frequency, fluctuation amplitude and harmonic spectrum components within each time window were extracted. The recursive least squares algorithm is used, with the instantaneous voltage and current parameters of the device port as input variables, to iteratively update the estimation matrix and calculate the equivalent resistance, equivalent inductance or equivalent admittance of the device port.
3. The method according to claim 1, characterized in that, Based on the identified harmonic spectrum and the collected voltage and current parameters, the harmonic distortion rate and voltage fluctuation rate are calculated. Using port impedance matching, the harmonic distortion rate, the voltage fluctuation rate, power balance, and system losses as optimization objectives, and capacity, response time, and DC bus voltage stability as constraints, a multi-objective optimization model is constructed and solved to obtain the port characteristic optimization method, including: The total harmonic distortion rate is calculated based on the identified harmonic spectral components; the voltage fluctuation rate is obtained by calculating the fluctuation range of the effective voltage value based on the collected voltage parameters. The port impedance matching degree is determined based on the deviation between the equivalent impedance or admittance parameter of the device port and the preset target impedance value. The port impedance matching degree, harmonic distortion rate, voltage fluctuation rate, power balance degree and system loss are used as the objective terms of the multi-objective optimization function, and the rated capacity of the device, the maximum allowable response time and the allowable fluctuation range of the DC bus voltage are used as the constraint boundaries to construct a multi-objective optimization model. A reinforcement learning algorithm is used to dynamically update the weight parameters in the multi-objective optimization model, and a model predictive control algorithm is used to solve the multi-objective optimization model in the prediction time domain to obtain a port characteristic optimization method.
4. The method according to claim 1, characterized in that, The optimization method based on the port characteristics employs an adaptive virtual impedance and variable structure control method to adjust the equivalent impedance or admittance parameters of the device port in real time, and uses an adaptive proportional-integral-derivative control method combined with a fuzzy neural network to tune the control parameters, including: The port characteristic optimization method is analyzed to obtain the target equivalent impedance value and the target control parameter value; Based on the difference between the target equivalent impedance value and the current equivalent impedance or admittance parameter, the injected value of the virtual impedance is calculated, and the working mode of the device port is switched by a variable structure control method so that the equivalent impedance or admittance parameter of the device port follows the change of the target equivalent impedance value. The target control parameter values are used as the initial proportional coefficient, integral coefficient, and derivative coefficient of the adaptive proportional-integral-derivative control method, and the proportional coefficient, integral coefficient, and derivative coefficient are adjusted online using a fuzzy neural network fusion method.
5. The method according to claim 1, characterized in that, The method further includes: In multi-port power sharing scenarios, obtain the real-time power parameters, current parameters, and impedance parameters of each port; With the goal of suppressing circulating current between ports and minimizing power distribution deviation, the port characteristic optimization methods and power mutual assistance commands of each port are coordinated to generate consistent adjustment amounts for each port. The consistency adjustment amount is superimposed on the port characteristic optimization method of each port and synchronously distributed to the real-time control execution unit of each port.
6. The method according to claim 1, characterized in that, The method further includes: The harmonic distortion rate and voltage fluctuation rate actually output by the real-time acquisition device port are compared with the target values of harmonic distortion rate and voltage fluctuation rate in the optimization target, respectively, and the deviation is calculated. When the deviation exceeds a preset threshold, or when grid parameter perturbation or load disturbance mode changes are detected, the control parameters are retuned online using an adaptive proportional-integral-derivative control method combined with a fuzzy neural network method.
7. A port characteristic optimization device for a power quality flexible compensation device, characterized in that, The device includes: The parameter acquisition and identification module is used to simultaneously acquire voltage and current parameters from the grid side and the load side. Based on the sliding window fast Fourier transform and recursive least squares algorithm, it identifies the harmonic spectrum of the dynamic load and calculates the equivalent impedance or admittance parameters of the device port. The multi-objective optimization module is used to calculate the harmonic distortion rate and voltage fluctuation rate based on the identified harmonic spectrum and the collected voltage and current parameters. It uses port impedance matching, the harmonic distortion rate, the voltage fluctuation rate, power balance and system loss as optimization objectives, and capacity, response time and DC bus voltage stability as constraints to construct a multi-objective optimization model and solve it to obtain the port characteristic optimization method. The dynamic adjustment and control module is used to adjust the equivalent impedance or admittance parameters of the device port in real time according to the port characteristic optimization method, using an adaptive virtual impedance and variable structure control method, and to tune the control parameters using an adaptive proportional-integral-derivative control method and a fuzzy neural network fusion method.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.