CN106341063B - Control of Step Motor's Acceleration and Deceleration method - Google Patents

Control of Step Motor's Acceleration and Deceleration method Download PDF

Info

Publication number
CN106341063B
CN106341063B CN201610813943.5A CN201610813943A CN106341063B CN 106341063 B CN106341063 B CN 106341063B CN 201610813943 A CN201610813943 A CN 201610813943A CN 106341063 B CN106341063 B CN 106341063B
Authority
CN
China
Prior art keywords
stepper motor
timer
frequency
controlled
speedometer
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
CN201610813943.5A
Other languages
Chinese (zh)
Other versions
CN106341063A (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.)
Wuhu Lion Automotive Technologies Co Ltd
Original Assignee
SAIC Chery Automobile 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 SAIC Chery Automobile Co Ltd filed Critical SAIC Chery Automobile Co Ltd
Priority to CN201610813943.5A priority Critical patent/CN106341063B/en
Publication of CN106341063A publication Critical patent/CN106341063A/en
Application granted granted Critical
Publication of CN106341063B publication Critical patent/CN106341063B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • H02P8/00Arrangements for controlling dynamo-electric motors rotating step by step
    • H02P8/14Arrangements for controlling speed or speed and torque
    • 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
    • H02P8/00Arrangements for controlling dynamo-electric motors rotating step by step
    • H02P8/36Protection against faults, e.g. against overheating or step-out; Indicating faults
    • H02P8/38Protection against faults, e.g. against overheating or step-out; Indicating faults the fault being step-out

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Stepping Motors (AREA)

Abstract

The invention discloses a kind of Control of Step Motor's Acceleration and Deceleration methods, belong to Motor Control regulation technology field, and this method includes:Based on the highest running speed of controlled stepper motor, the speedometer for being controlled stepper motor is generated according to preset speed calculation formula;Based on the speedometer, corresponding pulses are generated to drive controlled motor to carry out acceleration and deceleration motion using timer.By obtaining the speedometer of the microcontroller according to the speed calculation formula of microcontroller, using speedometer as the value of microcontroller register, by the increase amplitude of the speedometer driving timing device output pulse frequency, the frequency of pulse is exported with Driving Stepping Motor progress acceleration and deceleration motion to change timer.It can reach more accurate control to the movement of stepper motor in this manner, to ensure stepper motor energy reliability service, out-of-step free, to keep the position of stepper motor actual loading consistent with the load situation set by controller, avoid the occurrence of error.

Description

