CN115882761A - Motor control method, device, chip, storage medium and system - Google Patents

Motor control method, device, chip, storage medium and system Download PDF

Info

Publication number
CN115882761A
CN115882761A CN202211249028.XA CN202211249028A CN115882761A CN 115882761 A CN115882761 A CN 115882761A CN 202211249028 A CN202211249028 A CN 202211249028A CN 115882761 A CN115882761 A CN 115882761A
Authority
CN
China
Prior art keywords
motor
real
current
subdivision number
pwm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211249028.XA
Other languages
Chinese (zh)
Other versions
CN115882761B (en
Inventor
揣亚威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Xianji Semiconductor Technology Co ltd
Original Assignee
Tianjin Xianji Semiconductor Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin Xianji Semiconductor Technology Co ltd filed Critical Tianjin Xianji Semiconductor Technology Co ltd
Priority to CN202211249028.XA priority Critical patent/CN115882761B/en
Publication of CN115882761A publication Critical patent/CN115882761A/en
Application granted granted Critical
Publication of CN115882761B publication Critical patent/CN115882761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Control Of Electric Motors In General (AREA)

Abstract

The invention provides a motor control method, a motor control device, a motor control chip, a storage medium and a motor control system, wherein the method comprises the following steps: acquiring a first real-time current of a motor in a rotating coordinate system and real-time running time of the motor; obtaining the speed of the motor based on the acceleration and deceleration curve function of the motor, the target speed and the real-time running time of the motor; obtaining a motor subdivision number based on the speed of the motor, the frequency of PWM pulses and a preset subdivision number threshold; acquiring an electric angle of the motor based on the motor subdivision number and the motor parameters; acquiring a PWM duty ratio based on the electrical angle of the motor and the first real-time current of the motor in a rotating coordinate system; obtaining PWM pulses based on the PWM duty cycle; and taking the PWM pulse as an input signal of a motor driving circuit, and controlling the motor through the motor driving circuit. The invention is used for improving the problems of high cost and poor anti-interference performance in the existing motor control process.

Description

Motor control method, device, chip, storage medium and system
Technical Field
The invention relates to the field of motor control, in particular to a motor control method, a motor control device, a motor control chip, a storage medium and a motor control system.
Background
The field of 3D printers or machine tools needs a plurality of stepping motors to be controlled in a coordinated mode, the existing control scheme is that a main control chip sends simple pulse signals to a plurality of paths of motor driving chips to the motor driving chips, the motor driving chips drive the plurality of paths of motors to move, and meanwhile the main control chip can conduct other processing related to data, communication and display.
This approach presents the following problems: (1) The motor driving chip needs to have noise characteristics, but the motor driving chip with low noise characteristics has higher cost, and the better the silencing effect is, the higher the chip price is; (2) The main control chip and the motor driving chip are two separated elements, and information transmission is required between the main control chip and the motor driving chip through signal transmission, so that external electromagnetic characteristic interference is easily received.
Disclosure of Invention
In view of the above disadvantages of the prior art, the present invention provides a method, an apparatus, a chip, a storage medium and a system for controlling a motor, so as to solve the problems of high cost and poor interference resistance existing in the existing motor control process.
To achieve the above and other related objects, the present invention provides a method for controlling a motor, including:
acquiring a first real-time current of a motor in a rotating coordinate system and real-time running time of the motor;
obtaining the speed of the motor based on the acceleration and deceleration curve function of the motor, the target speed and the real-time running time of the motor;
obtaining a motor subdivision number based on the speed of the motor, the frequency of PWM pulses and a preset subdivision number threshold;
acquiring the electrical angle of the motor based on the motor subdivision number and the motor parameters;
acquiring a PWM duty ratio based on the electric angle of the motor and the first real-time current of the motor in a rotating coordinate system;
acquiring PWM pulses based on the PWM duty ratio;
and taking the PWM pulse as an input signal of a motor driving circuit, and controlling the motor through the motor driving circuit.
In an embodiment of the present invention, the preset subdivision number threshold includes an upper threshold and a lower threshold, and obtaining the motor subdivision number based on the speed of the motor, the frequency of the PWM pulse, and the preset subdivision number threshold includes:
obtaining the maximum subdivision number of the motor based on the speed of the motor and the frequency of the PWM pulse;
comparing the maximum subdivision number with the upper threshold and the lower threshold, respectively;
when the maximum subdivision number is smaller than or equal to a lower threshold limit, the motor subdivision number is the lower threshold limit; when the maximum subdivision number is greater than a lower threshold limit and less than an upper threshold limit, the motor subdivision number is the maximum subdivision number; when the maximum subdivision number is greater than or equal to a threshold upper limit, the motor subdivision number is the threshold upper limit.
In an embodiment of the present invention, the step of obtaining the first real-time current of the motor in the rotating coordinate system includes: the method comprises the steps of obtaining real-time voltage of a motor in a rotating coordinate system, obtaining motor current based on the real-time voltage, and conducting phase compensation processing on the motor current to obtain first real-time current of the motor in the rotating coordinate system.
In an embodiment of the present invention, the obtaining the PWM duty ratio based on the electrical angle of the motor and the first real-time current of the motor in the rotating coordinate system includes:
filtering the first real-time current of the motor in a rotating coordinate system to obtain a first intermediate current;
taking the electrical angle of the motor as a variable of park transformation, and carrying out park transformation on the first intermediate current to obtain the current of the motor in a static coordinate system;
carrying out PI regulation on the current of the motor in a static coordinate system to obtain a second intermediate current;
carrying out inverse park transformation on the second intermediate current to obtain a second current of the motor in a rotating coordinate system;
and performing modulation operation based on the second current of the motor in the rotating coordinate system to obtain the PWM duty ratio.
In one embodiment of the present invention, the modulation operation is an SVPWM operation.
In an embodiment of the present invention, the obtaining an electrical angle of the motor based on the motor subdivision number and the motor parameter includes:
acquiring a motor subdivision number and a motor pole pair number;
calculating the electrical angle of the motor according to an electrical angle calculation formula of the motor;
wherein, theThe electrical angle calculation formula of the motor is as follows:
Figure BDA0003887141660000031
the present invention also provides a control device of a motor, including: the device comprises a real-time acquisition module, a rotating speed calculation module, a subdivision number calculation module, an electrical angle calculation module, a PWM duty ratio calculation module and a PWM generation module;
the real-time acquisition module is used for acquiring a first real-time current of the motor in a rotating coordinate system and the real-time running time of the motor;
the rotating speed calculation module is used for obtaining the speed of the motor based on the acceleration and deceleration curve function and the target speed of the motor;
the subdivision number calculation module is used for obtaining the subdivision number of the motor based on the speed of the motor, the frequency of PWM (pulse-width modulation) pulses and a preset subdivision number threshold;
the electric angle calculation module is used for acquiring the electric angle of the motor based on the motor subdivision number and the motor parameters;
the first real-time current calculation module is used for acquiring a first real-time current of the motor in a rotating coordinate system;
the PWM duty ratio calculation module is used for acquiring a PWM duty ratio based on the electric angle of the motor and the first real-time current of the motor in the rotating coordinate system;
the PWM generating module is used for acquiring PWM pulses based on the PWM duty ratio; the PWM pulse is used as an input signal of a motor driving circuit, and the motor is controlled through the motor driving circuit.
In an embodiment of the present invention, the PWM generation module generates at least one set of PWM duty cycles, and the number of sets of PWM duty cycles corresponds to the number of motor driving circuits.
The present invention also provides a chip comprising:
one or more processors;
a storage device for storing one or more programs that, when executed by the one or more processors, cause the electronic device to implement the method of controlling the motor.
The present invention also provides a storage medium comprising: on which a program is stored which, when being executed by a processor, carries out the method of controlling an electric motor.
The present invention also provides a motor control system, comprising:
the main control chip is the chip;
the power supply circuit is electrically connected with the main control chip and comprises a plurality of power supply conversion circuits;
the sampling circuit is respectively and electrically connected with the main control chip and the power circuit, and comprises a plurality of electric signal acquisition circuits;
and the driving circuit is respectively electrically connected with the main control chip and the power circuit and comprises at least one motor driving circuit, the motor driving circuit is electrically connected with the motor, and an input signal of the driving circuit is a PWM pulse generated by the PWM generating module.
In an embodiment of the present invention, the driving circuit includes a plurality of motor driving circuits, and the chip controls the plurality of motor driving circuits respectively.
According to the control method of the motor, the rotating speed of the motor is obtained through the acceleration and deceleration curve function of the motor and the target rotating speed, and the process that the motor reaches the target speed from the initial speed is changed along with time, so that the subdivision number of the motor and the electrical angle of the motor are changed along with the change of the rotating speed of the motor at the stage, and the PWM duty ratio is changed at the stage, namely the duty ratio of PWM pulse is correspondingly changed at the stage. Therefore, the self-adaptive adjustment of the PWM duty ratio is realized in the acceleration or deceleration stage of the motor. Meanwhile, the logic control function is located outside the drive circuit, the motor can be directly driven through the drive circuit, the requirement of the existing motor drive chip on the logic control function is removed, the requirement on the motor drive chip is reduced, and therefore the control cost can be effectively reduced. In addition, the driving circuit is used for driving the motor, so that signal transmission between the main control chip and the motor chip is avoided, and the anti-interference capability of the motor in the control process can be effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a control method of a motor of the present invention;
FIG. 2 is a schematic diagram of a method of controlling the motor of the present invention;
fig. 3 is a block diagram showing a structure of a control apparatus of a motor according to the present invention;
FIG. 4 is a schematic diagram of a multi-motor control apparatus of the present invention;
FIG. 5 is a diagram of a connection structure of a chip according to the present invention;
FIG. 6 is a schematic diagram of a power supply circuit according to the present invention;
FIG. 7 is a schematic diagram of an electrical signal acquisition circuit according to the present invention;
fig. 8 is a schematic diagram of a motor driving circuit according to the present invention.
Description of the element reference numerals
101. A real-time acquisition module; 102. a rotation speed calculation module; 103. a subdivision number calculation module; 104. an electrical angle calculation module; 105. a first real-time current calculation module; 106. a PWM duty ratio calculation module; 107. a PWM generating module; 200. a motor drive circuit.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict. It is also to be understood that the terminology used in the examples is for the purpose of describing particular embodiments only, and is not intended to limit the scope of the present invention. Test methods in which specific conditions are not specified in the following examples are generally carried out under conventional conditions or under conditions recommended by the respective manufacturers.
It should be understood that the terms "upper", "lower", "left", "right", "middle" and "a" used herein are used for descriptive purposes only and are not intended to limit the scope of the present invention, and that the relative relationship between the terms and the terms should be construed as the scope of the present invention without substantial change in the technical spirit.
Referring to fig. 1 to 2, the present invention provides a method for controlling a motor, including:
and acquiring a first real-time current of the motor in a rotating coordinate system and the real-time running time of the motor. In an embodiment of the present invention, the sampling circuit acquires a voltage signal, the voltage signal needs to be converted into a current signal, and meanwhile, due to a hysteresis effect of a stepping motor current (the current may change phase in the implementation process of a rotating magnetic field), the motor current is subjected to hysteresis effect compensation, i.e., phase compensation, and then is subjected to filtering processing, so as to obtain a stable first real-time current of the motor in a rotating coordinate system. The specific process can be as follows: collecting the voltage of a motor under a rotating coordinate system, obtaining motor current based on the voltage, and performing phase compensation processing on the motor current to obtain first real-time current of the motor under the rotating coordinate system; in the process, the real-time running time of the motor is obtained. The first real time current comprises an all-phase first real time current. Taking a two-phase motor in a 3D printer as an example, the first real-time current includes an a-phase first real-time current and a b-phase first real-time current.
And obtaining the speed of the motor based on the acceleration and deceleration curve function of the motor, the target speed and the real-time running time of the motor. The acceleration and deceleration curve function of the motor comprises: the motor speed reduction process is the inverse process of the acceleration process. Taking the acceleration phase as an example, the acceleration curve function f (t) of the motor may be:
Figure BDA0003887141660000061
the speed of the motor is correspondingly changed according to the acceleration curve function, and based on the prior art, the error between the theoretical speed and the real speed of the motor is within a reasonable range, so that the theoretical speed of the motor can be regarded as the real speed, and the speed R of the motor can be obtained t Comprises the following steps:
R t =R target f(t) (2)
Wherein t is a time variable, e is a natural constant, R is a speed of the motor (the speed of the motor refers to a rotating speed of the motor), and R is t Is the motor speed at time t, R Target Is the target speed of the motor. In the present invention, the starting point of time (i.e., the zero time) is the point in time when the motor starts to operate.
The deceleration process of the motor is the reverse process of the motor acceleration, and is not described herein. Based on equation 2, it can be concluded that the speed of the motor in the acceleration phase or the deceleration phase of the motor varies with time.
And obtaining the motor subdivision number based on the speed of the motor, the frequency of the PWM pulse and a preset subdivision number threshold value. The preset subdivision number threshold is one of factory parameters of the motor, and comprises an upper threshold and a lower threshold. The factory parameter of the motor is a parameter that has been set when the motor is shipped. The specific implementation process of the step is as follows:
obtaining the maximum subdivision number N of the motor based on the speed of the motor and the frequency of the PWM pulses Maximum t . The specific calculation formula is as follows:
Figure BDA0003887141660000071
wherein, N Maximum t The maximum subdivision number of the motor at the time t is shown;
Figure BDA0003887141660000072
the step pitch is a fixed step pitch of the motor, and the fixed step pitch of the motor is one of delivery parameters of the motor and is a known quantity; f c Is the frequency of the PWM pulse, is a known quantity; pi is the circumference ratio; based on equation 3, it can be concluded that the maximum subdivision number of the motor in the acceleration phase or the deceleration phase varies with time. />
Comparing the maximum subdivision number with the upper threshold limit and the lower threshold limit, respectively; when the maximum subdivision number is smaller than or equal to a lower threshold limit, the motor subdivision number is the lower threshold limit; when the maximum subdivision number is greater than a lower threshold limit and less than an upper threshold limit, the motor subdivision number is the maximum subdivision number; when the maximum subdivision number is greater than or equal to a threshold upper limit, the motor subdivision number is the threshold upper limit. Therefore, the motor subdivision number can be adaptively adjusted, and the noise is effectively reduced.
Thus, the number of subdivision of the motor N Subdivision of The formula of (1) is as follows:
Figure BDA0003887141660000073
wherein N is Subdivision t Number of subdivision of motor at time t, N Maximum t To a maximum subdivision number, N Upper limit of Is the upper threshold, N Lower limit of Is the lower threshold.
Since the control of the stepping motor is open-loop control and the mechanical angle of the current motor cannot be obtained, the variable theta can be introduced as the electrical angle of the stepping motor. Assuming that the fixed PWM period is 50Khz, the period of the control loop is equal to the PWM period, and the current rotating speed is known, the maximum subdivision number which can be currently realized can be calculated, whether the subdivision number is in a subdivision range given by a user or not is judged, if the subdivision is used, the upper limit and the lower limit of the currently given range are used, and a warning of subdivision overrun is thrown to the user, so that subdivision self-adaptation is realized.
And acquiring the electrical angle of the motor based on the motor subdivision number and the motor parameters. The motor parameters comprise motor delivery parameters, the motor delivery parameters comprise motor pole pair number, and the calculation formula of the electrical angle of the motor is as follows:
Figure BDA0003887141660000081
because the information acquired by the acquisition circuit is discrete, a concept of tn is introduced in formula 5, tn is the time of tn, and n is a positive integer; the time length between two adjacent time points is greater than or equal to
Figure BDA0003887141660000082
θ tn Electrical angle of the motor at time tn, theta 0 Is the initial electrical angle of the motor>
Figure BDA0003887141660000083
For fixed step pitch of the motor, P is the number of pole pairs of the motor, N Subdivision tn The number of motor subdivisions at time tn. In one embodiment of the present invention, the initial electrical angle is zero, and therefore, it is necessary to initially adjust the motor so that the initial electrical angle of the motor is zero at the beginning of the operation of the motor.
And obtaining the PWM duty ratio based on the electric angle of the motor and the first real-time current of the motor in the rotating coordinate system. The specific process can be as follows:
and respectively carrying out filtering processing on all-phase first real-time current of the motor under a rotating coordinate system to obtain all-phase first intermediate current. The low-pass filter filters all the phase first real-time currents to remove noise (i.e., high-frequency components) in the currents, so as to obtain a stable current value, wherein the frequency of the low-pass filter may be 0.8K to 1.2K hz, for example, 1K hz.
Taking a two-phase motor in a 3D printer as an example, the first intermediate current comprises an a-phase first intermediate current i a1 And b-phase first intermediate current i b1
And carrying out park transformation on the first intermediate current by taking the electrical angle of the motor as a variable of the park transformation to obtain the current of the motor in a static coordinate system. The current of the motor in the stationary coordinate system includes all phase currents, taking a two-phase motor as an example, the current in the stationary coordinate system includes d-axis current and q-axis current, and a specific park transformation formula is as follows:
Figure BDA0003887141660000091
where θ is the electrical angle of the motor, i d1 Is d-axis current, i q1 Is the q-axis current.
And carrying out PI regulation on the current of the motor in the static coordinate system to obtain a second intermediate current, wherein the current value of the second intermediate current is in an ideal state. The second intermediate current is a current in a static coordinate system and comprises all axis second intermediate currents. Taking a two-phase motor as an example, the second intermediate current includes: d axis second intermediate current i d2 And q-axis second intermediate current i q2
And performing inverse park transformation on the second intermediate current to obtain a second current of the motor in a rotating coordinate system. The second current includes all phase currents, e.g., a two-phase motor, the second current includes a-phase second current i a2 And b-phase second current i b2 . The specific antiparker transform is:
Figure BDA0003887141660000092
and performing PWM modulation based on the second current of the motor in the rotating coordinate system to obtain a PWM duty ratio. The PWM modulation may be SVPWM (space vector pulse modulation) operation modulation, taking a two-phase motor as an example, the specific operation process is:
Figure BDA0003887141660000101
wherein, A, B, C, M 1 、u α 、u β 、M 2 And is an intermediate parameter, S is a sector, T S Is the PWM period, u d Is a power supply voltage (the power supply voltage may be 24V), T x And T y Is the PWM duty cycle.
PWM pulses are obtained based on the PWM duty cycle. The correspondence between the PWM duty and the sector is shown in table 1, where t1 t2 corresponds to the energization time of the two-phase motor:
sector S 1 2 3 4
C 4 3 1 2
t1 T x T y -T x -T y
t2 T y -T x -T y T x
TABLE 1
And taking the PWM pulse as an input signal of a motor driving circuit, and controlling the motor through the motor driving circuit.
It should be noted that, when multiple motors are controlled, because the information collected by the electric signal collecting circuits corresponding to different motors is different, the PWM pulses corresponding to each motor are also different.
Referring to fig. 3 to 4, the present invention further provides a control device for a motor, including: the real-time acquisition module 101 is used for acquiring a first real-time current of the motor in a rotating coordinate system and a real-time running time of the motor; the device comprises a rotating speed calculation module 102, a subdivision number calculation module 103, an electrical angle calculation module 104, a PWM duty ratio calculation module 105 and a PWM generation module 106; the real-time obtaining module 101 is configured to obtain a first real-time current of the motor in the rotating coordinate system and a real-time running time of the motor. The rotating speed calculating module 102 is configured to obtain a speed of the motor based on the acceleration/deceleration curve function of the motor and the target speed; the subdivision number calculation module 103 obtains a motor subdivision number based on the speed of the motor, the frequency of the PWM pulse and a preset subdivision number threshold; the electric angle calculation module 104 acquires the electric angle of the motor based on the motor subdivision number and the motor parameters; the PWM duty ratio calculation module 105 acquires a PWM duty ratio based on the electric angle of the motor and the first real-time current of the motor in the rotating coordinate system; the PWM generation module 106 obtains PWM pulses based on the PWM duty cycle; the PWM pulse is used as an input signal of the motor driving circuit 200, and controls the motor through the motor driving circuit.
The present invention also provides a chip comprising:
one or more processors;
a storage device for storing one or more programs that, when executed by the one or more processors, cause the electronic device to implement the method of controlling the motor.
In an embodiment of the present invention, the chip is a multi-core processor chip, and a functional unit is further disposed in the chip, and the functional unit includes a communication module and a display module; the functional units and the computing modules are respectively positioned in different cores when working. Taking a dual-core processor as an example, each computing module may be located in one core, and the functional unit may be located in another core.
The present invention also provides a storage medium comprising: on which a program is stored which, when being executed by a processor, carries out the method of controlling an electric motor.
The present invention also provides a motor control system, comprising:
the main control chip is the chip;
the power supply circuit is electrically connected with the main control chip and comprises a plurality of power supply conversion circuits;
the sampling circuit is respectively and electrically connected with the main control chip and the power circuit, and comprises a plurality of electric signal acquisition circuits;
and the driving circuit is respectively electrically connected with the main control chip and the power circuit and comprises at least one motor driving circuit, the motor driving circuit is electrically connected with the motor, and an input signal of the driving circuit is a PWM pulse generated by the PWM generating module.
The main control chip is shown in fig. 5, the power circuit is shown in fig. 6, the electric signal acquisition circuit is shown in fig. 7, and the circuit driving circuit is shown in fig. 8.
In an embodiment of the present invention, the driving circuit includes a plurality of motor driving circuits, and the chip controls the plurality of motor driving circuits respectively. Each motor driving circuit corresponds to a plurality of electric signal acquisition circuits, and the electric signal acquisition circuits corresponding to one motor driving circuit are consistent with the number of the motors.
According to the control method of the motor, the rotating speed of the motor is obtained through the acceleration and deceleration curve function of the motor and the target rotating speed, and the process that the motor reaches the target speed from the initial speed is changed along with time, so that the subdivision number of the motor and the electrical angle of the motor are changed along with the change of the rotating speed of the motor at the stage, and the PWM duty ratio is changed at the stage, namely the duty ratio of PWM pulse is correspondingly changed at the stage. Therefore, the self-adaptive adjustment of the PWM duty ratio is realized in the acceleration or deceleration stage of the motor. Meanwhile, the logic control function is located outside the drive circuit, the motor can be directly driven through the drive circuit, the requirement of the existing motor drive chip on the logic control function is removed, the requirement on the motor drive chip is reduced, and therefore the control cost can be effectively reduced. In addition, the driving circuit is used for driving the motor, so that signal transmission between the main control chip and the motor chip is avoided, and the anti-interference capability of the motor in the control process can be effectively improved.
According to the motor control system, the whole system is integrated on one chip and the SOC, the motors are driven through the driving circuit, one motor control chip with a logic control function is saved for each motor, and the control cost of the motors is greatly reduced. Can be through the motion of a mos pipe direct control four ways step motor at most to step motor's control function all integrates on a chip soc, and what output is PWM signal, even single PWM signal receives the operation that interference can not influence the motor yet, can effectively improve the electromagnetic stability of system. The stepping motor control system integrated in the chip can return necessary state information to the control unit through the program interface and carry out bidirectional communication. The internal motor control system adjusts the maximum control precision which can be realized at the current speed through the expected speed obtained in the communication. And the microprocessor is a multi-core microprocessor, and tasks such as motor control tasks, display communication and the like can be executed by separating different cores, so that the real-time performance and the safety are improved.
Therefore, the invention effectively overcomes some practical problems in the prior art, thereby having high utilization value and use significance.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (10)

1. A method of controlling a motor, comprising:
acquiring a first real-time current of a motor in a rotating coordinate system and real-time running time of the motor;
obtaining the speed of the motor based on the acceleration and deceleration curve function of the motor, the target speed and the real-time running time of the motor;
obtaining a motor subdivision number based on the speed of the motor, the frequency of PWM pulses and a preset subdivision number threshold;
acquiring an electric angle of the motor based on the motor subdivision number and the motor parameters;
acquiring a PWM duty ratio based on the electric angle of the motor and the first real-time current of the motor in a rotating coordinate system;
acquiring PWM pulses based on the PWM duty ratio;
and taking the PWM pulse as an input signal of a motor driving circuit, and controlling the motor through the motor driving circuit.
2. The method of claim 1, wherein the preset subdivision number threshold comprises an upper threshold and a lower threshold, and wherein obtaining the motor subdivision number based on the speed of the motor, the frequency of the PWM pulses, and the preset subdivision number threshold comprises the steps of:
obtaining the maximum subdivision number of the motor based on the speed of the motor and the frequency of the PWM pulses;
comparing the maximum subdivision number with the upper threshold and the lower threshold, respectively;
when the maximum subdivision number is smaller than or equal to a lower threshold limit, the motor subdivision number is the lower threshold limit; when the maximum subdivision number is greater than a lower threshold limit and less than an upper threshold limit, the motor subdivision number is the maximum subdivision number; when the maximum subdivision number is greater than or equal to a threshold upper limit, the motor subdivision number is the threshold upper limit.
3. The method for controlling the motor according to claim 1, wherein the obtaining of the PWM duty ratio based on the electrical angle of the motor and the first real-time current of the motor in the rotating coordinate system comprises the steps of:
filtering the first real-time current of the motor in a rotating coordinate system to obtain a first intermediate current;
the electrical angle of the motor is used as a variable of park transformation, and park transformation is carried out on the first intermediate current to obtain the current of the motor in a static coordinate system;
carrying out PI regulation on the current of the motor under a static coordinate system to obtain a second intermediate current;
carrying out inverse park transformation on the second intermediate current to obtain a second current of the motor in a rotating coordinate system;
and performing modulation operation based on the second current of the motor in the rotating coordinate system to obtain the PWM duty ratio.
4. The method of claim 3, wherein the modulation operation is an SVPWM operation.
5. The method for controlling the motor according to claim 1, wherein the step of obtaining the first real-time current of the motor in the rotating coordinate system comprises the steps of: the method comprises the steps of obtaining real-time voltage of a motor in a rotating coordinate system, obtaining motor current based on the voltage, and conducting phase compensation processing on the motor current to obtain first real-time current of the motor in the rotating coordinate system.
6. The method for controlling the motor according to claim 1, wherein the step of obtaining the electrical angle of the motor based on the motor subdivision number and the motor parameter comprises the steps of:
acquiring a motor subdivision number and a motor pole pair number;
calculating the electrical angle of the motor according to an electrical angle calculation formula of the motor;
wherein, the electrical angle calculation formula of the motor is as follows:
Figure FDA0003887141650000021
7. a control device of a motor, characterized by comprising:
the real-time acquisition module is used for acquiring a first real-time current of the motor in a rotating coordinate system and the real-time running time of the motor;
the rotating speed calculation module is used for obtaining the speed of the motor based on the acceleration and deceleration curve function of the motor, the target speed and the real-time running time of the motor;
the subdivision number calculation module is used for obtaining the subdivision number of the motor based on the speed of the motor, the frequency of PWM (pulse-width modulation) pulses and a preset subdivision number threshold;
the electric angle calculation module is used for acquiring the electric angle of the motor based on the motor subdivision number and the motor parameters;
the PWM duty ratio calculation module is used for acquiring a PWM duty ratio based on the electric angle of the motor and the first real-time current of the motor in the rotating coordinate system;
the PWM generating module is used for acquiring PWM pulses based on the PWM duty ratio; the PWM pulse is used as an input signal of a motor driving circuit, and the motor is controlled through the motor driving circuit.
8. A chip, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the chip to implement the control method of the motor according to any one of claims 1 to 6.
9. A storage medium, comprising: stored thereon a program which, when being executed by a processor, carries out a method of controlling an electric motor according to any one of claims 1 to 3.
10. A motor control system, comprising:
a master control chip, the master control chip being the chip of claim 8;
the power supply circuit is electrically connected with the main control chip and comprises a plurality of power supply conversion circuits;
the sampling circuit is respectively and electrically connected with the main control chip and the power circuit, and comprises a plurality of electric signal acquisition circuits;
and the driving circuit is respectively electrically connected with the main control chip and the power circuit and comprises at least one motor driving circuit, the motor driving circuit is electrically connected with the motor, and an input signal of the driving circuit is a PWM pulse generated by the PWM generating module.
CN202211249028.XA 2022-10-12 2022-10-12 Motor control method, device, chip, storage medium and system Active CN115882761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211249028.XA CN115882761B (en) 2022-10-12 2022-10-12 Motor control method, device, chip, storage medium and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211249028.XA CN115882761B (en) 2022-10-12 2022-10-12 Motor control method, device, chip, storage medium and system

Publications (2)

Publication Number Publication Date
CN115882761A true CN115882761A (en) 2023-03-31
CN115882761B CN115882761B (en) 2024-07-09

Family

ID=85770415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211249028.XA Active CN115882761B (en) 2022-10-12 2022-10-12 Motor control method, device, chip, storage medium and system

Country Status (1)

Country Link
CN (1) CN115882761B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005287189A (en) * 2004-03-30 2005-10-13 Japan Servo Co Ltd Stepping motor drive
JP2006271117A (en) * 2005-03-24 2006-10-05 Japan Servo Co Ltd Drive unit for stepping motor
CN107769643A (en) * 2017-11-30 2018-03-06 深圳市青蓝自动化科技有限公司 A kind of method for controlling stepping motor, device, stepper motor and storage medium
CN109981008A (en) * 2019-04-19 2019-07-05 广东乐之康医疗技术有限公司 Infusion control method and its equipment with stepper motor
US20210003422A1 (en) * 2018-03-02 2021-01-07 Nidec Corporation Position estimation method, position estimation device, and motor module
CN112751516A (en) * 2020-11-03 2021-05-04 宁波央腾汽车电子有限公司 Motor rotating speed control method and device based on subdivision prediction

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005287189A (en) * 2004-03-30 2005-10-13 Japan Servo Co Ltd Stepping motor drive
JP2006271117A (en) * 2005-03-24 2006-10-05 Japan Servo Co Ltd Drive unit for stepping motor
CN107769643A (en) * 2017-11-30 2018-03-06 深圳市青蓝自动化科技有限公司 A kind of method for controlling stepping motor, device, stepper motor and storage medium
US20210003422A1 (en) * 2018-03-02 2021-01-07 Nidec Corporation Position estimation method, position estimation device, and motor module
CN109981008A (en) * 2019-04-19 2019-07-05 广东乐之康医疗技术有限公司 Infusion control method and its equipment with stepper motor
CN112751516A (en) * 2020-11-03 2021-05-04 宁波央腾汽车电子有限公司 Motor rotating speed control method and device based on subdivision prediction

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘泽旭等: "两相混合式步进电机矢量控制系统", 《轻工机械》, vol. 38, no. 5, 31 October 2020 (2020-10-31), pages 55 - 61 *

Also Published As

Publication number Publication date
CN115882761B (en) 2024-07-09

Similar Documents

Publication Publication Date Title
US5625264A (en) System for controlling a brushless DC motor
US6008618A (en) Zero speed start-up for a speed sensorless induction motor drive
CN110880895B (en) Method for determining q-axis current compensation value of permanent magnet synchronous motor and method for suppressing pulsation
CN105991071B (en) A kind of constant moment of force control method of ECM motor
CN110289792A (en) Scaling method, control method and the bench test control system of permanent magnet synchronous motor
DE10330425A1 (en) Vector-oriented control system for synchronous machines with permanent magnets using parameter setting tables
DE102013217440A1 (en) Determination of the torque capability of an electrical machine
CN112737428A (en) Motor rotating speed pulse feedback control method and device, controller and air conditioning system
CN103647493A (en) H infinite-rotation-speed estimation method for permanent-magnet synchronous motor
CN115882761A (en) Motor control method, device, chip, storage medium and system
CN114915234A (en) Motor and harmonic noise optimization method and device thereof
CN109981015A (en) Motor drive control method, device, circuit and transducer air conditioning
CN109600088A (en) A kind of harmonic current injection device and method of three-phase inverter
CN115347845A (en) High-speed motor carrier frequency modulation method
CN102386839B (en) Synchronous motor vector controller based on reactive power observer and control method
CN112583325A (en) Stepless speed regulation driving system, method and device, electronic equipment and storage medium
CN219611626U (en) Vector controller based on rotary transformer
CN108683378A (en) A method of using electric control system come to motor torque oscillation compensation
CN219936323U (en) Controller testing system using motor stator
CN115776257A (en) Secondary filtering implementation method and system for brushless electric regulation of unmanned aerial vehicle
CN215934757U (en) Motor vector control system and washing machine
CN113472246B (en) Driving power generation control method, driving power generation control device and driving power generation control system
CN220605703U (en) BLDC motor interface sub-circuit board and BLDC motor
CN110311610B (en) Motor flux weakening control method, motor flux weakening control device and frequency converter
CN113014172B (en) Common-mode voltage suppression method and device adopting virtual pulse vibration vector

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230517

Address after: 201206 Room 203, building 3, No. 111, Xiangke Road, Pudong New Area, Shanghai

Applicant after: Shanghai Xianji Semiconductor Technology Co.,Ltd.

Address before: Room 503, East Tower, Building 5, No. 22, Kaihua Road, Huayuan Industrial Zone, Binhai Hi tech Zone, Tianjin 300040

Applicant before: Tianjin Xianji Semiconductor Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant