CN103713660A - Control circuit for realizing S curve acceleration and deceleration of motion control system - Google Patents

Control circuit for realizing S curve acceleration and deceleration of motion control system Download PDF

Info

Publication number
CN103713660A
CN103713660A CN201310684405.7A CN201310684405A CN103713660A CN 103713660 A CN103713660 A CN 103713660A CN 201310684405 A CN201310684405 A CN 201310684405A CN 103713660 A CN103713660 A CN 103713660A
Authority
CN
China
Prior art keywords
acceleration
deceleration
circuit
curve
velocity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201310684405.7A
Other languages
Chinese (zh)
Other versions
CN103713660B (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.)
Nanjing Institute of Technology
Original Assignee
Nanjing Institute of Technology
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 Nanjing Institute of Technology filed Critical Nanjing Institute of Technology
Priority to CN201310684405.7A priority Critical patent/CN103713660B/en
Publication of CN103713660A publication Critical patent/CN103713660A/en
Application granted granted Critical
Publication of CN103713660B publication Critical patent/CN103713660B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Control Of Electric Motors In General (AREA)

Abstract

Provided is a control circuit for realizing S curve acceleration and deceleration of a motion control system. A CPU bus interface circuit writes the accelerated acceleration, the average speed, the initial speed, the termination speed and instruction displacement parameters into corresponding registers in an instruction parameter register and sends out the working state of the circuit in response to an external request; an initialization circuit reads instruction parameters in the instruction parameter register, calculates the total speed change and reasonably plans the speed change of each section; an accelerated acceleration integral circuit and an acceleration integral circuit execute integral operation and writes the integral operation into corresponding registers in an execution register; a drive pulse inter-pulse calculation circuit reads a speed register and calculates the inter-pulse count value of drive pulses; a pulse generating circuit uses the inter-pulse count value to count a reference clock so as to achieve the required drive pulses; a displacement control circuit counts the output drive pulses, calculates the output displacement and writes the output displacement into a displacement register; and a state transfer and control circuit causes the S curve acceleration and deceleration control circuit to act in an orderly and coordinated mode in response to the reference clock.

Description

