A Method for Adjusting the Weights of the Dynamic Performance of a Buck Converter Based on Particle Swarm Optimization

By applying the particle swarm optimization algorithm to dynamically adjust the weight of performance indicators and optimize the controller parameters in the step-down conversion circuit, the performance improvement and stability guarantee problems of the step-down conversion circuit under load changes and power supply fluctuations are solved, and more efficient dynamic performance and steady-state accuracy are achieved.

CN119945146BActive Publication Date: 2025-06-03HENAN RUIMU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510446086.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-06-03
Estimated Expiration
2045-04-10

AI Technical Summary

Technical Problem

Step-down conversion circuits face challenges in practical applications to improve their performance, reduce losses and ensure stability, especially in the case of load changes and power supply fluctuations.

Method used

The dynamic performance weight adjustment method based on particle swarm optimization (PSO) is adopted, and the weight coefficients of performance indicators are dynamically adjusted by initializing the control parameters and fitness functions, and the proportional gain (Kp) and integral gain (Ki) parameters are optimized by combining the differential evolution (DE) algorithm.

Benefits of technology

The dynamic performance, steady-state accuracy and overall system stability of the step-down converter are significantly improved, and the optimization strategy can be automatically adjusted to cope with complex load conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119945146B_ABST
    Figure CN119945146B_ABST
Patent Text Reader

Abstract

The present invention provides a method for adjusting the dynamic performance weights of a buck converter based on particle swarm optimization, comprising the following steps: Step 1, initialize the control parameters, population, and number of iterations; Step 2, perform an outer loop to find the optimal weight coefficient combination that minimizes the contribution ratio error; Step 3, perform an inner loop: optimize the proportional gain and integral gain through the differential evolution algorithm, and achieve global optimization through the reverse feedback of the outer loop and the inner loop; Step 4, determine whether the stop condition is satisfied; Step 5, input the optimal controller parameters into the proportional-integral controller of the buck circuit and output the optimized voltage curve. This method innovatively realizes the two-way interaction between dynamic weight adjustment and controller parameter optimization, has strong adaptability and broad application prospects. Especially under complex load conditions, it can automatically adjust the optimization strategy to ensure that the converter can maintain excellent control performance under various working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent control, and particularly relates to a method for adjusting the dynamic performance weights of a buck converter based on particle swarm optimization. Background Art

[0002] With the continuous development of power electronics technology, switching power supplies, as one of the important technologies for power conversion, have been widely used in power electronic devices. As a typical buck-type switching power supply, the buck conversion circuit has been widely used in fields such as communication equipment, consumer electronics, and industrial control due to its advantages of high efficiency, small size, and low cost. However, the buck conversion circuit faces challenges in improving its performance, reducing losses, and ensuring stability in practical applications.

[0003] Traditional optimization methods for the control system of buck conversion circuits often adopt fixed control strategies and parameter settings, making it difficult to cope with the dynamic changes brought about by load variations and power supply fluctuations. Especially in multi-objective optimization problems, how to balance performance indicators such as efficiency, response time, output stability, and system robustness has become a key issue restricting the performance improvement of buck circuits.

[0004] In recent years, with the development of intelligent control technology and optimization algorithms, more and more research has focused on optimizing the performance of buck conversion circuits through intelligent control algorithms. As a global optimization method, the particle swarm optimization (PSO) algorithm can effectively adjust the fitness function weights of various performance indicators in the control system. By dynamically optimizing the weight ratio of the fitness function, it can better meet the requirements of the system under different working conditions. Through the particle swarm algorithm, combined with dynamic ratio allocation, the weight coefficients of the fitness function can be adjusted more efficiently, thus solving the design problem of the fitness function faster.

[0005] The buck conversion circuit, as an important part of power electronics technology, is widely used in various DC power systems to achieve efficient voltage step-down and voltage regulation functions. In practical applications, due to factors such as load variations and input voltage fluctuations, the dynamic response ability, output stability, and system robustness of the buck conversion circuit face many challenges. Therefore, optimizing the control strategy of the buck conversion circuit to improve its overall performance is an important research direction in the field of power electronics technology. To meet the performance requirements under different load conditions, it is usually necessary to optimize the controller parameters. The existing technology uses the differential evolution (DE) algorithm for parameter optimization. Although the effect is good, it is necessary to manually design the objective function and adjust the weights to balance the performance indicators, which is complex to operate and difficult to precisely coordinate various indicators. Summary of the Invention

