A control method of permanent magnet synchronous motor full drive system based on optimal energy constraint and singular perturbation theory

By decoupling the permanent magnet synchronous motor system using singular perturbation theory and combining optimal energy control and active disturbance suppression, independent speed loop and current loop controllers are designed. This solves the problems of state constraints and coupling effects in existing technologies and achieves high-performance tracking and energy-optimized control effects.

CN122247291APending Publication Date: 2026-06-19GUANGDONG UNIV OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG UNIV OF TECH
Filing Date
2026-03-27
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing permanent magnet synchronous motor control systems do not consider state constraints, which poses a risk of system damage. They also have high algorithm complexity and limited engineering applicability, and do not fully consider the coupling effect between the current loop and the speed loop.

Method used

Based on singular perturbation theory, the permanent magnet synchronous motor system is decoupled into a slow subsystem and a fast subsystem. By combining optimal energy control and active disturbance suppression control, independent speed loop and current loop controllers are designed. The system disturbance is estimated using a nonlinear extended state observer, and the control input is optimized by the Pontryagin minimum principle.

Benefits of technology

It achieves high-performance tracking and optimal energy consumption under load disturbances, simplifies parameter selection, enhances system stability and robustness, and reduces control energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122247291A_ABST
    Figure CN122247291A_ABST
Patent Text Reader

Abstract

This invention discloses a control method for a permanent magnet synchronous motor (PMSM) all-drive system based on optimal energy constraints and singular perturbation theory. The method includes: decoupling the PSM system into a slow subsystem and a fast subsystem using singular perturbation theory based on the mathematical model of the PSM; constructing a controller based on the all-drive system method according to the dynamic equations of the slow subsystem, such that the closed-loop error dynamic equation of the speed loop has configurable poles; estimating the lumped disturbance of the system using a nonlinear extended state observer based on the state variables and desired trajectory of the slow subsystem; solving for the optimal reference trajectory of the speed loop based on the optimal energy constraint principle based on the estimated value of the lumped disturbance and the desired trajectory; generating control commands for the speed loop based on the optimal reference trajectory and the estimated value of the lumped disturbance; and designing a controller for the current loop to track the reference current corresponding to the control commands based on the control commands of the speed loop and the dynamic characteristics of the fast subsystem.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of permanent magnet synchronous motor control systems in industrial scenarios, and particularly relates to a control method for a permanent magnet synchronous motor all-drive system based on optimal energy constraints and singular perturbation theory. Background Technology

[0002] Existing document 1 proposes a model-free optimal speed tracking scheme for a permanent magnet synchronous motor servo control system. It decouples the fast and slow dynamics of the system through singular perturbation theory and proposes a reinforcement learning algorithm to design the optimal controller, ultimately achieving stable tracking of the speed loop. This technique has the following drawbacks: (1) It does not consider state constraints: it does not impose constraints on key state variables such as motor speed and current, posing a risk of system damage due to the breach of physical limits. (2) It has high complexity: the selection of reinforcement learning algorithm parameters relies on experience, lacks a systematic selection method, and its engineering practicality is limited.

[0003] Document 2 proposes a dual-loop compensated active disturbance suppression control method. The current loop is designed with an internal model control law based on state feedback theory. At the same time, in order to solve the disturbance compensation problem of the speed loop, an ADRC algorithm combining ESO and ACO algorithms is proposed, which finally realizes high-precision speed control of the servo system. This technology has the following technical defects: (1) Algorithm redundancy: It is necessary to run the ESO observer and the ACO algorithm at the same time, the system stability during the ACO parameter tuning process is not considered, and no initial parameter selection guidance principle is given, which is not conducive to engineering application. (2) Coupling relationship is not considered: The coupling effect between the current loop and the speed loop is not fully considered, and a disturbance cooperative compensation strategy is not designed.