Realize the control circuit of kinetic control system S curve acceleration and deceleration
Technical field
The technical program belongs to motion control field, specifically a kind of control circuit of realizing the acceleration and deceleration of kinetic control system S curve.
Background technology
It is the gordian technique of robot, high-performance numerical control system etc. that acceleration and deceleration are controlled.Compared to other method, S curve acceleration and deceleration fixture has acceleration continuous, and rate curve is smooth, even, and the advantages such as motion is steady, nothing impact, can obtain comparatively ideal motion control effect.In conjunction with the actual demand of high-performance numerical control, robot etc., successively occurred the achievements such as nested type prediction fast algorithm, real-time software of S curve acceleration and deceleration, but its speed planning model, derivation algorithm and real-time etc. are this area research problem demanding prompt solutions.
Comparatively speaking, existing S curve Acceleration-deceleration Control Method adopts high-performance computer more, and the mode by software realizes.In acceleration and deceleration control process, computing machine, according to order parameter, by complicated, loaded down with trivial details inequality derivation, is determined acceleration and deceleration boundary condition and constraint condition; Then, according to the constraint condition obtaining, carry out speed planning, solve the equation of higher degree or inequality, determine the parameter such as each time point, movement velocity, acceleration of each motor segment.Operand is large, and to system real time, especially flush bonding processor is main kinetic control system, has considerable influence.
Summary of the invention
The practical application in the fields such as combining with digital control system, robot, the present invention researchs and analyses and utilizes S curve acceleration and deceleration process medium velocity, acceleration, the geometric properties of acceleration curve and mathematical relation each other thereof, by making rational planning for to its process and computing, suitably simplify, by means such as distributed storage and calculating, complexity, the loaded down with trivial details computing of avoiding existing S curve acceleration and deceleration to control, explore real-time is high, be convenient to realization S curve Acceleration-deceleration Control Method and circuit.
The present invention is in conjunction with the working control demand in the fields such as high-performance numerical control, robot, the technical program has proposed speed planning model and the Hardware Implementation of S curve acceleration and deceleration, and relevant high-performance real-time control circuit and logic control chip, to simplify the hardware and software of relevant kinetic control system, improve kinetic control system real-time, integrated level and reliability, high performance motion control solution is provided.
The principle of the technical program is described as follows:
1) motion analysis of S curve acceleration and deceleration process:
In motion control process, steady, smooth, uniform S type rate curve require motor segment Velocity-time change curve everywhere continuous, can lead; Require acceleration, acceleration and the speed change curves of motor segment to meet each other strict integral relation simultaneously:
1.1) add acceleration curve
The acceleration curve of S curve acceleration and deceleration, for relying on the sectional curve (the acceleration curve of acceleration and deceleration process as shown in Figure 1) of run duration, supposes that acceleration size is for J m, suppose current time t, add accelerating sections terminal time t 0, even accelerating sections terminal time t 1, subtract accelerating sections terminal time t 2, segment endpoint time t at the uniform velocity 3, accelerating and decelerating part terminal time t 4, even braking section terminal time t 5with subtract braking section terminal time t 6, according to acceleration curve, obtain the computing formula (1) of acceleration J:
J M 0 &le; t &le; t 0 , t 5 < t &le; t 6 0 t 0 < t &le; t 1 , t 2 < t 3 , t 4 < t &le; t 5 - J M t 1 < t &le; t 2 , t 3 < t &le; t 4 - - - ( 1 )
Wherein, add accelerating sections 0-t 0acceleration be J m; Even accelerating sections t 0-t 1acceleration be 0; Subtract accelerating sections t 1-t 2acceleration be-J m; At the uniform velocity section t 2-t 3acceleration be 0; Accelerating and decelerating part t 3-t 4acceleration be-J m; Even braking section t 4-t 5acceleration be 0; Subtract braking section t 5-t 6acceleration be J m;
1.2) accelerating curve
The integration that the acceleration of S curve acceleration and deceleration process is acceleration; (change curve as shown in Figure 2).
The accelerating curve everywhere continuous of acceleration and deceleration process, supposes sampling time Δ t, simultaneously current time t, add accelerating sections terminal time t 0, even accelerating sections terminal time t 1, subtract accelerating sections terminal time t 2, segment endpoint time t at the uniform velocity 3, accelerating and decelerating part terminal time t 4, even braking section terminal time t 5with subtract braking section terminal time t 6correspond respectively to sampling instant n, n t0, n t1, n t2, n t3, n t4, n t5with n t6, obtain the computing formula (2) of each motor segment acceleration a:
a = &Integral; 0 t J ( t ) dt = &Sigma; 0 n J M &Delta;t , 0 &le; t &le; t 0 , 0 &le; n &le; n t 0 a M , t 0 < t &le; t 1 , n t 0 < n &le; n t 1 a M - &Integral; t 1 t J ( t ) dt = a M - &Sigma; n t 1 n J M &Delta;t , t 1 < t &le; t 2 , n t 1 < n &le; n t 2 0 , t 2 < t &le; t 3 , n t 2 < n &le; n t 3 &Integral; t 3 t J ( t ) dt = - &Sigma; n t 3 n J M &Delta;t , t 3 < t &le; t 4 , n t 3 < n &le; n t 4 - a M , t 4 < t &le; t 5 , n t 4 < n &le; n t 5 - a M + &Integral; t 5 t J ( t ) dt = - a M + &Sigma; n t 5 n J M &Delta;t , t 5 < n &le; n t 6 - - - ( 2 )
Wherein, acceleration maximal value a mfor:
a M = &Integral; 0 t 0 J ( t ) dt = &Sigma; 0 n t 0 J M &Delta;t - - - ( 3 )
Add acceleration time 0-t 0, subtract acceleration time t 1-t 2, Acceleration and deceleration time t 3-t 4with subtract t deceleration time 5-t 6equate; Peak acceleration and minimum acceleration equal and opposite in direction, symbol are contrary; Add accelerating sections and subtract accelerating sections, accelerating and decelerating part and subtract braking section accelerating curve symmetry;
1.3) rate curve
The quadratic integral (change curve as shown in Figure 3) of the integration that the speed of S curve acceleration and deceleration process is acceleration, acceleration;
The speed everywhere continuous of S curve, can lead, rate curve has symmetry, adds accelerating sections and equates with the termination speed of even braking section, is V t0; Even accelerating sections equates with accelerating and decelerating part termination speed, is V t1; Utilize described assumed condition above, according to the rate curve shown in Fig. 3, obtain the computing formula (4) of the instantaneous velocity V of each motor segment:
v = &Integral; 0 t &Integral; 0 t J ( &tau; ) d&tau;dt = &Sigma; n &tau; = 0 n ( &Sigma; 0 n &tau; J M &Delta;&tau; ) &Delta;t , 0 &le; t &le; t 0 , 0 &le; n &le; n t 0 V t 0 + &Integral; t 0 t a M dt = V t 0 + &Sigma; n t 0 n a M &Delta;t , t 0 < t &le; t 1 , n t 0 < n &le; n t 1 V t 1 + &Integral; t 1 t ( a M - &Integral; t 1 t J M d&tau; ) dt = V t 1 + &Sigma; n &tau; = n t 1 n ( a M - &Sigma; n t 1 n &tau; J M &Delta;&tau; ) &Delta;t , t 1 < t &le; t 2 , n t 1 < n &le; n t 2 V t 2 , t 2 < t &le; t 3 , n t 2 < n &le; n t 3 V t 2 - &Integral; t 3 t ( &Integral; t 3 t J M d&tau; ) dt = V t 2 - &Sigma; n &tau; = n t 3 n ( &Sigma; n t 3 n &tau; J M &Delta;&tau; ) &Delta;t , t 3 < t &le; t 4 , n t 3 < n &le; n t 4 V t 1 + &Integral; t 4 t a ( t ) dt = V t 1 - &Sigma; n t 4 n a M &Delta;t , t 4 < t &le; t 5 , n t 4 < n &le; n t 5 V t 0 - &Integral; t 5 t ( a M - &Integral; t 5 t J M d&tau; ) dt = V t 0 - &Sigma; n &tau; = n t 5 n ( a M - &Sigma; n t 5 n &tau; J M &Delta;&tau; ) &Delta;t , t 5 < t &le; t 6 , n t 5 < n &le; n t 6 - - - ( 4 )
Herein, Δ t and Δ τ get with value.Wherein, peak acceleration a mthe same, add accelerating sections and stop speed V t0, even accelerating sections stops speed V t1with subtract accelerating sections and stop speed V t2according to formula (5), try to achieve:
V t 0 = &Sigma; n &tau; = 0 n 0 ( &Sigma; 0 n &tau; J M &Delta;t ) &Delta;t V t 1 = V t 0 + &Sigma; n t 0 n t 1 ( &Sigma; 0 n t 0 J M &Delta;t ) &Delta;t V t 2 = V t 1 + &Integral; t 1 t 2 a ( t ) dt = V t 1 + &Sigma; n &tau; = n t 1 n t 2 ( &Sigma; 0 n t 0 J M &Delta;t - &Sigma; n t 1 n &tau; J M &Delta;t ) &Delta;t - - - ( 5 )
Based on above-mentioned principle analysis, the present invention proposes the implementation method of S curve acceleration and deceleration, specific as follows:
An implementation method for kinetic control system S curve acceleration and deceleration,
The complete procedure of S curve acceleration and deceleration is divided into 7 motor segments, they be add accelerating sections, even accelerating sections, subtract accelerating sections, at the uniform velocity section, accelerating and decelerating part, even braking section and subtract braking section;
The parameter-definition of using in this method is: acceleration size is J m, current time t, add accelerating sections terminal time t 0, even accelerating sections terminal time t 1, subtract accelerating sections terminal time t 2, segment endpoint time t at the uniform velocity 3, accelerating and decelerating part terminal time t 4, even braking section terminal time t 5with subtract braking section terminal time t 6; Sampling time Δ t; Acceleration maximal value a m;
T 0, t 1, t 2, t 3, t 4, t 5with t 6the sampling instant n that difference is corresponding t0, n t1, n t2, n t3, n t4, n t5with n t6;
1) realization condition of S curve acceleration and deceleration:
The acceleration and deceleration of S curve are controlled the basic qualifications formula of process as formula (6), the accelerating of S curve acceleration and deceleration process, subtract acceleration, acceleration and deceleration and subtract and equate deceleration time, acceleration change amount and velocity variable equal and opposite in direction, symbol difference;
t 0 = t 2 - t 1 = t 4 - t 3 = t 6 - t 5 a t 0 = a t 1 = - a t 4 = - a t 5 V t 0 = V t 2 - V t 1 = V t 3 - V t 4 = V t 5 - V t 6 - - - ( 6 )
Wherein, a t0for adding accelerating sections terminal time t 0acceleration, a t1for even accelerating sections terminal time t 1acceleration, a t4for accelerating and decelerating part terminal time t 4acceleration, a t5for even braking section terminal time t 5acceleration; V t3for at the uniform velocity section termination speed, V t4termination speed, V for accelerating and decelerating part t5termination speed, V for even braking section t6for subtracting the termination speed of braking section;
If in S curve acceleration and deceleration process, instruction speed V l, instruct displacement L, definition time variable is:
Δt 1-2=t 2-t 1,Δt 3-4=t 4-t 3,Δt 5-6=t 6-t 5
Complete S curve acceleration and deceleration process should meet formula (7), wherein a maxfor maximum allowable acceleration:
L / V L &GreaterEqual; t 0 + &Delta;t 1 - 2 + &Delta;t 3 - 4 + &Delta;t 5 - 6 a M &le; a Max - - - ( 7 )
2) recursion formula of S curve acceleration and deceleration
Adopt recurrence method, utilize the motion state of previous moment, obtain the motion control parameter of current time:
If initial velocity is V 0; Current sampling instant k, corresponding acceleration J k, acceleration a kand movement velocity V k, each recursion formula based on previous moment is respectively formula (8), (9) and (10), and k gets 0,1,2 herein ...:
J k = J M , 0 &le; t &le; t 0 , t 5 < t &le; t 6 , 0 &le; k &le; n t 0 , < n t 5 k &le; n t 6 0 , t 0 < t &le; t 1 , t 2 < t &le; t 3 , t 4 < t &le; t 5 , n t 0 < k &le; n t 1 , n t 2 < k &le; n t 3 , n t 4 < k &le; n t 5 - J M t 1 < t &le; t 2 , t 3 < t &le; t 4 , n t 1 < k &le; n t 2 , n t 3 < k &le; n t 4 - - - ( 8 )
a 0 = 0 a k = a k - 1 + J k &Delta;t - - - ( 9 )
V 0 = 0 V k = V k - 1 + a k &Delta;t - - - ( 10 )
Finally, the S curve acceleration and deceleration of controlling controlled device by kinetic control system according to motion control parameter are moved.
The motion planning of the kinetic control system S curve acceleration and deceleration based on the method is as follows:
1) motion planning of S curve acceleration and deceleration:
1.1) S curve acceleration and deceleration process is utilized the controlled condition that speed and variable quantity thereof are changed as each motor segment:
During motion planning, requirement adds accelerating sections, subtracts accelerating sections, accelerating and decelerating part, subtract braking section velocity variable and equate, and be all less than 50% of whole accelerator or moderating process velocity variations total amount, thereby all motor segments that make acceleration and deceleration process comprise the acceleration and deceleration of S curve, realize level and smooth movement effects;
1.2) by velocity variations, the acceleration and deceleration of S curve are divided into uniform motion, accelerated motion and retarded motion three types, are realized respectively;
The formation of uniform motion instruction comprises speed and displacement; All motor segments that the acceleration and deceleration process of uniform motion comprises the acceleration and deceleration of S curve; Motion through accelerating, even acceleration accelerates to reach instruction speed and then starts uniform motion with subtracting; And by acceleration and deceleration, even deceleration and the recovery initial velocity that slows down, reach instruct displacement simultaneously;
The formation of accelerated motion instruction comprises starting velocity, termination speed and displacement; The acceleration and deceleration process of accelerated motion is left half S curve, and motion is started by starting velocity, and through accelerating, even acceleration accelerates to increase to termination speed with subtracting, the motion that then remains a constant speed, finally reaches instruct displacement;
The formation of retarded motion instruction comprises starting velocity, termination speed and displacement, the acceleration and deceleration process of retarded motion is right half S curve, motion is started by starting velocity, through motor segments such as acceleration and deceleration, even deceleration and decelerations, speed is down to termination speed and the motion that remains a constant speed, and finally reaches instruct displacement;
2) abnormality processing:
Situation a, at the accelerating and decelerating part that adds accelerating sections and retarded motion that adds accelerating sections, accelerated motion of uniform motion, if its acceleration reaches a maxor-a max, S curve acceleration and deceleration motion no longer waits until that the velocity variable that adds accelerating sections or accelerating and decelerating part reaches the predetermined value that adds accelerating sections or accelerating and decelerating part velocity variable, but directly enters even accelerating sections or even braking section;
Situation b, adding accelerating sections, even accelerating sections or subtracting accelerating sections at uniform motion, if current displacement reaches 50% of instruct displacement amount, S curve acceleration and deceleration motion no longer waits until that the velocity variable that adds accelerating sections, even accelerating sections or subtract accelerating sections reaches predetermined value, subtracts braking section, even braking section or accelerating and decelerating part accordingly but directly enter.
If the current displacement of situation c reaches instruct displacement, finish these acceleration and deceleration and control.
In described motion planning:
Described 1.1) S curve acceleration and deceleration process is utilized in speed and the controlled condition of variable quantity as each motor segment conversion thereof:
Add accelerating sections and subtract accelerating sections velocity variable and all get 1/4,3/8,7/16 or 15/32 of accelerator velocity variations total amount;
Accelerating and decelerating part and subtract braking section velocity variable and all get 1/4,3/8,7/16 or 15/32 of moderating process velocity variations total amount;
The velocity variable of even accelerating sections is all got 1/2,1/4,1/8 or 1/16 of accelerator velocity variations total amount;
The velocity variable of even braking section is all got 1/2,1/4,1/8 or 1/16 of moderating process velocity variations total amount;
Described 2) in abnormality processing:
In situation a, described predetermined value is
Add accelerating sections velocity variations and measure 1/4,3/8,7/16 or 15/32 of accelerator velocity variations total amount;
Accelerating and decelerating part velocity variations measures 1/4,3/8,7/16 or 15/32 of moderating process velocity variations total amount;
In situation b, described predetermined value is
Add accelerating sections velocity variations and measure 1/4,3/8,7/16 or 15/32 of accelerator velocity variations total amount;
Subtract accelerating sections velocity variations and measure 1/4,3/8,7/16 or 15/32 of accelerator velocity variations total amount;
The velocity variations of even accelerating sections measures 1/2,1/4,1/8 or 1/16 of accelerator velocity variations total amount;
S curve Acceleration-deceleration Control Method based on the method, is characterized in that:
If initial velocity is V 0; Current sampling instant k, corresponding acceleration J k, acceleration a kand movement velocity V k;
(1) speed is controlled:
If pulsewidth count value cnt 0, count value cnt between arteries and veins, reference clock cycle T cK, the formula (11) of general driving pulse frequency f:
f = 1 ( cnt + cnt 0 ) T CK - - - ( 11 )
(2) determining of kinematic parameter:
Be convenient to the acceleration and deceleration of S curve and control circuit description and calculate, to the revision that formula (8)~carry out (10), definition
Figure BDA0000436533020000062
formula (14) is new general acceleration recursion formula:
a k = a 0 + sigma J k &Delta;t sigma J k = sigma J k - 1 + J k a 0 = 0 - - - ( 14 )
Wherein, sigmaJ kΔ t is 0-k acceleration change amount, i.e. acceleration integration constantly;
Definition
Figure BDA0000436533020000071
revised general rate delivery is calculated formula (16):
V k = V 0 + ( ka 0 + sigma A k &Delta;t ) &Delta;t sigma A k = sigma A k - 1 + sigmaJ k a 0 = 0 , V 0 = 0 - - - ( 16 )
Wherein, (ka 0+ sigmaA kΔ t) Δ t is 0-k velocity variations total amount, i.e. acceleration integration constantly.
The servomotor that moves through that described S curve Acceleration-deceleration Control Method is controlled is realized, and adopts the mode of driving pulse bonding position control signal, pulsed frequency controlled motion speed, and number of pulses is controlled amount of displacement; By Special timer, realize between the pulsewidth and arteries and veins of driving pulse, regulate this timer count value, and then realize between pulsewidth, arteries and veins the control with pulsed frequency.
In described S curve Acceleration-deceleration Control Method, step equivalent δ gets 1 μ m, and the reference clock cycle, 50ns was 20MHz, and driving pulse pulsewidth is got definite value 1 μ s, pulsewidth count value cnt 0be 20:
(1) for speed, control:
Obtain thus the relational expression (12) of speed v (mm/s of unit) and count value cnt:
v = f&delta; = &delta; ( cnt + cnt 0 ) T ck = 1 &times; 10 - 3 ( cnt + 20 ) 50 &times; 10 - 9 = 20 &times; 10 3 cnt + 20 - - - ( 12 )
The formula of speed controlled quentity controlled variable cnt (13) is:
cnt = 20 &times; 10 3 v - 20 - - - ( 13 )
(2) determining for kinematic parameter:
Sampling time Δ t is set constant, remains 10 μ s, obtain special-purpose acceleration recursion formula (15); In formula, acceleration and acceleration unit are respectively mm/s 2with mm/s 3;
a k = a 0 + sigma J k / 10 5 sigma J k = sigmaJ k - 1 a 0 = 0 + J k - - - ( 15 )
Sampling time Δ t is 10 μ s, obtains specific speed recursion formula (17); Wherein acceleration and speed unit are respectively mm/s 2with mm/s;
V k = V 0 + sigma A k / 10 10 sigmaA k = sigma A k - 1 + sigmaJ k V 0 = 0 - - - ( 17 )
In formula 10 10division operation needs more software and hardware resources, while therefore calculating, speed is divided into integer and remainder part, sigmaA kas remainder register; Each motion sampling is carried out after an integral operation, if sigmaA k>=10 10, the integral part of instantaneous velocity V is carried out add-one operation, then by sigmaA k-10 10the new remainder obtaining deposits sigmaA in k, for next speed, calculate; Otherwise, sigmaA kconstant.
For described S curve Acceleration-deceleration Control Method, the course of work of the control system of employing the method is as follows:
Acceleration and deceleration are controlled and are divided into three kinds of motor patterns, are respectively: uniform motion pattern, accelerated motion pattern and retarded motion pattern.
After powering on, control system enters idle condition; Have acceleration and deceleration instruction to send into, control system is obtained order parameter, and order parameter comprises acceleration, average velocity, instruct displacement, starting velocity and termination speed, then enters motion init state; Under init state, control system is differentiated acceleration and deceleration pattern according to order parameter, just calculates the starting velocity V of each section of velocity variable and even accelerating sections f, stop speed V s;
Motion initialization completes, and system starts S acceleration and deceleration and controls process, and acceleration and acceleration be integration regularly, asks for instantaneous acceleration, speed computing velocity controlled quentity controlled variable cnt, by pulse generating circuit, produces respective drive pulse, realizes corresponding motor segment;
After initialization finishes, if instruction is uniform motion pattern or accelerated motion pattern, control system proceeds to and adds acceleration mode; If retarded motion pattern, control system turns acceleration and deceleration state;
Add under acceleration mode situation 1, instantaneous acceleration a>=a max, control system is using instantaneous velocity V as new even accelerating sections starting velocity V fstorage, reruning simultaneously and storing even accelerating sections stops speed V s, then proceed to even acceleration mode; Situation 2, if a < is a maxand V>=V f, control system directly enters even acceleration mode;
Even acceleration mode, instantaneous velocity V>=V s, control system enters and subtracts acceleration mode; Subtracting under acceleration mode then, when acceleration reduces to 0 value, control system store instant displacement s as at the uniform velocity section initial displacement L f, enter uniform speed motion state; Under uniform speed motion state, if uniform motion pattern and displacement s>=L-L f, control system turns acceleration and deceleration state; If accelerated motion pattern and instant displacement s>=L, control system turns Idle state, and acceleration and deceleration are controlled and finished;
Acceleration and deceleration state, control system waits until that instantaneous velocity V is down to V safter enter even deceleration regime; Yet, if under acceleration and deceleration state, there is a≤-a maxsituation, control system is using instantaneous velocity V as V s, the speed of simultaneously reruning V fand storage, directly proceed to even deceleration regime; Even deceleration regime, instantaneous velocity V≤V f, system enters and subtracts deceleration regime; Finally, subtract under deceleration regime, instant displacement s>=L, control system turns Idle state, and acceleration and deceleration are controlled and are finished;
Under uniform motion pattern, adding accelerating sections, even accelerating sections, subtract any moment of accelerating sections, if current displacement refers to, make 50% of displacement, control system directly enters accelerating and decelerating part; Under retarded motion pattern, in any time of retarded motion process, if current displacement reaches instruct displacement, control system directly enters idle condition, and acceleration and deceleration are controlled and finished; Under accelerated motion pattern, in any time of accelerated motion process, if current displacement reaches instruct displacement, control system directly enters idle condition, and acceleration and deceleration are controlled and finished.
A kind of control circuit of realizing the acceleration and deceleration of kinetic control system S curve, wait in use, the acceleration and deceleration of this S curve are controlled circuit and are received for example, motion control instruction from outside (controlling computing machine), according to order parameter, calculate each motion acceleration, speed and the speed controlled quentity controlled variable constantly in S curve acceleration and deceleration motion section; Then, according to speed controlled quentity controlled variable, between dynamic adjustments arteries and veins and pulsed frequency, produce the driven by servomotor pulse that meets steering order;
The acceleration and deceleration of S curve are controlled circuit and are comprised: counting circuit between cpu bus interface circuit, order parameter register, initializing circuit, acceleration integrating circuit, integrated acceleration circuit, execution register, state conversion and control circuit, driving pulse circuit for generating, displacement control circuit and driving pulse arteries and veins;
Cpu bus interface circuit comprises parallel bus interface circuit and spi bus interface circuit;
Described order parameter register comprises acceleration register, average velocity register, starting velocity register, stops speed register and instruction shift register;
Described execution register comprises shift register, speed register, acceleration register and motion state register;
Functions and effect are as follows:
Cpu bus interface circuit is written into the corresponding registers in order parameter register acceleration, average velocity, starting velocity, termination speed and instruction displacement parameter, circuit response external request is simultaneously controlled in the acceleration and deceleration of this S curve, sends the duty that circuit is controlled in the acceleration and deceleration of this S curve;
Order parameter in initializing circuit reading command parameter register, computing velocity changes total amount each section of velocity variable of making rational planning for;
Acceleration integrating circuit and integrated acceleration circuit are carried out integral operation, ask for respectively instantaneous acceleration and speed, and write the corresponding registers of carrying out in register;
Counting circuit reading speed register between driving pulse arteries and veins, according to count value between the arteries and veins of instantaneous velocity calculating driving pulse; Pulse generating circuit utilizes count value between arteries and veins to count reference clock, realizes needed driving pulse;
The driving pulse counting of displacement control circuit to output, calculates output displacement and writes shift register;
State conversion and control circuit response reference clock, revise the acceleration and deceleration of this S curve according to running status, instantaneous velocity, acceleration and control circuit running status, controls the acceleration and deceleration of this S curve and control the orderly coordination of circuit.
Parameter request in the design of this control circuit is as follows:
(1) speed is controlled:
If pulsewidth count value cnt 0, count value cnt between arteries and veins, reference clock cycle T cK, following is the formula (11) of general driving pulse frequency f:
f = 1 ( cnt + cnt 0 ) T ck - - - ( 11 )
Step equivalent δ gets 1 μ m, and the reference clock cycle, 50ns was 20MHz, and driving pulse pulsewidth is got definite value 1 μ s, pulsewidth count value cnt 0be 20, for (1) speed, control:
Obtain thus the relational expression (12) of speed v (mm/s of unit) and count value cnt:
v = f&delta; = &delta; ( cnt + cnt 0 ) T ck = 1 &times; 10 - 3 ( cnt + 20 ) 50 &times; 10 - 9 = 20 &times; 10 3 cnt + 20 - - - ( 12 )
The formula of speed controlled quentity controlled variable cnt (13) is:
cnt = 20 &times; 10 3 v - 20 - - - ( 13 )
(2) determining of kinematic parameter:
Be convenient to the acceleration and deceleration of S curve and control circuit description and calculate, to the revision that formula (8)~carry out (10), establish
Figure BDA0000436533020000104
formula (14) is new general acceleration recursion formula:
a k = a 0 + sigma J k &Delta;t sigma J k = sigma J k - 1 + J k a 0 = 0 - - - ( 14 )
Wherein, sigmaJ kΔ t is 0-k acceleration change amount, i.e. acceleration integration constantly;
Sampling time Δ t being set constant, is 10 μ s, obtains being applicable to the special-purpose acceleration recursion formula (15) that circuit is controlled in the acceleration and deceleration of S curve; In formula, acceleration and acceleration unit are respectively mm/s 2with mm/s 3;
a k = a 0 + sigma J k / 10 5 sigma J k = sigmaJ k - 1 a 0 = 0 + J k - - - ( 15 )
If
Figure BDA0000436533020000107
obtain revised general rate delivery and calculate formula (16):
V k = V 0 + ( ka 0 + sigma A k &Delta;t ) &Delta;t sigma A k = sigma A k - 1 + sigmaJ k a 0 = 0 , V 0 = 0 - - - ( 16 )
Wherein, (ka 0+ sigmaA kΔ t) Δ t is 0-k velocity variations total amount, i.e. acceleration integration constantly.
Sampling time Δ t is 10 μ s, obtains being applicable to the specific speed recursion formula (17) that circuit is controlled in the acceleration and deceleration of S curve; Wherein acceleration and speed unit are respectively mm/s 2with mm/s;
V k = V 0 + sigma A k / 10 10 sigmaA k = sigma A k - 1 + sigmaJ k V 0 = 0 - - - ( 17 )
In formula 10 10division operation needs more hardware resource, while therefore calculating, speed is divided into integer and remainder part, sigmaA kas remainder register; Each motion sampling is carried out after an integral operation, if sigmaA k>=10 10, the integral part of instantaneous velocity V is carried out add-one operation, then by sigmaA k-10 10the new remainder obtaining deposits sigmaA in k, for next speed, calculate; Otherwise, sigmaA kconstant.
It is as follows with state transition condition that the definition of circuit running status is controlled in the acceleration and deceleration of this S curve:
The 10 kinds of running statuses that arrange of circuit are controlled in these acceleration and deceleration, in Table 1:
The running status of circuit is controlled in table 1 acceleration and deceleration
State description State Explanation State Explanation State Explanation State Explanation
IDLE Idle state RST Motion initialization CAC Even acceleration ZAC At the uniform velocity UDC Even deceleration
DTR data transmit AAC Acceleration RAC Subtract acceleration ADC Acceleration and deceleration RDC Deceleration
While realizing this S curve acceleration and deceleration control circuit, current displacement s, the velocity variations total amount Δ of definition acceleration and deceleration process v, at the uniform velocity section initial displacement L f, even accelerating sections starting velocity V f, even accelerating sections stops speed V s, velocity variation coefficient k v(0<k v≤ 0.5); Define motor pattern m, uniform motion m=0, accelerated motion m=1, retarded motion m=2 simultaneously.Suppose and add accelerating sections, subtract accelerating sections, accelerating and decelerating part, subtract braking section velocity variations k vΔ v, even accelerating sections, even braking section velocity variations (1-2k v) Δ v; k vget 1/4,3/8,7/16 or 15/32, the state transition condition obtaining is in Table 2:
Table 2 state transition condition and implication
Figure BDA0000436533020000112
Also comprise intersegmental translation register, intersegmental translation register comprises the at the uniform velocity initial shift register of section, even end of boost speed register and even acceleration starting velocity register;
It is as follows that circuit working process is controlled in these acceleration and deceleration:
After powering on, the acceleration and deceleration of this S curve are controlled circuit and are entered idle condition;
Write signal is effective, and circuit turns data transfer state, and bus interface response write signal WR, writes acceleration, average velocity, instruct displacement, starting velocity and termination speed successively;
Acceleration and deceleration enable signal is effective, and motion init state is activated, and circuit reading command parameter register is differentiated acceleration and deceleration pattern according to the parameter writing, and just calculates the starting velocity V of each section of velocity variable and even accelerating sections f, stop speed V s;
Under idle condition, acceleration and deceleration enable signal also can activate motion init state, and now the direct reading command parameter register of circuit carries out initialization;
After motion initialization completes, the acceleration and deceleration of this S curve are controlled circuit and are started S curve acceleration and deceleration control process, acceleration and integrated acceleration circuit 10 μ s integrations are once, ask for instantaneous acceleration, speed computing velocity controlled quentity controlled variable cnt, by pulse generating circuit, produce respective drive pulse, realize corresponding motor segment;
Initialization finishes, if instruction is uniform motion or accelerated motion (m=0,1), this S curve acceleration and deceleration control circuit proceeds to and adds acceleration mode; If instruction is retarded motion pattern (m=2), the acceleration and deceleration of this S curve are controlled circuit and are turned acceleration and deceleration state;
Add acceleration mode, if instantaneous acceleration a>=a max, the acceleration and deceleration of this S curve are controlled circuit using instantaneous velocity V as new even accelerating sections starting velocity V fdeposit intersegmental translation register in, reruning simultaneously and storing even accelerating sections stops speed V s, then proceed to even acceleration mode; If a < is a maxand V>=V f, circuit directly enters even acceleration mode; Even acceleration mode, instantaneous velocity V>=V s, circuit enters and subtracts acceleration state;
Then subtract acceleration mode, when acceleration reduces to 0 value, the acceleration and deceleration of this S curve are controlled the instant displacement s of circuitry stores as the initial displacement L of section at the uniform velocity f, enter uniform speed motion state;
At the uniform velocity under state, if uniform motion (m=0) and displacement s>=L-L f, circuit turns acceleration and deceleration state; If accelerated motion (m=1) and instant displacement s>=L, the acceleration and deceleration of this S curve are controlled circuit and are turned Idle state, complete acceleration and deceleration and control;
Acceleration and deceleration state, circuit waits until that instantaneous velocity V is down to V safter enter even deceleration regime.Yet, if under acceleration and deceleration state, there is a≤-a maxsituation, circuit is using instantaneous velocity V as V s, the speed of simultaneously reruning V fand storage, directly proceed to even deceleration regime;
Even deceleration regime, instantaneous velocity V≤V f, circuit enters and subtracts deceleration regime;
Finally, subtract under deceleration regime, instant displacement s >=L, the acceleration and deceleration of this S curve are controlled circuit and are turned Idle state, complete acceleration and deceleration and control;
Switch condition
Figure BDA0000436533020000121
for the abnormality processing under uniform motion (m=0) pattern, in acceleration, even acceleration, subtract any moment of accelerating sections, if current displacement reaches 50% of instruct displacement, the acceleration and deceleration of this S curve are controlled circuit and are directly crossed normal process and enter accelerating and decelerating part;
Switch condition
Figure BDA0000436533020000122
for the abnormality processing under retarded motion (m=2) pattern, in any time of motion, if current displacement reaches instruct displacement, the acceleration and deceleration of this S curve are controlled circuit and are directly entered idle condition, complete acceleration and deceleration and control;
Switch condition
Figure BDA0000436533020000131
for the abnormality processing under accelerated motion (m=1) pattern, in any time of motion, if current displacement reaches instruct displacement, the acceleration and deceleration of this S curve are controlled circuit and are directly entered idle condition, complete acceleration and deceleration and control.
The invention has the beneficial effects as follows, with respect to software acceleration and deceleration, control, the hardware controlling method of S curve acceleration and deceleration is realized by specialized hardware or integrated circuit, does not rely on the computing machine and control software of control system.Therefore, control computing machine is without complicated, loaded down with trivial details derivation when realizing speed planning, control, and the requirement of real-time of its input/output operations also decreases, and controls with calculation task and greatly simplifies.Simultaneously, owing to adopting special IC and control chip, permissible speed, the real-time of S curve acceleration and deceleration motion can be greatly improved, kinetic control system requires greatly to reduce to the speed of CPU, computing, software configuration and complexity are greatly simplified, and contribute to the research and development of high speed, multiaxis, compound movement control system.
Accompanying drawing explanation
Fig. 1 is the acceleration curve of S curve acceleration and deceleration process;
Fig. 2 is the accelerating curve of S curve acceleration and deceleration process;
Fig. 3 is the rate curve of S curve acceleration and deceleration process;
Fig. 4 is that electrical block diagram is controlled in acceleration and deceleration;
Fig. 5 is that circuit state conversion schematic diagram is controlled in acceleration and deceleration;
Fig. 6 is control circuit emulation testing oscillogram;
Fig. 7 a)~Fig. 7 c) be depicted as the rate curve obtaining in circuit simulation; Wherein, Fig. 7 is a) the velocity simulation curve of above-mentioned accelerated motion instruction, Fig. 7 b) be the velocity simulation curve of retarded motion instruction, Fig. 7 c) be the velocity simulation curve of uniform motion instruction;
Fig. 8 a)~Fig. 8 c) be depicted as Fig. 7 a)~Fig. 7 c) the circuit sequence simulation result oscillogram of 3 movement instruction implementations; Wherein, Fig. 8 is a) corresponding is the signal simulation waveform of 30mm/s~100mm/s accelerated motion instruction, Fig. 8 b) corresponding is the signal simulation waveform of 100mm/s~30mm/s retarded motion instruction, Fig. 8 c) corresponding be the signal simulation waveform of 100mm/s uniform motion instruction.
Embodiment
Below in conjunction with accompanying drawing and embodiment, the technical program is further illustrated as follows:
The motion analysis of 1.S curve acceleration and deceleration process
In motion control process, steady, smooth, uniform S type rate curve require motor segment Velocity-time change curve everywhere continuous, can lead; Require acceleration, acceleration and the speed change curves of motor segment to meet each other strict integral relation simultaneously.
1) add acceleration curve
The acceleration curve of S curve acceleration and deceleration, for relying on the sectional curve of run duration, supposes that acceleration size is for J m, the acceleration curve of acceleration and deceleration process as shown in Figure 1.
Suppose current time t, add accelerating sections terminal t 0, even accelerating sections terminal t 1, subtract accelerating sections terminal t 2, segment endpoint t at the uniform velocity 3, accelerating and decelerating part terminal t 4, even braking section terminal t 5with subtract braking section terminal t 6, according to the acceleration curve shown in Fig. 1, obtain the computing formula (1) of acceleration J:
J M 0 &le; t &le; t 0 , t 5 < t &le; t 6 0 t 0 < t &le; t 1 , t 2 < t 3 , t 4 < t &le; t 5 - J M t 1 < t &le; t 2 , t 3 < t &le; t 4 - - - ( 1 )
Wherein, add accelerating sections 0-t 0acceleration be J m; Even accelerating sections t 0-t 1acceleration be 0; Subtract accelerating sections t 1-t 2acceleration be-J m; At the uniform velocity section t 2-t 3acceleration be 0; Accelerating and decelerating part t 3-t 4acceleration be-J m; Even braking section t 4-t 5acceleration be 0; Subtract braking section t 5-t 6acceleration be J m.
2) accelerating curve
The integration that the acceleration of S curve acceleration and deceleration process is acceleration, change curve as shown in Figure 2.
The accelerating curve everywhere continuous of acceleration and deceleration process, supposes sampling time Δ t, simultaneously current time t, add accelerating sections terminal t 0, even accelerating sections terminal t 1, subtract accelerating sections terminal t 2, segment endpoint t at the uniform velocity 3, accelerating and decelerating part terminal t 4, even braking section terminal t 5with subtract braking section terminal t 6correspond respectively to sampling instant n, n t0, n t1, n t2, n t3, n t4, n t5with n t6, obtain the computing formula (2) of each motor segment acceleration a:
a = &Integral; 0 t J ( t ) dt = &Sigma; 0 n J M &Delta;t , 0 &le; t &le; t 0 , 0 &le; n &le; n t 0 a M , t 0 < t &le; t 1 , n t 0 < n &le; n t 1 a M - &Integral; t 1 t J ( t ) dt = a M - &Sigma; n t 1 n J M &Delta;t , t 1 < t &le; t 2 , n t 1 < n &le; n t 2 0 , t 2 < t &le; t 3 , n t 2 < n &le; n t 3 &Integral; t 3 t J ( t ) dt = - &Sigma; n t 3 n J M &Delta;t , t 3 < t &le; t 4 , n t 3 < n &le; n t 4 - a M , t 4 < t &le; t 5 , n t 4 < n &le; n t 5 - a M + &Integral; t 5 t J ( t ) dt = - a M + &Sigma; n t 5 n J M &Delta;t , t 5 < n &le; n t 6 - - - ( 2 )
Wherein, acceleration maximal value a mfor:
a M = &Integral; 0 t 0 J ( t ) dt = &Sigma; 0 n t 0 J M &Delta;t - - - ( 3 )
Add acceleration time 0-t 0, subtract acceleration time t 1-t 2, Acceleration and deceleration time t 3-t 4with subtract t deceleration time 5-t 6equate; Peak acceleration and minimum acceleration equal and opposite in direction, symbol are contrary; Add accelerating sections and subtract accelerating sections, accelerating and decelerating part and subtract braking section accelerating curve symmetry.
3) rate curve
The integration that the speed of S curve acceleration and deceleration process is acceleration, the quadratic integral of acceleration, change curve as shown in Figure 3.
The speed everywhere continuous of S curve, can lead, rate curve has symmetry, adds accelerating sections and equates with the termination speed of even braking section, is V t0; Even accelerating sections equates with accelerating and decelerating part termination speed, is V t1.Utilize described assumed condition above, according to the rate curve shown in Fig. 3, obtain the computing formula (4) of the instantaneous velocity V of each motor segment:
v = &Integral; 0 t &Integral; 0 t J ( &tau; ) d&tau;dt = &Sigma; n &tau; = 0 n ( &Sigma; 0 n &tau; J M &Delta;&tau; ) &Delta;t , 0 &le; t &le; t 0 , 0 &le; n &le; n t 0 V t 0 + &Integral; t 0 t a M dt = V t 0 + &Sigma; n t 0 n a M &Delta;t , t 0 < t &le; t 1 , n t 0 < n &le; n t 1 V t 1 + &Integral; t 1 t ( a M - &Integral; t 1 t J M d&tau; ) dt = V t 1 + &Sigma; n &tau; = n t 1 n ( a M - &Sigma; n t 1 n &tau; J M &Delta;&tau; ) &Delta;t , t 1 < t &le; t 2 , n t 1 < n &le; n t 2 V t 2 , t 2 < t &le; t 3 , n t 2 < n &le; n t 3 V t 2 - &Integral; t 3 t ( &Integral; t 3 t J M d&tau; ) dt = V t 2 - &Sigma; n &tau; = n t 3 n ( &Sigma; n t 3 n &tau; J M &Delta;&tau; ) &Delta;t , t 3 < t &le; t 4 , n t 3 < n &le; n t 4 V t 1 + &Integral; t 4 t a ( t ) dt = V t 1 - &Sigma; n t 4 n a M &Delta;t , t 4 < t &le; t 5 , n t 4 < n &le; n t 5 V t 0 - &Integral; t 5 t ( a M - &Integral; t 5 t J M d&tau; ) dt = V t 0 - &Sigma; n &tau; = n t 5 n ( a M - &Sigma; n t 5 n &tau; J M &Delta;&tau; ) &Delta;t , t 5 < t &le; t 6 , n t 5 < n &le; n t 6 - - - ( 4 )
Herein, Δ t and Δ τ get with value.Wherein, peak acceleration a mthe same, add accelerating sections and stop speed V t0, even accelerating sections stops speed V t1with subtract accelerating sections and stop speed V t2according to formula (5), try to achieve:
V t 0 = &Sigma; n &tau; = 0 n 0 ( &Sigma; 0 n &tau; J M &Delta;t ) &Delta;t V t 1 = V t 0 + &Sigma; n t 0 n t 1 ( &Sigma; 0 n t 0 J M &Delta;t ) &Delta;t V t 2 = V t 1 + &Integral; t 1 t 2 a ( t ) dt = V t 1 + &Sigma; n &tau; = n t 1 n t 2 ( &Sigma; 0 n t 0 J M &Delta;t - &Sigma; n t 1 n &tau; J M &Delta;t ) &Delta;t - - - ( 5 )
The implementation method of 2.S curve acceleration and deceleration
1) realization condition of S curve acceleration and deceleration
With reference to the motion process analysis of S curve acceleration and deceleration, in conjunction with the geometric properties of motion process medium velocity, acceleration and acceleration curve, can obtain the basic qualifications formula (6) that process is controlled in the acceleration and deceleration of S curve.Be that the adding accelerating sections, subtract accelerating sections of S curve acceleration and deceleration process, accelerating and decelerating part equate with subtracting the braking section time, acceleration change amount and velocity variable equal and opposite in direction, symbol is different.
t 0 = t 2 - t 1 = t 4 - t 3 = t 6 - t 5 a t 0 = a t 1 = - a t 4 = - a t 5 V t 0 = V t 2 - V t 1 = V t 3 - V t 4 = V t 5 - V t 6 - - - ( 6 )
Suppose and establish in S curve acceleration and deceleration process, instruction speed V l, instruct displacement L, definition time variable:
Δt 1-2=t 2-t 1,Δt 3-4=t 4-t 3,Δt 5-6=t 6-t 5
Complete S curve acceleration and deceleration process should meet formula (7), wherein a maxmaximum allowable acceleration for system:
L / V L &GreaterEqual; t 0 + &Delta;t 1 - 2 + &Delta;t 3 - 4 + &Delta;t 5 - 6 a M &le; a Max - - - ( 7 )
2) recursion formula of S curve acceleration and deceleration
Utilize above-mentioned condition, in conjunction with formula (1)~(5), can directly plan each motor segment of S curve acceleration and deceleration, determine each kinematic parameter of motor segment; From simplifying the angle of calculating, conveniently realizing, the present invention does not adopt said method to realize the control of S curve acceleration and deceleration, but on above-mentioned formula basis, adopts recursion formula, utilizes the motion state of previous moment, obtains the kinematic parameter of current time.Suppose current sampling instant k, acceleration J k, acceleration a kand movement velocity V k, each recursion formula based on previous moment is shown in respectively formula (8) and (9) and (10):
J k = J M , 0 &le; t &le; t 0 , t 5 < t &le; t 6 , 0 &le; k &le; n t 0 , < n t 5 k &le; n t 6 0 , t 0 < t &le; t 1 , t 2 < t &le; t 3 , t 4 < t &le; t 5 , n t 0 < k &le; n t 1 , n t 2 < k &le; n t 3 , n t 4 < k &le; n t 5 - J M t 1 < t &le; t 2 , t 3 < t &le; t 4 , n t 1 < k &le; n t 2 , n t 3 < k &le; n t 4 - - - ( 8 )
a 0 = 0 a k = a k - 1 + J k &Delta;t - - - ( 9 )
V 0 = 0 V k = V k - 1 + a k &Delta;t - - - ( 10 )
3) motion planning of S curve acceleration and deceleration
The controlled condition that S curve acceleration and deceleration process utilizes speed and variable quantity thereof to change as each motor segment.The stationarity of taking into account system acceleration and deceleration performance and motion, during motion planning, require to accelerate, subtracts acceleration, acceleration and deceleration, subtracts braking section velocity variable and equate, and be less than 50% of whole accelerator or moderating process velocity variations total amount.For the computing of reduced data in processing, accelerate, subtract acceleration, acceleration and deceleration, subtract braking section velocity variations and measure 1/4,3/8,7/16 or 15/32 of acceleration or deceleration process velocity variations total amount.Because 1/4 computing of numerical value can be by 2 realizations that move to right, 3/8 computing of numerical value (being 1/4+1/8) can be by numerical value 2+numerical value, 3 realizations that move to right that move to right, the 7/16(of numerical value is 1/4+1/8+1/16) computing can be by numerical value 2+numerical value, 3+numerical value, 4 realizations that move to right that move to right that move to right, the 15/32(of numerical value is 1/4+1/8+1/16+1/32) computing can be by numerical value 2+numerical value, 3+numerical value, 4+numerical value, 5 realizations that move to right that move to right that move to right that move to right, multiplication and division computing during velocity variable calculates is faster by speed, " displacement " computing that complexity is lower substitutes with " adding " computing, computing complexity greatly reduces, contribute to improve arithmetic speed and the real-time that acceleration and deceleration are controlled simultaneously, accordingly, the velocity variable of even acceleration or even braking section is got 1/2,1/4,1/8 or 1/16 of add/moderating process velocity variations total amount, the calculating of velocity variable also can be by 1,2,3 and 4 realizations of moving to right, simplified operation, all 7 motor segments that simultaneously make acceleration and deceleration process comprise the acceleration and deceleration of S curve, realize level and smooth movement effects.
In conjunction with the practical application of motion control, by velocity variations, the acceleration and deceleration of S curve are divided into three types, realized respectively: uniform motion, accelerated motion and retarded motion.Uniform motion instruction comprises the displacement of instruction speed and instruction, and the acceleration and deceleration process of uniform motion comprises all 7 motor segments of S curve acceleration and deceleration.Motion through accelerating, even acceleration accelerates to reach instruction speed and start uniform motion with subtracting, and by acceleration and deceleration, even deceleration and slow down and recover initial velocity, reaches instruct displacement simultaneously; That accelerated motion instruction comprises is initial, stop the displacement of speed and instruction, and the acceleration and deceleration process of accelerated motion is left half S curve, and motion is started by instruction starting velocity, through accelerating, even acceleration accelerates to increase to the termination speed of instruction the motion that remains a constant speed with subtracting; Initial, termination speed and instruction displacement that retarded motion instruction comprises equally, difference is that its starting velocity is greater than termination speed, the acceleration and deceleration process of retarded motion is right half S curve, motion is started by starting velocity, through acceleration and deceleration, even deceleration and three motor segments that slow down, speed is down to the termination speed of instruction the motion that remains a constant speed, and finally reaches instruct displacement.
4) abnormality processing
Be subject to maximum allowable acceleration a max, instruct displacement L etc. restriction, the movement instruction under part extreme condition, its S curve acceleration and deceleration process need is suitably revised, and could continue to carry out.At the accelerating and decelerating part that adds accelerating sections, retarded motion of uniform motion or accelerated motion, if acceleration reaches allowable acceleration a maxor-a max, motion no longer waits until that velocity variable reaches 1/4,3/8,7/16 or 15/32 of add/moderating process velocity variations total amount, but directly enters even accelerating sections or even braking section, to guarantee that acceleration is no more than allowable value; In the accelerating of uniform motion, even acceleration or subtract accelerating sections, if current displacement reaches 50% of instruct displacement amount, motion also no longer waits until that velocity variable reaches predetermined value, but directly enters deceleration, even deceleration or accelerating and decelerating part accordingly, carries out corresponding control strategy.
Control method and the circuit of the acceleration and deceleration of 3.S curve
1) motion control method
(1) speed is controlled
The servomotor that moves through of wanting required for the present invention is realized, and adopts the mode of driving pulse bonding position control signal, pulsed frequency controlled motion speed, and number of pulses is controlled amount of displacement.By internal proprietary timer, realize between the pulsewidth and arteries and veins of driving pulse, regulate timer count value, can realize between pulsewidth, arteries and veins the control with pulsed frequency.Suppose pulsewidth count value cnt 0, count value cnt between arteries and veins, reference clock cycle T cK, obtain the formula (11) of driving pulse frequency f:
f = 1 ( cnt + cnt 0 ) T ck - - - ( 11 )
In the present invention, walk equivalent δ and get 1 μ m, reference clock cycle 50ns(20MHz), driving pulse pulsewidth is got definite value 1 μ s, pulsewidth count value cnt 0be 20, obtain thus the relational expression (12) of speed v (mm/s of unit) and count value cnt:
v = f&delta; = &delta; ( cnt + cnt 0 ) T ck = 1 &times; 10 - 3 ( cnt + 20 ) 50 &times; 10 - 9 = 20 &times; 10 3 cnt + 20 - - - ( 12 )
The formula of speed controlled quentity controlled variable cnt (13) is:
cnt = 20 &times; 10 3 v - 20 - - - ( 13 )
(2) kinematic parameter determines
Be convenient to circuit and describe and calculate, formula (8)~(10) are carried out certain revision, supposed
Figure BDA0000436533020000174
formula (14) is new acceleration recursion formula:
a k = a 0 + sigma J k &Delta;t sigma J k = sigma J k - 1 + J k a 0 = 0 - - - ( 14 )
Wherein, sigmaJ kΔ t is 0-k acceleration change amount, i.e. acceleration integration constantly.Sampling time Δ t is set constant, keeps 10 μ s, obtain acceleration formula used in circuit design (15).In formula, acceleration and acceleration unit are respectively mm/s 2with mm/s 3.
a k = a 0 + sigma J k / 10 5 sigma J k = sigmaJ k - 1 a 0 = 0 + J k - - - ( 15 )
Equally, suppose
Figure BDA0000436533020000177
revised rate delivery reckoning formula is formula (16):
V k = V 0 + ( ka 0 + sigma A k &Delta;t ) &Delta;t sigma A k = sigma A k - 1 + sigmaJ k a 0 = 0 , V 0 = 0 - - - ( 16 )
Wherein, (ka0+sigmaA kΔ t) Δ t is 0-k velocity variations total amount, i.e. acceleration integration constantly.Sampling time, Δ t was the same, obtained acceleration formula used in circuit design (17).Wherein acceleration and speed unit are respectively mm/s 2with mm/s.
V k = V 0 + sigma A k / 10 10 sigmaA k = sigma A k - 1 + sigmaJ k V 0 = 0 - - - ( 17 )
In formula 10 10division operation needs more hardware resource, while therefore calculating, speed is divided into integer and remainder part, sigmaA kas remainder register.Each motion sampling is carried out after an integral operation, if sigmaA k>=10 10, the integral part of speed V is carried out add-one operation, then by sigmaA k-10 10the new remainder obtaining deposits sigmaA in k, for next speed, calculate; Otherwise, sigmaA kconstant.
2) control circuit structure
The acceleration and deceleration of S curve are controlled circuit and are received motion control instruction from controlling computing machine, according to order parameter, calculate each motion of motor segment acceleration, speed and speed controlled quentity controlled variable cnt constantly; Then, according to speed controlled quentity controlled variable, between dynamic adjustments arteries and veins and pulsed frequency, produce the driven by servomotor pulse that meets steering order.According to function, acceleration and deceleration are controlled main circuit and will be consisted of cpu bus interface, order parameter register, initializing circuit, acceleration integrating circuit, integrated acceleration circuit, execution register, state conversion and control circuit, driving pulse circuit for generating, displacement control circuit etc., form framework as Fig. 4.
Bus interface provides the data transmission interface with circuit, comprise parallel interface and SPI agreement, bus interface writes corresponding registers by order parameters such as acceleration, average velocity, starting velocity, the displacements of termination speed and instruction, and response external request, sends circuit working state simultaneously; Initializing circuit reading command parameter, computing velocity changes total amount each section of velocity variable of making rational planning for; Acceleration, integrated acceleration circuit are carried out integration budget, ask for instantaneous acceleration, speed and write corresponding execution register; Counting circuit reading speed register between arteries and veins, according to count value between the arteries and veins of instantaneous velocity calculating driving pulse; Utilization calculates count value between arteries and veins, and pulse generating circuit is counted reference clock, realizes needed driving pulse; Displacement control circuit, to output step-by-step counting, calculates output displacement and writes shift register; State conversion and control response reference clock, according to the modification circuits running statuses such as running status, instantaneous velocity, acceleration, the orderly coordination of control circuit.3) circuit state conversion
According to the control procedure of S curve acceleration and deceleration, in conjunction with functions such as the communication of control circuit necessity, motion initialization, 10 kinds of running statuses that circuit is controlled in acceleration and deceleration are set, in Table 1.
The running status of circuit is controlled in table 1 acceleration and deceleration
State Explanation State Explanation State Explanation State Explanation State Explanation
IDLE Idle state RST Motion initialization CAC Even acceleration ZAC At the uniform velocity UDC Even deceleration
DTR Data transmit AAC Acceleration RAC Subtract acceleration ADC Acceleration and deceleration RDC Deceleration
While realizing circuit, convenient description, current displacement s, the velocity variations total amount Δ of definition acceleration and deceleration process v, at the uniform velocity section initial displacement L f, even accelerating sections starting velocity V f, even accelerating sections stops speed V s, velocity variation coefficient k v(0<k v≤ 0.5); Define motor pattern m, uniform motion m=0, accelerated motion m=1, retarded motion m=2 simultaneously.Suppose and add accelerating sections, subtract accelerating sections, accelerating and decelerating part, subtract the velocity variations k of braking section vΔ v, the velocity variations (1-2k of even accelerating sections, even braking section v) Δ v.According to previously described motion planning, k vget 1/4,3/8,7/16 or 15/32, obtain the state transition condition of Fig. 5 in Table 2.
Table 2 state transition condition and implication
Figure BDA0000436533020000182
4) circuit working process
After powering on, circuit enters idle condition; Write signal is effective, and circuit turns data transfer state, and bus interface response signal WR writes acceleration, average velocity, instruct displacement, starting velocity, termination speed successively; Acceleration and deceleration enable signal is effective, and motion init state is activated, and circuit reading command parameter register is differentiated acceleration and deceleration pattern according to the parameter writing, and just calculates the starting velocity V of each section of velocity variable and even accelerating sections f, stop speed V s.Under idle condition, acceleration and deceleration enable signal also can activate motion init state, and now the direct reading command parameter register of circuit carries out initialization.
After motion initialization completes, circuit starts the acceleration and deceleration of S curve and controls process, and acceleration and integrated acceleration circuit 10 μ s integrations once, are asked for instantaneous acceleration, speed computing velocity controlled quentity controlled variable cnt, by pulse generating circuit, produce respective drive pulse, realize corresponding motor segment.
Initialization finishes, if instruction is uniform motion or accelerated motion (m=0,1), circuit proceeds to and adds acceleration mode; Meanwhile, if retarded motion pattern (m=2), circuit turns acceleration and deceleration state; Add under acceleration mode instantaneous acceleration a>=a max, circuit is using instantaneous velocity V as new even accelerating sections starting velocity V fdeposit intersegmental translation register in, reruning simultaneously and storing even accelerating sections stops speed V s, then proceed to even acceleration mode; Otherwise, if a≤a maxand V>=V f, circuit directly enters even acceleration mode.
Even acceleration mode, instantaneous velocity V>=V s, circuit enters and subtracts acceleration state.Then, when acceleration reduces to 0 value, the instant displacement s of circuitry stores as at the uniform velocity section initial displacement L f, enter uniform speed motion state; At the uniform velocity under state, if uniform motion (m=0) and displacement s>=L-L f, circuit turns acceleration and deceleration state; If accelerated motion (m=1) and instant displacement s>=L, circuit turns Idle state.
Acceleration and deceleration state, circuit waits until that instantaneous velocity V is down to V safter enter even deceleration regime.Yet, if under acceleration and deceleration state, there is a≤-a maxsituation, circuit is using instantaneous velocity V as V s, the speed of simultaneously reruning V fand storage, directly proceed to even deceleration regime; Even deceleration regime, instantaneous velocity V≤V f, circuit enters and subtracts deceleration regime; Finally, subtract under deceleration regime, instant displacement s>=L, circuit turns Idle state.
Switch condition in Fig. 5
Figure BDA0000436533020000191
-be the abnormality processing under uniform motion (m=0) pattern, in acceleration, even acceleration, subtract any moment of accelerating sections, if current displacement reaches 50% of instruct displacement, circuit is directly crossed normal process and is entered accelerating and decelerating part; Switch condition
Figure BDA0000436533020000192
for the abnormality processing under retarded motion (m=2) pattern, in any time of motion, if current displacement reaches instruct displacement, circuit directly enters idle condition; Switch condition
Figure BDA0000436533020000193
for the abnormality processing under accelerated motion (m=1) pattern, in any time of controlling, if current displacement reaches instruct displacement, circuit directly enters idle condition.
4. circuit test and emulation
Circuit test is controlled in the acceleration and deceleration of S curve and simulation result is shown in Fig. 6.In figure, step equivalent 1 μ m, velocity variation coefficient kv gets 1/4, and the initial velocity 100mm/s of retarded motion instruction stops speed 30mm/s, acceleration 7000mm/s 3, instruct displacement 16000 μ m(output number of drive pulses 16000); The initial velocity 30mm/s of accelerated motion instruction, stops speed 100mm/s, and acceleration setting value is still 7000mm/s 3, instruct displacement 16000 μ m; Uniform motion instruction speed 100mm/s, acceleration setting value 7000mm/s 3, instruct displacement 30000 μ m.
Initial velocity, termination speed, average velocity, acceleration and instruction displacement parameter register take 3 bit address, and address is followed successively by 100B, 101B, 110B, 111B and 011B, and each signal in oscillogram and port definition are in Table 3.
Table 3 circuit simulation signal and definition
Signal Definition Signal Definition Signal Definition Signal Definition
A Address bus BSY Status signal MovMod Motor pattern sDstCnt Current displacement count value
D
16 bit data bus Cnt Count value between arteries and veins MovSec Current motor segment DstCnt Instruct displacement count value
CK Reference clock, cycle 50ns CntOrg Between arteries and veins, count initial value Jerk Acceleration setting value xSpdAvr Average velocity setting value
WR Write signal CP Output driving pulse sSigmaJ Acceleration integration xSpdOrg Initial velocity setting value
GT Enable signal is effectively high RD CPU read signal sSigmaA Integrated acceleration xSpdEnd Stop speed setting value
Acc Acceleration, mm/S 2 Spd Instantaneous velocity, mm/s Cnt10us 10us timing ga(u)ge numerical value xSpdFir Add accelerating sections and stop speed
MovMod represents motor pattern, and its value is 0, by uniform motion, needs to set acceleration, average velocity and instruct displacement; Pattern is 1, and accelerated motion needs to set acceleration, initial velocity, termination speed and displacement; Pattern is 2, and retarded motion needs to set acceleration, initial velocity, termination speed and displacement; MovSec represents current motor segment of living in, its value 0-6 respectively correspondence add accelerating sections, even accelerating sections, subtract accelerating sections, at the uniform velocity section, accelerating and decelerating part, even deceleration and subtract braking section.
Figure 7 shows that the rate curve obtaining in circuit simulation.Wherein, Fig. 7 is a) the velocity simulation curve of above-mentioned accelerated motion instruction, Fig. 7 b) be the velocity simulation curve of retarded motion instruction, Fig. 7 c) be the velocity simulation curve of uniform motion instruction, meet S curve acceleration and deceleration velocity variations feature.
Fig. 8 a)~c) be depicted as the circuit sequence simulation result of above-mentioned 3 movement instruction implementations, Fig. 8 wherein a), Fig. 8 b), Fig. 8 c) be respectively the signal simulation waveform of 30mm/s~100mm/s accelerated motion instruction, 100mm/s~30mm/s retarded motion instruction and the instruction of 100mm/s uniform motion.
Fig. 8 a) in circuit through accelerating, even acceleration with subtract acceleration, enter uniform speed motion state, the termination speed of hold instruction.Add accelerating sections, acceleration continues to increase in time, reaches 488mm/s 2after enter even accelerating sections, subtract accelerating sections acceleration and continue to reduce, until 0 acceleration; Correspondingly, in the instruction time, instantaneous velocity Spd continue to increase, until the 100mm/s of section at the uniform velocity., add in accelerating sections, instantaneous velocity changes gradually and accelerates, and enters after even accelerating sections meanwhile, and the speed of velocity variations immobilizes; Enter and subtract after accelerating sections, velocity variations is slack-off gradually, until final at the uniform velocity section.
Fig. 8 b) in, in retarded motion instruction, in the instruction time, instantaneous velocity Spd continues to reduce, until subtract the 31mm/s of braking section.Meanwhile, in accelerating and decelerating part, instantaneous velocity changes gradually and accelerates, and enters after even braking section, and the speed of velocity variations immobilizes; Enter and subtract after braking section, velocity variations is slack-off gradually, until final speed remaining unchanged.Now there is the velocity error of 1mm/s.
Fig. 8 c) be complete S curve acceleration and deceleration instruction, have 7 complete motor segments of typical S curve acceleration and deceleration, pass through acceleration, even acceleration and subtract acceleration, instantaneous velocity Spd reaches 99mm/s, enters at the uniform velocity section.There is the error of calculation of 1mm/s equally, herein; Then, circuit enters accelerating and decelerating part, and through acceleration and deceleration, even deceleration and deceleration, speed reduces to 1mm/s.In acceleration and deceleration process of the present invention, speed lower than 1mm/s after, speed directly can be reduced to 0 value, stop motion, rather than continue to slow down according to acceleration.Equally, during startup, speed also starts to accelerate from 1mm/s, sees Fig. 8 c.
5. conclusion
The present invention to S curve acceleration and deceleration carried out the deep discussion of system, the engineering in the fields such as combining with digital control system, robot control is actual, the S curve acceleration and deceleration data handling procedure and the concrete grammar that are suitable for hardware description and circuit realization have been provided, high real-time control circuit and the integrated control chip of having developed the acceleration and deceleration of S curve, mainly comprise:
1) motion process of multianalysis S curve acceleration and deceleration, the kinematic parameter governing equation of each kinematic parameter of S curve acceleration and deceleration to the time of having derived, and to its discretize, obtain the S curve acceleration and deceleration motion parameter governing equation of discretize.
2), according to the geometric properties of S curve acceleration and deceleration motion parametric line, the controlled condition of S acceleration is proposed; In conjunction with Digital Implementation, the recursion formula that each kinematic parameter is controlled is proposed.
3) in conjunction with the concrete application of robot, digital control system etc., the acceleration and deceleration of S curve are divided into acceleration, deceleration and uniform motion is controlled three kinds of patterns, have proposed based on motion planning model and the exception handling of transition shift between slewing rate and motor segment between velocity variable, motor segment.
4) propose to control circuit, circuit working state and transfer process, circuit state switch condition and relevant circuit working process based on above-mentioned algorithm and the S curve acceleration and deceleration of model.
5) based on above-mentioned model and method, adopt scale programmable logic device, realized the special IC of S curve acceleration and deceleration and carried out emulation testing and checking.

