Permanent magnet synchronous motor multi-working-condition fuzzy PI controller and variable parameter integral separation method and system
Through the improved fuzzy PI controller and adaptive integral separation method, the applicability and integral saturation problems of the traditional fuzzy PI controller in permanent magnet synchronous motors are solved, efficient speed control under all working conditions is achieved, and the motor response speed and stability are improved.
Patent Information
- Application Number
- CN202510881669.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-09-16
AI Technical Summary
The traditional fuzzy PI controller is suitable for the forward acceleration phase of a permanent magnet synchronous motor, but it is not effective under conditions such as deceleration and load addition and subtraction. The rule table is redundant and consumes computing resources, and it cannot solve the speed overshoot problem caused by integral saturation.
An improved two-level fuzzy controller and adaptive integral separation mechanism are adopted. The PI controller parameter compensation value is obtained through the fuzzy rule table and proportional factor mapping. The rule table is optimized in combination with the motor kinematic formula to achieve applicability to all working conditions. The integral term is dynamically adjusted under different working conditions to avoid integral saturation.
The fuzzy PI controller is efficiently applied under forward and reverse rotation, acceleration and deceleration, and load addition and subtraction conditions, which reduces the number of rule tables, improves calculation efficiency, avoids speed overshoot, and improves motor response speed and stability.
Smart Images