[0004] To address the aforementioned shortcomings, a control scheme for permanent magnet synchronous motor control systems that is decoupled, anti-interference, and has a simple algorithm is needed for practical engineering applications. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention proposes a control method for a permanent magnet synchronous motor (PMSM) all-drive system based on optimal energy constraints and singular perturbation theory. This invention decouples fast and slow dynamics through singular perturbation theory, enabling independent design of the dual-loop circuits. Simultaneously, by combining optimal energy control and active disturbance suppression control, it ensures that the output speed and position, under disturbance conditions, simultaneously achieve optimal dynamic response characteristics and optimal input energy consumption. Furthermore, the all-drive system method used in this invention features simple parameter selection, which is beneficial for engineering applications.

[0006] To achieve the above objectives, this invention provides a control method for a permanent magnet synchronous motor all-drive system based on optimal energy constraints and singular perturbation theory, comprising: Based on the mathematical model of the permanent magnet synchronous motor, the motor system is decoupled into a slow subsystem and a fast subsystem using the singular perturbation theory. The slow subsystem corresponds to the velocity loop dynamics, and the fast subsystem corresponds to the current loop dynamics. Based on the dynamic equations of the slow subsystem, a controller based on the all-drive system method is constructed, so that the closed-loop error dynamic equation of the velocity loop has configurable poles. Based on the state variables and desired trajectory of the slow subsystem, the lumped disturbance of the system is estimated using a nonlinear extended state observer. Based on the estimated value of the lumped disturbance and the desired trajectory, the optimal reference trajectory of the velocity loop is solved according to the principle of optimal energy constraint. Based on the optimal reference trajectory and the estimated value of the lumped disturbance, the control command for the velocity loop is generated; Based on the control commands of the velocity loop and the dynamic characteristics of the fast subsystem, a controller for the current loop is designed to track the reference current corresponding to the control commands.

[0007] Optionally, the slow subsystem includes: ; in, For the mechanical angular acceleration of the motor, For system parameters, The mechanical angular velocity of the motor. For the speed loop control law, For load disturbance; The fast subsystem includes: ; in: For state variables on a fast time scale. This is a current loop control law. denoted as the current loop disturbance, and v as a fast time-scale variable.

[0008] Optionally, constructing a controller based on the all-drive system method according to the dynamic equations of the slow subsystem includes: Based on the second-order dynamic equation of the slow subsystem, the tracking error between the motor output position and output speed is defined as a state feedback variable. Based on the state feedback variables, a control law containing position error and velocity error feedback terms is designed, and the pole positions of the closed-loop error dynamic equation are configured by adjusting the feedback gain coefficient. According to the control law, the nonlinear terms and cross-coupling terms of the slow subsystem are canceled out to obtain the closed-loop error dynamic equation in linear time-invariant form.

[0009] Optionally, based on the state variables and desired trajectory of the slow subsystem, estimating the lumped disturbance of the system using a nonlinear extended state observer includes: The lumped disturbance is extended into a new state variable, which together with the motor output position and output speed constitutes an extended state vector. Based on the extended state vector, an observer update law containing a nonlinear function fal is designed, wherein the fal function adaptively switches between the linear interval and the nonlinear interval according to the magnitude of the observation error; The value of the lumped disturbance is estimated in real time according to the observer update law, and the lumped disturbance includes load torque changes and unmodeled dynamics.

[0010] Optionally, based on the estimated value of the lumped disturbance and the desired trajectory, solving for the optimal reference trajectory of the velocity loop according to the principle of optimal energy constraint includes: Based on the state equation of the slow subsystem, a cost function is constructed with tracking error and control energy as performance indicators; Based on the Pontryagin minimum principle, a Hamiltonian function containing costate variables is established; Based on the minimum condition of the Hamiltonian function with respect to the control variables, and in conjunction with the solution of the two-point boundary value problem, the optimal state trajectory and the optimal co-state trajectory that minimize the cost function are obtained. Based on the optimal state trajectory, extract the optimal reference velocity and optimal reference position of the velocity loop; The optimal reference trajectory is obtained based on the optimal reference speed and optimal reference position.

