[go: up one dir, main page]

CN112072967B - Motor driving pulse generation method and device and readable storage medium - Google Patents

Motor driving pulse generation method and device and readable storage medium Download PDF

Info

Publication number
CN112072967B
CN112072967B CN202010070482.3A CN202010070482A CN112072967B CN 112072967 B CN112072967 B CN 112072967B CN 202010070482 A CN202010070482 A CN 202010070482A CN 112072967 B CN112072967 B CN 112072967B
Authority
CN
China
Prior art keywords
speed
sampling period
value
maximum
parameter
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.)
Active
Application number
CN202010070482.3A
Other languages
Chinese (zh)
Other versions
CN112072967A (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.)
Hongjing Microelectronics Technology Co ltd
Original Assignee
Hongjing Microelectronics 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 Hongjing Microelectronics Technology Co ltd filed Critical Hongjing Microelectronics Technology Co ltd
Priority to CN202010070482.3A priority Critical patent/CN112072967B/en
Publication of CN112072967A publication Critical patent/CN112072967A/en
Application granted granted Critical
Publication of CN112072967B publication Critical patent/CN112072967B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P6/00Arrangements for controlling synchronous motors or other dynamo-electric motors using electronic commutation dependent on the rotor position; Electronic commutators therefor
    • H02P6/14Electronic commutators
    • H02P6/16Circuit arrangements for detecting position
    • H02P6/17Circuit arrangements for detecting position and for generating speed information
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P6/00Arrangements for controlling synchronous motors or other dynamo-electric motors using electronic commutation dependent on the rotor position; Electronic commutators therefor
    • H02P6/06Arrangements for speed regulation of a single motor wherein the motor speed is measured and compared with a given physical value so as to adjust the motor speed

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Motors That Do Not Use Commutators (AREA)
  • Control Of Electric Motors In General (AREA)

Abstract

The invention provides a motor driving pulse generating method, a device and a readable storage medium, comprising the following steps: acquiring a first parameter, and carrying out amplitude limiting processing on the first parameter to obtain a second parameter; carrying out self-adaptive adjustment on the first speed and compensating to obtain a second speed; performing amplitude limiting processing on the second speed to obtain a third speed based on the maximum speed limit and the maximum actual speed, wherein the maximum speed limit and the maximum actual speed are obtained from a second parameter; and performing overflow processing on the position values of the pulse and direction units based on a third speed and a second parameter to obtain a first position feedback value, wherein the first position feedback value is used for self-adaptive adjustment of the first speed of the next round obtained based on the position value of the first sampling period, the position value of the third sampling period and the fixed sampling period, and the time of the third sampling period is after the first sampling period. Thus, the first speed is adaptively adjusted and compensated, and the reliability of the conventional motor drive pulse generation method is improved.

Description

