Current control parameter optimization method and device based on whale optimization PID algorithm

By applying the PID control method based on whale optimization algorithm in the current control system, dynamically adjusting the control parameters, the problems of complex setting of existing current control parameters and long response time are solved, and faster response speed, higher control accuracy and simpler operation process are achieved.

CN119846945AInactive Publication Date: 2025-04-18CHINA JILIANG UNIV
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510335104.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-04-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing current control parameter setting process is complicated, the response time is long, the control accuracy is not ideal, and professionals need to debug, and the threshold for use is high.

Method used

The PID control method based on whale optimization algorithm is adopted to detect unbalanced signals in the current system, and the proportion, integral and differential coefficients of the PID controller are dynamically adjusted by using whale optimization algorithm to optimize control parameters and realize the balance control of the current system.

Benefits of technology

The response speed of the current control system is improved, the fluctuation amplitude is reduced, the parameter setting process is simplified, and the operation is more convenient. The evaluation process is quantized through the fitness function, and performance indicators such as system error, control output, response time and overshoot are comprehensively considered.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119846945A_ABST
    Figure CN119846945A_ABST
Patent Text Reader

Abstract

The invention discloses a current control parameter optimization method and device based on a whale optimization algorithm. The method comprises the following steps: firstly, detecting an unbalanced signal in a current system, wherein the unbalanced signal comprises unbalanced magnetic potential and / or unbalanced voltage; secondly, inputting the unbalanced signal into a whale optimization PID (Proportion Integration Differentiation) controller; (inputting the unbalanced magnetic potential into the whale optimization PID controller); then, the whale optimization PID controller dynamically adjusts a proportionality coefficient, an integral coefficient and a differential coefficient of the PID controller through a whale optimization algorithm based on the imbalance signal so as to optimize control parameters; and finally, according to the optimized control parameters, adjusting the output current of the current source to realize balance control of the current system. Compared with a traditional control method, the method has the advantages that the response speed is higher, the fluctuation range is smaller, operation is convenient, the evaluation process is quantized through a fitness function, and the fitness value of whale optimization PID controller parameters updated every time is smaller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of current control, and more specifically, relates to a current control parameter optimization method and device based on a whale optimization algorithm. Background Art

[0002] In precision measurement systems, the optimization of control parameters plays a key role in system performance. Traditional PID control methods often require manual parameter adjustment, and the adjustment effect depends largely on the operator's experience. The current problems mainly include: 1. The system response time is long; 2. The control accuracy is not ideal; 3. The parameter setting process is complicated and requires professional personnel to debug, and the threshold for use is high. Summary of the invention

[0003] In view of the shortcomings of the prior art and to solve the problem of difficulty in setting the existing current control parameters, the present invention provides a current control parameter optimization method and device based on a whale optimization algorithm.

[0004] The present invention provides a current control parameter optimization method based on a whale optimization PID algorithm, comprising the following steps:

[0005] Step 1: Detect an unbalanced signal in a current system, wherein the unbalanced signal includes an unbalanced magnetic potential and / or an unbalanced voltage;

[0006] Step 2, inputting the unbalanced signal into the whale optimized PID controller; (the unbalanced magnetic potential is input into the whale optimized PID controller);

[0007] Step 3, the whale optimized PID controller dynamically adjusts the proportional coefficient, integral coefficient and differential coefficient of the PID controller based on the unbalanced signal through the whale optimization algorithm to optimize the control parameters;

[0008] Step 4: According to the optimized control parameters, the output current of the current source is adjusted to achieve balanced control of the current system;

[0009] The whale optimization algorithm simulates the predation behavior of whales, switches between three strategies: encircling prey, bubble net predation, and random search, to dynamically adjust control parameters, and evaluates the optimization effect through the fitness function until the preset optimization termination condition is reached.

[0010] The present invention also provides a current control parameter optimization device based on a whale optimization PID algorithm, comprising:

[0011] A signal detection module, used for detecting an unbalanced signal in a current system, wherein the unbalanced signal includes an unbalanced magnetic potential and / or an unbalanced voltage;

[0012] A whale optimized PID controller, used for receiving the unbalanced magnetic potential, and dynamically adjusting the proportional coefficient, integral coefficient and differential coefficient of the PID controller through a whale optimization algorithm to optimize control parameters;

[0013] The current source regulation module is used to adjust the output current of the current source according to the optimized control parameters to achieve balanced control of the current system.

[0014] The beneficial effects of the present invention are:

[0015] The present invention has a faster response speed and smaller fluctuation amplitude than the traditional control method and is easy to operate. The evaluation process is quantified through a fitness function, which comprehensively considers multiple performance indicators such as system error, control output, response time and overshoot, so that the fitness value of the whale optimized PID controller parameters updated each time is smaller. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 Control block diagram of the digital current control parameter optimization method.

[0017] Figure 2 Block diagram of the optimized PID controller for whales.

[0018] Figure 3 This is the system block diagram of the digital current control device. DETAILED DESCRIPTION

[0019] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. Embodiments of the present application are provided in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.

[0020] In one aspect of the present application, a current control parameter optimization device based on a whale-optimized PID algorithm is provided, comprising a signal detection circuit, a voltage detection module and a whale-optimized PID controller.

[0021] The signal detection circuit is used to detect the unbalanced magnetic potential in the coil, and comprises a detection circuit coil, a first winding, a second winding and a third winding.

[0022] One end of the voltage detection module is connected to one end of the first external resistor, and the other end is connected to one end of the second external resistor. The voltage detection module detects the unbalanced voltage between the first external resistor and the second external resistor.

[0023] The whale optimized PID controller changes the current on the second voltage-controlled current source by acquiring the unbalanced magnetic potential, thereby achieving current balance.

[0024] The whale optimized PID controller changes the current generated by the third voltage-controlled current source by acquiring the unbalanced voltage of the voltage detection module, thereby achieving voltage balance.

[0025] Furthermore, it also includes a first voltage-controlled current source and a second voltage-controlled current source. When achieving the current balance, the sum of the product of the current generated by the first voltage-controlled current source and the number of turns of the first winding and the product of the current generated by the third voltage-controlled current source and the number of turns of the third winding is equal to the product of the current generated by the second voltage-controlled current source and the number of turns of the second winding.

[0026] Furthermore, the whale optimized PID controller can find out the optimal whale optimized PID controller parameters by calculating individual fitness and performance indicators.

[0027] Furthermore, the whale optimized PID controller includes:

[0028] An initialization unit, used for randomly generating candidate solutions including proportional coefficients, integral coefficients and differential coefficients;

[0029] A strategy switching unit, used to switch between three strategies: encircling prey, bubble net hunting, and random search;

[0030] The optimization evaluation unit is used to evaluate the performance of individuals through the fitness function and update the optimal individual.

[0031] Another aspect of the present application provides a current control parameter optimization method, based on the above-mentioned device, the method includes:

[0032] The unbalanced magnetic potential generated by the signal detection circuit is obtained and sent to the whale optimized PID controller, and the second voltage-controlled current source is controlled based on the unbalanced magnetic potential to achieve current balance;

[0033] The unbalanced voltage of the voltage detection module is obtained and sent to the whale optimized PID controller, and the third voltage-controlled current source is controlled based on the unbalanced voltage value to achieve voltage balance.

[0034] Further, the whale optimization PID controller: The whale optimization algorithm is a meta-heuristic optimization method inspired by the humpback whale's predation behavior, which finds the optimal individual by simulating the bubble net predation technology. The algorithm switches between three strategies of encircling prey, bubble net predation and random search according to random parameters in each iteration, and realizes the balanced transition from global exploration to local development through the dynamic adjustment of control parameters. After each iteration, the individual fitness is evaluated and the optimal individual is updated until the termination condition is reached.

[0035] Taking the measurement of the resistance value as an example, this embodiment adopts the following technical solutions:

[0036] like Figure 1 and Figure 3 As shown, the current control system includes: a signal detection module, a first voltage signal generator, a first voltage-controlled current source, a first external resistor, a second external resistor, a second voltage-controlled current source, a second voltage signal generator, a third voltage-controlled current source, a third voltage signal generator, a third external resistor, a digital signal isolator, a controller, a drive module, and a switch array.

[0037] The signal detection module in this embodiment includes a signal detection circuit, a feedback control circuit, and a voltage detection module. The detection module realizes signal transmission and conversion through multiple coupling units.

[0038] The first voltage signal generator is connected to the first voltage-controlled current source, the second voltage signal generator is connected to the second voltage-controlled current source, and the third voltage signal generator is connected to the third voltage-controlled current source. Each voltage-controlled current source is connected to a corresponding external winding to form a complete measurement loop. The voltage detection module is respectively connected to the first external resistor and the second external resistor to form a measurement network.

