A polar coordinate interpolation method for numerical control system
By calculating the Jacobian matrix and Hessian matrix of the polar coordinate plane, the ultimate speed and acceleration of the Cartesian plane are accurately determined, which solves the problem that the limit speed and acceleration limits are not fully considered in polar coordinate interpolation in the CNC system, and improves the machining efficiency. efficiency and smoothness.
Patent Information
- Application Number
- CN202111405373.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2041-11-24
AI Technical Summary
The existing CNC system fails to fully consider the limit speed and limit acceleration restrictions of the linear axis and the rotation axis in polar coordinate interpolation, resulting in low processing efficiency and poor smoothness, and the constraint coefficient and transition coefficient lack clarity, and the calculation method exists Approximate processing and blindness.
By calculating the Jacobian matrix and Hessian matrix of the polar coordinate plane, the limit speed and limit acceleration of the Cartesian plane are accurately determined, and these parameters are fully considered in the speed curve planning, and linear, exponential or S-shaped acceleration and deceleration planning is adopted. .
It achieves accurate calculation and reasonable planning of the limit speed and limit acceleration in the CNC system, ensures the smoothness and rapidity of the processing process, shortens the processing time, improves the processing efficiency, and clarifies the usage parameters of the constraint coefficient and the transition coefficient. .
Smart Images