[0011] Optionally, generating the control command for the velocity loop based on the optimal reference trajectory and the estimated value of the lumped disturbance includes: Based on the deviation between the optimal reference position and the actual position of the motor, and the deviation between the optimal reference speed and the actual speed of the motor, a feedback correction term is calculated; The feedforward compensation term is calculated based on the second derivative of the optimal reference trajectory, the damping coefficient of the slow subsystem, and the optimal reference velocity. Calculate the disturbance compensation term based on the estimated value of the lumped disturbance; The control command for the speed loop is generated based on the linear combination of the feedback correction term, the feedforward compensation term, and the disturbance compensation term.

[0012] Optionally, based on the control commands of the velocity loop and the dynamic characteristics of the fast subsystem, designing a controller for the current loop to track the reference current corresponding to the control commands includes: Based on the boundary layer model of the tachyon system, the time-scale characteristics of the current loop are determined; Based on the time scale characteristics, a full-drive system controller for the current loop is designed to enable the q-axis current to quickly track the reference current generated by the velocity loop. Based on the bandwidth requirements of the current loop, configure the gain parameters of the current loop controller to ensure that the response speed of the current loop is much higher than that of the speed loop.

[0013] Compared with the prior art, the present invention has the following advantages and technical effects: 1. Existing PID control cannot meet the requirements of high-performance tracking, sliding mode control suffers from high-frequency chattering, and model predictive control has problems such as complex design and difficult parameter tuning. This invention decomposes the mathematical model of a permanent magnet synchronous motor into fast and slow dynamic equations with different time scales by introducing singular perturbation theory. Based on the all-drive system method, controllers are designed for the slow speed loop subsystem and the fast current loop subsystem, respectively. The closed-loop poles of the obtained subsystem error dynamic equations can be arbitrarily assigned, making it easy to implement in engineering.

[0014] 2. Achieving Strong Robustness and Energy Optimization in Control Systems: Existing high-performance control methods typically sacrifice energy or increase control energy consumption to achieve tracking performance, lacking a systematic consideration of energy optimization in the control process. Furthermore, most methods are insufficiently robust to uncertainties such as load disturbances and parameter changes. This invention aims to combine a nonlinear extended state observer with the Pontryagin minimum principle to solve for the energy-optimal reference trajectory and control law while satisfying dynamic constraints. This achieves high-performance tracking while effectively reducing control energy consumption and enhancing system stability. Attached Figure Description

[0015] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a structural diagram of the permanent magnet synchronous motor control system according to an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the step response speed tracking performance of an embodiment of the present invention; Figure 3 This is a schematic diagram of the step response current tracking performance of an embodiment of the present invention; Figure 4 This is a schematic diagram of the speed tracking performance under sudden load changes according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the current tracking error performance under load sudden change according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the sinusoidal response speed tracking performance of an embodiment of the present invention; Figure 7 This is a schematic diagram of the sinusoidal response position tracking performance of an embodiment of the present invention; Figure 8 This is a flowchart of a control method for a permanent magnet synchronous motor all-drive system based on optimal energy constraints and singular perturbation theory, according to an embodiment of the present invention. Detailed Implementation

[0016] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0017] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0018] This embodiment proposes a control method for a permanent magnet synchronous motor all-drive system based on optimal energy constraints and singular perturbation theory, such as... Figure 8 As shown, the specific steps include: Based on the mathematical model of the permanent magnet synchronous motor, the motor system is decoupled into a slow subsystem and a fast subsystem using the singular perturbation theory. The slow subsystem corresponds to the velocity loop dynamics, and the fast subsystem corresponds to the current loop dynamics. Based on the dynamic equations of the slow subsystem, a controller based on the all-drive system method is constructed, so that the closed-loop error dynamic equation of the velocity loop has configurable poles. Based on the state variables and desired trajectory of the slow subsystem, the lumped disturbance of the system is estimated using a nonlinear extended state observer. Based on the estimated value of the lumped disturbance and the desired trajectory, the optimal reference trajectory of the velocity loop is solved according to the principle of optimal energy constraint. Based on the optimal reference trajectory and the estimated value of the lumped disturbance, the control command for the velocity loop is generated; Based on the control commands of the velocity loop and the dynamic characteristics of the fast subsystem, a controller for the current loop is designed to track the reference current corresponding to the control commands.

