An improved sliding mode control method for permanent magnet synchronous motor based on fuzzy observer
Patent Information
- Application Number
- CN202611159074.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-09-15
Smart Images

Figure CN122764050A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motor control technology, and specifically to an improved sliding mode control method for permanent magnet synchronous motors based on fuzzy observers. Background Technology
[0002] Permanent Magnet Synchronous Motor (PMSM): PMSMs utilize permanent magnets to generate magnetic fields, resulting in higher efficiency and power density. Their structure consists of a stator and a rotor. The stator comprises a stator core and stator windings; the rotor, mainly composed of permanent magnets, a yoke, and a shaft, is the key component for energy conversion in PMSMs. They are characterized by nonlinearity, strong coupling, and multiple variables.
[0003] Traditional integral sliding mode control suffers from a fixed integral gain, leading to a trade-off between steady-state accuracy and transient performance, and is prone to overshoot and integral saturation. Furthermore, conventional observers are highly model-dependent, exhibiting low accuracy in observing nonlinear and time-varying disturbances, and are susceptible to observation chattering or peaking phenomena. Moreover, the independent design of the observer and controller results in poor compensation for mismatched disturbances and insufficient overall system robustness. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention aims to provide an improved sliding mode control method for permanent magnet synchronous motors based on fuzzy observers.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: An improved sliding mode control method for permanent magnet synchronous motors based on fuzzy observers includes the following steps: S1. Construct a backstepping integral sliding mode controller: S1.1 Establishing a mathematical model of the permanent magnet synchronous motor (PMSM) in the dq coordinate system: ; Among them, u d and u q These are the d-axis and q-axis components of the stator voltage; i d and i q The d-axis and q-axis components represent the stator current; R is the stator resistance; L represents the synchronous inductance along the d-axis and q-axis; ω e It is the electric angular velocity; ψ f It is the rotor flux linkage; p is the number of pole pairs of the motor; B is the coefficient of viscous friction; T e It is electromagnetic torque, T L J is the load torque; J is the moment of inertia; ω is the mechanical angular velocity, and ω = ω / ω. p*ω e , It is the differential of the mechanical angular velocity with respect to time; Using i dIn vector control mode with ω = 0, and selecting the motor's angular displacement θ and mechanical angular velocity ω as state variables, the system state equation is: ; Further Represented as: ; Among them, ΔJ, Δψ f、 ΔB, ΔT L These are the parameter deviations of rotational inertia, rotor flux linkage, viscous friction coefficient, and load torque, respectively, d ' This refers to the system's uncertain lumped disturbance value, including load torque. Define x1=θ, x2=ω, u=i q , , , The simplified state-space equation is: ; S1.2, The improved exponential reaching law expression is defined as follows: ; s represents the sliding surface function. The coefficients of change of the sliding surface are represented by γ and η, which are proportionality constants greater than 0. S1.3, Define the motor position tracking error as follows: e θ =θ-θ r; Where θ is the angular displacement of the motor, θ r The position target of the motor is a given value and is twice differentiable, for e θ Differentiating, we get: ; Where, ω r It is the given value of the mechanical angular velocity of the motor, where ω is the actual mechanical angular velocity of the motor; S1.4 Treating the mechanical angular velocity of the motor as a control dummy variable, and adding an integral term to the stable function, the resulting stable function is as follows: ; Where c1 and λ1 are constants greater than 0, the integration interval is from time 0 to time t, and the error e is defined. ω The error between the virtual angular velocity and the actual angular velocity is expressed by the following formula: ; For e ω Differentiating, we get: ; S1.5 Construct a Lyapunov function as follows: ; The sliding surface function is as follows: ; If k > 0, select another Lyapunov function as follows: ; Taking the derivative with respect to V2, we get: ; ; The expression for the integral backstepping sliding mode controller is obtained as follows: ; Where γ and η are both constants greater than 0; S2. Constructing a fuzzy observer: S2.1 Expand the lumped disturbance term d in the system's state equation as follows: ; The lumped disturbance value includes disturbances from load torque, external disturbances, and changes in model parameters. To ensure the observation performance of the fuzzy observer, the following assumptions are made: Assuming the state vector x belongs to Mx, where Mx is a compact set, the optimal parameter vector β of the integral-stepping sliding mode controller... * Located in convex set M β middle, m β The parameters to be designed are: The optimal control vector of the integral backstepping sliding mode controller is: ; Establish a fuzzy observer model for the permanent magnet synchronous motor system. ; Where λ is the observation error convergence parameter, and satisfies λ>0. Let z be the adjustable parameter vector of the integral backstepping sliding mode controller, z be the state vector of the fuzzy observer, and define the disturbance error as σ = x² - Z. Then the dynamic disturbance equation of the system is: ; All disturbance values in the system are represented using an integral backstepping sliding mode controller and a reconstruction error term. The expression for the disturbance value is as follows: ; Where ε(x,u) is the reconstruction error of the fuzzy observer, ε * This is the upper bound of the reconstruction error; The dynamic equation for the disturbance observation error can then be further expressed as: ; in for The approximation error. Selection. The approximation adaptive law is: ; To ensure that the output of the fuzzy observer is 0 when d(x,u)=0, the following must be satisfied: For a given continuous function, its fuzzy logic optimal parameter vector β * It is unique and constant; based on this, by differentiating the approximation error expression of the adjustable parameter vector, we can derive... ; S3. Record the observations of the fuzzy observer as... Combining the integral backstepping sliding mode controller constructed in step S1, the improved sliding mode control system based on the fuzzy observer is obtained as follows: ; The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0006] The present invention also provides a permanent magnet synchronous motor, including a processor and a memory, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the above-described method.
[0007] The beneficial effects of this invention are as follows: 1. In this invention, the observer fuzzy parameter tuning rules and the sliding mode controller adaptive gain adjustment rules share the same set of error evaluation fuzzy logic. The system tracking error and error change rate are used as common input quantities. The change in the observer's disturbance observation accuracy can be linked to correct the controller's control parameters in real time. This can solve the problem of poor coordination caused by the independent design of the observer and controller, parameter mismatch, and inconsistent dynamic pace.
[0008] 2. For matched disturbances, this invention uses the inherent robustness of sliding mode control to suppress them in a closed loop; for unmatched disturbances in permanent magnet synchronous motors (such as d / q axis cross-coupling disturbances and non-modeled nonlinear disturbances), it relies on a fuzzy observer to extract the disturbance components with high precision, and then maps them to the control channel through backstepping to complete feedforward compensation, thus making up for the weakness of the traditional scheme in unmatched disturbance compensation capability.
[0009] 3. Through integrated observation-control disturbance compensation, the system can maintain stable and high-precision operation under complex conditions such as load changes, parameter drift, and external interference. This invention comprehensively improves the anti-interference robustness and steady-state control accuracy of the permanent magnet synchronous motor speed control system, meeting the stringent engineering application requirements of industrial scenarios. Attached Figure Description
[0010] Figure 1 This is a schematic diagram of the principle of the method in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the backstepping integral sliding mode controller in Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of the fuzzy observer in Embodiment 1 of the present invention; Figure 4 This is a step response curve diagram of the IBSSMC and PID controller in Embodiment 2 of the present invention; Figure 5 The time-varying load curve obtained in Embodiment 2 of the present invention; Figure 6 This is a simulation result of the sinusoidal given signal position tracking obtained in Embodiment 2 of the present invention; Figure 7 This is a simulation result of the given sinusoidal signal position tracking obtained in Embodiment 2 of the present invention; Figure 8 This is a step response curve obtained in Embodiment 2 of the present invention; Figure 9 This is a comparison chart of the position tracking experiments of the three controllers with a 50mm amplitude sine wave given signal obtained in Embodiment 2 of the present invention; Figure 10 This is a comparative experiment on the position tracking of a given 100mm sine wave signal by the three controllers obtained in Embodiment 2 of the present invention. Detailed Implementation
[0011] The present invention will be further described below with reference to the accompanying drawings. It should be noted that this embodiment is based on the present technical solution and provides detailed implementation methods and specific operation processes, but the protection scope of the present invention is not limited to this embodiment.
[0012] Example 1 This embodiment provides an improved sliding mode control method for permanent magnet synchronous motors based on a fuzzy observer, such as... Figure 1 As shown, it includes the following steps: S1. Construct an inverse integral sliding mode controller (IBSSMC), such as Figure 2 As shown: S1.1 Establishing a mathematical model of the permanent magnet synchronous motor (PMSM) in the dq coordinate system: ; Among them, u d and u q These are the d-axis and q-axis components of the stator voltage; i d and i q The d-axis and q-axis components represent the stator current; R is the stator resistance; L represents the synchronous inductance along the d-axis and q-axis; ω e ω is the electric angular velocity; ω is the mechanical angular velocity, and ω = ω / ω. p*ω e , It is the differential of the mechanical angular velocity with respect to time; t is time, ψ f It is the rotor flux linkage; p is the number of pole pairs of the motor; B is the coefficient of viscous friction; T e It is electromagnetic torque, T L J is the load torque; J is the moment of inertia.
[0013] To reduce coupling between currents, this embodiment uses i d In vector control mode with ω = 0, and selecting the motor's angular displacement θ and mechanical angular velocity ω as state variables, the system state equation is: ; This is the differential of angular displacement with respect to time. Due to the uncertainty of motor parameters, it is easily affected by external disturbances and parameter changes during operation. Therefore, further... Represented as: ; Among them, ΔJ, Δψ f、 ΔB, ΔT L These are the parameter deviations of rotational inertia, rotor flux linkage, viscous friction coefficient, and load torque, respectively, d ' This represents the system's uncertain lumped disturbance value, including load torque.
[0014] For ease of expression, we define x1=θ, x2=ω, u=i q , , , The simplified state-space equation is: ; S1.2. Since the sign function causes abrupt changes in value when switching between left and right sides of the sliding surface s(x)=0, its smoothness is insufficient, which aggravates the chattering phenomenon of the system. Therefore, in this embodiment, the hyperbolic tangent function tanh(s) is used to replace the sign function sgn(s), thereby obtaining the improved exponential reaching law expression as follows: ; s represents the sliding surface function. The variable represents the rate of change of the sliding surface, where γ and η are proportionality constants greater than 0.
[0015] S1.3, Define the motor position tracking error as follows: e θ =θ-θ r; Where θ is the angular displacement of the motor, θ r The position target of the motor is a given value and is twice differentiable, for e θ Differentiating, we get: ; Where, ω r It is the given value of the mechanical angular velocity of the motor, where ω is the actual mechanical angular velocity of the motor.
[0016] S1.4. Treating the mechanical angular velocity of the motor as a control dummy variable, in order to reduce the impact of system disturbances and uncertainties on tracking, and to enable the system to move more smoothly along the sliding surface after reaching it, thereby reducing chattering, in this embodiment, an integral term is added to the stability function, and the resulting stability function is as follows: ; Where c1 and λ1 are constants greater than 0, and the integration interval is from time 0 to time t. Since the system control quantity in this embodiment is not the mechanical angular velocity, the error e is defined. ω The error between the virtual angular velocity and the actual angular velocity is expressed by the following formula: ; For e ω Differentiating, we get: ; S1.5 Construct a Lyapunov function as follows: ; The sliding surface function is as follows: ; If k > 0, select another Lyapunov function as follows: ; Taking the derivative with respect to V2, we get: ; ; The expression for the backstepping sliding mode controller is as follows: ; Where γ and η are both constants greater than 0.
[0017] The stability of the aforementioned backstepping integral sliding mode controller is analyzed below.
[0018] To ensure the asymptotic stability of the system, it is necessary to ensure First select ,but ; The above equation can be reconstructed ; in, ; P is a matrix as follows: ; To ensure Then P must be a real symmetric matrix, satisfying the following condition. ; Therefore, it can be concluded that by selecting appropriate values for γ, c1, k, and η, it is possible to ensure... That is, the integral backstepping sliding mode controller constructed in this embodiment is asymptotically stable.
[0019] S2. Construct a fuzzy observer (FDO), such as Figure 3 As shown: S2.1 Expand the lumped disturbance term d in the system's state equation as follows: ; The lumped disturbance value includes disturbances from load torque, external disturbances, and changes in model parameters. To ensure the observation performance of the fuzzy observer, the following assumptions are made: Assuming the state vector x belongs to Mx, where Mx is a compact set, the optimal parameter vector β of the integral-stepping sliding mode controller... * Located in convex set M β middle, m β The parameters to be designed are: The optimal control vector for the integral backstepping sliding mode controller is: ; The fuzzy observer for the permanent magnet synchronous motor system is established as follows: ; Where λ is the observation error convergence parameter, and satisfies λ>0. Let z be the adjustable parameter vector of the integral backstepping sliding mode controller, z be the state vector of the fuzzy observer, and define the disturbance error as σ = x² - Z. Then the dynamic disturbance equation of the system is: ; The condition for a fuzzy observer to accurately observe system disturbances is that the disturbance error converges to zero. This embodiment uses an integral backstepping sliding mode controller and a reconstruction error term to represent all disturbance values in the system. The expression for the disturbance value is: ; Where ε(x,u) is the reconstruction error of the fuzzy observer, ε * To increase the upper bound of the reconstruction error, the number of IF-THEN fuzzy rules can be increased, which can reduce the upper limit of the reconstruction error and improve the approximation accuracy of the integral backstepping sliding mode controller.
[0020] The dynamic equation for the disturbance observation error can then be further expressed as: ; in for The approximation error. Selection. The approximation adaptive law is: ; To ensure that the output of the fuzzy observer is 0 when d(x,u)=0, the following must be satisfied: For a given continuous function, its fuzzy logic optimal parameter vector β * It is unique and constant. Based on this, by differentiating the approximation error expression of the adjustable parameter vector, we can derive... .
[0021] The stability analysis of the constructed fuzzy observer is as follows: Define Lyapunov functions ; Differentiation yields ; when hour, , If the observation error of the fuzzy observer is bounded, then the fuzzy observer can accurately observe disturbances inside and outside the system.
[0022] S3. Record the observations of the fuzzy observer as... Combining the integral backstepping sliding mode controller constructed in step S1, the improved sliding mode control system based on the fuzzy observer is obtained as follows: .
[0023] Example 2 This embodiment aims to verify the performance of the method described in Embodiment 1 through simulation experiments.
[0024] 1. Simulation data MATLAB simulation models based on the IBSSMC controller and the PID controller were built respectively, and the control effect of the IBSSMC controller was compared.
[0025] Given a step signal θ r =40rad, motor starts under no-load, PID controller parameters are: position loop control parameter k pp =150, k pi =0.4, speed loop control parameter k vp =150, k pi =0.4; the parameters of the IBSSMC controller are k=20, c=1500, λ1=5000, γ=20, η=14000, τ=0.001. The step response curves of the IBSSMC and PID controllers obtained through simulation are as follows: Figure 4 As shown.
[0026] Given a sinusoidal signal No-load start-up. To verify the system's disturbance rejection capability, a time-varying load was added to the system, and the time-varying load curve is shown below. Figure 5 As shown. Simulation results are as follows. Figure 6 As shown.
[0027] It can be seen that the IBSSMC controller has higher control accuracy than the PID controller. When the load changes, the PID controller is less affected, but its control accuracy error is larger. The IBSSMC controller has strong disturbance rejection capability when facing load torque changes of 0.1 N*m and 0.15 N*m, but when the load torque suddenly changes to 0.2 N*m, the system cannot perform high-precision error-free tracking, and the tracking error increases significantly.
[0028] Furthermore, a feedforward-compensated fuzzy observer was added to the IBSSMC controller, and a sinusoidal signal tracking simulation was performed again for comparison. The parameters of the fuzzy observer were as follows: Input language variables The membership function is chosen as follows: ; The results are as follows Figure 7 As shown.
[0029] The tracking error of the IBSSMC+FDO control for the sinusoidal signal is 0. When faced with load disturbances, regardless of the load size, the resulting disturbance is approximately zero. The only error during the entire tracking process is 0.024 rad at startup.
[0030] Therefore, it can be seen that IBSSMC+FDO control can not only achieve error-free high-precision tracking, but also reduce system chattering while having a faster response speed.
[0031] 2. Experimental Comparison Data Permanent magnet synchronous motors (PMSMs) boast high efficiency, high power density, and superior control performance. Relying on permanent magnet excitation, they eliminate the need for additional electrical energy to generate the rotor magnetic field, achieving higher efficiency and lower energy consumption than traditional motors. Furthermore, their compact structure and light weight allow them to output high torque at low speeds. Combined with advanced vector control algorithms, they achieve precise and smooth dynamic responses, making them an ideal choice for high-performance drive applications.
[0032] DSP microprocessors are designed for efficient signal processing. Their Harvard architecture and dedicated hardware multipliers enable multiplication and accumulation operations to be completed within a single instruction cycle, significantly improving computational speed.12 They possess powerful real-time processing capabilities, enabling low-latency, highly parallel data operations to ensure timely processing of continuous signals such as audio and video. Furthermore, DSPs offer high flexibility and programmability, adapting to the needs of various application scenarios, while also exhibiting excellent power consumption control, making them ideal for embedded systems.
[0033] A TMSF28335 DSP was selected as the microprocessor for the sliding mode algorithm, and a permanent magnet synchronous motor was used as the actuator to build the improved sliding mode control system based on a fuzzy observer obtained in Example 1. The improved sliding mode control system based on the fuzzy observer was written into the DSP. The DSP can directly control the torque of the AC servo motor, i.e., control the current iq of the AC servo motor, through the torque control mode of the PWM-to-analog circuit and the driver. The feedback is provided by the high-precision photoelectric encoder built into the motor. Orthogonal counting is performed through the Eqep module of the DSP, and the position and speed of the motor can be obtained by periodically querying the counter value.
[0034] Comparative experiments were conducted on the control system using traditional PID control and the improved sliding mode control system based on a fuzzy observer as described in Example 1. Given a step signal amplitude of 100 mm, under no-load conditions, the control effects of the two control systems were compared. Figure 8 As shown.
[0035] The improved sliding mode control system of IBSSMC+FDO obtained in Example 1 has higher control accuracy and faster response speed.
[0036] A sinusoidal signal with a given frequency of 0.1Hz and 0.2Hz and an amplitude of 50mm was used. To verify the tracking performance of the improved sliding mode control system, comparative experiments were conducted using a PID controller, an IBSSMC controller, and the improved sliding mode control system based on a fuzzy observer (IBSSMC+FDO control system) from Example 1. The amplitude was then changed to 100mm, and comparative experiments were performed again with given frequencies of 0.1Hz and 0.2Hz. The response curves and error curves for the comparative experiments with different given amplitudes at different given frequencies were obtained, as shown below. Figure 9 As shown.
[0037] Compared to PID control, IBSSMC reduces tracking control error to some extent. However, in actual system experiments, due to internal and external interference, it exhibits significant tracking errors, and the tracking performance is greatly affected by signal amplitude and frequency, resulting in control accuracy still failing to meet requirements. After adding an FDO (Frequency Decision Engine), its control accuracy is significantly improved. With a small given signal amplitude and low frequency, the control error is only 0.04 mm; as the frequency increases, the control error slightly rises. Furthermore, with a larger given signal amplitude, the control error also increases. Figure 10 As shown.
[0038] The maximum tracking error occurs in the region of speed reversal. Due to the change in speed direction, the direction of friction changes abruptly, causing a large error. However, because the FDO compensates for external disturbances, it can return to its original control accuracy in a relatively short time.
[0039] For those skilled in the art, various corresponding changes and modifications can be made based on the above technical solutions and concepts, and all such changes and modifications should be included within the protection scope of the claims of this invention.
Claims
1. An improved sliding mode control method for permanent magnet synchronous motors based on fuzzy observers, characterized in that, Includes the following steps: S1. Construct a backstepping integral sliding mode controller: S1.1 Establishing a mathematical model of the permanent magnet synchronous motor (PMSM) in the dq coordinate system: ; Among them, u d and u q These are the d-axis and q-axis components of the stator voltage; i d and i q The d-axis and q-axis components represent the stator current; R is the stator resistance; L represents the synchronous inductance along the d-axis and q-axis; ω e It is the electric angular velocity; ψ f It is the rotor flux linkage; p is the number of pole pairs of the motor; B is the coefficient of viscous friction; T e It is electromagnetic torque, T L J is the load torque; J is the moment of inertia; ω is the mechanical angular velocity, and satisfies ω=p*ω e , It is the differential of the mechanical angular velocity with respect to time; Adopting i d =0 vector control mode, and selecting the angular displacement θ of the motor and the mechanical angular velocity ω of the motor as state variables, the system state equation is: ; Further Represented as: ; wherein, ΔJ, Δψ f、 ΔB, ΔT L are respectively the parameter deviations of the moment of inertia, the rotor flux, the viscous friction coefficient, the load torque, d ' is the system uncertain collective disturbance value including the load torque. Define x1=θ, x2=ω, u=i q , , , The simplified state-space equation is: ; S1.2, The improved exponential reaching law expression is defined as follows: ; s represents the sliding surface function. The coefficients of change of the sliding surface are represented by γ and η, which are proportionality constants greater than 0. S1.3, Define the motor position tracking error as follows: e θ = θ - θ r; where θ is the angular displacement of the motor, θ r is the position target given value of the motor and is twice differentiable, and θ deriving e ; Where, ω r It is the given value of the mechanical angular velocity of the motor, where ω is the actual mechanical angular velocity of the motor; S1.4 Treating the mechanical angular velocity of the motor as a control dummy variable, and adding an integral term to the stable function, the resulting stable function is as follows: ; Where c1 and λ1 are constants greater than 0, the integration interval is from time 0 to time t, and the error e is defined. ω The error between the virtual angular velocity and the actual angular velocity is expressed by the following formula: ; For e ω Differentiating, we get: ; S1.5 Construct a Lyapunov function as follows: ; The sliding surface function is as follows: ; If k>0, choose another Lyapunov function as follows: ; Taking the derivative with respect to V2, we get: ; ; The expression for the integral backstepping sliding mode controller is obtained as follows: ; Where γ and η are both constants greater than 0; S2. Construct a fuzzy observer: S2.1 Expand the lumped disturbance term d in the system's state equation as follows: ; The lumped disturbance value includes disturbances from load torque, external disturbances, and changes in model parameters. To ensure the observation performance of the fuzzy observer, the following assumptions are made: Assuming the state vector x belongs to Mx, where Mx is a compact set, the optimal parameter vector β of the integral-stepping sliding mode controller... * Located in convex set M β middle, m β The parameters to be designed are: The optimal control vector of the integral backstepping sliding mode controller is: ; Establish a fuzzy observer model for the permanent magnet synchronous motor system. ; Where λ is the observation error convergence parameter, and satisfies λ>0. Let z be the adjustable parameter vector of the integral backstepping sliding mode controller, z be the state vector of the fuzzy observer, and define the disturbance error as σ = x² - Z. Then the dynamic disturbance equation of the system is: ; All disturbance values in the system are represented using an integral backstepping sliding mode controller and a reconstruction error term. The expression for the disturbance value is as follows: ; Where ε(x,u) is the reconstruction error of the fuzzy observer, ε * This is the upper bound of the reconstruction error; The dynamic equation for the disturbance observation error can then be further expressed as: ; in for The approximation error. Selection. The approximation adaptive law is: ; To ensure that the output of the fuzzy observer is 0 when d(x,u)=0, the following must be satisfied: For a given continuous function, its fuzzy logic optimal parameter vector β * It is unique and constant; based on this, by differentiating the approximation error expression of the adjustable parameter vector, we can derive... ; S3. Record the observations of the fuzzy observer as... Combining the integral backstepping sliding mode controller constructed in step S1, the improved sliding mode control system based on the fuzzy observer is obtained as follows: 。 2. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of claim 1.
3. A permanent magnet synchronous motor, characterized in that, It includes a processor and a memory, the memory being used to store a computer program; the processor being used to execute the computer program to implement the method of claim 1.