Disclosure of Invention
Aiming at the defects of the prior art, the invention discloses a high-precision positioning method for a linear motor controlled by an asymmetric S-shaped speed curve. The method can freely define an S-shaped speed curve, and in the process of setting the motion parameters, the motor performance is taken as constraint, the curve shape characteristics of the acceleration and deceleration section are set by a scale factor, and the appropriate motion control parameters are determined. And dividing the S-shaped speed curve into seven time period controls, calculating a time period matching relation by combining the scale factor, and updating the time period according to the relation between the point-to-point operation displacement and the critical displacement. The continuous expressions of a-t, v-t and x-t are solved by an integral method, the continuous expressions are discretized according to a PLC scanning period, the obtained motion instructions are transmitted to a driver in real time, and the linear motor is driven to complete corresponding actions according to the instructions, so that the running stability is ensured, and the positioning accuracy of the linear motor is improved. The method realizes complex motion control, realizes the stability of the operation process by reasonably planning motion parameters, improves the point-to-point motion precision, and provides theoretical and technical support for high-speed and high-precision motion control.
The technical scheme of the invention is a high-precision positioning method of a linear motor controlled by an asymmetric S-shaped speed curve, which defines a scale factor and sets the shape characteristics of the speed curve of an acceleration section and a deceleration section according to the performance constraint of the linear motor, thereby determining proper motion control parameters; calculating the matching relation of the S-shaped speed curve time period, and updating the S-shaped speed curve time period based on the point-to-point running distance constraint; according to the relation between the acceleration J and the time t of the S-shaped speed curve, solving by adopting a successive integral method to obtain expressions of the acceleration and the time a-t, the speed and the time v-t and the displacement and the time S-t; and dispersing the expression according to the PLC scanning period to obtain a motion instruction, transmitting the motion instruction to the driver in real time, and driving the motor to complete the action according to the set instruction, so that the stability of the operation process is ensured. The method comprises the following specific steps:
step 1: determining high-speed motion control parameters under the constraint of linear motor performance;
for point-to-point motion of a high-speed chip mounter, the initial speed is 0, and in order to reduce impact caused by frequent starting and stopping of a linear motor, a traditional T-shaped speed curve is replaced by a common S-shaped speed curve. During the point-to-point acceleration and deceleration operation process, the acceleration section I, the constant speed section II and the deceleration section III can be divided. Recording the running time of the acceleration section I as taThe running time of the uniform speed section II is tconWith deceleration III for a running time td. For facilitating analysis of S-shaped velocity curvesFunction expression to accelerate segment I for time taSubdivided into acceleration periods t of rising acceleration1Acceleration period t during which acceleration is constant2And acceleration period t of acceleration drop3Deceleration time tdSubdivided into deceleration periods t of rising acceleration5Deceleration time period t with constant acceleration6And a deceleration period t during which the acceleration decreases7Then there is ta=t1+t2+t3And td=t5+t6+t7. In order to represent the change from the S-shaped speed curve to the T-shaped speed curve, two scaling factors 0 & ltalpha & gt & lt1 & gt and 0 & ltbeta & gt & lt1 & gt are set, the two scaling factors respectively represent the percentage of S-shaped functions of the acceleration section and the deceleration section, and the smaller the value of the scaling factor is, the closer the scaling factor is to the ideal S-shaped curve.
Thus, the seven-segment local time period t of the S-shaped speed curve can be set by the scale factoriThe relationship between i 1, 7 and the acceleration and deceleration segment time:
when α ═ β ═ 0, a pure S-type curve is shown, and when α ═ β ═ 1, a T-type speed curve is shown.
In practical application, parameters of the linear motor in the operation process from the point A to the point B are set according to actual working conditions. Setting the maximum speed V and the acceleration time taAnd deceleration time tdThe maximum jerk J required by the motor in actual operation can be calculated by equations (2) to (3)a,maxAnd maximum deceleration Jd,maxMaximum acceleration aa,maxMaximum deceleration ad,maxComprises the following steps:
for a given servo linear motor, the maximum acceleration a which can be achieved by the motor can be known according to motor parametersmaxWith maximum jerk Jmax. In order to meet the motor performance, the parameters (maximum speed V, acceleration period time t) set in actual operationaAnd a deceleration period time td) The jerk and acceleration calculated by the equations (2) to (3) satisfy the following conditions:
if the conditions are not met, the set initial parameters are invalid, and at the moment, the initial parameters need to be reset to enable the initial parameters not to exceed the maximum performance requirement of the motor.
Step 2: s-shaped speed curve time distribution and updating based on distance constraint
From step 1, the time distribution relationship between the acceleration section I and the deceleration section III of the S-shaped speed curve can be obtained, and in order to express the S-shaped speed curve, the time interval t of the uniform speed section needs to be determined4. However, due to the limitation of the distance between two points, the maximum operating speed cannot be guaranteed to reach the set value V in the actual point-to-point acceleration and deceleration operation process. Based on this, it is necessary to determine the time allocation relationship according to the relationship between the set parameter and the given distance. The calculation method is as follows:
first assume t4=tconThe critical displacement s required to achieve the set maximum speed V during operation from point a to point B at this time can be determined according to equation (5) at 00。
When the running distance s from the point A to the point B satisfies s & gt s0When the temperature of the water is higher than the set temperature,
the running distance s > s from the point A to the point B can be obtained at the moment0Time distribution relation of S-shaped speed curve in process [ T ]]=[t1t2t3t4t5t6t7]。
When the running distance s from the point A to the point B meets the condition that s is less than s0When the speed curve is in S-shaped speed curve displacement and time relation, S is equal to S (t)3) Therefore, the actual operation displacement s and the critical displacement s can be determined0With respect to time tiThe proportionality coefficient ε:
the seven-segment time t of the S-shaped speed curve can be calculated by the above formulaiThe updating is as follows:
thus, the running distance s from the point A to the point B is less than s0Time distribution relation of S-shaped speed curve in process [ T ]]=[t′1 t′2 t′3 t′4 t′5 t′6 t′7]。
And step 3: establishing an S-shaped speed curve expression;
and analyzing in the step 2 to obtain seven-segment time distribution relation of the S-shaped speed curve under different displacement constraints. Then, an expression between the displacement and the time of the S-shaped velocity curve needs to be determined, and considering that the S-shaped velocity curve has a segmented first-order acceleration, the expression between the acceleration and the time can be obtained as follows:
wherein, T i1, 7 denotes a time coordinate, T1=t1,T2=T1+t2,T3=T2+t3,T4=T3+t4,T5=T4+t5,T6=T5+t6,T7=T6+t7。
The relationship between the acceleration and the time is integrated to obtain the relationship between the speed and the time, and the relationship between the displacement and the time is obtained by integrating again, so that the values of the speed v and the displacement S corresponding to the S-shaped function at different moments t can be determined:
equations (9) - (11) give S-shaped speed curves a-t, v-t and S-t expressions, and accordingly real-time point position control of the linear motor in the operation process from the point A to the point B can be achieved.
And 4, step 4: the method is realized by the rapid point-to-point motion control of a linear motor constrained by a PLC scanning period;
from step 3, the continuous expressions for s-t, v-t and a-t can be obtained, for any given time tiThe position s corresponding to the linear motor at the moment can be calculated according to the continuous equationiV speed of movementiAnd acceleration aiInformation, for convenience of presentation, is denoted as [ t ]i,si,vi,ai]. In practical application, the PLC has the minimum scanning period tsLimitation, therefore, for the moving process from point A to point B, the continuous operation time T needs to be according to the scanning period TsThe integer multiples of which are discretized. When the PLC program is used for calculation, because the time parameter in the PLC can be expressed as the number of scanning periods and the data type is an integer, when the time variable is repeatedly iterated according to t ═ t +1, the scanning period t is expressedsAnd (3) superposition. To ensure the consistency of the calculation results, the time periods in the formulas (6) and (8) are converted toChanging the number of scanning periods, and rounding up according to a rounding mode;
in the formula, n _ tiRepresents a time period tiThe corresponding number of scan cycles, Round, represents the rounding function according to the rounding rule.
Then according to the scanning period tsAnd (3) updating the time distribution relation obtained in the formulas (6) and (8):
thereby obtaining an updated time period
Successive a-t equations, v-t equations and s-t equations can be calculated according to equations (9) - (11).
On the basis, the operation period T is dispersed into T ═ T according to the minimum scanning periods 2ts 3ts…T]TIn this case, the corresponding information [ t, s, v, a ] of the linear motor in each scanning cycle can be obtained from equations (9) to (11)]. The obtained displacement velocity acceleration [ s, v, a ] in each scanning period]The motion instruction is sent to a motor driver in real time through an EtherCAT network through a PLC control program, and the driver drives the linear motor to complete the rapid point-to-point motion control of the linear motor based on the S-shaped speed curve.
The invention has the obvious effects and benefits that an asymmetric S-shaped speed curve capable of customizing time parameters is provided and applied to point-to-point motion control of the linear motor, so that the problem of overlarge motor motion impact caused by unreasonable speed planning can be effectively reduced, and the method has important significance for improving the positioning precision of the motor. In the process of setting the motion parameters, the performance of a motor is taken as constraint, the curve shape characteristics of the acceleration curve of the acceleration and deceleration section are set by a scale factor, and appropriate motion control parameters are determined; dividing the S-shaped speed curve into seven time period controls, calculating a time period matching relation by combining the scale factor, and updating the time period according to the relation between the point-to-point operation displacement and the critical displacement; solving continuous expressions of a-t, v-t and x-t by using an integral method; and discretizing the continuous expression according to the PLC scanning period, transmitting the obtained motion instruction to the driver in real time, and driving the linear motor to complete corresponding actions according to the instruction, thereby ensuring the operation stability and improving the positioning precision of the linear motor. The method is suitable for various high-speed high-precision motion control occasions requiring complex motion control, particularly high-speed chip mounters, can improve the impact of a linear motor in the operation process and improve the positioning precision, and thus has important significance for improving the packaging precision and performance of electronic products.
Detailed Description
The detailed description of the invention will be made in conjunction with the technical solutions and the accompanying drawings
In the high-speed high-precision packaging process of the semiconductor, reasonable movement speed planning can avoid the situation that equipment generates impact or large vibration due to high-speed movement of a motor rotor so as to influence the chip mounting precision of a high-speed chip mounter, and has important significance for improving the stability of the chip mounting process and improving the chip mounting speed and precision. Based on the method, the high-precision positioning method of the linear motor controlled by the asymmetric S-shaped speed curve is invented, and the flow of the method is shown in the attached drawing 1.
The invention uses TwinCAT2 software in a Beifu industrial personal computer as a soft PLC, according to the method provided by the text, the PLC program transmits position, speed, acceleration and time instructions to an Elmo driver through an EtherCAT network cable, and the driver controls a linear motor to output corresponding instructions, thereby completing the high-speed and high-precision positioning control of the linear motor. The specific implementation process of the invention is explained in detail by taking the example of verifying the effectiveness of the method by MATLAB simulation and realizing point-to-point motion of the linear motor controlled by the S-shaped speed curve in TwinCAT2 by utilizing PLC programming.
Firstly, determining the maximum acceleration a of the linear motor according to the performance parameters of the linear motormaxAnd maximum jerk JmaxSetting the maximum speed V and the acceleration time t in the running process according to the actual running environmentaAnd a deceleration time tdAnd the scale factors alpha and beta, the acceleration time and the deceleration time of which can be further subdivided by formula (1) to obtain a time period distribution relation about the S-shaped speed curve. According to the set operation parameters, the maximum required linear motor in the acceleration section and the deceleration section under the parameters can be calculated according to the formulas (2) to (3)Jerk { Ja,max,Jd,maxAnd maximum acceleration aa,max,ad,max}. If equation (4) is satisfied, the set operating parameters can be implemented, otherwise, the parameters need to be readjusted to satisfy the constraint of equation (4).
Secondly, it is considered that a certain displacement distance s is required in order to reach the set maximum operating speed V. However, in an actual working condition, the actual running distance S is limited by the point-to-point distance, and the maximum running speed cannot be guaranteed to reach the set value, so that the time distribution relationship of each section of the S-shaped speed curve needs to be determined according to the relationship between the set parameter and the actual running distance. Firstly, the critical displacement s required for reaching the maximum speed V can be calculated according to the formula (5)
0If the actual running distance satisfies s > s
0The time distribution [ T ] of the S-shaped speed curve can be determined according to the formula (6)]=[t
1 t
2 t
3 t
4t
5 t
6 t
7](ii) a If the actual running distance satisfies s < s
0The time distribution relationship of the S-shaped speed curve can be updated according to the formulas (7) to (8)
And then, according to the time distribution relation obtained in the step 2, by using the expressions of the jerk and the time, and calculating and deducing the expressions of the acceleration and the time, the speed and the time and the displacement and the time through integral calculation, wherein the expressions are shown in the formulas (9) to (11). According to the a-t equation, the v-t equation and the S-t equation, the operation process of the linear motor from the point A to the point B can be controlled in real time by the S-shaped speed curve.
And finally, rounding the S-shaped speed curve time distribution relation based on the scanning period in a rounding mode by using equations (12) - (13), calculating to obtain corresponding acceleration, speed and displacement in each scanning period by using equations (9) - (11), and inputting the acceleration, speed and displacement to an Elmo driver through an EtherCAT network cable, so that the linear motor is driven to reach an instruction position according to the instruction speed, and the point-to-point high-precision positioning control of the linear motor controlled by the asymmetric S-shaped speed curve is realized.
Setting the maximum speed V in the operation process to 2500mm/s and the acceleration time t according to the actual operation conditiona20ms, deceleration time tdFor example, when the scaling factor α is set to 0.2 and β is set to 0.1, t can be calculated1=t3=8ms,t2=4ms,t5=t7=9ms,t6At this time, the critical distance s required to reach the set maximum speed V of 2500mm/s can be calculated according to the formula (5) at 2ms050 mm. In the actual chip mounter chip mounting process, the displacements from the chip taking points to the chip mounting points are different from 40-80mm, the chip displacements are 40mm, 50mm and 60mm are taken as examples, the time distribution relation calculated above is recalculated and updated according to the formulas (6) - (8) in the step 2, and the acceleration-time curve, the speed-time curve and the position-time curve in the motor operation process are obtained through simulation in the MATLAB by the formulas (9) - (11) and are shown in the figures 2, 3 and 4.
Then, a PLC control program is established in TwinCAT2 by the method, the scanning period of the system is set to be 0.5ms, S-shaped speed curve time distribution is updated by a rounding method according to formulas (12) - (13), every 0.5ms, the PLC program calculates a group of motor motion information [ t, S, v, a ] according to formulas (9) - (11) and transmits the motor motion information [ t, S, v, a ] to a driver, the driver sends out an instruction to control the linear motor to realize accurate positioning of a chip mounting process according to corresponding motion, an actual operation curve fed back by a position encoder is shown in figure 5, and the actual operation can well track a set value.
Meanwhile, in order to verify the effectiveness of the method, taking the patch distance of 50mm as an example, the algorithm proposed herein is compared with the driver internal control algorithm, and the experimental result is shown in fig. 6, fig. 6a) shows that the driver internal control algorithm shifts a time curve when the patch distance s is 50mm, wherein the set operation time T is 40ms, and the stable adjustment time T is 17 ms. Fig. 6b) shows a displacement time curve of the proposed control algorithm for a patch distance s of 50mm, wherein the set operating time T is 31ms and the settling time T is 17 ms. The experimental result shows that under the same positioning precision, the method can improve the operation set period on the premise of ensuring the positioning period, thereby shortening the operation time of the whole patch compared with the internal algorithm of the driver.
Experimental results show that the high-precision positioning method for the linear motor controlled by the asymmetric S-shaped speed curve can meet the high-precision positioning requirement of the linear motor in high-speed operation, shortens positioning time on the premise of ensuring positioning precision, and provides a guiding function for actually improving high-speed chip mounting efficiency in IC packaging.