Control of Step Motor's Acceleration and Deceleration method
Technical field
The present invention relates to Motor Control regulation technology field, more particularly to a kind of Control of Step Motor's Acceleration and Deceleration method.
Background technology
In recent years, stepper motor is widely used in microcomputer control because it has the advantages that Pulse Width Control, positioning accuracy is high Among the economical CNC system of system.And the torque frequency feature of stepper motor refer to motor effective output torque and running frequency it Between functional relation, be one of key property of stepper motor.User selects stepping electric according to the torque frequency feature of stepper motor The type of machine, to ensure the stepper motor energy reliability service, out-of-step free of selection.
Stepper motor has two in practical applications:First, the mechanical property of the high frequency region of stepper motor is softer, It is not suitable for large inertia load system;Second is that stepper motor is worked by synchronous motor principle, overload capacity is relatively low.Due to step There is two above in stepper motor so that stepper motor is easy to that overload phenomenon occurs, and will cause step-out once overloading Even stall, makes load situation change.And stepper motor is when doing executive component, is to be controlled in an open-loop manner, i.e., Load situation does not feed back control circuit.And since load situation does not feed back control circuit, stepper motor just has to The variation of each excitation is correctly responded, if excitation frequency selection is improper, motor is not able to move to new position, then actual Load situation with it is expected that load situation just will produce error.In practical applications since load situation can change frequent occurrence, There is into permanent error in position set by the position relative controller for leading to actual loading.
Invention content
The purpose of the present invention is to provide a kind of Control of Step Motor's Acceleration and Deceleration methods, to solve stepper motor actual loading Position relative controller set by load situation there is the problem of error.
In order to achieve the above object, the technical solution adopted by the present invention is:A kind of Control of Step Motor's Acceleration and Deceleration method is provided, This method includes:
Based on the highest running speed of controlled stepper motor, is generated according to preset speed calculation formula and be controlled stepper motor Speedometer;
Based on the speedometer, corresponding pulses are generated to drive controlled motor to carry out acceleration and deceleration motion using timer.
Compared with prior art, there are following technique effects by the present invention:According to the type of microcontroller, the microcontroller is determined Speed calculation formula, and the speedometer of the type microcontroller is obtained according to the speed calculation formula, then using speedometer as single The value of piece machine register.In the control of stepper motor speed, pass through the increasing of the speedometer driving timing device output pulse frequency Significantly, the frequency of pulse is exported with Driving Stepping Motor progress acceleration and deceleration motion to change timer.In this manner More accurate control can be reached to the movement of stepper motor, to ensure stepper motor energy reliability service, out-of-step free, to make The position of stepper motor actual loading is consistent with the load situation set by controller, avoids the occurrence of error.
Description of the drawings
Fig. 1 is the flow chart of the Control of Step Motor's Acceleration and Deceleration method in one embodiment of the invention;
Fig. 2 is the flow chart of the subdivided step of step S2 in one embodiment of the invention;
Fig. 3 is the frequency-time relational graph of the timer output pulse in one embodiment of the invention;
Fig. 4 is the flow chart of the timer interrupt service in one embodiment of the invention;
Fig. 5 is the speed lift curve figure of the stepper motor acceleration and deceleration in one embodiment of the invention.
Specific implementation mode
With reference to Fig. 1 to Fig. 5, the present invention is described in further detail.
As shown in Figure 1, present embodiment discloses a kind of Control of Step Motor's Acceleration and Deceleration method, this method comprises the following steps S1 to S2:
S1, the highest running speed based on controlled stepper motor generate according to preset speed calculation formula and are controlled stepping The speedometer of motor;
It should be noted that the highest running speed of controlled stepper motor is the value set when stepper motor manufacture, this reality It applies in example using the acceleration and deceleration process of microcontroller control stepper motor, is determined according to the type of the microcontroller of selection and be controlled stepping electricity The speedometer of machine acceleration and deceleration process, and using the content of speedometer as the value of register, the acceleration of stepper motor is controlled in control It is carried out with the value slowed down by searching for register.
The selection of speed calculation formula is illustrated below:
If the Infineon's microcontroller selected, then be used directly curve calculator formation speed table, wherein curve calculator The velocity amplitude of generation is calculated according to following formula:
Velocity amplitude=(timer count maximum value-X) × T,
In formula:X is the counting initial value of timer, this counts initial value and can arbitrarily set, and T is singlechip chip Machine cycle, timer count maximum value is determined according to the digit of timer, for example, timer is 16, then fixed When device count maximum be 65535;If timer is 8, then timer count maximum value is 255.
If what is selected is the S12G microcontrollers of Freescale, since the timing mechanism of the microcontroller is different, the monolithic Machine TIM modules are that 8 channels share a machine cycle T, therefore the velocity amplitude for being controlled stepper motor is calculated according to following formula:
Velocity amplitude=X × T.
S2, it is based on the speedometer, corresponding pulses is generated to drive controlled motor to carry out acceleration and deceleration motion using timer.
Specifically, as shown in Fig. 2, the step S2 in above-described embodiment includes following subdivided step S21 to S22:
S21, determine that timer generates the amplitude of variation of pulse frequency according to speedometer;
S22, started with the starting frequency of stepper motor, it is defeated to change timer according to the amplitude of variation of the pulse frequency Go out the frequency of pulse to drive controlled motor to carry out acceleration and deceleration motion.
Specifically, time interval, frequency of output pulse of timer output pulse are changed by microcontroller at this to control System is controlled the speed change of stepper motor, and the increase amplitude of wherein pulse frequency is determined by the value in speedometer i.e. register.It presses More accurate control can be reached to the movement of stepper motor according to this mode, to ensure stepper motor energy reliability service, no Step-out avoids the occurrence of error to keep the position of stepper motor actual loading consistent with the load situation set by controller.
Specifically, the acceleration and deceleration process in above-described embodiment includes accelerating, at the uniform velocity and moderating process:
In accelerator, the initial frequency to be controlled stepper motor starts, and the increasing of pulse frequency is determined according to speedometer Significantly accelerated to increase the frequency of pulse so as to be controlled stepper motor;
When the frequency of pulse increases to the required frequency of controlled stepper motor maximum (top) speed, it is controlled stepper motor and enters At the uniform velocity process;
In moderating process, is started with the controlled required frequency of stepper motor maximum (top) speed, arteries and veins is determined according to speedometer The reduction amplitude of frequency is rushed to reduce the frequency of pulse so that controlled stepper motor carries out retarded motion.
What needs to be explained here is that the deceleration of stepper motor can be bigger than acceleration.According to the speed in speedometer at this Angle value determines the increase amplitude of the frequency of the pulse of timer output, changes the density of the train of pulse of timer output, in raising speed When, the train of pulse of timer output is gradually encrypted, and when slowing down, the train of pulse of timer output is gradually sparse.
Specifically, during above-mentioned acceleration and deceleration motion, according to the frequency and speed of the current PRF of timer output The operation step number that the current speed of stepper motor determines each speed threshold in accelerator is controlled in table;To the fortune of each speed threshold Row step number executes decrement operations, and when operation step number reduces to zero, the present speed shelves operation of controlled stepper motor finishes under entrance One speed threshold.Velocity amplitude not instead of consecutive variations during the acceleration and deceleration of stepper motor mentioned here, according to stepping The variation in stage, during acceleration and deceleration motion, each speed rises one grade, will calculate what present speed shelves step should be walked first Then step number is checked in a manner of successively decreasing, when step step number reduces to zero, notch speed degree operation finishes, into lower first gear speed. The operation step number of wherein each speed threshold step be according to timer export pulse interval time, export pulse frequency and The current speed of service of controlled stepper motor determines that formula is as follows:
Ns=fsΔt,
In formula:NsFor the operation step number of present speed shelves step, as shown in figure 3, fsTo be controlled the current operation of stepper motor Timer currently exports the frequency of pulse when speed is s, and Δ t is the time interval that timer currently exports pulse.
Specifically, the timer in above-described embodiment is started counting up from initial value X is counted, and reaches counting in current count value Enter interruption when maximum value and is controlled stepper motor speed change to export pulsed drive.Counting initial value X at this is arbitrarily to set , timer is started counting up from initial value is counted, when count value reaches the count maximum of timer, during timer overflows Disconnected, output pulse is to drive controlled stepper motor speed change.
Specifically, as shown in figure 4, the flow of the interruption service of timer is:
A1, timer after entering the interrupt, judge whether timer is exporting pulse, if so, then follow the steps A2, If not, thening follow the steps A3;
A2, output pulse are to drive controlled stepper motor speed change;
A3, the counting initial value X for reloading timer are simultaneously started counting up from initial value X is counted, and reach meter in current count value Enter interruption when number maximum value and is controlled stepper motor speed change to export pulsed drive.
Specifically, as shown in figure 5, above-mentioned accelerator includes adding boost phase, even boost phase and subtracting boost phase. Above-mentioned moderating process includes acceleration and deceleration stage, even decelerating phase and subtracts boost phase.Therefore, the stepper motor in the present embodiment Lifting speed curve be divided into 7 sections:Wherein, VoIt is the starting point speed of service of controlled stepper motor, a is even acceleration starting point, and b is to subtract to add Fast starting point, c are that at the uniform velocity starting point, d are acceleration and deceleration starting point, and e is even deceleration starting point, and f is deceleration starting point.Stepping in each stage The velocity variations of motor are all then to calculate should walking for the speed threshold step according to the velocity amplitude stepping above-mentioned by each stage Step number is checked by decreasing fashion, when step number reduces to zero, into next speed threshold.

