Permanent magnet synchronous motor harmonic suppression method based on improved particle swarm optimization
By improving the particle swarm algorithm and multiple synchronous rotation coordinate system transformation, the harmonic current component of the permanent magnet synchronous motor is extracted and dead-band compensation is performed, the harmonic problem in the motor is solved and the stability and operating performance of the motor are improved.
Patent Information
- Application Number
- CN202510175317.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2045-02-18
AI Technical Summary
The current harmonic problems in permanent magnet synchronous motors caused by factors such as inverter nonlinearity and dead time lead to overheating of the motor and reducing stability and reliability.
The method based on the improved particle swarm algorithm is adopted to extract harmonic current components through multiple synchronous rotation coordinate system transformation and low-pass filter, establish an algorithm value function, and use the improved particle swarm algorithm to perform dead-band compensation, optimize the amplitude and phase of the compensation.
Effectively remove 5th and 7th harmonics, improve harmonic suppression effect, enhance global search capabilities, avoid falling into local optimal solutions, and improve motor operating performance and stability.
Smart Images

Figure CN119652177A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of PMSM harmonic suppression, and in particular to a permanent magnet synchronous motor harmonic suppression method based on an improved particle swarm algorithm. Background Art
[0002] Permanent magnet synchronous motor (PMSM) has the characteristics of simple structure, high power density, strong overload capacity and easy maintenance. It has been widely used in industrial robots, electric vehicles, aerospace and other fields. The magnitude of the current harmonics of permanent magnet synchronous motors depends on various factors, such as inverter feeding system, rectifier load system magnetic circuit saturation, manufacturing error, dead time, noise, etc. These harmonic components will produce additional losses and torque ripples in the stator winding and core of the motor, which can easily cause the motor to overheat. This phenomenon will reduce the stability and reliability of the motor operation, which is not conducive to the application of PMSM in high-precision and high-power applications. At present, most of the existing methods for removing harmonics require peripheral circuits, high current polarity detection accuracy or motor parameters, and there are problems of complex calculations, and the harmonic problem cannot be completely removed. Summary of the invention
[0003] The purpose of the present invention is to propose a permanent magnet synchronous motor harmonic suppression method based on an improved particle swarm algorithm to solve the harmonic problem caused by factors such as inverter nonlinearity and dead time in the permanent magnet synchronous motor and improve the harmonic suppression effect.
[0004] To achieve the above object, the present invention provides a permanent magnet synchronous motor harmonic suppression method based on an improved particle swarm algorithm, comprising the following steps: S1. Obtain harmonic current components using the electrical angle and three-phase current of the permanent magnet synchronous motor; S2. constructing an algorithm value function according to the harmonic current component; S3. Obtaining a harmonic suppression result of the permanent magnet synchronous motor based on an improved particle swarm algorithm according to the harmonic current component and the algorithm value function.
[0005] Optionally, obtaining harmonic current components using the electrical angle and three-phase current of the permanent magnet synchronous motor includes: Obtain the electrical angle and three-phase current of the permanent magnet synchronous motor; Performing multiple synchronous coordinate transformations according to the electrical angle of the permanent magnet synchronous motor and the three-phase current to obtain current components in a rotating reference system; Using the current component in the rotating reference system to obtain the harmonic current component by filtering based on a low-pass filter; The current component in the rotating reference frame is the current component in the fifth rotating reference frame or the current component in the seventh rotating reference frame.
[0006] Optionally, the calculation formula of the algorithm value function is as follows:
[0007] in, is the value of the algorithm value function, i d5th and i q5th They represent the 5th harmonic current values of the d-axis and q-axis during the operation of the PMSM. N sum represents the number of sampling points, i is the initial measurement value.
[0008] Optionally, obtaining a harmonic suppression result of the permanent magnet synchronous motor by using an improved particle swarm algorithm according to the harmonic current component and the algorithm value function includes: S3-1, collecting the steady-state operating parameters of the permanent magnet synchronous motor to obtain the fitness function of the initial state and initialize the target parameters; S3-2, set the range of compensation parameters and the number of algorithm iterations and initialize the position and velocity of the particles; S3-3, using the harmonic current component and the algorithm value function to obtain a corresponding algorithm value function value as particle fitness based on an improved particle swarm algorithm; S3-4, according to the fitness of the particles, using the update formula of the grey wolf algorithm and the surrounding update strategy of the improved particle swarm algorithm to update and generate the next generation of particles to obtain the position and speed of the new particles; S3-5, judging whether the number of iterations of the algorithm has been reached, if so, stopping the iteration, and obtaining the phase and amplitude of the dead zone compensation time corresponding to the target historical position of the swarm according to the position and speed of the new particle as the harmonic suppression result of the permanent magnet synchronous motor, otherwise, returning to S3-3; The target parameters include an inertia factor, an adjustment coefficient and a random matrix, the compensation parameters are a phase and an amplitude of a dead zone compensation time, and the position of the particle corresponds to a combination of phases and amplitudes of different dead zone compensation times.
[0009] Optionally, according to the fitness of the particles, the update formula of the grey wolf algorithm and the surrounding update strategy of the improved particle swarm algorithm are used to update and generate the next generation of particles to obtain the position and speed of the new particles, including: S3-4-1. Using the particle fitness, obtain the corresponding historical particle fitness; S3-4-2, obtaining the fitness of the particle as the fitness of the initial particle; S3-4-3, determine whether the fitness of the initial particle is less than the fitness of the historical particle. If so, update the position and speed of the initial particle as the position and speed of the new particle, and directly execute S3-5. Otherwise, use the particle evolution strategy to evolve the initial particle to obtain the evolved particle, and execute S3-4-4; S3-4-4, determine whether the fitness of the evolved particle is less than the fitness of the initial particle. If so, use the evolved particle to update the position and speed of the initial particle as the position and speed of the new particle, and directly execute S3-5. Otherwise, retain the initial particle to obtain the fitness of the initial particle, and execute S3-4-5; S3-4-5, generating the next generation of particles according to the fitness of the initial particles using the update formula of the grey wolf algorithm and the surrounding update strategy of the improved particle swarm algorithm; S3-4-6. Obtain the fitness of the next generation particle according to the next generation particle as the fitness of the initial particle, update the target parameter, and return to S3-4.
[0010] Optionally, the calculation formula of the particle evolution strategy is as follows:
[0011] in, x_worst ( t ) indicates the t At the iteration, N The particle with the worst fitness among the particles, N The number of example groups is N , Eworst ( t ) represents the position of the particle after evolution, i , j , k are three different particles randomly selected from the particle swarm, argmax (·) is the maximum value finding function, fit (·) is a function, X 1 ( t ), X 2 ( t ),…, X N ( t ) is the 1st, 2nd, ..., N Particle positions.
[0012] Optionally, the update formula of the grey wolf algorithm is:
[0013] in, X1 ( t ) is the position of the first particle, X 2 ( t ) is the position of the second particle, X 3 ( t ) is the position of the third particle, X α ( t ), X β ( t ), X δ ( t ) are the optimal solution, the second optimal solution, and the third optimal solution respectively. A 1 , A 2 , A 3 are different adjustment coefficients, , , are the distances between individual wolves and elite individuals, X ( t+1 ) is the updated particle position.
[0014] Optionally, the bracket update strategy of the improved particle swarm algorithm is:
[0015] in, is the distance the particle moves after updating, w is the inertia factor, is the particle group position, is the particle swarm position before updating, c 1 , c 2 is a random number between [0, 1], r 1 , r 2 are the directions of the particle and the optimal solution and suboptimal solution respectively. , are the optimal solution and the suboptimal solution respectively. The particle positions are updated using the improved particle swarm algorithm.
[0016] Compared with the closest prior art, the present invention has the following beneficial effects: The present invention uses multiple synchronous rotating coordinate system transformations to obtain the current component under the rotating reference system, and then selects the corresponding LPF for filtering to extract the current harmonics; the present invention decouples and compensates the current harmonics by establishing a shifted multi-reference system, and the algorithm is simpler than other methods; the present invention improves the amplitude and phase of the dead zone compensation by improving the particle swarm algorithm, which is not affected by the motor parameters, and has a fast iteration speed and is not easy to fall into the local optimal solution. The present invention does not require peripheral circuits and current polarity judgment algorithms, the calculation is simple, the algorithm is easy to understand, and it can effectively remove 5th and 7th harmonics; by improving the particle swarm algorithm to simultaneously optimize the compensation amplitude and phase, the harmonic suppression effect is improved, the characteristics of the gray wolf algorithm are integrated, the global search capability is enhanced, and it is avoided from falling into the local optimal solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 This is a flow chart of a method for harmonic suppression of a permanent magnet synchronous motor based on an improved particle swarm algorithm according to an embodiment of the present invention; Figure 2 This is an overall block diagram of the harmonic suppression strategy for a permanent magnet synchronous motor proposed in an embodiment of the present invention; Figure 3 A schematic diagram of current flow of a half-bridge driver in different switching states according to an embodiment of the present invention; Figure 4 A schematic diagram of switching delay and voltage error caused by inverter nonlinearity proposed in an embodiment of the present invention; Figure 5 A schematic diagram of the harmonic extraction principle proposed in an embodiment of the present invention; Figure 6 This is a flow chart of the improved particle swarm algorithm proposed in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in combination with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] The terms used in the embodiments of the present invention are only used to explain the specific embodiments of the present invention and are not intended to limit the present invention.
[0021] Example 1: Figure 1 As shown, the present invention provides a permanent magnet synchronous motor harmonic suppression method based on an improved particle swarm algorithm, comprising the following steps: S1. Obtain harmonic current components using the electrical angle and three-phase current of the permanent magnet synchronous motor; S2. constructing an algorithm value function according to the harmonic current component; S3. Obtaining a harmonic suppression result of the permanent magnet synchronous motor based on an improved particle swarm algorithm according to the harmonic current component and the algorithm value function.
[0022] S1 specifically includes: Obtain the electrical angle and three-phase current of the permanent magnet synchronous motor; Performing multiple synchronous coordinate transformations according to the electrical angle of the permanent magnet synchronous motor and the three-phase current to obtain current components in a rotating reference system; Using the current component in the rotating reference system to obtain the harmonic current component by filtering based on a low-pass filter; The current component in the rotating reference frame is the current component in the fifth rotating reference frame or the current component in the seventh rotating reference frame.
[0023] The calculation formula of the algorithm value function is as follows:
[0024] in, is the value of the algorithm value function, i d5th and i q5th They represent the 5th harmonic current values of the d-axis and q-axis during the operation of the PMSM. N sum represents the number of sampling points, i is the initial measurement value.
[0025] S3 specifically includes: S3-1, collecting the steady-state operating parameters of the permanent magnet synchronous motor to obtain the fitness function of the initial state and initialize the target parameters; S3-2, set the range of compensation parameters and the number of algorithm iterations and initialize the position and velocity of the particles; S3-3, using the harmonic current component and the algorithm value function to obtain a corresponding algorithm value function value as particle fitness based on an improved particle swarm algorithm; S3-4, according to the fitness of the particles, using the update formula of the grey wolf algorithm and the improved particle swarm algorithm surround update strategy to update and generate the next generation of particles to obtain the position and speed of the new particles; S3-5, judging whether the number of iterations of the algorithm has been reached, if so, stopping the iteration, and obtaining the phase and amplitude of the dead zone compensation time corresponding to the target historical position of the swarm according to the position and speed of the new particle as the harmonic suppression result of the permanent magnet synchronous motor, otherwise, returning to S3-3; The target parameters include an inertia factor, an adjustment coefficient and a random matrix, the compensation parameters are a phase and an amplitude of a dead zone compensation time, and the position of the particle corresponds to a combination of phases and amplitudes of different dead zone compensation times.
[0026] Specifically, after each iteration, it is determined whether the current number of iterations has reached the predefined termination condition. If the termination condition is reached, the iteration process is stopped, and the phase and amplitude of the dead zone compensation time corresponding to the best historical position of the swarm are output according to the position and speed of the new particles obtained by the improved particle swarm algorithm. This is the optimal value obtained through the entire calculation process. This optimal value can minimize the previously defined value function, thereby achieving the best suppression effect on the 5th harmonic current, effectively compensating for the impact of the dead time on the operation of the motor, and improving the operating performance and stability of the permanent magnet synchronous motor.
[0027] S3-4 specifically includes: S3-4-1. Using the particle fitness, obtain the corresponding historical particle fitness; S3-4-2, obtaining the fitness of the particle as the fitness of the initial particle; S3-4-3, determine whether the fitness of the initial particle is less than the fitness of the historical particle. If so, update the position and speed of the initial particle as the position and speed of the new particle, and directly execute S3-5. Otherwise, use the particle evolution strategy to evolve the initial particle to obtain the evolved particle, and execute S3-4-4; S3-4-4, determine whether the fitness of the evolved particle is less than the fitness of the initial particle. If so, use the evolved particle to update the position and speed of the initial particle as the position and speed of the new particle, and directly execute S3-5. Otherwise, retain the initial particle to obtain the fitness of the initial particle, and execute S3-4-5; S3-4-5, generating the next generation of particles according to the fitness of the initial particles using the update formula of the grey wolf algorithm and the surrounding update strategy of the improved particle swarm algorithm; S3-4-6. Obtain the fitness of the next generation particle according to the next generation particle as the fitness of the initial particle, update the target parameter, and return to S3-4.
[0028] Specifically, the IPSO algorithm is run to start the iteration process. In each iteration, for each particle (representing a set of phase and amplitude combinations of dead zone compensation time), it is substituted into the motor control model, and the corresponding algorithm value function value is calculated in combination with the previously obtained harmonic current component data and the algorithm value function calculation formula. This algorithm value function value is used as the fitness evaluation index of the particle, that is, the fitness of the current particle; compare the fitness of the current particle (algorithm value function value) with the fitness of the corresponding historical particle, that is, the phase and amplitude combination of the dead zone compensation time corresponding to the minimum algorithm value function value found in the history of the current particle itself. If the fitness of the current particle is better (that is, the current algorithm value function value is smaller), the optimal position and speed of the individual are updated to obtain the position and speed of the new particle, and the optimal historical position of the swarm is updated (that is, the phase and amplitude combination of the dead zone compensation time corresponding to the minimum algorithm value function value found in the history of the entire particle swarm).
[0029] In each iteration, the particle with the worst fitness is evolved. The particle with the worst fitness in the particle swarm (i.e., the particle with the largest corresponding algorithm value function value) is selected, and its position is updated according to a specific evolution strategy. After the update, the fitness of the evolved particle (calculate the new algorithm value function value) is compared with the fitness before evolution. If the fitness of the evolved particle is better than the fitness before evolution, the evolved particle is replaced with the unevolved particle; if the fitness of the evolved particle is worse than the fitness before evolution, the unevolved particle is retained. In this way, the diversity of the particle swarm is increased, and the ability of the algorithm to search for the optimal dead zone compensation time phase and amplitude combination is improved.
[0030] The calculation formula of the particle evolution strategy is as follows:
[0031] in, x_worst ( t ) indicates the t At the iteration, N The particle with the worst fitness among the particles, N The number of example groups is N , Eworst ( t ) represents the position of the particle after evolution, i , j , k are three different particles randomly selected from the particle swarm, argmax (·) is the maximum value finding function, fit (·) is a function, X 1 ( t ), X 2 (t ),…, X N ( t ) is the 1st, 2nd, ..., N Particle positions.
[0032] The update formula of the gray wolf algorithm is:
[0033] in, X 1 ( t ) is the position of the first particle, X 2 ( t ) is the position of the second particle, X 3 ( t ) is the position of the third particle, X α ( t ), X β ( t ), X δ ( t ) are the optimal solution, the second optimal solution, and the third optimal solution respectively. A 1 , A 2 , A 3 are different adjustment coefficients, , , are the distances between individual wolves and elite individuals, X ( t+1 ) is the updated particle position.
[0034] The bracket update strategy of the improved particle swarm algorithm is:
[0035] in, is the distance the particle moves after updating, w is the inertia factor, is the particle group position, is the particle swarm position before updating, c 1 , c 2 is a random number between [0, 1], r 1 , r 2 are the directions of the particle and the optimal solution and suboptimal solution respectively. , are the optimal solution and the suboptimal solution respectively. The particle positions are updated using the improved particle swarm algorithm.
[0036] Example 2: The present application proposes a method for harmonic suppression of a permanent magnet synchronous motor based on an improved particle swarm algorithm, which does not require peripheral circuits and current polarity judgment algorithms, is simple to calculate, has an easy-to-understand algorithm, and can remove 5th and 7th harmonics. Specifically, it includes: measuring the electrical angle of the PMSM and the three-phase current of the PMSM, and obtaining the current components under two 5th-order rotating reference frames through multiple synchronous rotating coordinate system transformations. and ; The current components in the two fifth-order rotating reference frames are filtered by a low-pass filter (LPF) to obtain the fifth harmonic current components in the two fifth-order rotating reference frames i d5 and i q5 , that is, the fifth harmonic current value of the d-axis and q-axis during PMSM operation i d5th and i q5th ; The improved particle swarm algorithm is used to calculate the voltage compensation amplitude and phase.
[0037] like Figure 2 As shown, the specific process steps of a permanent magnet synchronous motor harmonic suppression method based on an improved particle swarm algorithm (hereinafter referred to as "harmonic suppression strategy") described in an embodiment of the present invention are described, wherein the solid line frame portion is a general PMSM vector control structure, and the dotted line frame portion is a specific harmonic suppression strategy of this embodiment, that is, using Park transform and LPF filtering to extract the amplitude of harmonics of a specific frequency, constructing an algorithm value function, and using the improved particle swarm algorithm to calculate the compensation harmonic amplitude and phase.
[0038] PMSM is usually driven by a three-phase bipolar circuit containing insulated gate bipolar transistors (IGBTs). When the current flows from the inverter to the load, it is defined as positive. Figure 3 As shown, it shows the current flow direction in the a-phase single-phase half-bridge under different switching states. When the current direction of phase A is positive, Q 1 Conductivity Q 2 Shutdown, Q 1 Shutdown Q 2 Shutdown, Q 1 Conductivity Q 2 When conducting, the current flows in the directions shown in ①, ②, and ③ respectively; when the current direction of phase A is negative: Q 1Conductivity Q 2 Shutdown, Q 1 Shutdown Q 2 Shutdown, Q 1 Conductivity Q 2 When conducting, the current flows in the directions shown in ④, ⑤, and ⑥ respectively. Figure 4 As shown, considering the conduction voltage drop of IGBT and the diode voltage drop v t , v d And dead zone delay T d , Phase A upper arm IGBT voltage V an , explaining the cause of voltage error due to the nonlinear conditions of the inverter under different switching states.
[0039] Taking phase A as an example, when the pulse width modulation (PWM) switch is activated, the output voltage error of phase A during the switching period is It can be expressed as follows: (1) in, v t , v d They represent the conduction voltage drop of IGBT and the diode voltage drop respectively. R on is the IGBT resistance, u dc is the DC bus voltage, i a is the A phase current.
[0040] exist( t 1 - t 2 )and( t 3 - t 4 ) period, the dead time delay T d It is expressed as: (2) in, t d is the dead time caused by the PWM generator, t on , t off They are the turn-on and turn-off delay times of the IGBT, taking into accountT pwm The average error voltage during Δu : (3) In the formula, T pwm is the pulse width modulation period, T s1 Represents the ideal state Q 1 Activate Q 2 The time of shut-off, T s2 Represents the ideal state Q 1 Shutdown Q 2 The time of opening.
[0041] Average dead zone voltage It can be expressed as: (4) In the formula, sign (·) is a sign function. In order to compensate for the dead zone effect, the anti-dead time Insert into duration( t 2 – t 3 ), according to Volta's second balance law: (5) Combining (4) and (5), the following formula can be derived: (6) in, To consider the dead time delay of the inverter conduction voltage drop, i d is the inverter current; In most cases: u dc Much greater than v t and v d ; v t and v Very close in value; v t is proportional to the current. Therefore, the expression of equation (7) b can be rewritten as: (7) In the formula, a For a fixed dead-band delay, b is the current delay coefficient, , .
[0042] The phase delay is described as θ d , considering the sampling error and equation (6), the actual three-phase dead zone compensation time can be described as: (8) in, , , They are the dead zone delay time of the three phases ABC, θ e is the initial phase, and They are θ d and According to formula (8), directly compensating the dead time by sampling the current polarity will lead to erroneous compensation and even affect the stability of the motor control. In summary, in the control of PMSM, compensation based only on amplitude or only on phase is not enough to completely suppress the harmonic current caused by the inverter dead time and sampling error. Therefore, it is necessary to use the IPSO algorithm to compensate for the amplitude and phase simultaneously.
[0043] Since the main harmonic components of PMSM are the 5th, 7th, 11th and 13th harmonics, and the amplitudes of these harmonics decrease with the increase of the order, the focus is mainly on the 5th and 7th harmonics to be studied.
[0044] In a stationary three-phase coordinate system, the 5th and 7th harmonic voltages in the three phases of a PMSM can be expressed as: (9) In the formula, u a , u b , u c They are the three-phase voltages of ABC, ω is the motor speed, t is the running time, u 1 , u 5 , u 7 are the amplitudes of the fundamental voltage, the 5th and 7th harmonic voltages, respectively. θ 1 , θ 5 , θ 7are the initial phase angles of the fundamental voltage, the 5th harmonic voltage and the 7th harmonic voltage respectively.
[0045] like Figure 5 As shown, the three-phase current is transformed into the rotating coordinate system through Clark transformation and Park transformation. This process allows the extraction of the magnitude of the 5th and 7th harmonic currents. Due to the periodic fluctuation of the motor, in order to improve the accuracy of the results, the average value of multiple points of the harmonic current is used as the final value function. Since the 5th and 7th harmonics are caused by the nonlinear characteristics of the drive circuit and the influence of the dead time, when the control circuit is compensated, the 5th and 7th harmonics will increase or decrease at the same time. Therefore, in order to reduce the amount of calculation and consider the actual physical meaning, the algorithm value function is defined as follows: (10) In the formula, i is the initial measurement value, N sum represents the number of sampling points, is the value of the algorithm value function, i d5th and i q5th They represent the fifth harmonic current values of the d-axis and q-axis during the operation of the PMSM. The optimal values are the phase and amplitude of the dead zone compensation time.
[0046] like Figure 6 As shown, it is a flowchart of the improved particle swarm algorithm of this embodiment, that is, a flowchart of dead zone compensation phase and amplitude using the improved algorithm strategy, which illustrates the specific process steps of obtaining harmonic amplitude by the hybrid gray wolf algorithm strategy described in this embodiment.
[0047] The process of using IPSO to eliminate PMSM harmonics is as follows: (1) Initial parameter acquisition: Before the algorithm takes effect, the steady-state operating parameters of the PMSM are collected, including the speed and the three-phase current of the PMSM, and the fitness function of this initial state is calculated; (2) Parameter initialization: Initialize parameters, w is the inertia factor, A Adjustment factor A 1 , A 2 , A 3 matrix, C is a random number c 1 , c 2 Matrix, set the range of compensation parameters, and initialize NThe positions and velocities of the particles (representing potential solutions) also define the termination condition of the algorithm, that is, the number of algorithm iterations; (3) IPSO algorithm execution: run the improved particle swarm algorithm to evaluate the fitness of each particle; (4) Particle generation and control input: Generate the next generation of particles based on the update of the IPSO algorithm and perform boundary checks, calculate the optimal solution, suboptimal solution and third optimal solution for the fitness of the new generation of particles, and update the parameter inertia factor w , adjustment coefficient matrix A , random number matrix C , and input it into the control process of PMSM; (5) Iteration and convergence check: Compare the fitness of the current particle with its best solution in history. If the current fitness is better, update the best position of the individual and the best historical position of the swarm at the same time to determine whether the current number of iterations has reached a predefined number.
[0048] In order to increase the diversity of the particle swarm and enhance the search ability of the algorithm, the particle with the worst fitness is evolved in each iteration. If the fitness of the evolved particle is better than that of the unevolved particle, the evolved particle will replace the unevolved particle. If the fitness of the evolved particle is worse than that of the unevolved particle, the unevolved particle will be retained. The evolution strategy for the particle with the worst fitness is as follows:
[0049] in, x_worst ( t ) indicates the t At the iteration, N The particle with the worst fitness among the particles, N The number of example groups is N , Eworst ( t ) represents the position of the particle after evolution, i , j , k are three different particles randomly selected from the particle swarm, argmax (·) is the maximum value finding function, fit (·) is a function, X 1 ( t ), X 2 ( t ),…, X N ( t ) is the 1st, 2nd, ..., N Particle positions.
[0050] In order to avoid falling into the local optimal solution, the particle swarm algorithm update formula is improved by combining the gray wolf algorithm. The main reason is that the gray wolf algorithm adopts the elite group guidance strategy during iterative update, that is, the three best elite individuals in the group are selected to guide the update, instead of the best individual in the particle swarm. In addition, the encirclement guidance strategy of the gray wolf algorithm, that is, in the search process, other particles will approach the elite group in an encircling manner, so combining the particle swarm algorithm with the wolf group algorithm can further improve the algorithm's search ability. The particle swarm algorithm update formula is as follows: (14) in, X ( t+1 ) is the updated particle position, t is the number of iterations, X p ( t ) is the position vector of the prey, X ( t ) is the position vector of the gray wolf, A and C is the coefficient vector, D The distance the particle moves.
[0051] The update formula of the gray wolf algorithm is: (15) in, X α ( t ), X β ( t ), X δ ( t ) are the optimal solution, the second optimal solution, and the third optimal solution respectively. A 1 , A 2 , A 3 are different adjustment coefficients, , , They are the distances between individual wolves and elite individuals.
[0052] Therefore, the IPSO wraparound update strategy is:
[0053] in, is the distance the particle moves after updating, w is the inertia factor, is the particle group position, is the particle swarm position before updating,c 1 , c 2 is a random number between [0, 1], r 1 , r 2 are the directions of the particle and the optimal solution and suboptimal solution respectively. , are the optimal solution and the suboptimal solution respectively. The particle positions are updated using the improved particle swarm algorithm.
[0054] It can be seen from formula (13) that the original individual experience and optimal particle guidance of the particle swarm algorithm are retained, and the gray wolf algorithm update strategy is introduced, which not only includes the elite group guidance strategy of the gray wolf algorithm but also includes the encirclement search strategy of the gray wolf algorithm. By introducing the gray wolf algorithm, the shortcomings of the particle swarm algorithm in the iterative update formula can be made up.
[0055] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0056] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0057] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0058] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0059] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A permanent magnet synchronous motor harmonic suppression method based on improved particle swarm algorithm, characterized in that: The specific steps include: S1. Obtain harmonic current components using the electrical angle and three-phase current of the permanent magnet synchronous motor; S2. constructing an algorithm value function according to the harmonic current component; S3. Obtaining a harmonic suppression result of the permanent magnet synchronous motor based on an improved particle swarm algorithm according to the harmonic current component and the algorithm value function.
2. The method for harmonic suppression of a permanent magnet synchronous motor based on an improved particle swarm algorithm according to claim 1, characterized in that: Using the electrical angle and three-phase current of the permanent magnet synchronous motor to obtain the harmonic current components includes: Obtain the electrical angle and three-phase current of the permanent magnet synchronous motor; Performing multiple synchronous coordinate transformations according to the electrical angle of the permanent magnet synchronous motor and the three-phase current to obtain current components in a rotating reference system; Using the current component in the rotating reference system to obtain the harmonic current component by filtering based on a low-pass filter; The current component in the rotating reference frame is the current component in the fifth rotating reference frame or the current component in the seventh rotating reference frame.
3. The method for harmonic suppression of a permanent magnet synchronous motor based on an improved particle swarm algorithm according to claim 1, characterized in that: The calculation formula of the algorithm value function is as follows: in, is the value of the algorithm value function, i d5th and i q5th They represent the 5th harmonic current values of the d-axis and q-axis during the operation of the PMSM. N sum represents the number of sampling points, i is the initial measurement value.
4. The method for harmonic suppression of a permanent magnet synchronous motor based on an improved particle swarm algorithm according to claim 1, characterized in that: Acquiring the harmonic suppression result of the permanent magnet synchronous motor by using the improved particle swarm algorithm according to the harmonic current component and the algorithm value function includes: S3-1, collecting the steady-state operating parameters of the permanent magnet synchronous motor to obtain the fitness function of the initial state and initialize the target parameters; S3-2, set the range of compensation parameters and the number of algorithm iterations and initialize the position and velocity of the particles; S3-3, using the harmonic current component and the algorithm value function to obtain a corresponding algorithm value function value as particle fitness based on an improved particle swarm algorithm; S3-4, according to the fitness of the particles, using the update formula of the grey wolf algorithm and the surrounding update strategy of the improved particle swarm algorithm to update and generate the next generation of particles to obtain the position and speed of the new particles; S3-5, judging whether the number of iterations of the algorithm has been reached, if so, stopping the iteration, and obtaining the phase and amplitude of the dead zone compensation time corresponding to the target historical position of the swarm according to the position and speed of the new particle as the harmonic suppression result of the permanent magnet synchronous motor, otherwise, returning to S3-3; The target parameters include an inertia factor, an adjustment coefficient and a random matrix, the compensation parameters are a phase and an amplitude of a dead zone compensation time, and the position of the particle corresponds to a combination of phases and amplitudes of different dead zone compensation times.
5. The method for harmonic suppression of a permanent magnet synchronous motor based on an improved particle swarm algorithm according to claim 4 is characterized in that: According to the particle fitness, the update formula of the gray wolf algorithm and the improved particle swarm algorithm are used to update the next generation of particles to obtain the position and speed of the new particles, including: S3-4-1. Using the particle fitness, obtain the corresponding historical particle fitness; S3-4-2, obtaining the fitness of the particle as the fitness of the initial particle; S3-4-3, determine whether the fitness of the initial particle is less than the fitness of the historical particle. If so, update the position and speed of the initial particle as the position and speed of the new particle, and directly execute S3-5. Otherwise, use the particle evolution strategy to evolve the initial particle to obtain the evolved particle, and execute S3-4-4; S3-4-4, determine whether the fitness of the evolved particle is less than the fitness of the initial particle. If so, use the evolved particle to update the position and speed of the initial particle as the position and speed of the new particle, and directly execute S3-5. Otherwise, retain the initial particle to obtain the fitness of the initial particle, and execute S3-4-5; S3-4-5, generating the next generation of particles according to the fitness of the initial particles using the update formula of the grey wolf algorithm and the surrounding update strategy of the improved particle swarm algorithm; S3-4-6. Obtain the fitness of the next generation particle according to the next generation particle as the fitness of the initial particle, update the target parameter, and return to S3-4.
6. The method for harmonic suppression of a permanent magnet synchronous motor based on an improved particle swarm algorithm according to claim 5, characterized in that: The calculation formula of the particle evolution strategy is as follows: in, x_ worst ( t ) indicates the t At the iteration, N The particle with the worst fitness among the particles, N The number of example groups is N , Eworst ( t ) represents the position of the particle after evolution, i , j , k are three different particles randomly selected from the particle swarm, argmax (·) is the maximum value finding function, fit (·) is a function, X 1 ( t ), X 2 ( t ),…, X N ( t ) is the 1st, 2nd, ..., N Particle positions.
7. The method for harmonic suppression of a permanent magnet synchronous motor based on an improved particle swarm algorithm according to claim 6, characterized in that: The update formula of the gray wolf algorithm is: in, X 1 ( t ) is the position of the first particle, X 2 ( t ) is the position of the second particle, X 3 ( t ) is the position of the third particle, X α ( t ), X β ( t ), X δ ( t ) are the optimal solution, the second optimal solution, and the third optimal solution respectively. A 1 , A 2 , A 3 are different adjustment coefficients, , , are the distances between individual wolves and elite individuals, X ( t+1 ) is the updated particle position.
8. The method for harmonic suppression of a permanent magnet synchronous motor based on an improved particle swarm algorithm according to claim 7, characterized in that: The bracket update strategy of the improved particle swarm algorithm is: in, is the distance the particle moves after updating, w is the inertia factor, is the particle group position, is the particle swarm position before updating, c 1 , c 2 is a random number between [0, 1], r 1 , r 2 are the directions of the particle, the optimal solution, and the suboptimal solution, respectively. , are the optimal solution and the suboptimal solution respectively. The particle positions are updated using the improved particle swarm algorithm.
Citation Information
Patent Citations
Permanent magnet synchronous motor torque periodic pulsation suppression control device and method
CN110855204A
Dead-zone voltage compensation method and system for permanent magnet synchronous motor
CN117081452A
Permanent magnet synchronous motor harmonic suppression method based on particle swarm adaptive filter
CN118399817A
Permanent magnet synchronous motor harmonic compensation method and system considering output coupling
CN119171792A