[0006] Objective of the Invention: Aiming at the deficiencies of the prior art, the present invention provides a method for adjusting the dynamic performance weights of a buck converter based on particle swarm optimization, aiming to improve the dynamic performance and stability of the power system.

[0007] The method of the present invention includes the following steps:

[0008] Step 1, initialize the control parameters; initialize the population and the number of iterations of the evolutionary algorithm; establish a fitness function, and the fitness function includes performance indicators;

[0009] Step 2, perform the outer loop: randomly generate a set of weight coefficients, and calculate and output the circuit state and performance indicators at the current moment according to the real-time operation data of the buck conversion circuit, and calculate the actual contribution ratio of the circuit state and performance indicators at the current moment, compare the target contribution ratio with the actual contribution ratio, and calculate the normalized error based on the target contribution ratio and the actual contribution ratio. Based on the calculated error result, dynamically adjust the target contribution ratio; use the particle swarm algorithm to adjust each weight coefficient again; repeat Step 2 until the optimal weight coefficient combination that minimizes the contribution ratio error is found; finally, feedback the optimized weight coefficients to the inner loop of Step 3;

[0010] Step 3, perform the inner loop: optimize the proportional gain K p and the integral gain K i , and reverse-correct the search direction of the outer loop according to the optimization result of the inner loop, and achieve global optimization through the reverse feedback between the outer loop and the inner loop;

[0011] Step 4, determine whether the following conditions are met:

[0012] The voltage overshoot is less than 0.1, the steady-state error is less than 0.001, and the undershoot is less than 0.5.

[0013] If all are met, retain the controller parameters K p , K i optimized this time as the current optimal result, and compare the voltage stabilization time of the current optimal result with the voltage stabilization time of the previously obtained optimal result, save the smaller voltage stabilization time as the optimal result, and substitute the optimized K p , K i into the outer loop of Step 2 again, and optimize k p , k i again according to the parameters K 2 , k 4 , k 6 , k 8 ; otherwise, directly substitute the optimized K p , K iSubstitute it into the outer loop of Step 2 until the iteration is completed and the optimal solution is found;

[0014] Step 5: Input the obtained optimal controller parameters into the proportional-integral controller of the buck circuit to output the optimized voltage curve.

[0015] Step 1 includes:

[0016] Step 1.1: According to the experimental requirements, initialize the range and parameters, and give the fixed weight coefficient k 1 , k 3 , k 5 , k 7 ; Initialize the dynamically adjusted weight coefficient k 2 , k 4 , k 6 , k 8 ; Initialize the controller parameters K p and K i ; Set the number of dimensions, mutation factor, and crossover probability of the Differential Evolution (DE) algorithm and initialize the population; Set the range of the controller parameters; Set the number of iterations of the outer loop and the inner loop;

[0017] Step 1.2: Design the fitness function , and encapsulate the fitness function in the evalution function. The fitness function is defined as:

[0018] (1),

[0019] where k 1 , k 2 is the weight coefficient of the settling time ST of the performance index, k 3 , k 4 is the weight coefficient of the overshoot OV of the performance index, k 5 , k 6 is the weight coefficient of the steady-state error SSE of the performance index, k 7 , k 8 is the weight coefficient of the undershoot UV of the performance index; e is the natural constant;

[0020] Denote as the intermediate parameter f 1 , denote 2 , as the intermediate parameter f 3 , denote 4 .

[0021] Step 2 includes:

[0022] Step 2.1, design a function optimize_weights for optimizing the fitness function weight coefficient. The function optimize_weights uses the Particle Swarm Optimization (PSO) algorithm for dynamic weight optimization, specifically including:

[0023] The current position of each particle is updated by the following formula:

[0024] (2),

[0025] where, is the current position of the i-th particle at the k-th iteration, is the velocity of the i-th particle at the (k + 1)-th iteration;

[0026] The velocity update formula for each particle is:

[0027] (3),

[0028] where is the inertia weight; and are learning factors; and are random numbers uniformly distributed between [0, 1]; is the historical optimal position of the i-th particle at the k-th iteration; is the global optimal position of the population;

