Permanent magnet synchronous motor anti-shock model predictive torque smoothing control method, device, equipment and medium

By adopting the anti-shock model prediction torque smoothing control method in the permanent magnet synchronous motor, a discretized state space model is established and the current vector is iteratively solved. The optimal solution is smoothed by a linear tracking differentiator, which solves the problem of quadrant switching, acceleration/deceleration and other problems of the motor. It solves the impact problem during loading/unloading, realizes speed tracking and smooth transition of torque, and improves the stability and service life of the motor.

CN118381403BActive Publication Date: 2024-10-11HUAQIAO UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410807544.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-10-11
Estimated Expiration
2044-06-21

AI Technical Summary

Technical Problem

Permanent magnet synchronous motors are prone to impact and torque overshoot problems during speed/torque quadrant switching, acceleration/deceleration, and acceleration/unloading processes, resulting in reduced ride comfort and increased wear on the transmission system. Existing impact reduction control methods cannot simultaneously Ensures accurate speed tracking and smooth transition of torque.

Method used

The anti-impact model prediction torque smoothing control method is adopted. By obtaining state information, establishing a discretized state space model, designing a cost function and using the unconstrained conjugate gradient descent method to iteratively solve, the optimal solution of the current vector is obtained, and through linear tracking differentiation The controller further smoothes the transition to generate a PWM signal to drive the motor.

Benefits of technology

It achieves accurate speed tracking and smooth torque transition, reduces the impact during quadrant switching, acceleration/deceleration and acceleration/unloading, and improves the operating stability and service life of the motor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118381403B_ABST
    Figure CN118381403B_ABST
Patent Text Reader

Abstract

The invention discloses a method, device, equipment and medium for predicting torque smoothing control of a permanent magnet synchronous motor with an anti-shock model, and relates to the technical field of permanent magnet synchronous motors. The method includes a speed loop anti-shock model predicting torque smoothing control and a linear tracking differentiator. The anti-shock model predicting torque smoothing control includes state acquisition, model prediction, rolling optimization and feedback correction. Specifically, a discretized state space model is established based on the acquired state information and the kinematic model of the permanent magnet synchronous motor. The cost function is designed as predicted speed error + predicted impact degree + predicted torque smoothness with the current vector as the control quantity, and a state space recursive prediction model is established. The quadratic cost function is iteratively solved by the unconstrained conjugate gradient descent method, and the optimal solution is transferred to the linear tracking differentiator to obtain a reference current vector. The method can make the permanent magnet synchronous motor accurately track the speed and smoothly transition the torque, and reduce the impact degree during quadrant switching, acceleration / deceleration and loading / unloading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of permanent magnet synchronous motors, and in particular to a method, device and equipment for predicting torque smoothing control of an anti-shock model of a permanent magnet synchronous motor. Background Art

[0002] Permanent Magnet Synchronous Motor (PMSM) is a three-phase AC motor known for its excellent efficiency, power density and control accuracy. This motor consists of three sets of stator windings with a phase difference of 120 degrees and a rotor equipped with permanent magnets. By sending PWM (pulse width modulation) signals to the three-phase inverter to control the switching state of the IGBT (insulated gate bipolar transistor), voltage and three-phase current are generated in the stator winding, which in turn generates a stator magnetic field that interacts with the rotor magnetic field to drive the motor to rotate.

[0003] Compared with traditional induction motors, PMSM has been widely used in high-performance demanding fields such as industry, manufacturing and new energy vehicles due to its high power density, high efficiency, excellent dynamic response and small torque fluctuation.

[0004] However, PMSM may encounter large impact and torque overshoot problems during speed / torque quadrant switching, acceleration / deceleration, and loading / unloading, which may not only affect ride comfort, but may also cause increased wear of the transmission system connected to the motor and shorten its service life. These problems are particularly prominent in motor drive systems without buffer devices.

[0005] The PMSM impact reduction control methods currently on the market are mainly divided into two categories:

[0006] The first method adopts the torque control mode to reduce the impact by adding a transition process to the reference torque, such as ramp, polynomial interpolation, spline interpolation or S-curve transition. However, this method cannot ensure accurate speed tracking due to its reliance on torque control. Even if an additional speed control loop is introduced, improper transition time setting may still lead to increased speed oscillation, reduced system bandwidth and stability problems.

[0007] The second method uses speed control mode, and also adds a transition process to the reference speed. Although this method can achieve a smooth transition of speed, it cannot effectively reduce the impact during loading / unloading, nor can it achieve smooth torque output.

[0008] These methods have their own advantages and limitations, so they need to be selected and optimized according to specific requirements and system characteristics in practical applications. In view of this, the applicant has proposed this application after studying the existing technologies. Summary of the invention

[0009] The present invention provides a method, device and equipment for predicting torque smoothing control of a permanent magnet synchronous motor using an anti-shock model, so as to improve at least one of the above-mentioned technical problems.

[0010] In a first aspect, an embodiment of the present invention provides a method for predicting torque smoothing control of a permanent magnet synchronous motor using an anti-shock model, which comprises steps S1 to S7.

[0011] S1. Obtain state information collected by a preset sensor, and transform the state information through Clark transformation and Park transformation to obtain two-phase current in a stationary coordinate system and orthogonal axis current in a rotating coordinate system. The state information includes three-phase current, rotor position and mechanical angular velocity at the last two sampling moments.

[0012] S2. Obtain the reference speed and load torque observation values, combine the state information with the kinematic equation of the permanent magnet synchronous motor, and establish a discretized state space model. Set the prediction time interval and prediction interval, use the current vector as the control quantity, design the cost function as the predicted speed error + predicted impact + predicted torque smoothness, set the cost weight coefficient, establish a state space recursive prediction model, iterate the state information within the prediction interval, and obtain the quadratic cost function of the control quantity.

[0013] S3, calling the preset unconstrained conjugate gradient descent method to iteratively solve the quadratic cost function to obtain the optimal solution of the control amount matrix of the quadratic cost function, and then let In the formula, represents the optimal solution of the current vector of the quadratic cost function at the current sampling moment, Represents the control matrix The first row of the optimal solution.

[0014] S4. The optimal solution of the control quantity is transmitted to the linear tracking differentiator, and is further smoothed by the linear tracking differentiator and then limited, and used as a reference current vector of the current distribution strategy at the current moment.

[0015] S5. Use a preset current distribution strategy to calculate and process the reference current vector, determine the current vector angle, and obtain the orthogonal axis reference current.

[0016] S6. Use a current loop controller to process the state information and the orthogonal axis reference current to obtain a dq axis reference voltage.

[0017] S7, perform inverse Park transformation on the rotor position at the current moment and the dq axis reference voltage to obtain a two-phase reference voltage in a stationary coordinate system and Then, the two-phase reference voltage in the stationary coordinate system is subjected to SVPWM modulation processing to generate a PWM signal. Then, the PWM signal is output to a voltage source inverter to generate a desired stator voltage and three-phase current in the stator winding of the permanent magnet synchronous motor to drive the permanent magnet synchronous motor to operate.

[0018] In an optional embodiment, step S2 includes steps S201 to S219.