Motor driving pulse generation method and device and readable storage medium
Technical Field
The embodiment of the invention relates to the field of automatic control, in particular to a motor driving pulse generation method and device and a readable storage medium.
Background
The numerical control lathe technology is an important component in the manufacturing industry, wherein a servo system is one of important components in the numerical control lathe technology. Generally, a motor driving pulse generation method of a servo system includes a trapezoidal deceleration method and an S-curve deceleration method, but the trapezoidal deceleration method and the S-curve deceleration method only have a speed regulation effect, and have poor error adjustability for a position value and a speed value of a motor. It can be seen that the reliability of the existing motor drive pulse generation method is poor.
Disclosure of Invention
The embodiment of the invention aims to provide a motor driving pulse generating method, a motor driving pulse generating device and a readable storage medium, and solves the problem that the existing motor driving pulse generating method is poor in reliability.
In order to achieve the above object, the present invention is realized by:
in a first aspect, an embodiment of the present invention provides a motor driving pulse generating method, including:
acquiring a first parameter, and performing amplitude limiting processing on the first parameter to obtain a second parameter, wherein the first parameter comprises a position expected value, a scaling ratio, a pulse duty ratio, a pulse commutation time, a position value of a first sampling period, a position value of a second sampling period and a fixed sampling period;
the method comprises the steps of carrying out self-adaptive adjustment and compensation on a first speed to obtain a second speed, wherein the first speed is obtained by a position value of a first sampling period, a position value of a second sampling period and a fixed sampling period, and the time of the second sampling period is before the first sampling period;
performing amplitude limiting processing on the second speed to obtain a third speed based on a maximum speed limit and a maximum actual speed, wherein the maximum speed limit and the maximum actual speed are obtained from the second parameter;
and performing overflow processing on the position values of the pulse and direction units based on the third speed and the second parameter to obtain a first position feedback value, wherein the first position feedback value is used for adaptive adjustment of the first speed of the next round based on the position value of the first sampling period, the position value of a third sampling period and the fixed sampling period, and the time of the third sampling period is after the first sampling period.
In a second aspect, an embodiment of the present invention provides a motor driving pulse generating apparatus, including:
the device comprises an acquisition module, a data processing module and a data processing module, wherein the acquisition module is used for acquiring a first parameter and carrying out amplitude limiting processing on the first parameter to obtain a second parameter, and the first parameter comprises a position expected value, a scaling ratio, a pulse duty ratio, pulse commutation time, a position value of a first sampling period, a position value of a second sampling period and a fixed sampling period;
the adjusting module is used for carrying out self-adaptive adjustment on the first speed and compensating the first speed to obtain a second speed, wherein the first speed is obtained by a position value of a first sampling period, a position value of a second sampling period and a fixed sampling period, and the time of the second sampling period is before the first sampling period;
the speed limit module is used for carrying out amplitude limiting processing on the second speed to obtain a third speed based on a maximum speed limit and a maximum actual speed, wherein the maximum speed limit and the maximum actual speed are obtained from the second parameter;
and the feedback module is used for performing overflow processing on the position values of the pulse and direction units based on the third speed and the second parameter to obtain a first position feedback value, wherein the first position feedback value is used for adaptive adjustment of the first speed of the next round obtained based on the position value of the first sampling period, the position value of the third sampling period and the fixed sampling period, and the time of the third sampling period is after the first sampling period.
In a third aspect, an embodiment of the present invention provides a motor drive pulse generating apparatus, including: a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the motor drive pulse generating method according to the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the motor drive pulse generating method according to the first aspect.
One of the above technical solutions has the following advantages or beneficial effects:
in the embodiment of the invention, a first parameter is obtained, and amplitude limiting processing is performed on the first parameter to obtain a second parameter, wherein the first parameter comprises a position expected value, a scaling ratio, a pulse duty ratio, a pulse commutation time, a position value of a first sampling period, a position value of a second sampling period and a fixed sampling period; the method comprises the steps of carrying out self-adaptive adjustment and compensation on a first speed to obtain a second speed, wherein the first speed is obtained by a position value of a first sampling period, a position value of a second sampling period and a fixed sampling period, and the time of the second sampling period is before the first sampling period; performing amplitude limiting processing on the second speed to obtain a third speed based on a maximum speed limit and a maximum actual speed, wherein the maximum speed limit and the maximum actual speed are obtained from the second parameter; and performing overflow processing on the position values of the pulse and direction units based on the third speed and the second parameter to obtain a first position feedback value, wherein the first position feedback value is used for adaptive adjustment of the first speed of the next round based on the position value of the first sampling period, the position value of a third sampling period and the fixed sampling period, and the time of the third sampling period is after the first sampling period. Thus, the first speed is adaptively adjusted and compensated, and the reliability of the conventional motor drive pulse generation method is improved.
Drawings
FIG. 1 is a flow chart of a method for generating motor driving pulses according to an embodiment of the present invention;
FIG. 2 is a schematic block diagram of a method for generating motor driving pulses according to an embodiment of the present invention;
FIG. 3 is a schematic block diagram of another method for generating motor drive pulses according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a motor driving pulse generating device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another motor driving pulse generating device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, fig. 1 is a flowchart of a method for generating motor driving pulses according to an embodiment of the present invention, and as shown in fig. 1, the method includes the following steps:
step 101, obtaining a first parameter, and performing amplitude limiting processing on the first parameter to obtain a second parameter, wherein the first parameter includes a position expected value, a scaling ratio, a pulse duty ratio, a pulse commutation time, a position value of a first sampling period, a position value of a second sampling period, and a fixed sampling period.
Wherein, the position expected value, the scaling ratio, the pulse duty ratio and the pulse commutation time can be artificially set; the position value of the first sampling period, the position value of the second sampling period and the fixed sampling period can be obtained from the position and speed processing unit; the pulse commutation time determines the running direction of the motor, for example: when the position value variable is 0, the motor is in forward transmission, after 2ms, the position value variable is 1, the motor is in reverse rotation, and the motor movement direction discussed below is defaulted to be in the forward direction.
It should be noted that the motor driving pulse may be generated by the cooperation of a position and speed processing unit and a pulse and direction unit, the position and speed processing unit is used for adjusting the position and speed of the motor, the pulse and direction unit is used for sending a pulse signal to the motor, the position and speed processing unit is used for sending the speed increment after the position and speed of the motor are adjusted to the pulse and direction unit, and the pulse and direction unit is used for sending the position feedback value of the motor to the position and speed processing unit, as shown in fig. 2.
And 102, performing self-adaptive adjustment on the first speed and compensating the first speed to obtain a second speed, wherein the first speed is obtained by a position value of a first sampling period, a position value of a second sampling period and a fixed sampling period, and the time of the second sampling period is before the first sampling period.
The first speed can be understood as a speed corresponding to the first sampling period, the expected number of pulses is obtained based on a position expected value and a scaling ratio before the first speed is subjected to self-adaptive adjustment and compensation to obtain a second speed, and the first speed is subjected to self-adaptive adjustment and compensation if the actual number of pulses is smaller than the expected number of pulses; the second sampling period is timed before the first sampling period, and it is understood that the second sampling period is a previous sampling period to the first sampling period.
And 103, carrying out amplitude limiting processing on the second speed to obtain a third speed based on a maximum speed limit and a maximum actual speed, wherein the maximum speed limit and the maximum actual speed are obtained from the second parameter.
The third speed obtained by performing amplitude limiting processing on the second speed may be obtained by performing nonlinear saturation processing on the second speed, and limiting the maximum value of the absolute value of the second speed, so as to ensure that the pulse output speed in practical application is within a reasonable range, the pulse output speed may be understood as the pulse frequency, the reasonable range may be 52Khz to 5Mhz, the reasonable range may be artificially set, and the maximum practical speed may be obtained by limiting the scaling ratio and the maximum speed.
And 104, performing overflow processing on the position values of the pulse and direction units based on the third speed and the second parameter to obtain a first position feedback value, wherein the first position feedback value is used for adaptive adjustment of the first speed of the next round obtained based on the position value of the first sampling period, the position value of the third sampling period and the fixed sampling period, and the time of the third sampling period is after the first sampling period.
The first position feedback value can be understood as a position feedback value corresponding to the first sampling period, and since the adaptive adjustment of the first sampling period is applied to the position feedback value corresponding to the second sampling period, the first position feedback value is applied to the adaptive adjustment of the speed corresponding to the third sampling period (i.e., the first speed of the next round); the overflow processing of the position values of the pulse and direction units is completed in the pulse and direction units; the time of the third sampling period may be after the first sampling period a next sampling period where the third sampling period is the first sampling period.
In addition, in the third sampling period, the third speed may be a speed corresponding to the first sampling period.
It should be noted that, in the motor driving pulse generating method, there is theoretically jitter in the pulse generating process.
In the embodiment of the invention, a first parameter is obtained, and amplitude limiting processing is performed on the first parameter to obtain a second parameter, wherein the first parameter comprises a position expected value, a scaling ratio, a pulse duty ratio, a pulse commutation time, a position value of a first sampling period, a position value of a second sampling period and a fixed sampling period; the method comprises the steps of carrying out self-adaptive adjustment and compensation on a first speed to obtain a second speed, wherein the first speed is obtained by a position value of a first sampling period, a position value of a second sampling period and a fixed sampling period, and the time of the second sampling period is before the first sampling period; performing amplitude limiting processing on the second speed to obtain a third speed based on a maximum speed limit and a maximum actual speed, wherein the maximum speed limit and the maximum actual speed are obtained from the second parameter; and performing overflow processing on the position values of the pulse and direction units based on the third speed and the second parameter to obtain a first position feedback value, wherein the first position feedback value is used for adaptive adjustment of the first speed of the next round based on the position value of the first sampling period, the position value of a third sampling period and the fixed sampling period, and the time of the third sampling period is after the first sampling period. Thus, the first speed is adaptively adjusted and compensated, and the reliability of the conventional motor drive pulse generation method is improved.
Optionally, as shown in fig. 1, the performing amplitude limiting processing on the first parameter to obtain a second parameter includes:
and carrying out amplitude limiting processing on the pulse duty ratio and the pulse reversing time to obtain the second parameter.
The pulse duty ratio and the pulse reversing time are subjected to amplitude limiting processing, so that the pulse and direction unit can regulate the pulse speed to be stable.
It should be noted that the pulse duty ratio is equal to the duration of the high level in one pulse period divided by the duration of one pulse period, the duration of one pulse period is obtained by adding the duration of the high level in the pulse period and the duration of the low level in the pulse period, and the pulse duty ratio is set to complete the pulse width modulation.
In the embodiment of the invention, amplitude limiting processing is carried out on the pulse duty ratio and the pulse commutation time, so that the stability of the motor driving pulse generation method is improved.
Alternatively, as shown in fig. 1, the first speed is obtained by the following formula:
new_position_cmd=stepgen_position_cmd
v1=(new_position_cmd-old_position_cmd)/fperiod
wherein stepgen _ position _ cmd is the position expectation value, new _ position _ cmd is the position value of the first sampling period, v1 is the first velocity, old _ position _ cmd is the position value of the second sampling period, and fperiod is the fixed sampling period.
Assigning the position expected value to the position value of the first sampling period, and calculating a first speed; in a start-up phase of the generation of the motor drive pulse, i.e. when the second sampling period is zero, the position value of the second sampling period may be zero.
In the embodiment of the invention, the first speed is obtained by the position value of the first sampling period, the position value of the second sampling period and the sampling period, and the speed (namely the first speed) corresponding to the first sampling period is calculated by the position expected position (namely the position value of the first sampling period), so that the adjustability of the motor drive pulse generation method is further improved.
Optionally, as shown in fig. 1, the first speed is adaptively adjusted and compensated to obtain a second speed by the following formula:
v12=v1-m*est_err/fperiod
Figure BDA0002377180930000061
est_err=stepgen_position_fb+old_velocity_cmd*fperiod-new_position_cmd
wherein v12 is a median variable of the first speed and the second speed, m is an adjustment coefficient, scale is a scaling ratio, n is an adjustment coefficient, est _ err is an error value, stepgen _ position _ fb is a position feedback value corresponding to the second sampling period, and old _ velocity _ cmd is a speed corresponding to the second sampling period.
Where v12 has positive and negative values, n may have a value of 0.5, scale may have a value of 1000, and old _ vector _ cmd _ fperiod may be a fine tuning variable.
In the embodiment of the invention, the first speed is subjected to self-adaptive adjustment and compensated to obtain the second speed, so that the position value of the motor approaches to the expected position value, and the reliability of the motor driving pulse generation method is further improved.
Optionally, as shown in fig. 1, the performing amplitude limiting processing on the second speed based on the maximum speed limit and the maximum actual speed to obtain a third speed includes:
taking the smaller of the maximum speed limit and the maximum actual speed and setting it as the maximum value of the second speed;
if the second speed is less than the maximum value of the second speed, determining the second speed as the third speed;
and if the second speed is greater than or equal to the maximum value of the second speed, determining the maximum value of the second speed as the third speed.
In the embodiment of the invention, one of the maximum speed limit and the maximum actual speed which is small is taken and set as the maximum value of the second speed, the second speed is limited, the motor jitter is avoided, and the reliability of the motor driving pulse generating method is further improved.
Alternatively, as shown in fig. 1, the maximum speed limit and the maximum actual speed are obtained by the following formulas:
fmax=1.0/speed/(p_factor+steplen+stepspace)
actual_max=fmax/scale
wherein fmax is the maximum speed limit, actual _ max is the maximum actual speed, p _ factor is an adjustment coefficient, speed is a pulse speed, steplen is a high level duration in one pulse period, and stepspace is a low level duration in one pulse period.
The value range of the p _ factor can be 0-3, the fmax can be finely adjusted, and speed is the pulse speed in the pulse and direction unit and can also be understood as the output pulse speed of the motor.
In the embodiment of the invention, the stability of the motor can be ensured by setting the maximum speed limit and the maximum actual speed, and the reliability of the motor driving pulse generating method is further improved.
Optionally, as shown in fig. 1, the first position feedback value is obtained by the following formula:
v_inc=v3*q0*speed/q1
stepgen_position_fb=velocity_fb*fperiod
velocity_fb=(count-last_count)/scale/fperiod/M
wherein v3 is the third speed, v _ inc is the speed increment, q0 and q1 are both adjustment coefficients, velocity _ fb is the first speed feedback value, count is the pulse count of the first sampling period, last _ count is the pulse count of the second sampling period, and M is an adjustment coefficient.
Wherein q0 is the power of N of 2, the value range of N can be 10-20, the value range of q1 can be 1-8, and the value of M can be 2048.
The method comprises the steps of obtaining a speed increment based on a third speed and a second parameter, conducting overflow processing on position values of a pulse and direction unit to obtain a first speed feedback value, and obtaining a first position feedback value according to the first speed feedback value and a fixed sampling period.
It should be noted that the movement time of the motor may be divided into a certain number of time intervals, after each time interval is timed, after the time interval is adjusted by the position and speed processing unit, the speed increment v _ inc is accumulated to the position value variable, if the position value variable overflows, the pulse and direction unit may output a pulse, the motor operates in one step, the speed increment v _ inc changes according to each position value adjustment change, and as the time is continuously accumulated, the speed increment v _ inc continuously increases, and the position value variable overflows, as shown in fig. 3.
In the embodiment of the invention, the speed increment is obtained based on the third speed and the second parameter, the position values of the pulse and direction units are subjected to overflow processing to obtain the first speed feedback value, and the first position feedback value is obtained according to the first speed feedback value and the fixed sampling period, so that preparation is made for the self-adaptive adjustment corresponding to the next sampling period, and the reliability of the motor driving pulse generation method is further improved.
As shown in fig. 4, fig. 4 is a schematic structural diagram of a motor driving pulse generating device according to an embodiment of the present invention, and as shown in fig. 4, the motor driving pulse generating device 400 includes:
an obtaining module 401, configured to obtain a first parameter, and perform amplitude limiting processing on the first parameter to obtain a second parameter, where the first parameter includes a position expected value, a scaling ratio, a pulse duty cycle, a pulse commutation time, a position value of a first sampling period, a position value of a second sampling period, and a fixed sampling period;
an adjusting module 402, configured to perform adaptive adjustment and compensation on a first speed to obtain a second speed, where the first speed is obtained by a position value of a first sampling period, a position value of a second sampling period, and a fixed sampling period, and a time of the second sampling period is before the first sampling period;
a speed limit module 403, configured to perform amplitude limiting processing on the second speed to obtain a third speed based on a maximum speed limit and a maximum actual speed, where the maximum speed limit and the maximum actual speed are obtained from the second parameter;
a feedback module 404, configured to perform overflow processing on the position values of the pulse and direction units based on the third speed and the second parameter to obtain a first position feedback value, where the first position feedback value is used for adaptive adjustment of a first speed of a next round obtained based on the position value of the first sampling period, the position value of a third sampling period, and the fixed sampling period, and a time of the third sampling period is after the first sampling period.
Optionally, the obtaining module 401 is configured to:
and carrying out amplitude limiting processing on the pulse duty ratio and the pulse reversing time to obtain the second parameter.
Optionally, the adjusting module 402 is configured to calculate the first speed:
new_position_cmd=stepgen_position_cmd
v1=(new_position_cmd-old_position_cmd)/fperiod
wherein stepgen _ position _ cmd is the position expectation value, new _ position _ cmd is the position value of the first sampling period, v1 is the first velocity, old _ position _ cmd is the position value of the second sampling period, and fperiod is the fixed sampling period.
Optionally, the adjusting module 402 is further configured to calculate the second speed:
v12=v1-m*est_err/fperiod
Figure BDA0002377180930000091
est_err=stepgen_position_fb+old_velocity_cmd*fperiod-new_position_cmd
wherein v12 is a median variable of the first speed and the second speed, m is an adjustment coefficient, scale is a scaling ratio, n is an adjustment coefficient, est _ err is an error value, stepgen _ position _ fb is a position feedback value corresponding to the second sampling period, and old _ velocity _ cmd is a speed corresponding to the second sampling period.
Optionally, the speed limit module 403 is configured to:
taking the smaller of the maximum speed limit and the maximum actual speed and setting it as the maximum value of the second speed;
if the second speed is less than the maximum value of the second speed, determining the second speed as the third speed;
and if the second speed is greater than or equal to the maximum value of the second speed, determining the maximum value of the second speed as the third speed.
Optionally, the speed limit module 403 is further configured to calculate the maximum speed limit and the maximum actual speed:
fmax=1.0/speed/(p_factor+steplen+stepspace)
actual_max=fmax/scale
wherein fmax is the maximum speed limit, actual _ max is the maximum actual speed, p _ factor is an adjustment coefficient, speed is a pulse speed, steplen is a high level duration in one pulse period, and stepspace is a low level duration in one pulse period.
Optionally, the speed limit module 403 is further configured to calculate the first feedback position value:
v_inc=v3*q0*speed/q1
velocity_fb=(count-last_count)/scale/fperiod/M
stepgen_position_fb=velocity_fb*fperiod
wherein v3 is the third speed, v _ inc is the speed increment, q0 and q1 are both adjustment coefficients, velocity _ fb is the first speed feedback value, count is the pulse count of the first sampling period, last _ count is the pulse count of the second sampling period, and M is an adjustment coefficient.
The motor driving pulse generating device provided by the embodiment of the invention can realize each process realized in the method embodiment of fig. 1, can achieve the same beneficial effects, and is not repeated here for avoiding repetition.
As shown in fig. 5, fig. 5 is a schematic structural diagram of another motor driving pulse generating device according to an embodiment of the present invention, including: a processor 501, a memory 502 and a computer program stored on the memory 502 and executable on the processor.
Wherein the computer program when executed by the process 501 implements the steps of:
acquiring a first parameter, and performing amplitude limiting processing on the first parameter to obtain a second parameter, wherein the first parameter comprises a position expected value, a scaling ratio, a pulse duty ratio, a pulse commutation time, a position value of a first sampling period, a position value of a second sampling period and a fixed sampling period;
the method comprises the steps of carrying out self-adaptive adjustment and compensation on a first speed to obtain a second speed, wherein the first speed is obtained by a position value of a first sampling period, a position value of a second sampling period and a fixed sampling period, and the time of the second sampling period is before the first sampling period;
performing amplitude limiting processing on the second speed to obtain a third speed based on a maximum speed limit and a maximum actual speed, wherein the maximum speed limit and the maximum actual speed are obtained from the second parameter;
and performing overflow processing on the position values of the pulse and direction units based on the third speed and the second parameter to obtain a first position feedback value, wherein the first position feedback value is used for adaptive adjustment of the first speed of the next round based on the position value of the first sampling period, the position value of a third sampling period and the fixed sampling period, and the time of the third sampling period is after the first sampling period.
Optionally, the performing, by the processor 501, the amplitude limiting processing on the first parameter to obtain a second parameter includes:
and carrying out amplitude limiting processing on the pulse duty ratio and the pulse reversing time to obtain the second parameter.
Optionally, the first speed executed by the processor 501 is obtained by the following formula:
new_position_cmd=stepgen_position_cmd
v1=(new_position_cmd-old_position_cmd)/fperiod
wherein stepgen _ position _ cmd is the position expectation value, new _ position _ cmd is the position value of the first sampling period, v1 is the first velocity, old _ position _ cmd is the position value of the second sampling period, and fperiod is the fixed sampling period.
Optionally, the processor 501 performs adaptive adjustment on the first speed and performs compensation to obtain a second speed according to the following formula:
v12=v1-m*est_err/fperiod
Figure BDA0002377180930000111
est_err=stepgen_position_fb+old_velocity_cmd*fperiod-new_position_cmd
wherein v12 is a median variable of the first speed and the second speed, m is an adjustment coefficient, scale is a scaling ratio, n is an adjustment coefficient, est _ err is an error value, stepgen _ position _ fb is a position feedback value corresponding to the second sampling period, and old _ velocity _ cmd is a speed corresponding to the second sampling period.
Optionally, the performing, by the processor 501, a clipping process on the second speed based on the maximum speed limit and the maximum actual speed to obtain a third speed includes:
taking the smaller of the maximum speed limit and the maximum actual speed and setting it as the maximum value of the second speed;
if the second speed is less than the maximum value of the second speed, determining the second speed as the third speed;
and if the second speed is greater than or equal to the maximum value of the second speed, determining the maximum value of the second speed as the third speed.
Optionally, the maximum speed limit and the maximum actual speed executed by the processor 501 are obtained by the following formulas:
fmax=1.0/speed/(p_factor+steplen+stepspace)
actual_max=fmax/scale
wherein fmax is the maximum speed limit, actual _ max is the maximum actual speed, p _ factor is an adjustment coefficient, speed is a pulse speed, steplen is a high level duration in one pulse period, and stepspace is a low level duration in one pulse period.
Optionally, the first position feedback value executed by the processor 501 is obtained by the following formula:
v_inc=v3*q0*speed/q1
velocity_fb=(count-last_count)/scale/fperiod/M
stepgen_position_fb=velocity_fb*fperiod
wherein v3 is the third speed, v _ inc is the speed increment, q0 and q1 are both adjustment coefficients, velocity _ fb is the first speed feedback value, count is the pulse count of the first sampling period, last _ count is the pulse count of the second sampling period, and M is an adjustment coefficient.
The motor driving pulse generating device provided by the embodiment of the invention can realize each process realized in the method embodiment of fig. 1, can achieve the same beneficial effects, and is not repeated here for avoiding repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the digital signal filtering method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. A motor drive pulse generating method, comprising:
acquiring a first parameter, and performing amplitude limiting processing on the first parameter to obtain a second parameter, wherein the first parameter comprises a position expected value, a scaling ratio, a pulse duty ratio, a pulse commutation time, a position value of a first sampling period, a position value of a second sampling period and a fixed sampling period;
the method comprises the steps of carrying out self-adaptive adjustment and compensation on a first speed to obtain a second speed, wherein the first speed is obtained by a position value of a first sampling period, a position value of a second sampling period and a fixed sampling period, and the time of the second sampling period is before the first sampling period;
performing amplitude limiting processing on the second speed to obtain a third speed based on a maximum speed limit and a maximum actual speed, wherein the maximum speed limit and the maximum actual speed are obtained from the second parameter;
and obtaining a speed increment based on the third speed and the second parameter, performing overflow processing on position values of the pulse and direction units to obtain a first speed feedback value, and obtaining a first position feedback value according to the first speed feedback value and a fixed sampling period, wherein the first position feedback value is used for self-adaptive adjustment of the first speed of the next round obtained based on the position value of the first sampling period, the position value of the third sampling period and the fixed sampling period, and the time of the third sampling period is after the first sampling period.
2. The motor drive pulse generating method according to claim 1, wherein the first speed is obtained by the following formula:
new_position_cmd=stepgen_position_cmd
v1=(new_position_cmd-old_position_cmd)/fperiod
wherein stepgen _ position _ cmd is the position expectation value, new _ position _ cmd is the position value of the first sampling period, v1 is the first velocity, old _ position _ cmd is the position value of the second sampling period, and fperiod is the fixed sampling period.
3. The motor drive pulse generating method according to claim 1, wherein the first speed is adaptively adjusted and compensated to obtain the second speed by the following formula:
v12=v1-m*est_err/fperiod
Figure FDA0003535072360000011
est_err=stepgen_position_fb+old_velocity_cmd*fperiod-new_position_cmd
wherein v12 is an intermediate variable between the first speed and the second speed, v1 is the first speed, v2 is the second speed, m is an adjustment coefficient, scale is a scaling ratio, n is an adjustment coefficient, est _ err is an error value, stepgen _ position _ fb is a position feedback value corresponding to the second sampling period, old _ velocity _ cmd is a speed corresponding to the second sampling period, fperiod is a fixed sampling period, and new _ position _ cmd is a position value of the first sampling period.
4. The motor drive pulse generating method according to claim 1, wherein said subjecting the second speed to the amplitude limiting process based on the maximum speed limit and the maximum actual speed to obtain a third speed comprises:
taking the smaller of the maximum speed limit and the maximum actual speed and setting it as the maximum value of the second speed;
if the second speed is less than the maximum value of the second speed, determining the second speed as the third speed;
and if the second speed is greater than or equal to the maximum value of the second speed, determining the maximum value of the second speed as the third speed.
5. The motor drive pulse generating method according to claim 1, the maximum speed limit and the maximum actual speed being obtained by the following formulas:
fmax=1.0/speed/(p_factor+steplen+stepspace)
actual_max=fmax/scale
wherein fmax is the maximum speed limit, actual _ max is the maximum actual speed, p _ factor is an adjustment coefficient, speed is a pulse speed, steplen is a high level duration in one pulse period, stepspace is a low level duration in one pulse period, and scale is a scaling ratio.
6. The motor drive pulse generating method according to claim 1, wherein the first position feedback value is obtained by the following formula:
v_inc=v3*q0*speed/q1
velocity_fb=(count-last_count)/scale/fperiod/M
stepgen_position_fb=velocity_fb*fperiod
wherein v3 is the third speed, v _ inc is the speed increment, q0 and q1 are both adjustment coefficients, velocity _ fb is the first speed feedback value, count is the pulse count of the first sampling period, last _ count is the pulse count of the second sampling period, M is an adjustment coefficient, speed is the pulse speed, scale is the scaling ratio, fperiod is the fixed sampling period, and steen _ position _ fb is the position feedback value corresponding to the second sampling period.
7. A motor drive pulse generating apparatus, comprising:
the device comprises an acquisition module, a data processing module and a data processing module, wherein the acquisition module is used for acquiring a first parameter and carrying out amplitude limiting processing on the first parameter to obtain a second parameter, and the first parameter comprises a position expected value, a scaling ratio, a pulse duty ratio, pulse commutation time, a position value of a first sampling period, a position value of a second sampling period and a fixed sampling period;
the adjusting module is used for carrying out self-adaptive adjustment on the first speed and compensating the first speed to obtain a second speed, wherein the first speed is obtained by a position value of a first sampling period, a position value of a second sampling period and a fixed sampling period, and the time of the second sampling period is before the first sampling period;
the speed limit module is used for carrying out amplitude limiting processing on the second speed to obtain a third speed based on a maximum speed limit and a maximum actual speed, wherein the maximum speed limit and the maximum actual speed are obtained from the second parameter;
and the feedback module is used for obtaining a speed increment based on the third speed and the second parameter, performing overflow processing on the position values of the pulse and direction units to obtain a first speed feedback value, and obtaining a first position feedback value according to the first speed feedback value and a fixed sampling period, wherein the first position feedback value is used for self-adaptive adjustment of the first speed of the next round based on the position value of the first sampling period, the position value of the third sampling period and the fixed sampling period, and the time of the third sampling period is after the first sampling period.
8. A motor drive pulse device, comprising: processor, memory and a computer program stored on the memory and executable on the processor, which computer program, when being executed by the processor, carries out the steps of the motor drive pulse generating method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps in the motor drive pulse generating method according to any one of claims 1 to 6.
CN202010070482.3A 2020-01-21 2020-01-21 Motor driving pulse generation method and device and readable storage medium Active CN112072967B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010070482.3A CN112072967B (en) 2020-01-21 2020-01-21 Motor driving pulse generation method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010070482.3A CN112072967B (en) 2020-01-21 2020-01-21 Motor driving pulse generation method and device and readable storage medium

