Speed planning method, system and computer device
By detecting abrupt changes in curve regions and imposing target velocity constraints in a coordinate measuring machine, and then segmenting the velocity curve, the problem of sudden changes in probe motion velocity in traditional methods is solved, thus achieving smooth probe motion and high-precision measurement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHOTEST TECH INC
- Filing Date
- 2026-03-30
- Publication Date
- 2026-08-04
AI Technical Summary
When dealing with geometrically abrupt regions of complex workpieces, existing coordinate measuring machines (CMMs) suffer from sudden changes in probe speed due to traditional speed planning algorithms, which causes system jitter and reduces measurement accuracy.
By generating a sequence of measurement points, obtaining the trajectory parameter equation, detecting abrupt change regions in the curve, determining the upper limit of the target velocity by combining the radius of curvature and the upper limit of centripetal acceleration, planning the velocity curve in segments, and applying standard constraint conditions to constrain the velocity of the motion segments to generate a smooth velocity curve.
It effectively suppresses drastic changes in probe speed, ensures smooth movement of the probe along the working trajectory, and improves measurement accuracy and stability.
Smart Images

Figure CN121934635B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of workpiece measurement technology, and in particular to a speed planning method, system and computer device. Background Technology
[0002] In the field of modern precision manufacturing, the coordinate measuring machine (CMM) is a core device for evaluating workpiece dimensions and geometric tolerances. Its measurement accuracy and efficiency directly affect product quality control. Currently, the measurement of complex workpieces is usually based on a theoretical CAD model, which is discretized into a series of dense measurement points, and the scanning trajectory of the probe is planned accordingly.
[0003] However, in actual trajectory planning, existing methods have significant technical limitations when dealing with geometrically abrupt regions on the workpiece surface (such as corners and groove boundaries). Specifically, traditional velocity planning algorithms employ strategies with weak foresight. Often, when entering abrupt regions, to avoid risks such as collisions, the system forces the drive mechanism to decelerate drastically; after passing through the region, it then rapidly accelerates to the set speed. Such sudden changes in motion speed easily cause system jitter, disrupting the stability of probe sampling and reducing the measurement accuracy in that region. Summary of the Invention
[0004] Therefore, it is necessary to provide a speed planning method, system, and computer equipment that can plan a smooth speed curve to reduce the risk of probe vibration and ensure high-precision measurement, in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a speed planning method applied to a coordinate measuring machine (CMM). The CMM includes a measuring machine with a probe and a motion control device. The motion control device is used for planning and coordinating the work trajectory of the measuring machine. The probe measures a workpiece along a set work trajectory. The speed planning method includes: generating a discrete sequence of measurement points for the workpiece; obtaining a trajectory parameter equation representing the work trajectory based on the measurement point sequence; determining curve abrupt change regions in the work trajectory according to the trajectory parameter equation and a preset constraint window and abrupt change threshold; and targeting the... A target velocity constraint is applied to the curve abrupt change region. The target velocity constraint is determined by combining the radius of curvature of the corresponding curve abrupt change region with a preset centripetal acceleration upper limit. Based on the location of the curve abrupt change region and the trajectory parameter equation, the operation trajectory is segmented to obtain multiple motion segments. A velocity constraint is applied to each motion segment based on standard constraint conditions to determine the velocity limit value of each motion segment. Based on the positions of all motion segments and the velocity limit values, as well as the positions of all curve abrupt change regions and the target velocity upper limit, the velocity curve corresponding to the operation trajectory is planned and obtained.
[0006] In one embodiment, the constraint window continuously samples along the work trajectory with a sampling width of a sampling step size, and calculates the slope change of the work trajectory within each sampling range; determining the curve abrupt change region in the work trajectory based on the trajectory parameter equation and the preset constraint window and abrupt change threshold includes: comparing the slope change and the abrupt change threshold to determine whether the work trajectory within the corresponding sampling range is the curve abrupt change region, until the sampled range covers the entire work trajectory.
[0007] In one embodiment, when obtaining the target speed limit, the slope change or curvature change in the curve abrupt change region is used as an influencing factor in the calculation.
[0008] In one embodiment, the standard constraints include one or more of the desired measurement velocity constraint, bow height error constraint, and desired acceleration constraint; the minimum upper limit of the velocity obtained from the standard constraints is used as the velocity limit value of the corresponding motion segment.
[0009] In one embodiment, the jerk corresponding to the velocity curve is continuous.
[0010] In one embodiment, if the surface of the workpiece to be tested has sharp corners, the sharp corners are replaced with arcs or splines when planning the work trajectory.
[0011] Secondly, this application also provides a speed planning system applied to a coordinate measuring machine (CMM). The CMM includes a measuring machine with a probe and a motion control device. The motion control device is used for planning and coordinating the work trajectory of the measuring machine. The probe measures the workpiece to be measured along a set work trajectory. The speed planning system is located on the motion control device and includes: a sequence generation unit for generating a discrete sequence of measurement points of the workpiece to be measured; an equation establishment unit for obtaining a trajectory parameter equation representing the work trajectory based on the measurement point sequence; and a curve detection unit for determining the work trajectory based on the trajectory parameter equation and a preset constraint window and a sudden change threshold. The trajectory includes abrupt curve change regions; the operation trajectory is segmented into multiple motion segments based on the position of the abrupt curve change regions and the trajectory parameter equation; a speed constraint unit is configured to apply target speed constraints to the abrupt curve change regions, wherein the target speed constraint is determined by combining the radius of curvature and a preset centripetal acceleration upper limit to determine the target speed upper limit of the corresponding abrupt curve change region; and to apply speed constraints to each of the motion segments based on standard constraint conditions to determine the speed limit value of each of the motion segments; a speed planning unit is configured to plan and obtain the speed curve corresponding to the operation trajectory based on the position of all the motion segments and the speed limit value, and the position of all the abrupt curve change regions and the target speed upper limit.
[0012] In one embodiment, an interpolation unit is further included, which is used to obtain real-time interpolation points based on the velocity curve and the trajectory parameter equation.
[0013] In one embodiment, a drive unit is further included, which generates a drive signal based on the real-time interpolation point and sends it to the measuring machine to control the probe to measure the workpiece along the working trajectory.
[0014] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the speed planning steps in any of the above embodiments.
[0015] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the speed planning steps in any of the above embodiments.
[0016] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the speed planning steps in any of the above embodiments.
[0017] The aforementioned speed planning method, system, and computer equipment first detect abrupt curve changes in the work trajectory and impose target speed constraints on these regions, calculating the upper limit of the target speed for each abrupt change. Then, based on these abrupt change regions, the work trajectory is divided into multiple motion segments. Speed constraints are applied to each motion segment based on standard constraints, determining the speed limit value for each segment. Finally, global planning is performed based on the speed limits of each motion segment and each abrupt change region in the work trajectory to obtain a smooth speed curve. In this approach, early detection of abrupt changes in the work trajectory and imposition of speed constraints, combined with speed planning based on the speed limits of the motion segments, effectively suppresses abrupt speed changes, enabling smooth probe movement along the work trajectory, ensuring the stability of probe sampling, and improving measurement accuracy. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a diagram illustrating the application environment of a coordinate measuring machine in one embodiment;
[0020] Figure 2 This is a flowchart illustrating the speed planning method in one embodiment;
[0021] Figure 3 This is a schematic diagram illustrating the generation of measurement points based on a measurement path on the workpiece under test in one embodiment.
[0022] Figure 4 This is a schematic diagram of the process for detecting abrupt curve changes in a work trajectory in one embodiment;
[0023] Figure 5 Here is a block diagram of a speed planning system in one embodiment;
[0024] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0026] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various data, but these data are not limited by these terms. These terms are only used to distinguish the first data from the second data. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more.
[0027] The speed planning method provided in this application embodiment can be applied to, for example, Figure 1 The application environment is shown. The coordinate measuring machine (CMM) includes a measuring machine 120 and a motion control device 110. The motion control device 110 is used for planning and coordinating the work trajectory of the measuring machine 120, including planning the movement position and speed of each movement position. The measuring machine 120 includes a multi-axis drive structure and a probe. The multi-axis drive structure, controlled by the motion control device 110, controls the probe through axis movement. The probe can measure the workpiece along a set work trajectory. Optionally, the motion control device 110 includes a host computer 112 and a motion controller 114. When using the host computer 112, the motion controller 114 can control the corresponding measuring machine 120, and the measuring machine 120 can then control the probe for measurement. The host computer 112 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and IoT devices. IoT devices can include smart TVs, smart vehicle devices, projection devices, etc.
[0028] For example, the coordinate measuring machine includes a computer (i.e., a host computer 112), a motion controller 114, and a measuring machine 120. The host computer 112 has built-in measurement software, responsible for configuring the measurement program and evaluating the measurement results. The host computer 112 is connected to the motion controller 114 for information transmission. The motion controller 114 coordinates and controls the motor-driven measuring machine 120 based on the measurement program, causing it to perform motion measurement according to the expected working trajectory and feeding back measurement signals to obtain measurement data. The measuring machine 120 includes a probe, a multi-axis drive structure, and a marble working platform. The multi-axis drive structure includes mutually perpendicular X-axis drive structures, Y-axis drive structures, and Z-axis drive structures, which respectively control the relative movement of the probe and the marble platform in the X, Y, and Z directions. During the measurement process, the workpiece is placed on the marble working platform, and the probe is controlled to move according to the expected working trajectory and contact the workpiece to perform measurement. The position of the contact point when the probe contacts the workpiece is recorded to obtain measurement data.
[0029] In one exemplary embodiment, such as Figure 2 As shown, a speed planning method is provided, which is applied to... Figure 1Taking a coordinate measuring machine (CMM) as an example, the speed planning method can be executed within the motion control device 110 of the CMM, including the following steps 10 to 70. Wherein:
[0030] Step 10: Generate a discrete sequence of measurement points for the workpiece to be tested.
[0031] In some embodiments, a measurement location is selected on the digital model of the workpiece to be measured to define a measurement path, and several discrete measurement points are generated based on the measurement path. This measurement path corresponds to the working trajectory of the probe. Specifically, during the editing of the measurement program in the measurement software, a feature extraction tool (such as a curve feature tool) can be selected to select a contour line on the digital model loaded in the measurement software to define a measurement path, and several points are selected as measurement points within this measurement path; these measurement points may be evenly distributed or planned according to geometric features: for example, densely distributed points at boundaries or in areas with high curvature, and sparsely distributed points in flat areas. For example, see Figure 3 The sequence of measurement points generated by the curve measurement route contains n+1 measurement points, such as multiple measurement points M0, M1, ..., M n This allows us to determine the spatial coordinates of each measurement point. A measurement point can be represented as:
[0032] , of which M i Let X represent the (i+1)th measurement point. i Y i Z i Let be the spatial coordinates of the (i+1)th measurement point.
[0033] Step 20: Obtain the trajectory parameter equation C(u) representing the probe's working trajectory based on the measurement point sequence.
[0034] In some embodiments, a discrete sequence of measurement points is converted into a trajectory parametric equation using spline curve interpolation. In this case, the discrete sequence of measurement points is transformed into a smooth parametric curve (or curve) to represent the probe's operational trajectory. Specifically, the trajectory parametric equation C(u) describes how the position of each point on the curve of the operational trajectory changes with the parameter u. Multiple measurement points M0, M1, ..., M... n For discrete samples, the trajectory parametric equation C(u) is a continuous function satisfying: C(u) i )=M i ,i=0,1,…,n; where u i It is the curve node parameter corresponding to the (i+1)th measurement point.
[0035] Alternatively, spline interpolation methods can include cubic spline interpolation, B-splines, or NURBS (Non-Uniform Rational B-Splines), with NURBS being used as an example below. Of course, besides spline interpolation, other methods can also be used to convert discrete measurement points into trajectory equations that describe the operational trajectory, without excessive restrictions.
[0036] Optionally, NURBS curves are used to represent the operation trajectory; the trajectory parametric equation C(u) is expressed as:
[0037] ;
[0038] Where C(u): represents the curve position at the curve node parameter u; u: curve node parameter (or curve parameter, parameter), usually in the range [0,1]; P i : The coordinates (X) of the (i+1)th control point i Y i Z i n+1: represents the number of control points, denoted as P0, P1, ..., P n-1 P n W i : The weight of the (i+1)th control point, which is either defaulted to 1 or calculated according to mathematical rules when inverting the curve; N i,p (u): p-th B-spline basis function, which defines the value of the (i+1)th basis function at the curve parameter u.
[0039] Specifically, the process of obtaining the trajectory parametric equation C(u) may include:
[0040] Control points are calculated based on the acquired sequence of measurement points. A control point (Pi in the NURBS curve equation) is a spatial point used to define the shape of the curve. The spline curve defined by the control points can accurately pass through the known measurement points. Using measurement points to inversely calculate control points is a known method and is not subject to excessive restrictions. The calculation process for control points can be executed in the motion controller 114 or the host computer 112.
[0041] The curve node parameter u is calculated based on the sequence of measurement points. Specifically, the curve node parameter u is obtained based on curve information (i.e., measurement points and control points) and using the chord length parameter method; the curve node parameter u refers to the normalized parameter value assigned to each measurement point using the chord length parameter method. For example:
[0042] ;
[0043] Among them, u i This refers to the curve node parameters corresponding to the (i+1)th measurement point. kThis is the (k+1)th control point. The calculation process of the curve node parameter u can be performed in the motion controller 114 or the host computer 112.
[0044] The trajectory parameter equation C(u) is established based on the curve node parameters and control points. The process of establishing the trajectory parameter equation C(u) can be executed in the motion controller 114 or the host computer 112. For example, the calculation of control points can be performed in the host computer 112; the motion controller 114 can receive curve information (such as measurement point sequence and control points) transmitted by the host computer 112 to obtain the trajectory parameter equation C(u).
[0045] In some embodiments, if the surface of the workpiece to be measured has sharp corners, these sharp corners are replaced with arcs or splines when planning the work trajectory. Specifically, when planning the work trajectory, the measurement path along the surface contour of the workpiece digital model is often composed of discrete straight line segments and / or arc segments. When two line segments are connected at a certain angle, the connection point often forms a sharp corner. This solution replaces the sharp corners in the measurement path with arcs or splines when planning the work trajectory (such as when establishing trajectory parameters), making the trajectory curvature continuous and forming a smooth parametric curve, thereby facilitating gradual speed changes during subsequent planning.
[0046] Step 30: Determine the curve abrupt change regions in the operation trajectory based on the trajectory parameter equation and the preset constraint window.
[0047] In some embodiments, a constraint window is set to sample the curve containing the work trajectory to obtain sampled data, which is used to detect abrupt curve changes on the work trajectory. Specifically, the constraint window continuously samples along the work trajectory with a sampling width of a sampling step size Δu, and calculates the sampled data for each sampling range. Specifically, the constraint window is a sliding window with a sampling width of a sampling step size Δu. This window is used to continuously and without intervals sample the curve within the parameter domain u∈[0,1] defined by the trajectory parametric equation with the same step size Δu. Sampling obtains the slope change of the curve within each window (i.e., sampled data). In this case, the sampled range of the constraint window can cover the entire work trajectory, thereby enabling sampling and detection of the entire curve and facilitating the selection of all curve abrupt change regions that meet the conditions.
[0048] In some embodiments, a mutation threshold is used to determine whether the work trajectory within the constraint window is a curve mutation region. Specifically, sampled data is compared with a preset mutation threshold to determine whether the work trajectory within the corresponding sampling range is a curve mutation region. If it is a curve mutation region, the corresponding curve position can be recorded. For example, when the slope change within the sampling range exceeds the mutation threshold, the work trajectory within the sampling range can be determined to be a curve mutation region, and the curve node parameters corresponding to the sampling range can be recorded. In this case, early detection of mutation positions (i.e., curve mutation regions) in the work trajectory facilitates subsequent targeted speed constraints; thus, early perception planning allows the probe to decelerate smoothly and pass through mutation positions, improving the stability of system operation.
[0049] For example, see Figure 4 The specific process of using constraint windows to determine the regions of abrupt curve changes in the work trajectory is as follows:
[0050] Step 31: Set the constraint window.
[0051] Specifically, based on the parameter domain u∈[0,1] of the curve defined by the trajectory parametric equation, a fixed sampling step size Δu is set as the width of the constraint window. This constraint window is used for sampling over the parameter domain, and the curve position corresponding to this constraint window is (u... a u b ), where u b =u a +Δu; For example, the constraint window can start sampling from the curve's starting point u0, that is, when sampling initially u a =u0,u b =Δu; This allows for continuous sampling to detect the entire curve.
[0052] Step 32: Calculate the slope change within the current constraint window.
[0053] Specifically, the constraint window samples at the current position and calculates the change in slope of the curve within the current window range. At this point, the curve position corresponding to the constraint window is (u... a u b Then the corresponding slope change is ABS[B(u) b )-B(u a ]], where B(u) is the slope of the trajectory parameter curve C(u) at the curve node parameter u, that is, satisfying B(u)=C'(u), and ABS is the absolute value calculation.
[0054] Step 33: Compare the calculated slope change with the mutation threshold K, i.e., determine ABS[B(u b )-B(u a Is it greater than K?
[0055] Specifically, after the constraint window completes sampling at the current position, the calculated slope change ABS[B(u b )-B(u a If the current position is greater than the set mutation threshold K, it means that the current position is a curve mutation region, and step 34 can be executed; if the current position is not greater than the mutation threshold K, it means that the current position is not a curve mutation region, and step 35 can be executed.
[0056] Step 34: Record the curve position corresponding to the current constraint window.
[0057] Specifically, when a sudden change in curve is detected, the curve position corresponding to the current constraint window is adjusted, such as by adjusting the curve parameters (u) at this time. a u b Record the curve parameters recorded in this step. These parameters can be used to divide the work trajectory into several motion segments later.
[0058] Step 35: Determine whether the current constraint window is within the curve range, that is, determine the maximum parameter u corresponding to the constraint window. b Whether it is within the parameter domain, i.e., u b Is it less than 1?
[0059] Specifically, if the current constraint window is within the curve range, i.e., the maximum parameter u b If the value is less than 1, then proceed to step 36; otherwise, if the maximum parameter u corresponding to the constraint window is greater than 1, then proceed to step 36. b Reaching or exceeding the upper bound of the parameter domain (i.e., u) b If the result is ≥1), it means that the curve has been detected and the detection of the constraint window can be stopped. For example, you can proceed to step 40 or step 50.
[0060] Step 36: Constrain the window sliding step size Δu.
[0061] Specifically, after the constraint window completes sampling at the current position, it can slide to sample the next curve position. The constraint window can slide by the same step size Δu, and after sliding, return to step 32 to execute again, thereby achieving continuous sampling of the curve, ensuring the completeness of curve detection, and reducing the risk of missing parts. In this case, the curve parameters after the constraint window moves can be updated to: u a= u a +Δu;u b= u b +Δu. This enables the detection of the position of the next curve.
[0062] Repeat the above detection process until the stopping condition in step 35 is met.
[0063] Optionally, the sampling step size Δu can be set to 0.01 by default. Therefore, if sampling starts from the curve's starting point u0, 100 sampling ranges and their corresponding sampling data can be determined within the parameter u∈[0,1]. However, this is not the only limitation. The value of Δu can be matched with the curve's arc length and the abrupt change threshold. For example, if the curve's arc length is large, Δu can be appropriately reduced to suppress the problem of a single sampling range having an excessively large span on the curve, reducing the risk of missing abrupt change regions. If the abrupt change threshold is small, the sensitivity for judging abrupt change regions is high, and Δu can be appropriately increased to improve detection efficiency.
[0064] Alternatively, Δu can be set based on the minimum feature size on the working trajectory. For example, if the minimum radius of curvature is R... min Then the arc length corresponding to Δu can be taken as R. min / 10, then work backwards to determine the parameter size.
[0065] Optionally, the curve abrupt change region detection process in this step can be performed in the motion controller 114.
[0066] Step 40: Apply target speed constraints to the curve abrupt change regions to determine the upper limit of the target speed for the corresponding curve abrupt change regions.
[0067] In some embodiments, a target velocity constraint is applied based on the detected curve abrupt change region. This target velocity constraint may include a centripetal acceleration constraint, whereby the centripetal acceleration constraint determines the target velocity upper limit for the curve abrupt change region by combining the radius of curvature of the corresponding curve abrupt change region with a preset centripetal acceleration upper limit. The target velocity upper limit may refer to the upper limit of instantaneous velocity allowed in the curve abrupt change region when the probe moves along the curve of the working trajectory. Optionally, the target velocity upper limit V obtained through the centripetal acceleration constraint... x (u) satisfies:
[0068] ;
[0069] Among them, A x,max ρ represents the upper limit of centripetal acceleration, which is determined based on the probe's mechanical model and user experience; ρ is the radius of curvature at the current position (here referring to the location of the curve abrupt change region), which can be determined based on the trajectory parametric equation C(u) and the curve node parameters corresponding to the curve abrupt change region, satisfying:
[0070] ;
[0071] In this scenario, for abrupt changes in the work trajectory, the target velocity constraint directly determines the maximum allowable speed at those locations. Combined with the upper limit of acceleration, the starting point for deceleration before entering the abrupt change can be determined. This effectively suppresses rapid velocity changes, enabling smooth probe movement along the work trajectory, ensuring probe sampling stability, and improving measurement accuracy.
[0072] Optionally, a target point in the region of abrupt change in the curve is selected to calculate the upper limit of the target velocity V in that region under the centripetal acceleration constraint. x (u), for example, selecting the starting position, ending position, middle position, or the position with the largest slope change in the curve abrupt change region.
[0073] Alternatively, multiple points can be sampled in the region of abrupt change in the curve, and the upper limit of velocity at each point under the centripetal acceleration constraint can be calculated. This result is used to plot the velocity change curve, thereby obtaining the allowed velocity limits at different locations in the region of abrupt change in the curve, which can then be used as the target upper limit of velocity V. x (u). In other words, the upper limit of the target speed V x (u) represents a velocity variation curve. Alternatively, the minimum upper velocity value within this curve can be chosen as the target upper velocity V for the entire abrupt change region of the curve. x (u).
[0074] In some embodiments, the target velocity upper limit V is obtained based on centripetal acceleration constraints. x When (u), the curve fluctuation in the abrupt change region is used as an influencing factor in the calculation. The curve fluctuation in the abrupt change region can be the change in slope or curvature of the curve within that region. In other words, the target velocity upper limit V... x The value of (u) can vary depending on the curve fluctuations. If the curve fluctuations are large, the value should be appropriately reduced based on the calculation in formula (2) so that the reduced value can be used as the upper limit of the target speed allowed at that position. In this case, the speed planning in the curve abrupt change area can be further optimized, making it more suitable for the planned work trajectory, reducing the risks of impact and collision, and making the movement smoother.
[0075] In some embodiments, the target velocity constraint may further include one or more of the desired measured velocity constraint, bow height error constraint, and desired acceleration constraint, as described later. The minimum allowed upper limit value is selected from different constraint conditions as the safe movement velocity at the abrupt change position (i.e., the smallest value among the velocity constraints obtained from multiple constraint conditions is selected as the target velocity upper limit V). x (u)).
[0076] Optionally, the speed constraint process in the curve abrupt change region in this step can be performed in the motion controller 114.
[0077] Step 50: The operation trajectory is segmented based on the location of the curve abrupt change region to obtain multiple motion segments.
[0078] In some embodiments, the work trajectory is segmented based on the location of the curve abrupt change region and the trajectory parameter equation to obtain multiple motion segments. Specifically, based on the curve describing the work trajectory defined by the trajectory parameter equation, the recorded positions of the curve abrupt change regions on the curve are used as segmentation nodes to divide the curve containing the work trajectory, forming multiple motion segments that do not cover the curve abrupt change regions. For example, the recorded positions of the curve abrupt change regions are the corresponding curve node parameter intervals (u... k -Δu,u k Based on the interval of the curve node parameters, the curve domain u∈[0,1] is divided into two discrete segments (0,u) and (u,u). k -Δu), (u) k 1) As a motion segment, if there are other curve abrupt change regions, they are also used as segmentation nodes to continue processing (0, u). k -Δu) or (u k 1) Divide the data; ultimately forming multiple discrete motion segments that do not cover the abrupt change regions of the curve.
[0079] Optionally, the motion segmentation process in this step can be performed in the motion controller 114.
[0080] Step 60: Apply speed constraints to each motion segment to determine the speed limit value for each motion segment.
[0081] In some embodiments, constraints are imposed on each motion segment based on standard constraints to determine the speed limit value for each motion segment. The speed limit value may refer to the upper limit of instantaneous speed allowed at the location of the motion segment when the probe moves along the curve of the working trajectory. Optionally, the motion controller 114 analyzes each motion segment and calculates the speed limit value under all standard constraints.
[0082] Optionally, the standard constraints may include one or more of the following: desired measurement velocity constraint, bow height error constraint, and desired acceleration constraint, for example:
[0083] The desired measurement speed constraint refers to the upper limit V1 (also known as the first speed limit) of the measurement speed input by the user based on process requirements (such as the characteristics of the workpiece being measured and the type of probe) and desired measurement efficiency.
[0084] Bow height error constraint refers to: combining the interpolation period T set during subsequent interpolation and the preset bow height error limit value H. max And the second velocity upper limit V2 calculated from the radius of curvature at the location. Wherein, the bow height error limit value H...max This refers to the process instruction value input by the user to the system based on workpiece tolerance and efficiency requirements. In this case, the bow height error constraint controls the measurement speed to ensure that the deviation between the actual linear motion segment and the planned curve generated between adjacent interpolation points during subsequent interpolation measurements does not exceed the allowable bow height error limit value H. max To ensure measurement accuracy.
[0085] For example, the second speed limit V2 satisfies:
[0086] ;
[0087] Where ρ is the radius of curvature of the current position (here referring to the position of the current motion segment).
[0088] It is understandable that the curvature change within each motion segment is relatively small, so the radius of curvature at any point within the motion segment can be used as the radius of curvature of that motion segment.
[0089] Alternatively, multiple points can be sampled to calculate the upper speed limit for each point under the bow height error constraint, and a speed change curve can be plotted to obtain the allowed speed limit at different positions on the motion segment, which can then be used as the second upper speed limit V2. In other words, the second upper speed limit V2 is a speed change curve; of course, the minimum upper speed limit can also be selected as the second upper speed limit V2 for the motion segment.
[0090] The desired acceleration constraint refers to the maximum acceleration Amax and / or maximum deceleration Amin input by the user based on process requirements (such as the characteristics of the workpiece being measured and the type of probe) and desired measurement efficiency. This, combined with the curve length L of each motion segment, determines the upper limit of the third velocity V3 at the current location.
[0091] The curve length L of each motion segment can be determined based on the curve arc length S(i) and the position of the motion segment within the curve. The curve arc length S(i) represents the curve node parameter u. i The arc length traversed along curve C(u) relative to the starting point u0 satisfies:
[0092] ;
[0093] Based on the position of the segment nodes, the start and end positions of each motion segment can be determined, thereby determining the curve length L of each motion segment. For example, a motion segment is (u... n u m The curve length L = S(m) - S(n), where m represents the termination point of the current motion segment and the corresponding curve node parameter is u. m ; n represents the starting point of the current motion segment and the corresponding curve node parameter is u.n .
[0094] In some embodiments, the minimum value of the calculated upper speed limit under all constraints in the standard constraints is taken as the safe motion speed (i.e., the speed limit value) for each motion segment, thereby obtaining the speed limit for each motion segment. For example, the standard constraints include the desired measured speed constraint, the bow height error constraint, and the desired acceleration constraint. The minimum value among the first upper speed limit V1, the second upper speed limit V2, and the third upper speed limit V3 is selected as the allowed speed limit value for that motion segment. If the second upper speed limit V2 is a speed variation curve, the speed limit at positions where it is greater than the first upper speed limit V1 and the third upper speed limit V3 can be replaced with the minimum value among the first upper speed limit V1 and the third upper speed limit V3, while the speed limits at other positions remain unchanged. In this case, the speed limit value for that motion segment is also a speed variation curve, which can determine the speed limit at different positions on the motion segment.
[0095] Step 70: Based on the speed limits at each position on the work trajectory, plan and obtain the speed curve corresponding to the work trajectory.
[0096] In some embodiments, the velocity curve corresponding to the probe's working trajectory is planned based on the position and velocity limits of all motion segments and the position and target velocity limit of all curve abrupt change regions.
[0097] Specifically, the motion segments and curve abrupt change regions are collectively referred to as the segmented regions of the work trajectory. Based on the speed limits of each segmented region, speed planning is carried out (such as S-curve planning of speed changes). During planning, the position of each segmented region is used as the boundary condition, and the maximum acceleration Amax and maximum deceleration Amin of the equipment are used as constraints to generate a smooth speed curve V(t) with continuous acceleration and covering the entire process.
[0098] Within each segmented region, the velocity limits based on the starting and ending points are planned using an S-curve acceleration / deceleration algorithm (such as a five-segment or seven-segment S-curve planning from high-speed to low-speed, or from low-speed to high-speed). Since the velocity limits at the boundary positions of each segmented region are known, it is necessary to ensure that the acceleration and jerk within each segment do not exceed the limits. Furthermore, to ensure the continuity of the velocity at the segment nodes, local transition processing is required near the segment nodes (such as using fifth-order polynomial interpolation). Deceleration needs to begin at a sufficiently far point before entering the abrupt change region of the curve to ensure continuous jerk. This generates a smooth velocity curve V(t) with continuous jerk covering the entire trajectory. When the probe measures along the working trajectory using this velocity curve V(t), it can effectively suppress abrupt velocity changes, achieving smooth probe movement along the working trajectory, ensuring the stability of probe sampling, and improving measurement accuracy.
[0099] After acquiring the velocity curve V(t), the motion control device 110 continues to plan the work trajectory. This requires real-time interpolation calculations to obtain real-time interpolation points. The probe moves along these interpolation points and samples the data to achieve the theoretically planned work trajectory measurement. Specifically, the coordinates of the real-time interpolation points are obtained based on the velocity curve and the trajectory parameter equation. For example, the interpolation curve parameters can be obtained using a nodal prediction method, and the spatial coordinates of the interpolation curve parameters can be confirmed using the trajectory parameter equation. In this case, the current motion state is determined based on the velocity curve to actively predict the next interpolation point, thereby achieving smooth, accurate, and continuous trajectory measurement that conforms to the theoretical work trajectory.
[0100] Optionally, the calculation of the interpolation point can be repeated once in each interpolation cycle T. The interpolation cycle T can be determined by the system performance. That is, within each interpolation cycle T, the target position to be reached in the current cycle is calculated in real time according to the pre-planned velocity curve V(t), and converted into a drive signal output to the corresponding multi-axis drive structure. This allows the probe to continuously, smoothly, and accurately perform complex spatial trajectory movements along the preset working path to complete the scanning measurement of the workpiece, reducing vibration and improving measurement efficiency and quality.
[0101] Based on the same inventive concept, this application also provides a speed planning system for implementing the speed planning method described above. The solution provided by this speed planning system is similar to the implementation scheme described in the above method; therefore, the specific limitations of one or more speed planning systems provided below can be found in the limitations of the speed planning method described above, and will not be repeated here.
[0102] In one exemplary embodiment, such as Figure 5 As shown, a speed planning system 130 is provided, which is disposed in a motion control device 110 and includes:
[0103] The sequence generation unit 131 is used to generate a discrete sequence of measurement points for the workpiece to be measured. That is, the sequence generation unit 131 is used to execute step 10 in the speed planning method. Optionally, the sequence generation unit 131 can be located in the host computer 112.
[0104] The equation-establishing unit 132 is used to obtain trajectory parameter equations representing the probe's working trajectory based on the sequence of measurement points. That is, the equation-establishing unit 132 is used to execute step 20 in the speed planning method. Optionally, the equation-establishing unit 132 can be located in the host computer 112 and / or the motion controller 114.
[0105] The curve detection unit 133 is used to determine the curve abrupt change regions in the work trajectory based on the trajectory parameter equation and a preset constraint window; and to segment the work trajectory based on the position of the curve abrupt change regions to obtain multiple motion segments. That is, the curve detection unit 133 is used to execute steps 30 and 50 in the speed planning method. Optionally, the curve detection unit 133 can be set in the motion controller 114.
[0106] The speed constraint unit 134 is configured to apply target speed constraints to curve abrupt change regions to determine the target speed upper limit for the corresponding curve abrupt change regions; and to apply speed constraints to each motion segment to determine the speed limit value for each motion segment. That is, the speed constraint unit 134 is used to execute steps 40 and 60 in the speed planning method. Optionally, the speed constraint unit 134 may be located in the motion controller 114.
[0107] The speed planning unit 135 is configured to plan the speed curve corresponding to the probe's working trajectory based on the speed limits at each position on the working trajectory. That is, the speed planning unit 135 is used to execute step 70 in the speed planning method. Optionally, the speed planning unit 135 can be located in the motion controller 114.
[0108] In some embodiments, the speed planning system 130 may further include an interpolation unit 136, which is used to obtain real-time interpolation points based on the speed curve and trajectory parameter equations. Specifically, within each interpolation cycle T, the interpolation unit 136 obtains the interpolation curve parameters using a nodal prediction method based on a pre-planned speed curve, and calculates the target position to be reached in the current interpolation cycle, i.e., the interpolation point coordinates, in real time using the trajectory parameter equations. Optionally, the interpolation unit 136 may be disposed in the motion controller 114.
[0109] In some embodiments, the speed planning system 130 may further include a drive unit 137, which generates a drive signal based on the real-time interpolation point and sends it to the multi-axis drive structure. This enables the probe to continuously, smoothly, and accurately perform complex spatial trajectory movements along a preset working path to complete the scanning measurement of the workpiece, reducing vibration and improving measurement efficiency and quality. Optionally, the drive unit 137 may be housed in the motion controller 114.
[0110] Each module in the aforementioned speed planning system 130 can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the coordinate measuring machine (CMM) in hardware form or independent of it, or stored in the memory of the CMM in software form, so that the processor can call and execute the corresponding operations of each module.
[0111] In one exemplary embodiment, a computer device is provided, which may be a host computer 112, and its internal structure diagram may be as follows. Figure 6 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with an external host computer 112. Wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements the steps in the above-described method embodiments. The display unit of the computer device forms a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0112] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0113] In one embodiment, a coordinate measuring machine is also provided, which includes a motion control device 110 and a measuring machine 120. The motion control device 110 includes a memory and a processor. The memory stores a computer program. The measuring machine 120 includes a probe. When the processor executes the computer program, it implements the speed planning steps in any of the above embodiments until a speed curve matching the working trajectory is obtained.
[0114] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0115] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0116] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0117] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0118] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one of relational databases and non-relational databases. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0119] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0120] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A speed planning method, characterized in that, The speed planning method is applied to a coordinate measuring machine (CMM), which includes a measuring machine with a probe and a motion control device. The motion control device is used to plan and coordinate the work trajectory of the measuring machine. The probe measures the workpiece along the set work trajectory. The speed planning method includes: Generate a discrete sequence of measurement points for the workpiece under test; Based on the sequence of measurement points, obtain the trajectory parameter equation representing the operation trajectory; The curve abrupt change regions in the operation trajectory are determined based on the trajectory parameter equation, a preset constraint window, and abrupt change threshold. The constraint window continuously samples along the operation trajectory with a sampling width of a sampling step size and calculates the slope change of the operation trajectory within each sampling range. The slope change and the abrupt change threshold are compared to determine whether the operation trajectory within the corresponding sampling range is a curve abrupt change region, until the sampled range covers the entire operation trajectory. A target velocity constraint is applied to the curve abrupt change region. The target velocity constraint is determined by combining the radius of curvature of the corresponding curve abrupt change region with a preset centripetal acceleration upper limit. Based on the location of the curve abrupt change region and the trajectory parameter equation, the operation trajectory is segmented to obtain multiple motion segments, and velocity constraints are applied to each motion segment based on standard constraints to determine the velocity limit value of each motion segment; the standard constraints include one or more of the following: desired measurement velocity constraint, bow height error constraint, and desired acceleration constraint; The speed curve corresponding to the operation trajectory is planned and obtained based on the position and speed limit values of all motion segments and the position and target speed limit of all curve abrupt change regions.
2. The speed planning method according to claim 1, characterized in that, When obtaining the target speed limit, the slope change or curvature change in the abrupt change region of the curve is used as an influencing factor in the calculation.
3. The speed planning method according to claim 1, characterized in that, The minimum speed limit obtained from the standard constraints is used as the speed limit value for the corresponding motion segment.
4. The speed planning method according to claim 1, characterized in that, The jerk corresponding to the velocity curve is continuous.
5. The speed planning method according to claim 1, characterized in that, If the surface of the workpiece to be tested has a sharp corner, the sharp corner shall be replaced with an arc or spline when planning the operation trajectory.
6. A speed planning system, characterized in that, The speed planning system is applied to a coordinate measuring machine (CMM), which includes a measuring machine with a probe and a motion control device. The motion control device is used for planning and coordinating the work trajectory of the measuring machine. The probe measures the workpiece along the set work trajectory. The speed planning system is located in the motion control device and includes: The sequence generation unit is used to generate a discrete sequence of measurement points for the workpiece under test. An equation-establishing unit is used to obtain trajectory parameter equations representing the operation trajectory based on the measurement point sequence; A curve detection unit is used to determine curve abrupt change regions in the work trajectory based on the trajectory parameter equation, a preset constraint window, and abrupt change threshold; and to segment the work trajectory into multiple motion segments based on the position of the curve abrupt change regions and the trajectory parameter equation; the curve detection unit is configured to continuously sample along the work trajectory using the constraint window with a sampling width of a sampling step size, calculate the slope change of the work trajectory within each sampling range, compare the slope change with the abrupt change threshold to determine whether the work trajectory within the corresponding sampling range is a curve abrupt change region, until the sampled range covers the entire work trajectory; A velocity constraint unit is configured to apply target velocity constraints to the curve abrupt change region, wherein the target velocity constraint is determined by combining the radius of curvature of the corresponding curve abrupt change region with a preset centripetal acceleration upper limit; and to apply velocity constraints to each motion segment based on standard constraint conditions to determine the velocity limit value of each motion segment; wherein the standard constraint conditions include one or more of the following: desired measurement velocity constraint, bow height error constraint, and desired acceleration constraint. The speed planning unit is configured to plan and obtain the speed curve corresponding to the operation trajectory based on the position and speed limit values of all motion segments and the position and target speed limit of all curve abrupt change regions.
7. The speed planning system according to claim 6, characterized in that, It also includes an interpolation unit, which is used to obtain real-time interpolation points based on the velocity curve and the trajectory parameter equation.
8. The speed planning system according to claim 7, characterized in that, It also includes a drive unit for generating a drive signal based on the real-time interpolation point and sending it to the measuring machine to control the probe to measure the workpiece along the working trajectory.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.