Claims (5)

1. a kind of Control of Step Motor's Acceleration and Deceleration method, it is characterised in that:The method includes the steps:
S1, the highest running speed based on controlled stepper motor generate according to preset speed calculation formula and are controlled stepper motor Speedometer;
The selection of speed calculation formula includes following content:Infineon's microcontroller is selected, directly curve calculator is used to generate speed Table is spent, the velocity amplitude that wherein curve calculator generates is calculated according to following formula:
Velocity amplitude=(timer count maximum value-X) × T,
In formula:X is the counting initial value of timer, this counts initial value and can arbitrarily set, and T is the machine of singlechip chip Device period, timer count maximum value are determined according to the digit of timer;
S2, it is based on the speedometer, corresponding pulses is generated to drive controlled motor to carry out acceleration and deceleration motion using timer;
The step S2 includes:
S21, determine that timer generates the amplitude of variation of pulse frequency according to speedometer;
S22, started with the starting frequency of stepper motor, changing timer according to the amplitude of variation of the pulse frequency exports arteries and veins The frequency of punching is to drive controlled motor to carry out acceleration and deceleration motion;
The acceleration and deceleration motion includes accelerating, at the uniform velocity and moderating process:
In accelerator, the initial frequency to be controlled stepper motor starts, and the increase width of pulse frequency is determined according to speedometer The frequency for spending to increase pulse is so that controlled stepper motor is accelerated;
When the frequency of pulse increases to the required frequency of controlled stepper motor maximum (top) speed, it is controlled stepper motor and enters at the uniform velocity Process;
In moderating process, is started with the controlled required frequency of stepper motor maximum (top) speed, pulse frequency is determined according to speedometer The reduction amplitude of rate reduces the frequency of pulse so that controlled stepper motor carries out retarded motion;
During the acceleration and deceleration motion, stepping is controlled according in the frequency of the current PRF of timer output and speedometer The current speed of motor determines the operation step number of each speed threshold in accelerator;
Decrement operations are executed to the operation step number of each speed threshold, when operation step number reduces to zero, are controlled the current of stepper motor Speed threshold operation is finished into next speed threshold.
2. the method as described in claim 1, it is characterised in that:The timer is started counting up from initial value X is counted, and is being worked as Preceding count value enters interruption and is controlled stepper motor speed change to export pulsed drive when reaching count maximum.
3. method as claimed in claim 2, it is characterised in that:The timer further includes following steps after entering the interrupt:
Judge whether timer is exporting pulse, if it is, output pulse is to drive controlled stepper motor speed change;
If it is not, then reloading the counting initial value X of timer and being started counting up from initial value X is counted;
Enter interruption when current count value reaches count maximum and is controlled stepper motor speed change to export pulsed drive.
4. method as claimed in claim 3, it is characterised in that:The accelerator includes adding boost phase, even acceleration rank Section and subtract boost phase.
5. method as claimed in claim 4, it is characterised in that:The moderating process includes acceleration and deceleration stage, even deceleration rank Section and subtract boost phase.
CN201610813943.5A 2016-09-09 2016-09-09 Control of Step Motor's Acceleration and Deceleration method Active CN106341063B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610813943.5A CN106341063B (en) 2016-09-09 2016-09-09 Control of Step Motor's Acceleration and Deceleration method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610813943.5A CN106341063B (en) 2016-09-09 2016-09-09 Control of Step Motor's Acceleration and Deceleration method

