A method and system for tuning PI controller parameters of a compensator
Patent Information
- Application Number
- CN202611051050.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-08-18
AI Technical Summary
[0004]本发明提供了一种补偿装置的PI控制器参数整定方法及系统,解决了现有PI控制器参数整定方法难以适配有源补偿装置复杂多变的运行工况,无法满足装置的综合控制需求,致使控制效果不佳的技术问题
[0042]This invention provides a method and system for tuning PI controller parameters of a compensation device. By building a simulation model of the compensation device's control system, a multi-objective comprehensive optimization function adapted to the device's operational requirements is constructed. A multi-stage optimization approach is then used to solve this function to obtain the optimal PI controller parameters. These optimal parameters are then input into the simulation model for offline verification and performance evaluation in multiple scenarios. The optimal parameters are only output when the evaluation results meet preset conditions. This invention precisely addresses the technical problems of existing PI controller parameter tuning methods, which struggle to adapt to the complex and variable operating conditions of active compensation devices, fail to meet the device's comprehensive control requirements, and result in poor control performance. The simulation model construction achieves accurate simulation of the compensation device's operating scenarios, providing a realistic basis for parameter tuning. The construction of the multi-objective comprehensive optimization function comprehensively considers various core operating conditions of the device. To meet the control requirements of the device and avoid control imbalance caused by single-objective optimization, a multi-stage optimization solution effectively overcomes the limitations of traditional single optimization methods, improves the robustness and adaptability of parameter tuning, and can better cope with the complex operating conditions of nonlinear and time-varying devices. The multi-scenario offline verification and performance evaluation steps further ensure that the optimal PI controller parameters can function stably under different operating scenarios, effectively avoiding the problem of control performance degradation under specific operating conditions. Finally, through the closed-loop process of optimization-verification-standard output, the control performance of the PI controller is improved, enabling the compensation device to maintain an ideal control state under complex and variable operating conditions, fully meeting the comprehensive control requirements of the device, solving the problem of poor control effect caused by existing methods, and thus improving the application effect of active compensation devices in power quality management.
Smart Images