[0029] Step 2.2, design the main function compute_dynamic_error for dynamic weight optimization. The main function compute_dynamic_error optimizes based on the initially given target contribution ratio by analyzing the voltage image obtained based on the proportional gain K p and the integral gain K i and automatically obtains the optimal ratio through a dynamic adjustment method. The ratio is updated according to the error at each iteration, and particle swarm optimization is performed. The Particle Swarm Optimization (PSO) algorithm is used to find the minimum error error value as the solution with the minimum error, so that the actual contribution ratio current_ratios is close to the target contribution ratio target_ratios;

[0030] Step 2.3, recalculate the error between the updated target contribution ratio and the actual contribution ratio obtained after the next iteration until the iteration ends;

[0031] Step 2.4, feedback the optimal weight coefficient combination that minimizes the contribution ratio error to the inner loop of Step 3.

[0032] Step 2.2 includes:

[0033] Step 2.2.1, initialize the target contribution ratio:

[0034] The target contribution ratio is a dynamically adjusted value, and when initialized, it is:

[0035] target_ratios = [0.25, 0.25, 0.25, 0.25] (4),

[0036] Step 2.2.2, calculate the current actual contribution ratio:

[0037] First, calculate the sum of the total performance indicators :

[0038] (5),

[0039] Then, calculate the actual contribution ratio of each indicator:

[0040] (6),

[0041] where is denoted as the actual contribution ratio of the first performance indicator , is denoted as the actual contribution ratio of the second performance indicator , is denoted as the actual contribution ratio of the third performance indicator , is denoted as the actual contribution ratio of the fourth performance indicator ;

[0042] Step 2.2.3, dynamically adjust the target ratio;

[0043] Step 2.2.4, calculate the contribution ratio error error.

[0044] In Step 2.2.3, the target ratio is dynamically adjusted using the following formula:

[0045] (7),

[0046] where is the actual contribution ratio of the i-th performance indicator, i ranges from 1 to 4, is the target contribution ratio of the i-th performance indicator, and adjust_rate is the dynamic adjustment rate.

[0047] In Step 2.2.4, the contribution ratio error error is calculated using the following formula:

[0048] (8).

[0049] Step 3 includes:

[0050] Step 3.1, initialize the population and initialize the proportional gain K p and integral gain K i ;

[0051] Step 3.2, perform optimization using the differential evolution algorithm. Through the mutation and crossover operations in the differential evolution algorithm, continuously optimize K p , K i and output the fitness value;

[0052] Step 3.3, update the current global optimal solution according to the fitness value;

[0053] Step 3.4, substitute the optimized K p , K i back into the outer loop of Step 2, and optimize k p , K i according to the optimized K 2 , k 4 , k 6 , k 8 , and loop sequentially until the optimal controller parameters are obtained.

[0054] The present invention also provides an electronic device, including a processor and a memory. The memory stores program codes. When the program codes are executed by the processor, the processor executes the steps of the above method.

[0055] The present invention also provides a storage medium, storing a computer program or instruction. When the computer program or instruction runs on a computer, it executes the steps of the above method.

[0056] The present invention also provides a buck converter, and the buck converter uses the above method for dynamic performance adjustment.

[0057] The present invention proposes a method for dynamically allocating weight ratios and adaptively adjusting the weight coefficients of the fitness function. Dynamically adjust the weight parameters of each performance index in the fitness function through the PSO algorithm, and put these weight parameters into the fitness function. Further, use the DE algorithm to optimize the K p and K i parameters. This method can flexibly cope with load changes and input power fluctuations, and improve the overall performance of the buck conversion circuit. Compared with the traditional method for setting parameters of the fitness function, this method can obtain better weight parameters through the PSO algorithm when designing the fitness function, providing an innovative technical solution for the optimization of the buck conversion circuit.

[0058] The present invention solves this difficult problem by introducing the Particle Swarm Optimization (PSO) algorithm. As a global optimization method based on swarm intelligence, the PSO algorithm has the advantages of simple implementation, few parameters, and fast convergence speed. Applying the PSO algorithm to the dynamic adjustment of the weights of various performance indicators in the fitness function of the buck converter enables the system to automatically optimize the weight allocation under different operating conditions, thereby improving the comprehensive performance of the system. In particular, the present invention solves the problem that it is difficult to accurately coordinate the weight coefficients in the past by analyzing the voltage curve and dynamically adjusting the weight ratio of the indicators. By dynamically adjusting the weight ratio in the fitness function through the PSO algorithm and combining the differential evolution algorithm to optimize the controller parameters, the present invention significantly improves the dynamic performance, steady-state accuracy, and overall stability of the buck converter. This method has strong adaptability and broad application prospects. Especially under complex load conditions, it can automatically adjust the optimization strategy to ensure that the converter can maintain excellent control performance under various working conditions.