Publications (2)

Publication Number Publication Date
CN106341063A CN106341063A (en) 2017-01-18
CN106341063B true CN106341063B (en) 2018-09-21

Family

ID=57823817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610813943.5A Active CN106341063B (en) 2016-09-09 2016-09-09 Control of Step Motor's Acceleration and Deceleration method

Country Status (1)

Country Link
CN (1) CN106341063B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107070329B (en) * 2017-02-20 2019-06-11 武汉科技大学 S type operation curve calculation method and stepper motor method of controlling rotation
CN107800338B (en) * 2017-11-17 2020-06-09 深圳怡化电脑股份有限公司 Stepping motor speed increasing and decreasing control method based on FPGA
CN109508050B (en) * 2018-11-28 2022-03-01 浙江工业大学 Speed control method for automatic point drilling machine
CN109742987B (en) * 2018-12-22 2020-03-24 西安航天动力研究所 Variable speed regulation control method of stepping motor based on variable frequency interruption of timer
CN110535379A (en) * 2019-08-21 2019-12-03 广芯微电子(广州)股份有限公司 A kind of control method of servo motor and system
CN110995083B (en) * 2019-12-20 2023-01-06 湖南航天机电设备与特种材料研究所 High-reliability locking control method and control system for three-self-inertia-unit product
CN113054879B (en) * 2021-03-26 2023-02-03 深圳市大富智慧健康科技有限公司 Speed control method of stepping motor and related equipment
CN113328662A (en) * 2021-06-03 2021-08-31 深圳市引力电子科技有限公司 Method for reproducing multiple dynamic speed values by one metering standard device
CN115001325B (en) * 2022-04-20 2023-03-24 北京瑞祺皓迪技术股份有限公司 Timed interrupt control method and multi-step motor synchronous control system and method
CN115173758B (en) * 2022-06-29 2023-03-21 北京瑞祺皓迪技术股份有限公司 Method, device and equipment for controlling speed of stepping motor and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59122400A (en) * 1982-12-24 1984-07-14 Fujitsu Ltd Control system for stepping motor
CN1485977A (en) * 2002-09-24 2004-03-31 力捷电脑股份有限公司 Method and apparatus for controlling linear acceleration and deceleration of step motor
CN101373947A (en) * 2007-08-22 2009-02-25 比亚迪股份有限公司 Method, apparatus and system for controlling stepper motor speed
CN101710814A (en) * 2009-12-25 2010-05-19 青岛朗讯科技通讯设备有限公司 Method for generating random frequency pulse and method for controlling acceleration and deceleration of stepper motor
CN101944873A (en) * 2010-09-17 2011-01-12 中国科学院上海技术物理研究所 Acceleration and speed reduction control method for stepper motor
CN102223124A (en) * 2011-06-24 2011-10-19 天津市亚安科技电子有限公司 Device for controlling stepping motor
CN102843084A (en) * 2012-09-11 2012-12-26 济南优耐特汽车电子有限公司 Acceleration and deceleration driving method for stepping motor

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59122400A (en) * 1982-12-24 1984-07-14 Fujitsu Ltd Control system for stepping motor
CN1485977A (en) * 2002-09-24 2004-03-31 力捷电脑股份有限公司 Method and apparatus for controlling linear acceleration and deceleration of step motor
CN101373947A (en) * 2007-08-22 2009-02-25 比亚迪股份有限公司 Method, apparatus and system for controlling stepper motor speed
CN101710814A (en) * 2009-12-25 2010-05-19 青岛朗讯科技通讯设备有限公司 Method for generating random frequency pulse and method for controlling acceleration and deceleration of stepper motor
CN101944873A (en) * 2010-09-17 2011-01-12 中国科学院上海技术物理研究所 Acceleration and speed reduction control method for stepper motor
CN102223124A (en) * 2011-06-24 2011-10-19 天津市亚安科技电子有限公司 Device for controlling stepping motor
CN102843084A (en) * 2012-09-11 2012-12-26 济南优耐特汽车电子有限公司 Acceleration and deceleration driving method for stepping motor