Publications (2)

Publication Number Publication Date
CN112072967A CN112072967A (en) 2020-12-11
CN112072967B true CN112072967B (en) 2022-04-15

Family

ID=73657881

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010070482.3A Active CN112072967B (en) 2020-01-21 2020-01-21 Motor driving pulse generation method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN112072967B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112986605B (en) * 2021-02-22 2022-12-16 宏晶微电子科技股份有限公司 Motor speed measuring method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102010034940A1 (en) * 2009-10-26 2011-04-28 Continental Teves Ag & Co. Ohg Method for operating electronically commutated brushless direct current motor, involves changing voltage regulation between speed control and engine commutation modes such that controlled variables are changed during operation of motor
CN102075127A (en) * 2011-01-04 2011-05-25 北京航空航天大学 Permanent magnet synchronous motor servo driving device and position control method thereof
CN102347726A (en) * 2011-09-15 2012-02-08 河北工业大学 Device and method for observing rotor position in motor control
CN104698927A (en) * 2015-02-10 2015-06-10 西安诺瓦电子科技有限公司 Rotary knob value adjusting method based on incremental rotary encoder and related device
CN106059406A (en) * 2016-06-15 2016-10-26 哈尔滨工程大学 Method for suppressing torque pulsation of brushless direct current motor based on delayed Hall signal
CN106208836A (en) * 2016-09-05 2016-12-07 广东金霸智能科技股份有限公司 An intelligent integrated high-speed brushless motor controller
CN108249238A (en) * 2018-01-11 2018-07-06 深圳市英威腾电气股份有限公司 A kind of elevator is without detent torque compensation method, the apparatus and system of weighing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105751918B (en) * 2016-02-29 2017-11-14 河北钢铁集团矿业有限公司 A kind of closed-loop drive apparatus and method of direct current chopping regulating speed electric locomotive

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102010034940A1 (en) * 2009-10-26 2011-04-28 Continental Teves Ag & Co. Ohg Method for operating electronically commutated brushless direct current motor, involves changing voltage regulation between speed control and engine commutation modes such that controlled variables are changed during operation of motor
CN102075127A (en) * 2011-01-04 2011-05-25 北京航空航天大学 Permanent magnet synchronous motor servo driving device and position control method thereof
CN102347726A (en) * 2011-09-15 2012-02-08 河北工业大学 Device and method for observing rotor position in motor control
CN104698927A (en) * 2015-02-10 2015-06-10 西安诺瓦电子科技有限公司 Rotary knob value adjusting method based on incremental rotary encoder and related device
CN106059406A (en) * 2016-06-15 2016-10-26 哈尔滨工程大学 Method for suppressing torque pulsation of brushless direct current motor based on delayed Hall signal
CN106208836A (en) * 2016-09-05 2016-12-07 广东金霸智能科技股份有限公司 An intelligent integrated high-speed brushless motor controller
CN108249238A (en) * 2018-01-11 2018-07-06 深圳市英威腾电气股份有限公司 A kind of elevator is without detent torque compensation method, the apparatus and system of weighing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于脉冲宽度预测的速度反馈机制研究;张永康 等;《电工技术学报》;20141031;第29卷(第10期);第81-89页 *