Claims (4)

1. a control circuit of realizing the acceleration and deceleration of kinetic control system S curve, it is characterized in that waiting in use, the acceleration and deceleration of this S curve are controlled circuit and are received from outside motion control instruction, according to order parameter, calculate each motion acceleration, speed and the speed controlled quentity controlled variable constantly in S curve acceleration and deceleration motion section; Then, according to speed controlled quentity controlled variable, between dynamic adjustments arteries and veins and pulsed frequency, produce the driven by servomotor pulse that meets steering order;
The acceleration and deceleration of S curve are controlled circuit and are comprised: counting circuit between cpu bus interface circuit, order parameter register, initializing circuit, acceleration integrating circuit, integrated acceleration circuit, execution register, state conversion and control circuit, driving pulse circuit for generating, displacement control circuit and driving pulse arteries and veins;
Cpu bus interface circuit comprises parallel bus interface circuit and spi bus interface circuit;
Described order parameter register comprises acceleration register, average velocity register, starting velocity register, stops speed register and instruction shift register;
Described execution register comprises shift register, speed register, acceleration register and motion state register;
Functions and effect are as follows:
Cpu bus interface circuit writes the corresponding registers in order parameter register acceleration, average velocity, starting velocity, termination speed and instruction displacement parameter, Circuit responce external request is controlled in the acceleration and deceleration of this S curve, sends the duty that circuit is controlled in the acceleration and deceleration of this S curve;
Order parameter in initializing circuit reading command parameter register, computing velocity changes total amount each section of velocity variable of making rational planning for;
Acceleration integrating circuit and integrated acceleration circuit are carried out integral operation, ask for respectively instantaneous acceleration and speed, and write the corresponding registers of carrying out in register;
Counting circuit reading speed register between driving pulse arteries and veins, according to count value between the arteries and veins of instantaneous velocity calculating driving pulse; Pulse generating circuit utilizes count value between arteries and veins to count reference clock, realizes needed driving pulse;
The driving pulse counting of displacement control circuit to output, calculates output displacement and writes shift register;
State conversion and control circuit response reference clock, revise the acceleration and deceleration of this S curve according to running status, instantaneous velocity, acceleration and control circuit running status, controls the acceleration and deceleration of this S curve and control the orderly coordination of circuit.
2. the control circuit of realizing the acceleration and deceleration of kinetic control system S curve according to claim 2, is characterized in that the parameter request in the design of this control circuit circuit is as follows:
(1) speed is controlled:
If pulsewidth count value cnt 0, count value cnt between arteries and veins, reference clock cycle T cK, the formula of general driving pulse frequency f is formula (11):
f = 1 ( cnt + cnt 0 ) T ck - - - ( 11 )
Step equivalent δ gets 1 μ m, and the reference clock cycle, 50ns was 20MHz, and driving pulse pulsewidth is got definite value 1 μ s, pulsewidth count value cnt 0be 20, for (1) speed, control:
Obtain thus the relational expression (12) of speed v (mm/s of unit) and count value cnt:
v = f&delta; = &delta; ( cnt + cnt 0 ) T ck = 1 &times; 10 - 3 ( cnt + 20 ) 50 &times; 10 - 9 = 20 &times; 10 3 cnt + 20 - - - ( 12 )
The formula of speed controlled quentity controlled variable cnt is formula (13):
cnt = 20 &times; 10 3 v - 20 - - - ( 13 )
(2) determining of kinematic parameter:
Kinematic parameter adopts recursion formula, according to the motion state of previous moment, obtains the motion control parameter value of current time:
If initial velocity is V 0, current sampling instant k, corresponding acceleration is J k, acceleration is a k, movement velocity is V k, each recursion formula based on previous moment is respectively formula (8), (9) and (10), and k gets 0,1,2 herein ...:
J k = J M , 0 &le; t &le; t 0 , t 5 < t &le; t 6 , 0 &le; k &le; n t 0 , < n t 5 k &le; n t 6 0 , t 0 < t &le; t 1 , t 2 < t &le; t 3 , t 4 < t &le; t 5 , n t 0 < k &le; n t 1 , n t 2 < k &le; n t 3 , n t 4 < k &le; n t 5 - J M t 1 < t &le; t 2 , t 3 < t &le; t 4 , n t 1 < k &le; n t 2 , n t 3 < k &le; n t 4 - - - ( 8 )
a 0 = 0 a k = a k - 1 + J k &Delta;t - - - ( 9 )
V 0 = 0 V k = V k - 1 + a k &Delta;t - - - ( 10 )
Wherein, acceleration size is J m, t is current time, t 0for adding accelerating sections terminal time, t 1for even accelerating sections terminal time, t 2for subtracting accelerating sections terminal time, t 3for segment endpoint time at the uniform velocity, t 4for accelerating and decelerating part terminal time, t 5for even braking section terminal time, t 6for subtracting braking section terminal time; Setting the sampling time is Δ t, simultaneously t, t 0, t 1, t 2, t 3, t 4, t 5with t 6correspond respectively to sampling instant n, n t0, n t1, n t2, n t3, n t4, n t5with n t6;
Then, suppose
Figure FDA0000436533010000027
formula (8)~(10) are revised to the new general acceleration recursion formula of formula (14) for obtaining:
a k = a 0 + sigma J k &Delta;t sigma J k = sigma J k - 1 + J k a 0 = 0 - - - ( 14 )
Wherein, sigmaJ kΔ t is 0-k acceleration change amount, i.e. acceleration integration constantly;
Sampling time Δ t being set constant, is 10 μ s, obtains being applicable to the special-purpose acceleration recursion formula (15) that circuit is controlled in the acceleration and deceleration of S curve; In formula, acceleration and acceleration unit are respectively mm/s 2with mm/s 3;
a k = a 0 + sigma J k / 10 5 sigma J k = sigmaJ k - 1 a 0 = 0 + J k - - - ( 15 )
If formula (16) is that revised general rate delivery is calculated formula:
V k = V 0 + ( ka 0 + sigma A k &Delta;t ) &Delta;t sigma A k = sigma A k - 1 + sigmaJ k a 0 = 0 , V 0 = 0 - - - ( 16 )
Wherein, (ka 0+ sigmaA kΔ t) Δ t is 0-k velocity variations total amount, i.e. acceleration integration constantly.
Getting equally sampling time Δ t is 10 μ s, obtains being applicable to the specific speed recursion formula (17) that circuit is controlled in the acceleration and deceleration of S curve; Wherein acceleration and speed unit are respectively mm/s 2with mm/s;
V k = V 0 + sigma A k / 10 10 sigmaA k = sigma A k - 1 + sigmaJ k V 0 = 0 - - - ( 17 )
In formula 10 10division operation need more hardware resource, while therefore calculating, speed is divided into integer and remainder part, sigmaA kas remainder register; Each motion sampling is carried out after an integral operation, if sigmaA k>=10 10, the integral part of instantaneous velocity V is carried out add-one operation, then by sigmaA k-10 10the new remainder obtaining deposits sigmaA in k, for next speed, calculate; Otherwise, sigmaA kconstant.
3. the control circuit of realizing the acceleration and deceleration of kinetic control system S curve according to claim 2, is characterized in that the definition of circuit running status is controlled in the acceleration and deceleration of this S curve as follows with state transition condition:
The 10 kinds of running statuses that arrange of circuit are controlled in these acceleration and deceleration, in Table 1:
The running status of circuit is controlled in table 1 acceleration and deceleration
State Explanation State Explanation State Explanation State Explanation State Explanation IDLE Idle state RST Motion initialization CAC Even acceleration ZAC At the uniform velocity UDC Even deceleration DTR Data transmit AAC Acceleration RAC Subtract acceleration ADC Acceleration and deceleration RDC Deceleration
While realizing this S curve acceleration and deceleration control circuit, current displacement s, the velocity variations total amount Δ of definition acceleration and deceleration process v, at the uniform velocity section initial displacement L f, even accelerating sections starting velocity V f, even accelerating sections stops speed V s, velocity variation coefficient k v(0<k v≤ 0.5); Define motor pattern m, uniform motion m=0, accelerated motion m=1, retarded motion m=2 simultaneously.Suppose and add accelerating sections, subtract accelerating sections, accelerating and decelerating part, subtract braking section velocity variations k vΔ v, even accelerating sections, even braking section velocity variations (1-2k v) Δ v; k vget 1/4,3/8,7/16 or 15/32, the state transition condition obtaining is in Table 2:
Table 2 state transition condition and implication
Figure FDA0000436533010000041
4. the control circuit of realizing the acceleration and deceleration of kinetic control system S curve according to claim 2, it is characterized in that also comprising intersegmental translation register, intersegmental translation register comprises that at the uniform velocity the initial shift register of section, even accelerating sections stop speed register and even accelerating sections starting velocity register;
It is as follows that circuit working process is controlled in these acceleration and deceleration:
After powering on, the acceleration and deceleration of this S curve are controlled circuit and are entered idle condition;
Write signal is effective, and circuit turns data transfer state, and bus interface response write signal WR, writes acceleration, average velocity, instruct displacement, starting velocity and termination speed successively;
Acceleration and deceleration enable signal is effective, and motion init state is activated, and circuit reading command parameter register is differentiated acceleration and deceleration pattern according to the parameter writing, and just calculates the starting velocity V of each section of velocity variable and even accelerating sections f, stop speed V s;
Under idle condition, acceleration and deceleration enable signal also can activate motion init state, and now the direct reading command parameter register of circuit carries out initialization;
After motion initialization completes, the acceleration and deceleration of this S curve are controlled circuit and are started S curve acceleration and deceleration control process, acceleration and integrated acceleration circuit 10 μ s integrations are once, ask for instantaneous acceleration, speed computing velocity controlled quentity controlled variable cnt, by pulse generating circuit, produce respective drive pulse, realize corresponding motor segment;
Initialization finishes, if instruction is uniform motion or accelerated motion (m=0,1), this S curve acceleration and deceleration control circuit proceeds to and adds acceleration mode; If instruction is retarded motion pattern (m=2), the acceleration and deceleration of this S curve are controlled circuit and are turned acceleration and deceleration state;
Add acceleration mode, if instantaneous acceleration a>=a max, the acceleration and deceleration of this S curve are controlled circuit using instantaneous velocity V as new even accelerating sections starting velocity V fdeposit intersegmental translation register in, reruning simultaneously and storing even accelerating sections stops speed V s, then proceed to even acceleration mode; If a < is a maxand V>=V f, circuit directly enters even acceleration mode; Even acceleration mode, instantaneous velocity V>=V s, circuit enters and subtracts acceleration mode;
Then subtract acceleration mode, when acceleration reduces to 0 value, the acceleration and deceleration of this S curve are controlled the instant displacement s of circuitry stores as the initial displacement L of section at the uniform velocity f, enter uniform speed motion state;
At the uniform velocity under state, if uniform motion (m=0) and displacement s>=L-L f, circuit turns acceleration and deceleration state; If accelerated motion (m=1) and instant displacement s>=L, the acceleration and deceleration of this S curve are controlled circuit and are turned Idle state, complete acceleration and deceleration and control;
Acceleration and deceleration state, circuit waits until that instantaneous velocity V is down to V safter enter even deceleration regime; Yet, if under acceleration and deceleration state, there is a≤-a maxsituation, circuit is using instantaneous velocity V as V s, the speed of simultaneously reruning V fand storage, directly proceed to even deceleration regime;
Even deceleration regime, instantaneous velocity V≤V f, circuit enters and subtracts deceleration regime;
Finally, subtract under deceleration regime, instant displacement s >=L, the acceleration and deceleration of this S curve are controlled circuit and are turned Idle state, complete acceleration and deceleration and control;
Switch condition
Figure FDA0000436533010000051
for the abnormality processing under uniform motion (m=0) pattern, in acceleration, even acceleration, subtract any moment of accelerating sections, if current displacement reaches 50% of instruct displacement, the acceleration and deceleration of this S curve are controlled circuit and are directly crossed normal process and enter accelerating and decelerating part;
Switch condition
Figure FDA0000436533010000052
for the abnormality processing under retarded motion (m=2) pattern, in any time of motion, if current displacement reaches instruct displacement, the acceleration and deceleration of this S curve are controlled circuit and are directly entered idle condition, complete acceleration and deceleration and control;
Switch condition
Figure FDA0000436533010000053
for the abnormality processing under accelerated motion (m=1) pattern, in any time of motion, if current displacement reaches instruct displacement, the acceleration and deceleration of this S curve are controlled circuit and are directly entered idle condition, complete acceleration and deceleration and control.
CN201310684405.7A 2013-12-12 2013-12-12 Realize the control circuit of kinetic control system S curve acceleration and deceleration Active CN103713660B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310684405.7A CN103713660B (en) 2013-12-12 2013-12-12 Realize the control circuit of kinetic control system S curve acceleration and deceleration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310684405.7A CN103713660B (en) 2013-12-12 2013-12-12 Realize the control circuit of kinetic control system S curve acceleration and deceleration