[0059] The present invention has the following beneficial effects:

[0060] (1) Dynamic weight adjustment mechanism: The core of the present invention uses the Particle Swarm Optimization (PSO) algorithm to achieve dynamic weight adjustment. This mechanism is based on the controller parameters, dynamically allocates the weight ratio of the performance indicators through normalization processing, and adjusts the weights of each indicator in the fitness function according to the actual control effect. Specifically, a method of dynamically updating the weights based on the error between the target ratio and the actual ratio is adopted, so as to automatically adjust the components of the fitness function during the optimization process to ensure that each performance indicator (such as overshoot, steady-state error, etc.) is balanced during the optimization. Through this mechanism, the fitness function can be automatically designed, solving the difficulty of manually assigning weight coefficients in the traditional method and greatly simplifying the process of designing the fitness function. In the specific implementation, the PSO algorithm is used to optimize the parameters of the controller, and the target ratio is dynamically adjusted according to the error calculation, so that the weight allocation gradually tends to the optimal state during each optimization iteration, further improving the stability and response performance of the control system. Through this method, the performance of the controller is significantly improved, avoiding the empirical dependence on manually designing the controller, achieving end-to-end optimization, and the weight adjustment during the optimization process is more in line with the actual needs.

[0061] (2) Double-loop coordination of the fitness function setting of the global target of the buck circuit system and the controller system parameters: The full-parameter update of the inner loop is triggered every N iterations, and the search direction of the outer loop is corrected backward according to the optimization results of the inner loop, and global optimization is achieved through the reverse feedback between the outer loop and the inner loop.

[0062] (3) Fitness function in exponential form: Using the exponential form in the fitness function can enable the relatively poor solutions to be quickly "eliminated" during the search process, while the fitness values of the relatively better solutions are rapidly amplified. Due to the sensitivity of the exponential function, the fitness values of the relatively poor solutions usually quickly become very low, thus accelerating the concentration of the algorithm in the relatively better regions of the search space and improving the search efficiency.

[0063] (4) Multi-objective optimization strategy: The present invention adopts a multi-objective optimization strategy to comprehensively consider multiple performance indicators such as settling time (ST), overshoot (OV), steady-state error (SSE), and undershoot (UV) to achieve the overall optimization of the energy storage converter control system. Brief Description of the Drawings

[0064] Figure 1 is a flowchart of the method of the present invention.

[0065] Figure 2 is an optimization diagram of the control system of the buck conversion circuit in the embodiment of the present invention.

[0066] Figure 3 is a schematic diagram of the tracking comparison of the output voltage. Detailed Embodiment

[0067] The following further describes the present invention in detail in conjunction with the drawings and specific embodiments, and the above or other advantages of the present invention will become clearer.

[0068] As Figure 1 shown, the embodiment of the present invention provides a method for adjusting the dynamic performance weight of a buck converter based on particle swarm optimization, including the following steps:

[0069] Step 1, initialization. The fitness function includes multiple performance indicators, including the following steps:

[0070] Step 1.1, according to the experimental requirements, initialize the range and parameters, and give a fixed weight coefficient k 1 , k 3 , k 5 , k 7 . Set the number of dimensions, mutation factor, and crossover probability of the DE algorithm; set the range of PI parameters; set the number of iterations of the inner and outer loops;

[0071] Step 1.2, design the fitness function and encapsulate it in the evalution function, defined as:

[0072] (1),

[0073] k 1 , k 2 is the weight coefficient of the performance indicator ST, k3 , k 4 is the weight coefficient of the performance index OV, k 5 , k 6 is the weight coefficient of the performance index SSE, k 7 , k 8 is the weight coefficient of the performance index UV, where k 1 = 50, k 3 = 50, k 5 = 50, k 7 = 50. Denote as f 1 , as f 2 , as f 3 , as f 4 ;