Also Published As

Publication number Publication date
CN112072967A (en) 2020-12-11

Similar Documents

Publication Publication Date Title
Bergen et al. Sampled-data processing techniques for feedback control systems
CN111030526B (en) Motor driving method and system
CN112072967B (en) Motor driving pulse generation method and device and readable storage medium
CN109856961B (en) Bulb voltage control method and device and computer readable storage medium
CN111243544A (en) Method for eliminating water ripple caused by spread spectrum, storage medium and display panel
CN111294018B (en) LRA drive pulse waveform design method based on Kaiser window
Kitzig et al. Improvement of mains frequency estimation robustness towards ripple control signals
CN113258842B (en) Stepping motor control system and method based on pulse frequency conversion control
CN112910496B (en) Chirp signal generation method, device, terminal and medium
CN111614588A (en) Signal modulation method, device, equipment and computer readable storage medium
CN117374714A (en) Automatic frequency locking and unlocking detection method, system and medium for laser signals
CN111293927B (en) Multi-motor synchronous driving control method, device and system
CN110231849B (en) Switching frequency control method and system
CN114216488A (en) Control method, control system and equipment of rotary encoder
CN112198795A (en) Electromechanical servo control method, electromechanical servo control system, terminal equipment and storage medium
CN114389516B (en) A motor harmonic suppression method based on SVPWM control and related equipment
CN117516901B (en) Clock synchronization method and system for fan blade monitoring based on inertial navigation technology
CN115372680B (en) Charging current sampling method
CN114021079B (en) Vibration control method, vibration device and storage medium
US20230393184A1 (en) Device and methods for phase noise measurement
CN111010060B (en) DC compensation method and circuit for stepping motor
CN112491392B (en) Window function fractional delay filter design method, device and storage medium thereof
CN109634352B (en) Pulse wave generating circuit and pulse wave generating method
EP0744099A1 (en) Interference dependent adaptive phase clock controller
CN116909152A (en) Interference suppression method for synchronous belt drive system based on improved second-order repetitive control

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 230088 north, 9th floor, B1 building, animation base, 800 Wangjiang West Road, high tech Zone, Hefei City, Anhui Province

