Stepping motor control system based on deep learning

By adopting a combination of deep learning and ADRC controller in the stepper motor control system, the stepper motor's shortcomings in accuracy and efficiency are solved, and higher control accuracy and immunity are achieved.

CN119420226APending Publication Date: 2025-02-11JIANGSU UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411492308.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The existing stepper motor control system has shortcomings in terms of accuracy and efficiency, especially in the open-loop control process, which is the problem of low accuracy, high power consumption, high heat generation and low torque utilization.

Method used

The three-closed-loop vector control system based on deep learning is adopted, combined with the cascading ADRC controller and deep learning module, the parameters of the LESO module are dynamically adjusted to improve control accuracy and immunity.

Benefits of technology

It effectively improves the angle and speed control accuracy of stepper motors, reduces torque fluctuations, and improves overall control performance and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420226A_ABST
    Figure CN119420226A_ABST
Patent Text Reader

Abstract

The invention provides a stepping motor control system based on deep learning. The stepping motor control system comprises a P controller, an ADRC controller, a first PI controller, a second PI controller, a first coordinate transformation module, an SVPWM module, an inverter module and an encoder. The ADRC controller comprises a first LESO module and a second LESO module which are in cascade connection and is used for estimating the rotating speed disturbance quantity in the operation process of the stepping motor, the control performance of the angle and the rotating speed of the stepping motor in the actual application process can be effectively improved, and therefore the stepping motor can be better applied to an electric transmission system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of stepper motor control, in particular to a stepper motor speed control system. Background Art

[0002] A stepper motor is a motor that converts electrical pulse signals into angular displacement. It is widely used in industrial automation, CNC machine tools, printers, and robots. Unlike traditional motors, each pulse signal of a stepper motor causes it to rotate a fixed angle, thus enabling precise position control. However, open-loop stepper motors have the problem of low precision, and the subdivided pulse signal is not enough to achieve precise position control. In addition, these motors consume high power, generate excess heat, and exhibit low torque utilization.

[0003] Regarding the high-precision control algorithm of stepper motors, most of the existing technologies control the stepper motor by subdividing the step angle, and the existing dual closed-loop control algorithms of stepper motors all use the more conventional PI (Proportional-Integral) control algorithm. In order to further improve the control accuracy, the literature [1] (Zhai Yan, Guo Yangkuan, Zhu Lianqing, et al. Simulation study of fuzzy PID closed-loop control system of stepper motor [J]. Modern Electronic Technology, 2015, 38 (11): 146-149) introduced the comparative simulation results of stepper motors under PID (Proportional-Integral-Derivative control) and fuzzy PID control, proving the importance and feasibility of using fuzzy PID control in stepper motor control. Reference [2] (Han S, Wang WB, Wang Y, et al. Opening and Closing Positioning Control of the Seedling Picking-Up Mechanism Based on Fuzzy-PID Control Algorithm [J]. Processes, 2022.10 (7): 1349-1349) uses fuzzy PID to control stepper motors to improve the step loss and low-frequency vibration problems of stepper motors. However, stepper motors still have problems such as high heat generation, high power consumption, and low torque utilization efficiency. Although these studies can improve the control accuracy to a certain extent, they are unable to estimate the disturbance during the operation of the stepper motor, resulting in a lack of control accuracy. Summary of the invention

[0004] In order to overcome the above shortcomings, the present invention provides a stepper motor control system based on deep learning, which can effectively improve the control performance of the stepper motor angle and speed in actual application, so as to be better applied to electrical transmission systems.

[0005] The technical solution provided by the present invention is:

[0006] A stepper motor control system based on deep learning, comprising:

[0007] P controller, used to obtain the speed setpoint ω based on the angular error of the stepper motor rotor * The angle error is based on the actual rotor angle calculated by the encoder. and the angle given value θ * get;

[0008] An ADRC controller is connected to the P controller and is used to control the speed based on the given value ω * The actual motor speed calculated by the encoder The speed error e1 between the two gets the given value of the quadrature axis current. The ADRC controller includes a cascaded first LESO module and a second LESO module, which are used to estimate the speed disturbance during the operation of the stepper motor and feedback-adjust the quadrature-axis current given value of the ADRC module.

[0009] A first PI controller is connected to the ADRC controller and is used to control the quadrature axis current based on the given value. The actual value of the quadrature axis current i collected by the current sensor q The quadrature axis current error between the two axes is used to obtain the quadrature axis voltage given value u q ;