Figure CN120658153A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electrical automation technology, and in particular to a multi-operating-condition fuzzy PI controller for a permanent magnet synchronous motor and a variable parameter integral separation method and system. Background Art
[0002] The conventional solution adopted by the permanent magnet synchronous motor vector control system to dynamically adjust the PI controller parameters as the operating conditions change is to use a fuzzy controller combined with a PI controller (fuzzy PI controller) to adjust the PI controller parameters K p , K i Perform real-time dynamic compensation to enable it to adapt to changes in operating conditions.
[0003] Deficiencies of existing technology: (1) The rule table of the traditional fuzzy PI controller is only applicable to the forward acceleration stage, and is not applicable to deceleration, load addition and subtraction, and reverse operation. (2) The rule table of the traditional fuzzy PI controller is relatively redundant, with many membership functions, which takes up more computing resources; (3) The traditional fuzzy PI controller cannot solve the problem of speed overshoot caused by integral saturation when the motor continuously accelerates and decelerates, or adds or subtracts load.
[0004] Therefore, the existing technology has deficiencies and needs further improvement. Summary of the Invention
[0005] In view of the problems existing in the prior art, the present invention provides a multi-operating-condition fuzzy PI controller for a permanent magnet synchronous motor and a variable parameter integral separation method.
[0006] To achieve the above object, the specific solutions of the present invention are as follows: The present invention provides a multi-operating-state fuzzy PI controller for a permanent magnet synchronous motor and a variable parameter integral separation method, the system comprising: PI controller: used to receive the speed error and output the current loop i q The target value, its proportional coefficient K p and integral coefficient K i It is obtained by adding the initial parameters and the compensation value of the fuzzy controller; Improved fuzzy controller: adopts a two-level structure, with the inputs being the speed error e and the speed error change rate e c , after quantization factor K e , K ec Mapping to fuzzy to get E, E c , after reasoning with the improved fuzzy rule table, the fuzzy output value y is obtained p 、y i , through the scaling factor K up , Kui Map to the actual domain and output the compensation value ∆K of the PI controller parameter p , ∆K i ,The fuzzy rule table is applicable to forward and reverse rotation, ,acceleration and deceleration, and load addition and subtraction, and the number of ,rules is simplified; Adaptive integral separation mechanism: The integral separation moment Speed_Ki is calculated based on the target speed. Integral separation is performed when the speed error e is greater than Speed_Ki. Integral accumulation is performed when the speed error e is less than Speed_Ki. Integral separation is not performed when the load increases or decreases suddenly.
[0007] Furthermore, in the improved fuzzy controller, The domain of input E is [-10,10], and the output ∆K p The domain is [-1,1], and 7 fuzzy sets {NB, NM, NS, ZO, PS, PM, PB} are defined, representing {negative large, negative medium, negative small, zero, positive small, positive medium, positive large}; Enter E c The domain is [0,10], and the output is ∆K i The domain of discourse is [-3.333, 13.333], and four fuzzy sets {ZO, PS, PM, PB} are defined, representing {zero, positive small, positive middle, positive large}; Furthermore, the improved fuzzy controller adopts a triangular membership function, the fuzzy reasoning follows the Mamdani method, and the center of gravity method is used to convert the fuzzy quantity into an accurate quantity. The calculation formula is: ; Among them, y(i) is the fuzzy quantity of the inference output, y m is the weight of each group of elements.
[0008] Furthermore, the fuzzy rule table is formulated based on the motor kinematics formula, the speed error E and the error change rate E under different working conditions. c The evolution characteristics of K under different working conditions p , K i The compensation direction and amplitude.
[0009] Furthermore, in the adaptive integral separation mechanism, the integral separation moment Speed_Ki is calculated as follows: ; Where speed is the current speed, speed_ref is the target speed, and speed_max is the maximum range of speed adjustment.
[0010] The present invention also provides a synchronous motor multi-operating-condition fuzzy PI control and variable parameter integral separation method. Based on the above system, the method includes the following steps: S1, obtain the motor speed in real time, determine the forward and reverse rotation of the motor, and calculate the speed error e and the speed error change rate e c ; S2, the speed error e and the quantization factor K e Multiplication, speed error change rate e c and quantization factor K ec Multiply them to get the input E and E of the fuzzy controller c , when the motor reverses, reverse E; S3, based on the fuzzy rule table applicable to all working conditions, obtains the fuzzy output value y through fuzzy reasoning calculation p 、y i , by the scaling factor K up , K ui Multiply to get the proportional coefficient K p Compensation value ∆K p , integral term coefficient K i Compensation value ∆K i ; S4, the compensation value ∆K p , ∆K i and the initial parameter K of the PI controller p0 , K i0 Add them together to get the proportional term coefficient K p , integral term coefficient K i ; S5, calculating the integral separation time Speed_Ki according to the target speed, and separating or accumulating the integral term; S6, calculate the output value of the PI controller, which is the current loop i q The target value is set, and the output value is limited according to the motor operating conditions to complete the motor speed control.
[0011] Furthermore, in step S1, the speed error change rate e c The calculation formula is: ; Where e(k) is the speed error at the current moment, e(k-1) is the speed error at the previous moment, T=t k −t k−1 is the sampling time interval.
[0012] Furthermore, in step S2, the quantization factor K e , K ec The calculation formula is: ; Among them, the basic domain of e is [-x e ,x e ], the fuzzy domain is [-m,m]; ec The basic domain is [-x ec ,x ec ], the fuzzy domain is [-n,n].
[0013] Furthermore, in step S5, integral separation is performed when the speed error e is greater than the integral separation moment Speed_Ki, and integral accumulation is performed when the speed error e is less than Speed_Ki; integral separation is not performed when the load increases or decreases suddenly, so that the integral term is fully accumulated to eliminate load interference.
[0014] Furthermore, the method further includes step S7, verifying the controller performance through simulation, with the evaluation indicators being overshoot and adjustment time, comparing a traditional PI controller with a traditional fuzzy PI controller, and verifying the stability and response speed of the controller under forward and reverse continuous acceleration and deceleration and load addition and subtraction conditions; The calculation formula for overshoot in the acceleration stage and the load stage is: ; The calculation formula for overshoot during the deceleration stage and the load reduction stage is: ; Adjustment time calculation formula: ; Among them, σ up and σ down are the overshoot in the acceleration and deceleration stages respectively; max / min is the maximum / minimum speed of this stage; r is the steady-state speed in this stage; high The maximum steady-state speed to which the vehicle can accelerate before deceleration and load reduction; T setting is the adjustment time; T r is the time to reach steady state, T step It is the time node of sudden change of working condition.
[0015] The technical solution of the present invention has the following beneficial effects: 1. Make the fuzzy PI controller applicable to continuous acceleration and deceleration of forward and reverse rotation and continuous addition and subtraction of load.
[0016] 2. Make the rule table of the traditional fuzzy controller more streamlined and improve operating efficiency.
[0017] 3. Avoid speed overshoot due to integral saturation during continuous acceleration and deceleration, and addition and subtraction of loads.
[0018] 4. Improve the response speed and stability of the motor. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a structural diagram of the multi-operating-condition fuzzy PI controller and the adaptive integral separation method of the present invention; Figure 2 is the membership function of the input variable E of the present invention; Figure 3 is the membership function of the input variable Ec of the present invention; Figure 4 is the output variable ∆K of the present invention p The membership function of Figure 5 is the output variable ∆K of the present invention i The membership function of Figure 6 It is the adaptive integral separation flow chart of the present invention; Figure 7 This is a schematic diagram of the forward rotation continuous acceleration and load reduction of the present invention; Figure 8 This is a schematic diagram of the forward rotation continuous deceleration and load addition and subtraction of the present invention; Figure 9 It is the reverse continuous acceleration adding and subtracting load of the present invention; Figure 10 It is the reverse continuous deceleration adding and subtracting load of the present invention; Figure 11 It is an overall flow chart of the multi-operating-condition fuzzy PI controller and the adaptive integral separation method of the present invention. DETAILED DESCRIPTION
[0020] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It will be understood that the specific embodiments described herein are merely intended to explain the present invention rather than to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only show portions related to the present invention rather than all of the present invention.
[0021] Combine Figures 1-11 As shown, the present invention provides a synchronous motor multi-operating state fuzzy PI control and adaptive integral separation system, the system comprising: PI controller: used to receive the speed error and output the current loop i q The target value, its proportional coefficient K p and integral coefficient K i It is obtained by adding the initial parameters and the compensation value of the fuzzy controller; Improved fuzzy controller: adopts a two-level structure, with the inputs being the speed error e and the speed error change rate e c , after quantization factor K e , K ec Mapping to the fuzzy domain yields E, E c, after reasoning with the improved fuzzy rule table, the fuzzy output value y is obtained p 、y i , through the scaling factor K up , K ui Mapping to the actual domain to obtain the compensation value ∆K of the PI controller parameter p , ∆K i ,The fuzzy rule table is applicable to forward and reverse rotation, ,acceleration and deceleration, and load addition and subtraction, and the number of ,rules is simplified; Adaptive integral separation mechanism: The integral separation moment Speed_Ki is calculated based on the target speed. Integral separation is performed when the speed error e is greater than Speed_Ki. Integral accumulation is performed when the speed error e is less than Speed_Ki. Integral separation is not performed when the load increases or decreases suddenly.
[0022] In the improved fuzzy controller, The domain of input E is [-10,10], and the output ∆K p The domain is [-1,1], and 7 fuzzy sets {NB, NM, NS, ZO, PS, PM, PB} are defined, representing {negative large, negative medium, negative small, zero, positive small, positive medium, positive large}; Enter E c The domain is [0,10], and the output is ∆K i The domain of discourse is [-3.333, 13.333], and four fuzzy sets {ZO, PS, PM, PB} are defined, representing {zero, positive small, positive middle, positive large}.
[0023] The improved fuzzy controller adopts a triangular membership function, the fuzzy reasoning follows the Mamdani method, and the center of gravity method is used to convert the fuzzy quantity into an accurate quantity. The calculation formula is: ; Among them, y(i) is the fuzzy quantity of the inference output, y m is the weight of each group of elements.
[0024] The fuzzy rule table is formulated based on the motor kinematics formula, the speed error E and the error change rate E under different working conditions. c The evolution characteristics of K under different working conditions p , K i Compensation direction and amplitude:
[0025] Among them, T e is the electromagnetic torque; T L is the load torque; J is the moment of inertia of the motor rotor; B is the damping coefficient; ω m is the rotor mechanical angular velocity.
[0026] The left side of the equation is the moment of inertia term, which represents the torque required for the motor to generate angular acceleration; the right side is the electromagnetic torque, viscous damping torque, and load torque, which correspond to the driving force, speed-dependent resistance, and external load resistance, respectively. Among them, the viscous damping and load torque are always opposite to the direction of the speed, weakening the motor's acceleration ability during acceleration or load addition, and exacerbating the system's deceleration trend during deceleration or load reduction, forming a "natural deceleration" effect. Based on the error e and the error change rate e under various working conditions c According to the changing trend of the working conditions, corresponding rules are formulated for different working conditions, and similar rules are integrated to simplify the rule table and membership function structure and improve the operation efficiency. The improvement scheme of the present invention is as follows: 1) Without considering overshoot, for typical working conditions, E and E c The changing trends are summarized as follows: ① Acceleration stage: the target speed is greater than the actual speed, E<0 and gradually approaches 0; when the speed changes suddenly |E c | increases rapidly and then gradually converges to 0.
[0027] ②Deceleration stage: the target speed is less than the actual speed, E>0 and gradually approaches 0; |E c | also increases rapidly and then gradually converges to 0.
[0028] ③Sudden load increase stage: the load increases and the speed decreases, E>0, E c It fluctuates first and then converges to 0.
[0029] ④Sudden load reduction stage: Load increase causes speed to rise, E<0, E c Similarly, it fluctuates first and then converges to 0.
[0030] The above principle is only applicable to E and E under the forward rotation condition of the motor. c When the motor is in reverse state, these changing trends are opposite to those in forward rotation. c The opposite of reversal.
[0031] 2) Based on the motor kinematics formula and E and E under different working conditions c The changing trend of p , K i Compensation strategy: ① Acceleration and load conditions: When the speed error E is large, increase K p Improve system response speed and maintain K i As the initial value, suppress the excessive accumulation of the integral term; as E decreases, K p Maintain the initial value to avoid overshoot and increase K i Eliminate static errors.
[0032] ②Deceleration and load reduction conditions: In this stage, E is a negative value, and the controller outputs i q The target value is also negative, which causes the electromagnetic torque to reverse. The presence of viscous damping and load torque will cause the motor to slow down. To prevent excessive speed drop, when |E| is large, K is greatly reduced. p Avoid excessive deceleration caused by sudden current changes and keep K i To prevent the integral term from accumulating suddenly, use the initial value. When |E| is small, reduce K slightly. p To prevent overshoot, increase K i Eliminate static errors.
[0033] 3) The change trend of E is the same when accelerating and adding load, K p , K i If the gain change trends of the two are similar, the same fuzzy rules are used for acceleration and load addition; the same applies to deceleration and load reduction. c They are opposite numbers to each other, so Ec is uniformly processed as |Ec|, and the type of working condition can be determined by combining the sign of E. Based on this, E in the fuzzy rule table can be omitted. c The negative value of reduces the number of rules from 49 to 28. When the motor is reversing, E is inverted and mapped to the corresponding rule, achieving full operating condition adaptation.
[0034] Based on the above analysis, combined with the K p , K i In order to meet the compensation requirements, this paper constructs a fuzzy rule table applicable to all working conditions, as shown in Table 1 and Table 2; and adjusts the membership function, as shown in Figures 2 to 5 In the adaptive integral separation mechanism, the calculation formula of the integral separation time Speed_Ki is: ; Where speed is the current speed, speed_ref is the target speed, and speed_max is the maximum range of speed adjustment.
[0035] The present invention also provides a synchronous motor multi-operating-condition fuzzy PI control and adaptive integral separation method. Based on the above system, the method includes the following steps: S1, obtain the motor speed in real time, determine the forward and reverse rotation of the motor, and calculate the speed error e and the speed error change rate e c ; S2, the speed error e and the quantization factor K e Multiplication, speed error change rate e c and quantization factor K ec Multiply them to get the input E and E of the fuzzy controller c , when the motor reverses, reverse E; S3, based on the fuzzy rule table applicable to all working conditions, obtains the fuzzy output value y through fuzzy reasoning calculation p 、y i , by the scaling factor K up , K ui Multiply to get the proportional coefficient K p Compensation value ∆K p , integral term coefficient K i Compensation value ∆K i ; S4, the compensation value ∆K p , ∆K i and the initial parameter K of the PI controller p0 , K i0 Add them together to get the proportional term coefficient K p , integral term coefficient K i ; S5, calculating the integral separation time Speed_Ki according to the target speed, and separating or accumulating the integral term; S6, calculate the output value of the PI controller, which is the current loop i q The target value is set, and the output value is limited according to the motor operating conditions to complete the motor speed control.
[0036] In step S1, the speed error change rate e c The calculation formula is: ; Where e(k) is the speed error at the current moment, e(k-1) is the speed error at the previous moment, T=t k −t k−1 is the sampling time interval.
[0037] In step S2, the quantization factor K e , K ec The calculation formula is: ; Among them, the basic domain of e is [-x e ,x e ], the fuzzy domain is [-m,m]; e c The basic domain is [-x ec ,x ec ], the fuzzy domain is [-n,n].
[0038] In step S5, when the speed error e is greater than the integral separation moment Speed_Ki, integral separation is performed, and when the speed error e is less than Speed_Ki, integral accumulation is performed; when the load increases or decreases suddenly, integral separation is not performed, so that the integral term is fully accumulated to eliminate load interference.
[0039] The method further includes step S7, verifying controller performance through simulation, using overshoot and settling time as evaluation indicators, comparing a traditional PI controller with a traditional fuzzy PI controller, and verifying the stability and response speed of the controller under forward and reverse continuous acceleration and deceleration and load addition and subtraction conditions; The calculation formula for overshoot in the acceleration stage and the load stage is: ; The calculation formula for overshoot during the deceleration stage and the load reduction stage is: ; Adjustment time calculation formula: ; Among them, σ up and σ down are the overshoot in the acceleration and deceleration stages respectively; max / min is the maximum / minimum speed of this stage; r is the steady-state speed in this stage; high The maximum steady-state speed to which the vehicle can accelerate before deceleration and load reduction; T setting is the adjustment time; T r is the time to reach steady state, T step It is the time node of sudden change of working condition.
[0040] Example 1: A multi-operating-condition fuzzy PI controller and an adaptive integral separation method for a permanent magnet synchronous motor include a PI controller, an improved fuzzy controller, and an adaptive integral separation mechanism based on a target speed.
[0041] 1. Use a two-stage fuzzy controller with the speed error e and speed error change rate e as input. c , respectively with the quantization factor K e , K ec After multiplication, we get E and E c , after reasoning with the improved fuzzy rule table, the fuzzy output value y is obtained p 、y i ;y p 、y i and the scaling factor K up , K ui After multiplication, we get the proportional term coefficient K of the PI controller p Compensation value ∆K p and integral coefficient K i Compensation value ∆K i Among them, K up , K uiSelect according to the system performance requirements. Let the basic domain of e be [-x e ,x e ],e c The basic domain is [-x ec ,x ec ]; the fuzzy domain of e is [-m,m],e c The fuzzy domain is [-n,n], then K e , K ec The calculation is performed according to the following formula (1).
[0042] ⑴ 2. Define fuzzy input E, E c The domains are [-10,10] and [0,10] respectively; define the fuzzy output ∆K p , ∆K i are [-1,1] and [-3.333,13.333] respectively; input E, output ∆K p Define 7 fuzzy sets, the fuzzy language is {NB, NM, NS, ZO, PS, PM, PB}, representing {negative large, negative medium, negative small, zero, positive small, positive medium, positive large}; input E c , output ∆K i Define four fuzzy sets, and the fuzzy language is {ZO, PS, PM, PB}, which means {zero, positive small, positive middle, positive large}.
[0043] 3. The input and output calculation of the built fuzzy controller is as follows Figures 2 to 4 The triangle membership function shown in the figure is used. The fuzzy inference process follows the Mamdani method, and the fuzzy output is calculated using the centroid method to convert the fuzzy quantity into an accurate quantity. The calculation formula is shown in the following formula (2), where: y(i) is the fuzzy quantity of the inference output, y m is the weight of each group of elements.
[0044] ⑵ 4. The formulation of the fuzzy rule table should be based on the speed error E and its change rate E c Under different working conditions, the two show the following rules: ① Acceleration stage: the target speed is greater than the actual speed, E<0 and gradually approaches 0; when the speed changes suddenly |E c | increases rapidly and then gradually converges to 0.
[0045] ②Deceleration stage: the target speed is less than the actual speed, E>0 and gradually approaches 0; |E c | also increases rapidly and then gradually converges to 0.
[0046] ③Sudden load increase stage: the load increases and the speed decreases, E>0, Ec It fluctuates first and then converges to 0.
[0047] ④Sudden load reduction stage: Load increase causes speed to rise, E<0, E c Similarly, it fluctuates first and then converges to 0.
[0048] The above principle is only applicable to E and E under the forward rotation condition of the motor. c When the motor is in reverse state, these changing trends are opposite to those in forward rotation. c The opposite of reversal.
[0049] 5. In order to achieve a balance between fast response and low overshoot of motor speed, the proportional coefficient K is adjusted under different working conditions. p and the integral coefficient K i Perform dynamic adjustment and analyze the motor kinematic equation based on the following formula (3): ⑶ Where: T e is the electromagnetic torque; T L is the load torque; J is the moment of inertia of the motor rotor; B is the damping coefficient; ω m is the rotor mechanical angular velocity.
[0050] The moment of inertia term on the left side of the equation represents the torque required for motor acceleration. The first term on the right side of the equation, the electromagnetic torque, is the driving torque generated by the motor current. The second term on the right side of the equation, the viscous damping term, represents the speed-related resistance generated by friction inside or outside the motor. The third term on the right side of the equation, the load torque, is the reverse resistance torque applied to the motor by the external load. Among them, the viscous damping and load torque are always opposite to the direction of motor operation. During acceleration and load addition conditions, the viscous damping and load torque will hinder the operation of the motor and weaken the acceleration of the motor; during deceleration and load reduction conditions, the viscous damping and load torque will also hinder the operation of the motor and cause the motor to decelerate. Based on the kinematic principle analyzed in equation (3), the following K is made: p , K i Adjustment strategy: ① Acceleration and load conditions: When the speed error E is large, increase K p Improve system response speed and maintain K i As the initial value, suppress the excessive accumulation of the integral term; as E decreases, K p Maintain the initial value to avoid overshoot and increase K i Eliminate static errors.
[0051] ②Deceleration and load reduction conditions: In this stage, E is a negative value, and the controller outputs i qThe target value is also negative, which causes the electromagnetic torque to reverse. The presence of viscous damping and load torque will cause the motor to slow down. To prevent excessive speed drop, when |E| is large, K is greatly reduced. p Avoid excessive deceleration caused by sudden current changes and keep K i To prevent the integral term from accumulating suddenly, use the initial value. When |E| is small, reduce K slightly. p Prevent overshoot and increase K i Eliminate static errors.
[0052] 6. The changing trend of E is the same when accelerating and adding load, K p , K i If the gain change trends of the two are similar, the same fuzzy rules are used for acceleration and load addition; the same applies to deceleration and load reduction. c They are opposite numbers to each other, so Ec is uniformly processed as |Ec|, and the type of working condition can be determined by combining the sign of E. Based on this, E in the fuzzy rule table can be omitted. c The negative value of reduces the number of rules from 49 to 28. When the motor is reversed, E is inverted to map to the corresponding rule.
[0053] Based on the speed error E and error change rate E under the above different working conditions c The evolution characteristics of K p , K i Through systematic sorting and logical induction, a fuzzy rule table suitable for all working conditions is constructed, as shown in Table 1 and Table 2 below; and the membership function is adjusted, as shown in Table 1 and Table 2. Figures 2 to 5 .
[0054] 7. Use position PI controller, the input is speed error, the output is current loop i q The target value is set, and the output is limited according to the motor operating conditions. The output value is calculated as follows (4): ⑷ Among them, e(t) is the real-time speed error, K p is the proportional term coefficient, K i is the integral term coefficient, whose value is determined by the initial parameter K of the PI controller p0 , K i0 and the output ∆K of the fuzzy controller p , ∆K i Add them together and the calculation formula is as follows (5). ⑸ 8. When continuously accelerating and decelerating and continuously adding and subtracting loads, the motor is in a continuous dynamic change. The continuous accumulation of integral terms can easily cause speed overshoot. The integral separation method can be used to avoid excessive accumulation of integrals. Different target speeds require integral separation at different times. Here, the integral separation moment calculation method of the following formula (6) is proposed, where Speed_Ki is the integral separation moment, speed is the current speed, speed_ref is the target speed, speed_max is the maximum range of speed adjustment, and integral separation is performed when the speed error e is greater than Speed_Ki, and integral accumulation is performed when e is less than Speed_Ki. Integral separation is not performed when the load increases or decreases suddenly, so that the integral term is fully accumulated to quickly eliminate load interference. The implementation process is as follows Figure 6 shown.
[0055] ⑹ 1. Process steps: A multi-operating-condition fuzzy PI controller for a permanent magnet synchronous motor and a method based on adaptive integral separation include a PI controller, an improved fuzzy controller, and an adaptive integral separation mechanism based on a target speed.
[0056] A multi-operating-condition fuzzy PI control method for a permanent magnet synchronous motor and a controller based on target speed integral separation, the steps are as follows: Step 1: Obtain the motor speed in real time through the sensor and determine the forward and reverse rotation of the motor. Subtract the current speed from the target speed to get the speed error e. Perform differential calculation on e according to the following formula (7) to get the speed error change rate e c .
[0057] ⑺ Among them, e(k) is the current time t k The speed error, e(k−1) is the speed error at the previous moment t k−1 Speed error, T=t k −t k−1 is the sampling time interval.
[0058] Step 2: Speed error e and quantization factor K e After multiplication, we get the input E of the fuzzy controller; the speed error change rate e c and quantization factor K ec After multiplication, we get the input E of the fuzzy controller c .K e and K ec The value of is calculated according to formula (1).
[0059] Step 3: With the goal of fast response speed and low overshoot, the kinematic equation of formula (3) is analyzed based on the speed error E and error change rate E under different working conditions.c The evolution characteristics of K p , K i Through systematic sorting and logical induction, a fuzzy rule table suitable for all working conditions is constructed.
[0060] Step 4: Use the same fuzzy rules in the acceleration and loading phases, and the same fuzzy rules in the deceleration and unloading phases. c Unified transformation into |E c |, and when the motor is reversed, E is inverted, and the 47 fuzzy rules can be simplified to 28.
[0061] Step 5: The input and output calculations use the triangle membership function. The fuzzy reasoning process follows the Mamdani method, and the center of gravity method is used to calculate the fuzzy output, converting the fuzzy quantity into an accurate quantity. The calculation formula is shown in Equation (2).
[0062] Step 6: Output y of fuzzy controller p 、y i and the scaling factor K up , K ui After multiplication, we get the PI controller K p Compensation value ∆K p and K i Compensation value ∆K i Among them, K up , K ui Select based on system performance requirements.
[0063] Step 7: Output ∆K of the fuzzy controller p , ∆K i and the initial parameter K of the PI controller p0 , K i0 Add up to get the proportional term coefficient K of the PI controller p and integral coefficient K i , where the initial parameter K p0 The value of K is determined according to the system performance requirements. In order to speed up the convergence speed in the later stage and avoid excessive accumulation of integrals, i0 The value should be as close to 0 as possible while meeting performance requirements.
[0064] Step 8: Use the integral separation method to avoid excessive accumulation of integral terms when the motor changes continuously and dynamically. Different target speeds require different integral separation moments. The integral separation moment is calculated according to formula (6). When the speed error e is greater than Speed_Ki, integral separation is performed, and when e is less than Speed_Ki, integral accumulation is performed. In the case of sudden increases or decreases in load, integral separation is not performed, so that the integral term is fully accumulated to quickly eliminate load interference.
[0065] Step 9: Calculate the output value of the PI controller according to formula (4). The output value is the current loop i q The target value is set, and the output is limited according to the motor operating conditions. This completes the design of the motor speed controller.
[0066] Step 10: The proposed controller is simulated and compared with traditional PI and fuzzy PI controllers. The evaluation indicators are overshoot and adjustment time, which represent the stability and response speed of the controller, respectively. The overshoot calculation formula for the acceleration and load addition phases is shown in Equation (7), the overshoot calculation formula for the deceleration and load reduction phases is shown in Equation (8), and the adjustment time calculation formula is shown in Equation (9).
[0067] ⑺ ⑻ ⑼ Where σ up and σ down are the overshoot in the acceleration and deceleration stages respectively; max / min is the maximum / minimum speed of this stage; r is the steady-state speed in this stage; high The maximum steady-state speed to which the vehicle can accelerate before deceleration and load reduction; T setting is the adjustment time; T r is the time to reach steady state, T step It is the time node of sudden change of working condition.
[0068] The simulation conditions are as follows: ① Forward continuous acceleration and continuous load addition and subtraction mixed working conditions: start acceleration to 50 rpm, suddenly increase the load by 7 N·m in 0.05 s, accelerate to 200 rpm in 0.1 s, suddenly increase the load by 6 N·m in 0.15 s, accelerate to 450 rpm in 0.2 s, suddenly reduce the load by 7 N·m in 2.5 s, accelerate to 1000 rpm in 0.3 s, and suddenly reduce the load by 6 N·m in 0.35 s.
[0069] ② Mixed forward deceleration and continuous load addition and subtraction conditions: Start acceleration to 1000 rpm, suddenly increase the load by 7 N·m at 0.05 s, decelerate to 950 rpm at 0.1 s, suddenly increase the load by 6 N·m at 0.15 s, decelerate to 450 rpm at 0.2 s, suddenly reduce the load by 7 N·m at 2.5 s, decelerate to 0 rpm at 0.3 s, and suddenly reduce the load by 6 N·m at 0.35 s.
[0070] ③ When the motor is in reverse rotation, perform working condition ① and working condition ② once respectively.
[0071] Step 11: The speed curves of each mixed simulation working condition for forward and reverse rotation are as follows Figures 7 to 10 As shown in Figure 3, where PI represents the traditional PI controller, Fuzzy-PI represents the traditional fuzzy PI controller, New-Fuzzy-PI represents the improved fuzzy PI controller proposed in this invention, and Speed-ref represents the target speed. The performance indicators of each operating condition mutation node are shown in Tables 3 to 6. The experimental results obtained above are summarized and analyzed as follows: ① Mixed working conditions of forward continuous acceleration and continuous addition and subtraction of load: The improved fuzzy PI controller proposed in the present invention has no overshoot in each acceleration stage, the shortest adjustment time, and the strongest anti-load interference ability; the traditional fuzzy PI controller has a good suppression of overshoot in the acceleration stage, but the integral term accumulated by continuous acceleration will still produce a certain overshoot. It has a certain anti-interference ability when adding load, but poor anti-interference ability when reducing load; the traditional PI controller has a large overshoot in each stage and the longest adjustment time.
[0072] ② Mixed working conditions of forward continuous deceleration and continuous addition and subtraction of load: The improved fuzzy PI controller proposed in the present invention has no overshoot in each deceleration section, the shortest adjustment time, and the strongest ability to resist load interference; the traditional fuzzy PI controller has large overshoot in each stage and the longest adjustment time due to the inapplicability of fuzzy rules; the traditional PI controller has large overshoot in each stage and a long adjustment time.
[0073] ③ Reverse continuous acceleration and continuous addition and subtraction load mixed working conditions: The performance of the improved fuzzy PI controller proposed in this invention and the traditional PI controller are consistent with those in forward rotation; in reverse rotation, the performance of the traditional fuzzy PI controller is consistent with that of the traditional fuzzy PI controller. c It is the opposite number of forward rotation, so the fuzzy rule of forward deceleration is used in the reverse acceleration stage. The mismatch of fuzzy rules leads to poor control effect.
[0074] ④ Mixed working condition of continuous deceleration and continuous addition and subtraction of load in reverse rotation: The performance of the improved fuzzy PI controller proposed in this invention and the traditional PI controller are consistent with those in forward rotation; in reverse rotation, the performance of the traditional fuzzy PI controller is the same as that of the traditional fuzzy PI controller. c It is the opposite number of forward rotation, so the fuzzy rule of forward acceleration is used in the reverse deceleration stage. The mismatch of fuzzy rules leads to poor control effect.
[0075] In summary, the permanent magnet synchronous motor multi-condition fuzzy PI controller and adaptive integral separation method proposed in the present invention can more effectively suppress the overshoot of the speed and shorten the adjustment time in the continuous acceleration and deceleration conditions of forward and reverse rotation compared with the traditional fuzzy PI controller and traditional PI controller, and has stronger anti-load interference ability in the continuous addition and subtraction load conditions.
[0076] 2. Compared with the existing technology, the advantages of this invention are: (1) The fuzzy PI controller can be applied to continuous acceleration and deceleration of forward and reverse rotation and continuous addition and subtraction of load.
[0077] (2) Make the rule table of the traditional fuzzy controller more streamlined and improve operating efficiency.
[0078] (3) Avoid speed overshoot due to integral saturation during continuous acceleration and deceleration, and addition and subtraction of loads.
[0079] (4) Improve the response speed and stability of the motor.
[0080] Table 1 ∆K P Fuzzy rule table
[0081] Table 2 ∆K i Fuzzy rule table
[0082] Table 3 Comparison of forward continuous acceleration and load reduction performance
[0083] Table 4 Comparison of forward continuous deceleration and load increase and decrease performance
[0084] Table 5 Comparison of reverse continuous acceleration and load reduction performance
[0085] Table 6 Comparison of reverse continuous deceleration and load reduction performance
[0086] The above description is only a preferred embodiment of the present invention and does not limit the scope of the invention. All equivalent structural transformations made by using the contents of the present invention description and drawings under the inventive concept of the present invention, or direct / indirect application in other related technical fields are included in the protection scope of the present invention.
Claims
1. A multi-operating-state fuzzy PI controller and variable-parameter integral separation system for a permanent magnet synchronous motor, characterized in that: The system includes: PI controller: used to receive the speed error and output the current loop i q The target value, its proportional coefficient K p and integral coefficient K i It is obtained by adding the initial parameters and the compensation value of the fuzzy controller; Improved fuzzy controller: adopts a two-level structure, with the inputs being the speed error e and the speed error change rate e c , after quantization factor K e , K ec Mapping to the fuzzy domain yields E, E c , after reasoning with the improved fuzzy rule table, the fuzzy output value y is obtained p 、y i , through the scaling factor K up , K ui Map to the actual domain and output the compensation value ∆K of the PI controller parameter p , ∆K i ,The fuzzy rule table is applicable to forward and reverse rotation, ,acceleration and deceleration, and load addition and subtraction, and the number of ,rules is simplified; Adaptive integral separation mechanism: The integral separation moment Speed_Ki is calculated based on the target speed. Integral separation is performed when the speed error e is greater than Speed_Ki. Integral accumulation is performed when the speed error e is less than Speed_Ki. Integral separation is not performed when the load increases or decreases suddenly.
2. The system according to claim 1, wherein: In the improved fuzzy controller, The domain of input E is [-10,10], and the output ∆K p The domain is [-1,1], and 7 fuzzy sets {NB, NM, NS, ZO, PS, PM, PB} are defined, representing {negative large, negative medium, negative small, zero, positive small, positive medium, positive large}; Enter E c The domain is [0,10], and the output is ∆K i The domain of discourse is [-3.333, 13.333], and four fuzzy sets {ZO, PS, PM, PB} are defined, representing {zero, positive small, positive middle, positive large}.
3. The system according to claim 1, wherein: The improved fuzzy controller adopts a triangular membership function, the fuzzy reasoning follows the Mamdani method, and the center of gravity method is used to convert the fuzzy quantity into an accurate quantity. The calculation formula is: ; Among them, y(i) is the fuzzy quantity of the inference output, y m is the weight of each group of elements.
4. The system according to claim 1, wherein: The fuzzy rule table is formulated based on the motor kinematics formula, the speed error E and the error change rate E under different working conditions. c The evolution characteristics of K under different working conditions p , K i Compensation direction and amplitude: Among them, T e is the electromagnetic torque; T L is the load torque; J is the moment of inertia of the motor rotor; B is the damping coefficient; ω m is the rotor mechanical angular velocity; The left side of the equation is the moment of inertia term, which represents the torque required for the motor to generate angular acceleration; the right side is the electromagnetic torque, viscous damping torque, and load torque, which correspond to the driving force, speed-dependent resistance, and external load resistance, respectively. Among them, the viscous damping and load torque are always opposite to the direction of the speed, weakening the motor's acceleration ability when accelerating or adding load, and intensifying the system's deceleration trend when decelerating or reducing load, forming a "natural deceleration" effect; according to the error e and the error change rate e under various working conditions c Based on the changing trend of the working conditions, corresponding rules are formulated for different working conditions, and similar rules are integrated to simplify the rule table and membership function structure to improve the operation efficiency. The solution is as follows: 1) For E and E under typical working conditions c The changing trends are summarized as follows: ① Acceleration stage: the target speed is greater than the actual speed, E<0 and gradually approaches 0; when the speed changes suddenly |E c | increases rapidly and then gradually converges to 0; ②Deceleration stage: the target speed is less than the actual speed, E>0 and gradually approaches 0; |E c | also increases rapidly and then gradually converges to 0; ③Sudden load increase stage: the load increases and the speed decreases, E>0, E c It fluctuates first and then converges to 0; ④Sudden load reduction stage: Load increase causes speed to rise, E<0, E c Similarly, it fluctuates first and then converges to 0; The above principle is only applicable to E and E under the forward rotation condition of the motor. c When the motor is in reverse state, these changing trends are opposite to those in forward rotation. c The opposite of the reversal; 2) Based on the motor kinematics formula and E and E under different working conditions c The changing trend of p , K i Compensation strategy: ① Acceleration and load conditions: When the speed error E is large, increase K p Improve system response speed and maintain K i As the initial value, suppress the excessive accumulation of the integral term; as E decreases, K p Maintain the initial value to avoid overshoot and increase K i Eliminate static errors; ②Deceleration and load reduction conditions: In this stage, E is a negative value, and the controller outputs i q The target value is also negative, which causes the electromagnetic torque to reverse. The presence of viscous damping and load torque will cause the motor to decelerate. To prevent excessive speed drop, when |E| is large, K is greatly reduced. p Avoid excessive deceleration caused by sudden current changes and keep K i To prevent the integral term from accumulating suddenly, use the initial value. When |E| is small, reduce K slightly. p To prevent overshoot, increase K i Eliminate static errors; 3) The change trend of E is the same when accelerating and adding load, K p , K i If the gain change trend of acceleration and load addition is similar, the same fuzzy rule is used for acceleration and load addition; the same is true for deceleration and load reduction; the E of acceleration and deceleration, load addition and load reduction is the same. c They are opposite numbers to each other, so Ec is uniformly treated as |Ec|, and the type of working condition can be determined by combining the sign of E; accordingly, E in the fuzzy rule table can be omitted. c The negative value of E reduces the number of rules from 49 to 28. When the motor is reversed, E is inverted and mapped to the corresponding rule to achieve full working condition adaptation. Based on the above analysis, combined with the K p , K i Based on the compensation requirements, a fuzzy rule table applicable to all working conditions is constructed, and the membership function is adjusted.
5. The system according to claim 1, wherein: In the adaptive integral separation mechanism, the calculation formula of the integral separation time Speed_Ki is: ; Where speed is the current speed, speed_ref is the target speed, and speed_max is the maximum range of speed adjustment.
6. A multi-operating-state fuzzy PI controller for a permanent magnet synchronous motor and a variable parameter integral separation method, based on the system according to any one of claims 1 to 5, characterized in that: The method comprises the following steps: S1, obtain the motor speed in real time, determine the forward and reverse rotation of the motor, and calculate the speed error e and the speed error change rate e c ; S2, the speed error e and the quantization factor K e Multiplication, speed error change rate e c and quantization factor K ec Multiply them to get the input E and E of the fuzzy controller c , when the motor reverses, reverse E; S3, based on the fuzzy rule table applicable to all working conditions, calculates the fuzzy output value y through fuzzy reasoning p 、y i ,y p 、y i and the scaling factor K up , K ui After multiplication, we get the proportional coefficient K p Compensation value ∆K p , integral term coefficient K i Compensation value ∆K i ; S4, the compensation value ∆K p , ∆K i and the initial parameter K of the PI controller p0 , K i0 Add them together to get the proportional term coefficient K p , integral term coefficient K i ; S5, calculating the integral separation time Speed_Ki according to the target speed, and separating or accumulating the integral term; S6, calculate the output value of the PI controller, which is the current loop i q The target value is set, and the output value is limited according to the motor operating conditions to complete the motor speed control.
7. The method according to claim 6, characterized in that In step S1, the speed error change rate e c The calculation formula is: ; Where e(k) is the speed error at the current moment, e(k-1) is the speed error at the previous moment, T=t k −t k−1 is the sampling time interval.
8. The method according to claim 6, characterized in that In step S2, the quantization factor K e , K ec The calculation formula is: ; Among them, the basic domain of e is [-x e ,x e ], the fuzzy domain is [-m,m]; e c The basic domain is [-x ec ,x ec ], the fuzzy domain is [-n,n].
9. The method according to claim 6, characterized in that In step S5, when the speed error e is greater than the integral separation moment Speed_Ki, integral separation is performed, and when the speed error e is less than Speed_Ki, integral accumulation is performed; When the load increases or decreases suddenly, no integral separation is performed, so that the integral term is fully accumulated to eliminate load interference.
10. The method according to claim 6, characterized in that The method further includes step S7, verifying controller performance through simulation, using overshoot and settling time as evaluation indicators, comparing a traditional PI controller with a traditional fuzzy PI controller, and verifying the stability and response speed of the controller under forward and reverse continuous acceleration and deceleration and load addition and subtraction conditions; The calculation formula for overshoot in the acceleration stage and the load stage is: ; The calculation formula for overshoot during the deceleration stage and the load reduction stage is: ; Adjustment time calculation formula: ; Among them, σ up and σ down are the overshoot in the acceleration and deceleration stages respectively; max / min is the maximum / minimum speed of this stage; r is the steady-state speed in this stage; high The maximum steady-state speed to which the vehicle can accelerate before deceleration and load reduction; T setting is the adjustment time; T r is the time to reach steady state, T step It is the time node of sudden change of working condition.