Also Published As

Publication number Publication date
CN106341063A (en) 2017-01-18

Similar Documents

Publication Publication Date Title
CN106341063B (en) Control of Step Motor's Acceleration and Deceleration method
CN104483906A (en) S-curve acceleration and deceleration control method and device of discrete sampling
CN108396451B (en) A kind of discrete velocity control method of Intelligent glove machine cylinder needle selection
CN102664585B (en) Precise control device for acceleration/deceleration of motor
CN105450093A (en) Direct current motor phase current sampling method and electronic equipment
CN105305755A (en) Detection method for rotor position of permanent-magnet synchronous motor
CN107670929A (en) A kind of dispensing method of point gum machine
CN107276469B (en) The driving method and driving device of stepper motor
CN103713660A (en) Control circuit for realizing S curve acceleration and deceleration of motion control system
CN103197577B (en) Robot controller impulsive synchronization method of adjustment and device
CN104753415B (en) Start-up and shut-down control method, system and the stepper motor of stepper motor
CN102522944A (en) Servo-motor acceleration-deceleration control method for servo pressure machine
CN103163838A (en) Control method for acceleration and deceleration of numerical control machine tool
CN106529161A (en) Method for determining ascending and descending load speed on basis of thermal power unit operation data
CN105529966B (en) A kind of method of frequency converter asynchronous starting electric excitation synchronous motor
CN101017102A (en) Return-to-zero method of indicating gauge and indicating gauge using same
CN102539070A (en) Method and system for identifying rotational inertia of alternating current servo system
CN103368484B (en) Motor motion control circuit and control method thereof
CN109586628A (en) A kind of adaptive step motor control algorithm
CN106374798A (en) Acceleration and deceleration control method of stepping motor with variable micro-stepping number
CN101635551A (en) Method for controlling gearless step motor in application of instrument
US8510023B2 (en) Method of controlling the ignition of a gasoline engine
CN209231361U (en) Speed detector, processing circuit and chip based on pwm signal
CN109327210A (en) Pulse signal production method and device
CN110365275A (en) A kind of position-less sensor of switched reluctance motor high speed operation control method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220228

Address after: 241000 Anshan South Road, Wuhu economic and Technological Development Zone, Anhui

Patentee after: Wuhu Sambalion auto technology Co.,Ltd.

Address before: 241009 No. 8, Changchun Road, Wuhu economic and Technological Development Zone, Anhui, China

Patentee before: CHERY AUTOMOBILE Co.,Ltd.