Motor control method based on fuzzy sliding mode control and harmonic voltage compensator
Through the composite control method of fuzzy sliding mode control and harmonic voltage compensator, the vibration and harmonic problems in the permanent magnet synchronous motor control system are solved, and the dynamic response performance and speed control accuracy of the system are improved.
Patent Information
- Application Number
- CN202510643830.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-07-25
AI Technical Summary
The permanent magnet synchronous motor control system has problems of vibration and harmonics during operation, which affects the control effect and accuracy and limits its application in high-precision control occasions.
The fuzzy sliding mode control method is used to control the speed tracking error of the permanent magnet synchronous motor, and combined with the harmonic voltage compensator to suppress the harmonic components in the output current, and through the composite control method of the speed loop and the current loop, the impact of jitter and harmonics is weakened.
It improves the dynamic response performance and robustness of the permanent magnet synchronous motor control system, improves the current control performance, and improves the speed control accuracy and immunity.
Smart Images

Figure CN120377723A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of motor control, and particularly relates to a motor control method based on fuzzy sliding mode control and harmonic voltage compensator. Background Art
[0002] Permanent magnet synchronous motors have become the core components of AC servo systems such as modern industrial servo systems and new energy vehicle drive systems due to their light weight, high power density, high air-gap magnetic flux, and excellent speed regulation performance. However, since the motor control system is affected by various factors such as internal parameter perturbation and external torque disturbance during operation, it is difficult for the motor control system to achieve an ideal control effect. Therefore, adopting various control strategies to improve the control performance of the permanent magnet synchronous motor control system has become a research hotspot nowadays.
[0003] Among them, the sliding mode control method has received extensive attention in the field of motor control due to its strong robustness. However, due to problems such as switching time delay and unreasonable boundary layer design, high-frequency chattering may occur in the motor control system, which in turn affects the smoothness of speed control. In addition, there are factors such as cogging effect and inverter dead zone in the permanent magnet synchronous motor control system, resulting in harmonics in the phase current of the motor control system, which in turn leads to pulsating torque output by the motor, causing problems such as mechanical vibration, noise, and degradation of control performance, restricting the application of permanent magnet synchronous motors in high-precision control occasions. Therefore, how to weaken the chattering of sliding mode control and current harmonics in the speed regulation system, and reduce the influence of torque ripple on the permanent magnet synchronous motor control system has become an urgent problem to be solved. Summary of the Invention
[0004] In view of this, the present invention aims to provide a motor control method based on fuzzy sliding mode control and harmonic voltage compensator, which can weaken the chattering of sliding mode control and current harmonics in the speed regulation system, and reduce the influence of torque ripple on the permanent magnet synchronous motor control system.
[0005] To achieve the above object, the technical solution of the present invention is realized as follows: The present invention provides a motor control method based on fuzzy sliding mode control and harmonic voltage compensator, including the following steps: The speed loop performs fuzzy sliding mode control on the speed tracking error of the permanent magnet synchronous motor to obtain an output current; the current loop suppresses the harmonic components in the output current through a harmonic voltage compensator.
[0006] Further, the speed loop performs fuzzy sliding mode control on the speed tracking error of the permanent magnet synchronous motor to obtain an output current, specifically including: using the speed tracking error as the input of the nonlinear terminal sliding mode surface and the system state quantity as the output; obtaining an improved sliding mode reaching law based on the system state quantity and an adaptive function; and obtaining the output current according to the improved sliding mode reaching law.
[0007] Furthermore, taking the speed tracking error as the input of the non-linear terminal sliding mode surface and the system state variables as the output, specifically including: (1) (2) Wherein, is the system state variable, is a constant greater than zero, and are odd numbers and , is the speed tracking error, is the integral term of the speed tracking error.
[0008] Furthermore, an improved sliding mode reaching law is obtained based on the system state variables and the adaptive function, specifically including: taking the system state variables as the input and the exponential term gain of the improved sliding mode reaching law as the output, constructing the system state variable and the exponential term gain of the improved sliding mode reaching law into a linear Z-shaped membership function, a triangular membership function and a linear S-shaped membership function; Dividing the input into 7 fuzzy sets NB (negative large), NM (negative medium), NS (negative small), ZO (zero), PS (positive small), PM (positive medium), PB (positive large), and dividing the output into 4 fuzzy sets ZO (zero), PS (positive small), PM (positive medium), PB (positive large); The fuzzy control rules established between the variable and the exponential term gain of the sliding mode reaching law are as follows: Rule 1: If = NB, then = PB; Rule 2: If = NM, then = PM; Rule 3: If = NS, then = PS; Rule 4: If = ZO, then = ZO; Rule 5: If = PS, then = PS; Rule 6: If = PM, then = PM; Rule 7: If = PB, then = PB.
[0009] Furthermore, an improved sliding mode reaching law is obtained based on the system state quantity and the adaptive function, specifically including: The improved sliding mode reaching law is: (3) (4) Wherein, is the improved sliding mode reaching law, , are both constants greater than zero, is the absolute value of the activation function (Sigmoid), is the exponential term gain of the improved sliding mode reaching law, is the designed adaptive function, e -∣s∣ is an exponential function, and are constants and , the parameter is dynamically changed between and When the system state quantity approaches zero, is adjusted to the minimum value .
[0010] Furthermore, the output current is obtained according to the improved sliding mode reaching law, specifically including: Based on the dynamic model of the permanent magnet synchronous motor, the output current is obtained according to the improved sliding mode reaching law, specifically including: (5) Wherein, is the output current, is the mechanical angular velocity, is the load torque, is the damping coefficient, is the torque coefficient, is the moment of inertia.
[0011] Furthermore, the current loop suppresses the harmonic components in the output current through a harmonic voltage compensator, specifically including: extracting the harmonic components from the stator current signal by using a second-order generalized integral filter; calculating the harmonic compensation voltage based on the harmonic components through a harmonic steady-state voltage equation; and performing harmonic compensation according to the harmonic compensation voltage to suppress the harmonic components.
[0012] Further, the harmonic components include a fifth harmonic component and a seventh harmonic component. The harmonic compensation voltage is calculated based on the harmonic components through the harmonic steady-state voltage equation, which specifically includes: calculating the fifth harmonic steady-state voltage and the seventh harmonic steady-state voltage respectively through the voltage vector rotation direction; synthesizing the fifth harmonic steady-state voltage and the seventh harmonic steady-state voltage into the sixth harmonic steady-state voltage. Among them, the fifth harmonic steady-state voltage equation is: (6) Wherein, is the calculated d-axis fifth harmonic steady-state voltage, is the calculated q-axis fifth harmonic steady-state voltage, represents the d-axis fifth harmonic current obtained by passing the d-axis current through a second-order generalized integrator, represents the q-axis fifth harmonic current obtained by passing the q-axis current through a second-order generalized integrator, represents the d-axis inductance, represents the q-axis inductance, is the stator resistance.
[0013] In addition, the present invention also provides a motor control system based on fuzzy sliding mode control and a harmonic voltage compensator, including: a speed loop that performs fuzzy sliding mode control on the speed tracking error of a permanent magnet synchronous motor to obtain an output current; a current loop that suppresses the harmonic components in the output current through the harmonic voltage compensator.
[0014] Furthermore, the present invention also provides a computer device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the motor control method described above.
[0015] Compared with the prior art, the present invention can achieve the following beneficial effects: The motor control method based on fuzzy sliding mode control and a harmonic voltage compensator provided by the present invention performs fuzzy sliding mode control on the speed tracking error of a permanent magnet synchronous motor through the speed loop to obtain an output current, which can weaken the chattering of the sliding mode control; the current loop suppresses the harmonic components in the output current through the harmonic voltage compensator, reducing the influence of torque ripple on the permanent magnet synchronous motor control system. Through the above composite control method, the dynamic response performance and robustness of the permanent magnet synchronous motor control system can be improved, the harmonic components during the operation of the permanent magnet synchronous motor can be weakened, the control performance of the current can be improved, and the anti-interference ability and speed control accuracy of the permanent magnet synchronous motor control system can be effectively improved. Description of the Drawings
[0016] The accompanying drawings, which form a part of the present invention, are used to provide a further understanding of the present invention. The schematic embodiments and descriptions thereof of the present invention are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings: Figure 1 is a flowchart of the motor control method provided by an embodiment of the present invention; Figure 2 is a control structure block diagram of the motor control method provided by an embodiment of the present invention; Figure 3(a) is a schematic diagram of the membership degree of the system state quantity as a fuzzy input in the motor control method provided by an embodiment of the present invention; Figure 3(b) is a schematic diagram of the membership degree of the exponential term gain as a fuzzy output in the improved sliding mode reaching law in the motor control method provided by an embodiment of the present invention; Figure 4 is a schematic diagram of the comparison result between the improved fuzzy sliding mode reaching rate and the traditional exponential reaching rate in the motor control method provided by an embodiment of the present invention; Figure 5(a) is a simulation schematic diagram of tracking a speed step signal using a traditional PI control method; Figure 5(b) is a simulation schematic diagram of suddenly applying a 10 N·m load disturbance to Figure 5(a); Figure 6(a) is a simulation schematic diagram of tracking a speed step signal using a traditional sliding mode control method; Figure 6(b) is a simulation schematic diagram of suddenly applying a 10 N·m load disturbance to Figure 6(a); Figure 7(a) is a simulation schematic diagram of tracking a speed step signal using fuzzy sliding mode control in the motor control method provided by an embodiment of the present invention; Figure 7(b) is a simulation schematic diagram of suddenly applying a 10 N·m load disturbance to Figure 7(a); Figure 8(a) is a simulation schematic diagram of the steady-state speed fluctuation of three-phase current in a traditional sliding mode control method; Figure 8(b) is a simulation schematic diagram of the steady-state speed fluctuation of three-phase current using fuzzy sliding mode control in the motor control method provided by an embodiment of the present invention; Figure 9(a) is a simulation schematic diagram of three-phase current before harmonic compensation in the motor control method provided by an embodiment of the present invention; Figure 9(b) is a simulation schematic diagram of three-phase current after harmonic compensation in the motor control method provided by an embodiment of the present invention; Figure 10(a) is an FFT simulation schematic diagram of three-phase current simulation before harmonic compensation in the motor control method provided by an embodiment of the present invention; Figure 10(b) is a schematic diagram of FFT simulation of three-phase current after harmonic compensation in the motor control method provided by the embodiment of the present invention; Figure 11 A computer device provided by an embodiment of the present invention. Detailed implementation manners
[0017] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. Similar elements in different embodiments are labeled with related similar element numbers. In the following embodiments, many detailed descriptions are provided to facilitate a better understanding of the present invention. However, those skilled in the art can easily recognize that some of the features can be omitted in different situations, or can be replaced by other elements, materials, or methods. In some cases, some operations related to the present invention are not shown or described in the specification to avoid overwhelming the core part of the present invention with excessive descriptions. For those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations based on the descriptions in the specification and general technical knowledge in the art.
[0018] It should be noted that, without conflict, the embodiments and features in the embodiments of the present invention can be combined with each other to form various embodiments. At the same time, the steps or actions in the method description can also be adjusted or reordered in an obvious manner by those skilled in the art. Therefore, the various sequences in the specification and drawings are only for clearly describing a certain embodiment, and do not mean that they are the necessary sequences, unless it is stated that a certain sequence must be followed.
[0019] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first", "second", etc. may explicitly or implicitly include one or more of such features. In the description of the present invention, unless otherwise specified, the meaning of "a plurality" is two or more.
[0020] In the description of the present invention, it should be noted that unless otherwise clearly specified and limited, the terms "mounted", "connected", "coupled" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood through specific circumstances.
[0021] The present invention will be described in detail below with reference to the drawings and in conjunction with embodiments.
[0022] As Figure 1 and Figure 2 shown, the motor control method based on fuzzy sliding mode control and harmonic voltage compensator provided by the present invention includes the following steps: S10: The speed loop performs fuzzy sliding mode control on the speed tracking error of the permanent magnet synchronous motor to obtain the output current; S20: The current loop suppresses the harmonic components in the output current through the harmonic voltage compensator.
[0023] The present invention mainly solves the chattering problem and the pulsating harmonic effect problem existing in the traditional sliding mode control method in the permanent magnet synchronous motor control system. First, aiming at the chattering problem of the traditional sliding mode control method, a fuzzy sliding mode controller in the speed loop of the permanent magnet synchronous motor is designed by combining sliding mode control and fuzzy control. Secondly, aiming at the pulsating harmonic problem of the permanent magnet synchronous motor control system, a harmonic voltage compensator in the current loop of the permanent magnet synchronous motor is designed. The adoption of this composite control method can take into account the dynamic response performance, robustness and steady-state control accuracy of the permanent magnet synchronous motor, weaken the harmonic components during the operation of the permanent magnet synchronous motor, improve the control performance of the current, and effectively improve the anti-interference ability and speed control accuracy of the permanent magnet synchronous motor control system.
[0024] Further, in the motor control method based on fuzzy sliding mode control and harmonic voltage compensator provided by the present invention, S10: The speed loop performs fuzzy sliding mode control on the speed tracking error of the permanent magnet synchronous motor to obtain the output current, which specifically includes: using the speed tracking error as the input of the non-linear terminal sliding mode surface and the system state quantity as the output; obtaining an improved sliding mode reaching law based on the system state quantity and the adaptive function; obtaining the output current according to the improved sliding mode reaching law. First, in the speed loop, a new fuzzy control and a new sliding mode control are combined to design an improved fuzzy sliding mode reaching law, and the output current is obtained by using the improved fuzzy sliding mode reaching rate. And the fuzzy control method here is different from the traditional fuzzy method. The non-linear terminal sliding mode surface is used instead of the traditional linear sliding mode surface to improve the accuracy of the fuzzy control. Fuzzy rules are designed according to the distance between the system state and the sliding mode surface (system state quantity). Compared with the traditional sliding mode control, in the motor control method of the present application, a newly designed adaptive function and system state quantity are used to dynamically design the improved sliding mode reaching rate, and a fuzzy sliding mode controller in the speed loop is constructed. Further, in the motor control method based on fuzzy sliding mode control and harmonic voltage compensator provided by the present invention, using the speed tracking error as the input of the non-linear terminal sliding mode surface and the system state quantity as the output, specifically includes: (1) (2) Wherein, is the system state quantity, is a constant greater than zero, and are odd numbers and , is the speed tracking error, is the integral term of the speed tracking error.
[0025] The fuzzy sliding mode controller for implementing the motor control method provided by the present invention creates fuzzy rules using the distance from the system state to the sliding surface (system state variables), replacing the exponential term gain of the original sliding mode reaching law for adaptive changes. The system state variables can be obtained through the above formula.
[0026] Figure 2 The structure diagram of the permanent magnet synchronous motor control method based on fuzzy sliding mode control and harmonic voltage compensator provided by the present invention, where represents the output of the speed loop fuzzy sliding mode controller and the feedback current The reference voltage calculated through the traditional PI control method, represents the reference current and the feedback current The reference voltage calculated through the traditional PI control method.
[0027] In order to obtain the system state variables, first establish a mathematical model of the permanent magnet synchronous motor considering harmonic characteristics: (7) Where represents the phase A voltage considering harmonic characteristics, represents the phase B voltage considering harmonic characteristics, represents the phase C voltage considering harmonic characteristics, represents the fundamental voltage, represents the fifth harmonic voltage, represents the seventh harmonic voltage, represents the angular velocity of the fundamental voltage, represents the motor running time, represents the fundamental initial phase angle, represents the initial phase angle of the fifth harmonic voltage, represents the initial phase angle of the seventh harmonic voltage. Based on this permanent magnet synchronous motor mathematical model, coordinate transformation is performed to obtain formula (15) below.
[0028] Next, design the system state variables in the improved fuzzy sliding mode reaching law: First, define the speed tracking error : (8) Where is the given rotor mechanical angular velocity, is the feedback mechanical angular velocity.
[0029] Next, introduce the integral term of the speed error : (2) Using the traditional linear sliding mode surface can only make the system error approach zero infinitely. To solve this problem, the present invention adopts a non-linear terminal sliding mode surface, which can make the system error converge within a finite time. The terminal sliding mode surface is expressed by the formula: (1) Wherein, is the sliding mode quantity, i.e., the system state quantity, is a constant greater than zero, and are odd numbers and .
[0030] Furthermore, in the motor control method based on fuzzy sliding mode control and harmonic voltage compensator provided by the present invention, an improved sliding mode reaching law is obtained based on the system state quantity and the adaptive function, specifically including: taking the system state quantity as the input and the exponential term gain of the improved sliding mode reaching law as the output, and constructing the system state quantity and the exponential term gain of the improved sliding mode reaching law into a linear Z-shaped membership function, a triangular membership function, and a linear S-shaped membership function; The input is divided into 7 fuzzy sets: NB (negative large), NM (negative medium), NS (negative small), ZO (zero), PS (positive small), PM (positive medium), PB (positive large), and the output is divided into 4 fuzzy sets: ZO (zero), PS (positive small), PM (positive medium), PB (positive large); The obtained fuzzy control rules established between the variable and the exponential term gain of the sliding mode reaching law are: Rule 1: If = NB, then = PB; Rule 2: If = NM, then = PM; Rule 3: If = NS, then = PS; Rule 4: If = ZO, then = ZO; Rule 5: If = PS, then = PS; Rule 6: If = PM, then = PM; Rule 7: If = PB, then = PB.
[0031] Design the exponential term gain of the improved reaching law through the above fuzzy control rules. Since the traditional sliding mode control method cannot take into account both the convergence speed and chattering, the exponential term gain of the improved sliding mode reaching law is further designed based on the above fuzzy control rules, so as to weaken the speed fluctuation while improving the dynamic performance of the motor control system.
[0032] The fuzzy gain in the present invention takes the system state quantity as the input, and the exponential term gain of the improved sliding mode reaching law as the output. The input is divided into 7 fuzzy sets: NB (negative large), NM (negative medium), NS (negative small), ZO (zero), PS (positive small), PM (positive medium), PB (positive large), and the output is divided into 4 fuzzy sets: ZO (zero), PS (positive small), PM (positive medium), PB (positive large). Both the input and output satisfy the membership functions of the linear Z-shaped membership function (linzmf), triangular membership function (trimf), and linear S-shaped membership function (linsmf), as shown in Figure 3(a) and Figure 3(b) specifically.
[0033] When the system speed error is large, increase the fuzzy gain - the exponential term gain of the improved sliding mode reaching law to accelerate the convergence speed; when the speed error of the motor control system is small, reduce the exponential term gain of the improved sliding mode reaching law to reduce the reaching speed, thereby reducing the chattering phenomenon caused by inertia.
[0034] Then, defuzzify the exponential term gain of the improved sliding mode reaching law obtained through the fuzzy rules to obtain the accurate numerical value of the exponential term gain of the improved sliding mode reaching law In this application, the centroid of the area enclosed by the membership function and the abscissa in the above text (see Figure 3(b)) is used, that is, the centroid method is used for defuzzification. This method has a smoother output and is beneficial to weakening the chattering phenomenon of the motor control system.
[0035] Comparison between the improved fuzzy sliding mode reaching law and the traditional exponential reaching law Figure 4 As shown, it can be seen that when the system state is close to the sliding mode surface, the inflection point of the improved fuzzy sliding mode reaching law is smoother and the reaching speed is small. When the system state is far from the sliding mode surface, the reaching speed of the improved fuzzy sliding mode reaching law is large. In summary, the improved fuzzy sliding mode reaching law can effectively improve the speed control accuracy and dynamic performance of the motor control system.
[0036] Furthermore, in the motor control method based on fuzzy sliding mode control and harmonic voltage compensator provided by the present invention, an improved sliding mode reaching law is obtained based on the system state quantity and the adaptive function, specifically including: The improved sliding mode reaching law is: (3) (4) Among them, is for improving the sliding mode reaching law, and are both constants greater than zero, is the absolute value of the activation function (Sigmoid), is the exponential term gain of the improved sliding mode reaching law, is the designed adaptive function, e -∣s∣ is an exponential function, and are constants and , the parameter varies dynamically between and , and the equal velocity term gain is the coefficient of the sign function , which mainly affects the movement speed of the system state when approaching the sliding mode surface. When the system state variable approaches zero, is adjusted to the minimum value . At this time, is less than 1 and continuously changes, which can smoothly control the movement speed of the system state when approaching the sliding mode surface and weaken the high-frequency oscillation problem caused by the sign function .
[0037] The traditional exponential reaching law adopted by the traditional sliding mode control method is expressed by the formula: (9) Among them, and are constants, is the sign function, and the discontinuous equal velocity approaching term of this sign function is and as a whole, which will cause high-frequency sliding mode chattering. Therefore, the improved sliding mode reaching law is designed as shown in formula (3).
[0038] The formula is as follows: (10) When the system state is far from the sliding mode surface, that is, when the system state variable approaches infinity, the gain coefficient is dynamically adjusted to the maximum value ; when the system state is close to the sliding mode surface, that is, when the system state variable approaches zero, the gain coefficient is dynamically adjusted to the minimum value , taking into account the requirements of fast response and chattering suppression.
[0039] Furthermore, in the motor control method based on fuzzy sliding mode control and harmonic voltage compensator provided by the present invention, the output current is obtained according to the improved sliding mode reaching law, which specifically includes: based on the dynamic model of the permanent magnet synchronous motor, the output current is obtained according to the improved sliding mode reaching law, which specifically includes: (5) Among them, is the output current, is the mechanical angular velocity, is the load torque, is the damping coefficient, is the torque coefficient, is the moment of inertia.
[0040] The dynamic model of the permanent magnet synchronous motor is: (11) Among them, is the mechanical angular velocity, is the load torque, is the damping coefficient, is the torque coefficient, is the moment of inertia, is the output current of the speed loop.
[0041] Combining equations (1), (3), and (11), we can obtain: (12) Furthermore, the above-mentioned output current formula (5) is obtained. It can be seen that in the dynamic model of the permanent magnet synchronous motor, the load disturbance is compensated as a constant into the speed loop, which can effectively improve the robustness of the motor control system and reduce the speed fluctuation.
[0042] Next, the stability of the fuzzy sliding mode speed controller in the speed loop is proved based on the Lyapunov stability theory: Analyzed by using the Lyapunov stability principle, the Lyapunov function is defined as , and combined with equation (5), the derivative of is taken: (13) Among them, , , are all positive numbers. When and only when , , then there is . According to the Lyapunov stability principle, the closed-loop system using this fuzzy sliding mode controller is asymptotically stable.
[0043] Furthermore, in the motor control method based on fuzzy sliding mode control and harmonic voltage compensator provided by the present invention, S20: the current loop suppresses the harmonic components in the output current through the harmonic voltage compensator, specifically including: using a second-order generalized integral filter to extract the harmonic components from the stator current signal; calculating the harmonic compensation voltage based on the harmonic components through the harmonic steady-state voltage equation; performing harmonic compensation according to the harmonic compensation voltage to suppress the harmonic components.
[0044] A harmonic voltage compensator based on a second-order generalized integral filter is designed in the current loop. The harmonic components in the stator current signal are extracted using a second-order generalized integral filter. The harmonic components are then controlled according to the harmonic steady-state voltage equation of the permanent magnet synchronous motor. The voltage compensation amount is injected into the motor control system in real time to offset the interference of the harmonic components. Combined with the above-mentioned speed loop fuzzy sliding mode controller, the dynamic response performance and robustness of the motor control system can be taken into account, the current harmonics during motor operation can be weakened, the current control performance can be improved, and the anti-interference ability and speed control accuracy of the permanent magnet synchronous motor control system can be effectively improved.
[0045] The second-order generalized integral filter has amplitude attenuation and phase attenuation for AC signals at non-center frequencies in the AC signal, so it can extract harmonic components of a specific order in the motor stator current signal by setting the frequency, effectively reducing the impact of other high-frequency noise on the signal, and providing a high-quality signal foundation for subsequent harmonic compensation. The transfer function of the second-order generalized integral filter is: (14) in, is the center frequency, is the damping coefficient, is a complex variable in the Laplace transform domain. The smaller the value, the better the filtering effect on non-center frequency signals, but it will cause the filter response to become slower and the signal extraction to be delayed. The selection of value should be considered comprehensively from many aspects.
[0046] Based on the obtained harmonic components, the harmonic voltage compensator is designed based on the multi-synchronous rotating coordinate system. The fifth harmonic voltage vector is The speed of the seventh harmonic voltage vector is opposite to the fundamental wave. The speed rotates in the same direction as the fundamental wave, and the coordinate transformation can be performed to obtain the harmonic voltage equation in the dq synchronous rotating coordinate system: (15) in, represents the fundamental voltage of the d-axis in the dq synchronous rotating coordinate system, represents the fundamental voltage of the q-axis in the dq synchronous rotating coordinate system, represents the fifth harmonic voltage of the d-axis in the dq synchronous rotating coordinate system, represents the fifth harmonic voltage of the q-axis in the dq synchronous rotating coordinate system, represents the seventh harmonic voltage of the d-axis in the dq synchronous rotating coordinate system, represents the seventh harmonic voltage of the q-axis in the dq synchronous rotating coordinate system. In addition, there are also corresponding sixth harmonic currents in the motor, and their rotation directions and speeds are the same as those of the harmonic voltages: (16) Among them, represents the fundamental wave current of the d-axis in the dq synchronous rotating coordinate system, represents the fundamental wave current of the q-axis in the dq synchronous rotating coordinate system, represents the fifth harmonic current of the d-axis in the dq synchronous rotating coordinate system, represents the fifth harmonic current of the q-axis in the dq synchronous rotating coordinate system, represents the 7th harmonic current of the d-axis in the dq synchronous rotating coordinate system, represents the seventh harmonic current of the q-axis in the dq synchronous rotating coordinate system, represents the initial phase angle of the fifth harmonic current, represents the initial phase angle of the seventh harmonic current.
[0047] The steady-state voltage equation of the permanent magnet synchronous motor control system is expressed by the formula: (17) Among them, represents the stator voltage of the d-axis in the dq synchronous rotating coordinate system, represents the stator voltage of the q-axis in the dq synchronous rotating coordinate system, represents the stator current of the d-axis, represents the stator current of the q-axis, represents the d-axis inductance, represents the q-axis inductance, is the stator resistance, is the permanent magnet flux linkage. Let , It can be obtained: (18) Among them, is the replaced stator voltage of the d-axis, is the replaced stator voltage of the q-axis. Substituting Equation (16) into Equation (18) gives: (19) Since in the fifth-harmonic dq synchronous rotating coordinate system, the fifth harmonic is a DC component, and the fundamental wave and the seventh harmonic are both AC components, they are discarded to obtain the steady-state voltage equation of the fifth harmonic: (6) Wherein, is the calculated steady-state voltage of the fifth harmonic on the d-axis, is the calculated steady-state voltage of the fifth harmonic on the q-axis.
[0048] Similarly, the steady-state voltage equation of the seventh harmonic is obtained: (20) Wherein, is the calculated steady-state voltage of the seventh harmonic on the d-axis, is the calculated steady-state voltage of the seventh harmonic on the q-axis.
[0049] The collected harmonic current is used as the input of the harmonic voltage compensator, and the calculated steady-state voltages of the fifth and seventh harmonics are synthesized into the steady-state voltage of the sixth harmonic based on the rotation direction of the voltage vector and , and are injected reversely into the current loop to compensate for the harmonic effect existing in the motor control system, and the compensated d-axis voltage and q-axis voltage are obtained. It can be seen that by reasonably controlling the injection amplitude, the fifth and seventh harmonic components in the phase current of the permanent magnet synchronous motor can be effectively weakened, and thus the torque ripple can be reduced and the control performance of the permanent magnet synchronous motor can be improved. For example, when conducting a simulation test, the multiple of the steady-state voltage of the sixth harmonic is injected reversely into the current loop. If the harmonic weakening effect is not obvious, the multiple is increased until overcompensation occurs, that is, increasing the multiple instead increases the harmonics.
[0050] Through the above analysis, it can be seen that in the motor control method based on fuzzy sliding mode control and harmonic voltage compensator provided by the present invention, the harmonic components include the fifth harmonic component and the seventh harmonic component, and the harmonic compensation voltage is calculated based on the harmonic components through the harmonic steady-state voltage equation, specifically including: calculating the steady-state voltages of the fifth harmonic and the seventh harmonic respectively through the rotation direction of the voltage vector; synthesizing the steady-state voltages of the fifth harmonic and the seventh harmonic into the steady-state voltage of the sixth harmonic; wherein, the steady-state voltage equation of the fifth harmonic is: (6) Wherein, is the calculated steady-state voltage of the fifth harmonic on the d-axis, is the calculated steady-state voltage of the fifth harmonic on the q-axis, represents the fifth harmonic current of the d-axis obtained by passing the d-axis current through a second-order generalized integrator, represents the fifth harmonic current of the q-axis obtained by passing the q-axis current through a second-order generalized integrator, represents the d-axis inductance, represents the q-axis inductance, is the stator resistance.
[0051] In addition, the present invention also provides a motor control system based on fuzzy sliding mode control and harmonic voltage compensator, including: a speed loop that performs fuzzy sliding mode control on the speed tracking error of a permanent magnet synchronous motor to obtain an output current; a current loop that suppresses the harmonic components in the output current through a harmonic voltage compensator.
[0052] In order to prove the effectiveness of the permanent magnet synchronous motor control method based on fuzzy sliding mode control and harmonic voltage compensator proposed in the present invention, simulation comparison and analysis are carried out from two aspects.
[0053] First, in order to prove the effectiveness of the composite control of the permanent magnet synchronous motor based on fuzzy sliding mode control and harmonic voltage compensator in improving the system response speed and weakening the sliding mode chattering, speed controllers are designed respectively by using the traditional PI control method, the traditional sliding mode control method and the fuzzy sliding mode control method. A given speed step signal is given and a load disturbance is applied, and the response results of the three methods are compared. The simulation results are as Figure 4 shown in FIG. -6.
[0054] It can be seen from FIGS. 5(a)-7(b) that by using the traditional PI control method, the motor control system can track the speed step signal, but the response speed is slow and there is a large overshoot (see FIG. 5(a)), and the recovery time and the maximum speed fluctuation value are large under the sudden application of a 10 N·m load disturbance (see FIG. 5(b)). By using the traditional sliding mode control method, the motor control system can track the speed step signal, and the response speed is faster than that of the PI (see FIG. 6(a)), and the maximum speed fluctuation value is smaller than that of the PI and it recovers to the reference value faster under the sudden application of a 10 N·m load disturbance (see FIG. 6(b)). While by using the fuzzy sliding mode control method provided in the present application, the motor control system can accurately track the given speed signal, the response speed is the fastest and there is no overshoot (see FIG. 7(a)), and the speed fluctuation value is the smallest and it recovers to the speed reference value the fastest under the sudden application of a 10 N·m load disturbance (see FIG. 7(b)).
[0055] The comparison results of the steady-state speed between the traditional sliding mode control method and the present fuzzy sliding mode control method are shown in FIGS. 8(a) and 8(b). It can be seen that the present fuzzy sliding mode control method can effectively weaken the chattering of the traditional sliding mode control method and improve the control accuracy of the speed of the permanent magnet synchronous motor.
[0056] Secondly, to prove the effectiveness of the harmonic voltage compensator in suppressing harmonic pulsations, a six - order torque pulsation equivalent load corresponding to the fifth and seventh harmonic components is added to the simulation model to simulate harmonic interference, so as to better observe the harmonic suppression effect. Based on this fuzzy sliding - mode control, a harmonic voltage compensator is introduced, and the comparison of the three - phase current responses before and after adding the harmonic voltage compensation is shown in Figure 9. It can be seen that the waveform distortion of the three - phase current after compensation is smaller, that is, the harmonic components in the three - phase current are effectively suppressed. The FFT analysis is respectively carried out on the A - phase current signal before and after adding the harmonic voltage compensation, and the simulation results are shown in Figure 10. It can be intuitively seen that the fifth and seventh harmonic components of the motor control system after compensation are significantly reduced.
[0057] From the above simulation analysis results, it can be seen that the permanent - magnet synchronous motor control method based on fuzzy sliding - mode control and harmonic voltage compensator provided by the present invention is correct, effective and feasible.
[0058] The motor control method and system based on fuzzy sliding - mode control and harmonic voltage compensator provided by the present invention perform fuzzy sliding - mode control on the speed tracking error of the permanent - magnet synchronous motor through the speed loop to obtain the output current, which can weaken the chattering of the sliding - mode control; the current loop suppresses the harmonic components in the output current through the harmonic voltage compensator, reducing the influence of torque pulsation on the permanent - magnet synchronous motor control system. Through the above - mentioned composite control, the dynamic response performance and robustness of the permanent - magnet synchronous motor control system can be improved, the harmonic components during the operation of the permanent - magnet synchronous motor can be weakened, the control performance of the current can be improved, and the anti - disturbance ability and speed control accuracy of the permanent - magnet synchronous motor control system can be effectively improved.
[0059] Correspondingly, according to the embodiments of the present invention, the present invention also provides a computer device, a readable storage medium and a computer program product.
[0060] Figure 11 It is a schematic structural diagram of a computer device 12 provided in the embodiments of the present invention. Figure 11 It shows a block diagram of an exemplary computer device 12 suitable for implementing the embodiments of the present invention. Figure 11 The shown computer device 12 is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present invention.
[0061] Such as Figure 11As shown, computer device 12 is presented in the form of a general-purpose computing device. Computer device 12 is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the invention described and / or claimed herein.
[0062] The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples different system components (including system memory 28 and processing unit 16).
[0063] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures. By way of example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0064] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0065] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 can be used for reading and writing on non-removable, non-volatile magnetic media ( Figure 11 not shown, typically referred to as a "hard disk drive"). Although Figure 11 not shown in the figure, a disk drive for reading and writing on removable non-volatile disks (such as a "floppy disk"), and an optical disk drive for reading and writing on removable non-volatile optical disks (such as a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 through one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0066] A program / utilities 40 having a set (at least one) of program modules 42 can be stored, for example, in a memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. The program modules 42 generally execute the functions and / or methods in the embodiments described in the present invention.
[0067] The computer device 12 can also communicate with one or more external devices 14 (such as a keyboard, a pointing device, a display 24, etc.), and can also communicate with one or more devices that enable a user to interact with the computer device 12, and / or communicate with any device that enables the computer device 12 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through an input / output (I / O) interface 22. Moreover, the computer device 12 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 20. As shown in the figure, the network adapter 20 communicates with other modules of the computer device 12 through a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in combination with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0068] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing the motor control method based on fuzzy sliding mode control and harmonic voltage compensator provided in the embodiments of the present invention.
[0069] In the embodiments of the present invention, a non-transitory computer-readable storage medium storing computer instructions is also provided, on which a computer program is stored. When the program is executed by a processor, the motor control method based on fuzzy sliding mode control and harmonic voltage compensator provided in all the embodiments of the present application is implemented.
[0070] The computer storage medium of the embodiments of the present invention may adopt any combination of one or more computer-readable media. The computer-readable media may be computer-readable signal media or computer-readable storage media. More specific examples (non-exhaustive list) of the computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, the computer-readable storage media may be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device.
[0071] The computer-readable signal media may include data signals propagated in a baseband or as part of a carrier wave, which carry computer-readable program codes. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal media may also be any computer-readable media other than the computer-readable storage media, and this computer-readable media can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device.
[0072] The program codes contained on the computer-readable media can be transmitted by any appropriate media, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination of the above. The computer program codes for performing the operations of the present invention can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program codes can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0073] The embodiments of the present invention also provide a computer program product, including a computer program, and the computer program, when executed by a processor, implements the motor control method based on fuzzy sliding mode control and harmonic voltage compensator as described above.
[0074] It should be understood that the various forms of processes shown above can be used, with steps reordered, added or deleted. For example, the steps described in the disclosure of the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and no limitation is imposed herein.
[0075] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub - combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A motor control method based on fuzzy sliding mode control and harmonic voltage compensator, characterized in that: It includes the following steps: The speed loop performs fuzzy sliding mode control on the speed tracking error of the permanent magnet synchronous motor to obtain the output current; The current loop suppresses the harmonic components in the output current through a harmonic voltage compensator.
2. The motor control method according to claim 1, characterized in that: The speed loop performs fuzzy sliding mode control on the speed tracking error of the permanent magnet synchronous motor to obtain the output current, specifically including: Using the speed tracking error as the input of the non-linear terminal sliding mode surface and the system state variables as the output; Based on the system state variables and the adaptive function, an improved sliding mode reaching law is obtained; According to the improved sliding mode reaching law, the output current is obtained.
3. The motor control method according to claim 2, characterized in that: Using the speed tracking error as the input of the non-linear terminal sliding mode surface and the system state variables as the output, specifically including: (1) (2) wherein, is the system state variable, is a constant greater than zero, and is odd and , is the speed tracking error, is the integral term of the speed tracking error.
4. The motor control method according to claim 2, wherein: Based on the system state variables and the adaptive function, an improved sliding mode reaching law is obtained, specifically including: Taking the system state variables as inputs and the exponential term gain of the improved sliding mode reaching law as the output, the system state variables and the exponential term gain of the improved sliding mode reaching law are constructed to satisfy linear Z-shaped membership functions, triangular membership functions, and linear S-shaped membership functions; The input is divided into 7 fuzzy sets NB (negative large), NM (negative medium), NS (negative small), ZO (zero), PS (positive small), PM (positive medium), PB (positive large), and the output is divided into 4 fuzzy sets ZO (zero), PS (positive small), PM (positive medium), PB (positive large); Obtain the variable and the exponential term gain of the sliding mode reaching law The fuzzy control rules established therebetween are as follows: Rule 1: If = NB, then = PB; Rule 2: If = NM, then = PM; Rule 3: If = NS, then = PS; Rule 4: If = ZO, then = ZO; Rule 5: If = PS, then = PS; Rule 6: If = PM, then = PM; Rule 7: If = PB, then = PB.
5. The motor control method according to claim 4, characterized in that: Based on the system state variables and the adaptive function, an improved sliding mode reaching law is obtained, specifically including: The improved sliding mode reaching law is: (3) (4) Among them, To improve the sliding mode reaching law, , are all constants greater than zero, is the absolute value of the activation function (Sigmoid), is the exponential term gain of the improved sliding mode reaching law, is the designed adaptive function, e -∣s∣ is the exponential function, and are constants and , the parameter varies dynamically between and . When the system state variable approaches zero, is adjusted to the minimum value .
6. The motor control method according to claim 5, characterized in that: According to the improved sliding mode reaching law, the output current is obtained, specifically including: Based on the dynamic model of the permanent magnet synchronous motor, the output current is obtained according to the improved sliding mode reaching law, specifically including: (5) wherein, is the output current, is the mechanical angular velocity, is the load torque, is the damping coefficient, is the torque coefficient, is the moment of inertia.
7. The motor control method according to any one of claims 1 to 6, characterized in that: The current loop suppresses the harmonic components in the output current through a harmonic voltage compensator, specifically including: Using a second-order generalized integral filter to extract the harmonic components from the stator current signal; Based on the harmonic components, the harmonic compensation voltage is calculated through the harmonic steady-state voltage equation; Harmonic compensation is performed according to the harmonic compensation voltage to suppress the harmonic components.
8. The motor control method according to claim 7, wherein: The harmonic components include the fifth harmonic component and the seventh harmonic component. Based on the harmonic components, the harmonic compensation voltage is calculated through the harmonic steady-state voltage equation, specifically including: Calculating the fifth harmonic steady-state voltage and the seventh harmonic steady-state voltage respectively through the voltage vector rotation direction; Combining the fifth harmonic steady-state voltage and the seventh harmonic steady-state voltage into the sixth harmonic steady-state voltage; Among them, the fifth harmonic steady-state voltage equation is: (6) Among them, is the calculated d axis fifth harmonic steady-state voltage, is the calculated q axis fifth harmonic steady-state voltage, represents the d-axis fifth harmonic current obtained by passing the d-axis current through a second-order generalized integrator, represents the q-axis fifth harmonic current obtained by passing the q-axis current through a second-order generalized integrator, represents the d-axis inductance, represents the q-axis inductance, is the stator resistance.
9. A motor control system based on fuzzy sliding mode control and harmonic voltage compensator, characterized in that: It includes: A speed loop that performs fuzzy sliding mode control on the speed tracking error of the permanent magnet synchronous motor to obtain the output current; A current loop that suppresses the harmonic components in the output current through a harmonic voltage compensator.
10. A computer device, characterized in that, It includes: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the motor control method according to any one of claims 1 to 8.