Publications (2)

Publication Number Publication Date
CN103713660A true CN103713660A (en) 2014-04-09
CN103713660B CN103713660B (en) 2016-05-11

Family

ID=50406710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310684405.7A Active CN103713660B (en) 2013-12-12 2013-12-12 Realize the control circuit of kinetic control system S curve acceleration and deceleration

Country Status (1)

Country Link
CN (1) CN103713660B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090596A (en) * 2014-06-27 2014-10-08 北京工业大学 Five-stage S-curve acceleration and deceleration control method based on particle swarm optimization algorithm
CN104898577A (en) * 2015-04-08 2015-09-09 北京配天技术有限公司 S-shaped curve speed planning method, S-shaped curve speed planning device, S-shaped curve speed planning numerical control method and numerical control machine tool
CN106301119A (en) * 2016-08-30 2017-01-04 杭州朔天科技有限公司 For flat bed scanner and the method for controlling stepping motor of automatic paper feed scanner
CN107612455A (en) * 2017-08-11 2018-01-19 歌尔股份有限公司 Motor control method, device and sports equipment
CN109240359A (en) * 2018-08-29 2019-01-18 浙江工业大学 A kind of chip mounter head suction nozzle picks and places the speed planning method of element
CN109656200A (en) * 2018-12-10 2019-04-19 大族激光科技产业集团股份有限公司 The flexible Acceleration-deceleration Control Method and system of board
CN109861621A (en) * 2019-03-08 2019-06-07 杭州中冠瀚明科技有限公司 The high accuracy positioning hovering method and control system of cementing machine trolley
CN110134073A (en) * 2018-02-09 2019-08-16 合肥欣奕华智能机器有限公司 A kind of method, apparatus of control robot multi-axial Simultaneous movement
CN110377065A (en) * 2018-08-24 2019-10-25 天津京东深拓机器人科技有限公司 Method for control speed, device and computer readable storage medium
CN110879568A (en) * 2019-12-31 2020-03-13 南京工程学院 Motion control method of multi-axis linkage economical numerical control system
CN113253678A (en) * 2021-04-29 2021-08-13 中国科学院微电子研究所 Motion trail planning method for precision motion platform
CN115016559A (en) * 2022-08-04 2022-09-06 深圳市杰美康机电有限公司 Full closed loop multi-path planning line feeding method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1447519A (en) * 2002-03-27 2003-10-08 佳能株式会社 Stepmotor control circuit, and its control method
CN1971457A (en) * 2005-11-25 2007-05-30 中国科学院沈阳计算技术研究所有限公司 Speed control method used for numerical control machine
CN101299589A (en) * 2008-03-05 2008-11-05 芯硕半导体(中国)有限公司 Stepper motor movement controller based on DDS technique
JP2012191684A (en) * 2011-03-08 2012-10-04 Panasonic Corp Pulse generating circuit and motor device
CN103076759A (en) * 2012-12-31 2013-05-01 北京配天大富精密机械有限公司 Method and device for acquiring S-shaped curve of numerical control system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1447519A (en) * 2002-03-27 2003-10-08 佳能株式会社 Stepmotor control circuit, and its control method
CN1971457A (en) * 2005-11-25 2007-05-30 中国科学院沈阳计算技术研究所有限公司 Speed control method used for numerical control machine
CN101299589A (en) * 2008-03-05 2008-11-05 芯硕半导体(中国)有限公司 Stepper motor movement controller based on DDS technique
JP2012191684A (en) * 2011-03-08 2012-10-04 Panasonic Corp Pulse generating circuit and motor device
CN103076759A (en) * 2012-12-31 2013-05-01 北京配天大富精密机械有限公司 Method and device for acquiring S-shaped curve of numerical control system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
石川,等: "《数控系统S曲线加减速规划研究》", 《中国机械工程》 *

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090596A (en) * 2014-06-27 2014-10-08 北京工业大学 Five-stage S-curve acceleration and deceleration control method based on particle swarm optimization algorithm
CN104898577A (en) * 2015-04-08 2015-09-09 北京配天技术有限公司 S-shaped curve speed planning method, S-shaped curve speed planning device, S-shaped curve speed planning numerical control method and numerical control machine tool
CN104898577B (en) * 2015-04-08 2020-02-11 北京配天技术有限公司 S-shaped curve speed planning method and device, numerical control method and numerical control machine tool
CN106301119A (en) * 2016-08-30 2017-01-04 杭州朔天科技有限公司 For flat bed scanner and the method for controlling stepping motor of automatic paper feed scanner
CN106301119B (en) * 2016-08-30 2018-11-13 杭州朔天科技有限公司 Method for controlling stepping motor for flat bed scanner and automatic paper feed scanner
CN107612455A (en) * 2017-08-11 2018-01-19 歌尔股份有限公司 Motor control method, device and sports equipment
CN110134073A (en) * 2018-02-09 2019-08-16 合肥欣奕华智能机器有限公司 A kind of method, apparatus of control robot multi-axial Simultaneous movement
CN110377065A (en) * 2018-08-24 2019-10-25 天津京东深拓机器人科技有限公司 Method for control speed, device and computer readable storage medium
CN109240359A (en) * 2018-08-29 2019-01-18 浙江工业大学 A kind of chip mounter head suction nozzle picks and places the speed planning method of element
CN109240359B (en) * 2018-08-29 2021-05-18 浙江工业大学 Speed planning method for picking and placing components by suction nozzle of chip mounter head
CN109656200A (en) * 2018-12-10 2019-04-19 大族激光科技产业集团股份有限公司 The flexible Acceleration-deceleration Control Method and system of board
CN109656200B (en) * 2018-12-10 2020-09-25 大族激光科技产业集团股份有限公司 Flexible acceleration and deceleration control method and system for machine table
CN109861621A (en) * 2019-03-08 2019-06-07 杭州中冠瀚明科技有限公司 The high accuracy positioning hovering method and control system of cementing machine trolley
CN110879568A (en) * 2019-12-31 2020-03-13 南京工程学院 Motion control method of multi-axis linkage economical numerical control system
CN113253678A (en) * 2021-04-29 2021-08-13 中国科学院微电子研究所 Motion trail planning method for precision motion platform
CN115016559A (en) * 2022-08-04 2022-09-06 深圳市杰美康机电有限公司 Full closed loop multi-path planning line feeding method and device