[0019] S201, constructing a permanent magnet synchronous motor dynamics model according to the load torque observation value and the kinematic characteristics of the permanent magnet synchronous motor. The expression of the permanent magnet synchronous motor dynamics model is: In the formula, Indicates the mechanical angular velocity of the permanent magnet synchronous motor at the current moment, Represents the derivative of the mechanical angular velocity of the permanent magnet synchronous motor at the current moment, is the viscous damping coefficient, represents the moment of inertia, Indicates the current sampling time. Indicates the observed value of load torque at the current moment, is the torque constant, Indicates the current vector to be specified at the current moment.

[0020] S202, setting the prediction time interval to , and then the first-order forward Euler method is used to discretize the dynamic model of the permanent magnet synchronous motor to obtain the discretized dynamic model of the permanent magnet synchronous motor. Among them, the expression of the discretized dynamic model of the permanent magnet synchronous motor is: In the formula, To predict the The mechanical angular velocity of the permanent magnet synchronous motor at the moment, is the viscous damping coefficient, is the prediction time interval, represents the moment of inertia, Indicates the mechanical angular velocity of the permanent magnet synchronous motor at the current moment, Indicates the observed value of load torque at the current moment, is the torque constant, Indicates the current vector to be specified at the current moment.

[0021] S203, the current mechanical angular velocity Defined as a state variable .

[0022] S204, the current vector to be specified at the current moment Defined as control variable .

[0023] S205: According to the state variable and the control variables , construct a discretized state space model. The expression of the discretized state space model is: In the formula, is the predicted state at the next moment, is the mechanical characteristic matrix of permanent magnet synchronous motor, is the torque response matrix, is the load torque disturbance matrix.

[0024] S206, Order The actual mechanical angular velocity is the reference value of the mechanical angular velocity command. Assign to , that is: let the output , defines the mechanical angular velocity output error. Among them, the mechanical angular velocity output error The expression is: In the formula, is the mechanical angular velocity command reference value, For output, It is the actual value of mechanical angular velocity.

[0025] S207. Define the impact degree as the second-order derivative of the mechanical angular velocity. The expression of the impact degree is: In the formula, is the impact degree, represents the derivative, is the mechanical angular velocity, The system time.

[0026] S208. According to the shock degree, a second-order forward difference method is used to establish a discretization model for predicting the shock degree.

[0027] The expression of the discretization model for predicting shock degree is: In the formula, To predict the The impact of the moment, According to The state prediction obtained at the moment Moment status, According to The state prediction at the moment Moment status, is the state variable at the current moment, is the prediction time interval.

[0028] S209, define torque smoothness as control quantity The second derivative of . Among them, the moment smoothness The expression is: In the formula, To control the amount, represents the derivative, The system time.

[0029] S210: Based on the moment smoothness, a second-order backward difference method is used to establish a prediction moment smoothness discretization model. The expression of the prediction moment smoothness discretization model is: In the formula, To predict the The moment smoothness of the moment, is the control variable at the current moment, For the The current vector at time For the The current vector at time is the prediction time interval, represents the derivative, The system time.

[0030] S211: Define a first cost function according to the mechanical angular velocity output error, the predicted impact degree discretization model and the predicted torque smoothness discretization model. It is the predicted speed error + predicted impact + predicted torque smoothness. In the formula, is the length of the prediction interval, Indicates that based on the current moment Backward Prediction step, represents transpose, The predicted The mechanical angular velocity output error at the moment, The predicted Time impact, The predicted Moment smoothness, is the weight coefficient for the accumulated error between each predicted mechanical angular velocity and the expected value, is the weight coefficient accumulated for each predicted second-order derivative of the mechanical angular velocity, Weight coefficient accumulated for each predicted torque smoothness (second derivative of current vector).

[0031] S212: within the prediction interval, iteratively process the current state information to obtain a state space prediction model The recursive expression of is: In the formula, is the mechanical characteristic matrix of permanent magnet synchronous motor The nested matrix of is the column matrix of the predicted state variables, is the torque response matrix The nested matrix of is the control variable at the current moment The nested matrix of is the load torque disturbance matrix The coefficient matrix of is the load torque disturbance matrix.

[0032] S213: The first cost function In: Expand the process and define it as the second cost function Among them, the second cost function The expression is: In the formula, Mechanical angular velocity command reference value The column matrix of is the transformed matrix, is a set of transformation matrices, is the column matrix of the predicted state variables, represents transpose, The weight coefficient for the accumulated error between each predicted mechanical angular velocity and the expected value The set of diagonal matrices .

[0033] S214, substituting the state space recursive prediction model into the second cost function , and discard the initial state constant term to obtain the new second cost function .

[0034] S215: The first cost function The second item in: Expand and define it as the third cost function. The third cost function expression is: In the formula, represents the third cost function, is the column matrix of predicted impact degree, represents transpose, The weight coefficient accumulated for each predicted mechanical angular velocity second derivative The set of diagonal matrices of ;

[0035] S216, substituting the state space recursive prediction model into the third cost function , and discard the initial state constant term to obtain a new third cost function ;

[0036] S217, the third term in the first cost function: Expand the process and define it as the fourth cost function .

[0037] The fourth cost function The expression is: In the formula, is the control variable at the current moment, For the The current vector at time For the The current vector at time represents transpose, Weight coefficient accumulated for each predicted torque smoothness (second derivative of current vector) The set of diagonal matrices .

[0038] S218, substituting the state space recursive prediction model into the fourth cost function , and discard the initial state constant term to obtain the new fourth cost function ;

[0039] S219, according to the new second cost function , the new third cost function And the new fourth cost function , construct the quadratic cost function of the control quantity . .

[0040] In an optional embodiment, the algorithm of the preset unconstrained conjugate gradient descent method is as follows: for a quadratic function ,beg In the formula, represents a variable vector, represents transpose, represents a quadratic matrix, represents the linear term matrix, Represents a quadratic function Get the minimum value of the variable.

[0041] In an optional embodiment, the algorithm framework of the preset unconstrained conjugate gradient descent method is as follows:

[0042] Step 1: Set the initial value of the iteration , accuracy threshold and the maximum number of iterations .in, .

[0043] Step 2: Calculate the gradient of the initial position , define the negative gradient In the formula, Represents the gradient, represents a quadratic matrix, Indicates the independent variable, is the linear term matrix.

[0044] Step 3: Order , and perform the following cycle:

[0045] 1. If or , stop iteration, exit the loop, output As the optimal solution. represents the variable vector for each iteration, express The corresponding gradient value is express The 2-norm of .

[0046] 2. Calculate the descending step length , In the formula, express The corresponding negative gradient.

[0047] 3. Update iteration point , .

[0048] 4. Calculate new gradients , .

[0049] 5. Calculate the combination coefficient , .

[0050] 6. Calculate the conjugate direction , .

[0051] 7. Update , ,make , return to loop step 1 and repeat the loop.

[0052] In an optional embodiment, in step S4, the transfer function expression of the linear tracking differentiator is: In the formula, is the Laplace operator, is the convergence speed of the linear tracking differentiator.

[0053] In an optional embodiment, in step S4, the expression of the reference current vector is: In the formula, is the reference current vector, represents the limiting function, is the transfer function of the linear tracking differentiator, represents the optimal solution of the current vector of the quadratic cost function at the current sampling time, Indicates the upper limit of the amplitude, Indicates the lower limit of the amplitude.

