Speed look-ahead method for spindle of rotary template sewing machine and related equipment
By identifying speed sensitive points in the template sewing machine and performing prospective planning of spindle speed, the problem of difficulty in working together in the prior art is solved, and the stability and quality of sewing are improved.
Patent Information
- Application Number
- CN202411727032.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-11
AI Technical Summary
When planning the speed of the existing template sewing machines, only consider the feeding device and the spindle, making it difficult to achieve accurate coordination between the spindle, feeding device and the rotating shaft, resulting in poor sewing stability and quality.
By obtaining sewing trajectories and stitches, determining the shortest sewing cycle and the minimum rotation angle of the continuous motion of the rotation axis, identifying speed sensitive points, and planning the spindle speed based on these parameters to ensure the coordinated work of the spindle, feeding device and rotation axis.
The accurate coordination of the spindle, feeding device and rotating shaft is achieved, the stability and quality of sewing are improved, and the phenomenon of breaking and dragging of needles is avoided.
Smart Images

Figure CN119596848A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of control technology, in particular to a speed preview method for a main shaft of a rotary template sewing machine and related equipment. Background Art
[0002] With the development of CNC technology, template sewing machines have gradually become common equipment in production scenarios. Template sewing machines refer to sewing equipment that combines clothing template software, clothing template sewing software and CNC technology for fully automatic application template production.
[0003] The spindle motor is one of the important devices in the template sewing machine, which is used to drive the needle and shuttle to complete the sewing action. During the operation of the template sewing machine, the spindle speed of the template sewing machine is one of the main control parameters. At present, the movement speed of the feeder and the spindle speed are coordinated and controlled mainly by real-time monitoring of the spindle speed and the movement distance of the feeder, so as to ensure that the feeder and the spindle can work together in a sewing cycle and successfully complete the sewing process.
[0004] The rotary template sewing machine is one of the main types of template sewing machines. The rotary template sewing machine is a device that is composed of a feeding device, a rotating head, a rotating shuttle bed, a needle and a rotary shuttle, which work together to achieve sewing. The feeding device is driven by an X-axis motor and a Y-axis motor, the rotating head and the rotating shuttle bed are driven by a rotating shaft motor, and the needle and the rotary shuttle are driven by a spindle motor. The inventor has found through research that the existing speed planning method of the template sewing machine only considers the coordinated control of the feeding device and the spindle, while in the rotary template sewing machine, in addition to the feeding device and the spindle, the rotating shaft is also one of the important control objects. If the speed planning method that only considers the spindle and the feeding device is applied to the rotary template sewing machine, it is usually difficult to achieve accurate motion coordination between the spindle, the feeding device and the rotating shaft, which easily leads to needle breakage and needle dragging during sewing, resulting in poor sewing stability and sewing quality. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a speed foresight method for the main shaft of a rotary template sewing machine to solve the problem that when performing speed planning for the rotary template sewing machine based on the existing method, only the feeding device and the main shaft are considered, and it is difficult to achieve accurate coordination of the main shaft, the feeding device and the rotating shaft, resulting in poor sewing stability and sewing quality.
[0006] The embodiment of the present invention also provides a speed prediction device for the main shaft of a rotary template sewing machine to ensure the actual implementation and application of the above method.
[0007] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0008] A speed preview method for a main shaft of a rotary template sewing machine, comprising:
[0009] Acquire the current sewing trajectory to be planned, and determine a plurality of stitches corresponding to the sewing trajectory;
[0010] Determine the shortest sewing cycle corresponding to the feeding device of the sewing machine;
[0011] Based on the shortest sewing cycle, determining a minimum rotation angle of continuous motion corresponding to a rotation axis of the sewing machine;
[0012] For each of the stitches, determine the trajectory curvature corresponding to the stitch, and judge whether the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of continuous motion, if the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of continuous motion, take the stitch as the first position point, if the trajectory curvature corresponding to the stitch is not greater than the minimum rotation angle of continuous motion, take the stitch as the second position point;
[0013] For each of the first position points, determining a rotation axis movement time corresponding to the first position point, and determining a spindle speed limit corresponding to the first position point based on the rotation axis movement time;
[0014] For each of the second position points, determining the spindle speed limit corresponding to the second position point according to the shortest sewing cycle;
[0015] Based on the spindle limit speed corresponding to each of the stitches, the spindle speed corresponding to each of the stitches is forward-planned through a preset backtracking method to obtain the spindle planning speed corresponding to each of the stitches.
[0016] In the above method, optionally, the determining of the shortest sewing cycle corresponding to the feeding device of the sewing machine comprises:
[0017] Determine the shortest feeding time corresponding to the feeding device of the sewing machine according to a preset time optimal feeding speed planning algorithm;
[0018] Determine the feeding time proportion corresponding to the feeding device of the sewing machine;
[0019] The shortest feeding time is divided by the feeding time ratio, and the quotient of the shortest feeding time and the feeding time ratio is taken as the shortest sewing cycle.
[0020] In the above method, optionally, determining the minimum rotation angle of continuous motion corresponding to the rotation axis of the sewing machine based on the shortest sewing cycle includes:
[0021] According to the starting speed of the sewing machine rotating shaft, the maximum acceleration of the sewing machine rotating shaft, the shortest sewing cycle and the preset number of sewing cycles of continuous operation of the rotating shaft, the minimum rotation angle of the continuous movement of the sewing machine rotating shaft is calculated, and the minimum rotation angle of the continuous movement of the sewing machine rotating shaft is used as the minimum rotation angle of continuous movement.
[0022] In the above method, optionally, the step of determining the rotation axis movement time corresponding to the first position point includes:
[0023] Determine the rotation angle of the rotation axis corresponding to the first position point;
[0024] According to a preset time-optimal rotation speed planning algorithm, the movement time corresponding to the rotation angle of the rotation axis is determined, and the movement time corresponding to the rotation angle of the rotation axis is used as the movement time of the rotation axis corresponding to the first position point.
[0025] In the above method, optionally, determining the spindle speed limit corresponding to the first position point according to the rotation axis movement time includes:
[0026] Performing a difference operation on the preset number of continuous sewing cycles of the rotary axis and the value 1 to obtain a first operation result;
[0027] Perform a product operation on the first operation result and the value sixty to obtain a second operation result;
[0028] The second calculation result is divided by the rotation axis movement time, and the quotient of the second calculation result and the rotation axis movement time is used as the spindle speed limit corresponding to the first position point.
[0029] In the above method, optionally, determining the spindle speed limit corresponding to the second position point according to the shortest sewing cycle includes:
[0030] The value of sixty is divided by the shortest sewing cycle, and the calculation result is used as the spindle speed limit corresponding to the second position point.
[0031] Optionally, the above method includes performing speed forward planning on the spindle speed corresponding to each stitch based on the spindle speed limit corresponding to each stitch by a preset backtracking method, including:
[0032] Based on the processing sequence corresponding to each of the stitches, forward speed planning is performed on each of the stitches in sequence from back to front;
[0033] When entering the speed planning process of the current stitch, determining whether the spindle limit speed corresponding to the current stitch is less than the spindle limit speed corresponding to the previous stitch of the current stitch;
[0034] If the spindle speed limit corresponding to the current stitch is not less than the spindle speed limit corresponding to the previous stitch of the current stitch, then the speed planning process of the previous stitch of the current stitch is entered;
[0035] If the spindle speed limit corresponding to the current stitch is less than the spindle speed limit corresponding to the previous stitch of the current stitch, then speed backtracking optimization is performed starting from the current stitch forward;
[0036] Determine whether the backtracking optimization process corresponding to the current stitch traces back to the first stitch trace;
[0037] If the backtracking optimization process corresponding to the current stitch does not backtrack to the first stitch, then the speed planning process of the current stitch is terminated, and the speed planning process of the previous stitch of the current stitch is entered;
[0038] If the backtracking optimization process corresponding to the current stitch has backtracked to the first stitch, the process of performing forward speed planning for each stitch is terminated.
[0039] A speed preview device for a main shaft of a rotary template sewing machine, comprising:
[0040] A first determining unit, used for acquiring a sewing track to be currently planned, and determining a plurality of stitches corresponding to the sewing track;
[0041] A second determining unit, used to determine the shortest sewing cycle corresponding to the feeding device of the sewing machine;
[0042] A third determining unit, configured to determine a minimum rotation angle of continuous motion corresponding to a rotation axis of the sewing machine based on the shortest sewing cycle;
[0043] a fourth determination unit, for each of the stitches, determining a trajectory curvature corresponding to the stitch, and judging whether the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of the continuous motion, if the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of the continuous motion, taking the stitch as the first position point, and if the trajectory curvature corresponding to the stitch is not greater than the minimum rotation angle of the continuous motion, taking the stitch as the second position point;
[0044] a fifth determining unit, configured to determine, for each of the first position points, a rotation axis movement time corresponding to the first position point, and determine a spindle speed limit corresponding to the first position point according to the rotation axis movement time;
[0045] a sixth determining unit, configured to determine, for each of the second position points, a spindle speed limit corresponding to the second position point according to the shortest sewing cycle;
[0046] The backtracking planning unit is used to perform forward speed planning on the spindle speed corresponding to each stitch based on the spindle limit speed corresponding to each stitch through a preset backtracking method to obtain the spindle planning speed corresponding to each stitch.
[0047] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the speed preview method for the main shaft of a rotary template sewing machine as described above.
[0048] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to implement the speed look-ahead method for the main shaft of a rotary template sewing machine as described above.
[0049] A speed prediction method for a main shaft of a rotary template sewing machine provided based on the above-mentioned embodiment of the present invention includes: obtaining a sewing trajectory to be planned and determining a plurality of stitches corresponding to the sewing trajectory; determining the shortest sewing cycle corresponding to a feeding device of the sewing machine; based on the shortest sewing cycle, determining a minimum rotation angle of continuous motion corresponding to a rotating shaft of the sewing machine; for each stitch, determining a trajectory curvature corresponding to the stitch, and judging whether the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of continuous motion; if the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of continuous motion, taking the stitch as the first position If the curvature of the trajectory corresponding to the stitch is not greater than the minimum rotation angle of continuous motion, the stitch is used as the second position point; for each first position point, the rotation axis movement time corresponding to the first position point is determined, and the spindle limit speed corresponding to the first position point is determined based on the rotation axis movement time; for each second position point, the spindle limit speed corresponding to the second position point is determined based on the shortest sewing cycle; based on the spindle limit speed corresponding to each stitch, the spindle speed corresponding to each stitch is forward-planned through a preset backtracking method to obtain the spindle planning speed corresponding to each stitch. The method provided in the embodiment of the present invention is applied to plan the spindle speed through speed forward-looking, and the planned spindle speed is constrained based on the feeding motion of the feeding device and the rotation motion of the rotating axis. Specifically, whether the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of the continuous movement of the rotating axis is used to identify whether the position point of the speed planning is a speed sensitive point. If the position point of the speed planning is not a speed sensitive point, the spindle limit speed of the position point can be calculated according to the shortest sewing cycle of the sewing machine feeding device. If the position point of the speed planning is a speed sensitive point, the spindle limit speed can be calculated according to the movement time of the rotating axis corresponding to the position point. On the basis of the spindle limit speed, the spindle speed of each stitch is optimized twice by backtracking method, so that the final spindle planning speed can ensure smooth spindle speed change while meeting the constraints of feeding movement and rotation movement, which is conducive to avoiding needle breakage and needle dragging during sewing, improving sewing stability and improving sewing quality. In addition, the spindle limit speed is determined based on the shortest sewing cycle of the feeding device or the movement time of the rotating axis. It is the maximum operating speed under the condition of meeting the corresponding constraints. Backtracking optimization based on the spindle limit speed can make the final spindle planning speed as close as possible to the maximum speed of the corresponding position, which is conducive to improving sewing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0051] Figure 1 A method flow chart of a speed preview method for a main shaft of a rotary template sewing machine provided by an embodiment of the present invention;
[0052] Figure 2 A schematic diagram of the timing of coordinated operation of the axes of a rotary template sewing machine provided by an embodiment of the present invention;
[0053] Figure 3 A schematic diagram of a displacement-velocity-acceleration curve of a feeding device provided in an embodiment of the present invention;
[0054] Figure 4 A schematic diagram of a needle trace provided by an embodiment of the present invention;
[0055] Figure 5 A schematic diagram of a speed forward planning process provided by an embodiment of the present invention;
[0056] Figure 6 A schematic diagram of a sewing pattern provided by an embodiment of the present invention;
[0057] Figure 7 A schematic diagram of simulation data provided by an embodiment of the present invention;
[0058] Figure 8 Another schematic diagram of simulation data provided by an embodiment of the present invention;
[0059] Fig. 9 A statistical graph of spindle speed simulation data provided by an embodiment of the present invention;
[0060] Fig.10 A schematic diagram of the structure of a speed preview device for a main shaft of a rotary template sewing machine provided by an embodiment of the present invention;
[0061] Fig.11 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0064] The embodiment of the present invention provides a speed prediction method for the main shaft of a rotary template sewing machine. The method can be applied to the control system of the rotary template sewing machine. The execution subject can be a processor of the system. The method flow chart of the method can be as follows: Figure 1 shown.
[0065] In order to better illustrate the method provided by the embodiment of the present invention, the working process of the rotary template sewing machine is first briefly described.
[0066] The working process of the rotary template sewing machine can be decomposed into three movements. The first is that the X and Y axis motors drive the feeding device to move along the plane. The second is that the needle moves up and down under the drive of the upper spindle motor, and the rotary shuttle rotates under the drive of the lower spindle motor to achieve sewing action. The third is that the rotary axis motor drives the rotating head and the rotary shuttle bed to rotate. The automatic sewing function of the rotary template sewing machine is realized by the cooperation of the above devices. The schematic diagram of the traditional timing of the four axes of the sewing machine working together can be shown as follows: Figure 2 shown. Figure 2 The working sequence of a rotary template sewing machine in a sewing cycle is shown. When the needle is outside the sewing material, the X and Y axis motors drive the feed device to move to the needle drop point. At the same time, the rotating shaft drives the rotating head and the rotating shuttle frame to rotate to the sewing angle of the needle. When the feed device and the rotating shaft move, after the above movement is completed, the needle just enters the sewing material. After sewing is completed, the needle starts to move upward. When the needle leaves the sewing material, the next movement of the feed device and the rotating shaft begins. Repeat the above actions until sewing is completed. However, in actual sewing scenarios, it is usually not necessary to follow Figure 2The process shown is used to plan the spindle speed. The embodiment of the present invention provides a method for selecting a method of continuously operating the rotating shaft for several sewing cycles to plan the speed. Considering that the movement of the feeding device and the rotating shaft is constrained by the position of the needle, when the speed of the spindle motor changes, the movement time of the feeding device and the rotating shaft also changes accordingly. Conversely, the speed of the spindle motor is also affected by the movement time of the feeding device and the rotating shaft. The method provided by the embodiment of the present invention calculates the limiting speed of the spindle at the corner based on the movement time of the spindle's collaborative objects, namely the rotating shaft and the feeding device.
[0067] like Figure 1 As shown, the method provided by the embodiment of the present invention includes:
[0068] S101: Acquire a sewing track to be planned, and determine a plurality of stitches corresponding to the sewing track;
[0069] In the method provided by the embodiment of the present invention, when it is necessary to plan the spindle speed during the sewing process of a certain sewing pattern, the corresponding pattern file can be read, and the pattern file can be parsed to obtain sewing data such as the sewing pattern and sewing stitch length. According to the required sewing stitch length, the sewing pattern can be discretized into individual stitches. The user can set the corresponding forward-looking segment number or forward-looking distance in advance according to actual needs. For example, if the forward-looking segment number is set to 10 stitches, then for the trajectory formed by the stitches of the entire sewing pattern, the trajectory formed by every 10 stitches is used as a forward-planned sewing trajectory according to the processing order, and the forward-looking planning of the spindle speed is performed on each sewing trajectory in turn until the speed planning process of the last stitch of the entire sewing pattern is completed.
[0070] In the method provided by an embodiment of the present invention, when it is necessary to plan the spindle speed of a certain sewing trajectory, the corresponding sewing trajectory can be obtained from the parsed data of the pattern file, and the various stitches obtained by dispersing the sewing trajectory according to the sewing needle distance can be determined. Specifically, the coordinates of each stitch, the rotation axis angle corresponding to each stitch and other data can be obtained.
[0071] S102: Determine the shortest sewing cycle corresponding to the feeding device of the sewing machine;
[0072] In the method provided in the embodiment of the present invention, the calculation method of the feeding time can be set in advance according to the speed planning method of the feeding device and the motion law of the feeding motion. Specifically, the shortest feeding time of the feeding device can be calculated according to the operating parameters of the feeding device of the current sewing machine, such as the starting speed, the maximum acceleration, etc., so as to calculate the shortest sewing cycle of the feeding device, which is used as the constraint of the feeding motion on the spindle speed.
[0073] S103: Based on the shortest sewing cycle, determining a minimum rotation angle of continuous motion corresponding to a rotation axis of the sewing machine;
[0074] In the method provided in the embodiment of the present invention, the calculation method of the continuous motion rotation angle can be set in advance according to the speed planning method for the rotating axis and based on the motion law of the rotating axis. Specifically, according to the operating parameters of the rotating axis, such as the starting speed and maximum acceleration of the rotating axis, combined with the shortest sewing cycle, the minimum angle that the rotating axis can rotate continuously, that is, the minimum rotation angle of continuous motion, can be calculated.
[0075] Specifically, the method provided in the embodiment of the present invention performs speed planning based on the continuous operation of the rotating shaft for a number of sewing cycles, so the number of sewing cycles n of the continuous operation of the rotating shaft can be preset, and the rotating shaft needs to rotate to a predetermined angle within n sewing cycles. Combining the number of sewing cycles of the continuous operation of the rotating shaft and the shortest sewing cycle, the minimum angle that the rotating shaft can rotate in the continuous movement of n shortest sewing cycles can be calculated.
[0076] S104: for each of the stitches, determine the trajectory curvature corresponding to the stitch, and judge whether the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of continuous motion; if the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of continuous motion, take the stitch as the first position point; if the trajectory curvature corresponding to the stitch is not greater than the minimum rotation angle of continuous motion, take the stitch as the second position point;
[0077] In the method provided by the embodiment of the present invention, each stitch can be represented by a coordinate, and the sewing track can be represented by a set of incremental coordinates. For the stitches in the sewing track, the present invention can calculate the curvature between the stitches according to the coordinates of the current stitch and the next stitch, and use the curvature as the track curvature corresponding to the current stitch. Specifically, if the incremental coordinates of the sewing track are (x0, y0), (x1, y1), ..., (x m ,y m ), these coordinates are also the coordinates of each stitch. The trajectory curvature △θ corresponding to the i-th stitch i The calculation principle can be shown as follows:
[0078]
[0079] Since the sewing pattern is discretized according to the required stitch length to obtain the stitches, when only the constraints of the feeding device are considered, the maximum speed of the spindle can be calculated according to the shortest feeding time (corresponding to the shortest sewing cycle) under the corresponding stitch length. For some corners with high curvature, the movement time of the rotating axis will increase, and the spindle needs to be reduced to a reasonable speed to ensure that the rotating axis can rotate to the specified angle within the specified sewing cycle, thereby ensuring the sewing quality. Therefore, the identification of the spindle speed sensitive point and the calculation of the speed limit of the sensitive point can be considered in combination with the shortest sewing cycle and the movement time of the rotating axis, so that the spindle runs at the optimal speed calculated by the above constraints while ensuring the sewing quality, thereby improving the sewing efficiency.
[0080] In the method provided by the embodiment of the present invention, for each stitch, the trajectory curvature corresponding to the stitch is used to determine whether the stitch is a speed-sensitive point. Specifically, the trajectory curvature corresponding to the current stitch is compared with the minimum rotation angle of the continuous motion of the rotating shaft. If the trajectory curvature corresponding to the current stitch is greater than the minimum rotation angle of the continuous motion of the rotating shaft, it indicates that the rotating shaft cannot complete the motion within the specified time. The position corresponding to the stitch is a speed-sensitive point, and the running speed of the spindle needs to be limited by the motion time of the rotating shaft. At this time, the stitch is used as the first position point, and the first position point indicates that the point is a speed-sensitive point. If the trajectory curvature corresponding to the current stitch is not greater than the minimum rotation angle of the continuous motion of the rotating shaft, it indicates that the rotating shaft can normally complete the predetermined motion, the spindle can run at the maximum speed, and the position corresponding to the current stitch is not a speed-sensitive point. The stitch is used as the second position point, and the second position point indicates that the point is not a speed-sensitive point.
[0081] S105: for each of the first position points, determining a rotation axis movement time corresponding to the first position point, and determining a spindle speed limit corresponding to the first position point according to the rotation axis movement time;
[0082] In the method provided by an embodiment of the present invention, for a stitch marked as a first position point, that is, a stitch confirmed as a speed-sensitive point, the movement time of the rotating axis is calculated based on the angle that the rotating axis needs to rotate during the processing corresponding to the stitch, and the movement time of the rotating axis is used as a time constraint to calculate the corresponding spindle speed, and the spindle speed is used as the spindle speed corresponding to the first position point.
[0083] S106: for each of the second position points, determining a spindle speed limit corresponding to the second position point according to the shortest sewing cycle;
[0084] In the method provided by an embodiment of the present invention, for the stitch marked as the second position point, that is, the stitch that is not a speed-sensitive point, the shortest sewing cycle is used as the time constraint, the corresponding spindle speed is calculated, and the spindle speed is used as the spindle limit speed corresponding to the second position point.
[0085] S107: Based on the spindle limit speed corresponding to each of the stitches, a preset backtracking method is used to perform forward speed planning on the spindle speed corresponding to each of the stitches to obtain the spindle planning speed corresponding to each of the stitches.
[0086] In the method provided by the embodiment of the present invention, the spindle limit speed corresponding to each stitch is used as the initial planning speed. On this basis, the spindle speed corresponding to each stitch is optimized twice by the backtracking method. The backtracking method is an existing speed look-ahead algorithm and will not be described in detail here. In the method provided by the embodiment of the present invention, the backtracking method is applied to identify whether a turning point of the speed appears from the last stitch forward. If a turning point of the speed appears, the speed is accelerated according to the planning speed of the turning point. If the backtracking speed of a certain position is greater than the corresponding limit speed, the backtracking is stopped, and the limit speed of the position is used as the final backtracking speed, and the speed is decelerated backward until the turning point. Based on this principle, the planning speed of each stitch is optimized twice, and the planning speed of each stitch finally obtained after the planning process is completed is used as the spindle planning speed corresponding to each stitch.
[0087] By applying the method provided in the embodiment of the present invention, the speed of the spindle is planned by speed foresight, and the planned speed of the spindle is constrained based on the feeding motion of the feeding device and the rotational motion of the rotating shaft. Specifically, whether the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of the continuous motion of the rotating shaft is used to identify whether the position point of the speed planning is a speed sensitive point. When the position point of the speed planning is not a speed sensitive point, the spindle limit speed of the position point can be calculated according to the shortest sewing cycle of the sewing machine feeding device. When the position point of the speed planning is a speed sensitive point, the spindle limit speed can be calculated according to the motion time of the rotating shaft corresponding to the position point. On the basis of the spindle limit speed, the spindle speed of each stitch is optimized twice by the backtracking method, so that the final planned speed of each spindle can ensure smooth changes in the spindle speed while satisfying the constraints of the feeding motion and the rotational motion, which is beneficial to avoid needle breakage and needle dragging during sewing, improve sewing stability, and improve sewing quality. In addition, the spindle speed limit is determined based on the shortest sewing cycle of the feeding device or the movement time of the rotating axis. It is the maximum operating speed under the condition of meeting the corresponding constraints. Backtracking optimization based on the spindle speed limit can make the final spindle planning speed as close as possible to the maximum speed of the corresponding position, which is conducive to improving sewing efficiency.
[0088] exist Figure 1 On the basis of the method shown, in the method provided by the embodiment of the present invention, the process of determining the shortest sewing cycle corresponding to the feeding device of the sewing machine mentioned in step S102 includes:
[0089] Determine the shortest feeding time corresponding to the feeding device of the sewing machine according to a preset time optimal feeding speed planning algorithm;
[0090] In the method provided by the embodiment of the present invention, the time-optimal speed planning principle is adopted to configure a speed planning algorithm for planning the feeding speed of the feeding device, that is, the time-optimal feeding speed planning algorithm. The speed planning method defined by the time-optimal feeding speed planning algorithm is used to calculate the shortest feeding time for the feeding device to perform the feeding movement according to the current sewing stitch length requirement under the time-optimal speed planning.
[0091] The time-optimal speed planning method means that if a section of displacement is to be completed in the shortest time, without considering the limiting factors, the movement plan should be to accelerate with the maximum jerk from the beginning, and then decelerate with the maximum jerk. When the speed reaches the maximum speed during the movement, decelerate with the maximum jerk, and then decelerate. When reaching the end point, the terminal speed is reached. At this time, the movement takes the shortest time and the efficiency is optimal.
[0092] Since the movement of the sewing machine feeder is constrained by the position of the spindle, if the feeder cannot complete the movement within the planned time, it will cause small stitches or broken needles, thereby affecting the sewing effect. In the method provided in the embodiment of the present invention, the shortest sewing cycle is calculated accordingly in combination with the shortest feeding time of the feeder under the current sewing stitch length, thereby calculating the maximum speed of the current spindle. When the shortest feeding time of the feeder is calculated in combination with the time-optimal speed planning method, the time-optimal speed planning process can be understood as follows: the initial speed is v s , with the maximum jerk j max Accelerate, after T1 time, with j max Decelerate, then j max After T2 time, the speed is accelerated and decelerated. max Decelerate until the final speed v e , thus completing the time-optimal speed planning. Without considering the uniform speed segment, the speed equation can be shown as follows: Equation 2, and the displacement equation can be shown as follows: Equation 3, where S represents the displacement.
[0093]
[0094] Eliminating the unknown quantities T1 (acceleration time, deceleration time) and T2 (acceleration time, deceleration time) in equations 2 and 3, we can obtain:
[0095]
[0096] In the method provided in the embodiment of the present invention, the starting speed v of the feeding device is s and the terminal velocity v e The maximum take-off speed v fs , a four-stage S-shaped acceleration and deceleration speed planning method is adopted, so the four-stage S-shaped acceleration and deceleration speed curve is symmetrical, so the displacement equation and motion time equation can be simplified, and the following can be obtained:
[0097] S=4v fs T1+2j max T1 3 (Formula 5)
[0098] T fmin =4T1 (Formula 6)
[0099] By optimizing T1, the shortest movement time T can be calculated. fmin , which is the shortest feeding time. Specifically, the optimal solution of T1 can be sought through common iterative methods such as simple iteration method, Newton iteration method, dichotomy method, genetic algorithm, etc. In the embodiment of the present invention, the Cardan formula is used to solve T1, and the calculation method of T1 can be as follows:
[0100]
[0101] For example, to set the maximum take-off speed v fs is 0.0008m / s, maximum jerk j max 150m / s 3 , displacement S is 3mm, and simulation is performed according to the above time-optimal speed planning method. The displacement, velocity, and acceleration curves are as follows Figure 3 As shown by Figure 3 From the curve shown, it can be seen that when the initial velocity is equal to the terminal velocity, the velocity curve and the acceleration curve are symmetrical, and the movement time for moving 3mm is 15.5ms.
[0102] According to the sewing principle, after the sewing pattern is separated by the required sewing needle distance, the distance between the two stitches can be regarded as a straight line displacement, such as Figure 4 As shown, r represents the required needle distance, r x is the X-direction distance between adjacent needle drop points (stitches), r y The Y-direction distance between adjacent needle drop points, the needle distance r can be calculated as follows:
[0103]
[0104] It should be noted that in the actual processing process, there may be r = r x or r=r y Since the X-axis motor and Y-axis motor of the feeding device are the same, when calculating the shortest feeding time corresponding to the feeding device, the current required needle distance is used as the displacement. According to the maximum take-off speed and maximum acceleration of the feeding device, the calculation principle shown in Formula 7 and Formula 6 can be applied to calculate the shortest feeding time T of the feeding device. fmin .
[0105] Determine the feeding time proportion corresponding to the feeding device of the sewing machine;
[0106] In the method provided in the embodiment of the present invention, the feeding time ratio can be set in advance according to the mechanical properties of the current sewing machine and the thickness of the sewing material, and the pre-set feeding time ratio is used as the feeding time ratio corresponding to the feeding device of the sewing machine.
[0107] The shortest feeding time is divided by the feeding time ratio, and the quotient of the shortest feeding time and the feeding time ratio is taken as the shortest sewing cycle.
[0108] In the method provided by the embodiment of the present invention, the shortest sewing cycle T kmin The calculation principle can be shown as follows:
[0109]
[0110] Among them, T fmin is the shortest feeding time, and p is the proportion of feeding time.
[0111] When planning the spindle speed based on the shortest feeding time, the maximum spindle speed v can be calculated according to the following principle: km :
[0112]
[0113] Taking the feeding time proportion p of 77.5% as an example, the shortest feeding time and the maximum spindle speed calculated under the corresponding needle length can be shown in Table 1.
[0114] Table 1
[0115] Serial number Needle distance Shortest feeding time Maximum spindle speed 1 3mm 15.5ms 3000rpm 2 5mm 19.4ms 2268rpm 3 6mm 20ms 2325rpm 4 8mm 23.5ms 1979rpm 5 9mm 24.5ms 1898rpm
[0116] It can be seen from Table 1 that when the stitch length is larger, the movement time of the feeding device is longer and the maximum speed of the spindle during sewing is lower.
[0117] exist Figure 1On the basis of the method shown, in the method provided by the embodiment of the present invention, the process of determining the minimum rotation angle of continuous motion corresponding to the rotating axis of the sewing machine based on the shortest sewing cycle mentioned in step S103 includes:
[0118] According to the starting speed of the sewing machine rotating shaft, the maximum acceleration of the sewing machine rotating shaft, the shortest sewing cycle and the preset number of sewing cycles of continuous operation of the rotating shaft, the minimum rotation angle of the continuous movement of the sewing machine rotating shaft is calculated, and the minimum rotation angle of the continuous movement of the sewing machine rotating shaft is used as the minimum rotation angle of continuous movement.
[0119] In the method provided by the embodiment of the present invention, the number of continuous operation sewing cycles of the rotating axis is preset to n. According to the working requirements, the rotating axis needs to be rotated to a predetermined angle in time within n continuous sewing cycles. According to the starting speed, maximum acceleration, shortest sewing cycle and number of continuous operation sewing cycles of the rotating axis, the minimum angle that the rotating axis can rotate for n shortest sewing cycles of continuous movement can be calculated, and the rotation angle is used as the minimum rotation angle of continuous movement corresponding to the rotating axis. Specifically, considering that in the actual processing scenario, the first sewing cycle within n sewing cycles needs to calculate the motion data of the rotating axis, it is difficult for the first sewing cycle to use all the time for the movement of the rotating axis, so the movement time of the rotating axis is set to (n-1) sewing cycles. In the speed planning of the rotating axis, trapezoidal acceleration is selected, following the principle of time optimization, hoping that the movement of the rotating axis is in an acceleration or deceleration state as much as possible, so that the uniform speed section does not appear. According to this time-optimal planning, the minimum rotation angle △θ corresponding to the continuous movement of the rotating axis min The calculation principle can be shown as follows:
[0120]
[0121] Among them, v rs is the starting speed of the rotating shaft, a rm is the maximum acceleration of the rotating axis, T kmin is the shortest sewing cycle, and n is the number of sewing cycles of continuous operation of the rotary axis.
[0122] exist Figure 1 On the basis of the method shown, in the method provided by the embodiment of the present invention, the process of determining the rotation axis movement time corresponding to the first position point mentioned in step S105 includes:
[0123] Determine the rotation angle of the rotation axis corresponding to the first position point;
[0124] In the method provided by the embodiment of the present invention, according to the motion relationship, it can be known that during the processing of two adjacent stitches, the rotation axis needs to move from the angle corresponding to the current stitch to the angle corresponding to the next stitch within a specified time, and the movement time of the rotation axis is associated with its rotation angle. Therefore, when calculating the rotation axis movement time corresponding to the current first position point, the rotation axis angle corresponding to each stitch can be obtained from the parsed data of the pattern file. When calculating the rotation axis movement time corresponding to the first position point, first calculate the angle that the rotation axis needs to rotate during the processing between the current stitch and the next stitch through the rotation axis angle corresponding to the current stitch (i.e., the first position point) and the rotation axis angle corresponding to the next stitch, that is, the rotation angle of the rotation axis corresponding to the current stitch. Specifically, the rotation axis angle corresponding to the next stitch can be subtracted from the rotation axis angle corresponding to the current stitch, and the difference between the two can be used as the rotation angle of the rotation axis corresponding to the current stitch (i.e., the first position point).
[0125] According to a preset time-optimal rotation speed planning algorithm, the movement time corresponding to the rotation angle of the rotation axis is determined, and the movement time corresponding to the rotation angle of the rotation axis is used as the movement time of the rotation axis corresponding to the first position point.
[0126] In the method provided by the embodiment of the present invention, a time-optimal speed planning method is adopted to plan the speed of the rotating axis, and a corresponding algorithm for speed planning of the rotating axis is configured, namely, a time-optimal rotation speed planning algorithm. The time-optimal speed planning method for the rotating axis is, as mentioned above, a trapezoidal acceleration is selected in the speed planning of the rotating axis, and a speed planning method is set according to the principle of time optimization. Under this planning method, the rotation angle of the rotating axis within a certain needle has a relationship with the motion parameter of the rotating axis as shown in Formula 12, and the calculation principle of the motion time of the rotating axis shown in Formula 13 can be obtained by sorting out.
[0127]
[0128] Among them, Δθ i ' represents the rotation angle of the rotation axis corresponding to the current stitch i, θ i Indicates the rotation axis angle corresponding to the current stitch i, θ (i-1) Indicates the rotation axis angle corresponding to the next stitch, T ri represents the motion time of the rotating axis, v rs is the starting speed of the rotating shaft, a rm is the maximum acceleration of the rotating axis.
[0129] In the method provided in the embodiment of the present invention, the rotation axis movement time T corresponding to the first position point, that is, a certain needle track, can be calculated by the principle shown in Formula 13. ri .
[0130] exist Figure 1 On the basis of the method shown, in the method provided by the embodiment of the present invention, the process of determining the spindle speed limit corresponding to the first position point according to the rotation axis movement time mentioned in step S105 includes:
[0131] Performing a difference operation on the preset number of continuous sewing cycles of the rotary axis and the value 1 to obtain a first operation result;
[0132] Perform a product operation on the first operation result and the value sixty to obtain a second operation result;
[0133] The second calculation result is divided by the rotation axis movement time, and the quotient of the second calculation result and the rotation axis movement time is used as the spindle speed limit corresponding to the first position point.
[0134] In the method provided in the embodiment of the present invention, the first position point is a speed sensitive point, that is, in this scenario, it is necessary to consider the speed constraint of the main shaft due to the movement time of the rotating axis. According to the restriction relationship between the movement of the rotating axis and the movement of the main shaft, under the constraint of the movement time of the rotating axis, the calculation method of the main shaft speed limit can be as follows:
[0135]
[0136] Where n represents the number of continuous sewing cycles of the rotary axis, v li Indicates the spindle speed limit corresponding to the first position point (i.e. a certain stitch i), T ri Indicates the rotation axis movement time corresponding to the first position point.
[0137] exist Figure 1 On the basis of the method shown in the figure, in the method provided by the embodiment of the present invention, the process of determining the spindle speed limit corresponding to the second position point according to the shortest sewing cycle mentioned in step S106 includes:
[0138] The value of sixty is divided by the shortest sewing cycle, and the calculation result is used as the spindle speed limit corresponding to the second position point.
[0139] In the method provided in an embodiment of the present invention, the second position point is not a speed-sensitive point. Regarding the speed planning of the second position point, the maximum spindle speed obtained by only considering the shortest sewing time can be adopted, that is, the spindle limit speed corresponding to the second position point can be calculated using the principle shown in Formula 10 above.
[0140] exist Figure 1 On the basis of the method shown, in the method provided by the embodiment of the present invention, the process of performing speed forward planning on the spindle speed corresponding to each stitch by a preset backtracking method based on the spindle limit speed corresponding to each stitch mentioned in step S107 includes:
[0141] Based on the processing sequence corresponding to each of the stitches, forward speed planning is performed on each of the stitches in sequence from back to front;
[0142] In the method provided by the embodiment of the present invention, each stitch of the sewing track that needs to be planned can be processed in the order of each stitch, starting from the last stitch, and traversing each stitch from front to back in turn, so as to perform forward speed planning for each stitch, that is, starting from the last stitch, the speed planning process of the stitch is executed, and after the speed planning of the stitch is completed, if the conditions for ending the planning do not appear, the speed planning of the previous stitch is continued until the forward speed planning process is ended. In the forward speed planning process, the spindle limit speed corresponding to each stitch can be used as the initial planning speed of each stitch.
[0143] When entering the speed planning process of the current stitch, determining whether the spindle limit speed corresponding to the current stitch is less than the spindle limit speed corresponding to the previous stitch of the current stitch;
[0144] In the method provided by the embodiment of the present invention, when a certain stitch is traversed, the speed planning process of the stitch is entered. At this time, the spindle limit speed corresponding to the current stitch is compared with the spindle limit speed corresponding to the previous stitch to determine whether the spindle limit speed of the current stitch is less than the spindle limit speed of the previous stitch, so as to determine whether a turning point of speed occurs, which can also be understood as whether a speed sensitive point occurs.
[0145] If the spindle speed limit corresponding to the current stitch is not less than the spindle speed limit corresponding to the previous stitch of the current stitch, then the speed planning process of the previous stitch of the current stitch is entered;
[0146] In the method provided by the embodiment of the present invention, if the spindle speed limit corresponding to the current stitch is not less than the spindle speed limit of the previous stitch, then the current stitch is considered not to be a speed sensitive point. At this time, the planned speed corresponding to the current stitch is used as its corresponding spindle planning speed, the speed planning process of the current stitch is terminated, and the speed planning process of the previous stitch is entered. If the planned speed of the current stitch has not been adjusted by backtracking, then its planned speed is the spindle speed limit corresponding to the stitch. If the planned speed of the stitch has been adjusted by backtracking, then its planned speed is the backtracking speed (the planned speed adjusted during the backtracking process).
[0147] It is understandable that if the speed planning process of the first stitch of the sewing trajectory is entered, the overall forward speed planning process can be ended.
[0148] If the spindle speed limit corresponding to the current stitch is less than the spindle speed limit corresponding to the previous stitch of the current stitch, then speed backtracking optimization is performed starting from the current stitch forward;
[0149] In the method provided by an embodiment of the present invention, if the spindle limit speed of the current stitch is less than the spindle limit speed of the previous stitch, the current stitch is considered to be a turning point of the speed, that is, a sensitive point of the speed. At this time, the backtracking optimization method based on the backtracking method is used to perform speed backtracking optimization starting from the current stitch. Specifically, the current stitch can be regarded as the target stitch, and according to a predetermined acceleration strategy, acceleration is performed on the basis of the planned speed of the target stitch to obtain the accelerated planned speed, and the accelerated planned speed is used as the planned speed corresponding to the previous stitch. Then, it is determined whether the planned speed exceeds the spindle limit speed of the previous stitch. If not, the planned speed of the previous stitch is further accelerated to adjust the planned speed of the next stitch forward, and so on, until backtracking to the first stitch. Or when backtracking to a certain stitch, if the adjusted planned speed of the stitch exceeds the spindle limit speed corresponding to the stitch, then the forward backtracking is stopped, and the spindle limit speed corresponding to the stitch is used as the planned speed of the stitch. On this basis, the planned speeds corresponding to the subsequent stitches are adjusted backward in turn, that is, the planned speeds of the subsequent stitches are slowed down until they are adjusted to the target stitch.
[0150] Determine whether the backtracking optimization process corresponding to the current stitch traces back to the first stitch trace;
[0151] In the method provided by an embodiment of the present invention, after the backtracking optimization process of the current stitch is completed, it can be determined whether to backtrack to the first stitch based on the ending method of the current backtracking optimization process, that is, whether to backtrack and optimize the planned speed of the first stitch of the sewing trajectory during the backtracking optimization process.
[0152] If the backtracking optimization process corresponding to the current stitch does not backtrack to the first stitch, then the speed planning process of the current stitch is terminated, and the speed planning process of the previous stitch of the current stitch is entered;
[0153] If the backtracking optimization process corresponding to the current stitch has backtracked to the first stitch, the process of performing forward speed planning for each stitch is terminated.
[0154] In the method provided by the embodiment of the present invention, if the backtracking optimization process does not backtrack to the first stitch, then the speed planning is performed on the previous stitch of the current stitch. If the current backtracking optimization process has backtracked to the first stitch, then the overall forward speed planning process is terminated, and the planned speeds corresponding to the current stitches are used as the spindle planned speeds corresponding to the stitches.
[0155] In order to better illustrate the method provided by the embodiment of the present invention, Figure 5 The flowchart shown briefly describes the overall speed planning process of the embodiment of the present invention. When using speed forward planning, the higher the forward segment number, the better the control effect. However, too many forward segments will increase the calculation time. Considering the controllability of time, the appropriate forward segment number can be selected according to the performance of the processor. In the embodiment of the present invention, the forward segment number is set to N, and point P sta Solstice P end is N line segments, and each point in the trajectory is a needle track. When planning the speed of this processing trajectory, the required data is calculated according to the principles shown in the above formulas, where the trajectory curvature △θ corresponding to each needle is obtained. i And the minimum rotation angle △θ of continuous motion corresponding to the rotation axis min According to the relationship between the curvature of each needle's trajectory and the minimum rotation angle of the continuous motion of the rotating axis, identify whether each needle is a speed sensitive point, and calculate the corresponding spindle limit speed v of each needle according to the principle shown in formula 15. li .
[0156]
[0157] From this, the spindle speed limit of each needle can be obtained: lsta 、v l(sta+1) ,…,v lm ,…,v l(end-1) 、v lend .
[0158] Initialize variable i = end, then start from point P end Start backtracking, such as Figure 5 As shown, the speed preview process of the embodiment of the present invention mainly includes:
[0159] Step 1: Determine whether each point in the forward segment has been traversed, that is, determine whether the current needle is the initial needle P through the current variable i sta If i>sta, the look-ahead process is not finished, and the process goes to step 2. If i=sta, the look-ahead process is finished.
[0160] Step 2: By judging whether the spindle speed limit of the current needle is less than the spindle speed limit of the previous needle, identify whether the current needle is a speed sensitive point. l(i-1) >v li , then the current point is considered to be a speed sensitive point, and the process goes to step 3. If v l(i-1) ≤v li , then let i=i-1 and go to step 1.
[0161] Step 3: Starting from the current needle, use the backtracking method to accelerate forward, that is, according to the predetermined acceleration method, from needle Pi Start to accelerate forward, and calculate the retracement speed v of the previous needle on the spindle in sequence oi When tracing back to each needle, it is necessary to determine whether the tracing speed of the needle exceeds the corresponding spindle limit speed. If not, the tracing speed of the needle is used as the current planning speed of the needle, and the tracing back is continued. If it exceeds the spindle limit speed, the forward tracing is stopped, and the spindle limit speed of the needle is used as the planning speed of the needle. The planning speed of each needle is adjusted backwards from the needle until it returns to the previous speed sensitive point. When adjusting the planning speed backward, the speed of each point after adjustment is lower than the speed of the previous forward planning. The adjusted speed v ni As the final planned speed of the current process. If there is no backward speed adjustment during the backtracking process, then backtrack to the starting needle and end the overall speed forward process. If the speed is adjusted backward to the speed sensitive point during the backtracking process, then set i=i-1 and enter step 1.
[0162] After the speed forward planning of this segment is completed, if a new line segment P is added (end+1) Solstice P (end+2) , then for P (end+1) Solstice P (end+2) A new round of speed forward planning is carried out for the N stitches between the two stitches, and speed planning is carried out for each sewing trajectory of the sewing pattern based on this, until the speed planning for the last stitch of the sewing pattern is completed.
[0163] In specific application scenarios, since it is necessary to complete the calculation of the movement speed of multiple needles and the calculation of the speed look-ahead method within one sewing cycle, in order to reduce the amount of calculation, considering that the rotary template sewing machine control system may use different motors as the control object, from an engineering perspective, in order to facilitate user debugging, in the acceleration and deceleration control, the acceleration and deceleration are performed by setting the number of acceleration and deceleration needles. For example, if the number of acceleration and deceleration needles set is 8 needles, the interpolation is evenly distributed to each needle according to the difference between the maximum speed and the minimum speed of the spindle. When performing the backward speed adjustment process in step 3, it is necessary to determine whether all subsequent needles are used for acceleration and deceleration. If not, the corresponding acceleration needle number is selected according to the acceleration and deceleration difference at this time. After determining the acceleration needle number, except for the acceleration needle, all other needles are selected to run at the limited speed. In this way, when facing motors with different performances and different sewing machines, users can flexibly modify parameters to achieve more appropriate spindle acceleration and deceleration. In an embodiment of the present invention, when speed planning is performed for the feeding device, the spindle movement when the needle is separated from the sewing material is regarded as uniform, so that the shortest feeding time is calculated based on the proportion of the feeding time. In order to improve the accuracy of the calculation of the shortest feeding time, it is possible to consider accelerating and decelerating the spindle when the needle is in the sewing material, and moving the spindle at a uniform speed when the needle is outside the sewing material.
[0164] Furthermore, in order to better illustrate the method provided by the embodiment of the present invention, a speed planning simulation is performed on the method provided by the embodiment of the present invention. Figure 6 Sew according to the sewing pattern shown. Figure 6 The total number of stitches in the circular sewing pattern is 330, the stitch length is 3 mm, the thickness of the sewing fabric is selected as 0.9 cm, the calculated feeding time proportion p is 77.17%, and the number of continuous operation sewing cycles of the rotary axis is set to 3. The number of look-ahead segments of the look-ahead algorithm is set to 6 and 2 respectively. Figure 6 The pattern shown is sewn twice for simulation, and the pulse and direction signals output by the template sewing machine control system and the encoder signal of the spindle motor are collected for analysis. The spindle control pulse signal, the rotation axis direction signal, the rotation axis control pulse signal, the X-axis control pulse signal, the Y-axis control pulse signal, the X-axis direction signal, the Y-axis direction signal, the spindle motor encoder A phase signal, and the spindle motor encoder Z phase signal are collected through channels 0 to 8 of the logic analyzer. Because the pulse and direction signals output by the control system are differential signals, in order to ensure the validity of the collected data, the collection point is selected at the front end of the differential module. The collected data waveform is as follows: Figure 7 Based on Figure 7 , it can be seen that including the starting point and the end point, the rotation axis moves a total of 21 times, which is Figure 6 The motion characteristics of the rotary axis shown are consistent, and the motion control of the rotary axis is selected in a manner that allows continuous operation for several sewing cycles.
[0165] In order to clearly demonstrate the working process of the four-axis coordination of the sewing machine, the motion data of the first corner of the sewing pattern is selected for analysis. Figure 8 The rotary template sewing machine is shown Figure 6 The data of the pattern sewing to the first corner are shown in the first line, the encoder Z phase signal of the spindle, the second line is the rotary axis pulse control signal, the third line is the X axis pulse control signal, and the fourth line is the Y axis pulse control signal. The rotary axis continuous operation sewing cycle is set to 3, which shows that the feeding device is completed within one sewing cycle, and the timing of each movement is the same.
[0166] Figure 8 The pulse control signal of the rotating axis shown in the figure occupies three sewing cycles. Sewing cycle 1 is the sewing cycle of the corner. The rotating axis starts to move in this sewing cycle and runs continuously for three sewing cycles. The time of the three sewing cycles is 198.32ms, 184.33ms, and 83.99ms respectively, and the running time of the rotating axis is 394.52ms, which proves the effectiveness of calculating the spindle speed limit based on the four-axis coordinated motion characteristics used in the above embodiments.
[0167] In order to more intuitively demonstrate the improvement of sewing efficiency by the spindle speed look-ahead method, under the premise of ensuring sewing quality, the actual sewing data of the look-ahead segment 6 and the look-ahead segment 2 are collected respectively. After a series of processing on the collected waveform files, the collected data are graphically displayed. Fig. 9 A curve chart showing the spindle planning speed under different look-ahead segments.
[0168] The motion data of different look-ahead segments can be further referred to Table 2.
[0169] Table 2
[0170] Look-ahead segment Maximum spindle speed Sewing time Forward segment number 6 3012rpm 28.74s Look-ahead segment 2 900rpm 32.94s
[0171] As can be seen from Table 2, the maximum speed of the spindle can reach 3012rpm after the speed forward method with 6 forward segments is used for speed planning, while the maximum speed of the spindle can only reach 900rpm after the speed forward method with 2 forward segments is used for speed planning. It can be concluded that the more forward methods are used, the higher the maximum speed of the spindle operation. According to statistics, the sewing time of the speed forward method with 6 forward segments is 28.74s, while the sewing time of the speed forward method with 2 forward segments is 32.94s. The sewing efficiency of the speed forward method with 6 forward segments is 12.75% higher than that of the speed forward method with 2 forward segments.
[0172] and Figure 1 Corresponding to the speed forecasting method of the main shaft of the rotary template sewing machine shown in the figure, the embodiment of the present invention also provides a speed forecasting device for the main shaft of the rotary template sewing machine, which is used to Figure 1 The specific implementation of the method shown in is shown in the structural diagram Fig.10 As shown, including:
[0173] A first determining unit 201 is used to obtain a sewing track to be currently planned, and determine a plurality of stitches corresponding to the sewing track;
[0174] A second determining unit 202, used to determine the shortest sewing cycle corresponding to the feeding device of the sewing machine;
[0175] A third determining unit 203 is used to determine the minimum rotation angle of continuous motion corresponding to the rotation axis of the sewing machine based on the shortest sewing cycle;
[0176] The fourth determining unit 204 is used to determine the trajectory curvature corresponding to each of the stitches, and judge whether the trajectory curvature corresponding to the stitches is greater than the minimum rotation angle of the continuous motion, if the trajectory curvature corresponding to the stitches is greater than the minimum rotation angle of the continuous motion, then the stitches are used as the first position point, if the trajectory curvature corresponding to the stitches is not greater than the minimum rotation angle of the continuous motion, then the stitches are used as the second position point;
[0177] A fifth determining unit 205 is used to determine, for each of the first position points, a rotation axis movement time corresponding to the first position point, and determine a spindle speed limit corresponding to the first position point according to the rotation axis movement time;
[0178] A sixth determining unit 206, configured to determine, for each second position point, a spindle speed limit corresponding to the second position point according to the shortest sewing cycle;
[0179] The backtracking planning unit 207 is used to perform forward speed planning on the spindle speed corresponding to each stitch based on the spindle limit speed corresponding to each stitch through a preset backtracking method to obtain the spindle planning speed corresponding to each stitch.
[0180] The device provided by the embodiment of the present invention is applied to plan the speed of the spindle by speed foresight, and the planned speed of the spindle is constrained based on the feeding motion of the feeding device and the rotational motion of the rotating shaft. Specifically, whether the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of the continuous motion of the rotating shaft is used to identify whether the position point of the speed planning is a speed sensitive point. When the position point of the speed planning is not a speed sensitive point, the spindle limit speed of the position point can be calculated according to the shortest sewing cycle of the sewing machine feeding device. When the position point of the speed planning is a speed sensitive point, the spindle limit speed can be calculated according to the movement time of the rotating shaft corresponding to the position point. On the basis of the spindle limit speed, the spindle speed of each stitch is optimized twice by the backtracking method, so that the final planned speed of each spindle can ensure smooth changes in the spindle speed while satisfying the constraints of the feeding motion and the rotational motion, which is beneficial to avoid needle breakage and needle dragging during sewing, improve sewing stability, and improve sewing quality. In addition, the spindle speed limit is determined based on the shortest sewing cycle of the feeding device or the movement time of the rotating axis. It is the maximum operating speed under the condition of meeting the corresponding constraints. Backtracking optimization based on the spindle speed limit can make the final spindle planning speed as close as possible to the maximum speed of the corresponding position, which is conducive to improving sewing efficiency.
[0181] exist Fig.10 Based on the device shown, the device provided by the embodiment of the present invention can be further expanded into multiple units. The function of each unit can be found in the description of each embodiment provided in the previous text for the speed preview method of the main shaft of the rotary template sewing machine, and no further examples will be given here.
[0182] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned speed preview method for the main shaft of the rotary template sewing machine.
[0183] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Fig.11 As shown, it specifically includes a memory 301 and one or more instructions 302, wherein the one or more instructions 302 are stored in the memory 301 and are configured to be executed by one or more processors 303 to perform the following operations:
[0184] Acquire the current sewing trajectory to be planned, and determine a plurality of stitches corresponding to the sewing trajectory;
[0185] Determine the shortest sewing cycle corresponding to the feeding device of the sewing machine;
[0186] Based on the shortest sewing cycle, determining a minimum rotation angle of continuous motion corresponding to a rotation axis of the sewing machine;
[0187] For each of the stitches, determine the trajectory curvature corresponding to the stitch, and judge whether the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of continuous motion, if the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of continuous motion, take the stitch as the first position point, if the trajectory curvature corresponding to the stitch is not greater than the minimum rotation angle of continuous motion, take the stitch as the second position point;
[0188] For each of the first position points, determining a rotation axis movement time corresponding to the first position point, and determining a spindle speed limit corresponding to the first position point based on the rotation axis movement time;
[0189] For each of the second position points, determining the spindle speed limit corresponding to the second position point according to the shortest sewing cycle;
[0190] Based on the spindle limit speed corresponding to each of the stitches, the spindle speed corresponding to each of the stitches is forward-planned through a preset backtracking method to obtain the spindle planning speed corresponding to each of the stitches.
[0191] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0192] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0193] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A speed prediction method for a main shaft of a rotary template sewing machine, characterized in that: include: Acquire the current sewing trajectory to be planned, and determine a plurality of stitches corresponding to the sewing trajectory; Determine the shortest sewing cycle corresponding to the feeding device of the sewing machine; Based on the shortest sewing cycle, determining a minimum rotation angle of continuous motion corresponding to a rotation axis of the sewing machine; For each of the stitches, determine the trajectory curvature corresponding to the stitch, and judge whether the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of continuous motion, if the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of continuous motion, take the stitch as the first position point, if the trajectory curvature corresponding to the stitch is not greater than the minimum rotation angle of continuous motion, take the stitch as the second position point; For each of the first position points, determining a rotation axis movement time corresponding to the first position point, and determining a spindle speed limit corresponding to the first position point based on the rotation axis movement time; For each of the second position points, determining the spindle speed limit corresponding to the second position point according to the shortest sewing cycle; Based on the spindle limit speed corresponding to each of the stitches, the spindle speed corresponding to each of the stitches is forward-planned through a preset backtracking method to obtain the spindle planning speed corresponding to each of the stitches.
2. The speed prediction method for the main shaft of a rotary template sewing machine according to claim 1, characterized in that: The determining of the shortest sewing cycle corresponding to the feeding device of the sewing machine comprises: Determine the shortest feeding time corresponding to the feeding device of the sewing machine according to a preset time optimal feeding speed planning algorithm; Determine the feeding time proportion corresponding to the feeding device of the sewing machine; The shortest feeding time is divided by the feeding time ratio, and the quotient of the shortest feeding time and the feeding time ratio is taken as the shortest sewing cycle.
3. The speed prediction method for the main shaft of a rotary template sewing machine according to claim 1, characterized in that: The step of determining the minimum rotation angle of continuous motion corresponding to the rotation axis of the sewing machine based on the shortest sewing cycle includes: According to the starting speed of the sewing machine rotating shaft, the maximum acceleration of the sewing machine rotating shaft, the shortest sewing cycle and the preset number of sewing cycles of continuous operation of the rotating shaft, the minimum rotation angle of the continuous movement of the sewing machine rotating shaft is calculated, and the minimum rotation angle of the continuous movement of the sewing machine rotating shaft is used as the minimum rotation angle of continuous movement.
4. The speed prediction method for the main shaft of a rotary template sewing machine according to claim 1, characterized in that: The step of determining the rotation axis movement time corresponding to the first position point includes: Determine the rotation angle of the rotation axis corresponding to the first position point; According to a preset time-optimal rotation speed planning algorithm, the movement time corresponding to the rotation angle of the rotation axis is determined, and the movement time corresponding to the rotation angle of the rotation axis is used as the movement time of the rotation axis corresponding to the first position point.
5. The speed prediction method for the main shaft of a rotary template sewing machine according to claim 1, characterized in that: Determining the spindle speed limit corresponding to the first position point according to the rotation axis movement time includes: Performing a difference operation on the preset number of continuous sewing cycles of the rotary axis and the value 1 to obtain a first operation result; Perform a product operation on the first operation result and the value sixty to obtain a second operation result; The second calculation result is divided by the rotation axis movement time, and the quotient of the second calculation result and the rotation axis movement time is used as the spindle speed limit corresponding to the first position point.
6. The speed prediction method for the main shaft of a rotary template sewing machine according to claim 1, characterized in that: Determining the spindle speed limit corresponding to the second position point according to the shortest sewing cycle includes: The value of sixty is divided by the shortest sewing cycle, and the calculation result is used as the spindle speed limit corresponding to the second position point.
7. The speed prediction method for the main shaft of a rotary template sewing machine according to claim 1, characterized in that: Based on the spindle limit speed corresponding to each stitch, the speed of the spindle corresponding to each stitch is planned forward by a preset backtracking method, including: Based on the processing sequence corresponding to each of the stitches, forward speed planning is performed on each of the stitches in sequence from back to front; When entering the speed planning process of the current stitch, determining whether the spindle limit speed corresponding to the current stitch is less than the spindle limit speed corresponding to the previous stitch of the current stitch; If the spindle speed limit corresponding to the current stitch is not less than the spindle speed limit corresponding to the previous stitch of the current stitch, then the speed planning process of the previous stitch of the current stitch is entered; If the spindle speed limit corresponding to the current stitch is less than the spindle speed limit corresponding to the previous stitch of the current stitch, then speed backtracking optimization is performed starting from the current stitch forward; Determine whether the backtracking optimization process corresponding to the current stitch traces back to the first stitch trace; If the backtracking optimization process corresponding to the current stitch does not backtrack to the first stitch, then the speed planning process of the current stitch is terminated, and the speed planning process of the previous stitch of the current stitch is entered; If the backtracking optimization process corresponding to the current stitch has backtracked to the first stitch, the process of performing forward speed planning for each stitch is terminated.
8. A speed prediction device for the main shaft of a rotary template sewing machine, characterized in that: include: A first determining unit, used for acquiring a sewing track to be currently planned, and determining a plurality of stitches corresponding to the sewing track; A second determining unit, used to determine the shortest sewing cycle corresponding to the feeding device of the sewing machine; A third determining unit, configured to determine a minimum rotation angle of continuous motion corresponding to a rotation axis of the sewing machine based on the shortest sewing cycle; a fourth determination unit, for each of the stitches, determining a trajectory curvature corresponding to the stitch, and judging whether the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of the continuous motion, if the trajectory curvature corresponding to the stitch is greater than the minimum rotation angle of the continuous motion, taking the stitch as the first position point, and if the trajectory curvature corresponding to the stitch is not greater than the minimum rotation angle of the continuous motion, taking the stitch as the second position point; a fifth determining unit, configured to determine, for each of the first position points, a rotation axis movement time corresponding to the first position point, and determine a spindle speed limit corresponding to the first position point according to the rotation axis movement time; a sixth determining unit, configured to determine, for each of the second position points, a spindle speed limit corresponding to the second position point according to the shortest sewing cycle; The backtracking planning unit is used to perform forward speed planning on the spindle speed corresponding to each stitch based on the spindle limit speed corresponding to each stitch through a preset backtracking method to obtain the spindle planning speed corresponding to each stitch.
9. A storage medium, characterized in that: The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the speed preview method for the main shaft of the rotary template sewing machine according to any one of claims 1 to 7.
10. An electronic device, characterized in that: It comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to execute the speed look-ahead method for the main shaft of a rotary template sewing machine as claimed in any one of claims 1 to 7.
Citation Information
Cited By
Improved SpTA speed planning method based on FPGA
CN117144573A