[0019] Specifically, the mathematical model for a label-type permanent magnet synchronous motor can be expressed as follows: ; in For mechanical angular velocity, For rotational inertia, For load torque, The coefficient of viscous friction is... and These are the dq-axis components of the stator voltage and current, respectively; Represents the resistance of the stator; This represents the magnetokinetic potential generated by the permanent magnets on the rotor; These are the inductances of the d and q axes, respectively; It is an extremely high quantity.

[0020] Assumption , ,and In this case, formula (1) simplifies to: ; definition and will Treat it as a slow variable. Treated as fast variables. System (2) can be rewritten as: ; in For singular perturbation parameters, For load disturbance. We define ,when In this case, the second line of system (3) can be written as: ; Substituting equation (4) into equation (3) yields the quasi-steady-state model of the original system: ; Solve from formula (5) Substituting into formula (5), we can obtain: ; On a slow time scale, the current can be considered to reach the command value instantaneously. Let... The slow subsystem model can be obtained as follows: ; in and .definition Since the rotational speed is a slow variable, this embodiment can assume that there is always a current loop. Therefore, the boundary layer model of PMSM is expressed as: ; Furthermore, based on the dynamic equations of the slow subsystem, constructing a controller based on the all-drive system method includes: Based on the second-order dynamic equation of the slow subsystem, the tracking error between the motor output position and output speed is defined as a state feedback variable. Based on the state feedback variables, a control law containing position error and velocity error feedback terms is designed, and the pole positions of the closed-loop error dynamic equation are configured by adjusting the feedback gain coefficient. According to the control law, the nonlinear terms and cross-coupling terms of the slow subsystem are canceled out to obtain the closed-loop error dynamic equation in linear time-invariant form.

[0021] Furthermore, based on the state variables and desired trajectory of the slow subsystem, the lumped disturbance of the system is estimated using a nonlinear extended state observer, including: The lumped disturbance is extended into a new state variable, which together with the motor output position and output speed constitutes an extended state vector. Based on the extended state vector, an observer update law containing a nonlinear function fal is designed, wherein the fal function adaptively switches between the linear interval and the nonlinear interval according to the magnitude of the observation error; The value of the lumped disturbance is estimated in real time according to the observer update law, and the lumped disturbance includes load torque changes and unmodeled dynamics.

[0022] Furthermore, based on the estimated value of the lumped disturbance and the desired trajectory, the optimal reference trajectory of the velocity loop is solved according to the principle of optimal energy constraint, including: Based on the state equation of the slow subsystem, a cost function is constructed with tracking error and control energy as performance indicators; Based on the Pontryagin minimum principle, a Hamiltonian function containing costate variables is established; Based on the minimum condition of the Hamiltonian function with respect to the control variables, and in conjunction with the solution of the two-point boundary value problem, the optimal state trajectory and the optimal co-state trajectory that minimize the cost function are obtained. Based on the optimal state trajectory, extract the optimal reference velocity and optimal reference position of the velocity loop; The optimal reference trajectory is obtained based on the optimal reference speed and optimal reference position.

[0023] Furthermore, based on the optimal reference trajectory and the estimated value of the lumped disturbance, the control command for the velocity loop is generated as follows: Based on the deviation between the optimal reference position and the actual position of the motor, and the deviation between the optimal reference speed and the actual speed of the motor, a feedback correction term is calculated; The feedforward compensation term is calculated based on the second derivative of the optimal reference trajectory, the damping coefficient of the slow subsystem, and the optimal reference velocity. Calculate the disturbance compensation term based on the estimated value of the lumped disturbance; The control command for the speed loop is generated based on the linear combination of the feedback correction term, the feedforward compensation term, and the disturbance compensation term.

[0024] Furthermore, based on the control commands of the velocity loop and the dynamic characteristics of the fast subsystem, the controller for the current loop is designed to track the reference current corresponding to the control commands, including: Based on the boundary layer model of the tachyon system, the time-scale characteristics of the current loop are determined; Based on the time scale characteristics, a full-drive system controller for the current loop is designed to enable the q-axis current to quickly track the reference current generated by the velocity loop. Based on the bandwidth requirements of the current loop, configure the gain parameters of the current loop controller to ensure that the response speed of the current loop is much higher than that of the speed loop.