[0054] In an optional embodiment, the permanent magnet synchronous motor anti-shock model predictive torque smoothing control method is used to control an internal permanent magnet synchronous motor or a surface mounted permanent magnet synchronous motor.

[0055] In an optional embodiment, the orthogonal axis reference current is given by: control, maximum torque current ratio control, flux weakening control, maximum torque voltage ratio control or minimum loss control.

[0056] In the second aspect, an embodiment of the present invention provides a permanent magnet synchronous motor anti-impact model prediction torque smoothing control device, which includes a data acquisition module, a cost function construction module, a cost function solving module, a current vector calculation module, a reference current calculation module, a reference voltage calculation module and a modulation drive module.

[0057] The data acquisition module is used to acquire the state information collected by the preset sensor, and transform the state information through Clark transformation and Park transformation to obtain the two-phase current in the stationary coordinate system and the orthogonal axis current in the rotating coordinate system. The state information includes the three-phase current, rotor position and mechanical angular velocity at the last two sampling moments.

[0058] The cost function construction module is used to obtain the reference speed and load torque observation values, combine the state information with the kinematic equation of the permanent magnet synchronous motor, and establish a discretized state space model. Set the prediction time interval and prediction interval, use the current vector as the control quantity, design the cost function as the predicted speed error + predicted impact + predicted torque smoothness, set the cost weight coefficient, establish a state space recursive prediction model, iterate the state information within the prediction interval, and obtain the quadratic cost function of the control quantity.

[0059] The cost function solving module is used to call the preset unconstrained conjugate gradient descent method to iteratively solve the quadratic cost function to obtain the optimal solution of the control amount matrix of the quadratic cost function, and then let In the formula, represents the optimal solution of the current vector of the quadratic cost function at the current sampling moment, Represents the control matrix The first row of the optimal solution.

[0060] The current vector calculation module is used to transfer the optimal solution of the control quantity to the linear tracking differentiator, and then limit it after further smooth transition by the linear tracking differentiator, so as to serve as the reference current vector of the current distribution strategy at the current moment.

[0061] The reference current calculation module is used to calculate and process the reference current vector using a preset current distribution strategy, determine the current vector angle, and obtain the orthogonal axis reference current.

[0062] The reference voltage calculation module is used to process the state information and the orthogonal axis reference current using a current loop controller to obtain a dq axis reference voltage.

[0063] The modulation drive module is used to perform inverse Park transformation on the rotor position at the current moment and the dq axis reference voltage to obtain a two-phase reference voltage in a stationary coordinate system. Then, the two-phase reference voltage in the stationary coordinate system is subjected to SVPWM modulation processing to generate a PWM signal. Then, the PWM signal is output to a voltage source inverter to generate a desired stator voltage and three-phase current in the stator winding of the permanent magnet synchronous motor to drive the permanent magnet synchronous motor to operate.

[0064] In a third aspect, an embodiment of the present invention provides a permanent magnet synchronous motor anti-shock model prediction torque smoothing control device, which includes a sensor, a processor, a memory, a PWM generator and an inverter, and a computer program stored in the memory. The computer program can be executed by the processor to implement a permanent magnet synchronous motor anti-shock model prediction torque smoothing control method as described in any paragraph of the first aspect.

[0065] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium. The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a permanent magnet synchronous motor anti-shock model prediction torque smoothing control method as described in any paragraph of the first aspect.

[0066] By adopting the above technical solution, the present invention can achieve the following technical effects:

[0067] The permanent magnet synchronous motor anti-shock model prediction torque smoothing control method of the embodiment of the present invention can make the permanent magnet synchronous motor speed tracking accurate and torque transition smooth, reducing the impact degree during quadrant switching, acceleration / deceleration and loading / unloading.

[0068] The method includes a speed loop anti-shock model predictive torque smoothing control and a linear tracking differentiator. The anti-shock model predictive torque smoothing control includes state acquisition, model prediction, rolling optimization and feedback correction. Specifically, a discretized state space model is established based on the acquired state information and the kinematic model of the permanent magnet synchronous motor. Taking the current vector as the control quantity, the cost function is designed as the predicted speed error + predicted impact degree + predicted torque smoothness, thereby establishing a state space recursive prediction model. The quadratic cost function is iteratively solved by the unconstrained conjugate gradient descent method, and then the optimal solution of the control quantity is passed to the linear tracking differentiator, which is further smoothed by the linear tracking differentiator and used as the reference current vector at the current moment. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0070] Figure 1 It is a schematic diagram of a drive control flow of a permanent magnet synchronous motor anti-shock model prediction torque smoothing control method provided by an embodiment of the present invention.

[0071] Figure 2 It is a system block diagram of a permanent magnet synchronous motor anti-shock model prediction torque smoothing control method provided by an embodiment of the present invention.

[0072] Figure 3 It is a flow chart of the algorithm for predicting torque smoothing control of the anti-shock model provided by an embodiment of the present invention.

[0073] Figure 4 It is an algorithm flow chart of the unconstrained conjugate gradient descent method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0074] The technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all of the embodiments. Based on the embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0075] Example 1, please refer to Figures 1 to 4The first embodiment of the present invention provides a method for smoothing control of torque predicted by an anti-shock model of a permanent magnet synchronous motor, which can be executed by a permanent magnet synchronous motor control device (hereinafter referred to as the control device), and in particular, by one or more processors in the control device to implement steps S1 to S7.

[0076] S1. Obtain state information collected by a preset sensor, and transform the state information through Clark transformation and Park transformation to obtain two-phase current in a stationary coordinate system and orthogonal axis current in a rotating coordinate system. The state information includes three-phase current, rotor position and mechanical angular velocity at the last two sampling moments.

[0077] S2. Obtain the reference speed and load torque observation values, combine the state information with the kinematic equation of the permanent magnet synchronous motor, and establish a discretized state space model. Set the prediction time interval and prediction interval, use the current vector as the control quantity, design the cost function as the predicted speed error + predicted impact + predicted torque smoothness, set the cost weight coefficient, establish a state space recursive prediction model, iterate the state information within the prediction interval, and obtain the quadratic cost function of the control quantity.

[0078] Based on the above embodiment, in an optional embodiment of the present invention, step S2 includes steps S201 to S219.

[0079] S201. Construct a dynamic model of the permanent magnet synchronous motor according to the load torque observation value and the kinematic characteristics of the permanent magnet synchronous motor.

[0080] The expression of the permanent magnet synchronous motor dynamic model is: In the formula, Indicates the mechanical angular velocity of the permanent magnet synchronous motor at the current moment, Represents the derivative of the mechanical angular velocity of the permanent magnet synchronous motor at the current moment, is the viscous damping coefficient, represents the moment of inertia, Indicates the current sampling time. Indicates the observed value of load torque at the current moment, is the torque constant, Indicates the current vector to be specified at the current moment.

[0081] , where is the number of magnetic pole pairs of the permanent magnet synchronous motor, is the permanent magnet flux linkage, and 1.5 times is the compensation of the equal-amplitude Clark transformation.

[0082] S202, setting the prediction time interval to , and then the first-order forward Euler method is used to discretize the dynamic model of the permanent magnet synchronous motor to obtain the discretized dynamic model of the permanent magnet synchronous motor.