[0010] The second PI controller is used to set the direct axis current based on the preset and the actual value of the direct-axis current i collected by the current sensor d The direct axis current error between the two can be used to obtain the direct axis voltage given value u d ;

[0011] The first coordinate transformation module is connected to the first PI controller and the second PI controller respectively, and is used to transform the quadrature axis current given value u q and the direct axis voltage given value u d After Park inverse transformation, the first torque winding voltage u in the stationary coordinate system is obtained respectively α and the second torque winding voltage u β ;

[0012] SVPWM module and inverter module, the SVPWM module is connected to the first coordinate transformation module, the inverter module is connected to the SVPWM module, the SVPWM module and inverter module are used to generate a voltage based on the first torque winding voltage u α and the second torque winding voltage u β Get the stepper motor input voltage u A1 、u A2 、u B1 and u B2 .

[0013] The stepper motor control system based on deep learning provided by the present invention can at least bring the following beneficial effects:

[0014] 1. The use of three-closed-loop vector control not only effectively solves the problem of low precision in the open-loop control process of the stepper motor, but also effectively reduces the torque fluctuation problem during operation.

[0015] 2. The speed loop adopts a cascaded ADRC controller to estimate the internal and external disturbances through the second LESO module, and improve the control performance through the first LESO module.

[0016] 3. Use the deep learning module to dynamically adjust the parameters of the first LESO module and the second LESO module to improve the control effect of the entire controller.

[0017] 4. Use the Adam algorithm to update the weights of the deep learning algorithm, and adjust the learning rate of each parameter by calculating the first-order moment estimate and second-order moment estimate of the gradient, so as to achieve more efficient network training. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a schematic diagram of the structure of a stepper motor control system based on deep learning according to the present invention;

[0019] Figure 2 for Figure 1 The structural schematic diagram of the medium stepper motor controller;

[0020] Figure 3 for Figure 2 Structural schematic diagram of the ADRC controller. DETAILED DESCRIPTION

[0021] In order to more clearly illustrate the implementation cases of the present invention or the technical solutions in the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings and other implementation methods can be obtained based on these drawings without creative work.

[0022] like Figure 1 As shown, the stepper motor control system consists of a stepper motor controller 1 and a stepper motor 2.

[0023] like Figure 2 As shown, for the stepper motor controller 1, the angle, speed and current three-loop closed-loop control is adopted, which is composed of a P controller 31, an ADRC controller 41, a first PI controller 32, a second PI controller 33, a first coordinate transformation module 34, an SVPWM module 35, an inverter module 36, a first coordinate transformation module 34 and an encoder 38. Among them, the ADRC controller 41 is connected to the P controller 31, the first PI controller 32 is connected to the ADRC controller 41, the first coordinate transformation module 34 is connected to the first PI controller 32 and the second PI controller 33 respectively, the SVPWM module 35 is connected to the first coordinate transformation module 34, and the inverter module 36 is connected to the SVPWM module 35. The encoder 38 obtains the actual rotor angle of the stepper motor after calculation. and the actual motor speed The calculation process is as follows:

[0024]

[0025] Among them, ΔP is the encoder pulse accumulation value; T s is the interrupt cycle of the controller; L e is the number of encoder lines.

[0026] The encoder 38 calculates the actual rotor angle through the angle and the angle given value θ * The error between them gives the actual rotor angle Afterwards, the angle error is input to the P controller 31, and the P controller 31 obtains the speed set value ω based on the angle error of the stepper motor rotor. * . Use the speed calculation function of encoder 38 to get the actual motor speed Set the speed to the given value ω * The actual motor speed The speed error e1 after the difference is taken as the input of the ADRC controller 41, and the quadrature axis current given value is obtained after passing through the ADRC controller 41. Use current sensor to collect two-phase current i a and i b After Clarke transformation and Park transformation, the actual value of the quadrature axis current i in the rotating coordinate system is obtained. q and the actual value of the direct-axis current i d (corresponding to the second coordinate transformation module 37 in the figure). and the actual value of the quadrature axis current i qThe quadrature axis current error between the two is used as the input of the first PI controller 32 to obtain the quadrature axis voltage given value u q . Set the preset direct axis current given value and the actual value of the direct-axis current i d The direct axis current error between is used as the input of the second PI controller 33 to obtain the direct axis voltage given value u d After that, the obtained quadrature axis voltage given value u q and the direct axis voltage given value u d After Park inverse transformation, the first torque winding voltage u in the stationary coordinate system is obtained α and the second torque winding voltage u β The voltage is used as the input of the SVPWM module 35 and the inverter module 36, and the input voltage u of the stepper motor is obtained through the SVPWM module 35 and the inverter module 36. A1 、u A2 、u B1 and u B2 .

