Industrial servo motor operation control method and system
By collecting and processing motion image data of servo motor load devices, and combining the motion characteristics and control objectives of servo motors, precise control commands are generated, solving the problem of deviation accumulation in complex trajectory execution of industrial servo motors, and improving production accuracy and process stability.
Patent Information
- Application Number
- CN202511379092.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2025-10-31
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When existing industrial servo motors execute complex motion trajectories, factors such as load inertia changes, mechanical transmission backlash, and external disturbances cause slight deviations between the actual trajectory and the preset trajectory. As time goes by, the deviation gradually increases, affecting production accuracy and process stability.
The motion image data of the load equipment is acquired by an industrial camera, preprocessed and located to obtain real-time position coordinate data, and compared with theoretical position coordinate data. Combined with the motion correlation characteristics of the servo motor and the preset control target, target candidate control commands for future control cycles are generated. The commands are then filtered using a strategy of minimizing trajectory deviation data and output to the servo motor driver.
It effectively reduces the deviation between the actual trajectory and the preset trajectory, improves the accuracy of the load motion trajectory, and ensures the accuracy of industrial production and the stability of the production process.
Smart Images

Figure CN120880263A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method and system for controlling the operation of an industrial servo motor. Background Technology
[0002] In the industrial production field, servo motors, as core drive components, are widely used in scenarios requiring high-precision motion trajectory control, such as the nozzle operation of 3D printers in machining.
[0003] Currently, industrial servo motor operation control mainly relies on PID (Proportional-Integral-Derivative) control. This involves real-time acquisition of the motor's output shaft position and speed signals, comparison with the theoretical values of a preset trajectory, calculation of deviations, and dynamic adjustment of control commands to achieve trajectory tracking. However, when a servo motor drives a load to execute complex motion trajectories (such as arcs or parabolas), slight deviations in the actual motor trajectory can occur due to factors such as load inertia changes, mechanical transmission backlash, and external disturbances. PID control can only provide feedback adjustments based on current or historical deviations and cannot predict the cumulative trend of subsequent trajectory deviations. As the motor continues to run, these slight deviations accumulate, causing the deviation between the actual trajectory and the preset trajectory to gradually increase. Ultimately, this leads to the load's motion trajectory deviating from the preset path, affecting industrial production accuracy and consequently impacting the stability of the production process. Summary of the Invention
[0004] This invention provides an industrial servo motor operation control method and system to ensure the precision of industrial production and the stability of the production process.
[0005] In a first aspect, the present invention provides an industrial servo motor operation control method, comprising: The motion image data of the load device within the preset trajectory parameters is acquired by acquiring motion image data of the load device after the servo motor is started using an industrial camera, and the motion image data is preprocessed and located to obtain the real-time position coordinate data of the load device. Based on the preset trajectory parameters, the theoretical position coordinate data corresponding to the load device at each acquisition time is determined, and the real-time position coordinate data is compared with the theoretical position coordinate data to obtain the trajectory deviation data at each acquisition time. Based on the trajectory deviation data, combined with the motion correlation characteristics of the servo motor and the preset control target, the target candidate control commands for multiple future control cycles generated in each control cycle are determined. The target candidate control command is evaluated and screened based on the strategy of minimizing the trajectory deviation data to obtain the target control command, and the target control command is converted into a signal and output to the servo motor driver.
[0006] Secondly, the present invention also provides an industrial servo motor operation control system, applied to the industrial servo motor operation control method described in the first aspect; the industrial servo motor operation control system includes: The acquisition and positioning module is used to acquire motion image data of the load device within a preset trajectory parameter after the servo motor is started based on an industrial camera, and to preprocess and position the motion image data to obtain the real-time position coordinate data of the load device. The trajectory deviation determination module is used to determine the theoretical position coordinate data of the load device at each acquisition time based on the preset trajectory parameters, and compare the real-time position coordinate data with the theoretical position coordinate data to obtain the trajectory deviation data at each acquisition time. The candidate instruction generation module is used to determine the target candidate control instructions for multiple future control cycles generated in each control cycle based on the trajectory deviation data, combined with the motion correlation characteristics of the servo motor and the preset control target. The instruction filtering and output module is used to evaluate and filter the target candidate control instructions based on the strategy of minimizing the trajectory deviation data, obtain the target control instructions, and output the target control instructions to the servo motor driver after converting them into signals.
[0007] Thirdly, the present invention also provides an electronic device, comprising: a memory for storing computer software programs; and a processor for reading and executing the computer software programs, thereby implementing any of the above-described industrial servo motor operation control methods.
[0008] Fourthly, the present invention also provides a non-transitory computer-readable storage medium storing a computer software program, which, when executed by a processor, implements any of the above-described industrial servo motor operation control methods.
[0009] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the above-described industrial servo motor operation control methods.
[0010] The industrial servo motor operation control method provided in this invention acquires motion image data of the load device using an industrial camera, performs preprocessing and positioning to obtain real-time position coordinate data of the load device, avoiding the limitations of relying solely on the position and speed signals of the motor output shaft. The real-time position coordinate data is then compared with theoretical position coordinate data to obtain trajectory deviation data. Combined with the motion correlation characteristics of the servo motor and the preset control target, candidate control commands for multiple future control cycles are determined within each control cycle. This allows for prediction of the cumulative trend of subsequent trajectory deviations. Furthermore, the candidate control command set is evaluated and filtered according to a strategy for minimizing trajectory deviation data to obtain the target control command with the smallest deviation. This reduces the deviation between the actual trajectory and the preset trajectory, avoids the continuous accumulation of small deviations, improves the accuracy of the load motion trajectory, prevents the load motion trajectory from deviating from the preset path, and ensures the accuracy of industrial production and the stability of the production process. Attached Figure Description
[0011] Figure 1 This is a flowchart illustrating the industrial servo motor operation control method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the industrial servo motor operation control system provided in an embodiment of the present invention; Figure 3 An embodiment diagram of the electronic device provided in this invention; Figure 4 An embodiment diagram of a computer-readable storage medium provided in accordance with the present invention. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0013] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0014] In the description of this invention, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed herein.
[0015] See Figure 1 , Figure 1 This is a flowchart illustrating the industrial servo motor operation control method provided by the present invention. In this embodiment, the execution entity of the industrial servo motor operation control method is the operation control system. Therefore, the industrial servo motor operation control method includes: Step 10: Based on the industrial camera, collect motion image data of the load device within the preset trajectory parameters after the servo motor starts, and preprocess and locate the motion image data to obtain the real-time position coordinate data of the load device.
[0016] Optionally, the operation control system initiates image acquisition at a preset sampling frequency (e.g., 50fps) using an industrial camera deployed in the industrial production area (i.e., facing the load device). The system acquires motion image data in real-time based on the load device's initial state, according to preset trajectory parameters, ensuring that the industrial camera's acquisition range covers the entire preset trajectory area of the load device's movement (e.g., the movement area of a 3D printer nozzle). The preset trajectory parameters include trajectory type (e.g., circular arc, parabola), trajectory start coordinates, trajectory end coordinates, trajectory radius of curvature (circular arc trajectory) or quadratic coefficient (parabolic trajectory), target motion speed, etc. Simultaneously, during the acquisition process, the industrial camera undergoes intrinsic and extrinsic parameter calibration to determine the real-time parameters of the industrial camera and the transformation relationship between the camera coordinate system and the servo motor motion coordinate system.
[0017] Furthermore, after acquiring motion image data, the operation control system preprocesses the original image in the motion image data (such as noise removal, image enhancement, contour extraction, etc.). After the preprocessing is completed, the preprocessed image is located. By using the calibration relationship between pixel size and actual physical size, the pixel coordinates are converted into real-time position coordinate data in the actual physical space, as described in steps 101-105.
[0018] In one embodiment, taking the movement of a 3D printer nozzle (load device) along a preset arc trajectory as an example, the 3D printer nozzle moves along an arc trajectory with a radius R = 50 mm. The industrial camera resolution is 1920 × 1080, and the preset trajectory parameters are: center coordinates (100, 100, 2) mm, arc start angle 0°, end angle 360°, and movement speed 10 mm / s. The operation control system controls the industrial camera to acquire nozzle movement images at a sampling frequency of 50 fps.
[0019] Step 20: Determine the theoretical position coordinate data of the load device at each acquisition time based on the preset trajectory parameters, and compare the real-time position coordinate data with the theoretical position coordinate data to obtain the trajectory deviation data at each acquisition time.
[0020] Optionally, the operation control system can calculate the theoretical position coordinates of the load device at each moment using trajectory equations, based on preset trajectory parameters (such as the center coordinates, radius, and angular velocity of a circular arc trajectory, and the vertex coordinates, opening direction, and velocity of a parabolic trajectory), combined with the time difference between each image acquisition moment and the start of the motion. Then, the calculated theoretical position coordinates are compared moment-by-moment with the real-time position coordinates obtained in step 10, calculating the trajectory deviation value (i.e., the Euclidean distance between the real-time coordinates and the theoretical coordinates), the trajectory deviation rate of change (i.e., the ratio of the difference between two adjacent deviation values to the time interval), and the cumulative trajectory deviation value (i.e., the integral of all deviation values from the start of the motion to the current moment, with the time interval being the sampling period), thus forming complete trajectory deviation data.
[0021] Continuing with the above embodiments, the center coordinates of the preset circular arc trajectory are: angular velocity of motion Sampling period At a certain data collection time (Image 5) Based on the equation of the circular trajectory The calculated theoretical position coordinates are: ; And based on the real-time location coordinates at that moment... Finally, the trajectory deviation data is calculated, where the trajectory deviation value is... mm; trajectory deviation rate of change The moment before Deviation value Time interval , Cumulative value of trajectory deviation from arrive There were a total of 5 sampling times, and the deviation values were as follows: The cumulative value is then calculated using the trapezoidal integral method.
[0022] Step 30: Based on the trajectory deviation data, combined with the motion correlation characteristics of the servo motor and the preset control target, determine the target candidate control commands for multiple future control cycles generated in each control cycle.
[0023] Optionally, the operation control system first acquires the motion correlation characteristics of the servo motor, and then, based on the trajectory deviation value and trajectory deviation change rate calculated in step 20, performs calculation and analysis in conjunction with the preset control target on a unit of each control cycle (e.g., consistent with the sampling cycle, 0.02s). Finally, multiple target candidate control commands for future control cycles are generated within each control cycle, as described in steps 301-305. Each target candidate command corresponds to a servo motor correction scheme for the future trajectory. The motion correlation characteristics include the relationship between rotational speed and load linear velocity, and the relationship between torque and load position. The preset control targets include response speed and trajectory tracking accuracy.
[0024] Step 40: The target candidate control commands are evaluated and screened based on the strategy of minimizing trajectory deviation data to obtain the target control commands, and the target control commands are converted into signals and output to the servo motor driver.
[0025] Optionally, the operation control system uses minimizing trajectory deviation data as its core strategy, evaluates and filters the acquired target candidate control commands, and selects the target control command that best matches the current decision, as described in steps 401-405. Then, the target control command (such as speed and torque adjustment) is converted into a PWM (Pulse Width Modulation) signal recognizable by the servo motor driver, and output to the servo motor driver through a communication interface (such as RS485) to adjust the motor's operating state.
[0026] In one embodiment, it is assumed that three sets of target candidate control commands are obtained, as follows: Candidate instruction 1: Average prediction deviation 0.018 mm, maximum deviation change rate 0.08 mm / s, total adjustment (5+3+1) r / min + (0.005+0.003+0.001) N·m = 9 r / min + 0.009 N·m, maximum difference between adjacent adjustment amounts 2 r / min + 0.002 N·m; Candidate instruction 2: average prediction deviation 0.015mm, maximum deviation change rate 0.12mm / s, total adjustment (6+2+0)r / min+(0.006+0.002+0)N・m=8r / min+0.008N・m, maximum difference between adjacent adjustment amounts 4r / min+0.004N・m; Candidate instruction 3: average prediction deviation 0.020mm, maximum deviation change rate 0.07mm / s, total adjustment (4+4+0)r / min+(0.004+0.004+0)N・m=8r / min+0.008N・m, maximum difference between adjacent adjustment amounts 0r / min+0N・m.
[0027] After evaluation and screening, candidate instruction 1 was selected as the target control instruction. Therefore, this instruction was converted into a PWM signal (e.g., speed adjustment +5r / min corresponds to a PWM duty cycle of 45%, torque adjustment +0.005N・m corresponds to a PWM duty cycle of 38%), and output to the 3D printer servo motor driver through the RS485 interface.
[0028] This invention acquires motion image data of a load device using an industrial camera, performs preprocessing and positioning to obtain real-time position coordinate data of the load device, avoiding the limitations of relying solely on the position and speed signals of the motor output shaft. The real-time position coordinate data is then compared with theoretical position coordinate data to obtain trajectory deviation data. Combined with the motion correlation characteristics of the servo motor and the preset control target, candidate control commands for multiple future control cycles are determined within each control cycle. This allows for prediction of the cumulative trend of subsequent trajectory deviations. Furthermore, the candidate control command set is evaluated and filtered based on a strategy to minimize trajectory deviation data, resulting in the target control command with the smallest deviation. This reduces the deviation between the actual trajectory and the preset trajectory, prevents the continuous accumulation of small deviations, improves the accuracy of the load motion trajectory, and avoids deviations from the preset path, ensuring the precision of industrial production and the stability of the production process.
[0029] In one embodiment, steps 101-105 are described as follows: Step 101: For motion image data, filter the dynamic regions corresponding to the motion of the load device based on the rate of change of pixel gray values in adjacent images, and construct a dynamic mask matrix.
[0030] Optionally, the operation control system first extracts two adjacent frames of motion images from the motion image data (such as frame k and frame (k-1)), and then iterates through each pixel in the image. Calculate the rate of change of the grayscale value of the pixel in the two frames of the image. Its formula is ,in For the first frame (Grayscale value). Meanwhile, based on a pre-set grayscale change rate threshold... (e.g., 0.3, determined through industrial ambient light interference testing), if If the pixel is found to be in a dynamic region where the device is moving, it is determined to belong to that region; otherwise, it is considered a static background region. Finally, a dynamic mask matrix is constructed based on the determination results. ,in (Dynamic region pixels) (Static background pixels) to achieve separation between dynamic areas and the background.
[0031] In one embodiment, taking two adjacent frames (frame 5 and frame 4) as an example, the coordinates of a certain pixel A are (800, 600) (near the nozzle edge region), and the grayscale value of the fifth frame is... grayscale value of the 4th frame Then the grayscale change rate Pixels identified as dynamic region ; The coordinates of pixel B are (200, 300) (printing platform background) , , Pixels in the static region are identified. Final construction The dynamic mask matrix has a value of 1 in the matrix that represents the shape of the nozzle outline and covers the dynamic area of the nozzle movement.
[0032] Step 102: Based on the dynamic mask matrix, perform distortion correction on the pixel grayscale values in the dynamic region to obtain the corrected pixel grayscale matrix.
[0033] Optionally, the operation control system first acquires the illumination distortion model of the industrial camera. This model can be established by pre-shooting standard grayscale plates under different illumination intensities, and its expression is: ,in This is the distorted grayscale value. The actual grayscale value. This is the normalized value of the illumination intensity at that pixel. These are the distortion coefficients. Then, based on the dynamic mask matrix... Extract pixels from dynamic regions with a value of 1, and for each pixel in the dynamic region, perform inverse calculations based on the illumination distortion model. The corrected grayscale value is calculated. In static areas, pixel grayscale values remain unchanged. All corrected pixel grayscale values are arranged according to image coordinates to obtain the corrected pixel grayscale matrix.
[0034] Continuing with the above embodiments, the camera illumination distortion coefficient is known. Dynamic region pixels Distorted grayscale value The normalized value of the illumination intensity at this pixel Substitute into the correction formula to calculate: ≈213.7.
[0035] After correcting all pixels in the dynamic region, combine them with pixels in the static region to construct... Corrected pixel grayscale matrix
[0036] Step 103: Based on the pixel grayscale matrix, construct an edge enhancement matrix according to the grayscale gradient difference between the pixel and its neighboring pixels.
[0037] Optionally, the operation control system uses the Sobel gradient operator to calculate the corrected pixel grayscale matrix. The grayscale gradient difference of each pixel. The Sobel operator includes a horizontal direction operator. and vertical direction operator For each pixel Take it Neighboring pixels, respectively with Perform convolution operations to obtain the horizontal gradient. and vertical gradient Its formula is , = Calculate the gradient magnitude of this pixel. Arrange the gradient magnitudes of all pixels according to their coordinates to construct an edge enhancement matrix.
[0038] Continuing with the above embodiments, the corrected pixel grayscale matrix is obtained. Middle nozzle edge pixels of Neighboring pixel grayscale values (unit: grayscale levels): and Convolution calculates the horizontal gradient: = .and Convolution calculates the vertical gradient: Gradient magnitude Iterate through all pixels to calculate the gradient magnitude and construct... Edge enhancement matrix .
[0039] Step 104: Extract continuous pixels with abrupt changes in grayscale value based on the edge enhancement matrix to obtain the contour feature points of the load device.
[0040] Optionally, the operation control system can preset the gradient magnitude threshold. (The edge enhancement matrix can be preset according to the edge contrast between the load device and the background, such as 30). Filter the pixels in the data, if If a pixel is identified as an edge pixel with a sudden change in grayscale value, it is marked as an edge point. Then, a connected component analysis algorithm (such as 8-neighborhood connectivity analysis) is used to cluster adjacent edge points into connected edge regions. Noisy edge regions with an area smaller than a preset minimum connected area (such as 50 pixels) are removed, and connected edge regions matching the size of the load device are retained. For the retained connected edge regions, a contour tracking algorithm (such as chain code tracking) is used to traverse the edge points and extract the contour pixels of the region. Then, a corner detection algorithm (such as Harris corner detection) is used to select points with obvious corner features from the contour pixels as the contour feature points of the load device, and the image coordinates of each feature point are recorded.
[0041] Continuing with the above embodiments, let's assume a gradient magnitude threshold. Edge enhancement matrix Medium gradient magnitude The pixels are marked as edge points. Through 8-neighbor connectivity analysis, multiple connected edge regions are clustered, among which those are related to the nozzle size (diameter approximately...). The connected region (approximately 15,000 pixels in area, corresponding to an image pixel diameter of approximately 1000 pixels) is matched and is retained. The edge points of this region are traversed using chain code tracing to obtain a set of contour pixels. Then, the corner response function of each contour pixel is calculated using the Harris corner detection algorithm. (in for Autocorrelation matrix, (Empirical coefficient), setting the corner response threshold. Filter out The points were used as contour feature points, and a total of 4 feature points were extracted, with image coordinates as follows:
[0042] Step 105: Based on the contour feature points and the intrinsic and extrinsic parameters of the industrial camera, coordinate correction and positioning are performed to obtain the real-time position coordinate data of the load device.
[0043] Optionally, the operation control system performs coordinate correction and positioning based on the extracted contour feature points and the internal and external parameters of the industrial camera, and finally obtains the real-time position coordinate data of the load device, as described in steps 1051-1054.
[0044] This invention employs dynamic region filtering to accurately separate the moving area of the load device from the static background, reducing the amount of data required for subsequent processing. Combined with illumination distortion correction, it eliminates the interference of industrial environment illumination fluctuations on pixel grayscale values, ensuring the authenticity of grayscale data. Furthermore, it combines edge enhancement to strengthen the grayscale difference between the load device and the background, highlighting the edge features of the device. Finally, through contour feature point extraction, it accurately locates the key contour points of the device, eliminating noise interference, which can significantly improve the detection accuracy of real-time position coordinate data of the load device.
[0045] In one embodiment, steps 1051-1054 are described as follows: Step 1051: Based on the lens distortion parameters of the industrial camera, perform pixel-level distortion correction on the image coordinates of the contour feature points to obtain the corrected feature point coordinates.
[0046] Optionally, the operation control system first acquires the lens distortion parameters of the industrial camera (including radial distortion coefficient). and tangential distortion coefficient The original image coordinates for each contour feature point can be obtained in advance through camera calibration experiments, such as the Zhang Zhengyou calibration method. First, convert it into normalized image coordinates with the principal point as the origin. The formula is , Next, the radial distortion correction amount is calculated. and tangential distortion correction amount Among them, radial distortion correction amount , ( (Radial distance squared in normalized coordinates); Tangential distortion correction amount , Finally, the corrected normalized coordinates are calculated. Then convert it back to pixel coordinates to obtain the corrected feature point coordinates. The conversion formula is: , .
[0047] Step 1052: Based on the corrected feature point coordinates and the geometric structural features of the load device, clustering is performed to obtain multiple feature point cluster groups.
[0048] Optionally, the operation control system first acquires the geometric features of the load device. For example, for a 3D printer nozzle, its geometry is a symmetrical rectangle, with four contour feature points corresponding to the four vertices of the rectangle (two top vertices and two bottom vertices). Based on the acquired geometric features, clustering rules are determined: the Euclidean distance between any two modified feature points is calculated, and feature points with a distance less than a preset threshold (set according to the pixel distance corresponding to the side length of the nozzle rectangle; for example, if the horizontal side length of the nozzle rectangle is approximately 40 pixels, the threshold is set to 5 pixels) are grouped into the same group. A K-means clustering algorithm is then used, with a preset cluster size K=2 (top vertex group and bottom vertex group). The y-coordinate (vertical direction) of the modified feature points is used as the primary clustering criterion (the y-coordinate of top vertices is smaller, and the y-coordinate of bottom vertices is larger). By iteratively calculating the cluster centers, each modified feature point is assigned to the group containing the nearest cluster center, ultimately resulting in two feature point cluster groups.
[0049] In one embodiment, the coordinates of the four corrected feature points are known to be... . and of The coordinates are approximately 580.06. and of The coordinates are approximately 619.94; the number of K-means clusters is set. The initial cluster centers are respectively (Top group initial center) (Initial center of bottom group); arrive The distance is ,arrive The distance is Therefore Classified as the top group; similarly, Classified as the top group, It is grouped into the bottom group; finally, the top group is centered. The center of the bottom group is 619.94 + 619.94 = 619.94, so the cluster center remains unchanged, resulting in two cluster groups: the top group and the bottom group. Bottom group .
[0050] Step 1053: For each feature point cluster group, determine the cluster center coordinates of each feature point cluster group based on the average value of the coordinates of all feature points within the feature point cluster group.
[0051] Optionally, for each feature point cluster, the operation control system calculates the average of the coordinates of all modified feature points within the group, and uses this average as the cluster center coordinates for that cluster. For example, suppose a cluster contains... There are three corrected feature points, with coordinates as follows: Then the cluster center coordinate , coordinate That is, the coordinates of the cluster center are This method condenses multiple feature points of each cluster group into a single central coordinate, reducing the amount of data required for subsequent calculations and minimizing the impact of errors in individual feature points on the final localization result.
[0052] Continuing with the above embodiments, the top group of the two cluster groups , Then the cluster center , That is, the coordinates of the top cluster center are approximately (800.01, 580.06); the bottom group Cluster center , The coordinates of the bottom cluster center are approximately (800.01, 619.94).
[0053] Step 1054: Perform consistency verification based on the cluster center coordinates of each feature point cluster group to obtain the target center coordinates, and perform coordinate transformation based on the target center coordinates and the intrinsic and extrinsic parameters of the industrial camera to obtain the real-time position coordinate data of the load device.
[0054] Optionally, the operation control system first sets consistency verification rules based on the geometric characteristics of the load device. For example, for the two cluster centers (top and bottom) of the 3D printer nozzle, the geometric constraint relationship is: the horizontal coordinates should be basically consistent (because the vertical side of the nozzle rectangle is parallel to the horizontal axis). The vertical distance (axis) should be equal to the pixel distance corresponding to the actual height of the nozzle rectangle. Therefore, calculate the difference in horizontal coordinates between the two cluster centers. and vertical coordinate distance ,like Less than the preset horizontal deviation threshold (e.g., 1 pixel) and Within the preset vertical distance range (such as the actual height of the nozzle) The corresponding pixel distance is 1000 pixels, and the range is set to Within a pixel, the coordinates of the cluster center are determined, and the average coordinates of the two cluster centers are used as the target center coordinates. The formula is , Then, combining the intrinsic and extrinsic parameters of the industrial camera, the target center coordinates are transformed into three-dimensional coordinates in the camera coordinate system using a camera inverse projection model. ( The distance between the preset nozzle movement plane and the camera, such as Then, through coordinate system transformation (converting the camera coordinate system to the printing platform coordinate system), the real-time position coordinates of the load device are obtained.
[0055] Continuing with the above embodiments, during consistency verification, if the top cluster center... With bottom cluster center Horizontal coordinate difference (Less than 1 pixel below the threshold), vertical distance Pixels (the actual height of the nozzle is 0.4mm, corresponding to a pixel distance of 40 pixels, in) If the range is within pixels, then it is considered consistent; target center coordinates: , That is, the coordinates of the target center are Substituting the target center coordinates into the inverse projection formula, , , , The coordinates of the camera's optical center in the printing platform coordinate system are known to be... Then the real-time position coordinates of the nozzle ,
[0056] This invention, through lens distortion correction, eliminates the influence of radial and tangential distortion of the camera lens on the coordinates of feature points, avoiding position detection deviations caused by distortion. Combined with clustering, discrete feature points are categorized based on load geometry, highlighting the positional information of key areas. Furthermore, determining cluster centers reduces the interference of individual feature point errors, improving the stability of coordinate data. Finally, consistency verification ensures that the cluster centers conform to the actual geometry of the load, eliminating the influence of abnormal data on the positioning results. Ultimately, this further improves the detection accuracy of the real-time position coordinates of the load device.
[0057] In one embodiment, steps 301-305 are described as follows: Step 301: Determine the deviation trend quantification value based on the trajectory deviation value and the trajectory deviation change rate combined with the response speed in the preset control target.
[0058] Optionally, the operation control system first combines the current trajectory deviation value. Trajectory deviation rate of change and the response speed in the preset control target (Control commands must be in) (Internal correction effect) Calculate the quantified value of deviation trend The deviation trend quantification value is used to characterize the future trend of trajectory deviation. A deviation growth model is then constructed. The formula is ,in The maximum permissible trajectory deviation is preset (i.e., the upper limit of trajectory deviation in the preset control target). The larger the value, the higher the risk of the deviation exceeding the allowable range in the future, and the more severe the deviation trend.
[0059] In one embodiment, it is known , , , Substituting into the formula, we obtain... The current deviation trend quantification value is 0.455, indicating that the deviation will significantly exceed the allowable range in the future and requires intensive correction.
[0060] Step 302: Determine the deviation correction requirement based on the deviation trend quantification value combined with the trajectory tracking accuracy and response speed in the preset control target.
[0061] Optionally, the operation control system incorporates deviation trend quantification values. Preset trajectory tracking accuracy in the control target ( and response speed The deviation correction demand degree is calculated by establishing a corrected demand model. This index comprehensively reflects the urgency of deviation elimination and the degree of alignment with control objectives; its formula is: ,in Weights representing trajectory accuracy requirements. The weights representing response speed requirements are reinforced by the inverse square form for high-requirement targets. The impact. The larger the value, the faster and more accurately the current deviation needs to be corrected, and the stronger the need for correction.
[0062] Continuing with the above embodiments, it is known that... , , Substituting into the formula, the weights required for trajectory accuracy are calculated. Weight of response speed requirements Then the deviation correction requirement degree The value of 87 indicates a deviation correction requirement of approximately 50.87, suggesting a strong need for correction.
[0063] Step 303: Based on the deviation correction requirement, combined with the relationship between the servo motor speed and the load linear velocity, and the relationship between the torque and the load position, determine the speed adjustment reference amount.
[0064] Optionally, the operation control system first defines the speed adjustment reference value. (i.e., the initial speed adjustment reference value), its calculation needs to take into account the deviation correction requirement. The relationship between servo motor speed and load linear speed ( , (This refers to the speed conversion coefficient) and the current nozzle linear velocity deviation. ( This is derived from both the rate of change of deviation and the deviation trend. The required speed adjustment is inferred from the linear velocity deviation; the formula is as follows: ,in The motor drive efficiency is set to 0.95 (the standard efficiency value for industrial servo motors). This is the speed conversion coefficient.
[0065] In one embodiment, it is known First calculate the linear velocity deviation. Then calculate the speed adjustment reference amount: .
[0066] Step 304: Based on the speed adjustment reference amount and the response speed in the preset control target, generate the speed adjustment amount for the next N control cycles.
[0067] Optionally, the operation control system operates based on the response speed in the preset control target. Determine the number of future control cycles ( , To control the cycle, (This is a function that rounds up), and the reference amount is adjusted according to the rotational speed. Generate future using an exponential decay adjustment strategy Speed adjustment per cycle The adjustment amount decreases over time to avoid load shocks caused by sudden changes in motor speed. The formula is: ,in This is the speed adjustment attenuation coefficient, used to control the rate at which the speed adjustment decreases over time. It can be dynamically optimized using historical data. Minimum adjustable speed of the motor (default) (upper limit of motor hardware precision). .
[0068] Continuing with the above embodiments, it is known that... Control cycle (Matching the high-frequency sampling capability of industrial cameras), then Therefore, considering the subsequent accumulation of deviations, we set... (The next 3 control cycles, total) (The period during which coverage bias may accumulate) (However, the actual maximum speed adjustment of the motor can be...) The discrepancy between the actual value and the theoretical value is too large, constituting a logical contradiction. Furthermore, due to hardware limitations of the motor, the upper limit of the speed adjustment is [missing value]. Therefore, it should be corrected to ), Calculations yielded Based on this, the speed adjustment amount for the next three cycles is as follows: ; r / min (rounded to the nearest integer) ); That is, the speed adjustment amounts for the next three control cycles are respectively .
[0069] Step 305: Based on the speed adjustment amount of each future cycle, combined with the relationship between the speed of the servo motor and the linear speed of the load, and the relationship between the torque and the load position, determine the target candidate control command for each future control cycle.
[0070] Optionally, the operation control system further determines the target candidate control commands for each future control cycle based on the speed adjustment amount of each future cycle, combined with the relationship between the speed of the servo motor and the linear speed of the load, as well as the relationship between the torque and the load position. This is as described in steps 3051-3055.
[0071] This invention accurately judges the future risk of trajectory deviation by quantifying the deviation trend, avoiding the lag of traditional control that only adjusts based on the current deviation; it comprehensively balances trajectory accuracy and response speed by adjusting the deviation correction demand, ensuring that the control command is highly matched with the preset target; it derives the speed adjustment benchmark based on motion correlation characteristics to achieve accurate mapping of "load demand - motor control"; and it uses an exponential decay strategy to generate future multi-cycle speed adjustment amounts to avoid load shocks caused by sudden changes in motor speed.
[0072] In one embodiment, steps 3051-3055 are described as follows: Step 3051: Based on the speed adjustment amount for each future cycle, combined with the relationship between the speed of the servo motor and the load linear speed, and the relationship between the torque and the load position, determine the load linear speed adjustment amount for the corresponding future cycle.
[0073] Optionally, the operation control system is based on the linear correlation between the servo motor speed and the load linear speed. ( (This refers to the speed conversion coefficient), the mapping relationship between the speed adjustment and rotational speed adjustment of the pusher guide: ( (Number of future control cycles). The speed adjustment amount for each future cycle. Substituting into the formula, the load linear velocity adjustment for the corresponding period is calculated. This adjustment directly reflects the magnitude of the nozzle linear velocity correction required, thus providing a basis for subsequent position correction calculations.
[0074] In one embodiment, it is known The speed adjustment amounts for the next three cycles are as follows: , , Therefore, the first cycle in the future: The second cycle in the future: The third cycle in the future: That is, the load linear velocity adjustment amounts for the next three cycles are respectively .
[0075] Step 3052: Based on the load linear velocity adjustment amount combined with the target motion velocity in the preset trajectory parameters and the current load position, determine the theoretical position correction amount of the load for each future cycle.
[0076] Optionally, the operation control system first determines the target speed based on the preset trajectory parameters. Determine the theoretical motion direction of the nozzles in each future cycle. (In the circular trajectory, , For the current moment, (For control cycle). Then, the linear velocity adjustment amount obtained in step 3051 is used. Calculate the future number The actual speed of the periodic motion Finally, based on the formula: Position correction amount = Motion speed × Control period × Direction cosine / Sine, the theoretical position correction amount is obtained: , ,in respectively the direction of motion and axis, The cosine of the angle between the axes.
[0077] Continuing with the above embodiments, it is known that... The first cycle in the future ; , ; ;but , The second cycle in the future. , , ; ,but , The third cycle in the future , , ; ;but , That is, the theoretical position correction amounts for the next three cycles are respectively...
[0078] Step 3053: Based on the speed adjustment amount of each future cycle, the current speed of the servo motor, and the relationship between torque and load position, generate preliminary candidate speed commands for each future cycle.
[0079] Optionally, the operation control system first calculates the target rotational speed for each future cycle. Its formula is: ( The current rotational speed, For the front (The cumulative value of the speed adjustment over each cycle). Then, combining the relationship between torque and load position, the theoretical position of the nozzle in each future cycle is calculated. Finally, substituting the values into the torque formula yields the target torque. (Torque formula) Where 0.002 and 0.001 are position-to-torque conversion coefficients (calibrated by servo motor hardware parameters), and 0.1 is the basic torque offset. The target speed plus the target torque is used as the initial candidate speed command for each future cycle, ensuring that the command includes both speed and torque control parameters.
[0080] Continuing with the above embodiments, it is known that... .
[0081] Future Cycle 1: ; , ; The initial command 1 is the rotational speed. Torque The second cycle in the future: ; , ; The initial command 2 is the rotational speed. Torque The third cycle in the future: ; , ; ; then initial command 3: rotational speed Torque .
[0082] Step 3054: Integrate the preliminary candidate speed commands for each future cycle in sequence according to the future cycle number, and mark the torque and target position for the corresponding cycle to obtain the preliminary candidate control commands.
[0083] Optionally, the operation control system integrates the preliminary candidate speed commands generated in step 3053 sequentially according to the future control cycle number (from cycle 1 to cycle N) to form an ordered command sequence. Simultaneously, the command for each cycle is labeled with its corresponding "target position" (i.e., the position calculated in step 3053). This ensures that the command is associated with the expected movement position of the nozzle, which facilitates subsequent verification of whether the command can make the nozzle move along the preset trajectory, and finally forms a preliminary set of candidate control commands containing "cycle number - target speed - target torque - target position".
[0084] Continuing with the above embodiment, integrating the preliminary instructions for the next three cycles and marking the target positions yields: Preliminary candidate control instruction 1 (cycle 1): speed 510 r / min, torque 0.2024 N·m, target position (49.951, 2.520255) mm; Preliminary candidate control instruction 2 (cycle 2): speed 513 r / min, torque 0.2025 N·m, target position (50.0013, 2.520557) mm; Preliminary candidate control instruction 3 (cycle 3): speed 514 r / min, torque 0.2026 N·m, target position (50.0514, 2.520908) mm; that is, the preliminary candidate control instructions are a set of the above three ordered instructions.
[0085] Step 3055: Based on the theoretical position correction amount and the motion constraint characteristics of the servo motor, the feasibility of the preliminary candidate control commands is verified to obtain the target candidate control commands.
[0086] Optionally, the operation control system verifies the preliminary candidate control commands item by item based on the theoretical position correction amount, the maximum speed, maximum torque, maximum acceleration, and maximum deceleration of the servo motor, and finally obtains the target candidate control commands, as described in steps 30551-30556.
[0087] This invention achieves a direct correlation between "motor control parameters and load motion parameters" through precise mapping of linear velocity adjustment and rotational speed adjustment; then, by calculating the theoretical position correction, the expected motion trajectory correction direction and magnitude of the nozzle are clarified; then, by generating and integrating preliminary candidate rotational speed commands, a complete control parameter system including speed, torque, and position is constructed; finally, by verifying motion constraints, it is ensured that the commands conform to the motor hardware capabilities and overload or over-range operation is avoided.
[0088] In one embodiment, steps 30551-30556 are described as follows: Step 30551: Correct the target position in the preliminary candidate control command based on the theoretical position correction amount to obtain the target corrected position.
[0089] Optionally, the operation control system adjusts the position based on the theoretical position obtained in step 3052. For the target location in the preliminary candidate control command A secondary correction is performed. This is because the initial target position is calculated based on the current position and the cumulative correction amount, which may contain slight errors. Therefore, it is dynamically adjusted using real-time theoretical correction amounts, the formula of which is: , ,in This is a correction factor (determined by the position detection accuracy; here it is set to 0.8 to balance correction sensitivity and stability). The corrected target position is then obtained. This ensures that the location parameters better match the actual trajectory requirements.
[0090] Continuing with the above embodiments, the initial target location is known: , ; , , , ; In period 1, , Period 2, , Cycle 3: , That is, the target correction positions are respectively
[0091] Step 30552, and in conjunction with the acceleration command determined from the preliminary candidate speed command in the preliminary candidate control command, form a set of command parameters for each cycle.
[0092] Optionally, the operation control system will adjust the target correction position obtained in step 30551. The target speed in the preliminary candidate control command Target torque and the acceleration calculated in step 3055 The parameters are integrated to form a set of instructions for each cycle. The set contains five core parameters: cycle number, target speed, target torque, target corrected position, and acceleration, ensuring that subsequent constraint analysis can cover all dimensions of indicators, including speed, torque, position, and acceleration.
[0093] Continuing with the above embodiments, after integrating all parameters, the instruction parameter set for the three cycles is as follows: Period 1 set: {1, 510 r / min, 0.2024 N·m, (49.9918, 2.520459) mm, 2.5 mm / s} 2}; Period 2 set: {2, 513 r / min, 0.2025 N·m, (50.04154, 2.520799) mm, -1.75 mm / s} 2}; Period 3 set: {3, 514 r / min, 0.2026 N·m, (50.09148, 2.521189) mm, -0.5 mm / s} 2}
[0094] Step 30553: For each cycle of command parameters, a correlation analysis is performed based on each command parameter and the maximum speed constraint parameter, maximum torque constraint parameter, maximum acceleration constraint parameter, and maximum deceleration constraint parameter to determine the single-cycle constraint violation degree.
[0095] Optionally, the operation control system sets a single-cycle constraint violation rate for each constraint in each cycle. This is used to quantify the degree to which command parameters violate motion constraints within a single cycle. Violation amounts are calculated separately for three types of constraints: speed, torque, and acceleration. Specifically, the speed violation amount is: Torque violation amount: (like ≤ ,but The acceleration violations are as follows: Final single-cycle constraint violation rate ,and The range of values is , 1 indicates no violation, 1 indicates a serious violation of all constraints.
[0096] Continuing with the above embodiments, among the known periodic parameters, period 1: ; ; ; ; ; ;but .
[0097] Period 2: ; ; ; ; ; ; Cycle 3: ; ; ; ; ; ; That is, the single-cycle constraint violation rate is 0 for all 3 cycles.
[0098] Step 30554: Determine the cumulative constraint impact for the next N periods based on the single-period constraint violation rate.
[0099] Optionally, the operation control system to avoid future The cumulative effect of constraint violations within a period is used to define the cumulative constraint impact level. The calculation employs an exponentially weighted summation method, with higher weights given to constraint violations in recent periods (due to their more direct impact). The formula is as follows: ,in This is the attenuation coefficient (taken as 0.5, used to balance short-term and long-term effects). For the number of future cycles (here) ) The smaller the value, the lower the cumulative constraint risk.
[0100] Continuing with the above embodiments, it is known that... , , .but That is, the cumulative constraint influence is 0.
[0101] Step 30555: Calculate the position change rate of adjacent cycles based on the target correction position, and compare it with the maximum allowable position change rate in the preset trajectory parameters to obtain the position trajectory coherence index.
[0102] Optionally, the operation control system calculates the Euclidean distance between the target correction positions in adjacent cycles. Divide by the control cycle Obtain the rate of change of position And will Maximum allowable rate of change of position relative to preset trajectory Comparison to determine the consistency index of location trajectory ,in, The range of values is 1 indicates complete coherence, and 0 indicates severe incoherence.
[0103] Continuing with the above embodiments, it is known that... , Then, within adjacent periods 1-2: , ; Within 2-3 adjacent periods: , ; That is, the location trajectory continuity index is 1.
[0104] Step 30556: Based on the single-cycle constraint violation degree, cumulative constraint influence degree and position trajectory coherence index, the preliminary candidate control commands are screened to obtain the target candidate control commands.
[0105] Optionally, the operation control system has preset screening thresholds, including single-cycle constraint violation rates. Cumulative constraint influence Location trajectory coherence index For each cycle's initial candidate control command, check if it meets all threshold conditions: if it does, retain the command; if not, return to step 304 to adjust the speed adjustment amount and regenerate the command. The final set of retained commands is the target candidate control command.
[0106] Continuing with the above embodiments, the instruction parameters for each cycle are as follows: , , All preliminary commands meet the screening thresholds, therefore the target candidate control command is: Cycle 1: Rotational speed Torque The target correction position is (49.9918, 2.520459). Cycle 2: Rotational speed Torque Target correction position (50.04154, 2.520799). Cycle 3: Rotational speed Torque The target correction position is (50.09148, 2.521189).
[0107] This invention improves the accuracy of position parameters through secondary correction of the target position, avoiding control deviations caused by initial position errors; it provides complete data support for constraint analysis by integrating a full-dimensional set of command parameters; it quantitatively evaluates the adaptability of commands to motor hardware through single-cycle constraint violation degree and cumulative constraint impact degree, avoiding the risk of constraint accumulation during long-term operation; and it ensures smooth printhead motion trajectory through position trajectory continuity indicators, avoiding print quality problems caused by sudden position changes. The final selected target candidate control commands not only meet the motion constraints of the servo motor (speed, torque, and acceleration are all within safe ranges) but also guarantee the continuity and accuracy of the printhead trajectory.
[0108] In one embodiment, steps 401-405 are described as follows: Step 401: Construct a deviation prediction model for the next N control cycles based on the trajectory deviation data at the current moment, and determine the predicted deviation data for each future cycle.
[0109] Optionally, the operation control system adjusts the current trajectory deviation value. Deviation change rate Using linear prediction models to construct the future A deviation prediction model for each cycle. The model assumes that the rate of change of deviation decays linearly with time (as the effects of load inertia and external disturbances are gradually offset by control commands), then the formula is: ,in (Period number) The deviation attenuation coefficient (obtained by fitting historical deviation data, here) , (For control of the cycle). This model can then be used to calculate the prediction deviation for each future cycle. This constitutes the prediction bias data.
[0110] In one embodiment, it is assumed that Period 1 ( )middle Period 2 ( )middle Period 3 ( )middle That is, the prediction deviation data for the next 3 periods is .
[0111] Step 402: For each target candidate control command, combine the predicted deviation data for the next N periods to determine the deviation influence coefficient of the target candidate control command on each period.
[0112] Optionally, the deviation influence coefficient is determined by the operation control system in conjunction with the predicted deviation data for the next N periods. This is used to quantify the ability of the target candidate control command to correct the deviation within a single cycle. Therefore, the deviation influence coefficient is related to the speed adjustment amount in that cycle. Positive correlation (the larger the speed adjustment, the more significant the linear velocity correction, and the stronger the deviation elimination effect), its formula is: ,in (Linear velocity adjustment amount). (Preset maximum allowable linear velocity fluctuation). The range of values is The larger the value, the stronger the ability of the instruction to correct the cycle deviation.
[0113] Continuing with the above embodiments, it is known that... Calculate the cycle of each of the three candidate instructions. as follows: In candidate 1, period 1: Period 2: Period 3: .
[0114] In candidate 2, period 1: Period 2: Period 3: .
[0115] Of the three candidates, period 1: Period 2: Period 3: .
[0116] Step 403: Based on the deviation influence coefficient and predicted deviation data, calculate the actual deviation correction amount for the next N cycles under the action of each target candidate control command, and obtain the corrected deviation data for each cycle.
[0117] Optionally, the operation control system can adjust the deviation influence coefficient. Deviation from prediction Calculate the actual deviation correction amount for each cycle. (That is, the correction amount is positively correlated with the correction capability and the prediction deviation). Then, the actual correction amount is subtracted from the prediction deviation value to obtain the corrected period deviation data: (i) Ensure that the data reflects the actual deviation state after the instruction is applied.
[0118] Continuing with the above embodiments, according to the embodiment of step 402... The corrected deviations of the three sets of candidate instructions are calculated as follows: In candidate 1, period 1: Period 2: Period 3: The corrected data is as follows: .
[0119] In candidate 2, period 1: Period 2: Period 3: The corrected data is as follows: .
[0120] Of the three candidates, period 1: Period 2: Period 3: The corrected data is as follows: .
[0121] Step 404: Calculate the total trajectory deviation of each target candidate control command over the next N control cycles based on the corrected deviation data for each cycle.
[0122] Optionally, the operation control system performs control commands on each target candidate, taking its future... Deviation data after periodic correction Summing yields the total trajectory deviation. The sum of the deviations directly reflects the overall deviation control effect of the instruction in the future cycle; the smaller the sum, the stronger the instruction's deviation elimination capability.
[0123] Continuing with the above embodiment, the total trajectory deviation of the three candidate commands is calculated as follows: Candidate 1: Candidate 2: Candidate 3: .
[0124] Step 405: Sort the total trajectory deviations of all target candidate control commands and select the target candidate control command with the smallest total deviation as the target control command.
[0125] Optionally, the operation control system sorts the total trajectory deviations of all candidate control commands in ascending order and selects the command with the smallest total deviation as the target control command. If multiple commands have the same total deviation (e.g., candidate 2 and candidate 3), the maximum value of the deviation in each cycle is further compared (the maximum deviation of candidate 2 is [not specified]). The largest deviation of candidate 3 Select the instruction with the smaller maximum deviation to ensure the stability of deviation control.
[0126] Continuing with the above embodiments, the sorting result of the total deviation is: Candidate Further comparison of maximum deviation: Maximum deviation of candidate 2 The largest deviation of candidate 3 Therefore, candidate 3 is selected as the target control command. The system then transmits the command of candidate 3 (in cycle 1) to the target control command. , ; in cycle 2 , ; In cycle 3, 0, 0) is converted into a PWM signal (such as Corresponding PWM duty cycle , Corresponding PWM duty cycle It outputs to the servo motor driver via the RS485 interface.
[0127] This invention utilizes a deviation prediction model to anticipate future trajectory deviations, avoiding the limitations of passive deviation response in traditional control. It quantifies command correction capabilities through a deviation influence coefficient, establishing a direct correlation between command parameters and deviation elimination effects. Based on the corrected deviation data and the total deviation, it achieves an objective quantitative evaluation of candidate commands, eliminating interference from subjective weight settings. The final selected target control command effectively solves the problem of deviation accumulation in PID control, while ensuring small deviation fluctuations and high stability during command execution, significantly improving industrial production accuracy and process stability.
[0128] Furthermore, the industrial servo motor operation control system provided by the present invention will be described below. The industrial servo motor operation control system described below can be referred to in correspondence with the industrial servo motor operation control method described above.
[0129] Optional, refer to Figure 2 , Figure 2 This is a schematic diagram of the structure of the industrial servo motor operation control system provided by the present invention. The industrial servo motor operation control system includes: The acquisition and positioning module 210 is used to acquire motion image data of the load device within a preset trajectory parameter after the servo motor is started based on an industrial camera, and to preprocess and position the motion image data to obtain the real-time position coordinate data of the load device. The trajectory deviation determination module 220 is used to determine the theoretical position coordinate data of the load device at each acquisition time based on the preset trajectory parameters, and compare the real-time position coordinate data with the theoretical position coordinate data to obtain the trajectory deviation data at each acquisition time. The candidate instruction generation module 230 is used to determine multiple target candidate control instructions for future control cycles generated in each control cycle based on trajectory deviation data, combined with the motion correlation characteristics of the servo motor and preset control targets. The instruction filtering and output module 240 is used to evaluate and filter target candidate control instructions based on the strategy of minimizing trajectory deviation data, obtain target control instructions, and output the target control instructions to the servo motor driver after converting them into signals.
[0130] This invention acquires motion image data of a load device using an industrial camera, performs preprocessing and positioning to obtain real-time position coordinate data of the load device, avoiding the limitations of relying solely on the position and speed signals of the motor output shaft. The real-time position coordinate data is then compared with theoretical position coordinate data to obtain trajectory deviation data. Combined with the motion correlation characteristics of the servo motor and the preset control target, candidate control commands for multiple future control cycles are determined within each control cycle. This allows for prediction of the cumulative trend of subsequent trajectory deviations. Furthermore, the candidate control command set is evaluated and filtered based on a strategy to minimize trajectory deviation data, resulting in the target control command with the smallest deviation. This reduces the deviation between the actual trajectory and the preset trajectory, prevents the continuous accumulation of small deviations, improves the accuracy of the load motion trajectory, and avoids deviations from the preset path, ensuring the precision of industrial production and the stability of the production process.
[0131] Please see Figure 3 , Figure 3 An embodiment diagram of an electronic device provided in accordance with the present invention. For example... Figure 3 As shown, this embodiment of the invention provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320. When the processor 320 executes the computer program 311, it performs the following steps: The motion image data of the load device within the preset trajectory parameters is acquired by using an industrial camera to collect motion image data of the load device after the servo motor is started. The motion image data is then preprocessed and located to obtain the real-time position coordinate data of the load device. Based on the preset trajectory parameters, the theoretical position coordinate data of the load device at each acquisition time is determined, and the real-time position coordinate data is compared with the theoretical position coordinate data to obtain the trajectory deviation data at each acquisition time. Based on trajectory deviation data, combined with the motion correlation characteristics of the servo motor and the preset control target, the target candidate control commands for multiple future control cycles generated in each control cycle are determined. The target control command is evaluated and screened based on the strategy of minimizing trajectory deviation data. The target control command is then converted into a signal and output to the servo motor driver.
[0132] Please see Figure 4 , Figure 4 An embodiment diagram of a computer-readable storage medium provided in accordance with an embodiment of the present invention is shown. Figure 4 As shown, this embodiment provides a computer-readable storage medium 400 on which a computer program 311 is stored. When the computer program 311 is executed by a processor, it performs the following steps: The motion image data of the load device within the preset trajectory parameters is acquired by using an industrial camera to collect motion image data of the load device after the servo motor is started. The motion image data is then preprocessed and located to obtain the real-time position coordinate data of the load device. Based on the preset trajectory parameters, the theoretical position coordinate data of the load device at each acquisition time is determined, and the real-time position coordinate data is compared with the theoretical position coordinate data to obtain the trajectory deviation data at each acquisition time. Based on trajectory deviation data, combined with the motion correlation characteristics of the servo motor and the preset control target, the target candidate control commands for multiple future control cycles generated in each control cycle are determined. The target control command is evaluated and screened based on the strategy of minimizing trajectory deviation data. The target control command is then converted into a signal and output to the servo motor driver.
[0133] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the industrial servo motor operation control method provided by the above methods, the method including: The motion image data of the load device within the preset trajectory parameters is acquired by using an industrial camera to collect motion image data of the load device after the servo motor is started. The motion image data is then preprocessed and located to obtain the real-time position coordinate data of the load device. Based on the preset trajectory parameters, the theoretical position coordinate data of the load device at each acquisition time is determined, and the real-time position coordinate data is compared with the theoretical position coordinate data to obtain the trajectory deviation data at each acquisition time. Based on trajectory deviation data, combined with the motion correlation characteristics of the servo motor and the preset control target, the target candidate control commands for multiple future control cycles generated in each control cycle are determined. The target control command is evaluated and screened based on the strategy of minimizing trajectory deviation data. The target control command is then converted into a signal and output to the servo motor driver.
[0134] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0135] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for controlling the operation of an industrial servo motor, characterized in that, include: The motion image data of the load device within the preset trajectory parameters is acquired by using an industrial camera to collect motion image data of the load device after the servo motor is started. The motion image data is then preprocessed and located to obtain the real-time position coordinate data of the load device. Based on the preset trajectory parameters, the theoretical position coordinate data of the load device at each acquisition time is determined, and the real-time position coordinate data is compared with the theoretical position coordinate data to obtain the trajectory deviation data at each acquisition time. Based on trajectory deviation data, combined with the motion correlation characteristics of the servo motor and the preset control target, the target candidate control commands for multiple future control cycles generated in each control cycle are determined. The target control command is evaluated and screened based on the strategy of minimizing trajectory deviation data. The target control command is then converted into a signal and output to the servo motor driver.
2. The industrial servo motor operation control method according to claim 1, characterized in that, The motion-related features include the relationship between rotational speed and load linear velocity, and the relationship between torque and load position; The trajectory deviation data includes the trajectory deviation value and the trajectory deviation change rate; The method, based on trajectory deviation data combined with the motion correlation characteristics of the servo motor and a preset control target, determines multiple target candidate control commands for future control cycles generated within each control cycle, including: Based on the trajectory deviation value and the trajectory deviation change rate, combined with the response speed in the preset control target, a deviation trend quantification value is determined; Based on the deviation trend quantification value and the trajectory tracking accuracy and response speed in the preset control target, the deviation correction requirement is determined. Based on the aforementioned deviation correction requirement, combined with the relationship between the speed of the servo motor and the linear velocity of the load, as well as the relationship between the torque and the load position, the speed adjustment reference amount is determined. Based on the speed adjustment reference amount and the response speed in the preset control target, the speed adjustment amount for the next N control cycles is generated; Based on the speed adjustment amount of each future cycle, combined with the relationship between the speed of the servo motor and the linear speed of the load, as well as the relationship between the torque and the load position, the target candidate control command for each future control cycle is determined.
3. The industrial servo motor operation control method according to claim 2, characterized in that, The target candidate control commands for each future control cycle are determined by combining the speed adjustment amount for each future cycle with the relationship between the speed of the servo motor and the linear velocity of the load, and the relationship between the torque and the load position. These commands include: Based on the speed adjustment amount for each future cycle, combined with the relationship between the speed of the servo motor and the load linear speed, as well as the relationship between the torque and the load position, the load linear speed adjustment amount for the corresponding future cycle is determined. Based on the load linear velocity adjustment amount combined with the target motion velocity in the preset trajectory parameters and the current load position, the theoretical position correction amount of the load in each future cycle is determined. Based on the speed adjustment amount for each future cycle, the current speed of the servo motor, and the relationship between torque and load position, preliminary candidate speed commands for each future cycle are generated. The preliminary candidate speed commands for each future cycle are integrated sequentially according to the future cycle number, and the torque and target position of the corresponding cycle are marked to obtain the preliminary candidate control commands. Based on the theoretical position correction amount and the motion constraint characteristics of the servo motor, the feasibility of the preliminary candidate control command is verified to obtain the target candidate control command.
4. The industrial servo motor operation control method according to claim 3, characterized in that, The motion constraint features include maximum speed constraint parameters, maximum torque constraint parameters, maximum acceleration constraint parameters, and maximum deceleration constraint parameters; The feasibility verification of the preliminary candidate control commands based on the theoretical position correction and the motion constraint characteristics of the servo motor is used to obtain the target candidate control commands, including: Based on the theoretical position correction amount, the target position in the preliminary candidate control command is corrected to obtain the target corrected position. Combined with the acceleration command determined from the preliminary candidate speed command in the preliminary candidate control command, a set of command parameters for each cycle is formed; For each cycle of command parameters, a correlation analysis is performed between each command parameter and the maximum speed constraint parameter, the maximum torque constraint parameter, the maximum acceleration constraint parameter, and the maximum deceleration constraint parameter to determine the single-cycle constraint violation degree. The cumulative constraint impact over the next N periods is determined based on the single-period constraint violation rate. The position change rate of adjacent cycles is calculated based on the target correction position, and compared with the maximum allowable position change rate in the preset trajectory parameters to obtain the position trajectory coherence index. The preliminary candidate control commands are screened based on the single-cycle constraint violation degree, the cumulative constraint influence degree, and the position trajectory coherence index to obtain the target candidate control commands.
5. The industrial servo motor operation control method according to claim 1, characterized in that, The trajectory deviation data also includes the cumulative trajectory deviation value; The strategy based on trajectory deviation data evaluates and filters candidate control commands to obtain target control commands, including: Based on the trajectory deviation data at the current moment, construct a deviation prediction model for the next N control cycles, and determine the predicted deviation data for each future cycle; For each target candidate control command, the deviation impact coefficient of the target candidate control command on each period is determined by combining the predicted deviation data for the next N periods. Based on the deviation influence coefficient and the predicted deviation data, the actual deviation correction amount for the next N cycles under the action of each target candidate control command is calculated to obtain the corrected deviation data for each cycle. Calculate the total trajectory deviation of each target candidate control command over the next N control cycles based on the corrected deviation data for each cycle. Sort the total trajectory deviations of all candidate control commands and select the candidate control command with the smallest total deviation as the target control command.
6. The industrial servo motor operation control method according to claim 1, characterized in that, The process of preprocessing and locating the motion image data to obtain the real-time position coordinate data of the load device includes: For the motion image data, dynamic regions corresponding to the motion of the load device are filtered based on the rate of change of pixel gray values in adjacent images, and a dynamic mask matrix is constructed. Based on the dynamic mask matrix, the pixel grayscale values within the dynamic region are distorted to obtain the corrected pixel grayscale matrix; Based on the pixel grayscale matrix, an edge enhancement matrix is constructed according to the grayscale gradient difference between the pixel and its neighboring pixels; Based on the edge enhancement matrix, continuous pixels with abrupt changes in grayscale value are extracted to obtain the contour feature points of the load device; Based on the contour feature points and the intrinsic and extrinsic parameters of the industrial camera, coordinate correction and positioning are performed to obtain the real-time position coordinate data of the load device.
7. The industrial servo motor operation control method according to claim 6, characterized in that, The process of coordinate correction and positioning based on the contour feature points and the intrinsic and extrinsic parameters of the industrial camera to obtain the real-time position coordinate data of the load device includes: The image coordinates of the contour feature points are corrected at the pixel level based on the lens distortion parameters of the industrial camera to obtain the corrected feature point coordinates. Based on the corrected feature point coordinates and the geometric structural features of the load device, clustering and grouping are performed to obtain multiple feature point cluster groups; For each feature point cluster group, the cluster center coordinates of each feature point cluster group are determined based on the average coordinates of all feature points within the cluster group. Consistency verification is performed based on the cluster center coordinates of each feature point cluster group to obtain the target center coordinates. Then, based on the target center coordinates and the intrinsic and extrinsic parameters of the industrial camera, coordinate transformation is performed to obtain the real-time position coordinate data of the load device.
8. An industrial servo motor operation control system, characterized in that, The industrial servo motor operation control method is applied to any one of claims 1 to 7; the industrial servo motor operation control system includes: The acquisition and positioning module is used to acquire motion image data of the load device within a preset trajectory parameter after the servo motor is started based on an industrial camera, and to preprocess and position the motion image data to obtain the real-time position coordinate data of the load device. The trajectory deviation determination module is used to determine the theoretical position coordinate data of the load device at each acquisition time based on preset trajectory parameters, and compare the real-time position coordinate data with the theoretical position coordinate data to obtain the trajectory deviation data at each acquisition time. The candidate instruction generation module is used to determine the target candidate control instructions for multiple future control cycles generated in each control cycle based on trajectory deviation data, combined with the motion correlation characteristics of the servo motor and preset control targets. The instruction filtering and output module is used to evaluate and filter target candidate control instructions based on the strategy of minimizing trajectory deviation data, obtain target control instructions, and output the target control instructions to the servo motor driver after converting them into signals.
9. An electronic device, characterized in that, include: Memory, used to store computer software programs; A processor is configured to read and execute the computer software program, wherein when the processor executes the computer software program, it implements the industrial servo motor operation control method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, characterized in that, The storage medium stores a computer software program, which, when executed by a processor, implements the industrial servo motor operation control method according to any one of claims 1 to 7.
Citation Information
Cited By
Robot navigation control method and device, robot and storage medium
CN121165744A
General servo system control method and system based on special equipment application
CN121979105A