[0039] In this embodiment, the signal detection module is connected to the first voltage signal generator, the second voltage signal generator, the third voltage signal generator, and the digital signal isolator, and the digital signal isolator is connected to the controller. In addition, in order to facilitate operation, an external display screen can be connected to the controller to facilitate real-time monitoring and adjustment of system parameters. The signal detection module is connected to the digital signal isolator through the drive module and the switch array.

[0040] After the system is started, it is initialized first, and the current parameter of the first voltage-controlled current source, the reference value of the first external resistor and the second external resistor are set by the controller. The first external resistor is used as a reference resistor, and the second external resistor is used as a measuring resistor.

[0041] When the measurement starts, the signal detection circuit continuously monitors the signal balance state in the system and outputs the corresponding voltage signal. After receiving the signal, the controller inputs it into the whale optimized PID controller for processing, and the processing result is returned to the second voltage signal generator, thereby adjusting the output of the second voltage-controlled current source to achieve dynamic balance of the system.

[0042]

[0043] When the above formula is established, the current of the entire system reaches a balanced state, where I1 is the current generated by the first voltage-controlled current source, N1 is the number of turns of the first winding, I2 is the current generated by the second voltage-controlled current source, N2 is the number of turns of the second winding, I3 is the current generated by the third voltage-controlled current source, and N3 is the number of turns of the third winding.

[0044] At the same time, the voltage detection module gives the voltage value on the first external resistor and the second external resistor, which is called the unbalanced voltage. The unbalanced voltage will be input to the whale optimized PID controller, and then input to the feedback control circuit. The final result is fed back to the second voltage-controlled current source signal generator, thereby controlling the second voltage-controlled current source.

[0045]

[0046] When the above equation is satisfied, the unbalanced voltage is 0, where I1 is the current generated by the first voltage-controlled current source, R1 is the resistance of the first external component, I2 is the current generated by the second voltage-controlled current source, and R2 is the resistance of the second external component.

[0047] When the two formulas are true at the same time, the following formula is obtained:

[0048]

[0049] Where R1 is the first external resistor, R2 is the second external resistor, N1 is the first winding, N2 is the second winding, I3 is the current generated by the third voltage-controlled current source, and N3 is the third winding. When I3 in the system is 0, it proves that the system has reached equilibrium. Then the ratio of the external resistors is equal to the ratio of the number of coil turns.

[0050] The Whale Optimized PID controller begins the current control process with the initialization phase. First, the algorithm randomly generates candidate solutions, each of which contains three parameters: proportional coefficient Kp, integral coefficient Ki, and differential coefficient Kd. The control output of PID is:

[0051]

[0052] Among them, u(t) is the control signal, e(t) is the error signal, and the proportional coefficient Kp directly acts on the current error, determining the controller's ability to respond quickly to deviations. The integral coefficient Ki acts on the accumulation of errors, which can eliminate the steady-state error of the system and stabilize the system at the set value. The differential coefficient Kd acts on the rate of change of the error, which has the function of predicting and suppressing overshoot, and can improve the stability and dynamic performance of the system. The whale optimization algorithm simulates the predation behavior of whales and iteratively optimizes these three parameters, so that the output of the PID controller achieves the best performance in the current control system, which can respond quickly and maintain stability. Discretize PID:

[0053]

[0054] Where u(k) is the control output at time k, e(k) is the error, Kp, Ki, Kd are the proportional coefficient, integral coefficient, and differential coefficient, Ts is the sampling period, e(k-1) is the error value at time (k-1), and sum(e) is the cumulative sum of all error values ​​from the initial sampling time to the current sampling time.

[0055] During the optimization process, the algorithm continuously updates Kp, Ki, and Kd by simulating the predation behavior of whales. Each iteration contains three possible update strategies: bubble net predation, random search, and encirclement of prey. The algorithm determines which strategy to adopt by the values ​​of random parameters p and A. p≥0.5 is the bubble net predation stage; when p<0.5 and |A|<1, the individual will move closer to the currently found optimal individual to encircle the prey; when p<0.5 and |A|≥1, the individual will move away from the current optimal individual and perform random search. p is a number randomly generated by the system, and A is a vector parameter that determines the whale's update strategy. The complete process is as follows:

[0056] First, initialize the whale position:

[0057]

[0058] In the formula, X i represents the position of any individual, l b and u b are the lower and upper bounds of the search space, and rand is a random number between 0 and 1. Next,