Figure CN122592793A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power compensation device control and optimization technology, and in particular to a method and system for tuning the parameters of a PI controller for a compensation device. Background Technology
[0002] With the continuous advancement of power system electrification, the widespread integration of nonlinear and impulsive loads, and the large-scale grid connection of new energy power generation have made power quality disturbances increasingly prominent, posing a serious threat to the continuous and stable operation of various sensitive loads. Power electronic active compensation devices, represented by Dynamic Voltage Restorer (DVR), Static Var Generator (SVG), and Active Power Filter (APF), are core equipment for addressing power quality issues and ensuring the reliability of the power grid. Their control performance directly determines the effectiveness of power quality management. Due to their simple structure and low engineering implementation difficulty, PI controllers have become the mainstream control unit in the closed-loop control systems of various active compensation devices.
[0003] In practical engineering applications, the operating conditions of active power compensation devices exhibit significant nonlinear and time-varying characteristics, placing extremely high demands on the parameter tuning of PI controllers. Existing PI controller parameter tuning methods mainly include traditional tuning methods and single intelligent optimization tuning methods, but both have significant shortcomings. For example, traditional tuning methods either heavily rely on the subjective experience of engineers, resulting in poor versatility and consistency; or they are highly dependent on the precise mathematical model of the controlled object, making it difficult to adapt to the time-varying parameters and operating condition fluctuations of actual systems. While single intelligent optimization tuning methods have overcome the limitations of traditional methods to some extent, they still suffer from insufficient adaptability and weak robustness when facing complex operating conditions, making it difficult to fully meet the comprehensive control requirements of active power compensation devices. Summary of the Invention
[0004] This invention provides a method and system for tuning the parameters of a PI controller for a compensation device, which solves the technical problem that existing PI controller parameter tuning methods are difficult to adapt to the complex and ever-changing operating conditions of active compensation devices, and cannot meet the comprehensive control requirements of the device, resulting in poor control performance.
[0005] The first aspect of the present invention provides a method for tuning the PI controller parameters of a compensation device, comprising:
[0006] A simulation model of the compensation device control system is built, and a multi-objective comprehensive optimization function for the simulation model of the compensation device control system is constructed.
[0007] The multi-objective integrated optimization function is solved through multi-stage optimization to obtain the optimal PI controller parameters;
[0008] The optimal PI controller parameters are input into the simulation model of the compensation device control system to perform offline verification and performance evaluation in multiple scenarios, and performance evaluation indicators are generated.
[0009] When the performance evaluation index meets the preset performance evaluation conditions, the optimal PI controller parameters are output.
[0010] Optionally, the step of performing multi-stage optimization on the multi-objective integrated optimization function to obtain the optimal PI controller parameters includes:
[0011] The fitness function is constructed using the multi-objective integrated optimization function.
[0012] Based on the genetic algorithm, a target population is constructed using the PI controller parameters to be optimized as individuals. The fitness function is used to iteratively optimize the target population until convergence, and a global optimization solution set is obtained.
[0013] Based on the particle swarm optimization algorithm, the multi-objective comprehensive optimization function is used to perform local fine optimization on the global optimal solution set to obtain a local quasi-optimal solution set.
[0014] Based on the thinking burst algorithm, the multi-objective comprehensive optimization function is used to perform global deep optimization on the local quasi-optimal solution set to obtain the optimal PI controller parameters.
[0015] Optionally, the step of using the optimal PI controller parameters to input the simulation model of the compensation device control system for multi-scenario offline verification and performance evaluation, and generating performance evaluation indicators, includes:
[0016] The optimal PI controller parameters are input into the simulation model of the compensation device control system to perform offline verification in multiple scenarios, and the verification results for multiple scenarios are obtained.
[0017] The performance evaluation results of the multi-scenario verification are quantified to obtain performance evaluation indicators.
[0018] Optionally, the performance evaluation indicators include disturbance response time, compensation parameter steady-state error, and control execution energy consumption; the preset performance evaluation conditions include the disturbance response time being less than or equal to a preset time threshold, the compensation parameter steady-state error being within a preset rated setpoint percentage range, and the control execution energy consumption being less than or equal to a preset energy consumption threshold.
[0019] Optionally, it also includes:
[0020] The optimal PI controller parameters are deployed to the actual controller of the compensation device, and the PI controller parameters are adaptively fine-tuned based on the real-time operating status of the compensation device.
[0021] Optionally, the step of deploying the optimal PI controller parameters to the actual controller of the compensation device and adaptively fine-tuning the PI controller parameters based on the real-time operating status of the compensation device includes:
[0022] The optimal PI controller parameters are deployed to the actual controller of the compensation device, and the real-time operating status characteristics of the compensation device are obtained.
[0023] Construct a target state feature vector based on the real-time operating state characteristics;
[0024] Calculate the target mean of the target state feature vector based on a preset sliding time window;
[0025] Calculate the Euclidean norm between the target mean and the baseline eigenvector at the time of the previous successful tuning;
[0026] When the Euclidean norm is greater than the preset norm threshold, a parameter neighborhood trust domain is set with the optimal PI controller parameter as the parameter center.
[0027] The weight coefficients of the multi-objective comprehensive optimization function are dynamically adjusted based on the real-time operating status characteristics to obtain the updated multi-objective comprehensive optimization function;
[0028] A pattern search method is used to perform local fast optimization within the parameter neighborhood trust domain based on the updated multi-objective comprehensive optimization function to generate a candidate PI controller parameter set.
[0029] The performance of the candidate PI controller parameter set is evaluated based on the updated multi-objective comprehensive optimization function, and the optimal candidate PI controller parameters are selected.
[0030] The optimal candidate PI controller parameters are updated to the actual controller in a gradual manner, and the stability of the target power system connected to the compensation device, as well as the disturbance response time, steady-state error of the compensation parameters and control execution energy consumption of the target power system are monitored within a preset check interval.
[0031] If the verification passes, the baseline feature vector is updated;
[0032] If the verification fails, the system will roll back to the original optimal PI controller parameters and increase the preset norm threshold or extend the preset check interval.
[0033] A second aspect of the present invention provides a PI controller parameter tuning system for a compensation device, comprising:
[0034] A construction module is used to build a simulation model of the compensation device control system and to construct a multi-objective comprehensive optimization function for the simulation model of the compensation device control system.
[0035] The solution module is used to perform multi-stage optimization of the multi-objective integrated optimization function to obtain the optimal PI controller parameters;
[0036] The evaluation module is used to perform multi-scenario offline verification and performance evaluation on the simulation model of the compensation device control system using the optimal PI controller parameters as input, and to generate performance evaluation indicators.
[0037] The output module is used to output the optimal PI controller parameters when the performance evaluation index meets the preset performance evaluation conditions.
[0038] A third aspect of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the PI controller parameter tuning method of the compensation device as described above.
[0039] The fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed, it implements the PI controller parameter tuning method of the compensation device as described above.
[0040] The fifth aspect of the present invention provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein, when the program instructions are executed by a computer, the computer performs the PI controller parameter tuning method of the compensation device as described above.
[0041] As can be seen from the above technical solutions, the present invention has the following advantages:
[0042] This invention provides a method and system for tuning PI controller parameters of a compensation device. By building a simulation model of the compensation device's control system, a multi-objective comprehensive optimization function adapted to the device's operational requirements is constructed. A multi-stage optimization approach is then used to solve this function to obtain the optimal PI controller parameters. These optimal parameters are then input into the simulation model for offline verification and performance evaluation in multiple scenarios. The optimal parameters are only output when the evaluation results meet preset conditions. This invention precisely addresses the technical problems of existing PI controller parameter tuning methods, which struggle to adapt to the complex and variable operating conditions of active compensation devices, fail to meet the device's comprehensive control requirements, and result in poor control performance. The simulation model construction achieves accurate simulation of the compensation device's operating scenarios, providing a realistic basis for parameter tuning. The construction of the multi-objective comprehensive optimization function comprehensively considers various core operating conditions of the device. To meet the control requirements of the device and avoid control imbalance caused by single-objective optimization, a multi-stage optimization solution effectively overcomes the limitations of traditional single optimization methods, improves the robustness and adaptability of parameter tuning, and can better cope with the complex operating conditions of nonlinear and time-varying devices. The multi-scenario offline verification and performance evaluation steps further ensure that the optimal PI controller parameters can function stably under different operating scenarios, effectively avoiding the problem of control performance degradation under specific operating conditions. Finally, through the closed-loop process of optimization-verification-standard output, the control performance of the PI controller is improved, enabling the compensation device to maintain an ideal control state under complex and variable operating conditions, fully meeting the comprehensive control requirements of the device, solving the problem of poor control effect caused by existing methods, and thus improving the application effect of active compensation devices in power quality management. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 A flowchart illustrating the steps of a PI controller parameter tuning method for a compensation device provided in an embodiment of the present invention;
[0045] Figure 2 Another step of the PI controller parameter tuning method for a compensation device provided in an embodiment of the present invention is shown in the flowchart.
[0046] Figure 3 A structural block diagram of a PI controller parameter tuning system for a compensation device provided in an embodiment of the present invention;
[0047] Figure 4This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0048] This invention provides a method and system for tuning PI controller parameters of a compensation device, which is particularly suitable for adaptive optimization of controller parameters in multi-objective, nonlinear and time-varying systems. It solves the technical problem that existing PI controller parameter tuning methods are difficult to adapt to the complex and variable operating conditions of active compensation devices, and cannot meet the comprehensive control requirements of the device, resulting in poor control performance.
[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0050] Existing parameter tuning methods mainly include empirical methods, the Ziegler-Nichols method, model-based analytical methods, and single intelligent optimization algorithms (such as PSO and GA). These methods have the following shortcomings: empirical methods are highly subjective and time-consuming; analytical methods rely on accurate models and are sensitive to changes in system parameters; single optimization algorithms are prone to getting trapped in local optima and have limited adaptability to different operating conditions. Therefore, there is an urgent need for an intelligent PI parameter tuning method that integrates multiple optimization strategies and possesses strong robustness and adaptability.
[0051] Currently, the parameter tuning of PI controllers for power electronic compensation devices such as dynamic voltage restorers mainly employs empirical trial-and-error methods, the classical Ziegler-Nichols method, or methods based on a single intelligent optimization algorithm (such as particle swarm optimization or genetic algorithms). Empirical methods rely on the subjective experience of engineers, resulting in low efficiency and difficulty in handling load variations and system nonlinearities. Classical analytical methods heavily depend on the precise mathematical model of the controlled object, often leading to performance degradation in real-world systems due to time-varying parameters and modeling errors. While single intelligent optimization algorithms possess some adaptive capabilities, they generally suffer from premature convergence, susceptibility to local optima, and weak generalization ability across different operating conditions. Furthermore, they often neglect the trade-offs between multiple objectives such as control energy consumption, dynamic response speed, and steady-state accuracy. In addition, existing methods often fail to incorporate various types of loads (linear, nonlinear, and mixed loads), fault modes, and real-time system states in actual power grid operation into the parameter optimization framework, resulting in insufficient adaptability of the tuning results under complex operating conditions and difficulty in achieving a comprehensive improvement in both compensation speed and system stability. Therefore, there is an urgent need to study a PI parameter intelligent tuning method that can integrate the advantages of multiple algorithms and has strong robustness and adaptability, so as to improve the overall performance and engineering practicality of power electronic compensation devices in voltage sag problem management, which is of great significance for promoting intelligent control of power systems and refined management of power quality.
[0052] This invention proposes a method and system for tuning the PI controller parameters of a compensation device, applicable to the optimization of controller parameters in dynamic voltage restorers (DVRs) and other power electronic compensation devices. This invention integrates three optimization strategies—Genetic Algorithm (GA), Particle Swarm Optimization (PSO), and Mind Explosion Algorithm (MBA)—to construct an integrated optimization framework. It achieves coordinated optimization of proportional gain and integral gain through a multi-objective comprehensive evaluation function.
[0053] 1) A genetic algorithm (GA) is used to perform an extensive search of the parameter space to generate a high-quality initial population.
[0054] 2) Use particle swarm optimization (PSO) to perform a fine search around the GA output solution to accelerate convergence.
[0055] 3) Introduce the Mind Burst Algorithm (MBA) to perturb and re-optimize the optimal solution output by PSO, so as to avoid getting trapped in local optima.
[0056] Compared with traditional trial-and-error methods and single optimization methods, this method possesses stronger global optimization capabilities, faster convergence speed, and better engineering applicability, significantly improving the dynamic response and steady-state accuracy of the controller under complex operating conditions such as voltage sags. Furthermore, this invention can integrate an online adaptive fine-tuning mechanism, enabling the controller to maintain optimal performance over long periods. This method is computationally efficient and highly practical in engineering, providing a systematic parameter tuning solution for high-performance control of power electronic equipment.
[0057] This invention has the following advantages:
[0058] Strong global optimization capability: It integrates the global search of GA, the fast convergence of PSO, and the local breakthrough capability of MBA, significantly improving the optimality and robustness of parameter tuning.
[0059] Good dynamic adaptability: It supports online adjustment of multi-objective weights to adapt to control requirements under different operating conditions (such as linear load, nonlinear load, and mixed load).
[0060] Highly practical for engineering applications: It balances voltage recovery time, steady-state error, and control energy consumption, meeting the needs of multiple indicators in practical engineering.
[0061] Fast convergence speed: Through three-stage collaborative optimization, the number of iterations is reduced and the tuning efficiency is improved, making it suitable for online or semi-online application scenarios.
[0062] Please see Figure 1 , Figure 1 A flowchart illustrating the steps of a PI controller parameter tuning method for a compensation device provided in an embodiment of the present invention.
[0063] The present invention provides a method for tuning the parameters of a PI controller in a compensation device, comprising:
[0064] Step 101: Build a simulation model of the compensation device control system and construct a multi-objective comprehensive optimization function for the simulation model of the compensation device control system.
[0065] In this embodiment of the invention, a system simulation model is established, including compensation devices (covering active compensation equipment such as dynamic voltage restorers (DVRs), static var generators (SVG), and active power filters (APFs), grid power sources, and linear and nonlinear loads. The compensation devices adopt closed-loop PI control structures adapted to their compensation types (e.g., voltage-type compensation devices are configured with voltage outer-loop PI control, and reactive power / harmonic compensation devices are configured with current outer-loop PI control). The PI control output drives the voltage source inverter after coordinate transformation (e.g., inverse Park transform) and pulse width modulation to generate compensation voltage or compensation current adapted to the power quality management requirements of the grid, thus realistically restoring the actual operating characteristics and control laws of the compensation devices. At the same time, based on the comprehensive control requirements of the compensation devices, a multi-objective comprehensive optimization function adapted to the simulation model is constructed to comprehensively consider the core performance dimensions of the compensation devices, such as dynamic response, steady-state accuracy, and control energy consumption.
[0066] Step 102: Perform multi-stage optimization on the multi-objective integrated optimization function to obtain the optimal PI controller parameters.
[0067] In this embodiment of the invention, based on the constructed multi-objective comprehensive optimization function, a hybrid optimization strategy combining genetic algorithm (GA), particle swarm optimization (PSO), and brainstorming algorithm (MBA) is adopted to carry out multi-stage solution. First, the genetic algorithm is used to perform global iterative optimization of the PI controller parameters to be optimized, obtaining an initial solution set covering the global optimal region. Then, the particle swarm optimization algorithm is used to perform local fine-tuning iteration on the initial solution set, further converging to a local quasi-optimal parameter set. Finally, the brainstorming algorithm is used to perform global deep optimization on the local quasi-optimal parameter set, breaking through the local optimal constraint, and finally obtaining the optimal PI controller parameters that fit the simulation model.
[0068] Step 103: Use the simulation model of the control system of the optimal PI controller parameter input compensation device to perform offline verification and performance evaluation in multiple scenarios, and generate performance evaluation indicators.
[0069] In this embodiment of the invention, the optimal PI controller parameters are input into the simulation model of the compensation device control system, and offline verification is carried out by simulating various typical operating scenarios such as different load types and different power quality disturbances. The operating response data of the compensation device under each scenario is obtained, and then the performance is quantitatively evaluated based on the operating response data to generate corresponding performance evaluation indicators.
[0070] Step 104: When the performance evaluation index meets the preset performance evaluation conditions, output the optimal PI controller parameters.
[0071] In this embodiment of the invention, the performance evaluation indicators are compared one by one with the preset performance evaluation conditions. If each performance evaluation indicator meets the preset threshold or range requirements, it is determined that the optimal PI controller parameters obtained in step 102 meet the actual operating requirements of the compensation device, and then the optimal PI controller parameters are output for subsequent deployment of the actual controller. If the performance evaluation indicators do not meet the preset conditions, the process can return to step 102 to carry out multi-stage optimization again until the optimal PI controller parameters that meet the preset performance evaluation conditions are obtained, ensuring that the final output parameters can effectively adapt to the complex operating conditions of the compensation device.
[0072] Compensation devices refer to power electronic devices used for power quality management and voltage / current disturbance compensation in power grids, including at least one of dynamic voltage restorers (DVRs), static var generators (SVG), and active power filters (APFs). PI controller parameter tuning methods refer to control parameter configuration methods that determine the optimal values of the proportional gain and integral gain of the PI controller through modeling, optimization, and verification processes. The compensation device control system simulation model refers to a closed-loop control simulation model built on a simulation platform, including the compensation device, power grid supply, and linear and nonlinear loads, used to reproduce the actual operating characteristics and control laws of the compensation device. The multi-objective comprehensive optimization function refers to an objective function constructed by comprehensively considering multiple performance dimensions such as system dynamic response, steady-state control accuracy, and control execution energy consumption, used to quantitatively evaluate the comprehensive controllability of the PI controller parameters. Yes; multi-stage optimization solution refers to a solution method that achieves parameter optimization through multiple stages, including global search, local fine search, and deep optimization; optimal PI controller parameters refer to the combination of proportional gain and integral gain of the PI controller that satisfies the optimal comprehensive performance across multiple objectives after multi-stage optimization; multi-scenario offline verification refers to simulation testing conducted in a simulation environment under various operating conditions, including different power grid faults, different load types, and different disturbance levels; performance evaluation refers to the quantitative evaluation of the controller's dynamic response, steady-state accuracy, and energy consumption based on simulation verification results; performance evaluation indicators refer to indicators used to quantitatively characterize the controller's control performance, such as disturbance response time, compensation parameter steady-state error, and control execution energy consumption; preset performance evaluation conditions refer to pre-set performance indicator threshold conditions used to determine whether the PI controller parameters meet the standards.
[0073] In this invention, by building a simulation model of the compensation device control system that closely matches actual operating conditions and constructing a multi-objective comprehensive optimization function, a unified optimization benchmark is provided for PI controller parameter tuning, effectively avoiding the limitations of traditional methods that rely on subjective experience or precise mathematical models. Subsequently, through multi-stage hybrid optimization, the bottleneck of single optimization algorithms easily getting trapped in local optima is overcome, improving the robustness and adaptability of parameter tuning. Furthermore, through multi-scenario offline verification and performance evaluation, the control performance of parameters under different load types and different power quality disturbances is comprehensively verified, ensuring the stability and reliability of parameters under complex and variable operating conditions. Finally, through a target-achievement output mechanism, only parameters that meet preset performance conditions are used for actual deployment, ensuring the control effect of the PI controller. This enables the compensation device to maintain an ideal control state under complex operating conditions, fully meeting the comprehensive control requirements of the device. This solves the technical problems of existing PI controller parameter tuning methods being difficult to adapt to the complex and variable operating conditions of active compensation devices, failing to meet the comprehensive control requirements of the device, and resulting in poor control effects. This significantly improves the application effect and engineering practicality of active compensation devices in power quality management.
[0074] Please see Figure 2 , Figure 2 This is another step flowchart of a PI controller parameter tuning method for a compensation device provided in an embodiment of the present invention.
[0075] The present invention provides a method for tuning the parameters of a PI controller in a compensation device, comprising:
[0076] Step 201: Build a simulation model of the compensation device control system and construct a multi-objective comprehensive optimization function for the simulation model of the compensation device control system.
[0077] In this embodiment of the invention, the compensation device takes a dynamic voltage restorer as an example. Based on a simulation platform, a system simulation model is established, including the dynamic voltage restorer (DVR), the grid power supply, linear loads, and nonlinear loads. The dynamic voltage restorer (DVR) adopts a voltage outer-loop PI control structure. Its output, after Park inverse transformation and pulse width modulation, drives the voltage source inverter to generate the required compensation voltage, thus realistically reproducing the operating characteristics of the compensation device under different loads and power quality disturbances. To achieve comprehensive parameter optimization, a multi-objective optimization function is further constructed:
[0078]
[0079] In the formula, The proportional gain and integral gain to be optimized (i.e., the PI controller parameters to be optimized) are the parameters to be optimized. The smaller the value of the overall objective function, the better the overall performance of the controller. The time (in seconds) required for the load voltage to recover to 95% of its rated value after a voltage sag is used to measure dynamic response speed. To compensate for the steady-state error (per unit value) of the load voltage, used to measure the steady-state control accuracy. To simulate the period T sim The square integral of the internal control output (such as a modulated signal) is used to measure control energy consumption or actuator action intensity. , and These are the weighting coefficients for the corresponding performance indicators, satisfying... .
[0080] Step 202: Perform multi-stage optimization on the multi-objective integrated optimization function to obtain the optimal PI controller parameters.
[0081] It should be noted that this step involves a three-stage collaborative optimization process to search for the objective function. Minimize the optimal PI controller parameter pair .
[0082] Furthermore, step 202 may include the following sub-steps:
[0083] The fitness function is an evaluation function derived from the multi-objective comprehensive optimization function, used to assess the quality of individual optimizations; its value is positively correlated with the overall performance of the controller. The genetic algorithm is an intelligent optimization algorithm based on the principles of biological evolution, using selection, crossover, and mutation operations to achieve global parameter search. The PI controller parameters to be optimized refer to the proportional gain and integral gain variables of the PI controller to be determined during the optimization process. The target population is the initial set of individuals with multiple sets of PI controller parameters to be optimized. Iterative optimization refers to the optimization process of gradually improving the population performance through multiple rounds of evolutionary operations until convergence. The global optimization solution set... Genetic algorithm refers to the set of high-quality PI controller parameters obtained after global search; Particle swarm optimization algorithm refers to an intelligent optimization algorithm that achieves local fine-grained search based on the principle of particle swarm flight optimization; Local fine-grained optimization refers to a small-range high-precision parameter search based on the global optimal solution set; Local quasi-optimal solution set refers to the set of local high-quality parameters that approach the global optimum after particle swarm optimization; Brainstorming algorithm refers to an intelligent optimization algorithm that achieves global deep optimization based on the principle of brainstorming search; Global deep optimization refers to a global deep search based on the local quasi-optimal solution set, which eventually converges to obtain the global optimal parameters.
[0084] S11. Construct a fitness function using a multi-objective integrated optimization function.
[0085] In this embodiment of the invention, a multi-objective comprehensive optimization function can be constructed based on step 201. Construct the fitness function ,in, For a very small positive value (e.g., 10) -6 ), used to avoid multi-objective integrated optimization function values When the value is zero, a division-by-zero operation anomaly occurs. The value of this fitness function is positively correlated with the overall control performance of the PI controller. That is, the higher the fitness value, the better the overall control performance of the compensation device under the corresponding PI controller parameters.
[0086] S12. Based on the genetic algorithm, construct a target population using the PI controller parameters to be optimized as individuals, and use the fitness function to iteratively optimize the target population until convergence, thereby obtaining the global optimization solution set.
[0087] In this embodiment of the invention, the genetic algorithm is first initialized and configured, and the population size is set. Maximum number of iterations Crossover probability Probability of mutation The core parameters, such as the genotype of each individual, represent the combination of proportional and integral gain of the PI controller to be optimized. Its value is within the preset feasible region. and The population is randomly generated to form the initial target population; then, for each individual in the target population, its representative is... The simulation model of the compensation device control system is substituted into the simulation operation. The fitness value of each individual is calculated using the fitness function constructed by S11. Then, the population is screened by roulette wheel selection. The probability of an individual being selected to enter the next generation is proportional to its fitness value. Individuals with better overall performance PI controller parameters are preferentially retained. For the selected parent individuals, a preset crossover probability is used. A simulated binary crossover (SBX) operation is performed to generate offspring individuals that inherit the superior performance characteristics of their parents; then, the offspring individuals are mutated at a preset probability. A polynomial mutation operation is performed to introduce random perturbations to maintain population diversity and prevent the algorithm from getting trapped in local optima. Then, the iterative steps of individual evaluation, roulette wheel selection, simulated binary crossover, and polynomial mutation are repeated until the maximum number of iterations is reached. Alternatively, if the convergence condition is met (e.g., the population fitness no longer significantly improves), output the highest-fitting individuals in the current generation, forming a high-quality global optimization solution set. As the basis for the next stage of optimization in subsequent multi-stage optimization, it ensures that subsequent optimization can be carried out in the global optimal region, and improves the robustness and adaptability of PI controller parameter tuning.
[0088] S13. Based on the particle swarm optimization algorithm, a multi-objective comprehensive optimization function is used to perform local fine optimization on the global optimal solution set to obtain a local quasi-optimal solution set.
[0089] In this embodiment of the invention, the global optimization solution set obtained first is based on S12. Perform particle swarm optimization initialization, The solutions in the algorithm are used as the initial particles for the particle swarm optimization algorithm. Each particle corresponds to a set of PI controller proportional gain and integral gain combinations to be optimized. At the same time, the particle swarm size is set. Inertia weight Individual learning factors Social learning factors Maximum number of iterations Core parameters, and the initial velocities of all particles. (The initial update step size corresponding to the PI controller parameters) is randomly initialized to 0; subsequently, in each iteration... In, for each particle Its flight speed is updated according to the following speed update formula:
[0090]
[0091] in, For the first In the nth iteration The flight speed of each particle (corresponding to the update step size of the PI controller parameters). For the first In the nth iteration The speed of flight of each particle and A random number between [0, 1] (used to introduce random perturbations and improve the search diversity of the algorithm). For the first The optimal position found by each particle in the historical iterations (corresponding to a set of PI controller parameters with optimal overall performance). ), For the first In the nth iteration The current position of each particle (corresponding to a set of PI controller parameter combinations to be optimized). ), The globally optimal position found for the entire particle swarm in historical iterations (corresponding to a set of PI controller parameters with optimal overall performance). ).
[0092] Then update its position according to the following position update formula:
[0093]
[0094] in, For the first In the nth iteration The updated position of each particle (corresponding to the updated PI controller parameter combination) ), in calculating each new position The corresponding multi-objective integrated optimization function value Then, it is compared with the particle's own historical best and the population's historical best, and the corresponding values are updated. and When the number of iterations reaches the preset maximum number of iterations... or If no significant improvement is observed after multiple iterations, the algorithm is considered converged and terminated, outputting the global optimal solution. As a locally quasi-optimal solution set, this solution set is different from the globally optimal solution set. It converges more closely to the PI controller parameter range with better performance, providing a more accurate optimization basis for the global deep optimization in the subsequent stage, and further improving the adaptability of PI controller parameters to the complex operating conditions of the compensation device.
[0095] S14. Based on the thinking burst algorithm, a multi-objective comprehensive optimization function is used to perform global deep optimization on the local quasi-optimal solution set to obtain the optimal PI controller parameters.
[0096] In this embodiment of the invention, the initialization of the thought burst algorithm is first performed, and the global optimal solution of particle swarm optimization obtained in S13 is used. As the initial detonation point (i.e., the location of the landmine) The initial explosion point corresponds to a set of PI controller proportional gain and integral gain combinations to be optimized. At the same time, the initial explosion distance is set. (Its value is usually related to the feasible region of the PI controller parameters and is used to control the initial fragment generation range), number of fragments. (i.e., the number of candidate solutions generated in each explosion process), maximum number of explosions (Used to control the maximum number of iterations of the algorithm to avoid infinite iteration), preset threshold (Core parameters such as whether the explosion distance is small enough, serving as one of the criteria for algorithm convergence) are then generated; subsequently, explosion fragments are generated around the initial explosion point. Generate within parameter space The fragment (i.e., candidate solution), the th fragment Position offset of each fragment From the formula ( ) Determined, among which These are random numbers uniformly distributed within the interval [0, 1], used to introduce random perturbations to improve the search diversity of the algorithm. For the first The flight angle of each fragment, with values of... ( =1,2,…, ), the position of each fragment A set of updated PI controller parameter combinations should be used. Next, evaluation and iteration are performed to calculate the location of each fragment. The corresponding multi-objective integrated optimization function value (Used to measure the overall control performance of the compensation device under the corresponding PI controller parameters; the smaller the value, the better the overall performance.) Select The location of the smallest fragment is used as the new explosion point. At the new explosion point According to the formula The explosion distance is reduced to generate new debris and continue the search, gradually converging to a better PI controller parameter range. Then, the iterative process of explosion debris generation, performance evaluation, explosion point update, and explosion distance reduction is repeated. If a better debris position is not found multiple times during the iteration process, the explosion distance can be appropriately increased to escape the local optimum and restart the global exploration. Less than the preset threshold Or reach the maximum number of explosions When the algorithm converges and terminates, it outputs the final optimal solution. The optimal solution is the optimal PI controller parameter that adapts to the complex operating conditions of the compensation device. It inherits the breadth of global optimization in the previous stage and has the precision of deep and fine search. It can fully meet the comprehensive control requirements of the device and effectively improve the application effect of the compensation device in power quality management.
[0097] Step 203: Use the simulation model of the control system of the optimal PI controller parameter input compensation device to perform offline verification and performance evaluation in multiple scenarios, and generate performance evaluation indicators.
[0098] It should be noted that, in order to fully verify the optimal PI controller parameters obtained by the hybrid optimization algorithm, To assess the effectiveness, superiority, and engineering suitability of the system, and to ensure its adaptability to system changes during long-term operation, this step includes systematic offline verification and comprehensive performance evaluation.
[0099] Furthermore, step 203 may include the following sub-steps:
[0100] Multi-scenario verification results refer to the set of simulation results, such as operating waveforms, dynamic response data, and steady-state error data of the compensation device, obtained under simulation scenarios with different power grid faults, different load types, and different disturbance levels. Performance evaluation quantification refers to the process of converting the waveforms and data in the multi-scenario verification results into quantifiable values such as disturbance response time, compensation parameter steady-state error, and control execution energy consumption.
[0101] S21. The simulation model of the control system of the optimal PI controller parameter input compensation device is used to conduct offline verification in multiple scenarios, and the verification results of multiple scenarios are obtained.
[0102] In this embodiment of the invention, the optimal PI controller parameters obtained in S14 are input into the simulation model of the compensation device (such as a dynamic voltage restorer DVR) control system built in step 201. Offline verification tests with multiple scenarios and indicators are conducted in the simulation environment. To comprehensively evaluate the controller's overall performance under typical operating conditions and extreme boundary conditions, a sequence of test scenarios covering different fault types, fault degrees, and load characteristics is designed. Scenario A is a voltage sag recovery capability test scenario, simulating three-phase symmetrical short circuit, two-phase short circuit, and single-phase ground fault, causing voltage sags of depths of 30%, 50%, and 70%, respectively, with durations of 100ms, 300ms, and 500ms. The load voltage waveform, voltage recovery time, and steady-state error under different controllers are recorded and compared, focusing on evaluating the controller's rapid compensation capability for different types and degrees of voltage sags. Scenario B is a multi-type load... The responsiveness test scenarios test the steady-state and dynamic performance of the controller when different types of loads are connected to the system. Sub-scenario B1 is a purely linear load (such as a constant impedance load), sub-scenario B2 is a nonlinear load (such as a three-phase uncontrolled rectifier bridge resistive-inductive load), and sub-scenario B3 is a mixed load (linear and nonlinear loads coexist and can be dynamically switched). Through simulation verification in the above scenarios and sub-scenarios, multi-dimensional verification results such as the dynamic response speed, steady-state control accuracy, load voltage waveform distortion rate, and control output energy consumption of the compensation device are obtained in the corresponding scenarios. At the same time, the parameters optimized by this invention are compared and analyzed with those tuned based on traditional empirical methods, Ziegler-Nichols methods, and single optimization algorithms (such as standard PSO). This forms a multi-scenario verification result set that includes multi-scenario performance data, waveform comparisons, and method advantages and disadvantages, providing a comprehensive and detailed quantitative basis for subsequent performance evaluation and parameter compliance determination.
[0103] S22. Quantify the performance evaluation of the verification results in multiple scenarios to obtain performance evaluation indicators.
[0104] It should be noted that if the compensation device is a dynamic voltage restorer, the performance evaluation indicators include voltage sag recovery time, steady-state voltage error, and control output energy integral. The performance evaluation indicators of the compensation device can be limited according to its type, but are not limited here.
[0105] In this embodiment of the invention, based on the multi-scenario verification results obtained in S21, three core performance evaluation indicators are quantitatively calculated for each test scenario (including the voltage sag recovery capability test scenario and each sub-scenario of the multi-type load adaptability test scenario), among which voltage sag recovery time is... Defined as the time required from the occurrence of a voltage sag until the load voltage amplitude recovers and remains within 95% to 105% of its rated value, its specific value can be obtained by monitoring the envelope of the load voltage during simulation. It is used to measure the controller's rapid response and recovery capability to voltage sags; steady-state voltage error. Defined as the effective value of the load voltage after the disturbance ends and the system returns to steady state. With rated voltage The relative error is calculated using the following formula: Used to measure the steady-state control accuracy of the controller; control output energy integral. The formula used to reflect the energy consumption of the controller or the stress of the actuator is as follows: ,in, It is a modulated wave signal (i.e., the output control quantity of the PI controller). The test period is obtained by integrating the square of the control output over the entire test period, and is used to evaluate the controller's energy consumption level and actuator stress.
[0106] After completing the quantitative calculation of core performance indicators in various scenarios and the horizontal comparison of different parameter tuning methods, further comparative analysis and effectiveness confirmation were conducted. The optimal PI controller parameters tuned by the method of this invention were compared with those of traditional empirical methods, Ziegler-Nichols methods, and single optimization algorithms (such as standard PSO) under the aforementioned test scenarios and performance indicators, and a comprehensive comparison table and waveform atlas were created. Data analysis confirmed the superiority of the method of this invention: First, it has the best overall performance, reaching or exceeding the comparison methods in most indicators, especially in multi-objective trade-offs (such as fast recovery). First, it exhibits a more balanced performance in terms of low steady-state error and low control energy consumption. Second, it demonstrates strong robustness, maintaining stable performance with minimal fluctuations under various test scenarios (voltage sag recovery capability test, multi-type load adaptability test, etc.), indicating its insensitivity to changes in system operating conditions. Third, it demonstrates engineering practicality, with optimized parameters falling within a practically feasible range, and the control system remaining stable in all tests without excessive overshoot or oscillation, ensuring that the parameters can be directly applied to actual engineering deployments. This provides comprehensive, objective, and effective support for subsequent judgment on whether the optimal PI controller parameters meet the preset performance evaluation conditions.
[0107] Step 204: When the performance evaluation index meets the preset performance evaluation conditions, output the optimal PI controller parameters.
[0108] Furthermore, the performance evaluation indicators include disturbance response time, steady-state error of compensation parameters, and control execution energy consumption; the preset performance evaluation conditions include disturbance response time less than or equal to a preset time threshold, steady-state error of compensation parameters within a preset rated setpoint percentage range, and control execution energy consumption less than or equal to a preset energy consumption threshold.
[0109] Disturbance response time refers to the time required for the compensation device to restore the compensation parameter to the stable range after a voltage sag, harmonics, or other disturbance occurs in the power grid. The steady-state error of the compensation parameter refers to the relative error between the actual value and the rated set value of the compensation parameter during steady-state operation. Control execution energy consumption refers to the square integral of the PI controller output control quantity over the simulation period, used to characterize the intensity of the control action and the energy consumption of the actuator. The preset time threshold refers to the maximum allowable value of the disturbance response time set in advance. The rated set value percentage range refers to the percentage range of the rated value within which the steady-state error of the compensation parameter is allowed to fluctuate. The preset energy consumption threshold refers to the maximum allowable value of the control execution energy consumption set in advance.
[0110] In this embodiment of the invention, the performance evaluation indicators obtained in S22 are compared one by one with the preset performance evaluation conditions. The performance evaluation indicators include disturbance response time, steady-state error of compensation parameters, and control execution energy consumption. The corresponding preset performance evaluation conditions are: disturbance response time is less than or equal to a preset time threshold, steady-state error of compensation parameters is within a preset rated set value percentage range, and control execution energy consumption is less than or equal to a preset energy consumption threshold. If each performance evaluation indicator meets the preset conditions, it is determined that the optimal PI controller parameters obtained in S14 meet the comprehensive control requirements of the compensation device, and then the optimal PI controller parameters are output for subsequent deployment of the actual controller. If the performance evaluation indicators do not meet the preset conditions, the process can return to S12 to carry out multi-stage optimization again until the optimal PI controller parameters that meet the preset performance evaluation conditions are obtained, ensuring that the final output parameters can effectively adapt to the complex operating conditions of the compensation device.
[0111] Furthermore, if the compensation device is a dynamic voltage restorer (DVR), the preset performance evaluation conditions are as follows: the voltage sag recovery time (i.e., disturbance response time) is less than or equal to a preset time threshold (e.g., 20ms), the steady-state voltage error (i.e., the steady-state error of the compensation parameter) is within ±2% of the rated voltage value, and the control output energy integral (i.e., control execution energy consumption) is less than or equal to a preset energy consumption threshold (e.g., 0.5J). By determining the above specific conditions, it is ensured that the optimized PI controller parameters can accurately adapt to the DVR's requirements for fast response, high-precision steady-state control, and low-energy consumption control in voltage sag compensation scenarios, thereby improving the engineering application effect of the DVR in power quality management.
[0112] Furthermore, it also includes the following steps:
[0113] Step 205: Deploy the optimal PI controller parameters to the actual controller of the compensation device, and perform adaptive fine-tuning of the PI controller parameters based on the real-time operating status of the compensation device.
[0114] It should be noted that, to address the "model drift" problem caused by slow changes in load characteristics, network topology adjustments, or equipment aging in real-world power systems, a lightweight online adaptive update module can be deployed. Its working principle is as follows:
[0115] Furthermore, step 205 may include the following sub-steps:
[0116] Real-time operating status refers to the real-time operating information of the compensation device, such as load characteristics, power quality, and power fluctuations, when it is running in the actual power grid. Adaptive fine-tuning of PI controller parameters refers to the adaptive control adjustment method that automatically triggers local parameter optimization and updates based on changes in the real-time operating status of the compensation device.
[0117] Real-time operating status characteristics refer to features such as load power change rate, current distortion factor, and voltage fluctuation statistics extracted from the actual operating electrical signals of the compensation device; the target state feature vector refers to a vector formed by an ordered combination of multiple real-time operating status characteristics, used to characterize the system's operating status; the preset sliding time window refers to a fixed-time window set in advance for statistically analyzing state characteristics; the target mean refers to the statistical average of the target state feature vectors within the sliding time window; the benchmark feature vector refers to the system state feature vector corresponding to the last successful parameter tuning, serving as a state comparison benchmark; the Euclidean norm refers to a mathematical measure used to quantify the degree of state difference between the target mean and the benchmark feature vector; the preset norm threshold refers to a pre-set Euclidean norm critical value used to determine whether parameter fine-tuning is triggered; the parameter neighborhood trust region refers to a parameter search interval limited to a small range centered on the current optimal PI controller parameters; the weight coefficient refers to the weight value assigned to each performance index in the multi-objective comprehensive optimization function; the updated multi-objective comprehensive optimization function refers to the function dynamically adjusted based on the real-time operating status. The terms "multi-objective comprehensive optimization function" and "model search method" refer to the following: **Model search method:** A direct search algorithm with high computational efficiency and suitable for local fast optimization. **Local fast optimization:** Fast local parameter optimization conducted within the trust domain of the parameter neighborhood. **Candidate PI controller parameter set:** Multiple sets of candidate PI controller parameters generated during local fast optimization. **Optimal candidate PI controller parameters:** The parameter combination with the best overall performance in the candidate parameter set. **Gradual update method:** A method that gradually and smoothly updates parameters to the controller, avoiding system oscillations caused by parameter mutations. **Preset check interval:** A pre-set time period used to monitor system performance after parameter updates. **Target power system:** The actual power grid system to which the compensation device is connected. **Stability:** The state of continuous stable operation without overshoot or oscillation after parameter updates. **Verification passed:** The system stability and all performance indicators meet the preset conditions after parameter updates. **Verification failed:** The system becomes unstable or its performance indicators do not meet the preset conditions after parameter updates. **Rollback:** The operation of restoring the controller parameters to the original optimal PI controller parameters.
[0118] S31. Deploy the optimal PI controller parameters to the actual controller of the compensation device and obtain the real-time operating status characteristics of the compensation device.
[0119] In this embodiment of the invention, the optimal PI controller parameters obtained from the aforementioned multi-stage optimization are deployed to the actual controller of the compensation device. After the parameter configuration is completed, the controller continuously monitors and collects readily available real-time electrical signals during the operation of the compensation device, including the load current waveform i. L (t), Load voltage waveform v L (t) and grid-side voltage waveform v SBased on these real-time signals, key characteristic quantities that reflect the system's operating status are calculated and cached, including the short-term rate of change of load active power P and reactive power Q. Waveform distortion factor of load current And short-term fluctuation statistics of the effective voltage value (such as the standard deviation within 10 minutes). This allows us to obtain a set of real-time operating status features of the compensation device.
[0120] S32. Construct the target state feature vector based on the real-time operating state characteristics.
[0121] In this embodiment of the invention, based on the real-time operating status characteristics obtained in S31, the short-term change rates of the load active power and reactive power are... Waveform distortion factor of load current and short-term fluctuation statistics of voltage RMS value Perform ordered combinations to construct the target state feature vector. This vector can comprehensively and quantitatively reflect the load characteristics, power quality status and dynamic changes of the compensation device during actual operation.
[0122] S33. Calculate the target mean of the target state feature vector based on the preset sliding time window.
[0123] In this embodiment of the invention, based on a preset sliding time window (e.g., a time window of 1 hour), at preset time intervals... (For example, 15 minutes), statistically calculate the mean of all target state feature vectors obtained in S32 within the current sliding time window, and denot it as the target mean. The target mean can reflect the average operating state of the compensation device within the current sliding time window, providing a stable state representation for subsequent comparison with the benchmark feature vector.
[0124] S34. Calculate the Euclidean norm between the target mean and the baseline eigenvector at the time of the previous successful tuning.
[0125] In this embodiment of the invention, the target mean obtained in S33 can be... Compared with the baseline eigenvector at the time of the previous successful tuning Compare the two and calculate their Euclidean norms. The Euclidean norm is used to quantify the degree of overall feature change between the target mean and the baseline eigenvector. The larger the norm, the more significant the difference between the current system operating state and the state when the previous tuning was successful. If the Euclidean norm is greater than a preset norm threshold, the system will be considered to have a higher standard. If this is triggered, parameter fine-tuning will be performed to adapt to changes in the system's operating state and ensure that the control performance of the compensation device is always at the optimal level.
[0126] S35. When the Euclidean norm is greater than the preset norm threshold, set the parameter neighborhood trust domain with the optimal PI controller parameter as the parameter center.
[0127] In this embodiment of the invention, when the Euclidean norm between the target mean calculated by S34 and the baseline feature vector is greater than a preset norm threshold, a confined space fast re-optimization process is triggered, using the currently deployed optimal PI controller parameters. Centered on the target parameter, a smaller parameter neighborhood trust region, i.e., the feasible region of the proportional gain, is defined as follows: The feasible region of integral gain is ,in , The preset small step increment ensures that the optimization converges quickly within a local range, avoiding large-scale parameter fluctuations from affecting system stability.
[0128] S36. Dynamically adjust the weight coefficients of the multi-objective comprehensive optimization function according to the real-time operating status characteristics to obtain the updated multi-objective comprehensive optimization function.
[0129] In this embodiment of the invention, based on the real-time operating status characteristics obtained in S31, the weight coefficients of the multi-objective comprehensive optimization function are dynamically adjusted: when the short-term fluctuation statistics of the effective voltage value are detected to increase (e.g., when the compensation device is a dynamic voltage restorer DVR, the voltage fluctuation intensifies), the weight coefficient of the corresponding disturbance response time index is increased. When the steady-state voltage error remains high (steady-state deviation exists), increase the weighting coefficient of the compensation parameter steady-state error index. When the integral of the control output energy increases (due to frequent saturation of the control output), the weighting coefficient of the control execution energy consumption index is increased. At the same time, maintain This yields an updated multi-objective comprehensive optimization function, which focuses the optimization objective on the main aspects of recent system performance degradation.
[0130] S37. Using the pattern search method, local fast optimization is performed within the parameter neighborhood trust domain based on the updated multi-objective comprehensive optimization function to generate a set of candidate PI controller parameters.
[0131] In this embodiment of the invention, within the trust domain of the parameter neighborhood set in S35, a pattern search method with high computational efficiency and suitable for local search is used to carry out local fast optimization. The updated multi-objective comprehensive optimization function is used as the objective function. By iteratively adjusting the combination of PI controller parameters, a series of candidate PI controller parameters are generated within the trust domain, forming a set of candidate PI controller parameters. This process does not require complex global search and converges quickly only in a local range, ensuring optimization efficiency.
[0132] S38. Based on the updated multi-objective integrated optimization function, the performance of the candidate PI controller parameter set is evaluated, and the optimal candidate PI controller parameters are selected.
[0133] In this embodiment of the invention, for each set of parameters in the candidate PI controller parameter set, the performance of the candidate parameters is quickly evaluated using a simplified system model or a data-based proxy model stored in the controller, or by injecting a specific frequency test signal with extremely small amplitude, without affecting the normal operation of the main system. The corresponding updated multi-objective comprehensive optimization function value is calculated, and the candidate parameter with the smallest updated multi-objective comprehensive optimization function value is selected as the optimal candidate PI controller parameter. This parameter has the best overall performance within the current local trust domain and adapts to recent changes in the system's operating status.
[0134] S39. Update the optimal candidate PI controller parameters to the actual controller in a gradual manner, and monitor the stability of the target power system connected to the compensation device within a preset check interval, as well as the disturbance response time of the target power system, the steady-state error of the compensation parameters, and the control execution energy consumption.
[0135] In this embodiment of the invention, the optimal candidate PI controller parameters obtained in S38 are... The actual controller of the compensation device is updated gradually to avoid system oscillation caused by sudden parameter changes. Within a preset inspection interval (e.g., 5 minutes), the stability of the target power system connected to the compensation device (e.g., no overshoot, no oscillation) and key performance indicators, including disturbance response time (e.g., voltage sag recovery time in DVR scenarios), steady-state error of compensation parameters (e.g., steady-state voltage error) and control execution energy consumption (e.g., control output energy integral), are closely monitored to ensure that the system performance meets the requirements after the parameter update.
[0136] S310. If the verification passes, update the baseline feature vector.
[0137] In this embodiment of the invention, if the target power system remains stable within a preset inspection interval, and key performance indicators such as disturbance response time, steady-state error of compensation parameters, and control execution energy consumption all meet the preset performance evaluation conditions, then the parameter update verification is passed, and the mean of the current target state feature vector is updated to a new benchmark feature vector for comparison of subsequent system state changes, ensuring that the adaptive adjustment benchmark is consistent with the current system state.
[0138] S311. If the verification fails, roll back to the original optimal PI controller parameters and increase the preset norm threshold or extend the preset check interval.
[0139] In this embodiment of the invention, if the target power system exhibits instability (such as excessive overshoot or oscillation) or key performance indicators fail to meet preset conditions within a preset inspection interval, the parameter update verification is deemed to have failed. The system is immediately rolled back to the originally deployed optimal PI controller parameters. At the same time, the preset norm threshold is increased or the preset inspection interval is extended to reduce the frequency of subsequent parameter fine-tuning and avoid frequent adjustments affecting system stability. The system is then re-evaluated after its operating status stabilizes.
[0140] In this invention, by building a simulation model of the compensation device control system that closely matches actual operating conditions and constructing a multi-objective comprehensive optimization function, a unified optimization benchmark is provided for PI controller parameter tuning, effectively avoiding the limitations of traditional methods that rely on subjective experience or precise mathematical models. Subsequently, through multi-stage hybrid optimization, the bottleneck of single optimization algorithms easily getting trapped in local optima is overcome, improving the robustness and adaptability of parameter tuning. Furthermore, through multi-scenario offline verification and performance evaluation, the control performance of parameters under different load types and different power quality disturbances is comprehensively verified, ensuring the stability and reliability of parameters under complex and variable operating conditions. Finally, through a target-achievement output mechanism, only parameters that meet preset performance conditions are used for actual deployment, ensuring the control effect of the PI controller. This enables the compensation device to maintain an ideal control state under complex operating conditions, fully meeting the comprehensive control requirements of the device. This solves the technical problems of existing PI controller parameter tuning methods being difficult to adapt to the complex and variable operating conditions of active compensation devices, failing to meet the comprehensive control requirements of the device, and resulting in poor control effects. This significantly improves the application effect and engineering practicality of active compensation devices in power quality management.
[0141] Please see Figure 3 , Figure 3 This is a structural block diagram of a PI controller parameter tuning system for a compensation device provided in an embodiment of the present invention.
[0142] The present invention provides a PI controller parameter tuning system for a compensation device, comprising:
[0143] Module 301 is used to build a simulation model of the compensation device control system and to construct a multi-objective comprehensive optimization function for the simulation model of the compensation device control system.
[0144] Solver module 302 is used to perform multi-stage optimization of the multi-objective integrated optimization function to obtain the optimal PI controller parameters;
[0145] Evaluation module 303 is used to perform multi-scenario offline verification and performance evaluation of the simulation model of the control system of the compensation device with the optimal PI controller parameters input, and generate performance evaluation indicators.
[0146] The output module 304 is used to output the optimal PI controller parameters when the performance evaluation index meets the preset performance evaluation conditions.
[0147] Furthermore, the solver module 302 includes:
[0148] The fitness function submodule is used to construct the fitness function using a multi-objective integrated optimization function.
[0149] The genetic algorithm submodule is used to construct a target population based on the genetic algorithm, using the parameters of the PI controller to be optimized as individuals, and to iteratively optimize the target population until convergence using a fitness function to obtain a global optimization solution set.
[0150] The particle swarm optimization algorithm submodule is used to perform local fine optimization on the global optimal solution set based on the particle swarm optimization algorithm and a multi-objective comprehensive optimization function to obtain a local quasi-optimal solution set.
[0151] The Thinking Burst Algorithm Submodule is used to perform global deep optimization on the local quasi-optimal solution set based on the Thinking Burst Algorithm and using a multi-objective comprehensive optimization function to obtain the optimal PI controller parameters.
[0152] Furthermore, the evaluation module 303 includes:
[0153] The multi-scenario offline verification submodule is used to perform multi-scenario offline verification using the simulation model of the control system of the compensation device with the optimal PI controller parameters, and to obtain the multi-scenario verification results.
[0154] The performance evaluation quantification submodule is used to quantify the performance of verification results in multiple scenarios and obtain performance evaluation metrics.
[0155] Furthermore, the performance evaluation indicators include disturbance response time, steady-state error of compensation parameters, and control execution energy consumption; the preset performance evaluation conditions include disturbance response time less than or equal to a preset time threshold, steady-state error of compensation parameters within a preset rated setpoint percentage range, and control execution energy consumption less than or equal to a preset energy consumption threshold.
[0156] Furthermore, it also includes:
[0157] The fine-tuning module is used to deploy the optimal PI controller parameters to the actual controller of the compensation device and to adaptively fine-tune the PI controller parameters based on the real-time operating status of the compensation device.
[0158] Furthermore, the fine-tuning module includes:
[0159] The real-time operating status feature submodule is used to deploy the optimal PI controller parameters to the actual controller of the compensation device and obtain the real-time operating status features of the compensation device.
[0160] The target state feature vector submodule is used to construct the target state feature vector based on the real-time running state features;
[0161] The target mean submodule is used to calculate the target mean of the target state feature vector based on a preset sliding time window;
[0162] The Euclidean norm submodule is used to calculate the Euclidean norm between the target mean and the baseline eigenvector at the time of the previous successful tuning.
[0163] The parameter neighborhood trust domain submodule is used to set the parameter neighborhood trust domain with the optimal PI controller parameter as the parameter center when the Euclidean norm is greater than the preset norm threshold.
[0164] The weight coefficient update submodule is used to dynamically adjust the weight coefficients of the multi-objective comprehensive optimization function according to the real-time running status characteristics, so as to obtain the updated multi-objective comprehensive optimization function;
[0165] The candidate PI controller parameter set submodule is used to perform local fast optimization based on the updated multi-objective comprehensive optimization function within the parameter neighborhood trust domain using the pattern search method to generate the candidate PI controller parameter set.
[0166] The optimal candidate PI controller parameter submodule is used to perform performance evaluation on the candidate PI controller parameter set based on the updated multi-objective comprehensive optimization function, and to select the optimal candidate PI controller parameters.
[0167] The monitoring submodule is used to update the optimal candidate PI controller parameters to the actual controller in a gradual manner, and monitor the stability of the target power system connected to the compensation device within a preset check interval, as well as the disturbance response time of the target power system, the steady-state error of the compensation parameters, and the energy consumption of control execution.
[0168] The first processing submodule is used to update the baseline feature vector if the verification passes.
[0169] The second processing submodule is used to roll back to the original optimal PI controller parameters if the verification fails, and increase the preset norm threshold or extend the preset check interval.
[0170] In this invention, by building a simulation model of the compensation device control system that closely matches actual operating conditions and constructing a multi-objective comprehensive optimization function, a unified optimization benchmark is provided for PI controller parameter tuning, effectively avoiding the limitations of traditional methods that rely on subjective experience or precise mathematical models. Subsequently, through multi-stage hybrid optimization, the bottleneck of single optimization algorithms easily getting trapped in local optima is overcome, improving the robustness and adaptability of parameter tuning. Furthermore, through multi-scenario offline verification and performance evaluation, the control performance of parameters under different load types and different power quality disturbances is comprehensively verified, ensuring the stability and reliability of parameters under complex and variable operating conditions. Finally, through a target-achievement output mechanism, only parameters that meet preset performance conditions are used for actual deployment, ensuring the control effect of the PI controller. This enables the compensation device to maintain an ideal control state under complex operating conditions, fully meeting the comprehensive control requirements of the device. This solves the technical problems of existing PI controller parameter tuning methods being difficult to adapt to the complex and variable operating conditions of active compensation devices, failing to meet the comprehensive control requirements of the device, and resulting in poor control effects. This significantly improves the application effect and engineering practicality of active compensation devices in power quality management.
[0171] Please see Figure 4 , Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of the present invention.
[0172] An electronic device according to an embodiment of the present invention includes: a memory 401 and a processor 402. The memory 401 stores a computer program. When the computer program is executed by the processor 402, the processor 402 performs the PI controller parameter tuning method of the compensation device as described in the above embodiment.
[0173] Memory 401 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Memory 401 has storage space 403 for program code 413 for performing any of the method steps described above. For example, storage space 403 for program code may include individual program codes 413 for implementing the various steps in the methods described above. This program code may be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, CDs, memory cards, or floppy disks. The program code may be compressed, for example, in a suitable form. When run by a computing processing device, this code causes the computing processing device to perform the various steps in the methods described above. This program code may be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, CDs, memory cards, or floppy disks. The program code may be compressed, for example, in a suitable form. When these codes are run by a computing device, they cause the computing device to perform the various steps in the PI controller parameter tuning method of the compensation device described above.
[0174] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the PI controller parameter tuning method of the compensation device as described in the above embodiments.
[0175] This invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, wherein when the program instructions are executed by a computer, the computer performs the PI controller parameter tuning method of the compensation device as described in the above embodiments.
[0176] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0177] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0178] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0179] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0180] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0181] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for tuning the parameters of a PI controller in a compensation device, characterized in that, include: A simulation model of the compensation device control system is built, and a multi-objective comprehensive optimization function for the simulation model of the compensation device control system is constructed. The multi-objective integrated optimization function is solved through multi-stage optimization to obtain the optimal PI controller parameters; The optimal PI controller parameters are input into the simulation model of the compensation device control system to perform offline verification and performance evaluation in multiple scenarios, and performance evaluation indicators are generated. When the performance evaluation index meets the preset performance evaluation conditions, the optimal PI controller parameters are output.
2. The method for tuning the PI controller parameters of the compensation device according to claim 1, characterized in that, The process of performing multi-stage optimization on the multi-objective integrated optimization function to obtain the optimal PI controller parameters includes: The fitness function is constructed using the multi-objective integrated optimization function. Based on the genetic algorithm, a target population is constructed using the PI controller parameters to be optimized as individuals. The fitness function is used to iteratively optimize the target population until convergence, and a global optimization solution set is obtained. Based on the particle swarm optimization algorithm, the multi-objective comprehensive optimization function is used to perform local fine optimization on the global optimal solution set to obtain a local quasi-optimal solution set. Based on the thinking burst algorithm, the multi-objective comprehensive optimization function is used to perform global deep optimization on the local quasi-optimal solution set to obtain the optimal PI controller parameters.
3. The method for tuning the PI controller parameters of the compensation device according to claim 1, characterized in that, The optimal PI controller parameters are input into the simulation model of the compensation device control system to perform multi-scenario offline verification and performance evaluation, generating performance evaluation indicators, including: The optimal PI controller parameters are input into the simulation model of the compensation device control system to perform offline verification in multiple scenarios, and the verification results for multiple scenarios are obtained. The performance evaluation results of the multi-scenario verification are quantified to obtain performance evaluation indicators.
4. The method for tuning the PI controller parameters of the compensation device according to claim 1, characterized in that, The performance evaluation indicators include disturbance response time, compensation parameter steady-state error, and control execution energy consumption; the preset performance evaluation conditions include the disturbance response time being less than or equal to a preset time threshold, the compensation parameter steady-state error being within a preset rated set value percentage range, and the control execution energy consumption being less than or equal to a preset energy consumption threshold.
5. The method for tuning the PI controller parameters of the compensation device according to any one of claims 1-4, characterized in that, Also includes: The optimal PI controller parameters are deployed to the actual controller of the compensation device, and the PI controller parameters are adaptively fine-tuned based on the real-time operating status of the compensation device.
6. The method for tuning the PI controller parameters of the compensation device according to claim 5, characterized in that, The step of deploying the optimal PI controller parameters to the actual controller of the compensation device and adaptively fine-tuning the PI controller parameters based on the real-time operating status of the compensation device includes: The optimal PI controller parameters are deployed to the actual controller of the compensation device, and the real-time operating status characteristics of the compensation device are obtained. Construct a target state feature vector based on the real-time operating state characteristics; Calculate the target mean of the target state feature vector based on a preset sliding time window; Calculate the Euclidean norm between the target mean and the baseline eigenvector at the time of the previous successful tuning; When the Euclidean norm is greater than the preset norm threshold, a parameter neighborhood trust domain is set with the optimal PI controller parameter as the parameter center. The weight coefficients of the multi-objective comprehensive optimization function are dynamically adjusted based on the real-time operating status characteristics to obtain the updated multi-objective comprehensive optimization function; A pattern search method is used to perform local fast optimization within the parameter neighborhood trust domain based on the updated multi-objective comprehensive optimization function to generate a candidate PI controller parameter set. The performance of the candidate PI controller parameter set is evaluated based on the updated multi-objective comprehensive optimization function, and the optimal candidate PI controller parameters are selected. The optimal candidate PI controller parameters are updated to the actual controller in a gradual manner, and the stability of the target power system connected to the compensation device, as well as the disturbance response time, steady-state error of the compensation parameters and control execution energy consumption of the target power system are monitored within a preset check interval. If the verification passes, the baseline feature vector is updated; If the verification fails, the system will roll back to the original optimal PI controller parameters and increase the preset norm threshold or extend the preset check interval.
7. A PI controller parameter tuning system for a compensation device, characterized in that, include: A construction module is used to build a simulation model of the compensation device control system and to construct a multi-objective comprehensive optimization function for the simulation model of the compensation device control system. The solution module is used to perform multi-stage optimization of the multi-objective integrated optimization function to obtain the optimal PI controller parameters; The evaluation module is used to perform multi-scenario offline verification and performance evaluation on the simulation model of the compensation device control system using the optimal PI controller parameters as input, and to generate performance evaluation indicators. The output module is used to output the optimal PI controller parameters when the performance evaluation index meets the preset performance evaluation conditions.
8. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the steps of the PI controller parameter tuning method of the compensation device as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the PI controller parameter tuning method of the compensation device as described in any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, wherein when the program instructions are executed by a computer, the computer performs the PI controller parameter tuning method of the compensation device as described in any one of claims 1-6.