[0025] Specifically, the following assumptions are made in this invention: for the slow subsystem model, the perturbation and its derivative are bounded, satisfying... .

[0026] As can be seen from the PMSM speed loop subsystem model (7), the control objective of this invention is to design a controller. To make the motor output position With output speed The controller accurately tracks the target trajectory to the desired value. Based on the all-drive system approach, the controller... It can be designed as: ; Because the system bandwidth is relatively large in the speed loop, and strong nonlinear disturbances exist, such as sudden load changes and friction, a nonlinear ESO is designed to estimate the disturbances in the speed loop. Let And define the observer error as A nonlinear extended state observer can be designed as follows: ; The expression for the fal function is: ; The Pontryagin Minimum Principle (PMP) aims to minimize the performance index of a system given an initial state and possible terminal constraints. For equation (7), the objective function and boundary conditions can be expressed as: ; The following boundary conditions must be met: ; in These are the terminal error weighting coefficient, the speed error weighting coefficient, and the control quantity penalty coefficient. It is the terminal time. The optimal q-axis current is obtained through PMP. These are the desired angular velocity, the initial angular velocity, and the initial angle, respectively.

[0027] To obtain the optimal input energy, a suitable Hamiltonian function is constructed using the Pontryagin minimum principle to determine the optimal trajectory: ; For all The expression is as follows: ; in Let represent the optimal state trajectory and the optimal co-state trajectory, respectively, which can be obtained by solving a two-point boundary value problem. Substituting the optimal control law into formula (7) yields: ; Combining ESO-estimated disturbances and optimal control law, based on the all-drive system control method, the final control law is... It can be redesigned as: ; In practical systems, the reference current limit is typically set as follows: ; Substituting equation (17) into system (7), we can obtain the error dynamics equation of the velocity closed-loop system: .

[0028] To verify the effectiveness of the control scheme, this invention uses Matlab / Simulink for verification. First, the nominal values ​​of the system parameters are shown in Table 1, and the control system block diagram is shown below. Figure 1 As shown;

[0029] Scenario 1: Considering a fixed desired angular velocity, the performance results are as follows: Figure 2 and Figure 3 As shown. This paper sets the required angular velocity to 52 rad / s. The motor's speed tracking performance over 10 seconds is as follows. Figure 2 As shown, the actual angular velocity follows the optimal trajectory and reaches the set desired angular velocity within approximately 1 second without overshoot. See [link to q-axis current tracking performance]. Figure 3 When the motor starts, the current is large and fluctuates violently, then smoothly transitions to a steady-state current of 1.04A. The actual q-axis current can quickly respond and track the reference current, exhibiting high overlap and excellent dynamic response performance.

[0030] Scenario 2: Tracking performance under sudden load changes, results are as follows Figure 4 and Figure 5 As shown. At the 3rd second, the system's load torque suddenly increases from 0.5 Nm to 1.0 Nm; at this time, the speed tracking performance is as follows... Figure 4 As shown, during the steady-state operation phase before the load surge (0-3 seconds), the actual angular velocity curve almost perfectly coincides with the ideal trajectory curve, and the steady-state error approaches zero. At t=3s, the system load experiences a step surge. At the instant of the load surge, the actual angular velocity curve shows a small drop in speed, but quickly recovers to track the desired speed within 0.4s without overshoot. In the subsequent time period, it still closely follows the ideal trajectory, exhibiting extremely strong robustness and load torque suppression capability. Current tracking performance is as follows... Figure 5 As shown, when the system starts up, the actual current perfectly tracks the peak value of the reference current. The controller has extremely high current loop bandwidth and fast dynamic response capability. At t=3s, in order to counteract the increased load torque, it calculates and issues an electromagnetic torque command that increases proportionally in real time. The actual current rises rapidly from 1.04A and then enters the steady-state value of 1.71A. The system can provide precise torque according to actual needs, avoid energy waste, and has the characteristics of energy efficiency optimization.