[0059] 1. Encirclement of prey mechanism. The calculation formula of this process is as follows:

[0060] Humpback whales identify prey and surround it:

[0061]

[0062] D represents the distance vector between the current whale individual and the prey, and C represents the coefficient vector. * (t) is the optimal solution position vector found currently, X(t) is the position vector of the previous whale individual, and t is the current iteration number. Based on the calculated distance, update the position of the whale:

[0063]

[0064] Where X(t+1) is the position of the individual whale in the next iteration, and A is the coefficient vector.

[0065]

[0066] Where a is a control parameter, which decreases linearly from 2 to 0 during the iteration process, and r is a random vector with a value range of [0,1]

[0067]

[0068] 2. Bubble net predation mechanism. The calculation formula of this process is as follows

[0069] Simulate spiral upward motion:

[0070]

[0071] Where D' is the absolute distance between the individual whale and the current optimal position, b is the constant defining the spiral shape, l is a random number in the interval [-1,1]. e is a logarithmic constant, cos is the cosine function, and π is the circumference of a circle.

[0072] in

[0073] The algorithm uses a probabilistic mechanism to update:

[0074] If m<0.5:

[0075]

[0076] If m ≥ 0.5:

[0077]

[0078] Where m is a random number between 0 and 1.

[0079] 3. Random search mechanism. The formula of this process is as follows:

[0080]

[0081]

[0082] X rand is a position vector randomly selected from the current population, representing the position of a randomly selected reference individual.

[0083] After each update of a set of parameters, the algorithm will pass through the system to evaluate its control effect. The evaluation process is quantified by the fitness function, which is expressed as

[0084]

[0085] J is the fitness function, || is the absolute value, w1 and w2 are weight coefficients, e(t) is the system error, u(t) is the control output, t uis the rise time, P is the overshoot penalty term, and λ is the rise time weight coefficient. This function comprehensively considers multiple performance indicators such as system error, control output, rise time and overshoot, and a smaller fitness value means a better control effect. In each iteration, if an individual finds a better solution than the current optimal individual (that is, the fitness value is smaller), the global optimal individual record will be updated.

[0086] A boundary processing mechanism is also provided in this embodiment to ensure that the updated parameters do not exceed the preset range. If the parameters exceed the range after being updated, they will be truncated to the boundary value. This ensures that all candidate solutions are valid PID parameter combinations. The entire optimization process is continuously iterated, and each iteration will output the currently found optimal parameter combination and its corresponding fitness value, so that the optimization process can be tracked and monitored. After the complete optimization process, the algorithm finally converges to a set of optimal PID parameters. This set of parameters can ensure that the system responds quickly while maintaining good steady-state performance. The optimization results are verified by the continuous decrease in the fitness value, indicating that the control performance continues to improve during the optimization process. The PID parameters finally obtained enable the current optimization control system to achieve fast and accurate balance and meet the requirements of high-precision measurement, see Figure 2 .

[0087] The present invention also discloses a current control optimization method, referring to Figure 1 , Figure 2 , mainly in Figure 3 Digital current control parameters are based on Figure 1 After perfecting the automatic balancing model of digital current control parameter optimization, or performing parameter trial and error to obtain the corresponding control parameters, a program is written on the controller so that the system can continuously obtain the unbalanced magnetic potential detected by the signal detection circuit and send it to the whale optimized PID controller, which outputs the feedback signal to the second voltage signal generator through the feedback control circuit, controls the output current of the second voltage-controlled current source, changes the magnetic potential of the second winding, and continuously obtains the unbalanced voltage of the voltage detection module while achieving current balance. It is sent to the whale optimized PID controller, and its output controls the current of the third voltage-controlled current source to achieve voltage balance. After finally achieving current balance and voltage balance, it can be deduced that the ratio of the first external resistance to the second external resistance is equal to the ratio of the number of turns of the first winding to the number of turns of the second winding, thereby obtaining the resistance value of the second external resistance, that is, the resistance to be measured.

[0088] The above is a detailed introduction to the current control parameter optimization method and device based on the whale optimization PID algorithm provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A current control parameter optimization method based on whale optimization PID algorithm, characterized in that: The following steps are involved: Step 1: Detect an unbalanced signal in a current system, wherein the unbalanced signal includes an unbalanced magnetic potential and / or an unbalanced voltage; Step 2, inputting the unbalanced signal into the whale optimized PID controller; Step 3, the whale optimized PID controller dynamically adjusts the proportional coefficient, integral coefficient and differential coefficient of the PID controller based on the unbalanced signal through the whale optimization algorithm to optimize the control parameters; Step 4: According to the optimized control parameters, the output current of the current source is adjusted to achieve balanced control of the current system; The whale optimization algorithm simulates the predation behavior of whales, switches between three strategies: encircling prey, bubble net predation, and random search, to dynamically adjust control parameters, and evaluates the optimization effect through the fitness function until the preset optimization termination condition is reached.