[0027] In order to estimate the disturbance during the operation of the stepper motor and perform feedback regulation, the ADRC controller in the present invention further includes a cascaded first LESO module 43 and a second LESO module 44 to estimate the speed disturbance during the operation of the stepper motor and feedback regulate the quadrature axis current given value of the ADRC module 41. Specifically, if Figure 3 As shown, the ADRC controller includes: an LSEF module 42, a first operation module, a second operation module, a third operation module, a fourth operation module, a first LESO module 43, a second LESO module 44 and a deep learning module 45, wherein the LSEF module 42 is connected to the P controller 31, the first operation module is connected to the LSEF module 42 and the second operation module respectively, the second operation module is also connected to the first LESO module 43, the third operation module is connected to the first operation module and the fourth operation module respectively, the fourth operation module is also connected to the first LESO module 43 and the second LESO module 44 respectively, and the deep learning module 45 is connected to the first LESO module 43 and the second LESO module 44 respectively.

[0028] The LSEF module 42 is used to perform gain control on the speed error e1 to obtain an output value a as the input of the first operation module:

[0029] a=β0·e1

[0030] Here, β0 represents the controller gain of the LSEF module 42 .

[0031] The first operation module is used to obtain a given value of the quadrature axis current based on the output value a of the LSEF module 42 and the output value f1 of the second operation module. As the input of the third operation module and the output of the ADRC controller:

[0032]

[0033] Here, a represents the output of the LSEF module 42, and f1 represents the output value of the second operation module.

[0034] The second operation module is used to estimate the disturbance z based on the preliminary 22 and the interference observation value s output by the first LESO module 43 22 The output value f1 is obtained as the input of the first operation module:

[0035] f1=z 22 +s 22

[0036] Among them, z 22 represents the preliminary estimated disturbance estimated by the second LESO module 44, s 22 represents the residual estimated disturbance estimated by the first LESO module 43.

[0037] The third operation module is used to set the quadrature axis current output by the first operation module. Gain control is performed to obtain the output value b, which is used as the input of the fourth operation module and the second LESO module:

[0038]

[0039] Among them, b s It is a constant, which is related to the motor parameters. Generally, it is a constant after the resistance and inductance of the motor are determined. It represents the given value of the quadrature-axis current output by the first operation module.

[0040] The fourth operation module is used to convert the output value b of the third operation module and the preliminary estimated disturbance z of the output of the second LESO module 44 22 The output value f0 is added and used as the input of the first LESO module 43:

[0041] f0=z 22 +b

[0042] Among them, z 22 represents the preliminary estimated disturbance estimated by the second LESO module 44 .

[0043] The second LESO module 44 is used to preliminarily estimate the disturbance of the stepper motor to obtain a first speed estimation value z 21 and a preliminary estimate of the disturbance z22 , the first speed estimate z 21 is transmitted back to the second LESO module 44 for subsequent iterative calculations to preliminarily estimate the disturbance z 22 As the input of the second operation module. The state equation of the second LESO module 44 is:

[0044]

[0045] Among them, z 21 represents the first speed estimation value; b s is a constant, related to the motor parameters; Indicates the actual speed of the motor; β w1 and β w2 represents the observer gain of the second LESO module 44; u represents the quadrature axis (q axis) command current

[0046] The first LESO module 43 and the second LESO module 44 form a cascade structure for performing a secondary estimation on the disturbance of the stepper motor to obtain a second speed estimation value s 21 and the remaining estimated disturbance s 22 , the second speed estimation value s 21 The first LESO module 43 is passed back to the first LESO module 43 for subsequent iterative calculations. In order to better track and correct the interference in the system, the preliminary estimated interference of the second LESO module 44 is regarded as a known part in the first LESO module 43. The state equation of the first LESO module 43 is established based on this known interference:

[0047]

[0048] in, s21 and z21 The speed tracking effect is similar, β w3 and β w4 represents the observer gain of the second LESO module 44; u represents the quadrature axis (q axis) command current

[0049] The ADRC controller provided by the present invention comprises a first LESO module 43 and a second LESO module 44 connected in cascade to form an enhanced LESO, which replaces the traditional LESO as an integrator. The enhanced LESO can improve the stability of the speed loop by reducing the observation weight, thereby timely tracking and correcting interference under a smaller observation bandwidth.

[0050] The deep learning module 45 is used to iteratively update the observer gains of the first LESO module 43 and the second LESO module 44 respectively. The Adam algorithm is used to update the weights and biases, and the iterative output values ​​are used to update the coefficients β of the first LESO module 43 and the second LESO module 44.w1 , β w2 , β w3 and β w4 .

[0051] The deep learning method has good parameter fitting ability and has good effect in the process of dynamic parameter adjustment. w1 , β w2 , β w3 and β w4 The dynamic adjustment is mainly achieved through the following methods:

[0052] Hidden layer input and output calculation during deep learning:

[0053]

[0054] in, Represents the weight coefficient of the hidden layer; Represents the output value of the input layer; represents the input value of the hidden layer; f(·) represents the activation function; represents the hidden layer value; i represents the number of hidden layer nodes, j represents the number of input layer nodes, and k represents the current iteration state.

[0055] The input and output parts corresponding to the output layer are:

[0056]

[0057] in, is the weight coefficient of the output layer; is the output value of the hidden layer; is the input value of the output layer; g(·) is the activation function; is the hidden layer value, and l represents the number of output layer nodes.

[0058] The parameters of the ADRC controller 41 need to be adjusted by deep learning methods, and these parameters are represented by each element of the output node. The following functions are used as activation functions: f(·) and g(·), respectively, where:

[0059]

[0060] Here, x represents the input variable.

[0061] The loss function J chooses the mean square error:

[0062]

[0063] Among them, y i is the system output value, is the output value of the coefficient estimation, and n represents the total accumulated number.

[0064] In order to better adjust the weights of the deep learning method, the Adam algorithm is used to update the gradient value:

[0065] First-order moment estimate (momentum term):

[0066]

[0067] Among them, m t is the first-order moment estimate at time t; m t-1 is the first-order moment estimate at time t-1; α1 is the decay rate of the first-order momentum estimate, usually α1 = 0.9; t represents the current state, Represents the gradient value of the loss function.

[0068] Second moment estimate (mean square term):

[0069]

[0070] Among them, α2 is the decay rate of the second-order moment estimate, usually α2 = 0.999; v t represents the second-order moment estimate at time t, v t-1 Represents the second-order moment estimate at time t-1.

[0071] Bias correction:

[0072]

[0073] in, and are the reciprocals of α1 and α2 raised to the power of t respectively. represents the first-order moment correction value at time t, Represents the second-order moment correction value at time t.

[0074] Requested parameter update:

[0075]

[0076] Here, ∈ is a small constant to prevent the denominator from being zero, usually ∈=10 -8 ; η is the learning rate, which controls the step size of parameter update; θ t is the β required at time t w1 , β w2 , β w3 and β w4 Equal parameter values, θ t+1 is the β required at time t+1 w1 , β w2 , β w3 and β w4 etc. parameter values.

[0077] In the present invention, the error is minimized by the mean square error function to ensure that the deep learning method optimizes the controller performance in real time. The Adam optimization algorithm is used to update the weights and biases of the network through first-order momentum and second-order momentum estimation, so that the system can be continuously adjusted during the control process to ensure higher accuracy and real-time performance, and continuously update the parameters of the ADRC controller 41, so that the controller can be adjusted in real time according to the current system state in actual applications to achieve higher control accuracy, response speed and anti-interference ability.

[0078] It should be noted that the above embodiments can be freely combined as needed. The above are only preferred embodiments of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention.

Claims