[0083] The expression of the discretized dynamic model of permanent magnet synchronous motor is: In the formula, To predict the The mechanical angular velocity of the permanent magnet synchronous motor at the moment (next moment), is the viscous damping coefficient, is the prediction time interval, represents the moment of inertia, Indicates the mechanical angular velocity of the permanent magnet synchronous motor at the current moment, Indicates the observed value of load torque at the current moment, is the torque constant, Indicates the current vector to be specified at the current moment.

[0084] S203, the current mechanical angular velocity Defined as a state variable .Right now: .

[0085] S204, the current vector to be specified at the current moment Defined as control variable .Right now: .

[0086] S205: According to the state variable and the control variables , construct a discretized state space model.

[0087] The expression of the discretized state space model is: In the formula, is the predicted state at the next moment, is the mechanical characteristic matrix of permanent magnet synchronous motor, is the torque response matrix, is the load torque disturbance matrix.

[0088] S206, Order is the mechanical angular velocity command reference value (expected value), and the actual mechanical angular velocity Assign to , that is: let the output , and then define the mechanical angular velocity output error.

[0089] Mechanical angular velocity output error The expression is: In the formula, is the mechanical angular velocity command reference value, For output, It is the actual value of mechanical angular velocity.

[0090] S207. Define the impact degree as the second-order derivative of the mechanical angular velocity.

[0091] The expression of impact strength is: In the formula, is the impact degree, represents the derivative, is the mechanical angular velocity, The system time.

[0092] S208. According to the shock degree, a second-order forward difference method is used to establish a discretization model for predicting the shock degree.

[0093] The expression of the discretization model for predicting shock degree is: In the formula, To predict the The impact of the moment, is the prediction time interval, represents the derivative, The system time. Indicates the mechanical angular velocity of the permanent magnet synchronous motor at the current moment, To predict the The mechanical angular velocity of the permanent magnet synchronous motor at the moment, To predict the The mechanical angular velocity of the permanent magnet synchronous motor at the moment, According to The state prediction at the moment Moment status, According to The state prediction at the moment Moment status, is the state variable at the current moment.

[0094] S209, define torque smoothness as control quantity The second derivative of .

[0095] The expression for moment smoothness is: In the formula, is the moment smoothness, To control the amount, represents the derivative, The system time.

[0096] S210. According to the moment smoothness, a second-order backward difference method is used to establish a discretization model for predicting moment smoothness.

[0097] The expression of the prediction moment smoothness discretization model is: In the formula, To predict the The moment smoothness of the moment, is the control variable at the current moment, For the The current vector at time For the The current vector at time is the prediction time interval, represents the derivative, The system time.

[0098] S211: Define a first cost function according to the mechanical angular velocity output error, the predicted impact degree discretization model and the predicted torque smoothness discretization model. It is the predicted speed error + predicted impact + predicted torque smoothness.

[0099] The first cost function The expression is: In the formula, is the length of the prediction interval, Indicates that based on the current moment Backward Prediction step, Indicates transpose. The predicted The mechanical angular velocity output error at the moment, The predicted Time impact, The predicted Moment smoothness. is the weight coefficient for the accumulated error between each predicted mechanical angular velocity and the expected value, is a positive number and The size of is used to determine the accuracy and speed of the output. is the weight coefficient accumulated for each predicted second-order derivative of the mechanical angular velocity, is a positive number and The size of is used to determine the impact degree of the permanent magnet synchronous motor during quadrant switching, acceleration / deceleration, and loading / unloading. The weight coefficient accumulated for each predicted torque smoothness (second derivative of the current vector), is a positive number and The size of is used to determine the smoothness of the electromagnetic torque.

[0100] S212: within the prediction interval, iteratively process the current state information to obtain a state space prediction model The recursive expression of is: In the formula, is the mechanical characteristic matrix of permanent magnet synchronous motor The nested matrix of is the column matrix of the predicted state variables, is the torque response matrix The nested matrix of is the control variable at the current moment The nested matrix of is the load torque disturbance matrix The coefficient matrix of is the load torque disturbance matrix.

[0101] Specific, , , , , , is the identity matrix, is the mechanical characteristic matrix of the permanent magnet synchronous motor, is the torque response matrix.

[0102] S213: The first cost function The first item in: Expand the process and then define it as the second cost function .

[0103] The second cost function The expression is: In the formula, Mechanical angular velocity command reference value The column matrix of , is the transformed matrix, , is a set of transformation matrices, , is the column matrix of the predicted state variables, , Represents transposition, The weight coefficient for the accumulated error between each predicted mechanical angular velocity and the expected value The diagonal matrix set of , .

[0104] S214, substituting the state space recursive prediction model into the second cost function , and discard the initial state constant term to obtain the new second cost function .

[0105] New second cost function The expression is: .

[0106] S215: The first cost function The second item in: Expand the process and define it as the third cost function .

[0107] The third cost function The expression is: In the formula, is the column matrix of predicted impact degree, represents transpose, The weight coefficient accumulated for each predicted mechanical angular velocity second derivative The diagonal matrix set of , .

[0108] Specific .

[0109] .

[0110] .

[0111] .

[0112] .

[0113] .

[0114] .

[0115] .

[0116] .

[0117] .

[0118] .

[0119] in, is the identity matrix, is the mechanical characteristic matrix of permanent magnet synchronous motor, is the torque response matrix.

[0120] S216, substituting the state space recursive prediction model into the third cost function , and discard the initial state constant term to obtain a new third cost function ;

[0121] New third cost function The expression is: .

[0122] S217, the third term in the first cost function: Expand the process and define it as the fourth cost function .

[0123] The fourth cost function The expression is: In the formula, is the control variable at the current moment, For the The current vector at time For the The current vector at time represents transpose, Weight coefficient accumulated for each predicted torque smoothness (second derivative of current vector) The diagonal matrix set of , .

[0124] in, , , , For the The current vector at time , , , For the The current vector at time.

[0125] S218, substituting the state space recursive prediction model into the fourth cost function , and discard the initial state constant term to obtain the new fourth cost function ;

[0126] New fourth cost function The expression is: In the formula, for dimensional identity matrix.

[0127] S219, according to the new second cost function, the new third cost function and the new fourth cost function to construct a quadratic cost function of the control amount .

[0128] The expression of the quadratic cost function is: In the formula, represents the quadratic cost function, represents the new second cost function, represents the new third cost function, Denotes the new fourth cost function.

[0129] S3, calling the preset unconstrained conjugate gradient descent method to iteratively solve the quadratic cost function to obtain the optimal solution of the control amount matrix of the quadratic cost function, and then let In the formula, represents the optimal solution of the quadratic cost function current vector (control quantity) at the current sampling moment, Represents the control matrix The first row of the optimal solution.

[0130] Specifically, the algorithm function and algorithm framework of the preset unconstrained conjugate gradient descent method are as follows:

[0131] Algorithm function: For quadratic functions ,beg In the formula, represents a variable vector, represents transpose, represents a quadratic matrix, represents the linear term matrix, Represents a quadratic function Get the minimum value of the variable.

[0132] The algorithm framework is as follows:

[0133] Step 1: Set the initial value of the iteration , accuracy threshold and the maximum number of iterations .in, .

[0134] Step 2: Calculate the gradient of the initial position , define the negative gradient In the formula, Represents the gradient, represents a quadratic matrix, Indicates the independent variable, is the linear term matrix.

[0135] Step 3: Order , and perform the following cycle:

[0136] 1. If or , stop iteration, exit the loop, output As the optimal solution. represents the variable vector for each iteration, express The corresponding gradient value is express The 2-norm of .

[0137] 2. Calculate the descending step length , In the formula, express The corresponding negative gradient.

[0138] 3. Update iteration point , .

[0139] 4. Calculate new gradients , .

[0140] 5. Calculate the combination coefficient , .

[0141] 6. Calculate the conjugate direction , .

[0142] 7. Update , ,make , return to loop step 1 and repeat the loop.

[0143] S4, the optimal solution of the control quantity is transmitted to the linear tracking differentiator, and the linear tracking differentiator further smooths the transition and then limits the amplitude, which serves as the reference current vector of the current distribution strategy such as the maximum torque current ratio control (MTPA) and the weak magnetic control at the current moment. .

[0144] Preferably, the transfer function expression of the linear tracking differentiator is: In the formula, is the Laplace operator, is the convergence speed of the linear tracking differentiator.

[0145] The linear tracking differentiator is critically damped, and the steady-state value of the step response is the same as the original signal. It has smooth transition and filtering properties, and will produce amplitude attenuation and phase lag for high-frequency signals.

[0146] Preferably, the expression of the reference current vector is: In the formula, is the reference current vector, represents the limiting function, is the transfer function of the linear tracking differentiator, represents the optimal solution of the current vector of the quadratic cost function at the current sampling time, Indicates the upper limit of the amplitude, Indicates the lower limit of the amplitude.

[0147] S5. Use a preset current distribution strategy to calculate and process the reference current vector at the current moment, determine the current vector angle, and generate a rectangular axis reference current.

[0148] Specifically, the method for giving the reference current of the orthogonal axis of the permanent magnet synchronous motor is not limited to Control. It can also be used for current distribution strategies such as Maximum Torque Per Ampere (MTPA), weak magnetic control, Maximum Torque Per Voltage (MTPV), and minimum loss control.

[0149] The embodiment of the present invention takes the MTPA current distribution strategy for reducing copper loss as an example and defines is the reference armature current space vector The phase angle (torque angle) with the direct axis. Its expression is:

[0150] In the formula, , are the dq axis inductance of the permanent magnet synchronous motor respectively.

[0151] According to the reference current vector obtained by S104 ,Sure and : In the formula, is the direct axis reference current, is the quadrature-axis reference current.

[0152] S6. Use a current loop controller to process the current state information and the orthogonal axis reference current to obtain a dq axis reference voltage.

[0153] The current loop controller is not limited to PID control, adaptive control, anti-disturbance control, model predictive control, sliding mode control, backstepping control, neural network control, fuzzy control, etc.

[0154] The embodiment of the present invention takes the PI control which has a simple structure, small parameter dependence and is relatively mature as an example. Specifically, a Hall current sensor is used to detect the three-phase current of the permanent magnet synchronous motor. , , , using a resolver or encoder to detect the rotor position of a permanent magnet synchronous motor Clark transformation is performed on the three-phase current to obtain the two-phase current in the stationary coordinate system. , ,according to , and rotor position Perform Park transformation to obtain the orthogonal axis current in the rotating coordinate system , According to the direct axis reference current obtained in step S5 and the actual direct axis current The error between them is used to obtain the d-axis reference voltage through the PI controller. The quadrature axis reference current obtained from S5 and the actual quadrature axis current The error between them is used to obtain the q-axis reference voltage through the PI controller. .

[0155] S7, perform inverse Park transformation on the rotor position at the current moment and the dq axis reference voltage to obtain a two-phase reference voltage in a stationary coordinate system and Then, the two-phase reference voltage in the stationary coordinate system is subjected to SVPWM modulation processing to generate a PWM signal. Then, the PWM signal is output to a voltage source inverter to generate a desired stator voltage and three-phase current in the stator winding of the permanent magnet synchronous motor to drive the permanent magnet synchronous motor to operate.

[0156] Preferably, the permanent magnet synchronous motor in the anti-shock model predicted torque smoothing control method is an internal (salient pole) permanent magnet synchronous motor or a surface-mounted (hidden pole) permanent magnet synchronous motor.

[0157] Preferably, the orthogonal axis reference current setting method in the anti-shock model prediction torque smoothing control method includes: Control, maximum torque current ratio control, weak magnetic control, maximum torque voltage ratio control, minimum loss control.

[0158] In summary, the anti-shock model prediction torque smoothing control method can be used for permanent magnet synchronous motor control systems that require reduced shock, smooth torque transition, smooth quadrant switching, and improved driver and passenger comfort. The control system of the permanent magnet synchronous motor is based on vector control. The vector control method includes detecting the three-phase current of the permanent magnet synchronous motor through a Hall current sensor. , , , Clark transformation is performed on the three-phase current to obtain the two-phase current in the stationary coordinate system , , detect the rotor position of the permanent magnet synchronous motor through a rotary transformer or encoder .according to , and rotor position Perform Park transformation to obtain the orthogonal axis current in the rotating coordinate system , Based on the deviation between the actual orthogonal axis current and the reference orthogonal axis current, PID control, adaptive control, anti-disturbance control, model predictive control, sliding mode control, backstepping control, neural network control, fuzzy control, etc. are used as current loop control strategies. The dq-axis reference stator voltage output by the current loop is subjected to Park inverse transformation, and then SVPWM modulation processing is performed to generate a PWM signal. The PWM signal is output to a voltage source inverter to generate the desired stator voltage and three-phase current in the stator winding of the permanent magnet synchronous motor to drive the permanent magnet synchronous motor to operate.

[0159] In short, the permanent magnet synchronous motor anti-shock model predictive torque smoothing control method can be used to reduce the acceleration / deceleration and loading / unloading impact, torque smooth transition, quadrant smooth switching, and improve the comfort of drivers and passengers. It should be noted that the specific methods and processing steps involved in the permanent magnet synchronous motor anti-shock model predictive torque smoothing control method are not limited to the specific methods and processing steps mentioned in this embodiment, and can also be used , weak magnetic control, MTPV, LMC and other technologies can be used as the orthogonal axis current distribution strategy, PID control, adaptive control, anti-disturbance control, model predictive control, sliding mode control, backstepping control, neural network control, fuzzy control and other technologies can be used as the current loop control method, extended back-EMF + phase-locked loop, rotation / pulsation high-frequency signal injection, model reference adaptive rotor position observation and other sensorless control methods can be used as the source of rotor position and mechanical angular velocity, SPWM can be used as the modulation method, etc.

[0160] Embodiment 2: An embodiment of the present invention provides a permanent magnet synchronous motor anti-impact model prediction torque smoothing control device, which includes a data acquisition module, a cost function construction module, a cost function solving module, a current vector calculation module, a reference current calculation module, a reference voltage calculation module and a modulation drive module.

[0161] The data acquisition module is used to acquire the state information collected by the preset sensor, and transform the state information through Clark transformation and Park transformation to obtain the two-phase current in the stationary coordinate system and the orthogonal axis current in the rotating coordinate system. The state information includes the three-phase current, rotor position and mechanical angular velocity at the last two sampling moments.

