Permanent magnet synchronous motor driving method and system
Optimizing the PID controller parameters of permanent magnet synchronous motors through the multi-objective multiverse algorithm, solving the complexity and accuracy problems of PID parameter adjustment in the existing technology, achieving higher control accuracy and system response speed, and is suitable for high-precision control applications.
Patent Information
- Application Number
- CN202411926444.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-25
AI Technical Summary
When adjusting the PID parameters of permanent magnet synchronous motors, the prior art faces problems such as the lack of global optimal solutions, high computational complexity, and slow convergence speed. Especially in the environment of a satellite-based brushless motor, there are various interference factors, which are difficult to meet the needs of high-precision control.
By constructing a permanent magnet synchronous motor model, the PID controller parameters are optimized based on the multi-objective multiverse algorithm (MOMC), avoiding local optimal solutions, and improving control accuracy and system response speed.
It achieves higher control accuracy and system response speed, enhances anti-interference capability and system stability, and is suitable for high-precision control applications such as spacecraft and electric vehicles.
Smart Images

Figure CN119891844A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of motor technology, and in particular, to a permanent magnet synchronous motor driving method and system, and more particularly, to a permanent magnet synchronous motor driving method and system based on a multi-objective multiverse algorithm. Background Art
[0002] Permanent magnet synchronous motors (PMSM) are widely used in modern industry, transportation and home appliances, and are favored for their high efficiency, reliability and precise control performance. In the control of PMSM, PID controllers are often used as regulators for system feedback control due to their simplicity, intuitiveness and low computational complexity. However, the performance of PID controllers is highly dependent on the settings of their three main parameters, including the proportional coefficient, integral coefficient and differential coefficient. How to automatically and efficiently adjust these parameters is a long-standing challenge.
[0003] At present, PID parameter tuning methods usually rely on experience, heuristic rules or traditional optimization algorithms (such as genetic algorithms, particle swarm optimization algorithms, etc.), but these methods may face problems such as lack of global optimal solution, high computational complexity, and slow convergence speed. Therefore, optimizing and tuning PID parameters based on multi-objective optimization algorithms is an effective means to improve the performance of permanent magnet synchronous motor drive systems.
[0004] Brushless motors on board are becoming more and more widely used. With the increasing complexity of usage scenarios and the continuous improvement of precision requirements, brushless motors on board require more stable and efficient PID control systems to ensure their normal operation. The PID control system is a basic feedback control method that can adjust the output of the controller in real time to make the system reach the desired state. However, in space, the adjustment of PID parameters faces major challenges. First of all, different environments have their own unique physical properties, so it is necessary to optimize the PID parameters for different environments. In addition, there are various interference factors in space, such as temperature changes, radiation particles, etc., which may have an adverse effect on the stability and response speed of the PID control system. These problems make the adjustment of the PID parameters of brushless motors on board extremely challenging. Traditional adjustment methods can no longer meet the needs, so it is particularly urgent and important to optimize the PID parameters of brushless motors.
[0005] Patent document CN116317746A (application number: CN202211453791.4) discloses a permanent magnet synchronous motor control method, system and electric forklift. The method controls the speed by adopting a maximum torque / current ratio control strategy when running below the base speed; and adopts a weak magnetic control strategy based on voltage feedback when running above the base speed. In this application, through the optimization and adjustment of PID parameters, the multi-objective multiverse algorithm can make the speed control of the permanent magnet synchronous motor more accurate and stable, and improve the control accuracy and system response speed. In contrast, the strategy based on the maximum torque / current ratio and weak magnetic control may not achieve the same control accuracy in some cases, and the present application is more adaptive and can adaptively adjust the PID parameters according to different working conditions and requirements, so that the permanent magnet synchronous motor can achieve efficient and stable control when running below and above the base speed. In contrast, the fixed control strategy may not be able to flexibly respond to various working condition changes.
[0006] Patent document CN116073725A (application number: CN202111271292.9) discloses a method for predicting current control of a permanent magnet synchronous motor system model. By using a method based on indirect matrix converter inverter level control, the method of the present application has higher control accuracy and stability, stronger adaptability, and can directly adjust the controller parameters, simplifying the control process. The method based on indirect matrix converter inverter level control requires additional steps and calculations to determine the switching state of the inverter, which increases the complexity and amount of calculation of the control.
[0007] Patent document CN114785210B (application number: CN202210627418.X) discloses a method for setting parameters of a permanent magnet synchronous motor current controller, which optimizes the current loop control parameters by generating closed-loop control instructions and resonance suppression instructions. This application optimizes and adjusts the PID parameters to obtain a larger stability margin for the control system current loop, improve the robustness and stability of the system; and can more accurately design the parameters of the current controller, making the system more stable and efficient in actual operation.
[0008] Patent document CN107257219A (application number: CN201710716540.3) discloses a closed-loop control method for single current weak magnetic torque of permanent magnet synchronous motor, which realizes control by resolving reference direct axis current and quadrature axis current, synthesizing voltage through two PID regulators, but this method is highly complex and has high requirements for PID parameter adjustment, and its performance may be limited when voltage is saturated. In contrast, the proposed method can enhance the robustness of the system while improving the speed observation accuracy by introducing MOMC for parameter optimization, has stronger adaptability, and improves the efficiency of the system.
[0009] Patent document CN110535388A (application number: CN201910830003.0) discloses a permanent magnet synchronous motor weak magnetic control method based on a torque closed loop. The required spatial voltage control angle is obtained through PI control based on the reference torque and the actual error for control. However, the parameter adjustment requirements of the torque closed-loop control strategy are high, and the performance may decrease under specific working conditions. In contrast, the proposed method optimizes the PID parameters by introducing MOMC, which can enhance the robustness of the system while improving the speed observation accuracy, and determines the optimized target parameters by establishing a mathematical model of the permanent magnet synchronous motor, which has stronger adaptability and improves the efficiency of the system.
[0010] Patent document CN117311707A (application number: CN202311176602.8) discloses a method for adaptively adjusting the feedforward parameters of a permanent magnet synchronous motor vector control system. By setting the adaptive adjustment time threshold and the threshold of the number of segmented relationship curves, the current loop feedforward parameters of the permanent magnet synchronous motor vector control system are adaptively adjusted to optimize the current-inductance relationship curve segmentation and parameter deviation calculation. However, the accuracy needs to be improved by only adaptively adjusting the current loop feedforward parameters, and the PID parameters optimized based on the multi-objective algorithm have better effects in terms of system performance optimization, resonance suppression effect, stability margin improvement, and parameter setting accuracy. Summary of the invention
[0011] In view of the defects in the prior art, an object of the present invention is to provide a permanent magnet synchronous motor driving method and system.
[0012] A permanent magnet synchronous motor driving method provided by the present invention includes:
[0013] Step S1: construct a permanent magnet synchronous motor model;
[0014] Step S2: obtaining the dynamic characteristics of the motor under different conditions based on the permanent magnet synchronous motor model;
[0015] Step S3: Based on the motor dynamic characteristics obtained from the permanent magnet synchronous motor model, the PID controller is optimized by using the MOMC algorithm to obtain an optimized PID controller;
[0016] Step S4: converting the control signal output by the optimized PID controller to obtain a converted control signal, and using the converted control signal to drive the motor driver.
[0017] Preferably, the permanent magnet synchronous motor model includes: a voltage equation, a mechanical equation and a torque equation of the motor; the voltage equation of the motor includes:
[0018]
[0019] Among them, v d , v q is the component of the stator voltage on the d-axis and q-axis; i d ,i q is the component of the stator current on the d-axis and q-axis; R s is the stator resistance; w r is the rotor angular velocity; λ d , q is the stator flux component in the d-axis and q-axis;
[0020]
[0021] Among them, L d , L q are the components of the stator inductance on the d-axis and q-axis respectively; λ p is the flux linkage generated by the permanent magnet, acting on the d-axis;
[0022] The mechanical equations include:
[0023]
[0024] Where J is the moment of inertia of the rotor; B is the rotational friction damping coefficient; T m is the electromagnetic torque; T l is the load torque; w r is the rotor angular velocity;
[0025] The torque equation includes:
[0026]
[0027] Among them, T m is the electromagnetic torque generated by the motor; p is the number of motor poles; L d , L q are the components i of the stator inductance on the d-axis and q-axis respectively d ,i q are the components of the stator current in the d-axis and q-axis.
[0028] Preferably, the step S2 comprises: obtaining dynamic characteristics of the motor under different conditions based on a permanent magnet synchronous motor model, wherein the dynamic characteristics comprise: a relationship between rotation speed and input voltage, and an influence of load changes on motor behavior.
[0029] Preferably, step S3 comprises: initializing universe individuals, each individual representing a PID controller parameter configuration; based on the initialized population, continuously updating and iterating the position of the individual through universe evolution to obtain an optimized PID controller;
[0030] In the process of optimizing the PID controller by the MOMC algorithm, the configuration of the PID controller parameters is continuously adjusted based on the feedback of the fitness;
[0031] The fitness includes:
[0032]
[0033] Among them, e(t) is the feedback deviation, u(t) is the control amount, and e′(t) is the rate of change of the deviation.
[0034] Preferably, in the process of optimizing the PID controller by the MOMC algorithm, the frontier solutions are screened out in the multi-objective optimization problem by the non-dominated sorting method to ensure the retention of high-quality solutions; at the same time, the elite strategy is adopted to ensure that the best individuals in each generation are retained, thereby accelerating convergence.
[0035] Preferably, step S4 comprises:
[0036] Step S4.1: The control signal output by the optimized PID controller is:
[0037]
[0038] Wherein, e(t) is the control error, which is the difference between the target value and the current measured value; e(t) = r(t) - y(t), where r(t) is the target value and y(t) is the current measured value; K p , K i , K d Represent the proportional, integral and differential gain coefficients respectively;
[0039] Step S4.2: normalizing the control signal output by the optimized PID controller to obtain a normalized control signal;
[0040]
[0041] Where, u(t) is the control signal output by the optimized PID controller; u max and u min are the maximum and minimum output voltages of the PID controller; u norm is the normalized voltage;
[0042] Step S4.3: Calculate the duty cycle;
[0043] Dcycle=u norm ×100%
[0044] Step S4.4: Generate PWM wave;
[0045] The frequency of the PWM wave is f PWM, generate a periodic PWM signal, the period TPWM is:
[0046]
[0047] Among them, the high and low level duration T high 、T low They are:
[0048]
[0049] A permanent magnet synchronous motor drive system provided according to the present invention comprises:
[0050] Module M1: Constructing a permanent magnet synchronous motor model;
[0051] Module M2: Obtain the dynamic characteristics of the motor under different conditions based on the permanent magnet synchronous motor model;
[0052] Module M3: Based on the dynamic characteristics of the motor obtained by the permanent magnet synchronous motor model, the PID controller is optimized by the MOMC algorithm to obtain the optimized PID controller;
[0053] Module M4: converts the control signal output by the optimized PID controller to obtain a converted control signal, and drives the motor driver using the converted control signal.
[0054] Preferably, the permanent magnet synchronous motor model includes: a voltage equation, a mechanical equation and a torque equation of the motor; the voltage equation of the motor includes:
[0055]
[0056] Among them, v d , v q is the component of the stator voltage on the d-axis and q-axis; i d ,i q is the component of the stator current on the d-axis and q-axis; R s is the stator resistance; w r is the rotor angular velocity; λ d , q is the stator flux component in the d-axis and q-axis;
[0057]
[0058] Among them, L d , L q are the components of the stator inductance on the d-axis and q-axis respectively; λ p is the flux linkage generated by the permanent magnet, acting on the d-axis;
[0059] The mechanical equations include:
[0060]
[0061] Where J is the moment of inertia of the rotor; B is the rotational friction damping coefficient; T m is the electromagnetic torque; T l is the load torque; w r is the rotor angular velocity;
[0062] The torque equation includes:
[0063]
[0064] Among them, T m is the electromagnetic torque generated by the motor; p is the number of motor poles; L d , L q are the components i of the stator inductance on the d-axis and q-axis respectively d ,i q are the components of the stator current in the d-axis and q-axis.
[0065] Preferably, the module M3 comprises: initializing universe individuals, each individual representing a PID controller parameter configuration; based on the initialized population, continuously updating and iterating the position of the individual through universe evolution to obtain an optimized PID controller;
[0066] In the process of optimizing the PID controller by the MOMC algorithm, the configuration of the PID controller parameters is continuously adjusted based on the feedback of the fitness;
[0067] The fitness includes:
[0068]
[0069] Where, e(t) is the feedback deviation, u(t) is the control amount, and e′(t) is the rate of change of the deviation;
[0070] In the process of optimizing the PID controller by the MOMC algorithm, the frontier solutions are screened out in the multi-objective optimization problem by the non-dominated sorting method to ensure the retention of high-quality solutions; at the same time, the elite strategy is adopted to ensure that the best individuals in each generation are retained, thereby accelerating convergence.
[0071] Preferably, the module M4 comprises:
[0072] Module M4.1: The control signal output by the optimized PID controller is:
[0073]
[0074] Wherein, e(t) is the control error, which is the difference between the target value and the current measured value; e(t) = r(t) - y(t), where r(t) is the target value and y(t) is the current measured value; K p , K i , K d Represent the proportional, integral and differential gain coefficients respectively;
[0075] Module M4.2: normalize the control signal output by the optimized PID controller to obtain a normalized control signal;
[0076]
[0077] Where, u(t) is the control signal output by the optimized PID controller; u max and u min are the maximum and minimum output voltages of the PID controller; u norm is the normalized voltage;
[0078] Module M4.3: Calculate duty cycle;
[0079] Dcycle=u norm ×100%
[0080] Module M4.4: Generate PWM wave;
[0081] The frequency of the PWM wave is f PWM , generate a periodic PWM signal, the period TPWM is:
[0082]
[0083] Among them, the high and low level duration T high 、T low They are:
[0084]
[0085] Compared with the prior art, the present invention has the following beneficial effects:
[0086] 1. The present invention successfully avoids the dilemma of falling into the local optimal solution through sudden random changes of multiple mechanisms, and achieves the best PID parameter combination, thereby reducing oscillation and overshoot, improving anti-interference ability and control accuracy, making the motor's response more stable, reducing unnecessary energy waste, and improving system stability, which is particularly important for some high-precision control applications (such as spacecraft, electric vehicles, etc.);
[0087] 2. The present invention optimizes and adjusts the parameters of the PID controller so that the motor can respond to the control signal more quickly, and the speed and position control of the motor are more accurate, which greatly improves the response speed and accuracy, and is suitable for occasions requiring high-precision speed regulation;
[0088] 3. The present invention can not only improve the performance and system stability of the satellite-borne brushless motor, but also has many advantages such as high efficiency and easy implementation;
[0089] 4. The present invention avoids the dilemma of falling into the local optimal solution during the optimization process by introducing mechanisms such as black holes, white holes and random changes. The local optimal solution usually causes the control system to fail to achieve optimal performance under certain conditions, while the multiverse algorithm successfully ensures the global optimization of PID parameters by exploring randomness and diversity.
[0090] 5. The present invention has high calculation efficiency, and the optimization process can be easily implemented in practical applications, and is applicable to various permanent magnet synchronous motor control systems.
[0091] 6. The present invention is used to improve the accuracy and robustness of permanent magnet synchronous motor speed observation. First, a mathematical model of the permanent magnet synchronous motor is established to determine the optimization target of the PID parameters, and the MOMC algorithm is introduced to optimize the parameters. According to the optimized PID parameters, the converted control signal is applied to the motor driver to adjust the control signal of the motor. It shows higher accuracy and robustness in speed estimation, is suitable for different working conditions and environments, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0093] Figure 1 4 is a system structure diagram of PID parameter optimization based on the multi-objective multiverse algorithm according to the present invention.
[0094] Figure 2 The figure is a flow chart of permanent magnet synchronous motor drive based on multi-objective multiverse algorithm according to the present invention. DETAILED DESCRIPTION
[0095] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0096] Example 1
[0097] According to a permanent magnet synchronous motor driving method provided by the present invention, Figures 1 to 2 As shown, including:
[0098] A permanent magnet synchronous motor driving method provided by the present invention includes:
[0099] Step S1: construct a permanent magnet synchronous motor model;
[0100] Step S2: obtaining the dynamic characteristics of the motor under different conditions based on the permanent magnet synchronous motor model;
[0101] Step S3: Based on the motor dynamic characteristics obtained from the permanent magnet synchronous motor model, the PID controller is optimized by using the MOMC algorithm to obtain an optimized PID controller;
[0102] Step S4: converting the control signal output by the optimized PID controller to obtain a converted control signal, and using the converted control signal to drive the motor driver.
[0103] Preferably, the permanent magnet synchronous motor model includes: a voltage equation, a mechanical equation and a torque equation of the motor; the voltage equation of the motor includes:
[0104]
[0105] Among them, v d , v q is the component of the stator voltage on the d-axis and q-axis; i d ,i q is the component of the stator current on the d-axis and q-axis; R s is the stator resistance; w r is the rotor angular velocity; λ d , q is the stator flux component in the d-axis and q-axis;
[0106]
[0107] Among them, L d , L q are the components of the stator inductance on the d-axis and q-axis respectively; λ p is the flux linkage generated by the permanent magnet, acting on the d-axis;
[0108] The mechanical equations include:
[0109]
[0110] Where J is the moment of inertia of the rotor; B is the rotational friction damping coefficient; T m is the electromagnetic torque; T l is the load torque; w r is the rotor angular velocity;
[0111] The torque equation includes:
[0112]
[0113] Among them, T m is the electromagnetic torque generated by the motor; p is the number of motor poles; L d , L q are the components i of the stator inductance on the d-axis and q-axis respectively. d ,i q are the components of the stator current in the d-axis and q-axis.
[0114] Preferably, the step S2 comprises: obtaining dynamic characteristics of the motor under different conditions based on a permanent magnet synchronous motor model, wherein the dynamic characteristics comprise: a relationship between rotation speed and input voltage, and an influence of load changes on motor behavior.
[0115] Preferably, step S3 comprises: initializing universe individuals, each individual representing a PID controller parameter configuration; based on the initialized population, continuously updating and iterating the position of the individual through universe evolution to obtain an optimized PID controller;
[0116] In the process of optimizing the PID controller by the MOMC algorithm, the configuration of the PID controller parameters is continuously adjusted based on the feedback of the fitness;
[0117] The fitness includes:
[0118]
[0119] Among them, e(t) is the feedback deviation, u(t) is the control amount, and e′(t) is the rate of change of the deviation.
[0120] Preferably, in the process of optimizing the PID controller by the MOMC algorithm, the frontier solutions are screened out in the multi-objective optimization problem by the non-dominated sorting method to ensure the retention of high-quality solutions; at the same time, the elite strategy is adopted to ensure that the best individuals in each generation are retained, thereby accelerating convergence.
[0121] Preferably, step S4 comprises:
[0122] Step S4.1: The control signal output by the optimized PID controller is:
[0123]
[0124] Wherein, e(t) is the control error, which is the difference between the target value and the current measured value; e(t) = r(t) - y(t), where r(t) is the target value and y(t) is the current measured value; K p , Ki , K d Represent the proportional, integral and differential gain coefficients respectively;
[0125] Step S4.2: normalizing the control signal output by the optimized PID controller to obtain a normalized control signal;
[0126]
[0127] Where, u(t) is the control signal output by the optimized PID controller; u max and u min are the maximum and minimum output voltages of the PID controller; u norm is the normalized voltage;
[0128] Step S4.3: Calculate the duty cycle;
[0129] Dcycle=u norm ×100%
[0130] Step S4.4: Generate PWM wave;
[0131] The frequency of the PWM wave is f PWM , generating a periodic PWM signal, the period TPWM is:
[0132]
[0133] Among them, the high and low level duration T high 、T low They are:
[0134]
[0135] The present invention also provides a permanent magnet synchronous motor drive system, which can be implemented by executing the process steps of the permanent magnet synchronous motor drive method, that is, technical personnel in this field can understand the permanent magnet synchronous motor drive method as a preferred implementation of the permanent magnet synchronous motor drive system.
[0136] Example 2
[0137] Embodiment 2 is a preferred embodiment of Embodiment 1
[0138] A permanent magnet synchronous motor driving method provided by the present invention includes:
[0139] Step 1: Establish a mathematical model of the permanent magnet synchronous motor;
[0140] In this embodiment, the mathematical model of the permanent magnet synchronous motor describes the dynamic behavior of the motor, including the voltage equation, mechanical equation, and torque equation of the motor.
[0141] The mathematical model of the permanent magnet synchronous motor includes:
[0142] The dq coordinate system is a rotating coordinate system based on the motor rotor, where the d-axis is aligned with the rotor's magnetic field and the q-axis is perpendicular to the d-axis. By expressing current and voltage in this coordinate system, some complex time-varying factors can be removed, making control and analysis more intuitive.
[0143] Motor voltage equation (dq coordinate system):
[0144]
[0145] where v d , v q are the components of the stator voltage on the d-axis and q-axis. d ,i q are the components of the stator current on the d-axis and q-axis. s is the stator resistance; w r is the rotor angular velocity. d , q is the stator flux component on the d-axis and q-axis,
[0146]
[0147] Among them, L d , L q are the components of the stator inductance on the d-axis and q-axis respectively. p It is the flux linkage generated by the permanent magnet, acting on the d-axis.
[0148] Electromagnetic torque equation
[0149]
[0150] Among them, T m is the electromagnetic torque generated by the motor. p is the number of motor poles; L d , L q are the components i of the stator inductance on the d-axis and q-axis respectively. d ,i q are the components of the stator current in the d-axis and q-axis.
[0151] Mechanical equations
[0152]
[0153] Where J is the moment of inertia of the rotor; B is the rotational friction damping coefficient; T m is the electromagnetic torque; T l is the load torque; w r is the rotor angular velocity.
[0154] Step 2: Obtain the dynamic characteristics of the motor under different conditions based on the permanent magnet synchronous motor model;
[0155] In this embodiment, the dynamic characteristics of the motor under different conditions can be obtained through the mathematical model of the motor, including the relationship between the rotational speed and the input voltage, and the impact of load changes on the motor behavior.
[0156] Step 3: Based on the dynamic characteristics of the motor obtained by the permanent magnet synchronous motor model, the PID controller is optimized by the MOMC algorithm to obtain an optimized PID controller;
[0157] In this embodiment, the PID controller is used to adjust the input signal of the motor driver according to the feedback information of the motor speed, so as to achieve precise control of the motor.
[0158] The role of the PID controller is to make adjustments based on the motor speed error. It adjusts the control signal through the proportional, integral and differential parts to reduce the system error and ultimately make the actual speed of the motor close to the set value.
[0159] First, the encoding is binary, and K P , K I , K D Binary encoding, set parameters M i ∈[M imin ,M imax ],N d ∈[N dmin ,N dmax ], the lengths of each substring are The encoding accuracy is:
[0160]
[0161] The binary encoding is set to 15 bits.
[0162] During the optimization process, the parameters of the PID controller are optimized through a multi-objective multiverse algorithm, so that the motor control system exhibits higher accuracy and robustness under different working conditions.
[0163] More specifically, the goal of using the MOMC algorithm is to optimize the parameters of the PID controller so that the control system performs better under the characteristics of the motor. The MOMC algorithm will find a balance between multiple optimization objectives based on the information provided by the mathematical model of the motor, so that the PID controller can perform the best control effect under actual working conditions. The PID controller parameters optimized by MOMC are applied to the control system, which can effectively adjust the input signal of the motor, so that the motor can quickly and smoothly track the set value under various working conditions (such as load changes) without excessive oscillation or error.
[0164] In the process of using the MOMC algorithm to optimize the parameters of the PID controller, the genetic algorithm adopts a multi-objective multiverse algorithm. First, the universe individuals are initialized. Through the algorithm, a certain number of universe individuals are initialized, and each individual represents a PID parameter configuration. After the population is initialized, the position of the individual is continuously updated and iterated through the process of universe evolution, so that it gradually approaches the optimal solution. The optimization process starts with a set of candidate solutions. Each candidate solution is similar to a universe, and the variables are regarded as objects in the universe. White and black holes are randomly generated in the universe and cause the movement of objects. Each universe is evaluated with a fitness. In the algorithm, non-dominated sorting and elite strategies are usually included to retain and update high-quality individuals in the population. Convergence judgment conditions and termination conditions are set. When the conditions are met, the algorithm is terminated and the final optimization result is obtained. When the algorithm has converged to the specified accuracy or the number of iteration steps reaches the maximum value, the optimal solution is obtained. Based on the output results, the PID parameters are tuned.
[0165] The fitness includes:
[0166]
[0167] Among them, e(t) is the feedback deviation, u(t) is the control amount, and e′(t) is the rate of change of the deviation.
[0168] In this embodiment, the termination condition is that the specified accuracy is converged to 2% or the maximum number of iterations is 1000.
[0169] The optimization algorithm of this embodiment outputs a set of optimal PID parameter configurations. Through these optimized parameters, the response speed and control accuracy of the motor can be greatly improved, and oscillation and overshoot phenomena can be reduced.
[0170] Step S4: converting the control signal output by the optimized PID controller to obtain a converted control signal, and using the converted control signal to drive the motor driver.
[0171] In this embodiment, the control signal conversion refers to converting the output signal of the PID controller after optimization into a voltage, and converting the voltage into a PWM signal suitable for the motor driver.
[0172] PID controller output
[0173]
[0174] Where e(t) is the control error, that is, the difference between the target value and the current measured value: e(t) = r(t) - y(t), where r(t) is the reference signal (target value) and y(t) is the actual measured value; K p , K i , K d They are proportional, integral and differential gain coefficients, parameters of the control system.
[0175] 2) Normalized output
[0176]
[0177] Where: u(t) is the output signal of the PID controller; u max and u min are the maximum and minimum values of the PID output voltage respectively; u norm is the normalized voltage, u norm ∈[0,1];
[0178] 3) Calculate the duty cycle
[0179] Dcycle=u norm ×100%
[0180] Among them, Dcycle is the duty cycle, which is the percentage of high level in the PWM signal;
[0181] 4) Generate PWM wave
[0182] The frequency of the PWM wave is f PWM , generating a periodic PWM signal with a period of T PWM for:
[0183]
[0184] The duration of high and low level is T high 、T low They are:
[0185]
[0186] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.
[0187] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A permanent magnet synchronous motor driving method, characterized in that: include: Step S1: construct a permanent magnet synchronous motor model; Step S2: obtaining the dynamic characteristics of the motor under different conditions based on the permanent magnet synchronous motor model; Step S3: Based on the motor dynamic characteristics obtained from the permanent magnet synchronous motor model, the PID controller is optimized by using the MOMC algorithm to obtain an optimized PID controller; Step S4: converting the control signal output by the optimized PID controller to obtain a converted control signal, and using the converted control signal to drive the motor driver.
2. The permanent magnet synchronous motor driving method according to claim 1, characterized in that: The permanent magnet synchronous motor model includes: a voltage equation, a mechanical equation and a torque equation of the motor; The voltage equation of the motor includes: Among them, v d , v q is the component of the stator voltage on the d-axis and q-axis; i d ,i q is the component of the stator current on the d-axis and q-axis; R s is the stator resistance; w r is the rotor angular velocity; λ d , q is the stator flux component in the d-axis and q-axis; Among them, L d , L q are the components of the stator inductance on the d-axis and q-axis respectively; λ p is the flux linkage generated by the permanent magnet, acting on the d-axis; The mechanical equations include: Where J is the moment of inertia of the rotor; B is the rotational friction damping coefficient; T m is the electromagnetic torque; T l is the load torque; w r is the rotor angular velocity; The torque equation includes: Among them, T m is the electromagnetic torque generated by the motor; p is the number of motor poles; L d , L q are the components i of the stator inductance on the d-axis and q-axis respectively. d ,i q are the components of the stator current in the d-axis and q-axis.
3. The permanent magnet synchronous motor driving method according to claim 1, characterized in that: The step S2 includes: obtaining dynamic characteristics of the motor under different conditions based on the permanent magnet synchronous motor model, and the dynamic characteristics include: the relationship between the rotation speed and the input voltage, and the influence of load changes on the motor behavior.
4. The permanent magnet synchronous motor driving method according to claim 1, characterized in that: The step S3 comprises: initializing universe individuals, each individual representing a PID controller parameter configuration; based on the initialized population, continuously updating and iterating the position of the individual through the universe evolution to obtain an optimized PID controller; In the process of optimizing the PID controller by the MOMC algorithm, the configuration of the PID controller parameters is continuously adjusted based on the feedback of the fitness; The fitness includes: Among them, e(t) is the feedback deviation, u(t) is the control amount, and e′(t) is the rate of change of the deviation.
5. The permanent magnet synchronous motor driving method according to claim 4, characterized in that: In the process of optimizing the PID controller by the MOMC algorithm, the frontier solutions are screened out in the multi-objective optimization problem by the non-dominated sorting method to ensure the retention of high-quality solutions; at the same time, the elite strategy is adopted to ensure that the best individuals in each generation are retained, thereby accelerating convergence.
6. The permanent magnet synchronous motor driving method according to claim 1, characterized in that: The step S4 comprises: Step S4.1: The control signal output by the optimized PID controller is: Wherein, e(t) is the control error, which is the difference between the target value and the current measured value; e(t) = r(t) - y(t), where r(t) is the target value and y(t) is the current measured value; K p , K i , K d Represent the proportional, integral and differential gain coefficients respectively; Step S4.2: normalizing the control signal output by the optimized PID controller to obtain a normalized control signal; Where, u(t) is the control signal output by the optimized PID controller; u max and u min are the maximum and minimum output voltages of the PID controller; u norm is the normalized voltage; Step S4.3: Calculate the duty cycle; Dcycle=u norm ×100% Step S4.4: Generate PWM wave; The frequency of the PWM wave is f PWM , generate a periodic PWM signal, the period TPWM is: Among them, the high and low level duration T high , T low They are: T low =T PWM -T high 。 7. A permanent magnet synchronous motor drive system, characterized in that: include: Module M1: Constructing a permanent magnet synchronous motor model; Module M2: Obtain the dynamic characteristics of the motor under different conditions based on the permanent magnet synchronous motor model; Module M3: Based on the dynamic characteristics of the motor obtained by the permanent magnet synchronous motor model, the PID controller is optimized by the MOMC algorithm to obtain the optimized PID controller; Module M4: converts the control signal output by the optimized PID controller to obtain a converted control signal, and drives the motor driver using the converted control signal.
8. The permanent magnet synchronous motor drive system according to claim 7, characterized in that: The permanent magnet synchronous motor model includes: a voltage equation, a mechanical equation and a torque equation of the motor; The voltage equation of the motor includes: Among them, v d , v q is the component of the stator voltage on the d-axis and q-axis; i d ,i q is the component of the stator current on the d-axis and q-axis; R s is the stator resistance; w r is the rotor angular velocity; λ d , q is the stator flux component in the d-axis and q-axis; Among them, L d , L q are the components of the stator inductance on the d-axis and q-axis respectively; λ p is the flux linkage generated by the permanent magnet, acting on the d-axis; The mechanical equations include: Where J is the moment of inertia of the rotor; B is the rotational friction damping coefficient; T m is the electromagnetic torque; T l is the load torque; w r is the rotor angular velocity; The torque equation includes: Among them, T m is the electromagnetic torque generated by the motor; p is the number of motor poles; L d , L q are the components i of the stator inductance on the d-axis and q-axis respectively. d ,i q are the components of the stator current in the d-axis and q-axis.
9. The permanent magnet synchronous motor drive system according to claim 7, characterized in that: The module M3 includes: initializing universe individuals, each individual represents a PID controller parameter configuration; based on the initialized population, continuously updating and iterating the position of the individual through the universe evolution to obtain an optimized PID controller; In the process of optimizing the PID controller by the MOMC algorithm, the configuration of the PID controller parameters is continuously adjusted based on the feedback of the fitness; The fitness includes: Where, e(t) is the feedback deviation, u(t) is the control amount, and e′(t) is the rate of change of the deviation; In the process of optimizing the PID controller by the MOMC algorithm, the frontier solutions are screened out in the multi-objective optimization problem by the non-dominated sorting method to ensure the retention of high-quality solutions; at the same time, the elite strategy is adopted to ensure that the best individuals in each generation are retained, thereby accelerating convergence.
10. The permanent magnet synchronous motor drive system according to claim 7, characterized in that: The module M4 comprises: Module M4.1: The control signal output by the optimized PID controller is: Wherein, e(t) is the control error, which is the difference between the target value and the current measured value; e(t) = r(t) - y(t), where r(t) is the target value and y(t) is the current measured value; K p , K i , K d Represent the proportional, integral and differential gain coefficients respectively; Module M4.2: normalize the control signal output by the optimized PID controller to obtain a normalized control signal; Where, u(t) is the control signal output by the optimized PID controller; u max and u min are the maximum and minimum output voltages of the PID controller; u norm is the normalized voltage; Module M4.3: Calculate duty cycle; Dcycle=u norm ×100% Module M4.4: Generate PWM wave; The frequency of the PWM wave is f PWM , generate a periodic PWM signal, the period TPWM is: Among them, the high and low level duration T high , T low They are: T low =T PWM -T high 。
Citation Information
Patent Citations
Permanent-magnet-synchronous-motor single-current weak-magnetic-torque closed-loop control method
CN107257219A
Permanent magnet synchronous motor flux weakening control method based on torque closed loop
CN110535388A
Parameter setting method, device and system for current controller of permanent magnet synchronous motor
CN114785210A
A method, apparatus, and system for tuning parameters of a permanent magnet synchronous motor current controller.
CN114785210B
Model predictive current control method for permanent magnet synchronous motor system
CN116073725A