Applicant after: Hongjing Microelectronics Technology Co.,Ltd.

Address before: 230088 north, 9th floor, B1 building, animation base, 800 Wangjiang West Road, high tech Zone, Hefei City, Anhui Province

Applicant before: HEFEI MACROSILICON TECHNOLOGY CO.,LTD.

GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20201211

Assignee: Anhui Xingtai Financial Leasing Co.,Ltd.

Assignor: Hongjing Microelectronics Technology Co.,Ltd.

Contract record no.: X2023980034867

Denomination of invention: A method, device, and readable storage medium for generating motor driven pulses

Granted publication date: 20220415

License type: Exclusive License

Record date: 20230420

EE01 Entry into force of recordation of patent licensing contract
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method, device, and readable storage medium for generating motor driven pulses

Effective date of registration: 20230424

Granted publication date: 20220415

Pledgee: Anhui Xingtai Financial Leasing Co.,Ltd.

Pledgor: Hongjing Microelectronics Technology Co.,Ltd.

Registration number: Y2023980038963

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Granted publication date: 20220415

Pledgee: Anhui Xingtai Financial Leasing Co.,Ltd.

Pledgor: Hongjing Microelectronics Technology Co.,Ltd.

Registration number: Y2023980038963

EC01 Cancellation of recordation of patent licensing contract
EC01 Cancellation of recordation of patent licensing contract

Assignee: Anhui Xingtai Financial Leasing Co.,Ltd.

Assignor: Hongjing Microelectronics Technology Co.,Ltd.

Contract record no.: X2023980034867

Date of cancellation: 20240603

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20201211

Assignee: Anhui Xingtai Financial Leasing Co.,Ltd.

Assignor: Hongjing Microelectronics Technology Co.,Ltd.

Contract record no.: X2024980006645

Denomination of invention: A method, device, and readable storage medium for generating motor driven pulses

Granted publication date: 20220415

License type: Exclusive License

Record date: 20240607

PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method, device, and readable storage medium for generating motor driven pulses

Granted publication date: 20220415

Pledgee: Anhui Xingtai Financial Leasing Co.,Ltd.

Pledgor: Hongjing Microelectronics Technology Co.,Ltd.

Registration number: Y2024980021446