[0162] The cost function construction module is used to obtain the reference speed and load torque observation values, combine the state information with the kinematic equation of the permanent magnet synchronous motor, and establish a discretized state space model. Set the prediction time interval and prediction interval, use the current vector as the control quantity, design the cost function as the predicted speed error + predicted impact + predicted torque smoothness, set the cost weight coefficient, establish a state space recursive prediction model, iterate the state information within the prediction interval, and obtain the quadratic cost function of the control quantity.

[0163] The cost function solving module is used to call the preset unconstrained conjugate gradient descent method to iteratively solve the quadratic cost function to obtain the optimal solution of the control amount matrix of the quadratic cost function, and then let In the formula, represents the optimal solution of the current vector of the quadratic cost function at the current sampling moment, Represents the control matrix The first row of the optimal solution.

[0164] The current vector calculation module is used to transfer the optimal solution of the control quantity to the linear tracking differentiator, and then limit it after further smooth transition by the linear tracking differentiator, so as to serve as the reference current vector of the current distribution strategy at the current moment.

[0165] The reference current calculation module is used to calculate and process the reference current vector using a preset current distribution strategy, determine the current vector angle, and obtain the orthogonal axis reference current.

[0166] The reference voltage calculation module is used to process the state information and the orthogonal axis reference current using a current loop controller to obtain a dq axis reference voltage.

[0167] The modulation drive module is used to perform inverse Park transformation on the rotor position at the current moment and the dq axis reference voltage to obtain the two-phase reference voltage in the stationary coordinate system. and Then, the two-phase reference voltage in the stationary coordinate system is subjected to SVPWM modulation processing to generate a PWM signal. Then, the PWM signal is output to a voltage source inverter to generate a desired stator voltage and three-phase current in the stator winding of the permanent magnet synchronous motor to drive the permanent magnet synchronous motor to operate.

[0168] Embodiment 3: The embodiment of the present invention provides a permanent magnet synchronous motor anti-shock model prediction torque smoothing control device, which includes a sensor, a processor, a memory, a PWM generator and an inverter, and a computer program stored in the memory. The computer program can be executed by the processor to implement a permanent magnet synchronous motor anti-shock model prediction torque smoothing control method as described in any paragraph of Embodiment 1.

[0169] Embodiment 4: Embodiments of the present invention provide a computer-readable storage medium. The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a method for predicting torque smoothing control of a permanent magnet synchronous motor anti-shock model as described in any paragraph of Embodiment 1.

[0170] In several embodiments provided in the embodiments of the present invention, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The apparatus and method embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the apparatus, method and computer program product according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

Claims

1. A method for predicting torque smoothing control of a permanent magnet synchronous motor using an anti-shock model, characterized in that: Include: S1, obtaining state information collected by a preset sensor, and transforming the state information through Clark transformation and Park transformation to obtain two-phase current in a stationary coordinate system and orthogonal axis current in a rotating coordinate system; wherein the state information includes three-phase current, rotor position and mechanical angular velocity at the last two sampling moments; S2, obtain the reference speed and load torque observation values, combine the state information with the kinematic equation of the permanent magnet synchronous motor, and establish a discretized state space model; set the prediction time interval and prediction interval, use the current vector as the control quantity, design the cost function as the predicted speed error + predicted impact degree + predicted torque smoothness, set the cost weight coefficient, establish a state space recursive prediction model, iteratively process the state information within the prediction interval, and obtain the quadratic cost function of the control quantity; S3, calling the preset unconstrained conjugate gradient descent method to iteratively solve the quadratic cost function to obtain the optimal solution of the control amount matrix of the quadratic cost function, and then let ; In the formula, represents the optimal solution of the current vector of the quadratic cost function at the current sampling moment, Represents the control matrix The first row of the optimal solution; S4, transmitting the optimal solution of the control amount to a linear tracking differentiator, further smoothing the transition through the linear tracking differentiator and then limiting the amplitude, as a reference current vector of the current distribution strategy at the current moment; S5. Using a preset current distribution strategy to calculate and process the reference current vector, determine the current vector angle, and obtain the orthogonal axis reference current; S6, using a current loop controller to process the state information and the orthogonal axis reference current to obtain a dq axis reference voltage; S7, perform inverse Park transformation on the rotor position at the current moment and the dq axis reference voltage to obtain a two-phase reference voltage in a stationary coordinate system and ; Then, the two-phase reference voltage in the stationary coordinate system is subjected to SVPWM modulation processing to generate a PWM signal; Then, the PWM signal is output to the voltage source inverter to generate the desired stator voltage and three-phase current in the stator winding of the permanent magnet synchronous motor to drive the permanent magnet synchronous motor to operate; Step S2 includes steps S201 to S219; S201. Construct a dynamic model of the permanent magnet synchronous motor according to the load torque observation value and the kinematic characteristics of the permanent magnet synchronous motor; wherein the expression of the dynamic model of the permanent magnet synchronous motor is: In the formula, Indicates the mechanical angular velocity of the permanent magnet synchronous motor at the current moment, Represents the derivative of the mechanical angular velocity of the permanent magnet synchronous motor at the current moment, is the viscous damping coefficient, represents the moment of inertia, Indicates the current sampling time. Indicates the observed value of load torque at the current moment, is the torque constant, Indicates the current vector to be specified at the current moment; S202, setting the prediction time interval to , and then the first-order forward Euler method is used to discretize the dynamic model of the permanent magnet synchronous motor to obtain the discretized dynamic model of the permanent magnet synchronous motor; wherein, the expression of the discretized dynamic model of the permanent magnet synchronous motor is: In the formula, To predict the The mechanical angular velocity of the permanent magnet synchronous motor at the moment, is the viscous damping coefficient, is the prediction time interval, represents the moment of inertia, Indicates the mechanical angular velocity of the permanent magnet synchronous motor at the current moment, Indicates the observed value of load torque at the current moment, is the torque constant, Indicates the current vector to be specified at the current moment; S203, the current mechanical angular velocity Defined as a state variable ; S204, the current vector to be specified at the current moment Defined as control variable ; S205: According to the state variable and the control variables , construct a discretized state space model; the expression of the discretized state space model is: In the formula, is the predicted state at the next moment, is the mechanical characteristic matrix of permanent magnet synchronous motor, is the torque response matrix, is the load torque disturbance matrix; S206, Order The actual mechanical angular velocity is the reference value of the mechanical angular velocity command. Assign to , that is: let the output , defines the mechanical angular velocity output error; where the mechanical angular velocity output error The expression is: In the formula, is the mechanical angular velocity command reference value, For output, is the actual value of mechanical angular velocity; S207. Define the impact degree as the second-order derivative of the mechanical angular velocity; wherein the expression of the impact degree is: In the formula, is the impact degree, represents the derivative, is the mechanical angular velocity, is the system time; S208, establishing a discretization model for predicting the impact degree according to the impact degree by using a second-order forward difference method; The expression of the discretization model for predicting shock degree is: In the formula, To predict the The impact of the moment, According to The state prediction obtained at the moment Moment status, According to The state prediction obtained at the moment Moment status, is the state variable at the current moment, is the prediction time interval; S209, define torque smoothness as control quantity The second derivative of The expression is: In the formula, To control the amount, represents the derivative, is the system time; S210, according to the moment smoothness, using the second-order backward difference method to establish a prediction moment smoothness discretization model; wherein the expression of the prediction moment smoothness discretization model is: In the formula, To predict the The moment smoothness of the moment, is the control variable at the current moment, For the The current vector at time For the The current vector at time is the prediction time interval, represents the derivative, is the system time; S211: Define a first cost function according to the mechanical angular velocity output error, the predicted impact degree discretization model and the predicted torque smoothness discretization model. It is the predicted speed error + predicted impact + predicted torque smoothness; In the formula, is the length of the prediction interval, Indicates that based on the current moment Backward Prediction step, represents transpose, The predicted The mechanical angular velocity output error at the moment, The predicted Time impact, The predicted Moment smoothness, is the weight coefficient for the accumulated error between each predicted mechanical angular velocity and the expected value, is the weight coefficient accumulated for each predicted second-order derivative of the mechanical angular velocity, The weight coefficient accumulated for each prediction moment smoothness; S212: within the prediction interval, iteratively process the state information at the current moment to obtain a state space prediction model The recursive expression of is: In the formula, is the mechanical characteristic matrix of permanent magnet synchronous motor The nested matrix of is the column matrix of the predicted state variables, is the torque response matrix The nested matrix of is the control variable at the current moment The nested matrix of is the load torque disturbance matrix The coefficient matrix of is the load torque disturbance matrix; S213: The first cost function In: Expand the process and define it as the second cost function ; Wherein, the second cost function The expression is: In the formula, Mechanical angular velocity command reference value The column matrix of is the transformed matrix, is a set of transformation matrices, is the column matrix of the predicted state variables, represents transpose, The weight coefficient for the accumulated error between each predicted mechanical angular velocity and the expected value The set of diagonal matrices of ; S214, substituting the state space recursive prediction model into the second cost function , and discard the initial state constant term to obtain the new second cost function ; S215: The first cost function The second item in: Expand and define it as the third cost function; the expression of the third cost function is: In the formula, represents the third cost function, is the column matrix of predicted impact degree, represents transpose, The weight coefficient accumulated for each predicted mechanical angular velocity second derivative The set of diagonal matrices of ; S216, substituting the state space recursive prediction model into the third cost function , and discard the initial state constant term to obtain a new third cost function ; S217, the third term in the first cost function: Expand the process and define it as the fourth cost function ; The fourth cost function The expression is: In the formula, is the control variable at the current moment, For the The current vector at time For the The current vector at time represents transpose, Weight coefficient accumulated for each forecast moment smoothness The set of diagonal matrices of ; S218, substituting the state space recursive prediction model into the fourth cost function , and discard the initial state constant term to obtain the new fourth cost function ; S219, according to the new second cost function , the new third cost function And the new fourth cost function , construct the quadratic cost function of the control quantity ; ; The algorithm of the preset unconstrained conjugate gradient descent method is as follows: for the quadratic function ,beg ; In the formula, represents a variable vector, represents transpose, represents a quadratic matrix, represents the linear term matrix, Represents a quadratic function Get the minimum value of the variable; The algorithm framework of the preset unconstrained conjugate gradient descent method is as follows: Step 1: Set the initial value of the iteration , accuracy threshold and the maximum number of iterations ;in, ; Step 2: Calculate the gradient of the initial position , define the negative gradient ; In the formula, Represents the gradient, represents a quadratic matrix, Indicates the independent variable, is the linear term matrix; Step 3: Order , and perform the following cycle: (1) If or , stop iteration, exit the loop, output As the optimal solution, represents the variable vector for each iteration, express The corresponding gradient value is express The 2-norm of ; (2) Calculate the descending step length , ; In the formula, express The corresponding negative gradient; (3) Update iteration point , ; (4) Calculate the new gradient , ; (5) Calculate the combination coefficient , ; (6) Calculate the conjugate direction , ; (7) Update , ,make , return to loop step (1) and repeat the loop; In step S4, the transfer function expression of the linear tracking differentiator is: In the formula, is the Laplace operator, is the convergence speed of the linear tracking differentiator; In step S4, the expression of the reference current vector is: In the formula, is the reference current vector, represents the limiting function, is the transfer function of the linear tracking differentiator, represents the optimal solution of the current vector of the quadratic cost function at the current sampling time, Indicates the upper limit of the amplitude, Indicates the lower limit of the amplitude.