[0074] Step 1.3, design the optimize_weights function, that is, the function to optimize the fitness function weight coefficients, and use the PSO algorithm for optimization. This optimization process is realized through the particle velocity update formula. The specific update formula is as follows:

[0075] Position update formula: The current position of each particle is updated through the following formula:

[0076] (2),

[0077] where is the current position of the i-th particle at the k-th iteration, is the velocity of the i-th particle at the (k + 1)-th iteration.

[0078] Velocity update formula: The velocity update formula for each particle is:

[0079] (3),

[0080] where is the inertia weight, which controls the retention degree of the particle velocity. and are the learning factors, which respectively control the gravitational forces of the particle towards its own historical optimal position and the global optimal position of the population. and are random numbers uniformly distributed between [0, 1]. is the historical optimal position of the i-th particle at the k-th iteration. is the global optimal position of the population.

[0081] Step 1.4, design the compute_dynamic_error function, which is the main function of PSO optimization. Its main function is to optimize based on the given K p ,K i obtained voltage images, and automatically obtain the optimal ratio through dynamic adjustment on the basis of the initially given contribution ratio. The ratio is updated according to the error in each iteration, and particle swarm optimization is performed to find the set of solutions with the smallest error. That is, the minimum error (error) value found by the particle swarm optimization algorithm is the final optimized objective function value, which is also the error value when the current contribution ratio (current_ratios) is closest to the target contribution ratio (target_ratios).

[0082] Specifically as follows:

[0083] Initialize the target contribution ratio:

[0084] The target contribution ratio is a dynamically adjusted value. When initialized, it is:

[0085] target_ratios = [0.25, 0.25, 0.25, 0.25] (4),

[0086] Calculate the current actual contribution ratio:

[0087] (5),

[0088] (6),

[0089] Dynamically adjust the target ratio:

[0090] (7),

[0091] where adjust_rate is the dynamic adjustment rate.

[0092] Error calculation:

[0093] (8),

[0094] The final error is the sum of the squared errors between the target ratio and the current ratio.

[0095] Step 1.5, initialize the container and create a container to store the optimal K p ,K i and simulation data in each outer loop, so as to output the voltage image for plotting and comparison after the loop ends.

[0096] Step 2: According to the real-time operation data of the buck conversion circuit, evaluate the circuit state and performance indicators at the current moment, and perform an outer loop. Dynamically allocate ratios, dynamically adjust the weight coefficients through the PSO algorithm, and output the adjusted k 2 ,k 4 ,k 6 ,k 8 to the inner loop. The closed-loop buck circuit of the present invention consists of the following key components:

[0097] Input terminal:

[0098] Vin: DC input voltage source, the positive input terminal;

[0099] Switching element:

[0100] Q1: Power switch transistor, its drain is connected to Vin, and its gate receives the PWM control signal;

[0101] Energy transfer element:

[0102] L1: Energy storage inductor, one end is connected to the source of Q1, and the other end is connected to the output terminal Vout;

[0103] D1: Freewheeling diode, its anode is connected to the common node of the source of Q1 and L1, and its cathode is grounded;

[0104] Filtering and load network:

[0105] C1: Output filter capacitor, connected across Vout and ground;

[0106] R1: Load resistor, connected in parallel across C1;

[0107] Control and feedback network:

[0108] PWM: Pulse width modulation signal source, its output terminal is connected to the gate of Q1, and the frequency and duty cycle are adjusted by the control logic;

[0109] Gc(s): Compensator transfer function module (PI controller), receives the feedback signal and generates an error compensation signal;

[0110] Vref: Reference voltage source, compared with the feedback voltage signal to generate an error signal input to Gc(s);

[0111] Vout: Output voltage node, fed back to the voltage division network or voltage sampling module of the control loop.

[0112] The specific circuit diagram is as Figure 2 shown.

[0113] Step 3: Perform the inner loop, optimize K through the DE algorithm p ,Ki Parameters, the specific steps are as follows:

[0114] Step 3.1, initialize the population and initialize the PI parameters (K p and K i ) for each individual (solution).

[0115] Step 3.2, use the evolutionary algorithm for optimization. Through operations such as mutation and crossover in the DE algorithm, continuously optimize K p , K i and output the value of fitness.