2. The current control parameter optimization method based on the whale optimization PID algorithm according to claim 1 is characterized in that: The detection of the unbalanced signal comprises: a. An unbalanced magnetic potential in the detection coil by a signal detection circuit, wherein the signal detection circuit comprises a detection circuit coil and a plurality of windings; b. Detecting an unbalanced voltage on an external resistor through a voltage detection module, wherein the voltage detection module is connected to the external resistor.

3. The current control parameter optimization method based on the whale optimization PID algorithm according to claim 1 or 2, characterized in that: The whale optimization algorithm achieves the optimization of control parameters through the following steps: a. Initialize the whale position and randomly generate candidate solutions including proportional coefficients, integral coefficients and differential coefficients; b. In each iteration, switch between the three strategies of encircling prey, bubble net hunting and random search according to random parameters; c. Evaluate the performance of the individual through the fitness function and update the optimal solution until the termination condition is reached.

4. The current control parameter optimization method based on the whale optimization PID algorithm according to claim 3 is characterized in that: The fitness function comprehensively considers multiple performance indicators such as system error, control output, response time and overshoot, and its expression is: Among them, || represents the absolute value, w1 and w2 are weight coefficients, e(t) is the system error, u(t) is the control output, and t u is the rise time, P is the overshoot penalty term, and λ is the rise time weight coefficient.

5. The current control parameter optimization method based on the whale optimization PID algorithm according to claim 1 is characterized in that: The balance control of the current system includes: a. According to the optimized control parameters, adjusting the output current of the second voltage-controlled current source to achieve current balance; b. According to the optimized control parameters, the output current of the third voltage-controlled current source is adjusted to achieve voltage balance.

6. The current control parameter optimization method based on the whale optimization PID algorithm according to claim 1 or 5, characterized in that: The method also includes transmitting the detection signal to the controller through a digital signal isolator to achieve signal isolation and stable transmission.

7. A current control parameter optimization device based on whale optimization PID algorithm, characterized in that: include: A signal detection module, used for detecting an unbalanced signal in a current system, wherein the unbalanced signal includes an unbalanced magnetic potential and / or an unbalanced voltage; A whale optimized PID controller, used for receiving the unbalanced signal and dynamically adjusting the proportional coefficient, integral coefficient and differential coefficient of the PID controller through a whale optimization algorithm to optimize control parameters; The current source regulation module is used to adjust the output current of the current source according to the optimized control parameters to achieve balanced control of the current system.

8. The current control parameter optimization device based on the whale optimization PID algorithm according to claim 7, characterized in that: The signal detection module comprises: A signal detection circuit for detecting an unbalanced magnetic potential in the coil; Voltage detection module, used to detect unbalanced voltage on external resistors.

9. The current control parameter optimization device based on the whale optimization PID algorithm according to claim 7 or 8, characterized in that: The whale optimized PID controller includes: An initialization unit, used for randomly generating candidate solutions including proportional coefficients, integral coefficients and differential coefficients; A strategy switching unit, used to switch between three strategies: encircling prey, bubble net hunting, and random search; The optimization evaluation unit is used to evaluate the performance of individuals through the fitness function and update the optimal solution.

10. The current control parameter optimization device based on the whale optimization PID algorithm according to claim 9, characterized in that: The current source regulation module comprises: A second voltage-controlled current source is used to adjust the output current according to the optimized control parameters to achieve current balance; The third voltage-controlled current source is used to adjust the output current according to the optimized control parameters to achieve voltage balance.

Citation Information

Patent Citations

  • PID parameter optimization method based on adaptive fruit fly optimization algorithm

    CN107367937A

  • Apparatus and method for controlling camera module

    CN116249003A

  • Inverter control method based on whale algorithm fuzzy PID control

    CN116610029A

  • Centrifugal pump hydraulic optimization method based on multi-strategy improved whale swarm algorithm

    CN117973181A

  • IFOPIDD2-based AVR system voltage control method and medium

    CN118017885A