2. A method for predicting torque smoothing control of a permanent magnet synchronous motor using an anti-shock model according to claim 1, characterized in that: The permanent magnet synchronous motor anti-shock model prediction torque smoothing control method is used to control a built-in permanent magnet synchronous motor or a surface mounted permanent magnet synchronous motor.

3. A method for smoothing torque control of a permanent magnet synchronous motor according to any one of claims 1 to 2, characterized in that: The method for giving the orthogonal axis reference current is: control, maximum torque current ratio control, flux weakening control, maximum torque voltage ratio control or minimum loss control.

4. A permanent magnet synchronous motor anti-shock model prediction torque smoothing control device, characterized in that: Include: A data acquisition module is used to acquire the state information collected by the preset sensor, and transform the state information through Clark transformation and Park transformation to acquire the two-phase current in the stationary coordinate system and the orthogonal axis current in the rotating coordinate system; wherein the state information includes the three-phase current, rotor position and mechanical angular velocity at the last two sampling moments; The cost function construction module is used to obtain the reference speed and load torque observation values, combine the state information with the kinematic equation of the permanent magnet synchronous motor, and establish a discretized state space model; set the prediction time interval and prediction interval, use the current vector as the control quantity, design the cost function as the predicted speed error + predicted impact + predicted torque smoothness, set the cost weight coefficient, establish a state space recursive prediction model, iteratively process the state information within the prediction interval, and obtain the quadratic cost function of the control quantity; The cost function solving module is used to call the preset unconstrained conjugate gradient descent method to iteratively solve the quadratic cost function to obtain the optimal solution of the control amount matrix of the quadratic cost function, and then let ; In the formula, represents the optimal solution of the current vector of the quadratic cost function at the current sampling moment, Represents the control matrix The first row of the optimal solution; A current vector calculation module is used to transfer the optimal solution of the control quantity to the linear tracking differentiator, and then limit the amplitude after further smooth transition by the linear tracking differentiator, so as to serve as a reference current vector of the current distribution strategy at the current moment; A reference current calculation module, used to calculate and process the reference current vector using a preset current distribution strategy, determine the current vector angle, and obtain the orthogonal axis reference current; A reference voltage calculation module, used for processing the state information and the orthogonal axis reference current using a current loop controller to obtain a dq axis reference voltage; The modulation drive module is used to perform inverse Park transformation on the rotor position at the current moment and the dq axis reference voltage to obtain the two-phase reference voltage in the stationary coordinate system. and ; Then, the two-phase reference voltage in the stationary coordinate system is modulated by SVPWM to generate a PWM signal; Then, the PWM signal is output to the voltage source inverter to generate the desired stator voltage and three-phase current in the stator winding of the permanent magnet synchronous motor to drive the permanent magnet synchronous motor to operate; The data acquisition module is used to execute steps S201 to S219; S201. Construct a dynamic model of the permanent magnet synchronous motor according to the load torque observation value and the kinematic characteristics of the permanent magnet synchronous motor; wherein the expression of the dynamic model of the permanent magnet synchronous motor is: In the formula, Indicates the mechanical angular velocity of the permanent magnet synchronous motor at the current moment, Represents the derivative of the mechanical angular velocity of the permanent magnet synchronous motor at the current moment, is the viscous damping coefficient, represents the moment of inertia, Indicates the current sampling time. Indicates the load torque observation value at the current moment, is the torque constant, Indicates the current vector to be specified at the current moment; S202, setting the prediction time interval to , and then the first-order forward Euler method is used to discretize the dynamic model of the permanent magnet synchronous motor to obtain the discretized dynamic model of the permanent magnet synchronous motor; wherein, the expression of the discretized dynamic model of the permanent magnet synchronous motor is: In the formula, To predict the The mechanical angular velocity of the permanent magnet synchronous motor at the moment, is the viscous damping coefficient, is the prediction time interval, represents the moment of inertia, Indicates the mechanical angular velocity of the permanent magnet synchronous motor at the current moment, Indicates the load torque observation value at the current moment, is the torque constant, Indicates the current vector to be specified at the current moment; S203, the current mechanical angular velocity Defined as a state variable ; S204, the current vector to be specified at the current moment Defined as control variable ; S205: According to the state variable and the control variables , construct a discretized state space model; the expression of the discretized state space model is: In the formula, is the predicted state at the next moment, is the mechanical characteristic matrix of permanent magnet synchronous motor, is the torque response matrix, is the load torque disturbance matrix; S206, Order The actual mechanical angular velocity is the reference value of the mechanical angular velocity command. Assign to , that is: let the output , defines the mechanical angular velocity output error; where the mechanical angular velocity output error The expression is: In the formula, is the mechanical angular velocity command reference value, For output, is the actual value of mechanical angular velocity; S207. Define the impact degree as the second-order derivative of the mechanical angular velocity; wherein the expression of the impact degree is: In the formula, is the impact degree, represents the derivative, is the mechanical angular velocity, is the system time; S208, establishing a discretization model for predicting the impact degree according to the impact degree by using a second-order forward difference method; The expression of the discretization model for predicting shock degree is: In the formula, To predict the The impact of the moment, According to The state prediction obtained at the moment Moment status, According to The state prediction obtained at the moment Moment status, is the state variable at the current moment, is the prediction time interval; S209, define torque smoothness as control quantity The second derivative of The expression is: In the formula, To control the amount, represents the derivative, is the system time; S210, according to the moment smoothness, using the second-order backward difference method to establish a prediction moment smoothness discretization model; wherein the expression of the prediction moment smoothness discretization model is: In the formula, To predict the The moment smoothness of the moment, is the control variable at the current moment, For the The current vector at time For the The current vector at time is the prediction time interval, represents the derivative, is the system time; S211: Define a first cost function according to the mechanical angular velocity output error, the predicted impact degree discretization model and the predicted torque smoothness discretization model. It is the predicted speed error + predicted impact + predicted torque smoothness; In the formula, is the length of the prediction interval, Indicates that based on the current moment Backward Prediction step, represents transpose, The predicted The mechanical angular velocity output error at the moment, The predicted Time impact, The predicted Moment smoothness, is the weight coefficient for the accumulated error between each predicted mechanical angular velocity and the expected value, is the weight coefficient accumulated for each predicted second-order derivative of the mechanical angular velocity, The weight coefficient accumulated for each prediction moment smoothness; S212: within the prediction interval, iteratively process the state information at the current moment to obtain a state space prediction model The recursive expression of is: In the formula, is the mechanical characteristic matrix of permanent magnet synchronous motor The nested matrix of is the column matrix of the predicted state variables, is the torque response matrix The nested matrix of is the control variable at the current moment The nested matrix of is the load torque disturbance matrix The coefficient matrix of is the load torque disturbance matrix; S213: The first cost function In: Expand and define it as the second cost function ; Wherein, the second cost function The expression is: In the formula, Mechanical angular velocity command reference value The column matrix of is the transformed matrix, is a set of transformation matrices, is the column matrix of the predicted state variables, represents transpose, The weight coefficient for the accumulated error between each predicted mechanical angular velocity and the expected value The set of diagonal matrices of ; S214, substituting the state space recursive prediction model into the second cost function , and discard the initial state constant term to obtain the new second cost function ; S215: The first cost function The second item in: Expand and define it as the third cost function; the expression of the third cost function is: In the formula, represents the third cost function, is the column matrix of predicted impact degree, represents transpose, The weight coefficient accumulated for each predicted mechanical angular velocity second derivative The set of diagonal matrices of ; S216, substituting the state space recursive prediction model into the third cost function , and discard the initial state constant term to obtain a new third cost function ; S217, the third term in the first cost function: Expand the process and define it as the fourth cost function ; The fourth cost function The expression is: In the formula, is the control variable at the current moment, For the The current vector at time For the The current vector at time represents transpose, Weight coefficient accumulated for each forecast moment smoothness The set of diagonal matrices of ; S218, substituting the state space recursive prediction model into the fourth cost function , and discard the initial state constant term to obtain the new fourth cost function ; S219, according to the new second cost function , the new third cost function And the new fourth cost function , construct the quadratic cost function of the control quantity ; ; The algorithm of the preset unconstrained conjugate gradient descent method is as follows: for the quadratic function ,beg ; In the formula, represents a variable vector, represents transpose, represents a quadratic matrix, represents the linear term matrix, Represents a quadratic function Get the minimum value of the variable; The algorithm framework of the preset unconstrained conjugate gradient descent method is as follows: Step 1: Set the initial value of the iteration , accuracy threshold and the maximum number of iterations ;in, ; Step 2: Calculate the gradient of the initial position , define the negative gradient ; In the formula, represents the gradient, represents a quadratic matrix, Indicates the independent variable, is the linear term matrix; Step 3: Order , and perform the following cycle: (1) If or , stop iteration, exit the loop, output As the optimal solution, represents the variable vector for each iteration, express The corresponding gradient value is express The 2-norm of ; (2) Calculate the descending step length , ; In the formula, express The corresponding negative gradient; (3) Update iteration point , ; (4) Calculate the new gradient , ; (5) Calculate the combination coefficient , ; (6) Calculate the conjugate direction , ; (7) Update , ,make , return to loop step (1) and repeat the loop; In the current vector calculation module, the transfer function expression of the linear tracking differentiator is: In the formula, is the Laplace operator, is the convergence speed of the linear tracking differentiator; In the current vector calculation module, the expression of the reference current vector is: In the formula, is the reference current vector, represents the clipping function, is the transfer function of the linear tracking differentiator, represents the optimal solution of the current vector of the quadratic cost function at the current sampling time, Indicates the upper limit of the amplitude, Indicates the lower limit of the amplitude.

5. A permanent magnet synchronous motor anti-shock model prediction torque smoothing control device, characterized in that: It includes a sensor, a processor, a memory, a PWM generator and an inverter, and a computer program stored in the memory; the computer program can be executed by the processor to implement a permanent magnet synchronous motor anti-impact model prediction torque smoothing control method as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a permanent magnet synchronous motor anti-shock model prediction torque smoothing control method as described in any one of claims 1 to 3.