CN103414409A - Stepping motor pre-subdivision driving method based on curve fitting - Google Patents
Stepping motor pre-subdivision driving method based on curve fitting Download PDFInfo
- Publication number
- CN103414409A CN103414409A CN201310352544XA CN201310352544A CN103414409A CN 103414409 A CN103414409 A CN 103414409A CN 201310352544X A CN201310352544X A CN 201310352544XA CN 201310352544 A CN201310352544 A CN 201310352544A CN 103414409 A CN103414409 A CN 103414409A
- Authority
- CN
- China
- Prior art keywords
- subdivision
- stepping motor
- segmentation
- curve
- threshold value
- 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.)
- Pending
Links
Images
Abstract
The invention relates to a stepping motor pre-subdivision driving method based on curve fitting. The method comprises the following steps that 1) the maximum subdivision number m is obtained from a subdivision table, and the minimum time unit is read from a controller; 2) a subdivision number n set at present is obtained from the controller, the difference between the specific value between the speed and the subdivision number and a threshold value is detected, a control mode is switched to obtain a pulse period and update fitting data if the difference is less than the threshold value, and if the difference value is larger than or equal to the threshold value, returning to the step 2) is carried out; 3) least-square curve fitting is carried out; 4) a predicted value T1 of a moment in the future is calculated according to the trend of operation of a stepping motor during several former cycles; 5) the T1 is segmented according to the maximum subdivision number and the current subdivision number; 6) according to the segmented T1, a control signal is outputted; 7) the steps from 2) to 6) are repeated. According to the stepping motor pre-subdivision driving method, a low rotating speed and vibration under the situation of low subdivision can be avoided; under the situation, the motor can sufficiently utilize the subdivision table and operate smoothly at each step, and vibration and noise are reduced.
Description
Technical field
The present invention relates to a kind of stepping motor and drive pre-divided method, particularly a kind of pre-subdivision drive method based on curve.
Background technology
Stepping motor is a kind of actuator that electric impulse signal is converted into to angular displacement or displacement of the lines, itself and corresponding power driving device can form an open loop setting movement system, have simple in structure, cheap, location is convenient, without accumulated error and the advantage such as computer interface is convenient, be widely used in the automation control system in the fields such as machinery, instrument, Industry Control.It,, by pulse signal of the every acceptance of driver, just rotates an angle or takes a step forward.The pulse input is more, and the angle that motor turns over is also more; The pulse incoming frequency is higher, and motor speed is faster.Therefore, in the load capacity scope, the displacement that the control inputs umber of pulse just can the control step motor, the rotating speed that the control impuls frequency just can the control step motor.
Stepping motor system is comprised of stepping motor body and driving power (or driver).Driving power can be divided into controller part and driver portion.Controller is accepted user's input instruction, the CP pulse of control step motor speed, the CW signal of control step motor drive direction and relevant control signal, and the sequence of states then required according to the stepping motor state transition table produces signal.
When synchronizing moved, stepping motor existed step-out and oscillation problem.This has seriously restricted the range of application of stepping motor.American scholar T .R.Fredriksen had proposed the control method of stepping motor stepper angle fraction first in U.S.'s incremental motion control system and device annual meeting in 1975.In more than 20 year thereafter, the micro-stepping driving of stepping motor technology has obtained very big development.The segmentation stepper drive is that the electric current of each phase of step angle during by full stepper drive increases gradually with stepped n step, makes to attract the power of rotor slowly to change, and each rotor is static at this equilibrium of forces point, and full step pitch is n and is segmented, and can make the rotor operation effect smooth.
The advantage that segmentation drives mainly contains three aspects::
1) greatly improve the resolution of stepping motor.For example the logical stepping motor of a Daepori often turns 200 steps, and step pitch is 1.8 °.If drive 10 segmentations, can obtain the motion of 0.18 ° of step pitch and 2000 steps, i.e. pulse of every acceptance, motor only rotates 0.18 °.
2) improve operation stability, reduce vibration and noise.The increment of amplitude (overshoot) the merchandiser step of the kinetic response vibration of each single step is directly related.Common type of drive step pitch is large, easily causes larger amplitude, in system natural resonance district, likely causes the step-out of motor.Driving segmentation makes single step apart from reducing, even in resonance region, also be not easy to cause step-out.Vibration reduces, thereby the noise produced is also little.
3) improve motor torque output.
By the principle that drives segmentation, can be known, no matter at high speed or low speed, as long as segmentation is enough high, just can guarantee the stepping motor traveling comfort in theory.The segmentation number is subject to hardware condition, can not Set arbitrarily but in actual applications.In addition, in case set the segmentation number, in service with regard to unlikely change at motor.In this context, may, due to the larger speed adjustable range of motor, the situation of little segmentation the slow-speed of revolution appear.In this case, the advantage that drives segmentation just can't embody, and the operation of stepping motor still there will be vibration, significantly " stepping " sense is arranged, and produce noise.
Summary of the invention
In for the driving segmentation, can not reruning in the change situation, the slow-speed of revolution, low segmentation situation appear arbitrarily, cause driving the segmentation DeGrain, the problem of vibration and noise appears in stepping motor operation, the invention provides a kind of method that the Curve Fitting Prediction pulse period drives pre-segmentation of utilizing.
Based on the pre-subdivision drive method of the stepping motor of curve, it is characterized in that comprising the following steps:
1) from the segmentation table, obtaining maximum segmentation number m, from controller, reading minimum time unit---be distinguishable minimum time;
2) from the segmentation that obtains Set For Current controller, count n, detection speed/segmentation number ratio and threshold value poor, if be less than threshold value, switching controls mode, acquisition pulse period, renewal fitting data; If this difference is more than or equal to threshold value, return to step 2);
3) carry out least square curve fitting;
4) according to the trend of front several cycle stepping motor operations, calculate the predicted value T1 in a following moment;
5) according to maximum segmentation number and current segmentation number, cut apart T1;
6) according to the T1 after cutting apart, the output control signal;
7) repeat above-mentioned steps 2)~6).
Further, step 2) can be formed by the following steps:
2-1) from the segmentation that obtains Set For Current controller, count n;
2-2) read in a pulse period;
2-3) detection speed/segmentation number ratio and threshold value is poor, if be less than threshold value, and the switching controls mode, otherwise return to step 2-1);
2-4) check the fitting data number, if do not reach the upper limit, add data, if now data volume is greater than lower limit, carry out curve fitting, otherwise repeat 2-2) and 2-3), until data amount check reaches lower limit; If data are full, delete the oldest data, add a new data.
Further, the step 3) least square curve fitting can be comprised of the following steps:
3-1) choose Legendre orthogonal basis function f
i(x) and weight coefficient w
i, establishing matched curve is S (x)=a
0f
0(x)+a
1f
1(x)+... + a
nf
n(x);
3-2) according to following two formula, calculate (f
j, f
k) and (y, f
k).
If carry out the match of n rank, j, k=0,1 ..., n, m mean to input data amount check, and meet m >=n;
3-3) by the principle of least square, obtain following Matrix Formula:
According to above-mentioned formula (1) and (2), calculate the coefficient a in described matched curve multinomial
0, a
1..., a
n
3-4) obtain matched curve S (x)=a
0f
0(x)+a
1f
1(x)+... + a
nf
n(x).
Further, step 5) is cut apart T1 according to maximum segmentation number and current segmentation number and can be comprised of the following steps:
5-1) obtain maximum segmentation number m and current segmentation and count n, calculate k=m/n;
5-2) by T1 divided by minimum time unit, the numerical value t after transforming;
5-3) by t to the k remainder, if be 0, t is done to the k decile; If be not 0, t is rounded to 0 k, be designated as L; The difference of L and t/k be designated as e (0)=-(t-L*k)/k;
5-4) t is divided into to the k section, remembers that every segment length is l (i), i=2 wherein ..., k, calculate l (i) by following formula (3) (4) and (5):
Technical conceive of the present invention is: the slow-speed of revolution occurs detecting, during the situation of low segmentation, start pre-segmentation program.After the pulse period that obtains some, carry out curve fitting, then predict next cycle constantly.Utilize the highest segmentation table, a pulse period is divided into to some sections, make in this pulse period, become some small steps by an original step.When cutting apart, carry out the conversion of cycle divided by the distinguishable time of minimum.Cutting apart of cycle just becomes cutting apart based on the distinguishable time of minimum.Because the indivisible deviation accumulation caused is greater than at 0.5 o'clock, in distinguishable time of minimum of this elongated segment, make every section time end point with respect to the end point error of even segmentation all in 0.5, avoided by the indivisible deviation accumulation brought to final stage, made its time much larger than the problem of several sections before.When next one circulation starts, upgrade the data for curve, and then carry out match.Such rolling optimization is conducive to improve precision of prediction.
Advantage of the present invention is: avoid the slow-speed of revolution, vibration occurs under low segmentation situation, make motor in this case, take full advantage of the segmentation table, each step of smoothness run, reduce vibration and noise.
The accompanying drawing explanation
Fig. 1 general flow chart of the present invention.
Fig. 2 basic function product process figure.
Fig. 3 curve flow chart.
Fig. 4 time division flow chart.
Embodiment
One, project implementation mode
With reference to accompanying drawing 1,3,4.
Based on the pre-subdivision drive method of the stepping motor of curve, comprise the following steps:
1) from the segmentation table, obtaining maximum segmentation number m, from controller, reading minimum time unit---be distinguishable minimum time;
2) from the segmentation that obtains Set For Current controller, count n, detection speed/segmentation number ratio and threshold value poor, if be less than threshold value, switching controls mode, acquisition pulse period, renewal fitting data;
2-1) from the segmentation that obtains Set For Current controller, count n;
2-2) read in a pulse period;
2-3) detection speed/segmentation number ratio and threshold value is poor, if be less than threshold value, and the switching controls mode, otherwise return to step 2-1);
2-4) check the fitting data number, if do not reach the upper limit, add data, if now data volume is greater than lower limit, carry out curve fitting, otherwise repeat 2-2) and 2-3), until data amount check reaches lower limit; If data are full, delete the oldest data, add a new data.
3) carry out least square curve fitting;
3-1) choose Legendre orthogonal basis function f
i(x) and weight coefficient w
i, establishing matched curve is S (x)=a
0f
0(x)+a
1f
1(x)+... + a
nf
n(x);
3-2) according to following two formula, calculate (f
j, f
k) and (y, f
k):
If carry out the match of n rank, j, k=0,1 ..., n, m mean to input data amount check.And meet m >=n.
3-3) by the principle of least square, obtain following Matrix Formula:
According to above-mentioned formula evaluator coefficient a
0, a
1..., a
n
3-4) obtain matched curve S (x)=a
0f
0(x)+a
1f
1(x)+... + a
nf
n(x);
4) according to the trend of front several cycle stepping motor operations, calculate the predicted value T1 in a following moment;
5) according to maximum segmentation number and current segmentation number, cut apart T1;
5-1) obtain maximum segmentation number m and current segmentation and count n, calculate k=m/n
5-2) by T1 divided by minimum time unit, the numerical value t after transforming
5-3) by t to the k remainder.If be 0, t is done to the k decile; If be not 0, t is rounded to 0 k, be designated as L, the difference of L and t/k be designated as e (0)=-(t-L*k)/k;
5-4) t is divided into to the k section, remembers that every segment length is l (i), i=2 wherein ..., k.By following formula (3) (4) and (5), calculate l (i):
6) according to the T1 after cutting apart, the output control signal;
7) repeat above-mentioned steps 2)~6).
Two, analysis of cases
A), case 1
If be limited to 10 on the fitting data number, under be limited to 5.Suppose that the pulse period, according to SIN function sin (x) variation, obtains 5 pulse periods (0.5,0.707,0.866,0.966,1), now x=(1,2,3,4,5), m=5, suppose to carry out 4 rank matches, obtain fitting coefficient (0.26000.2505-0.0072-0.00350.0002), i.e. matched curve S (x)=0.26+0.2505x-0.0072 (1.5x
2-0.5)-0.0035 (2.5x
3-1.5x)+0.0002 (4.375x
4-3.75x
2+ 0.375).Make x=6, prediction next cycle T1=S (6)=0.9650.If it is 0.001 that the minimum distinguishable time is arranged, maximum segmentation is several 200, current segmentation several 20.T=T1/0.001=965, k=200/20=10.T%k=5, t/k rounds L=96 to 0.e(0)=-5/10=-0.5。So e=(0.5,0 ,-0.5,0 ,-0.5,0 ,-0.5,0 ,-0.5,0), l=(96,97,96,97,96,97,96,97,96,97).Therefore, can obtain split time and be (0.096,0.097,0.096,0.097,0.096,0.097,0.096,0.097,0.096,0.097).Than the segmented mode of l=(96,96,96,96,96,96,96,96,96,101), this mode makes segmentation more even.
B), case 2
If there is error delta in prediction, if | Δ |<0.001 T1 is cut apart without impact.If Δ is the integral multiple d of minimum time, with the error of perfectly even waypoint, be e=(0.5-0.1d ,-0.1d ,-0.5-0.1d,-0.1d ,-0.5-0.1d ,-0.1d ,-0.5-0.1d,-0.1d ,-0.5-0.1d, 0), the split time final stage increases Δ.In this case, as long as guarantee | 0.5+0.1d|<1, the actual segment point that causes of error and the difference of desirable waypoint are less than distinguishable minimum time and ignore.
The described content of this specification embodiment is only enumerating the way of realization of inventive concept; protection scope of the present invention should not be regarded as only limiting to the concrete form that embodiment states, protection scope of the present invention also reaches conceives the equivalent technologies means that can expect according to the present invention in those skilled in the art.
Claims (4)
1. based on the pre-subdivision drive method of the stepping motor of curve, it is characterized in that comprising the following steps:
1) from the segmentation table, obtaining maximum segmentation number m, from controller, reading minimum time unit;
2) obtain the pulse period, count n from the segmentation that obtains Set For Current controller, detection speed/segmentation number ratio and threshold value poor, if be less than threshold value, switching controls mode, renewal fitting data; If this difference is more than or equal to threshold value, return to step 2);
3) carry out least square curve fitting;
4) according to the trend of front several cycle stepping motor operations, calculate the predicted value T1 in a following moment;
5) according to maximum segmentation number and current segmentation number, cut apart T1;
6) according to the T1 after cutting apart, the output control signal;
7) repeat above-mentioned steps 2)~6).
2. the pre-subdivision drive method of the stepping motor based on curve as claimed in claim 1, is characterized in that step 2) by the following steps, formed:
2-1) from the segmentation that obtains Set For Current controller, count n;
2-2) read in a pulse period;
2-3) detection speed/segmentation number ratio and threshold value is poor, if be less than threshold value, and the switching controls mode, otherwise return to step 2-1);
2-4) check the fitting data number, if do not reach the upper limit, add data, if now data volume is greater than lower limit, carry out curve fitting, otherwise repeat 2-2) and 2-3), until data amount check reaches lower limit; If data are full, delete the oldest data, add a new data.
3. the pre-subdivision drive method of the stepping motor based on curve as claimed in claim 1 is characterized in that the step 3) least square curve fitting is comprised of the following steps:
3-1) choose Legendre orthogonal basis function f
i(x) and weight coefficient w
i, establish matched curve and be
S(x)=a
0f
0(x)+a
1f
1(x)+…+a
nf
n(x);
3-2) according to following two formula, calculate (f
j, f
k) and (y, f
k).
If carry out the match of n rank, j, k=0,1 ..., n, m mean to input data amount check, and meet m >=n;
3-3) by the principle of least square, obtain following Matrix Formula:
According to above-mentioned formula (1) and (2), calculate the coefficient a in described matched curve multinomial
0, a
1..., a
n
3-4) obtain matched curve S (x)=a
0f
0(x)+a
1f
1(x)+... + a
nf
n(x).
4. as the pre-subdivision drive method of any one described stepping motor based on curve of claim 1-3, it is characterized in that step 5) cuts apart T1 according to maximum segmentation number and current segmentation number and be comprised of the following steps:
5-1) obtain maximum segmentation number m and current segmentation and count n, calculate k=m/n;
5-2) by T1 divided by minimum time unit, the numerical value t after transforming;
5-3) by t to the k remainder, if be 0, t is done to the k decile; If be not 0, t is rounded to 0 k, be designated as L; The difference of L and t/k be designated as e (0)=-(t-L*k)/k;
5-4) t is divided into to the k section, remembers that every segment length is l (i), i=2 wherein ..., k, calculate l (i) by following formula (3) (4) and (5):
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310352544XA CN103414409A (en) | 2013-08-14 | 2013-08-14 | Stepping motor pre-subdivision driving method based on curve fitting |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310352544XA CN103414409A (en) | 2013-08-14 | 2013-08-14 | Stepping motor pre-subdivision driving method based on curve fitting |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103414409A true CN103414409A (en) | 2013-11-27 |
Family
ID=49607401
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310352544XA Pending CN103414409A (en) | 2013-08-14 | 2013-08-14 | Stepping motor pre-subdivision driving method based on curve fitting |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103414409A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106374798A (en) * | 2016-09-08 | 2017-02-01 | 哈尔滨工程大学 | Acceleration and deceleration control method of stepping motor with variable micro-stepping number |
CN107769643A (en) * | 2017-11-30 | 2018-03-06 | 深圳市青蓝自动化科技有限公司 | A kind of method for controlling stepping motor, device, stepper motor and storage medium |
CN110263291A (en) * | 2019-05-29 | 2019-09-20 | 朗坤智慧科技股份有限公司 | A kind of industrial data trend recognition methods and system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1406378A2 (en) * | 2002-10-03 | 2004-04-07 | Japan Servo Co. Ltd. | Step motor driving device |
JP2004180431A (en) * | 2002-11-27 | 2004-06-24 | Japan Servo Co Ltd | Stepping motor driving device |
CN101119092A (en) * | 2007-09-06 | 2008-02-06 | 哈尔滨工业大学 | High subdivided integration type stepper motor driver |
JP4855957B2 (en) * | 2007-01-24 | 2012-01-18 | 株式会社メレック | STEPPING MOTOR DRIVE DEVICE, PRECISION MEASURING DEVICE, PRECISION PROCESSING DEVICE, AND MICROSTEP DRIVE METHOD |
CN102684585A (en) * | 2012-06-06 | 2012-09-19 | 广州彩熠灯光有限公司 | Method for controlling multiple two-phase stepping motors in real time |
CN102843083A (en) * | 2012-09-18 | 2012-12-26 | 天津市亚安科技股份有限公司 | Method for controlling stepper motor current |
-
2013
- 2013-08-14 CN CN201310352544XA patent/CN103414409A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1406378A2 (en) * | 2002-10-03 | 2004-04-07 | Japan Servo Co. Ltd. | Step motor driving device |
JP2004180431A (en) * | 2002-11-27 | 2004-06-24 | Japan Servo Co Ltd | Stepping motor driving device |
JP4855957B2 (en) * | 2007-01-24 | 2012-01-18 | 株式会社メレック | STEPPING MOTOR DRIVE DEVICE, PRECISION MEASURING DEVICE, PRECISION PROCESSING DEVICE, AND MICROSTEP DRIVE METHOD |
CN101119092A (en) * | 2007-09-06 | 2008-02-06 | 哈尔滨工业大学 | High subdivided integration type stepper motor driver |
CN102684585A (en) * | 2012-06-06 | 2012-09-19 | 广州彩熠灯光有限公司 | Method for controlling multiple two-phase stepping motors in real time |
CN102843083A (en) * | 2012-09-18 | 2012-12-26 | 天津市亚安科技股份有限公司 | Method for controlling stepper motor current |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106374798A (en) * | 2016-09-08 | 2017-02-01 | 哈尔滨工程大学 | Acceleration and deceleration control method of stepping motor with variable micro-stepping number |
CN107769643A (en) * | 2017-11-30 | 2018-03-06 | 深圳市青蓝自动化科技有限公司 | A kind of method for controlling stepping motor, device, stepper motor and storage medium |
CN107769643B (en) * | 2017-11-30 | 2020-01-10 | 深圳市青蓝自动化科技有限公司 | Stepping motor control method and device, stepping motor and storage medium |
CN110263291A (en) * | 2019-05-29 | 2019-09-20 | 朗坤智慧科技股份有限公司 | A kind of industrial data trend recognition methods and system |
CN110263291B (en) * | 2019-05-29 | 2020-03-31 | 朗坤智慧科技股份有限公司 | Industrial data trend identification method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103414409A (en) | Stepping motor pre-subdivision driving method based on curve fitting | |
CN104201967B (en) | A kind of networking permagnetic synchronous motor delay compensation using Auto Disturbances Rejection Control Technique and control method | |
CN103645725A (en) | Teaching track planning method and system for robot | |
CN102023574B (en) | Optimal method for controlling mixed model of first-order reaction continuous stirred tank reactor (CSTR) | |
CN113489393B (en) | Subdivision driving method of permanent magnet stepping motor | |
CN104977899A (en) | Position control device | |
CN106092148B (en) | Counter-based circuit for measuring movement of an object | |
EP1597642B1 (en) | Pulse output function for programmable logic controller with linear frequency change | |
CN102763318A (en) | Command generation device | |
CN108667363A (en) | The control method and device of stepper motor movement | |
CN103312248B (en) | Method for compensating inflection point error of linear acceleration to deceleration based on DSP (Digital Signal Processor) | |
JP2020518224A (en) | Control system and control method | |
CN109308275B (en) | System and method for converting orthogonal coding pulse | |
US20120063019A1 (en) | Control method for a voice coil motor and lens focusing system using the same | |
CN103684194A (en) | Asynchronous-induction linear motor and method for driving asynchronous-induction linear motor | |
CN111537005A (en) | Method for processing signal loss of incremental photoelectric encoder | |
CN103558861A (en) | Dynamic switching method for macro-micro composite motion | |
CN109217716B (en) | ultrasonic motor profile controller based on pre-sliding friction force model | |
KR100761689B1 (en) | Torque limited motor controll methode & motor controller | |
CN111371378B (en) | Method and apparatus for speed control | |
KR102525150B1 (en) | Apparatus for generating parabolic motion profile and method thereof | |
CN103684170A (en) | Secant-method based internal model position control method for permanent magnet linear synchronous motor | |
CN110262386B (en) | Control method and system for continuous operation cooling bed and computer equipment | |
CN115173758B (en) | Method, device and equipment for controlling speed of stepping motor and storage medium | |
CN103368484B (en) | Motor motion control circuit and control method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20131127 |
|
WD01 | Invention patent application deemed withdrawn after publication |