[0031] Scenario 3: Considering the desired angular velocity as a sinusoidal trajectory, the tracking performance is as follows: Figure 6 and Figure 7 As shown. This article sets the basic speed. The sinusoidal amplitude A = 5 rad and the frequency f = 0.3 Hz. The speed tracking performance is as follows: Figure 5 As shown, the actual angular velocity increases from rest and tracks the reference angular velocity above after approximately 0.5 seconds. The phase lag between the actual and desired values ​​is very small. Subsequently, the actual angular velocity curve closely matches the desired sinusoidal trajectory. The system demonstrates excellent tracking accuracy under stable operation. Position tracking performance is as follows... Figure 6 As shown, under the proposed method, even in the dynamic process of periodic and large-range speed changes, the system remains stable and smooth, without oscillation and instability. The actual position accurately tracks the expected position, indicating that the strong robustness of the present invention is not only for constant load disturbances, but also applicable to continuously time-varying dynamic conditions.

[0032] The effects of this embodiment include: (1) Significantly improved dynamic tracking performance: Experimental Comparison: In a permanent magnet synchronous motor control scenario, under a fixed speed tracking task, the system can track the 52 rad / s setpoint along the optimal trajectory within approximately 1 second, with no overshoot and extremely low steady-state tracking error. In contrast, traditional PID control typically suffers from overshoot and has a longer settling time; while sliding mode control offers a fast response, it introduces steady-state error due to chattering. In a sinusoidal speed tracking task (fundamental 20 rad / s, amplitude 5 rad, frequency 0.3 Hz), the method of this invention can closely follow the reference trajectory within approximately 0.5 seconds after startup, and throughout the entire operating cycle, the actual trajectory exhibits a high degree of consistency with the desired trajectory, demonstrating its superior tracking capability for time-varying and nonlinear reference signals.

[0033] (2) Effective suppression of load disturbances: Experimental Comparison: By introducing a nonlinear extended state observer (NLESO) into the speed loop, the system can estimate and compensate for lumped disturbances such as sudden changes in load torque in real time. Simulations and experiments show that the system exhibits excellent performance in terms of speed fluctuation amplitude and anti-interference capabilities when a rated load of 0.5 Nm is applied and when the load suddenly changes from 0.5 Nm to 1 Nm in the 3rd second.

[0034] (3) Energy efficiency is optimized, and energy consumption is reduced: Experimental Comparison: In this embodiment, the energy consumption of the control input is directly incorporated into the optimization objective function through PMP. Simulation results show that while achieving fast and accurate tracking, the q-axis current can smoothly transition to a lower steady-state value (e.g., 1.04A), avoiding unnecessary current surges and continuous high-energy-consumption operation, demonstrating its practical engineering value in energy efficiency optimization.

[0035] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A control method for a permanent magnet synchronous motor all-drive system based on optimal energy constraints and singular perturbation theory, characterized in that, include: Based on the mathematical model of the permanent magnet synchronous motor, the motor system is decoupled into a slow subsystem and a fast subsystem using the singular perturbation theory. The slow subsystem corresponds to the velocity loop dynamics, and the fast subsystem corresponds to the current loop dynamics. Based on the dynamic equations of the slow subsystem, a controller based on the all-drive system method is constructed, so that the closed-loop error dynamic equation of the velocity loop has configurable poles. Based on the state variables and desired trajectory of the slow subsystem, the lumped disturbance of the system is estimated using a nonlinear extended state observer. Based on the estimated value of the lumped disturbance and the desired trajectory, the optimal reference trajectory of the velocity loop is solved according to the principle of optimal energy constraint. Based on the optimal reference trajectory and the estimated value of the lumped disturbance, the control command for the velocity loop is generated; Based on the control commands of the velocity loop and the dynamic characteristics of the fast subsystem, a controller for the current loop is designed to track the reference current corresponding to the control commands.