[0116] Step 3.3, update the current global optimal solution according to the fitness value.

[0117] Step 3.4, substitute the optimized K p , K i into the outer loop again, and optimize k 2 , k 4 , k 6 , k 8 again according to this set of parameters. And compare the optimal result of the current loop with the previously obtained optimal result, and retain the optimal value. Compare the specific requirements of the performance indicators corresponding to each group of K p , K i as follows:

[0118] OV less than 0.1, SSE less than 0.001, and UV less than 0.1 are considered qualified. On this basis, compare ST, and the smaller ST is, the better.

[0119] Step 4, substitute the obtained optimal controller parameter combination into the system, and draw a comparison chart of each performance indicator for comparison with static optimization, as Figure 3 shown.

[0120] The present invention provides a method for adjusting the dynamic performance weight of a buck converter based on particle swarm optimization. There are many methods and ways to specifically implement this technical solution. The above description is only the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention. Each component not clearly defined in this embodiment can be implemented by existing technologies.

Claims

1. A method for adjusting the dynamic performance weight of a buck converter based on particle swarm optimization, characterized in that: The following steps are involved: Step 1, initializing control parameters; initializing the population and number of iterations of the evolutionary algorithm; establishing a fitness function, wherein the fitness function includes performance indicators; Step 2, perform an outer loop: randomly generate a set of weight coefficients, and calculate and output the circuit state and performance indicators at the current moment according to the real-time operation data of the buck converter circuit, and calculate the actual contribution ratio of the circuit state and performance indicators at the current moment, compare the target contribution ratio with the actual contribution ratio, and perform normalized error calculation based on the target contribution ratio and the actual contribution ratio, and dynamically adjust the target contribution ratio based on the calculated error result; use the particle swarm algorithm to adjust each weight coefficient again; repeat step 2 until the optimal weight coefficient combination that minimizes the contribution ratio error is found; finally, feed the optimized weight coefficient back to the inner loop of step 3; Step 3: Perform inner loop: Optimize the proportional gain K through differential evolution algorithm p and integral gain K i , and reversely correct the search direction of the outer loop according to the optimization result of the inner loop, and achieve global optimization through reverse feedback between the outer loop and the inner loop; Step 4: Determine whether the following conditions are met: The voltage overshoot is less than 0.1, the steady-state error is less than 0.001, and the undershoot is less than 0.5; If all are satisfied, the optimized controller parameter K is retained. p ,K i The voltage stabilization time of the current optimal result is compared with the voltage stabilization time of the previously obtained optimal result, and the smaller voltage stabilization time is saved as the optimal result, and the optimized K p ,K i Substitute it into the outer loop of step 2 again, according to the parameter K p ,K i Optimize k2, k4, k6, k8 again; otherwise, directly use the optimized K p ,K i Substitute into the outer loop of step 2 until the iteration is completed and the optimal solution is found; where k2 is the weight coefficient of the performance indicator stabilization time ST, k4 is the weight coefficient of the performance indicator overshoot OV, k6 is the weight coefficient of the performance indicator steady-state error SSE, and k8 is the weight coefficient of the performance indicator undershoot UV; Step 5, input the obtained optimal controller parameters into the proportional-integral controller of the buck circuit, and output the optimized voltage curve.

2. The method according to claim 1, characterized in that Step 1 includes: Step 1.1, according to the experimental requirements, initialize the range and parameters, give fixed weight coefficients k1, k3, k5, k7; initialize the dynamically adjusted weight coefficients k2, k4, k6, k8; initialize the controller parameter K p and K i ; Set the number of dimensions, mutation factor and crossover probability of the differential evolution algorithm and initialize the population; set the range of controller parameters; set the number of iterations of the outer loop and inner loop; Step 1.2, design the fitness function fitness, and encapsulate the fitness function fitness in the evaluation function. The fitness function fitness is defined as: Among them, k1 is the weight coefficient of the performance indicator stabilization time ST, k3 is the weight coefficient of the performance indicator overshoot OV, k5 is the weight coefficient of the performance indicator steady-state error SSE, and k7 is the weight coefficient of the performance indicator undershoot UV; e is a natural constant; Will Denoted as the intermediate parameter f1, Denoted as the intermediate parameter f2, Denoted as the intermediate parameter f3, Denoted as intermediate parameter f4.

