Motor and control method and device thereof, compressor, air conditioner, medium and product
By optimizing the whale algorithm and adjusting the parameters of the PI controller, the problems of instability and large load interference in the air-conditioning compressor system are solved, and high-performance control of the motor is achieved.
Patent Information
- Application Number
- CN202510873253.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-07-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
There are problems of instability and heavy load interference in the air conditioning compressor system, which affects the control performance of the motor.
Introduce nonlinear inertial weights and learning strategy optimization whale algorithm, design an improved whale optimization algorithm (IWOA), adjust the proportional parameters and integral parameters of the PI controller, and optimize the speed ring and current ring control of the motor.
It improves the control performance of the motor, solves the problems of unstable speed overshoot and large load interference, and enhances the system's anti-load disturbance capability and stability.
Smart Images

Figure CN120377724A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of motors, and particularly relates to a control method, device, motor, compressor, air conditioner, storage medium, and computer program product of a motor, and more particularly to a control method, device, motor, compressor, air conditioner, storage medium, and computer program product of an air conditioner compressor based on an improved whale optimization algorithm. Background Art
[0002] In the control system of a motor, such as in an air conditioner compressor system (especially the control system of a permanent magnet synchronous motor for an air conditioner compressor), there are common phenomena such as instability and large load interference, which affect the control performance of the motor (such as an air conditioner compressor motor).
[0003] The above content is only used to assist in understanding the technical solution of the present invention, and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The purpose of the present invention is to provide a control method, device, motor, compressor, air conditioner, storage medium, and computer program product of a motor to solve the problems that in the control system of a motor (such as an air conditioner compressor system), there are phenomena such as instability and large load interference, which affect the control performance of the motor (such as an air conditioner compressor motor), and to achieve the effect of optimizing the preset whale algorithm by introducing a non-linear inertia weight and a learning strategy, and designing a PI controller for the speed loop in the motor control system to realize the actual speed control of the motor and improve the control performance of the motor.
[0005] The present invention provides a control method of a motor. The control system of the motor has a first PI controller. The control method of the motor includes: optimizing a preset whale algorithm by introducing a non-linear inertia weight and a learning strategy, adjusting the first PI controller to obtain an optimized PI controller; when the motor starts or runs, obtaining the three-phase current of the motor, obtaining the actual speed of the motor, and obtaining the rotor position angle of the motor; in the control system of the motor, according to the actual speed of the motor, the three-phase current of the motor, and the rotor position angle of the motor, using the optimized PI controller to realize the control of the motor.
[0006] In some embodiments, optimizing a preset whale algorithm by introducing a non-linear inertia weight and a learning strategy, adjusting the first PI controller to obtain an optimized PI controller includes: optimizing a preset whale algorithm by introducing a non-linear inertia weight and a learning strategy to obtain an improved whale optimization algorithm; using the improved whale optimization algorithm to optimize the first PI controller to obtain an optimized PI controller.
[0007] In some embodiments, the whale optimization algorithm is optimized by introducing a non - linear inertia weight and a learning strategy to obtain an improved whale optimization algorithm, including: in a preset whale optimization algorithm, a non - linear inertia weight is introduced, and after iteratively balancing the local search ability and the global search ability, the whale optimization algorithm is obtained; based on the whale optimization algorithm, a learning strategy is introduced, and after optimizing the positions of each individual in the whale population, the optimal solution is obtained as the improved whale optimization algorithm; and / or, the control parameters of the first PI controller include a proportional parameter and an integral parameter; using the improved whale optimization algorithm to optimize the first PI controller to obtain an optimized PI controller, including: using the improved whale optimization algorithm to optimize the proportional parameter and the integral parameter of the first PI controller to obtain an optimized PI controller.
[0008] In some embodiments, the control system of the motor has a speed loop and a current loop; the speed loop has the first PI controller, and the current loop has a second PI controller and a third PI controller; in the control system of the motor, according to the actual speed of the motor, the three - phase current of the motor, and the rotor position angle of the motor, using the optimized PI controller to achieve the control of the motor, including: in the speed loop, according to the actual speed of the motor, using the optimized PI controller to obtain the q - axis reference current of the motor; in the current loop, according to the q - axis reference current of the motor, the three - phase current of the motor, and the rotor position angle of the motor, using the second PI controller and the third PI controller to achieve the control of the motor.
[0009] In some embodiments, in the speed loop, according to the actual speed of the motor, using the optimized PI controller to obtain the q-axis reference current of the motor includes: in the speed loop, obtaining the q-axis reference current of the motor by passing the difference between the reference speed of the motor and the actual speed of the motor through the optimized PI controller; and / or, in the current loop, according to the q-axis reference current of the motor, the three-phase current of the motor, and the rotor position angle of the motor, using the second PI controller and the third PI controller to control the motor, including: in the current loop, determining the d-axis current and the q-axis current of the motor according to the three-phase current of the motor; in the q-axis part of the current loop, obtaining the q-axis voltage of the motor by passing the difference between the q-axis reference current of the motor and the q-axis current of the motor through the second PI controller; in the d-axis part of the current loop, obtaining the d-axis voltage of the motor by passing the difference between the d-axis reference current of the motor and the d-axis current of the motor through the third PI controller; and controlling the three-phase current of the motor through voltage space vector processing according to the q-axis voltage and the d-axis voltage of the motor to achieve speed control of the motor.
[0010] Matched with the above method, on the other hand, the present invention provides a control device for a motor. The control system of the motor has a first PI controller. The control device for the motor includes: a control unit configured to optimize a preset whale algorithm by introducing a non-linear inertia weight and a learning strategy, and adjust the first PI controller to obtain an optimized PI controller; an acquisition unit configured to acquire the three-phase current of the motor, the actual speed of the motor, and the rotor position angle of the motor when the motor starts or runs; and the control unit is further configured to use the optimized PI controller to control the motor according to the actual speed of the motor, the three-phase current of the motor, and the rotor position angle in the control system of the motor.
[0011] In some embodiments, the control unit optimizes a preset whale algorithm by introducing a non-linear inertia weight and a learning strategy, and adjusts the first PI controller to obtain an optimized PI controller, including: optimizing the preset whale algorithm by introducing a non-linear inertia weight and a learning strategy to obtain an improved whale optimization algorithm; and using the improved whale optimization algorithm to optimize the first PI controller to obtain an optimized PI controller.
[0012] In some embodiments, the control unit optimizes the whale algorithm by introducing a non-linear inertia weight and a learning strategy to obtain an improved whale optimization algorithm, including: introducing a non-linear inertia weight into a preset whale algorithm, and after iteratively balancing the local search ability and the global search ability, obtaining the whale optimization algorithm; based on the whale optimization algorithm, introducing a learning strategy, and after optimizing the positions of each individual in the whale population, obtaining an optimal solution as the improved whale optimization algorithm; and / or, the control parameters of the first PI controller include: a proportional parameter and an integral parameter; the control unit uses the improved whale optimization algorithm to optimize the first PI controller to obtain an optimized PI controller, including: using the improved whale optimization algorithm to optimize the proportional parameter and the integral parameter of the first PI controller to obtain an optimized PI controller.
[0013] In some embodiments, the control system of the motor has a speed loop and a current loop; the speed loop has the first PI controller, and the current loop has a second PI controller and a third PI controller; the control unit, in the control system of the motor, according to the actual speed of the motor, the three-phase current of the motor, and the rotor position angle of the motor, uses the optimized PI controller to implement the control of the motor, including: in the speed loop, according to the actual speed of the motor, using the optimized PI controller to obtain the q-axis reference current of the motor; in the current loop, according to the q-axis reference current of the motor, the three-phase current of the motor, and the rotor position angle of the motor, using the second PI controller and the third PI controller to implement the control of the motor.
[0014] In some embodiments, the control unit, in the speed loop, according to the actual speed of the motor, uses the optimized PI controller to obtain the q-axis reference current of the motor, including: in the speed loop, subtracting the actual speed of the motor from the reference speed of the motor, and after passing through the optimized PI controller, obtaining the q-axis reference current of the motor; and / or, the control unit, in the current loop, according to the q-axis reference current of the motor, the three-phase current of the motor, and the rotor position angle of the motor, uses the second PI controller and the third PI controller to control the motor, including: in the current loop, determining the d-axis current and the q-axis current of the motor according to the three-phase current of the motor; in the q-axis part of the current loop, subtracting the q-axis current of the motor from the q-axis reference current of the motor, and after passing through the second PI controller, obtaining the q-axis voltage of the motor; in the d-axis part of the current loop, subtracting the d-axis current of the motor from the d-axis reference current of the motor, and after passing through the third PI controller, obtaining the d-axis voltage of the motor; according to the q-axis voltage and the d-axis voltage of the motor, after voltage space vector processing, controlling the three-phase current of the motor to achieve speed control of the motor.
[0015] Matched with the above device, on the other hand, the present invention provides a motor, including: the control device of the motor described above.
[0016] Matched with the above device, on the other hand, the present invention provides a compressor, including: the control device of the motor described above, or the motor described above.
[0017] Matched with the above device, on the other hand, the present invention provides an air conditioner, including: the control device of the motor described above, or the motor described above, or the compressor described above.
[0018] Matched with the above method, on the other hand, the present invention provides a storage medium, the storage medium includes a stored program, wherein, when the program runs, it controls the device where the storage medium is located to execute the steps of the control method of the motor described above.
[0019] Matched with the above method, on the other hand, the present invention provides a computer program product, including a computer program, when the computer program is executed by a processor, it implements the steps of the control method of the motor described above.
[0020] Thus, in the solution of the present invention, by introducing a non-linear inertia weight and learning strategy, the whale optimization algorithm (i.e., WOA) is optimized to obtain an improved whale optimization algorithm (i.e., IWOA); using the improved whale optimization algorithm (i.e., IWOA), the proportional parameter K of the PI controller in the speed loop of the motor control system is adjusted. P, integral parameter K I The gain of is obtained to get a PI controller based on the improved whale optimization algorithm (i.e., the IWOA-PI control system) to control the actual speed of the motor. Thus, by introducing the non-linear inertia weight and learning strategy, the preset whale algorithm (i.e., WOA) is optimized, and the PI controller of the speed loop in the motor control system is designed accordingly to achieve the control of the actual speed of the motor and improve the control performance of the motor.
[0021] Other features and advantages of the present invention will be described in the subsequent description, and in part, will become apparent from the description or be understood by implementing the present invention.
[0022] The technical solution of the present invention will be further described in detail below with reference to the drawings and embodiments. Description of the Drawings
[0023] Figure 1 It is a schematic flowchart of an embodiment of the control method of the motor of the present invention;
[0024] Figure 2 It is a schematic flowchart of an embodiment of adjusting the first PI controller to obtain an optimized PI controller in the method of the present invention;
[0025] Figure 3 It is a schematic flowchart of an embodiment of optimizing the whale algorithm in the method of the present invention;
[0026] Figure 4 It is a schematic flowchart of an embodiment of using the optimized PI controller to achieve the control of the motor in the method of the present invention;
[0027] Figure 5 It is a schematic flowchart of an embodiment of achieving the control of the motor in the current loop in the method of the present invention;
[0028] Figure 6 It is a schematic structural diagram of an embodiment of the control device of the motor of the present invention;
[0029] Figure 7 It is a schematic control logic diagram of a permanent magnet synchronous motor control system for an air conditioner compressor based on the improved whale optimization algorithm;
[0030] Figure 8 It is a schematic control logic diagram of the improved whale optimization algorithm control system;
[0031] Figure 9 It is the unimodal noise function of the WOA algorithm and the IWOA algorithm The comparison result table, i.e., Table 1;
[0032] Figure 10 It is the test function of the WOA algorithm and the IWOA algorithm The comparison result table is Table 2;
[0033] Figure 11 It is a schematic flow chart for improving the whale optimization algorithm;
[0034] Combined with the accompanying drawings, the reference numerals in the embodiments of the present invention are as follows:
[0035] 102 - acquisition unit; 104 - control unit. Detailed implementation manners
[0036] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present invention.
[0037] Considering that in the control system of an electric motor (such as an air conditioner compressor system), there are phenomena such as instability and large load interference, which affect the control performance of the electric motor (such as an air conditioner compressor motor). To ensure the control performance of the air conditioner compressor motor and improve problems such as overshoot instability and large load interference of the motor speed during actual operation, it is necessary to optimize the PI (i.e., proportional-integral) control in the motor control system.
[0038] The Whale Optimization Algorithm (WOA) is a swarm intelligence optimization algorithm that simulates the foraging behavior of humpback whales. The whale algorithm (i.e., WOA) has high convergence accuracy and faster convergence speed. However, using the whale algorithm (i.e., WOA) to tune the PI parameters of the motor is prone to falling into the misunderstanding of local optimum rather than global optimum. For example, in a self-tuning method for servo system parameters based on an improved whale optimization algorithm proposed in some solutions, an adaptive processing method for the probability PL and convergence factor a in the whale algorithm is disclosed, which has a certain degree of improvement on the convergence accuracy and convergence speed of the whale algorithm (i.e., WOA). However, the problem of falling into the local optimum still exists with a relatively high probability. Therefore, the solution of the present invention optimizes and improves the whale algorithm, combines advanced control algorithms to design an adaptive controller to solve the instability and large interference problems of the compressor motor, which has important engineering significance for realizing high-performance control of the air conditioner compressor system.
[0039] Therefore, for the control system of an electric motor (such as an air-conditioning compressor system), especially for the phenomena of instability and large load interference commonly existing in the permanent magnet synchronous motor control system for air-conditioning compressors, the solution of the present invention proposes a control method for an electric motor, specifically a control method for an air-conditioning compressor based on an improved whale optimization algorithm. A non-linear inertia weight is introduced to balance the local and global search capabilities of the algorithm. According to the idea of the learning strategy, the position of each individual in the whale population is optimized to obtain an improved whale optimization algorithm, that is, the improved whale algorithm (Improve Whale Algorithm, IWOA); the PI gains of the PI controller are adjusted based on the improved whale optimization algorithm to obtain a PI controller based on the improved whale optimization algorithm; the control output value of the PI controller based on the improved whale optimization algorithm is input into the permanent magnet synchronous motor to achieve the actual speed control of the motor and improve the control performance of the motor.
[0040] According to an embodiment of the present invention, there is provided a control method for an electric motor, as Figure 1 shown in the schematic flow chart of an embodiment of the method of the present invention. The control system of the electric motor has a first PI controller; in the solution of the present invention, as Figure 1 shown, the control method of the electric motor includes: step S110 to step S130.
[0041] At step S110, in advance, the preset whale algorithm is optimized by introducing a non-linear inertia weight and a learning strategy, and the first PI controller is adjusted to obtain an optimized PI controller, such as a PI controller based on the improved whale optimization algorithm (i.e., the IWOA-PI control system).
[0042] At step S120, when the electric motor starts or runs, the three-phase current of the electric motor is acquired, the actual speed of the electric motor is acquired, and the rotor position angle of the electric motor is acquired; wherein, the three-phase current of the electric motor is such as the a, b, and c phase currents i a , i b and i c of the electric motor, the actual speed of the electric motor is such as the response speed n of the electric motor, and the rotor position angle of the electric motor is such as the rotor position angle θ of the electric motor.
[0043] At step S130, in the control system of the electric motor, according to the actual speed of the electric motor, the three-phase current of the electric motor, and the rotor position angle of the electric motor, the optimized PI controller is used to achieve the control of the electric motor.
[0044] The solution of the present invention proposes an improved whale optimization algorithm (i.e., IWOA). First, a non-linear inertia weight is introduced to balance the local and global search capabilities of the algorithm. Second, according to the idea of the learning strategy, the position of each individual in the whale population is optimized; and based on this, a PI controller based on the improved whale optimization algorithm is designed, thereby providing a control method for a permanent magnet synchronous motor control system of an air conditioner compressor, that is, an air conditioner compressor control method based on the improved whale optimization algorithm. The control output value of the PI controller based on the improved whale optimization algorithm is input into the permanent magnet synchronous motor to achieve the actual speed control of the motor and improve the control performance of the motor.
[0045] In some embodiments, in step S110, in advance, the preset whale algorithm is optimized by introducing the non-linear inertia weight and the learning strategy, and the first PI controller is adjusted. For the specific process of obtaining the optimized PI controller, refer to the following exemplary description.
[0046] The following combines Figure 2 FIG. shows a schematic flowchart of an embodiment of adjusting the first PI controller to obtain an optimized PI controller in the method of the present invention, and further illustrates the specific process of adjusting the first PI controller to obtain an optimized PI controller in step S110, including: step S210 to step S220.
[0047] Step S210, in advance, the preset whale algorithm is optimized by introducing the non-linear inertia weight and the learning strategy to obtain an improved whale optimization algorithm.
[0048] Step S220, in advance, the first PI controller is optimized by using the improved whale optimization algorithm to obtain an optimized PI controller.
[0049] The solution of the present invention introduces a non-linear inertia weight to balance the local and global search capabilities of the algorithm. According to the idea of the learning strategy, the position of each individual in the whale population is optimized to obtain an improved whale optimization algorithm, that is, the improved whale algorithm (i.e., IWOA); the PI gain of the PI controller is adjusted based on the improved whale optimization algorithm to obtain a PI controller based on the improved whale optimization algorithm; the control output value of the PI controller based on the improved whale optimization algorithm is input into the permanent magnet synchronous motor to achieve the actual speed control of the motor and improve the control performance of the motor.
[0050] In some embodiments, for the specific process of optimizing the whale algorithm by introducing the non-linear inertia weight and the learning strategy in step S210 to obtain an improved whale optimization algorithm, refer to the following exemplary description.
[0051] The following combines Figure 3Schematic diagram of an embodiment of optimizing the whale algorithm in the method of the present invention, further illustrating the specific process of optimizing the whale algorithm in step S210, including: steps S310 to S320.
[0052] Step S310, in the preset whale algorithm, introduce a non-linear inertia weight. After iteratively balancing the local search ability and the global search ability, obtain the whale optimization algorithm.
[0053] Step S320, based on the whale optimization algorithm, introduce a learning strategy. After optimizing the position of each individual in the whale population, obtain the optimal solution as the improved whale optimization algorithm.
[0054] Figure 11 It is a schematic diagram of the process of the improved whale optimization algorithm. As Figure 11 shown, the process of the improved whale optimization algorithm includes:
[0055] Step 1. Initialize the population size size, dimension dim, and maximum number of iterations T max , that is, initialize these three items: population size size, dimension dim, and maximum number of iterations T max , and then execute Step 2.
[0056] Step 2. Judge whether it satisfies that the current iteration number t is less than T max : If so, execute Step 3; otherwise, output the optimal solution and end the current optimization process. Where t is the current number of iterations; T max is the maximum number of iterations in the entire algorithm process.
[0057] Step 3. Calculate the fitness, determine the current optimal value individual and position, and then execute Step 4.
[0058] Step 4. Judge whether it satisfies P ≤ 0.5: If so, execute Step 5; otherwise, execute Step 6.
[0059] Step 5. Spiral bubble predation (including w2), and then execute Step 7.
[0060] Step 6. Judge whether it satisfies |A| ≥ 1: If so, randomly update the position (including w1) and then execute Step 7; otherwise, surround and encircle predation (including w2) and then execute Step 7.
[0061] Step 7. Judge whether it satisfies f ≥ Mean: If so, execute Step 8; otherwise, execute Step 9.
[0062] Step 8. Determine that the group of students with scores exceeding the average is P better, then determine whether h≥1 is satisfied: if so, determine the evolvable individuals for effective information transformation, and then execute step 10; otherwise, determine the adjustable individuals for Gaussian mutation perturbation, and then execute step 10.
[0063] Step 9: Determine the group of students with grades below the average as P worse , execute the teaching guidance stage, and then determine whether f≥Mean is satisfied: if so, return to step 8, otherwise execute the self-study stage, and then execute step 10.
[0064] Step 10: Calculate the individual fitness, implement the survival-of-the-fittest rule, then set t=t + 1, and then return to step 2.
[0065] Among them, P is the current individual, A is the convergence factor, w1 and w2 are the inertia weights, f is the parameter for judging whether it is an excellent or poor student individual, and the function h is the fitness change.
[0066] See Figure 11 In the example shown, the solution of the present invention proposes an improved whale optimization algorithm (i.e., IWOA). First, a non-linear inertia weight is introduced to balance the local and global search capabilities of the algorithm. Second, according to the idea of the learning strategy, the position of each individual in the whale population is optimized, specifically including:
[0067] The first step: Introduction of non-linear inertia weight. In the global search and local search processes of whales foraging, the inertia weight has a certain influence on the convergence speed and search efficiency of whales. To make the algorithm more accurate and efficient, a larger inertia weight is required in the early global search to improve its global search ability and obtain more solution schemes, and a smaller inertia weight is required in the later local search to improve the convergence speed. Based on the above principle, two non-linear inertia weights are introduced , , and the relevant formula is:
[0068] (1).
[0069] In the formula: is the maximum value of the inertia weight; is the minimum value of the inertia weight; t is the current number of iterations; T max is the maximum number of iterations in the entire algorithm process.
[0070] Since the value of the inertia weight decreases relatively slowly in the early stage of iteration and faster in the later stage, adding it to the step size of any position iteration of the optimized whale algorithm can make the global search efficiency higher. The optimized formula is as follows:
[0071] (2).
[0072] The inertia weight has a slow decrease in the early stage of iteration and a faster decrease in the later stage, which is used to change the step size in the local search process and can improve the efficiency of local search. The optimized formula is as follows:
[0073] (3).
[0074] In the formula: X(t + 1) is the new individual obtained by Gaussian mutation; X rand is the random individual; A is the control of the wandering direction; D is the surrounding step size for the whale group to surround the food.
[0075] The second step is the introduction of the learning strategy. Referring to the idea of the daily learning strategy of students, the whale algorithm is improved. In the learning strategy, assume that the exam score is the fitness value of student X, the average score is Mean, the group of students with scores exceeding the average score is P better , and the group of students with scores lower than the average score is P worse . Define the teacher with the best score as P best , and the following stages are carried out:
[0076] (1) Student individual classification stage
[0077] Calculate the average score Mean from the fitness value of student X, and divide the student individuals X (except the teacher) into the group of students P better with scores exceeding the average score and the group of students P worse with scores lower than the average score.
[0078] (2) Evolution and adjustment stage
[0079] This stage mainly changes the excellent group P better . Use a criterion to evaluate the fitness of the excellent individual X(t), and divide this criterion into two criteria: "evolvable" or "adjustable". Specifically: when the fitness value of an excellent individual X(t) is low, but there is a large change after one update iteration, that is, when Q ≥ 1, then it is divided into "evolvable". Vice versa, when the fitness value of an excellent individual X(t) is high, but there is only a relatively small change after one update iteration, that is, when 0 < Q < 1, then it is divided into "adjustable". Q is the adaptive adjustment threshold.
[0080] In subsequent update iterations, since "evolvable" individuals are more likely to improve in fitness value, individual X(t) will communicate information with an elite individual X(t). However, "adjustable" individuals are less likely to improve in fitness value, so they will only mutate slightly. Gaussian mutation is used in this paper to increase the diversity of individuals and avoid slow individual evolution. The relevant mathematical models for the two cases are as follows:
[0081] (4).
[0082] Where: X(t) is the current iterative individual; X(t + 1) is the new individual obtained through Gaussian mutation; is the random number for Gaussian mutation of the current individual. and() represents the position of a randomly selected individual in the current population, and X(T)1 represents the next state of the current iterative individual.
[0083] To prevent the degradation of elite individuals, the new and old individuals in the above formula are competed according to the principle of survival of the fittest, that is, the fitness of the new and old individuals is compared, and the best one is selected. The selection formula is as follows:
[0084] (5).
[0085] Where: X(t) is the current iterative individual; X(t + 1) is the new individual obtained through Gaussian mutation. f() represents the fitness of the new and old individuals.
[0086] (3) Guidance and learning stage
[0087] Since there are large differences and low fitness values among different inferior individuals X(t), the optimal individual X best is used to guide them to improve their fitness values. And because the fitness value cannot increase step by step, it is necessary to conduct guidance and self-learning repeatedly for many times. The guidance method is as follows:
[0088] (6);
[0089] (7).
[0090] Where: is the fitness value of the inferior individual X(t); is the diversity function of; is the group of students with grades below the average; C i is the guidance coefficient. C max = max(C i ), which is the maximum value of the guidance coefficient.
[0091] Among the differential individuals after repeated guidance, if the fitness value , it is regarded as an excellent individual; if the fitness value and 0 < Q < 1, it indicates that the improvement of this individual is insufficient and it should continue to learn and improve itself.
[0092] The solution of the present invention effectively balances the local search ability and the global search ability of the whale algorithm (i.e., WOA) by introducing two non-linear inertia weights. At the same time, based on the idea of the teaching algorithm, the positions of each individual in the whale population are optimized, significantly improving the convergence accuracy and convergence speed of the whale algorithm (i.e., WOA). The improved PI controller (i.e., the PI controller based on the improved whale optimization algorithm) has higher convergence accuracy and convergence speed in the tuning of PI parameters compared with the traditional whale algorithm, i.e., the whale algorithm (i.e., WOA) and the traditional PI control, and is not easily trapped in the local optimum, effectively improving the control performance of the motor.
[0093] In some embodiments, the control parameters of the first PI controller include: a proportional parameter and an integral parameter, such as the proportional parameter K P and the integral parameter K I .
[0094] In step S220, the improved whale optimization algorithm is used to optimize the first PI controller to obtain an optimized PI controller, including: using the improved whale optimization algorithm to optimize the proportional parameter and the integral parameter of the first PI controller to obtain an optimized PI controller.
[0095] Figure 8 is a schematic diagram of the control logic of the improved whale optimization algorithm control system. As Figure 8 shown, the difference E(t) between the given command speed n * of the motor and the response speed n of the motor. The difference E(t) is output to the IWOA algorithm module after passing through the objective function; the IWOA algorithm module outputs the optimized proportional parameter K P and the integral parameter K I to the PI controller to adjust the gains of the proportional parameter K P and the integral parameter K I of the PI controller, so that the output data is closer to the target PI gain. Then the control output value of the PI controller is input into the controlled object, such as a permanent magnet synchronous motor, to realize the control of the actual speed of the motor, such as Y(t). The objective function for PI parameter tuning is taken as the integral of the product of the absolute value of the motor speed deviation determined by the PI parameters and time, the controlled object is the speed of the motor, and Y(t) can be the speed.
[0096] The solution of the present invention is based on an improved whale optimization algorithm (i.e., IWOA), and designs a control algorithm with the function of online adaptive update of parameters, and adjusts the gains of the proportional parameter K P and integral parameter K I of the PI controller, so that the output data is closer to the target PI gain, and then inputs the control output value of the PI controller into the permanent magnet synchronous motor to realize the actual speed control of the motor. The solution of the present invention solves the problems that the whale algorithm (i.e., WOA) is prone to fall into local optimization and premature convergence in local search, improves the dynamic characteristics and robustness of the PI controller. Thus, it solves the problems such as overshoot instability of the speed and large load disturbance in the permanent magnet synchronous motor control system for air-conditioning compressors, and improves the load disturbance resistance ability and stability of the system.
[0097] In some embodiments, the control system of the motor has a speed loop and a current loop; the speed loop has the first PI controller, and the current loop has a second PI controller and a third PI controller.
[0098] In step S130, in the control system of the motor, according to the actual speed of the motor, the three-phase current of the motor, and the rotor position angle of the motor, the specific process of using the optimized PI controller to control the motor is as follows in the following exemplary description.
[0099] The following combines Figure 4 the schematic flow chart of an embodiment of using the optimized PI controller to control the motor in the method of the present invention shown, and further describes the specific process of using the optimized PI controller to control the motor in step S130, including: step S410 to step S420.
[0100] In step S410, in the speed loop, according to the actual speed of the motor, use the optimized PI controller to obtain the q-axis reference current of the motor, such as the q-axis command current i q * .
[0101] In step S420, in the current loop, according to the q-axis reference current of the motor, the three-phase current of the motor, and the rotor position angle of the motor, use the second PI controller and the third PI controller to control the motor.
[0102] Figure 7 It is the control logic schematic diagram of the permanent magnet synchronous motor control system for air-conditioning compressors based on the improved whale optimization algorithm. Wherein: n * is the given command speed; n is the response speed; is the q-axis command current; is the q-axis response current; and are the d-axis and q-axis voltages respectively; and are respectively and axis voltages; and and are the phase a, phase b and phase c voltages respectively; and and are the phase a, phase b and phase c currents respectively; and are respectively and axis currents; is the rotor position angle. Based on Figure 7 the improved whale optimization algorithm PI controller and system framework for the permanent magnet synchronous motor used in the air conditioner compressor shown, when the compressor motor starts and operates stably, the designed controller is added to the speed loop of the motor control system to replace the original PI control. The control system diagram and the algorithm optimization flowchart are respectively as shown in Figure 8 and Figure 11 shown.
[0103] In the solution of the present invention, by introducing a non-linear inertia weight and a learning strategy, the whale algorithm is optimized to obtain an improved whale optimization algorithm; for the permanent magnet synchronous motor used in the air conditioner compressor, the optimized whale algorithm, that is, the improved whale optimization algorithm, is adopted to realize the actual speed control of the motor, improving the performance of the air conditioner compressor motor.
[0104] In some embodiments, in step S410, in the speed loop, according to the actual speed of the motor, using the optimized PI controller, obtaining the q-axis reference current of the motor includes: in the speed loop, subtracting the actual speed of the motor from the reference speed of the motor, and after passing through the optimized PI controller, obtaining the q-axis reference current of the motor; wherein, the reference speed of the motor is such as the command speed n * of the motor, and the actual speed of the motor is such as the response speed n of the motor.
[0105] In the solution of the present invention, through the improved whale optimization algorithm (i.e., IWOA), a control algorithm with an online adaptive parameter update function is designed, and based on this, the gains of the proportional parameter K P and the integral parameter K I of the PI controller are adjusted to make the output data closer to the target PI gain, and then the control output value of the PI controller is input into the permanent magnet synchronous motor to realize the actual speed control of the motor, improving the dynamic characteristics and robustness of the PI controller.
[0106] In some embodiments, in step S420, in the current loop, according to the q-axis reference current of the motor, the three-phase current of the motor, and the rotor position angle of the motor, the specific process of controlling the motor by using the second PI controller and the third PI controller is as follows in the following exemplary description.
[0107] The following combines Figure 5 The schematic flowchart of an embodiment of controlling the motor in the current loop in the method of the present invention shown below further illustrates the specific process of controlling the motor in the current loop in step S420, including: step S510 to step S540.
[0108] Step S510, in the current loop, determine the d-axis current of the motor and the q-axis current of the motor according to the three-phase current of the motor; wherein, the d-axis current of the motor is like the d-axis response current i d , and the q-axis current of the motor is the q-axis response current i q .
[0109] Step S520, in the q-axis part of the current loop, after the difference between the q-axis reference current of the motor and the q-axis current of the motor passes through the second PI controller, obtain the q-axis voltage of the motor; wherein, the q-axis voltage of the motor is like the q-axis voltage u q .
[0110] Step S530, in the d-axis part of the current loop, after the difference between the d-axis reference current of the motor and the d-axis current of the motor passes through the third PI controller, obtain the d-axis voltage of the motor; wherein, the d-axis reference current of the motor is like the d-axis command current i d * = 0; the d-axis voltage of the motor is like the d-axis voltage u d .
[0111] Step S540, according to the q-axis voltage and the d-axis voltage of the motor, after voltage space vector processing, control the three-phase current of the motor to achieve speed control of the motor.
[0112] As Figure 7 shown, the position and speed feedback module obtains the response speed n and the rotor position angle of the permanent magnet synchronous motor (PMSM) . The current detection module obtains the a, b, and c phase currents of the motor from the output side of the three-phase inverter , and , and obtains the , Axial current 、 ; For the 、 axial current of the motor 、 , based on the rotor position angle , through Park transformation, the d-axis response current i of the motor is obtained d and the q-axis response current of the motor . The difference between the given command speed n * of the motor and the response speed n of the motor, after passing through the IWOA-PI control system (i.e., the PI controller based on the improved whale optimization algorithm), the q-axis command current of the motor is obtained . The difference between the q-axis command current of the motor and the q-axis response current of the motor, after passing through PI control, the q-axis voltage of the motor is obtained . The difference between the d-axis command current =0 of the motor and the d-axis response current i d of the motor, after passing through PI control, the d-axis voltage of the motor is obtained . The q-axis voltage of the motor, the d-axis voltage of the motor, based on the rotor position angle , through Park inverse transformation, the 、 axial voltage of the motor is obtained 、 . The 、 axial voltage of the motor 、 , after being processed by space vector pulse width modulation (SVPWM), control the three-phase inverter to output the a, b, and c phase currents of the motor 、 and .
[0113] In the solution of the present invention, referring to the examples shown in Figure 8 and Figure 11 , different iteration times and population sizes are taken in the whale optimization algorithm, through multiple tests, and data analysis is carried out to optimize the PI controller parameters, complete the self-adjustment of the speed regulation system, and finally obtain the optimal parameter values. Specifically, it can be seen in the table 1 shown in Figure 9 . Figure 9 Table 1 is the comparison result table of the unimodal noise function of the WOA algorithm and the IWOA algorithm .
[0114] To verify the superiority of the improved whale optimization algorithm (i.e., IWOA) compared to the whale optimization algorithm (i.e., WOA), two benchmark functions are adopted to compare and verify the superiority of the improved whale optimization algorithm (i.e., IWOA) compared to the whale optimization algorithm (i.e., WOA), namely the unimodal noise function and the multimodal function . The formulas of the two functions are as follows:
[0115] (8).
[0116] where i is the quantity, x and x i are variables, and n is the dimension of decision variables. The global optimal solutions of the two functions and are both 0. Set the maximum number of iterations T max = 1000, the population size size = 50, and the dimension of decision variables is set to 100 and 300. Run and solve the two functions 100 times to obtain the average value, standard deviation, and running time. The comparison results are shown in the example in Figure 9 Table 1. It can be seen that the improved whale optimization algorithm has better average values and variances, indicating that it has better convergence accuracy and robustness. The shorter average time represents a faster convergence speed.
[0117] In the results of the test function , for the IWOA algorithm and the WOA algorithm, when the dimension of decision variables is set to 100 and 300, the average values and variances are both 0. The average time of the WOA algorithm is 3.8648 s and 4.7404 s, while that of the IWOA algorithm is 3.5372 s and 4.1971 s. It can be seen that the convergence speed of the IWOA algorithm is better than that of the WOA algorithm. The shorter average time of the improved whale optimization algorithm represents a faster convergence speed. Specifically, it can be seen in Figure 10 Table 2 shown. Therefore, the improved whale optimization algorithm proposed in the solution of the present invention has been greatly improved in various performance indicators, further improving the performance of the air-conditioning compressor motor.
[0118] The solution of the present invention proposes an improved whale optimization algorithm. By introducing a non-linear inertia weight and a learning strategy, it is different from the related solutions that deal with the probability language (PL) and the convergence factor, and is also different from the improved whale algorithm in the related solutions that separately calculate the discrete voltage equation when there is a d-axis current to construct a full-rank identification model. In the solution of the present invention, for the permanent magnet synchronous motor used in the air-conditioning compressor, an optimization algorithm, namely the improved whale optimization algorithm, is adopted to improve the performance of the air-conditioning compressor motor.
[0119] Some solutions involve processing the probability PL and the convergence factor in the whale optimization algorithm. Although this may improve the performance of the algorithm in some cases, it also brings problems such as increased algorithm complexity, rising computational costs, the risk of overfitting, and the stability of the convergence speed and global search ability. There are also some solutions where the core of constructing a full-rank identification model lies in ensuring that the constructed matrix is always full-rank. The improved whale algorithm may not effectively maintain this condition, especially when the parameters change significantly during the optimization process. If the algorithm fails to effectively guarantee the full-rank property of the matrix during the optimization process, it may lead to the failure of the identification model and an inability to accurately reflect the true state of the system.
[0120] The solution proposed in the present invention can automatically adjust the ratio of global search to local search during the optimization process by introducing a non-linear inertia weight. In the initial stage of optimization, a larger inertia weight helps the algorithm conduct extensive global search and avoid premature convergence to a local optimal solution. As the iteration progresses, the inertia weight gradually decreases, and the algorithm pays more attention to in-depth exploration of the local area, thereby improving the search accuracy and efficiency. The introduction of the learning strategy proposed in the solution of the present invention enhances the information sharing and learning ability among individuals in the algorithm, further improving the optimization efficiency. Through the learning strategy, the algorithm can approach the optimal solution faster and reduce unnecessary search processes. Compared with related solutions, the improved whale optimization algorithm proposed in the solution of the present invention has significant advantages in terms of global search ability, convergence speed, robustness, computational cost, adaptability, etc.
[0121] Adopting the technical solution of this embodiment, the whale optimization algorithm (i.e., WOA) is optimized by introducing a non-linear inertia weight and a learning strategy to obtain an improved whale optimization algorithm (i.e., IWOA); using the improved whale optimization algorithm (i.e., IWOA), the proportional parameter K P and integral parameter K I of the PI controller in the speed loop of the motor control system are adjusted to obtain a PI controller based on the improved whale optimization algorithm (i.e., IWOA-PI control system) to control the actual speed of the motor; thus, by introducing a non-linear inertia weight and a learning strategy, the preset whale optimization algorithm (i.e., WOA) is optimized, and based on this, the PI controller in the speed loop of the motor control system is designed to achieve the control of the actual speed of the motor and improve the control performance of the motor.
[0122] According to an embodiment of the present invention, there is also provided a control device for a motor corresponding to the control method of the motor. Refer to Figure 6 the structural schematic diagram of an embodiment of the device of the present invention shown. The control system of the motor has a first PI controller; in the solution of the present invention, as Figure 6 shown, the control device of the motor includes: an acquisition unit 102 and a control unit 104.
[0123] Among them, the control unit 104 is configured to optimize a preset whale algorithm in advance by introducing a non - linear inertia weight and a learning strategy, and adjust the first PI controller to obtain an optimized PI controller, such as a PI controller based on an improved whale optimization algorithm (i.e., an IWOA - PI control system). The specific functions and processes of the acquisition unit 102 are described in step S110.
[0124] The acquisition unit 102 is configured to acquire the three - phase current of the motor, the actual speed of the motor, and the rotor position angle of the motor when the motor starts or runs; among them, the three - phase current of the motor is, for example, the a, b, and c - phase currents i a 、i b and i c , the actual speed of the motor is, for example, the response speed n of the motor, and the rotor position angle of the motor is, for example, the rotor position angle θ of the motor. The specific functions and processes of the control unit 104 are described in step S120.
[0125] The control unit 104 is further configured to use the optimized PI controller to achieve control of the motor in the control system of the motor according to the actual speed of the motor, the three - phase current of the motor, and the rotor position angle of the motor. The specific functions and processes of the control unit 104 are also described in step S130.
[0126] The solution of the present invention proposes an improved whale optimization algorithm (i.e., IWOA). First, a non - linear inertia weight is introduced to balance the local and global search capabilities of the algorithm. Secondly, according to the idea of the learning strategy, the positions of each individual in the whale population are optimized; and a PI controller based on the improved whale optimization algorithm is designed accordingly, thereby providing a control method for a permanent - magnet synchronous motor control system for an air - conditioner compressor, that is, a control method for an air - conditioner compressor based on an improved whale optimization algorithm. The control output value of the PI controller based on the improved whale optimization algorithm is input into the permanent - magnet synchronous motor to achieve control of the actual speed of the motor and improve the control performance of the motor.
[0127] In some embodiments, the control unit 104, in advance, optimizes a preset whale algorithm by introducing a non - linear inertia weight and a learning strategy, and adjusts the first PI controller to obtain an optimized PI controller, including:
[0128] The control unit 104 is specifically further configured to optimize a preset whale algorithm by introducing a non - linear inertia weight and a learning strategy in advance to obtain an improved whale optimization algorithm. The specific functions and processes of the control unit 104 are also described in step S210.
[0129] The control unit 104 is further specifically configured to optimize the first PI controller in advance by using the improved whale optimization algorithm to obtain an optimized PI controller. For the specific functions and processes of this control unit 104, refer to step S220.
[0130] The solution of the present invention introduces a non - linear inertia weight to balance the local and global search capabilities of the algorithm. According to the idea of the learning strategy, the position of each individual in the whale population is optimized to obtain an improved whale optimization algorithm, that is, the improved whale algorithm (i.e., IWOA); the PI gains of the PI controller are adjusted based on the improved whale optimization algorithm to obtain a PI controller based on the improved whale optimization algorithm; the control output value of the PI controller based on the improved whale optimization algorithm is input into the permanent magnet synchronous motor to achieve the actual speed control of the motor and improve the control performance of the motor.
[0131] In some embodiments, the control unit 104 optimizes the whale algorithm by introducing a non - linear inertia weight and a learning strategy to obtain an improved whale optimization algorithm, including:
[0132] The control unit 104 is further specifically configured to introduce a non - linear inertia weight into the preset whale algorithm. After iteratively balancing the local search ability and the global search ability, the whale optimization algorithm is obtained. For the specific functions and processes of this control unit 104, refer to step S310.
[0133] The control unit 104 is further specifically configured to introduce a learning strategy based on the whale optimization algorithm. After optimizing the position of each individual in the whale population, the optimal solution is obtained as the improved whale optimization algorithm. For the specific functions and processes of this control unit 104, refer to step S320.
[0134] Figure 11 It is a flow chart of the improved whale optimization algorithm. As Figure 11 shown, the process of the improved whale optimization algorithm includes:
[0135] Step 1: Initialize the population size size, dimension dim, and maximum number of iterations T max , and then execute step 2.
[0136] Step 2: Determine whether the current iteration number t is less than T max : If yes, execute step 3; otherwise, output the optimal solution and end the current optimization process. Where t is the current number of iterations; T max is the maximum number of iterations in the whole algorithm process.
[0137] Step 3: Calculate the fitness, determine the current optimal value individual and position, and then execute step 4.
[0138] Step 4: Determine whether P ≤ 0.5 is satisfied. If yes, execute Step 5; otherwise, execute Step 6.
[0139] Step 5: Spiral bubble predation (including w2), and then execute Step 7.
[0140] Step 6: Determine whether |A| ≥ 1 is satisfied. If yes, randomly update the position (including w1) and then execute Step 7; otherwise, perform surrounding encirclement predation (including w2) and then execute Step 7.
[0141] Step 7: Determine whether f ≥ Mean is satisfied. If yes, execute Step 8; otherwise, execute Step 9.
[0142] Step 8: Identify the group of students with scores above the average as P better , and then determine whether h ≥ 1 is satisfied. If yes, identify the evolvable individuals for effective information transformation and then execute Step 10; otherwise, identify the adjustable individuals for Gaussian mutation perturbation and then execute Step 10.
[0143] Step 9: Identify the group of students with scores below the average as P worse , execute the teaching guidance stage, and then determine whether f ≥ Mean is satisfied. If yes, return to Step 8; otherwise, execute the self-study stage and then execute Step 10.
[0144] Step 10: Calculate the individual fitness, implement the survival-of-the-fittest rule, then set t = t + 1, and then return to Step 2.
[0145] See Figure 11 the example shown. The solution of the present invention proposes an improved whale optimization algorithm (i.e., IWOA). First, a non-linear inertia weight is introduced to balance the local and global search capabilities of the algorithm. Second, based on the idea of the learning strategy, the position of each individual in the whale population is optimized, specifically including:
[0146] The first step: Introduction of the non-linear inertia weight. During the global search and local search processes of the whale's predation, the inertia weight has a certain impact on the convergence speed and search efficiency of the whale. To make the algorithm more accurate and efficient, a larger inertia weight is required in the early global search to improve its global search ability and obtain more solution schemes, and a smaller inertia weight is required in the later local search to improve the convergence speed. Based on the above principles, two non-linear inertia weights are introduced 、 , and the relevant formula is:
[0147] (1).
[0148] In the formula: is the maximum value of the inertia weight; is the minimum value of the inertia weight; t is the current number of iterations; T max is the maximum number of iterations in the entire algorithm process.
[0149] Since the inertia weight has a relatively slow decreasing speed in the early stage of iteration and a faster decreasing speed in the later stage. Adding it to the step size of any position iteration in the optimized whale algorithm can make the global search efficiency higher. The optimized formula is as follows:
[0150] (2).
[0151] And the inertia weight has a slow decrease in the early stage of iteration and an even faster decrease in the later stage. It is used to change the step size in the local search process and can improve the local search efficiency. The optimized formula is as follows:
[0152] (3).
[0153] In the formula: X(t + 1) is the new individual obtained by Gaussian mutation; X rand is the random individual; A is the control of the wandering direction; D is the surrounding step size for the whale group to surround the food.
[0154] Second step, introduction of the learning strategy. Referring to the idea of the daily learning strategy of students, the whale algorithm is improved. In the learning strategy, assuming that the exam score is the fitness value of student X, the average score is Mean, the student group with a score higher than the average score is P better , and the student group with a score lower than the average score is P worse , and the teacher with the best score is defined as P best , and the following stages are carried out:
[0155] (1) Student individual classification stage
[0156] The average score Mean is calculated from the adaptive fitness value of student X, and the student individual X except the teacher is divided into the student group P better with a score higher than the average score and the student group P worse with a score lower than the average score.
[0157] (2) Evolution and adjustment stage
[0158] This stage is mainly for the excellent group P betterMake a change. Use a criterion to evaluate the fitness of the superior individual X(t), and divide this criterion into two criteria: "evolvable" or "adjustable". Specifically: when the fitness value of a superior individual X(t) is low but has a large change after one update iteration, that is, when Q≥1, it is classified as "evolvable". Vice versa, when the fitness value of a superior individual X(t) is high but has only a relatively small change after one update iteration, that is, when 0<Q<1, it is classified as "adjustable".
[0159] In subsequent update iterations, since "evolvable" individuals are relatively easy to improve in fitness value, this individual X(t) will exchange information with a superior individual X(t). However, "adjustable" individuals are relatively difficult to improve in fitness value, so they will only mutate slightly. In this paper, Gaussian mutation is used to increase the diversity of individuals, which can prevent individuals from evolving slowly. The relevant mathematical models for the two situations are as follows:
[0160] (4).
[0161] In the formula: X(t) is the current iteration individual; X(t + 1) is the new individual obtained through Gaussian mutation; is the random number of Gaussian mutation of the current individual.
[0162] To prevent the degradation of superior individuals, the new and old individuals in the above formula are competed according to the principle of survival of the fittest, that is, the fitness of the new and old individuals is compared, and the best one is selected. The selection formula is as follows:
[0163] (5).
[0164] In the formula: X(t) is the current iteration individual; X(t + 1) is the new individual obtained through Gaussian mutation.
[0165] (3) Guidance and learning stage
[0166] Since there are large differences and low fitness values among different inferior individuals X(t), the optimal individual X best is used to guide them to improve their fitness values. And because the fitness value cannot increase step by step, it is necessary to conduct guidance and self-learning repeatedly for many times. The guidance method is as follows:
[0167] (6);
[0168] (7).
[0169] In the formula: is the fitness value of the inferior individual X(t); is Diversity function; For the group of students with grades below the average; C i Is the guiding coefficient.
[0170] For the inferior individuals after repeated guidance, if the fitness value , then it is regarded as a superior individual; if the fitness value And 0 < Q < 1, it indicates that the improvement of this individual is insufficient and it should continue to self-learn and improve.
[0171] The solution of the present invention effectively balances the local search ability and the global search ability of the whale algorithm (i.e., WOA) by introducing two non-linear inertia weights. At the same time, based on the idea of the teaching algorithm, the positions of each individual in the whale population are optimized, significantly improving the convergence accuracy and convergence speed of the whale algorithm (i.e., WOA). The improved PI controller (i.e., the PI controller based on the improved whale optimization algorithm) has higher convergence accuracy and convergence speed in the tuning of PI parameters compared with the traditional whale algorithm, i.e., the whale algorithm (i.e., WOA) and the traditional PI control, and is not easily trapped in the local optimum, effectively improving the control performance of the motor.
[0172] In some embodiments, the control parameters of the first PI controller include: a proportional parameter and an integral parameter, such as the proportional parameter K of the first PI controller P And the integral parameter K I .
[0173] The control unit 104 uses the improved whale optimization algorithm to optimize the first PI controller to obtain an optimized PI controller, including: the control unit 104 is specifically further configured to use the improved whale optimization algorithm to optimize the proportional parameter and the integral parameter of the first PI controller to obtain an optimized PI controller.
[0174] Figure 8 Is the control logic schematic diagram of the improved whale optimization algorithm control system. As Figure 8 Shown, the difference E(t) between the given command speed n * Of the motor and the response speed n of the motor. The difference E(t) is output to the IWOA algorithm module after passing through the objective function; the IWOA algorithm module outputs the optimized proportional parameter K P And the integral parameter K I To the PI controller to adjust the gains of the proportional parameter K P And the integral parameter K I Of the PI controller, so that the output data is closer to the target PI gain. Then the control output value of the PI controller is input into the controlled object such as a permanent magnet synchronous motor to realize the control of the actual speed of the motor, such as Y(t).
[0175] The solution of the present invention uses an improved whale optimization algorithm (i.e., IWOA) to design a control algorithm with the function of online adaptive update of parameters, and adjusts the proportional parameter K P and integral parameter K I of the PI controller, so that the output data is closer to the target PI gain. Then, the control output value of the PI controller is input into the permanent magnet synchronous motor to achieve the actual speed control of the motor. The solution of the present invention solves the problems that the whale algorithm (i.e., WOA) is prone to fall into local optimization and premature convergence in local search, improves the dynamic characteristics and robustness of the PI controller. Thus, it solves the problems such as unstable speed overshoot and large load disturbance in the control system of the permanent magnet synchronous motor for air conditioner compressors, and improves the load disturbance resistance ability and stability of the system.
[0176] In some embodiments, the control system of the motor has a speed loop and a current loop; the speed loop has the first PI controller, and the current loop has a second PI controller and a third PI controller.
[0177] The control unit 104, in the control system of the motor, according to the actual speed of the motor, the three-phase current of the motor, and the rotor position angle of the motor, uses the optimized PI controller to achieve the control of the motor, including:
[0178] The control unit 104 is specifically further configured to, in the speed loop, according to the actual speed of the motor, use the optimized PI controller to obtain the q-axis reference current of the motor, such as the q-axis command current i q * . For the specific functions and processes of this control unit 104, refer to step S410.
[0179] The control unit 104 is specifically further configured to, in the current loop, according to the q-axis reference current of the motor, the three-phase current of the motor, and the rotor position angle of the motor, use the second PI controller and the third PI controller to achieve the control of the motor. For the specific functions and processes of this control unit 104, refer to step S420.
[0180] Figure 7 It is a schematic diagram of the control logic of the control system of the permanent magnet synchronous motor for air conditioner compressors based on the improved whale optimization algorithm. Among them: n * is the given command speed; n is the response speed; is the q-axis command current; is the q-axis response current; 、 are the d-axis and q-axis voltages respectively; 、 are respectively 、 shaft voltages; 、 and are divided into phase voltages a, b, and c; 、 and are divided into phase currents a, b, and c; 、 are respectively 、 shaft currents; is the rotor position angle. Based on Figure 7 the improved whale optimization algorithm PI controller and system framework for a permanent magnet synchronous motor used in an air conditioner compressor shown, when the compressor motor starts and operates stably, the designed controller is added to the speed loop of the motor control system to replace the original PI control. The control system diagram and the algorithm optimization flowchart are respectively as shown in Figure 8 and Figure 11 shown.
[0181] In the solution of the present invention, by introducing a non - linear inertia weight and a learning strategy, the whale algorithm is optimized to obtain an improved whale optimization algorithm; for the permanent magnet synchronous motor used in an air conditioner compressor, the optimized whale algorithm, that is, the improved whale optimization algorithm, is adopted to realize the actual speed control of the motor, improving the performance of the air conditioner compressor motor.
[0182] In some embodiments, the control unit 104, in the speed loop, according to the actual speed of the motor, uses the optimized PI controller to obtain the q - axis reference current of the motor, including:
[0183] The control unit 104 is specifically further configured to, in the speed loop, obtain the q - axis reference current of the motor by passing the difference between the reference speed and the actual speed of the motor through the optimized PI controller; wherein, the reference speed of the motor is like the commanded speed n * of the motor, and the actual speed of the motor is like the response speed n of the motor.
[0184] In the solution of the present invention, through the improved whale optimization algorithm (i.e., IWOA), a control algorithm with an online adaptive parameter update function is designed, and the gains of the proportional parameter K P and integral parameter K I of the PI controller are adjusted to make the output data closer to the target PI gain, and then the control output value of the PI controller is input into the permanent magnet synchronous motor to realize the actual speed control of the motor, improving the dynamic characteristics and robustness of the PI controller.
[0185] In some embodiments, the control unit 104, in the current loop, according to the q-axis reference current of the motor, the three-phase current of the motor, and the rotor position angle of the motor, uses the second PI controller and the third PI controller to achieve control of the motor, including:
[0186] The control unit 104 is further specifically configured to, in the current loop, determine the d-axis current and the q-axis current of the motor according to the three-phase current of the motor; wherein, the d-axis current of the motor is like the d-axis response current i d , and the q-axis current of the motor is the q-axis response current i q . For the specific functions and processes of this control unit 104, refer to step S510.
[0187] The control unit 104 is further specifically configured to, in the q-axis part of the current loop, after passing the difference between the q-axis reference current of the motor and the q-axis current of the motor through the second PI controller, obtain the q-axis voltage of the motor; wherein, the q-axis voltage of the motor is like the q-axis voltage u q . For the specific functions and processes of this control unit 104, refer to step S520.
[0188] The control unit 104 is further specifically configured to, in the d-axis part of the current loop, after passing the difference between the d-axis reference current of the motor and the d-axis current of the motor through the third PI controller, obtain the d-axis voltage of the motor; wherein, the d-axis reference current of the motor is like the d-axis command current i d * = 0; the d-axis voltage of the motor is like the d-axis voltage u d . For the specific functions and processes of this control unit 104, refer to step S530.
[0189] The control unit 104 is further specifically configured to, according to the q-axis voltage and the d-axis voltage of the motor, after voltage space vector processing, control the three-phase current of the motor to achieve speed control of the motor. For the specific functions and processes of this control unit 104, refer to step S540.
[0190] As Figure 7 shown, the position and speed feedback module acquires the response speed n and the rotor position angle of the permanent magnet synchronous motor (PMSM) . The current detection module acquires the a, b, and c phase currents of the motor from the output side of the three-phase inverter , and , and through Clark transformation, obtains the , axis current , ; The , shaft current , , based on the rotor position angle , through Park transformation, the d-axis response current i of the motor is obtained d and the q-axis response current of the motor . The difference between the given command speed n * of the motor and the response speed n of the motor, after passing through the IWOA-PI control system (i.e., the PI controller based on the improved whale optimization algorithm), the q-axis command current of the motor is obtained . The difference between the q-axis command current of the motor and the q-axis response current of the motor, after passing through PI control, the q-axis voltage of the motor is obtained . The d-axis command current = 0 of the motor and the difference between the d-axis response current i d of the motor, after passing through PI control, the d-axis voltage of the motor is obtained . The q-axis voltage of the motor, the d-axis voltage of the motor, based on the rotor position angle , through Park inverse transformation, the , axis voltage , of the motor is obtained. The , axis voltage , of the motor, after being processed by space vector pulse width modulation (Space Vector Pulse Width Modulation, SVPWM), controls the three-phase inverter to output the a, b, and c phase currents , and of the motor.
[0191] In the solution of the present invention, referring to the examples shown in Figure 8 and Figure 11 , different iteration numbers and population numbers are taken in the whale optimization algorithm, through multiple tests, and data analysis is carried out to optimize the PI controller parameters, complete the self-adjustment of the speed regulation system, and finally obtain the optimal parameter values. Specifically, it can be referred to the table 1 shown in Figure 9 . Figure 9 Table 1 is the comparison result table of the single-peak noise function of the WOA algorithm and the IWOA algorithm.
[0192] To verify the superiority of the improved whale algorithm (i.e., IWOA algorithm) compared to the whale algorithm (i.e., WOA), two benchmark functions are adopted to compare and verify the superiority of the improved whale algorithm (i.e., IWOA algorithm) compared to the whale algorithm (i.e., WOA), namely the unimodal noise function and the multimodal function . The formulas of the two functions are as follows:
[0193] (8).
[0194] For the two functions 、 , the global optimal solutions are both 0. Set the maximum number of iterations T max = 1000, the population size size = 50, and the decision variable dimension is set to 100 and 300. Run and solve the two functions 100 times to obtain the average value, standard deviation, and running time. For the comparison results, see the example shown in Table 1 in Figure 9 . It can be seen that the improved whale optimization algorithm has better average values and variances, indicating that it has better convergence accuracy and robustness. The shorter average time represents a faster convergence speed.
[0195] In the results of the test function , for the IWOA algorithm and the WOA algorithm, when the decision variable dimension is set to 100 and 300, the average values and variances are both 0. The average time of the WOA algorithm is 3.8648 s and 4.7404 s, while that of the IWOA algorithm is 3.5372 s and 4.1971 s. It can be seen that the convergence speed of the IWOA algorithm is better than that of the WOA algorithm. Therefore, the improved whale optimization algorithm proposed in the solution of the present invention has been greatly improved in various performance indicators, further improving the performance of the air-conditioning compressor motor.
[0196] The solution of the present invention proposes an improved whale optimization algorithm. By introducing a non-linear inertia weight and a learning strategy, it is neither the same as the treatment of probability language (PL) and convergence factor in related solutions, nor the same as the improved whale algorithm that separately calculates the discrete voltage equation when there is a d-axis current to construct a full-rank identification model. In the solution of the present invention, for the permanent magnet synchronous motor used in the air-conditioning compressor, an optimization algorithm, namely the improved whale optimization algorithm, is adopted to improve the performance of the air-conditioning compressor motor.
[0197] Since the processing and functions implemented by the device in this embodiment are basically corresponding to the embodiments, principles, and examples of the foregoing method, for the details not described in the description of this embodiment, reference can be made to the relevant descriptions in the foregoing embodiments, which will not be elaborated here.
[0198] According to an embodiment of the present invention, there is also provided a motor corresponding to the control device of the motor. The motor may include: the control device of the motor described above.
[0199] Since the processing and functions implemented by the motor of this embodiment are basically corresponding to the embodiments, principles and examples of the foregoing device, for the details not described in the description of this embodiment, reference may be made to the relevant descriptions in the foregoing embodiments and will not be elaborated herein.
[0200] According to an embodiment of the present invention, there is also provided a compressor corresponding to the control device of the motor. The compressor may include: the control device of the motor described above, or the motor described above.
[0201] Since the processing and functions implemented by the compressor of this embodiment are basically corresponding to the embodiments, principles and examples of the foregoing device, for the details not described in the description of this embodiment, reference may be made to the relevant descriptions in the foregoing embodiments and will not be elaborated herein.
[0202] According to an embodiment of the present invention, there is also provided an air conditioner corresponding to the control device of the motor. The air conditioner may include: the control device of the motor described above, or the motor described above, or the compressor described above.
[0203] Since the processing and functions implemented by the air conditioner of this embodiment are basically corresponding to the embodiments, principles and examples of the foregoing device, for the details not described in the description of this embodiment, reference may be made to the relevant descriptions in the foregoing embodiments and will not be elaborated herein.
[0204] According to an embodiment of the present invention, there is also provided a computer program product corresponding to the control method of the motor, including a computer program, and when the computer program is executed by a processor, it implements the steps of the control method of the motor described above.
[0205] Since the processing and functions implemented by the product of this embodiment are basically corresponding to the embodiments, principles and examples of the foregoing method, for the details not described in the description of this embodiment, reference may be made to the relevant descriptions in the foregoing embodiments and will not be elaborated herein.
[0206] According to an embodiment of the present invention, there is also provided a storage medium corresponding to the control method of the motor, the storage medium includes a stored program, wherein when the program runs, it controls the device where the storage medium is located to execute the steps of the control method of the motor described above.
[0207] Since the processing and functions implemented by the storage medium of this embodiment are basically corresponding to the embodiments, principles and examples of the foregoing method, for the details not described in the description of this embodiment, reference may be made to the relevant descriptions in the foregoing embodiments and will not be elaborated herein.
[0208] In summary, it is easy for those skilled in the art to understand that, on the premise of no conflict, the above-mentioned advantageous ways can be freely combined and superimposed.
[0209] The above are only the embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the scope of the claims of the present invention.
Claims
1. A control method for a motor, characterized in that, The control system of the motor has a first PI controller; the control method of the motor includes: Optimizing a preset whale algorithm by introducing a non-linear inertia weight and a learning strategy, and adjusting the first PI controller to obtain an optimized PI controller; When the motor starts or operates, obtaining the three-phase current of the motor, the actual speed of the motor, and the rotor position angle of the motor; In the control system of the motor, according to the actual speed of the motor, the three-phase current of the motor, and the rotor position angle of the motor, using the optimized PI controller to achieve the control of the motor.
2. The control method of the motor according to claim 1, wherein Optimizing a preset whale algorithm by introducing a non-linear inertia weight and a learning strategy, and adjusting the first PI controller to obtain an optimized PI controller, including: Optimizing a preset whale algorithm by introducing a non-linear inertia weight and a learning strategy to obtain an improved whale optimization algorithm; Using the improved whale optimization algorithm to optimize the first PI controller to obtain an optimized PI controller.
3. The control method of the motor according to claim 2, wherein, Wherein, Optimizing a whale algorithm by introducing a non-linear inertia weight and a learning strategy to obtain an improved whale optimization algorithm, including: Introducing a non-linear inertia weight into a preset whale algorithm, and after iteratively balancing the local search ability and the global search ability, obtaining a whale optimization algorithm; Based on the whale optimization algorithm, introducing a learning strategy to optimize the position of each individual in the whale population, and then obtaining an optimal solution as the improved whale optimization algorithm; And / or, The control parameters of the first PI controller include: a proportional parameter and an integral parameter; Using the improved whale optimization algorithm to optimize the first PI controller to obtain an optimized PI controller, including: Using the improved whale optimization algorithm to optimize the proportional parameter and the integral parameter of the first PI controller to obtain an optimized PI controller.
4. The control method of the motor according to any one of claims 1 to 3, characterized in that, The control system of the motor has a speed loop and a current loop; the speed loop has the first PI controller, and the current loop has a second PI controller and a third PI controller; In the control system of the motor, according to the actual speed of the motor, the three-phase current of the motor, and the rotor position angle of the motor, using the optimized PI controller to achieve the control of the motor, including: In the speed loop, according to the actual speed of the motor, using the optimized PI controller to obtain the q-axis reference current of the motor; In the current loop, according to the q-axis reference current of the motor, the three-phase current of the motor, and the rotor position angle of the motor, using the second PI controller and the third PI controller to achieve the control of the motor.
5. The control method of the motor according to claim 4, characterized in that, Wherein, In the speed loop, according to the actual speed of the motor, using the optimized PI controller to obtain the q-axis reference current of the motor, including: In the speed loop, subtracting the actual speed of the motor from the reference speed of the motor, and after passing through the optimized PI controller, obtaining the q-axis reference current of the motor; And / or, In the current loop, according to the q-axis reference current of the motor, the three-phase current of the motor, and the rotor position angle of the motor, the second PI controller and the third PI controller are used to control the motor, including: In the current loop, based on the three-phase current of the motor, determine the d-axis current and the q-axis current of the motor; In the q-axis part of the current loop, the difference between the q-axis reference current of the motor and the q-axis current of the motor is passed through the second PI controller to obtain the q-axis voltage of the motor; In the d-axis part of the current loop, the difference between the d-axis reference current of the motor and the d-axis current of the motor is passed through the third PI controller to obtain the d-axis voltage of the motor; According to the q-axis voltage and the d-axis voltage of the motor, after voltage space vector processing, control the three-phase current of the motor to achieve speed control of the motor.
6. A control device for an electric motor, characterized in that, The control system of the motor has a first PI controller; the control device of the motor includes: A control unit configured to optimize a preset whale algorithm by introducing a non-linear inertia weight and a learning strategy, and adjust the first PI controller to obtain an optimized PI controller; An acquisition unit configured to acquire the three-phase current of the motor, the actual speed of the motor, and the rotor position angle of the motor when the motor starts or operates; The control unit is further configured to, in the control system of the motor, use the optimized PI controller to control the motor according to the actual speed of the motor, the three-phase current of the motor, and the rotor position angle of the motor.
7. A motor, characterized in that, Comprising: The control device of the motor according to claim 6.
8. A compressor, characterized in that, Comprising: The control device of the motor according to claim 6, or the motor according to claim 7.
9. An air conditioner, characterized in that, Comprising: The control device of the motor according to claim 6, or the motor according to claim 7, or the compressor according to claim 8.
10. A storage medium, characterized in that, The storage medium includes a stored program, wherein when the program runs, it controls the device where the storage medium is located to execute the motor control method according to any one of claims 1 to 5.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the motor control method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Permanent magnet synchronous motor minimum loss control method based on whale optimization algorithm
CN113014170A
Permanent magnet synchronous motor speed control method based on chaos adaptive optimization whale algorithm
CN117013896A
Motor parameter optimization method and device, electronic equipment and storage medium
CN119891848A