2. The control method for a permanent magnet synchronous motor all-drive system based on optimal energy constraints and singular perturbation theory according to claim 1, characterized in that, The slow subsystem includes: ; in, For the mechanical angular acceleration of the motor, For system parameters, The mechanical angular velocity of the motor. For the speed loop control law, For load disturbance; The fast subsystem includes: ; in: For state variables on a fast time scale. This is a current loop control law. denoted as the current loop disturbance, and v as a fast time-scale variable.

3. The control method for a permanent magnet synchronous motor all-drive system based on optimal energy constraints and singular perturbation theory according to claim 2, characterized in that, Based on the dynamic equations of the slow subsystem, the controller constructed using the all-drive system approach includes: Based on the second-order dynamic equation of the slow subsystem, the tracking error between the motor output position and output speed is defined as a state feedback variable. Based on the state feedback variables, a control law containing position error and velocity error feedback terms is designed, and the pole positions of the closed-loop error dynamic equation are configured by adjusting the feedback gain coefficient. According to the control law, the nonlinear terms and cross-coupling terms of the slow subsystem are canceled out to obtain the closed-loop error dynamic equation in linear time-invariant form.

4. The control method for a permanent magnet synchronous motor all-drive system based on optimal energy constraints and singular perturbation theory according to claim 3, characterized in that, Based on the state variables and desired trajectory of the slow subsystem, the lumped disturbance of the system is estimated using a nonlinear extended state observer, including: The lumped disturbance is extended into a new state variable, which together with the motor output position and output speed constitutes an extended state vector. Based on the extended state vector, an observer update law containing a nonlinear function fal is designed, wherein the nonlinear function fal adaptively switches between the linear interval and the nonlinear interval according to the magnitude of the observation error; The value of the lumped disturbance is estimated in real time according to the observer update law, and the lumped disturbance includes load torque changes and unmodeled dynamics.

5. The control method for a permanent magnet synchronous motor all-drive system based on optimal energy constraints and singular perturbation theory according to claim 4, characterized in that, Based on the estimated value of the lumped disturbance and the desired trajectory, the optimal reference trajectory of the velocity loop is solved according to the principle of optimal energy constraint, including: Based on the state equation of the slow subsystem, a cost function is constructed with tracking error and control energy as performance indicators; Based on the Pontryagin minimum principle, a Hamiltonian function containing costate variables is established; Based on the minimum condition of the Hamiltonian function with respect to the control variables, and in conjunction with the solution of the two-point boundary value problem, the optimal state trajectory and the optimal co-state trajectory that minimize the cost function are obtained. Based on the optimal state trajectory, extract the optimal reference velocity and optimal reference position of the velocity loop; The optimal reference trajectory is obtained based on the optimal reference speed and optimal reference position.

6. The control method for a permanent magnet synchronous motor all-drive system based on optimal energy constraints and singular perturbation theory according to claim 5, characterized in that, Based on the optimal reference trajectory and the estimated value of the lumped disturbance, the control commands for the velocity loop are generated as follows: Based on the deviation between the optimal reference position and the actual position of the motor, and the deviation between the optimal reference speed and the actual speed of the motor, a feedback correction term is calculated; The feedforward compensation term is calculated based on the second derivative of the optimal reference trajectory, the damping coefficient of the slow subsystem, and the optimal reference velocity. Calculate the disturbance compensation term based on the estimated value of the lumped disturbance; The control command for the speed loop is generated based on the linear combination of the feedback correction term, the feedforward compensation term, and the disturbance compensation term.

7. The control method for a permanent magnet synchronous motor all-drive system based on optimal energy constraints and singular perturbation theory according to claim 6, characterized in that, Based on the control commands of the velocity loop and the dynamic characteristics of the fast subsystem, the controller for the current loop is designed to track the reference current corresponding to the control commands, including: Based on the boundary layer model of the tachyon system, the time-scale characteristics of the current loop are determined; Based on the time scale characteristics, a full-drive system controller for the current loop is designed to enable the q-axis current to quickly track the reference current generated by the velocity loop. Based on the bandwidth requirements of the current loop, configure the gain parameters of the current loop controller to ensure that the response speed of the current loop is much higher than that of the speed loop.