Figure CN114115136B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of numerical control machining, and in particular to a polar coordinate interpolation method under the premise of limiting the limit speed and limit acceleration of a linear axis and a rotary axis of a numerical control system. Background Art
[0002] Polar coordinate interpolation of CNC system is a kind of contour control, which converts the programming instructions in Cartesian plane into interpolation of polar coordinate plane, that is, into the movement of linear axis and rotary axis. It is effective for front cutting processing and camshaft grinding in CNC machine tool turning processing.
[0003] The conversion relationship between the Cartesian plane and the polar coordinate plane in polar coordinate interpolation is nonlinearly coupled. The limit speed and limit acceleration allowed by the tool during movement are variable, and change with the tool movement position. Therefore, polar coordinate interpolation control cannot be controlled by a fixed limit speed and a fixed limit acceleration like the traditional CNC interpolation method. It needs to continuously adjust the limit speed and limit acceleration during the interpolation process to ensure the speed and smoothness of the tool during the entire movement process.
[0004] Document 1 (Chinese Patent No. 201210448103.5 Polar Coordinate Interpolation Extreme Region Smoothing Processing Method for CNC System) aims at the problems of inaccurate determination of extreme region and uneven processing of tool center point path in extreme region, and provides a polar coordinate interpolation extreme region smoothing processing method for CNC system combining C-axis constraint coefficient α and transition coefficient β. In the extreme region close to the pole (X=0, Y=0) in the Cartesian plane, acceleration and deceleration control of the XY path is performed to prevent the C-axis from exceeding the tolerance and realize smooth polar coordinate interpolation extreme region processing.
[0005] The traditional CNC interpolation method uses a fixed limit speed and a fixed limit acceleration for control. These two fixed values are difficult to set. If they are set too small, the processing efficiency will be too low. If they are set too large, the motor will be overloaded, thus affecting the smoothness of the processing.
[0006] The method in Reference 1 can improve the smoothness of the traditional interpolation method to a certain extent, but it has the following disadvantages: 1. It only considers the limit speed limit, but not the limit acceleration limit; 2. It only considers the limit speed limit of the rotating axis, but not the limit speed limit of the linear axis; 3. In the process of calculating the limit speed, some approximate processing is done, which is not accurate enough; 4. The constraint coefficients and transition coefficients used lack clear criteria and are somewhat blind. Summary of the invention
[0007] The object of the present invention is to provide a polar coordinate interpolation method for a numerical control system to solve the problems encountered in the above-mentioned background technology.
[0008] To achieve the above object, the technical solution of the present invention is as follows:
[0009] A polar coordinate interpolation method for a numerical control system, comprising the following method:
[0010] Step 1: Calculate the limit speed V(r,θ) of the polar coordinate plane based on the system parameters of the CNC system max , including the limiting speed r' of the linear axis max and the limiting speed θ' of the rotating axis max ;
[0011] Step 2: Calculate the Jacobian matrix J of the polar coordinate equation;
[0012] Step 3: According to r' max ,θ' max and J to calculate the Cartesian plane limiting velocity V 合max ;
[0013] Step 4: Calculate the limit acceleration A(r,θ) of the polar coordinate plane based on the system parameters of the CNC system max , including the limiting acceleration r" of the linear axis max and the limiting acceleration of the rotation axis θ" max ;
[0014] Step 5: Calculate the Hessian matrix H and bias matrix B of the polar coordinate equation;
[0015] Step 6: According to r” max ,θ” max , H and B to calculate the Cartesian plane limit acceleration A 合max ;
[0016] Step 7: CNC system based on limit speed V 合max and the limit acceleration A 合max Carry out speed curve planning.
[0017] In the above scheme, the speed curve planning is any one of linear acceleration and deceleration planning, exponential acceleration and deceleration planning, and S-shaped acceleration and deceleration planning.
[0018] Compared with the prior art, the beneficial effects of the present invention are as follows: starting from the basic model of polar coordinates, the present invention derives a calculation method for the limit speed and limit acceleration of Cartesian space based on the Jacobian matrix and the Hessian matrix, and fully considers the limit speed and limit acceleration when planning the speed curve, thereby ensuring the smoothness of the CNC system in the entire machining process while shortening the machining time and improving the machining efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The disclosure of the present invention is described with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of the present invention. In the accompanying drawings, the same reference numerals are used to refer to the same components. Among them:
[0020] Figure 1 It is a schematic diagram of the workflow of the present invention;
[0021] Figure 2 It is a schematic diagram of the process of linear acceleration and deceleration planning in the present invention;
[0022] Figure 3 This is a speed curve comparison diagram of the present invention in Example 1. DETAILED DESCRIPTION
[0023] In order to make the technical means, creative features, objectives and effects of the present invention easy to understand, the present invention is now further described in detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the relevant components of the present invention.
[0024] According to the technical solution of the present invention, without changing the essential spirit of the present invention, a person skilled in the art can propose a variety of interchangeable structural modes and implementation modes. Therefore, the following specific implementation modes and the accompanying drawings are only exemplary descriptions of the technical solution of the present invention, and should not be regarded as the entirety of the present invention or as a limitation or restriction to the technical solution of the present invention.
[0025] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0026] like Figure 1 As shown, a polar coordinate interpolation method for a numerical control system includes the following methods:
[0027] Step 1: Calculate the polar coordinate plane limit speed: Calculate the polar coordinate plane limit speed V(r,θ) based on the system parameters of the CNC system. max , including the limiting speed r' of the linear axis max and the limiting speed θ' of the rotating axis max Compared with the prior art, in step 1, not only the limiting speed θ' of the rotating shaft is considered max , and taking into account the limiting speed r' of the linear axis max .
[0028] Check the system parameter table of the CNC system to know the upper limit of the linear axis speed Vr max and the upper limit of the rotation axis speed Vθ max, the units of these two parameters are mm / min, and by converting them into the international unit m / s, the polar coordinate plane limit speed can be calculated:
[0029]
[0030] Step 2: Calculate the Jacobian matrix of the polar coordinate equation:
[0031] The polar coordinate equation is
[0032]
[0033] In formula 2, x is the coordinate of the Cartesian plane in the x direction, y is the coordinate of the Cartesian plane in the y direction, r is the coordinate of the linear axis of the polar coordinate plane, and θ is the coordinate of the rotation axis of the polar coordinate plane.
[0034] Differentiating equation 2, we can get
[0035]
[0036]
[0037] In Formula 3, x' is the differential of x, y' is the differential of y, r' is the differential of r, and θ' is the differential of θ.
[0038] In formula 4, J is the Jacobian matrix.
[0039] The prior art document 1 uses the derivation used in calculating the limiting speed: θ / 2≈tan(θ / 2)=Li / 2 / r to obtain θ=Li / r. In this derivation process, θ / 2 and tan(θ / 2) are not completely equal, but approximately equal, so they are not accurate enough.
[0040] The limiting speed in this scheme is based on the definition, that is, the speed is equal to the differential of the position, without any approximate processing. It is an accurate model. In step 2 of this scheme, the differential equations of the linear axis and the rotation axis are established, and the Jacobian matrix J is obtained.
[0041] Step 3: Calculate the Cartesian plane limit speed: According to r' max ,θ' max and J to calculate the Cartesian plane limiting velocity V 合max .
[0042] Assume that the Cartesian plane limit total velocity is V 合 ,have:
[0043]
[0044] In formula 5, δ x is the distance in the x direction, δ yis the distance in the y direction.
[0045] According to formula 3, we can get:
[0046]
[0047] In formula 6, J -1 is the inverse matrix of the Jacobian matrix J.
[0048] The speed of the polar coordinate plane cannot exceed the limit speed of the polar coordinate plane, that is:
[0049]
[0050] In Formula 7, abs means absolute value, and <= means less than or equal to.
[0051] Substituting equation 5 and equation 6 into equation 7, we can get:
[0052]
[0053] According to formula 8, V 合 The maximum value V 合max , which is the limiting velocity of the Cartesian plane. Among them, the right side of formula 8 r' max ,θ' max The calculation result in formula 1 is used.
[0054] Step 4: Calculate the polar coordinate plane limit acceleration: Calculate the polar coordinate plane limit acceleration A(r,θ) based on the system parameters of the CNC system. max , including the limiting acceleration r" of the linear axis max and the limiting acceleration of the rotation axis θ" max .
[0055] Check the CNC system parameter table to know the linear axis acceleration and deceleration time constant T r And the rotation axis acceleration and deceleration time constant T θ The meaning of these two parameters is the time required to accelerate from 0 to 10 m / min, in ms, which is converted into the international unit m / s 2 , the limiting acceleration in the polar coordinate plane can be calculated:
[0056]
[0057] Step 5. Calculate the Hessian matrix and bias matrix: Calculate the Hessian matrix H and bias matrix B of the polar coordinate equation.
[0058] Differentiate equation 3 to get
[0059]
[0060]
[0061] In formula 10, x" is the differential of x', y" is the differential of y', r" is the differential of r', and θ" is the differential of θ'.
[0062] In formula (11), H is the Hessian matrix and B is the bias matrix.
[0063] Step 6: Calculate the Cartesian plane limit acceleration: According to r" max ,θ” max , H and B to calculate the Cartesian plane limit acceleration A 合max .
[0064] Let the Cartesian plane limit total acceleration be A 合 ,have:
[0065]
[0066] According to formula 10, we can get:
[0067]
[0068] In formula 13, H -1 is the inverse matrix of the Hessian matrix H.
[0069] The acceleration of the polar coordinate plane cannot exceed the limiting acceleration of the polar coordinate plane, that is:
[0070]
[0071] Substituting equation 12 and equation 13 into equation 14, we can get:
[0072]
[0073] According to formula 15, we can solve A 合 The maximum value A 合max , which is the limiting acceleration on the Cartesian plane. Among them, the right side of the inequality in formula 15 is r” max and θ” max The calculation result in formula 9 is used.
[0074] Step 7: Speed curve planning: The CNC system is based on the limit speed A 合max and the limiting acceleration V 合max Carry out speed curve planning.
[0075] Based on the limit speed obtained in step three and the limit acceleration obtained in step six, speed curve planning is performed. The speed curve planning here can be linear acceleration and deceleration planning, exponential acceleration and deceleration planning, or S-shaped acceleration and deceleration planning. Linear acceleration and deceleration planning is introduced here, and other planning methods are similar.
[0076] See also Figure 2 , which is a method for linear acceleration and deceleration planning, comprising the following steps:
[0077] Step A: Calculate whether the current speed is greater than the limit speed. If the current speed is greater than the limit speed, define the next speed as: current speed - limit acceleration * interpolation period; if the current speed is not greater than the limit speed, define the next speed as: current speed + limit acceleration * interpolation period;
[0078] Step B: According to the calculation result of the current speed in step A, when the current speed is greater than the limit speed, calculate whether the next speed is less than 0. If it is less than 0, define the next speed as: next speed = 0, and then proceed to the next step; if it is not less than 0, proceed directly to the next step;
[0079] Step C: According to the calculation result of the current speed in step A, when the current speed is not greater than the limit speed, calculate whether the next speed is greater than the limit speed. If it is greater than the limit speed, define the next speed as: next speed = limit speed, and then proceed to the next step; if it is not greater than the limit speed, directly proceed to the next step;
[0080] Step D: Continue running according to the next speed obtained in steps B and C, and determine whether there is any remaining distance in the CNC system. If there is any remaining distance, return to step A; if there is no remaining distance, reduce the speed and stop running.
[0081] Compared with the prior art, the constraint coefficient and transition coefficient in the document 1 are numbers between 0 and 1, such as 0.7, 0.8, 0.9, etc. The specific value needs to be analyzed in specific situations, which is relatively blind and the data is not clear enough to know what the value should be. However, all parameters in this solution are clear and real, and they are clear and unambiguous in use.
[0082] Embodiment 1, a polar coordinate interpolation method for a numerical control system, the whole process is explained below with reference to a specific example.
[0083] CNC system parameters:
[0084] Linear axis speed limit: 30000mm / min
[0085] Rotation axis speed limit: 25000mm / min
[0086] Linear axis acceleration and deceleration time constant: 150ms
[0087] Rotation axis acceleration and deceleration time constant: 200ms
[0088] Interpolation cycle: 4ms
[0089] CNC system G code:
[0090] …
[0091] G0 X100 C0
[0092] G12.1
[0093] G1 C50 F30000
[0094] G13.1
[0095] …
[0096] Step 1: Calculate the limiting speed in the polar coordinate plane
[0097] Linear axis speed upper limit Vr max =30000mm / min
[0098] Rotation axis speed upper limit Vθ max =25000mm / min
[0099] According to formula 1, we can get
[0100] Linear axis limit speed r' max =0.5m / s
[0101] Rotation axis limit speed θ' max =0.417m / s
[0102] Step 2: Calculate the Jacobian matrix
[0103] From the G code, we can know
[0104] Polar coordinate plane linear axis coordinate r = 100mm = 0.1m
[0105] Polar coordinate plane rotation axis coordinate θ=0°
[0106] According to formula 4, we can get
[0107]
[0108] Step 3: Calculate the Cartesian plane limiting speed
[0109] Inverse Jacobian matrix
[0110]
[0111] From the G code, we can know
[0112] The distance δ in the x direction x =0m
[0113] The distance in the y direction δ y=50mm=0.05m
[0114] According to formula 8, V 合max =0.0417m / s
[0115] Step 4: Calculate the polar coordinate plane acceleration
[0116] Linear axis acceleration and deceleration time constant T r =150ms
[0117] Rotation axis acceleration and deceleration time constant T θ =200ms
[0118] According to formula 9, we can get
[0119] Linear axis limit acceleration r" = 1.111m / s 2
[0120] Rotation axis limit acceleration θ" = 0.833 m / s
[0121] Step 5: Calculate the Hessian matrix and bias matrix
[0122] The current speed is 0, that is, r'=0θ'=0
[0123] According to formula 11, we can get
[0124]
[0125] Step 6: Calculate the Cartesian plane limiting acceleration
[0126] Inverse Hessian Matrix
[0127]
[0128] According to formula 8, we can get A 合max =0.0833m / s
[0129] Step 7: Speed curve planning
[0130] Current speed = 0m / s
[0131] Interpolation cycle = 4ms = 0.004s
[0132] according to Figure 2 The planning method in can be used to obtain the next speed = 0.0003332m / s
[0133] Repeat steps 1-7 above until the entire segment is planned. The final speed curve is as follows: Figure 3 In the present invention section, for the sake of comparison, the speed curve planning results of the prior art are also listed in Figure 3The horizontal axis in the figure is time, the unit is s, and the vertical axis is speed, the unit is m / s. Figure 3 It can be seen that, compared with the prior art, the limit speed and limit acceleration in the planning process of the present invention are greater, the overall planning time is shorter, and the processing efficiency is better.
[0134] In summary, starting from the basic model of polar coordinates, the present invention derives the calculation method of the limit speed and limit acceleration in Cartesian space based on the Jacobian matrix and the Hessian matrix. The limit speed and limit acceleration are fully considered when planning the speed curve, thereby ensuring the smoothness of the CNC system in the entire machining process while shortening the machining time and improving the machining efficiency.
[0135] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A polar coordinate interpolation method for a numerical control system, characterized in that: The following methods are included: Step 1: Calculate the limit speed V(r,θ) of the polar coordinate plane based on the system parameters of the CNC system max , including the limiting speed r' of the linear axis max and the limiting speed θ' of the rotating axis max ; Calculate the limiting velocity in the polar coordinate plane: Step 2: Calculate the Jacobian matrix J of the polar coordinate equation; The polar coordinate equation is In formula 2, x is the coordinate of the Cartesian plane in the x direction, y is the coordinate of the Cartesian plane in the y direction, r is the coordinate of the linear axis of the polar coordinate plane, and θ is the coordinate of the rotation axis of the polar coordinate plane; Differentiate equation 2 and get In formula 3, x' is the differential of x, y' is the differential of y, r' is the differential of r, and θ' is the differential of θ; In formula 4, J is the Jacobian matrix; Step 3: According to r' max ,θ' max and J to calculate the Cartesian plane limiting velocity V 合max ; Assume that the Cartesian plane limit total velocity is V 合 ,have: In formula 5, δ x is the distance in the x direction, δ y is the distance in the y direction; According to formula 3, we can get: In formula 6, J -1 is the inverse matrix of the Jacobian matrix J; The speed of the polar coordinate plane does not exceed the limiting speed of the polar coordinate plane, that is: In formula 7, abs means absolute value, and <= means less than or equal to; Substituting equation 5 and equation 6 into equation 7, we can get: According to equation 8, V 合 The maximum value V 合max , which is the limiting velocity in the Cartesian plane; Step 4: Calculate the limit acceleration A(r,θ) of the polar coordinate plane based on the system parameters of the CNC system max , including the limiting acceleration r" of the linear axis max and the limiting acceleration of the rotation axis θ" max ; Calculate the limiting acceleration in the polar plane: Step 5: Calculate the Hessian matrix H and bias matrix B of the polar coordinate equation; Differentiate equation 3 to get In formula 10, x" is the differential of x', y" is the differential of y', r" is the differential of r', and θ" is the differential of θ'; In formula (11), H is the Hessian matrix and B is the bias matrix; Step 6: According to r” max ,θ” max , H and B to calculate the Cartesian plane limit acceleration A 合max ; Let the Cartesian plane limit total acceleration be A 合 ,have: According to formula 10, we can get: In formula 13, H -1 is the inverse matrix of the Hessian matrix H; The acceleration of the polar coordinate plane does not exceed the limiting acceleration of the polar coordinate plane, that is: Substituting equation 12 and equation 13 into equation 14, we can get: According to formula 15, we can solve A 合 The maximum value A 合max , which is the limiting acceleration in the Cartesian plane; Step 7: CNC system based on limit speed V 合max and the limit acceleration A 合max Carry out speed curve planning.
2. A polar coordinate interpolation method for a numerical control system according to claim 1, characterized in that: In step seven, the speed curve is planned as any one of a linear acceleration / deceleration plan, an exponential acceleration / deceleration plan, and an S-shaped acceleration / deceleration plan.
3. A polar coordinate interpolation method for a numerical control system according to claim 2, characterized in that: The linear acceleration and deceleration planning method comprises the following steps: Step A: Calculate whether the current speed is greater than the limit speed. If the current speed is greater than the limit speed, define the next speed as: current speed - limit acceleration * interpolation period; if the current speed is not greater than the limit speed, define the next speed as: current speed + limit acceleration * interpolation period; Step B: According to the calculation result of the current speed in step A, when the current speed is greater than the limit speed, calculate whether the next speed is less than 0. If it is less than 0, define the next speed as: next speed = 0, and then proceed to the next step; if it is not less than 0, proceed directly to the next step; Step C: According to the calculation result of the current speed in step A, when the current speed is not greater than the limit speed, calculate whether the next speed is greater than the limit speed. If it is greater than the limit speed, define the next speed as: next speed = limit speed, and then proceed to the next step; if it is not greater than the limit speed, directly proceed to the next step; Step D: Continue running according to the next speed obtained in steps B and C, and determine whether there is any remaining distance in the CNC system. If there is any remaining distance, return to step A; if there is no remaining distance, reduce the speed and stop running.