1. A stepper motor control system based on deep learning, characterized in that: include: P controller, used to obtain the speed setpoint ω based on the angular error of the stepper motor rotor * The angle error is based on the actual rotor angle calculated by the encoder. and the angle given value θ * get; An ADRC controller is connected to the P controller and is used to control the speed based on the given value ω * The actual motor speed calculated by the encoder The speed error e1 between the two gets the given value of the quadrature axis current. The ADRC controller includes a cascaded first LESO module and a second LESO module, which are used to estimate the speed disturbance during the operation of the stepper motor and feedback-adjust the quadrature-axis current given value of the ADRC module. A first PI controller is connected to the ADRC controller and is used to control the quadrature axis current based on the given value. The actual value of the quadrature axis current i collected by the current sensor q The quadrature axis current error between the two axes is used to obtain the quadrature axis voltage given value u q ; The second PI controller is used to set the direct axis current based on the preset and the actual value of the direct-axis current i collected by the current sensor d The direct axis current error between the two can be used to obtain the direct axis voltage given value u d ; The first coordinate transformation module is connected to the first PI controller and the second PI controller respectively, and is used to transform the quadrature axis current given value u q and the direct axis voltage given value u d After Park inverse transformation, the first torque winding voltage u in the stationary coordinate system is obtained respectively α and the second torque winding voltage u β ; SVPWM module and inverter module, the SVPWM module is connected to the first coordinate transformation module, the inverter module is connected to the SVPWM module, the SVPWM module and inverter module are used to generate a voltage based on the first torque winding voltage u α and the second torque winding voltage u β Get the stepper motor input voltage u A1 、u A2 、u B1 and u B2 .

2. The stepper motor control system based on deep learning as claimed in claim 1, characterized in that: The ADRC controller includes: an LSEF module, a first operation module, a second operation module, a third operation module, a fourth operation module, a first LESO module, a second LESO module and a deep learning module, wherein the LSEF module is connected to the P controller, the first operation module is respectively connected to the LSEF module and the second operation module, the second operation module is also connected to the first LESO module, the third operation module is respectively connected to the first operation module and the fourth operation module, the fourth operation module is also respectively connected to the first LESO module and the second LESO module, and the deep learning module is respectively connected to the first LESO module and the second LESO module; The LSEF module is used to perform gain control on the speed error e1 to obtain an output value a; The first operation module is used to obtain a given value of the quadrature axis current based on the output value a of the LSEF module and the output value f1 of the second operation module. The second operation module is used to estimate the disturbance z based on the preliminary 22 and the interference observation value s output by the first LESO module 22 Get the output value f1; The third operation module is used to set the quadrature axis current output by the first operation module to a given value. Perform gain control to obtain output value b; The second LESO module is used to make a preliminary estimate of the disturbance of the stepper motor to obtain the first speed estimation value z 21 and a preliminary estimate of the disturbance z 22 , the first speed estimation value z 21 Passed back to the second LESO module; The fourth operation module is used to convert the output value b of the third operation module and the preliminary estimated disturbance z of the output of the second LESO module 22 Add to get the output value f0; The first LESO module is used to perform a secondary estimation of the disturbance of the stepper motor to obtain a second speed estimation value s 21 and the remaining estimated disturbance s 22 , the second speed estimation value s 21 Pass back to the first LESO module; The deep learning module is used to iteratively update the observer gains of the first LESO module and the second LESO module respectively.

3. The stepper motor control system based on deep learning as claimed in claim 2, characterized in that: In the LSEF module, the gain control process is: a=β0·e1 Where β0 represents the controller gain of the LSEF module.

4. The stepper motor control system based on deep learning as claimed in claim 2, characterized in that: The quadrature axis current given value obtained in the first operation module for: Wherein, a represents the output of the LSEF module, and f1 represents the output value of the second operation module.

5. The stepper motor control system based on deep learning as claimed in claim 2, characterized in that: The output value f1 obtained in the second operation module is: f1=z 22 +s 22 Among them, z 22 represents the initial estimated disturbance obtained by the second LESO module, s 22 represents the residual estimated disturbance estimated by the first LESO module.

6. The stepper motor control system based on deep learning as claimed in claim 2, characterized in that: The state equation of the second LESO module is: Among them, z 21 represents the first speed estimation value; b s is a constant, related to the motor parameters; Indicates the actual speed of the motor; β w1 and β w2 represents the observer gain of the second LESO module.

7. The stepper motor control system based on deep learning as claimed in claim 2, characterized in that: The output value b obtained in the third operation module is: Among them, b s is a constant, related to the motor parameters; It represents the given value of the quadrature-axis current output by the first operation module.

8. The stepper motor control system based on deep learning as claimed in claim 2, characterized in that: The output value f0 obtained in the fourth operation module is: f0=z 22 +b Among them, z 22 represents the preliminary estimated disturbance obtained by the second LESO module.

9. The stepper motor control system based on deep learning as claimed in claim 2, characterized in that: The state equation of the first LESO module is: Among them, β w3 and β w4 represents the observer gain of the second LESO module.

10. The stepper motor control system based on deep learning as claimed in claim 2, characterized in that: In the deep learning module, the Adam algorithm is used to update weights and biases.