Permanent magnet synchronous motor control method and system based on heuristic search algorithm
By adopting a control method based on a heuristic search algorithm in the permanent magnet synchronous motor control system, using the honey badger algorithm and the out-of-control suppression mechanism, online search and adjustment of control parameters are realized, solving the challenges of control performance under different conditions, and improving the motor's response speed and stability.
Patent Information
- Application Number
- CN202510265884.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-05-02
AI Technical Summary
The prior art faces control performance challenges under different reference speeds and load torque changes when controlling permanent magnet synchronous motors, and fixed control parameters may lead to degradation of control performance when system target changes or motor parameters deteriorate.
The control method based on the heuristic search algorithm is adopted to construct the PMSM system model under the d-axis-q-axis synchronous rotation coordinate system, and the optimization model is constructed through the honey badger algorithm to realize the online search target control parameters. This method introduces an out-of-control suppression mechanism in the honey badger algorithm, including over-pressure suppression and jitter suppression, ensuring system stability and continuity of the optimization process.
It realizes that during the actual operation of the motor, automatically finds the optimal control parameters, so that the permanent magnet synchronous motor has faster and more stable response characteristics, and maintains the best state of system performance by adjusting the control parameters in real time when the system parameters or working environment changes.
Smart Images

Figure CN119921607A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of motor control, and in particular to a permanent magnet synchronous motor control method and system based on a heuristic search algorithm. Background Art
[0002] Permanent Magnet Synchronous Motor (PMSM) is an important modern motor. Due to its excellent energy conversion efficiency, high power density, high torque, wide speed regulation range and other advantages, it is widely used in high-quality electric drive systems such as manufacturing industry, electric vehicles, wind power generation and ship propulsion, and is receiving more and more attention.
[0003] In a nonlinear system, the relationship curve between the output and input signals of the control object will be linearized near the operating point. The efficiency of the controller can be guaranteed by selecting PI (proportional, integral) parameters that match the specific working conditions. However, when dealing with highly nonlinear systems such as PMSM, the control performance of PI control faces challenges caused by changes in reference speed and load torque. Traditional PID (proportional, integral, differential) control parameters will be weighed for different goals during the design process to obtain a set of control parameters that are close to optimal performance under specific goals. However, in situations where the system goals need to be reconfigured or the motor parameters are degraded, fixed control parameters may lead to a decrease in control performance, affecting the further use of permanent magnet synchronous motors. Summary of the invention
[0004] Based on this, the purpose of the present invention is to provide a permanent magnet synchronous motor control method and system based on a heuristic search algorithm to solve the problems existing in the prior art.
[0005] The present invention proposes a permanent magnet synchronous motor control method based on a heuristic search algorithm, comprising:
[0006] Constructing a PMSM system model under the d-axis-q-axis of a synchronous rotating coordinate system, and performing parameter tuning of a speed loop PI regulator and a current loop PI regulator on the PMSM system model;
[0007] Construct an optimization model based on the honey badger algorithm, the optimization model is used to search for target control parameters online, and the control target of the optimization model is formulated based on project requirements;
[0008] Based on actual deployment requirements, the structure of the honey badger algorithm in the optimization model is improved, and out-of-control suppression is constructed in the honey badger algorithm, wherein the out-of-control suppression includes overshoot suppression and jitter suppression, so as to obtain a target optimization model;
[0009] Based on the target optimization model, the control effects of the target control parameters found under different evaluation indicators are analyzed, so as to reconstruct and optimize the control parameters of the permanent magnet synchronous motor in real time according to user needs.
[0010] Optionally, the step of constructing a PMSM system model under the d-axis-q-axis of the synchronous rotating coordinate system includes:
[0011] Obtain the original stator voltage equation, stator flux equation, electromagnetic torque equation and motor motion equation in PMSM;
[0012] The stator flux equation is substituted into the stator voltage original equation to obtain the stator voltage equation, and a PMSM system model is constructed based on the stator voltage equation and the stator flux equation, the electromagnetic torque equation and the motor motion equation.
[0013] Optionally, the PMSM system model is expressed as:
[0014]
[0015] In the formula, u d 、u q are the voltage components of the stator on the d-axis and q-axis respectively, R is the stator resistance, i d and i q are the current components of the stator on the d-axis and q-axis respectively, L d , L q are the inductance components on the d-axis and q-axis respectively, ω e is the electrical angular velocity of the motor, T e is the electromagnetic torque, ψ f is the permanent magnet flux, p n is the pole pair number of the PMSM system model, J is the moment of inertia, ω m is the mechanical angular velocity of the motor, T L is the load torque, B is the damping coefficient;
[0016] The expression for parameter setting of the speed loop PI regulator is:
[0017]
[0018] In the formula, is the desired control current of the stator on the q axis, K pω , K iω are the two adjustment parameters of the PI regulator, s is the complex variable in the Laplace transform, which is used to convert the differential equation in the time domain into an algebraic equation in the complex frequency domain. For the desired control speed, B a is the active damping coefficient;
[0019] in,
[0020]
[0021] In the formula, β * is the expected closed-loop bandwidth;
[0022] The expression for parameter setting of the current loop PI regulator is:
[0023]
[0024] In the formula, are the desired control voltages of the stator on the d-axis and q-axis, CK pd , CK pq are the two proportional gains of the PI regulator on the d-axis and q-axis, CK id , CK iq are the two integral gains of the PI regulator on the d-axis and q-axis respectively, are the desired control currents of the stator on the d-axis and q-axis respectively.
[0025] Optionally, the step of constructing an optimization model according to the honey badger algorithm includes:
[0026] Construct an initialization model and set initialization parameters, including the number of iterations t max and population size n;
[0027] Calculate the fitness f of each honey badger individual i , take the honey badger individual with the smallest fitness as the comparison individual, and define the position of the comparison individual as x prey , the fitness is f prey ;
[0028] Define the odor intensity and density factors of the search target and the search direction;
[0029] Update the position of the honey badger individual based on the sniffing mode or honey guide bird mode, calculate the fitness of the honey badger individual after the updated position, and compare the fitness of the honey badger individual before and after the position update;
[0030] If the fitness after the position update is greater than the fitness before the position update, the fitness of the honey badger individual is replaced and the position of the honey badger individual is updated synchronously;
[0031] If the fitness after the position update is not greater than the fitness before the position update, the original fitness and position of the honey badger individual will be retained;
[0032] Traverse all honey badger individuals to update their positions, determine the individual with the smallest fitness among the updated honey badger individuals, and compare their fitness with that of the comparison individuals to determine whether to update the fitness and position of the comparison individuals in order to build an optimization model.
[0033] Optionally, the expression of the initialization model is:
[0034]
[0035] Where the matrix P represents the candidate solutions to the problem, n is the number of honey badgers in the population, D is the dimension, and x i,j represents the jth dimension of the i-th honey badger, x i represents the i-th honey badger, r1 is a random number between 0 and 1, and ub i lb i are the upper and lower limits of the search domain respectively;
[0036] The expression of the odor intensity is:
[0037]
[0038] In the formula, S = (x i -x i+1 ) 2 , represents the distribution density among honey badgers, d i =x prey -x i , represents the distance between the target and the i-th honey badger, r2 is a random number between 0 and 1;
[0039] The expression of the density factor is:
[0040]
[0041] In the formula, C is a constant greater than 1, h is the number of iterations, and h max is the maximum number of iterations;
[0042] The expression of the search direction is:
[0043]
[0044] Where r3 is a random number.
[0045] Optionally, the step of structurally improving the honey badger algorithm in the optimization model based on actual deployment requirements includes:
[0046] Constructing a reference speed module, the reference speed module is used to output a step signal so that the system steps between a given speed and a response speed;
[0047] Obtain the initial control parameters for stable operation of the system;
[0048] When the Honey Badger Algorithm detects a step signal from the reference speed module from the given speed to the response speed, the HBA outputs the control parameters that need to calculate the fitness and records the error between the response speed and the given speed of the system;
[0049] When the Honey Badger Algorithm detects a step signal from the response speed to the given speed sent by the reference speed module, the HBA outputs the currently found target control parameters and stabilizes the system.
[0050] Optionally, the step of constructing out-of-control suppression in the honey badger algorithm, wherein the out-of-control suppression includes overshoot suppression and jitter suppression, and obtaining the target optimization model includes:
[0051] Establishing a target upper speed limit of the motor based on the response speed, establishing a target lower speed limit of the motor based on the given speed, and suppressing overshoot of motor speed feedback according to the target upper speed limit and the target lower speed limit;
[0052] The speed of several sampling points of the motor is obtained, and the average speed of the motor is calculated based on the moving average method. The upper and lower limits of the jitter average speed are obtained based on the average speed of the motor, and jitter suppression is constructed according to the upper and lower limits of the jitter average speed.
[0053] Optionally, the expression of the upper limit of the target speed is:
[0054] H L =responded rpm ×2
[0055] The expression of the lower limit of the target speed is:
[0056] L L =stabilized rpm ×0.5
[0057] In the formula, responded rpm To respond to the speed, stabilized rpm is a given speed;
[0058] The expression of the average speed of the motor is:
[0059]
[0060] In the formula, k is the window size of the moving average method, v i is the rotation speed of the i-th sampling point, and m is the number of sampling points;
[0061] The upper limit of the average speed of vibration is expressed as:
[0062] UN avg =(1+δ)N avg
[0063] The expression for the lower limit of the jitter average speed is:
[0064] LN avg =(1-δ)N avg
[0065] Where δ is the threshold value of the speed jitter amplitude as a percentage of the average speed;
[0066] The expression of jitter suppression is:
[0067]
[0068] In the formula, f u Indicates the number of times the motor speed exceeds the upper limit of the jitter average speed within a given time range, f l Indicates the number of times the motor speed is lower than the lower limit of the jitter average speed within a given time range.
[0069] Optionally, the evaluation indicators include at least: ISE, ITSE, IAE, ITAE;
[0070]
[0071] Where, e represents the error, t represents the integration time, and T is the integration time threshold.
[0072] The present invention also proposes a permanent magnet synchronous motor control system based on a heuristic search algorithm, comprising:
[0073] A tuning module is used to construct a PMSM system model under the d-axis-q-axis of the synchronous rotating coordinate system, and to perform parameter tuning of a speed loop PI regulator and a current loop PI regulator on the PMSM system model;
[0074] A construction module is used to construct an optimization model according to the honey badger algorithm, wherein the optimization model is used to search for target control parameters online, and the control target of the optimization model is formulated based on project requirements;
[0075] A construction module is used to improve the structure of the honey badger algorithm in the optimization model based on actual deployment requirements, and to construct out-of-control suppression in the honey badger algorithm, wherein the out-of-control suppression includes overshoot suppression and jitter suppression, so as to obtain a target optimization model;
[0076] The analysis module is used to analyze the control effects of the target control parameters found under different evaluation indicators based on the target optimization model, so as to reconstruct and optimize the control parameters of the permanent magnet synchronous motor in real time according to user needs.
[0077] Compared with the prior art, the present invention has the following beneficial effects: the permanent magnet synchronous motor control method based on the heuristic search algorithm provided in the present application constructs a PMSM system model under the d-axis-q-axis of the synchronous rotating coordinate system, and performs parameter tuning of the speed loop PI regulator and the current loop PI regulator on the PMSM system model; an optimization model is constructed according to the honey badger algorithm, and the optimization model is used to search for target control parameters online, and the control target of the optimization model is formulated based on project requirements; it can automatically find the optimal control parameters according to the selected target during the actual operation of the motor, so that the PMSM system has faster and more stable response characteristics, and further, the honey badger algorithm in the optimization model is structurally improved based on actual deployment requirements, and out-of-control suppression is constructed in the honey badger algorithm, and the out-of-control suppression includes overshoot suppression and jitter suppression, so as to obtain a target optimization model; based on the target optimization model, the control effect of the target control parameters found under different evaluation indicators is analyzed, so as to reconstruct and optimize the control parameters of the permanent magnet synchronous motor in real time according to user needs. The target optimization model introduces a failure control mechanism including overshoot suppression and jitter suppression, which can suppress system instability and jitter problems caused by poor solution parameters during the optimization process. During the entire online optimization process, the motor runs stably and without interruption, which is convenient for deployment in actual industrial operating conditions. It is suitable for large-scale promotion.
[0078] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 is a flow chart of a permanent magnet synchronous motor control method based on a heuristic search algorithm in Embodiment 1 of the present invention;
[0080] Figure 2 This is a structural block diagram of a computer in Embodiment 4 of the present invention.
[0081] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0082] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0083] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0084] Embodiment 1
[0085] See also Figure 1 , which shows a permanent magnet synchronous motor control method based on a heuristic search algorithm in a first embodiment of the present invention. The permanent magnet synchronous motor control method based on a heuristic search algorithm specifically includes steps S10 to S40:
[0086] S10, constructing a PMSM system model under the d-axis-q-axis of the synchronous rotating coordinate system, and performing parameter adjustment of a speed loop PI regulator and a current loop PI regulator on the PMSM system model;
[0087] In the specific implementation, the PMSM system model under the synchronous rotating coordinate system d-axis-q-axis is first constructed, and the system PI parameters of the PMSM system model are pre-tuned. Optionally, the system PI parameter pre-tuning includes parameter tuning of the speed loop PI regulator and parameter tuning of the current loop PI regulator.
[0088] In some optional embodiments, the step of constructing a PMSM system model under the d-axis-q-axis of the synchronous rotating coordinate system includes:
[0089] Obtain the original stator voltage equation, stator flux equation, electromagnetic torque equation and motor motion equation in PMSM;
[0090] The stator flux equation is substituted into the stator voltage original equation to obtain the stator voltage equation, and a PMSM system model is constructed based on the stator voltage equation and the stator flux equation, the electromagnetic torque equation and the motor motion equation.
[0091] The original equation of stator voltage is expressed as:
[0092]
[0093] The expression of the stator flux equation is:
[0094] The expression of the electromagnetic torque equation is:
[0095] The motor motion equation is expressed as:
[0096] Substituting the stator flux equation into the original stator voltage equation, we get the stator voltage equation. The transformed stator voltage equation is:
[0097]
[0098] Then the expression of the PMSM system model is obtained as follows:
[0099]
[0100] In the formula, u d 、u q are the voltage components of the stator on the d-axis and q-axis respectively, R is the stator resistance, i d and i q are the current components of the stator on the d-axis and q-axis respectively, L d , L q are the inductance components on the d-axis and q-axis respectively, ω e is the electrical angular velocity of the motor, T e is the electromagnetic torque, ψ f is the permanent magnet flux, p n is the pole pair number of the PMSM system model, J is the moment of inertia, ω m is the mechanical angular velocity of the motor, T L is the load torque, B is the damping coefficient;
[0101] The step of performing parameter adjustment of the speed loop PI regulator on the PMSM system model includes:
[0102] Adopt i d = 0 control strategy and introduce the concept of "active damping" to set the parameters of the speed loop PI regulator. Assuming that the motor is started under no-load conditions, the mechanical angular acceleration of the motor is:
[0103]
[0104] Configure the above formula to the desired closed-loop bandwidth β * , the transfer function of the motor's mechanical angular velocity relative to the q-axis current is:
[0105]
[0106] In the formula, ω m (s) is the mechanical angular velocity Laplace output, i′ q (s) is i q The derivative of (s), i q (s) is the Laplace input of the q-axis current;
[0107] Based on the mechanical angular acceleration and transfer function of the motor, the expression of the active damping coefficient is:
[0108]
[0109] Using the traditional PI regulator, the expression for parameter setting of the speed loop PI regulator is:
[0110]
[0111] In the formula, is the desired control current of the stator on the q axis, K pω , K iω are the two adjustment parameters of the PI regulator, s is the complex variable in the Laplace transform, which is used to convert the differential equation in the time domain into an algebraic equation in the complex frequency domain. For the desired control speed, B a is the active damping coefficient;
[0112] in,
[0113]
[0114] In the formula, β * is the expected closed-loop bandwidth;
[0115] The steps of setting the parameters of the current loop PI regulator for the PMSM system model are as follows:
[0116] By using a conventional PI regulator and combining it with a feedforward decoupling control strategy, the parameter setting expression of the current loop PI regulator can be obtained as follows:
[0117]
[0118] In the formula, are the desired control voltages of the stator on the d-axis and q-axis, CK pd , CK pq are the two proportional gains of the PI regulator on the d-axis and q-axis, CK id , CK iq are the two integral gains of the PI regulator on the d-axis and q-axis respectively, are the desired control currents of the stator on the d-axis and q-axis respectively;
[0119] in,
[0120] Where, f is the given adjustment coefficient;
[0121] Define the response time t res is the time required for the system to respond from 10% to 90% of the step, then t res=ln9 / α, it can be seen that reducing α will extend the response time of the system, and increasing α will speed up the response speed of the system. Since the system response time is limited by the electrical time constant, α in practice cannot be infinitely expanded. The electrical time constant is:
[0122]
[0123] S20, constructing an optimization model according to the honey badger algorithm, wherein the optimization model is used to search for target control parameters online, and the control target of the optimization model is formulated based on project requirements;
[0124] Optionally, the step of constructing an optimization model according to the honey badger algorithm includes:
[0125] Construct an initialization model and set initialization parameters, including the number of iterations t max and population size n;
[0126] Calculate the fitness f of each honey badger individual i , take the honey badger individual with the smallest fitness as the comparison individual, and define the position of the comparison individual as x prey , the fitness is f prey ;
[0127] Define the odor intensity and density factors of the search target and the search direction;
[0128] Update the position of the honey badger individual based on the sniffing mode or honey guide bird mode, calculate the fitness of the honey badger individual after the updated position, and compare the fitness of the honey badger individual before and after the position update;
[0129] If the fitness after the position update is greater than the fitness before the position update, the fitness of the honey badger individual is replaced and the position of the honey badger individual is updated synchronously;
[0130] If the fitness after the position update is not greater than the fitness before the position update, the original fitness and position of the honey badger individual will be retained;
[0131] Traverse all honey badger individuals to update their positions, determine the individual with the smallest fitness among the updated honey badger individuals, and compare their fitness with that of the comparison individuals to determine whether to update the fitness and position of the comparison individuals in order to build an optimization model.
[0132] The expression of the initialization model is:
[0133]
[0134] Where the matrix P represents the candidate solutions to the problem, n is the number of honey badgers in the population, D is the dimension, and x i,j represents the jth dimension of the i-th honey badger, x irepresents the i-th honey badger, r1 is a random number between 0 and 1, and ub i lb i are the upper and lower limits of the search domain respectively;
[0135] The expression of the odor intensity is:
[0136]
[0137] In the formula, S = (x i -x i+1 ) 2 , represents the distribution density among honey badgers, d i =x prey -x i , represents the distance between the target and the i-th honey badger, r2 is a random number between 0 and 1;
[0138] The expression of the density factor is:
[0139]
[0140] In the formula, C is a constant greater than 1, h is the number of iterations, and h max is the maximum number of iterations;
[0141] The expression of the search direction is:
[0142]
[0143] Where r3 is a random number.
[0144] Update the position of individual honey badgers. The honey badger algorithm includes the "mining stage" and the "honey stage";
[0145] The expression for updating the position of the honey badger in the "digging phase" is:
[0146] x new =x prey +F×β×I×x prey +F×r4×a×d i ×|cos(2πr5)×[1-cos(2πr6)]|
[0147] The expression for updating the position of the honey badger in the "honey stage" is:
[0148] x new =x prey +F×r7×α×d i
[0149] In the formula, β is a constant greater than 1, which represents the ability of the honey badger to obtain food; r4, r5, r6 and r7 are different random numbers between 0 and 1;
[0150] Determining whether the search direction in the next stage will enter the sniffing mode or the honey-guided bird mode is determined by a random number. Specifically, when the random number r3 is less than or equal to 0.5, the algorithm will enter the sniffing mode and use the update formula of the "mining stage"; and when the random number r3 is greater than 0.5, the algorithm will enter the honey-guided bird mode and use the update formula of the "honey stage".
[0151] Furthermore, the fitness of the honey badger after the updated position is calculated, and the new fitness is compared with the old fitness. If a better fitness is obtained, the new fitness is used to replace the old fitness and the position of the honey badger is updated synchronously, otherwise the old position and fitness of the honey badger are retained.
[0152] After all honey badgers are updated, find the individual with the smallest fitness among all individuals after the update and the x before the update. prey Compare and determine whether to update x based on the comparison result. prey and f prey , in order to build an optimization model.
[0153] S30, based on actual deployment requirements, structurally improve the honey badger algorithm in the optimization model, and construct out-of-control suppression in the honey badger algorithm, wherein the out-of-control suppression includes overshoot suppression and jitter suppression, to obtain a target optimization model;
[0154] The step of structurally improving the honey badger algorithm in the optimization model based on actual deployment requirements includes:
[0155] Constructing a reference speed module, the reference speed module is used to output a step signal so that the system steps between a given speed and a response speed;
[0156] Obtain the initial control parameters for stable operation of the system;
[0157] When the Honey Badger Algorithm detects a step signal from the reference speed module from the given speed to the response speed, the HBA outputs the control parameters that need to calculate the fitness and records the error between the response speed and the given speed of the system;
[0158] When the Honey Badger Algorithm detects a step signal from the response speed to the given speed sent by the reference speed module, the HBA outputs the currently found target control parameters and stabilizes the system.
[0159] The reference speed module can output a series of step signals to make the system step from the given speed to the response speed stage, and return to the given speed step again after a certain period of time. HBA (Honey Badger Algorithm) can execute the corresponding operation steps according to the signal of the step module. Specifically, in the initial stage, HBA outputs an initial control parameter to make the system run stably. The initial control parameter can be calculated according to the parameter setting method. When the honey badger algorithm detects the step signal from the given speed to the response speed issued by the reference speed module, HBA will output the control parameter that needs to calculate the fitness, and record the error between the response speed and the given speed of the system during this period. When the honey badger algorithm detects the step signal from the response speed to the given speed, HBA outputs the target control parameter currently found and stabilizes the system to avoid the interference of the previous iteration cycle on the next iteration cycle; at the same time, the honey badger algorithm will also calculate the fitness of the corresponding honey badger individual in the response according to step S20; update the honey badger position during the optimization process. Optionally, in a specific implementation, HBA does not update individual positions in the first round of iterations, so the first step needs to be designed separately, and the optimization system starts iterating from the second round.
[0160] Optionally, in order to avoid failure of the PMSM system, a fault jump detection module is added to the algorithm, including an overshoot suppression module and a jitter suppression module.
[0161] The step of constructing out-of-control suppression in the honey badger algorithm, wherein the out-of-control suppression includes overshoot suppression and jitter suppression, and obtaining the target optimization model includes:
[0162] Establishing a target upper speed limit of the motor based on the response speed, establishing a target lower speed limit of the motor based on the given speed, and suppressing overshoot of motor speed feedback according to the target upper speed limit and the target lower speed limit;
[0163] The speed of several sampling points of the motor is obtained, and the average speed of the motor is calculated based on the moving average method. The upper and lower limits of the jitter average speed are obtained based on the average speed of the motor, and jitter suppression is constructed according to the upper and lower limits of the jitter average speed.
[0164] The expression of the upper limit of the target speed is:
[0165] H L =responded rpm ×2
[0166] The expression of the lower limit of the target speed is:
[0167] L L =stabilized rpm ×0.5
[0168] In the formula, responded rpm To respond to the speed, stabilized rpm is a given speed;
[0169] The expression of the average speed of the motor is:
[0170]
[0171] In the formula, k is the window size of the moving average method, v i is the rotation speed of the i-th sampling point, and m is the number of sampling points;
[0172] The upper limit of the average speed of vibration is expressed as:
[0173] UN avg =(1+δ)N abg
[0174] The expression for the lower limit of the jitter average speed is:
[0175] LN avg =(1-δ)N avg
[0176] Where δ is the threshold value of the speed jitter amplitude as a percentage of the average speed;
[0177] The expression of jitter suppression is:
[0178]
[0179] In the formula, f u Indicates the number of times the motor speed exceeds the upper limit of the jitter average speed within a given time range, f l Indicates the number of times the motor speed is lower than the lower limit of the jitter average speed within a given time range.
[0180] S40, analyzing the control effects of the target control parameters found under different evaluation indicators based on the target optimization model, so as to reconstruct and optimize the control parameters of the permanent magnet synchronous motor in real time according to user needs;
[0181] The evaluation indicators include at least: integrated square error (ISE), integrated time square error (ITSE), integrated absolute error (IAE), and integrated time absolute error (ITAE);
[0182]
[0183]
[0184] Where, e represents the error, t represents the integration time, and T is the integration time threshold.
[0185]
[0186] Furthermore, in order to verify the effectiveness of the permanent magnet synchronous motor control method based on the heuristic search algorithm, in this embodiment, an experimental platform based on Links-RT semi-physical simulation equipment is built. The platform can be directly connected to MATLAB / Simulink, and the experiment is completed by creating a fast control model; the PMSM parameter optimization control method is experimentally verified through the experimental platform, and the effect of the optimization algorithm is further optimized; specifically, the equipment of the experimental platform includes DRV8302 motor drive module, EDR-120-24 switching power supply module, PMSM equipped with encoder, LINKS-BOX rapid prototyping control platform and a host computer for developing control programs; the method provided in this application can find the target control parameters under the corresponding target according to different optimization targets. This feature enables it to meet the diverse requirements of different manufacturing tasks for control performance, and can also maintain the optimal performance of the system by flexibly adjusting the control parameters when the system parameters or working environment change.
[0187] In summary, the permanent magnet synchronous motor control method based on the heuristic search algorithm provided in the present application constructs a PMSM system model under the d-axis-q-axis of the synchronous rotating coordinate system, and performs parameter tuning of the speed loop PI regulator and the current loop PI regulator on the PMSM system model; constructs an optimization model according to the honey badger algorithm, and the optimization model is used to search for target control parameters online, and the control target of the optimization model is formulated based on project requirements; it can automatically find the optimal control parameters according to the selected target during the actual operation of the motor, so that the PMSM system has a faster and more stable response characteristic, and further, based on the actual deployment requirements, the honey badger algorithm in the optimization model is structurally improved, and out-of-control suppression is constructed in the honey badger algorithm, and the out-of-control suppression includes overshoot suppression and jitter suppression to obtain a target optimization model; based on the target optimization model, the control effect of the target control parameters found under different evaluation indicators is analyzed, so as to reconstruct and optimize the control parameters of the permanent magnet synchronous motor in real time according to user needs. The target optimization model introduces a failure control mechanism including overshoot suppression and jitter suppression, which can suppress system instability and jitter problems caused by poor solution parameters during the optimization process. During the entire online optimization process, the motor runs stably and without interruption, which is convenient for deployment in actual industrial operating conditions. It is suitable for large-scale promotion.
[0188] Embodiment 2
[0189] This embodiment provides a permanent magnet synchronous motor control system based on a heuristic search algorithm, comprising:
[0190] A tuning module is used to construct a PMSM system model under the d-axis-q-axis of the synchronous rotating coordinate system, and to perform parameter tuning of a speed loop PI regulator and a current loop PI regulator on the PMSM system model;
[0191] A construction module is used to construct an optimization model according to the honey badger algorithm, wherein the optimization model is used to search for target control parameters online, and the control target of the optimization model is formulated based on project requirements;
[0192] A construction module is used to improve the structure of the honey badger algorithm in the optimization model based on actual deployment requirements, and to construct out-of-control suppression in the honey badger algorithm, wherein the out-of-control suppression includes overshoot suppression and jitter suppression, so as to obtain a target optimization model;
[0193] The analysis module is used to analyze the control effects of the target control parameters found under different evaluation indicators based on the target optimization model, so as to reconstruct and optimize the control parameters of the permanent magnet synchronous motor in real time according to user needs.
[0194] Optionally, the step of constructing a PMSM system model under the d-axis-q-axis of the synchronous rotating coordinate system includes:
[0195] Obtain the original stator voltage equation, stator flux equation, electromagnetic torque equation and motor motion equation in PMSM;
[0196] The stator flux equation is substituted into the stator voltage original equation to obtain the stator voltage equation, and a PMSM system model is constructed based on the stator voltage equation and the stator flux equation, the electromagnetic torque equation and the motor motion equation.
[0197] Optionally, the PMSM system model is expressed as:
[0198]
[0199] In the formula, u d 、u q are the voltage components of the stator on the d-axis and q-axis respectively, R is the stator resistance, i d and i q are the current components of the stator on the d-axis and q-axis respectively, L d , L q are the inductance components on the d-axis and q-axis respectively, ω e is the electrical angular velocity of the motor, T e is the electromagnetic torque, ψ f is the permanent magnet flux, p n is the pole pair number of the PMSM system model, J is the moment of inertia, ω m is the mechanical angular velocity of the motor, T L is the load torque, B is the damping coefficient;
[0200] The expression for parameter setting of the speed loop PI regulator is:
[0201]
[0202] In the formula, is the desired control current of the stator on the q axis, K pω , K iω are the two adjustment parameters of the PI regulator, s is the complex variable in the Laplace transform, which is used to convert the differential equation in the time domain into an algebraic equation in the complex frequency domain. For the desired control speed, B a is the active damping coefficient;
[0203] in,
[0204]
[0205] In the formula, β * is the expected closed-loop bandwidth;
[0206] The expression for parameter setting of the current loop PI regulator is:
[0207]
[0208] In the formula, are the desired control voltages of the stator on the d-axis and q-axis, CK pd , CK pq are the two proportional gains of the PI regulator on the d-axis and q-axis, CK id , CK iq are the two integral gains of the PI regulator on the d-axis and q-axis respectively, are the desired control currents of the stator on the d-axis and q-axis respectively.
[0209] Optionally, the step of constructing an optimization model according to the honey badger algorithm includes:
[0210] Construct an initialization model and set initialization parameters, including the number of iterations t max and population size n;
[0211] Calculate the fitness f of each honey badger individual i , take the honey badger individual with the smallest fitness as the comparison individual, and define the position of the comparison individual as x prey , the fitness is f prey ;
[0212] Define the odor intensity and density factors of the search target and the search direction;
[0213] Update the position of the honey badger individual based on the sniffing mode or honey guide bird mode, calculate the fitness of the honey badger individual after the updated position, and compare the fitness of the honey badger individual before and after the position update;
[0214] If the fitness after the position update is greater than the fitness before the position update, the fitness of the honey badger individual is replaced and the position of the honey badger individual is updated synchronously;
[0215] If the fitness after the position update is not greater than the fitness before the position update, the original fitness and position of the honey badger individual will be retained;
[0216] Traverse all honey badger individuals to update their positions, determine the individual with the smallest fitness among the updated honey badger individuals, and compare their fitness with that of the comparison individuals to determine whether to update the fitness and position of the comparison individuals in order to build an optimization model.
[0217] Optionally, the expression of the initialization model is:
[0218]
[0219] Where the matrix P represents the candidate solutions to the problem, n is the number of honey badgers in the population, D is the dimension, and x i,j represents the jth dimension of the i-th honey badger, x i represents the i-th honey badger, r1 is a random number between 0 and 1, and ub i lb i are the upper and lower limits of the search domain respectively;
[0220] The expression of the odor intensity is:
[0221]
[0222] In the formula, S = (x i -x i+1 ) 2 , represents the distribution density among honey badgers, d i =x prey -x i , represents the distance between the target and the i-th honey badger, r2 is a random number between 0 and 1;
[0223] The expression of the density factor is:
[0224]
[0225] In the formula, C is a constant greater than 1, h is the number of iterations, and h max is the maximum number of iterations;
[0226] The expression of the search direction is:
[0227]
[0228] Where r3 is a random number.
[0229] Optionally, the step of structurally improving the honey badger algorithm in the optimization model based on actual deployment requirements includes:
[0230] Constructing a reference speed module, the reference speed module is used to output a step signal so that the system steps between a given speed and a response speed;
[0231] Obtain the initial control parameters for stable operation of the system;
[0232] When the Honey Badger Algorithm detects a step signal from the reference speed module from the given speed to the response speed, the HBA outputs the control parameters that need to calculate the fitness and records the error between the response speed and the given speed of the system;
[0233] When the Honey Badger Algorithm detects a step signal from the response speed to the given speed sent by the reference speed module, the HBA outputs the currently found target control parameters and stabilizes the system.
[0234] Optionally, the step of constructing out-of-control suppression in the honey badger algorithm, wherein the out-of-control suppression includes overshoot suppression and jitter suppression, and obtaining the target optimization model includes:
[0235] Establishing a target upper speed limit of the motor based on the response speed, establishing a target lower speed limit of the motor based on the given speed, and suppressing overshoot of motor speed feedback according to the target upper speed limit and the target lower speed limit;
[0236] The speed of several sampling points of the motor is obtained, and the average speed of the motor is calculated based on the moving average method. The upper and lower limits of the jitter average speed are obtained based on the average speed of the motor, and jitter suppression is constructed according to the upper and lower limits of the jitter average speed.
[0237] Optionally, the expression of the upper limit of the target speed is:
[0238] H L =responded rpm ×2
[0239] The expression of the lower limit of the target speed is:
[0240] L L =stabilized rpm ×0.5
[0241] In the formula, responded rpm To respond to the speed, stabilized rpm is a given speed;
[0242] The expression of the average speed of the motor is:
[0243]
[0244] In the formula, k is the window size of the moving average method, v i is the rotation speed of the i-th sampling point, and m is the number of sampling points;
[0245] The upper limit of the average speed of vibration is expressed as:
[0246] UN avg =(1+δ)N avg
[0247] The expression for the lower limit of the jitter average speed is:
[0248] LN avg =(1-δ)N avg
[0249] Where δ is the threshold value of the speed jitter amplitude as a percentage of the average speed;
[0250] The expression of jitter suppression is:
[0251]
[0252] In the formula, f u Indicates the number of times the motor speed exceeds the upper limit of the jitter average speed within a given time range, f l Indicates the number of times the motor speed is lower than the lower limit of the jitter average speed within a given time range.
[0253] Optionally, the evaluation indicators include at least: ISE, ITSE, IAE, ITAE;
[0254]
[0255] Where, e represents the error, T represents the integration time, and T is the integration time threshold.
[0256] Embodiment 3
[0257] This embodiment provides a storage medium on which a computer program is stored. When the program is executed by a processor, the permanent magnet synchronous motor control method based on the heuristic search algorithm as described above is implemented.
[0258] Embodiment 4
[0259] The present invention also provides a computer, see Figure 2, shown is a computer in an embodiment of the present invention, including a memory 10, a processor 20, and a computer program 30 stored in the memory 10 and executable on the processor 20. When the processor 20 executes the computer program 30, the above-mentioned permanent magnet synchronous motor control method based on the heuristic search algorithm is implemented.
[0260] The memory 10 includes at least one type of storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 10 may be an internal storage unit of a computer, such as a hard disk of the computer. In other embodiments, the memory 10 may also be an external storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. Further, the memory 10 may also include both an internal storage unit of a computer and an external storage device. The memory 10 may be used not only to store application software and various types of data installed in the computer, but also to temporarily store data that has been output or is to be output.
[0261] Among them, in some embodiments, the processor 20 can be an electronic control unit (Electronic Control Unit, abbreviated as ECU, also known as a vehicle computer), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor or other data processing chip, used to run the program code stored in the memory 10 or process data, such as executing access restriction programs, etc.
[0262] It should be pointed out that Figure 2 The structure shown does not constitute a limitation on the computer. In other embodiments, the computer may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0263] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0264] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0265] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0266] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0267] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A permanent magnet synchronous motor control method based on a heuristic search algorithm, characterized in that: include: Constructing a PMSM system model under the d-axis-q-axis of a synchronous rotating coordinate system, and performing parameter tuning of a speed loop PI regulator and a current loop PI regulator on the PMSM system model; Construct an optimization model based on the honey badger algorithm, the optimization model is used to search for target control parameters online, and the control target of the optimization model is formulated based on project requirements; Based on actual deployment requirements, the structure of the honey badger algorithm in the optimization model is improved, and out-of-control suppression is constructed in the honey badger algorithm, wherein the out-of-control suppression includes overshoot suppression and jitter suppression, so as to obtain a target optimization model; Based on the target optimization model, the control effects of the target control parameters found under different evaluation indicators are analyzed, so as to reconstruct and optimize the control parameters of the permanent magnet synchronous motor in real time according to user needs.
2. The permanent magnet synchronous motor control method based on heuristic search algorithm according to claim 1 is characterized in that: The step of constructing the PMSM system model under the synchronous rotating coordinate system d-axis-q-axis includes: Obtain the original stator voltage equation, stator flux equation, electromagnetic torque equation and motor motion equation in PMSM; The stator flux equation is substituted into the stator voltage original equation to obtain the stator voltage equation, and a PMSM system model is constructed based on the stator voltage equation and the stator flux equation, the electromagnetic torque equation and the motor motion equation.
3. The permanent magnet synchronous motor control method based on heuristic search algorithm according to claim 2 is characterized in that: The expression of the PMSM system model is: In the formula, u d 、u q are the voltage components of the stator on the d-axis and q-axis respectively, R is the stator resistance, i d and i q are the current components of the stator on the d-axis and q-axis respectively, L d , L q are the inductance components on the d-axis and q-axis respectively, ω e is the electrical angular velocity of the motor, T e is the electromagnetic torque, ψ f is the permanent magnet flux, p n is the pole pair number of the PMSM system model, J is the moment of inertia, ω m is the mechanical angular velocity of the motor, T L is the load torque, B is the damping coefficient; The expression for parameter setting of the speed loop PI regulator is: In the formula, is the desired control current of the stator on the q axis, K pω , K iω are the two adjustment parameters of the PI regulator, s is the complex variable in the Laplace transform, which is used to convert the differential equation in the time domain into an algebraic equation in the complex frequency domain. For the desired control speed, B a is the active damping coefficient; in, In the formula, β * is the expected closed-loop bandwidth; The expression for parameter setting of the current loop PI regulator is: In the formula, are the desired control voltages of the stator on the d-axis and q-axis, CK pd , CK pq are the two proportional gains of the PI regulator on the d-axis and q-axis, CK id , CK iq are the two integral gains of the PI regulator on the d-axis and q-axis respectively, are the desired control currents of the stator on the d-axis and q-axis respectively.
4. The permanent magnet synchronous motor control method based on heuristic search algorithm according to claim 3 is characterized in that: The step of constructing an optimization model according to the honey badger algorithm comprises: Construct an initialization model and set initialization parameters, including the number of iterations t max and population size n; Calculate the fitness f of each honey badger individual i , take the honey badger individual with the smallest fitness as the comparison individual, and define the position of the comparison individual as x prey , the fitness is f prey ; Define the odor intensity and density factors of the search target and the search direction; Update the position of the honey badger individual based on the sniffing mode or honey guide bird mode, calculate the fitness of the honey badger individual after the updated position, and compare the fitness of the honey badger individual before and after the position update; If the fitness after the position update is greater than the fitness before the position update, the fitness of the honey badger individual is replaced and the position of the honey badger individual is updated synchronously; If the fitness after the position update is not greater than the fitness before the position update, the original fitness and position of the honey badger individual will be retained; Traverse all honey badger individuals to update their positions, determine the individual with the smallest fitness among the updated honey badger individuals, and compare their fitness with that of the comparison individuals to determine whether to update the fitness and position of the comparison individuals in order to build an optimization model.
5. The permanent magnet synchronous motor control method based on heuristic search algorithm according to claim 4 is characterized in that: The expression of the initialization model is: Where the matrix P represents the candidate solutions to the problem, n is the number of honey badgers in the population, D is the dimension, and x i,j represents the jth dimension of the i-th honey badger, x i represents the i-th honey badger, r1 is a random number between 0 and 1, and ub i lb i are the upper and lower limits of the search domain respectively; The expression of the odor intensity is: In the formula, S = (x i -x i+1 ) 2 , represents the distribution density among honey badgers, d i =x prey -x i , represents the distance between the target and the i-th honey badger, r2 is a random number between 0 and 1; The expression of the density factor is: In the formula, C is a constant greater than 1, h is the number of iterations, and h max is the maximum number of iterations; The expression of the search direction is: Where r3 is a random number.
6. The permanent magnet synchronous motor control method based on heuristic search algorithm according to claim 4 is characterized in that: The step of structurally improving the honey badger algorithm in the optimization model based on actual deployment requirements includes: Constructing a reference speed module, the reference speed module is used to output a step signal so that the system steps between a given speed and a response speed; Obtain the initial control parameters for stable operation of the system; When the Honey Badger Algorithm detects a step signal from the reference speed module from the given speed to the response speed, the HBA outputs the control parameters that need to calculate the fitness and records the error between the response speed and the given speed of the system; When the Honey Badger Algorithm detects a step signal from the response speed to the given speed sent by the reference speed module, the HBA outputs the currently found target control parameters and stabilizes the system.
7. The permanent magnet synchronous motor control method based on heuristic search algorithm according to claim 6 is characterized in that: The step of constructing out-of-control suppression in the honey badger algorithm, wherein the out-of-control suppression includes overshoot suppression and jitter suppression, and obtaining the target optimization model includes: Establishing a target upper speed limit of the motor based on the response speed, establishing a target lower speed limit of the motor based on the given speed, and suppressing overshoot of motor speed feedback according to the target upper speed limit and the target lower speed limit; The speed of several sampling points of the motor is obtained, and the average speed of the motor is calculated based on the moving average method. The upper and lower limits of the jitter average speed are obtained based on the average speed of the motor, and jitter suppression is constructed according to the upper and lower limits of the jitter average speed.
8. The permanent magnet synchronous motor control method based on heuristic search algorithm according to claim 7 is characterized in that: The expression of the upper limit of the target speed is: H L =responded rpm ×2 The expression of the lower limit of the target speed is: L L =stabilized rpm ×0.5 In the formula, responded rpm To respond to the speed, stabilized rpm is a given speed; The expression of the average speed of the motor is: In the formula, k is the window size of the moving average method, v i is the rotation speed of the i-th sampling point, and m is the number of sampling points; The upper limit of the average speed of vibration is expressed as: A avg =(1+δ)N avg The expression for the lower limit of the jitter average speed is: LN avg =(1-δ)N avg Where δ is the threshold value of the speed jitter amplitude as a percentage of the average speed; The expression of jitter suppression is: In the formula, f u Indicates the number of times the motor speed exceeds the upper limit of the jitter average speed within a given time range, f l Indicates the number of times the motor speed is lower than the lower limit of the jitter average speed within a given time range.
9. The permanent magnet synchronous motor control method based on heuristic search algorithm according to claim 6, characterized in that: The evaluation indicators include at least: ISE, ITSE, IAE, ITAE; Where, e represents the error, t represents the integration time, and T is the integration time threshold.
10. A permanent magnet synchronous motor control system based on a heuristic search algorithm, characterized in that: include: A tuning module is used to construct a PMSM system model under the d-axis-q-axis of the synchronous rotating coordinate system, and to perform parameter tuning of a speed loop PI regulator and a current loop PI regulator on the PMSM system model; A construction module is used to construct an optimization model according to the honey badger algorithm, wherein the optimization model is used to search for target control parameters online, and the control target of the optimization model is formulated based on project requirements; A construction module is used to improve the structure of the honey badger algorithm in the optimization model based on actual deployment requirements, and to construct out-of-control suppression in the honey badger algorithm, wherein the out-of-control suppression includes overshoot suppression and jitter suppression, so as to obtain a target optimization model; The analysis module is used to analyze the control effects of the target control parameters found under different evaluation indicators based on the target optimization model, so as to reconstruct and optimize the control parameters of the permanent magnet synchronous motor in real time according to user needs.