3. The method according to claim 1, characterized in that Step 2 includes: Step 2.1, design a function optimize_weights for optimizing the weight coefficient of the fitness function, wherein the function optimize_weights uses a particle swarm optimization algorithm for dynamic weight optimization, specifically including: The current position of each particle is updated using the following formula: in, is the current position of the ith particle at the kth iteration, is the velocity of the ith particle at the k+1th iteration; The velocity update formula for each particle is: Where ω is the inertia weight; c1 and c2 are learning factors; r1 and r2 are random numbers uniformly distributed between [0,1]; is the historical optimal position of the i-th particle at the k-th iteration; g (k) is the global optimal position of the population; Step 2.2, design the main function compute_dynamic_error for dynamic weight optimization, wherein the main function compute_dynamic_error is calculated by analyzing the proportional gain K p and integral gain K i The obtained voltage image is optimized based on the target contribution ratio given initially, and the optimal ratio is automatically obtained through dynamic adjustment. Each iteration updates the ratio according to the error, and performs particle swarm optimization. The particle swarm optimization algorithm is used to find the minimum error value as the solution with the minimum error, so that the actual contribution ratio current_ratios is close to the target contribution ratio target_ratios. Step 2.3, calculate the error again using the updated target contribution ratio and the actual contribution ratio obtained after the next iteration until the iteration ends; In step 2.4, the optimal weight coefficient combination that minimizes the contribution ratio error is fed back to the inner loop of step 3.

4. The method according to claim 3, characterized in that Step 2.2 includes: Step 2.2.1, initialize the target contribution ratio: The target contribution ratio is a dynamically adjusted value, which is initialized as: target_ratios=[0.25.0.25,0.25,0.25] (4), Step 2.2.2, calculate the current actual contribution ratio: First calculate the sum of the total performance indicators f total : <h2 style=";text-align:left;direction:ltr">f<h2 style=";text-align:left;direction:ltr"> total <h2 style=";text-align:left;direction:ltr"> (f1+f2+f3+f4)(5) Then calculate the actual contribution ratio of each indicator: in Denote as the actual contribution ratio of the first performance indicator current_ratios(1), The actual contribution ratio of the second performance indicator is current_ratios(2). The actual contribution ratio of the third performance indicator is current_ratios(3). Denote the actual contribution ratio of the fourth performance indicator as current_ratios(4); Step 2.2.3, dynamically adjust the target ratio; Step 2.2.4, calculate the contribution ratio error.

5. The method according to claim 4, characterized in that In step 2.2.3, the target ratio is dynamically adjusted using the following formula: target_ratios(i)=target_ratios(i)+adjust_rate·(current_ratios(i)-target_ratios(i)) (7), Where current_ratios(i) is the actual contribution ratio of the i-th performance indicator, i ranges from 1 to 4, target_ratios(i) is the target contribution ratio of the i-th performance indicator, and adjust_rate is the dynamic adjustment rate.

6. The method according to claim 4, characterized in that In step 2.2.4, the contribution ratio error is calculated using the following formula:

7. The method according to claim 1, characterized in that Step 3 includes: Step 3.1, initialize the population and initialize the proportional gain K for each individual p And the integral gain K i ; Step 3.2: Use the differential evolution algorithm to optimize. Through the mutation and crossover operations in the differential evolution algorithm, K is continuously optimized. p ,K i And output the fitness value; Step 3.3, update the current global optimal solution according to the fitness value; Step 3.4: The optimized K p ,K i Substitute it into the outer loop of step 2 again, and according to the optimized K p ,K i Optimize k2, k4, k6, k8, and cycle in sequence until the optimal controller parameters are obtained.

8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 7.

9. A storage medium, characterized in that: A computer program or instruction is stored, and when the computer program or instruction is run on a computer, the steps of the method according to any one of claims 1 to 7 are executed.

10. A buck converter, characterized in that: The buck converter uses the method according to any one of claims 1 to 7 to perform dynamic performance adjustment.

Citation Information

Patent Citations

  • Resistance heating furnace temperature control system for optimizing PID parameters based on particle swarm optimization

    CN117093033A

  • Method for optimizing PID (Proportion Integration Differentiation) controller of photovoltaic energy storage grid-connected inverter by particle swarm optimization

    CN117895567A