Also Published As

Publication number Publication date
CN103713660B (en) 2016-05-11

Similar Documents

Publication Publication Date Title
CN103713581B (en) The implementation method of kinetic control system S curve acceleration and deceleration
CN103713660A (en) Control circuit for realizing S curve acceleration and deceleration of motion control system
CN110465422B (en) FPGA-based spraying machine motion control system and motion control method thereof
CN104135212A (en) Flexibility motion control IP (Intellectual Property) core and implementation method thereof
CN102291073B (en) Multi-axis stepper motor interpolation controller and multi-axis stepper motor motion control card
CN103466452B (en) Crane operation control method and system
CN102664585B (en) Precise control device for acceleration/deceleration of motor
CN104181860A (en) S-type acceleration and deceleration control method of numerical control machine tool
CN201426109Y (en) PCI bus bar type multi-shaft impulse type movement control card
CN102759633A (en) Real-time rotating speed detection module of servo motor based on FPGA (Field Programmable Gate Array)
CN109947573A (en) Intelligence suitable for electric system edge calculations accelerates chip
CN103312248A (en) Method for compensating inflection point error of linear acceleration to deceleration based on DSP (Digital Signal Processor)
CN104793568A (en) Multi-axle interpolation method
TW201725459A (en) Stepper trajectory driver
CN103324212A (en) Flight track instrument plotting speed control card based on FPGA
CN104570952A (en) Multi-axis interpolation control method and device
CN204423086U (en) A kind of piler servo positioning system
CN104597848A (en) State machine principle-based interpolation control method
CN103744352A (en) FPGA-based cubic B-spline curve hardware interpolator
CN107046382B (en) A kind of iteration speed control method based on trigonometric function
CN103552072B (en) A kind of robot control method based on embedded controller and device
US3729623A (en) Method for the selective multiplication and division of a pulse train and a multiply/divide circuit therefor
CN202172382U (en) Multi-axis stepping motor interpolation controller and motion control card thereof
CN203299583U (en) Track instrument plotting speed control card based on FPGA
CN104950693B (en) Improve the method and system of controller hardware assemblage on-orbit simulation accuracy

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant