Control parameter fitting method for linear motion to rotary motion type steering gear
By establishing a nonlinear mapping model for the servo motor through real-time measurement and quadratic polynomial fitting, the problems of low control accuracy and poor consistency of the servo motor were solved, and high-precision and stable angle control was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING AUTOMATION CONTROL EQUIP INST
- Filing Date
- 2026-03-18
- Publication Date
- 2026-07-10
Smart Images

Figure CN122362802A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of servo drive and control technology, and in particular to a method for fitting control parameters of a linear motion to rotary motion servo motor. Background Technology
[0002] In robotics, aerospace, and precision automation equipment, servo motors are core actuators. Conventional rotary servo motors directly output torque, but in some space-constrained or high-thrust scenarios, a linear-rotary servo motor is widely used. This servo motor typically employs a ball screw mechanism to convert the rotary motion of the motor into the linear motion of the screw nut, and then, through a connecting rod, converts the linear motion of the screw nut into the rotary motion of the rocker arm output shaft.
[0003] The core of this type of servo control lies in accurately establishing the mapping relationship between the linear displacement (L) of the lead screw nut and the rotation angle (θ) of the rocker arm output shaft. Existing technologies mainly rely on theoretical kinematic models for control, that is, theoretical calculations are performed by establishing kinematic models.
[0004] However, this method has inherent defects: First, the accuracy is limited. Machining errors of parts, assembly gaps, preload of connecting rods and bearings, etc., cause deviations between the actual motion relationship and the ideal theoretical model. Second, the consistency is poor. Even servo motors produced in the same batch have different L-θ relationships due to individual manufacturing differences. Using a uniform theoretical model cannot guarantee the consistency and accuracy of each product. Third, the adaptability is weak. The theoretical model cannot effectively compensate for the wear and aging that occur during the use of the system.
[0005] Therefore, a method is needed to accurately calibrate the parameters of each individual servo motor in order to improve its absolute positioning accuracy and product consistency. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method for fitting control parameters of a linear motion to rotary motion servo motor, which can solve the problems in the prior art.
[0007] The technical solution of this invention: a method for fitting control parameters of a linear motion to rotary motion servo motor, wherein the method includes:
[0008] The rotation angle θ of the rocker arm output shaft and the linear displacement L of the lead screw nut are measured in real time to form a dataset (L,θ).
[0009] Preprocess the dataset to remove outliers;
[0010] The parameters of the processed dataset are fitted to obtain the fitted model;
[0011] Calculate the coefficient of determination R.2 The root mean square error (RMSE) is used to initially verify the accuracy of the fitted model.
[0012] If the initial validation results meet the accuracy requirements, the accuracy of the fitted model is further validated.
[0013] Once the results are verified to meet the accuracy requirements, the parameters will be solidified and applied.
[0014] In actual control, based on the target rotation angle, the servo controller performs real-time calculations according to the fitted model in closed-loop control mode, drives the servo to move, and records the motion parameters of the servo during the movement process in real time to verify the accuracy and stability of the controller.
[0015] Preferably, the data acquisition step size is 0.1mm to 1mm, and the number of sampling points is not less than 50.
[0016] Preferably, in the MATLAB environment, the least squares method is used to perform quadratic polynomial fitting on the processed dataset to obtain the fitting model.
[0017] Preferably, the fitting model is:
[0018] ,
[0019] Where a, b, and c are fitting coefficients.
[0020] Preferably, the MATLAB fitting is implemented using the polyfit(L,θ,2) function.
[0021] Preferably, the initial verification of the accuracy of the fitted model includes:
[0022] If both the coefficient of determination R² and the root mean square error RMSE meet the criteria, then the fit is considered valid and the accuracy requirement is met.
[0023] Preferably, parameter solidification and application includes: writing the fitting coefficients a, b, and c into the FLASH or register of the servo controller.
[0024] The above technical solution can collect corresponding data on the linear extension length of the lead screw nut and the rotation angle of the rocker arm output shaft. The collected data is then subjected to quadratic polynomial fitting to establish a high-precision nonlinear mapping model. The fitting parameters are then written into the servo control unit to achieve high-precision angle control, thereby solving the problems of low control accuracy and poor individual consistency caused by reliance on theoretical models in the existing technology. Attached Figure Description
[0025] The accompanying drawings, which form part of this specification, are provided to further illustrate embodiments of the invention and, together with the textual description, explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0026] Figure 1 A flowchart of a method for fitting control parameters of a linear motion to rotary motion servo motor provided in an embodiment of the present invention;
[0027] Figure 2 This is a schematic diagram illustrating the mechanical structure of the linear-rotary conversion servo motor in an embodiment of the present invention.
[0028] Figure 3 This is a comparison chart of the original data collected in this embodiment of the invention and the fitting curve of the quadratic polynomial;
[0029] Figure 4 This is a schematic diagram of the real-time control process after the structure and parameters of the servo control system in an embodiment of the present invention have been solidified.
[0030] Explanation of reference numerals in the attached figures
[0031] 1 Gearbox, 2 Ball screw assembly, 3 Connecting rod, 4 Rocker arm output shaft. Detailed Implementation
[0032] Specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings. In the following description, specific details are set forth for purposes of explanation and not limitation, in order to aid in a thorough understanding of the invention. However, it will be apparent to those skilled in the art that the invention may be practiced in other embodiments departing from these specific details.
[0033] It should be noted that, in order to avoid obscuring the invention with unnecessary details, only the device structure and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.
[0034] Figure 1 This is a flowchart illustrating a method for fitting control parameters of a linear motion to rotary motion servo motor, as provided in an embodiment of the present invention.
[0035] The method is a control parameter fitting method for establishing the mapping relationship between the linear telescopic length and the rotation angle of the rocker arm output shaft. Specifically, it is a parameter modeling and control strategy based on quadratic polynomial fitting.
[0036] like Figure 1As shown, this embodiment of the invention provides a method for fitting control parameters of a linear motion to rotary motion servo motor, wherein the method includes:
[0037] The rotation angle θ of the rocker arm output shaft and the linear displacement L of the lead screw nut are measured in real time to form a dataset (L,θ).
[0038] Preprocess the dataset to remove outliers to ensure data smoothness and consistency;
[0039] The parameters of the processed dataset are fitted to obtain the fitted model;
[0040] In other words, a simple mathematical model is used to describe the actual nonlinear motion relationship of an individual servo motor.
[0041] Calculate the coefficient of determination R. 2 The root mean square error (RMSE) is used to initially verify the accuracy of the fitted model.
[0042] If the initial validation results meet the accuracy requirements, the accuracy of the fitted model is further validated.
[0043] Once the results are verified to meet the accuracy requirements, the parameters will be solidified and applied.
[0044] In actual control, based on the target rotation angle, the servo controller performs real-time calculations according to the fitted model in closed-loop control mode, drives the servo to move, and records the motion parameters (such as the actual output angle and related system performance) during the servo movement process in real time to verify the accuracy and stability of the controller, achieve precise angle output, and thus realize high-precision closed-loop control.
[0045] The above technical solution can collect corresponding data on the linear extension length of the lead screw nut and the rotation angle of the rocker arm output shaft. The collected data is then subjected to quadratic polynomial fitting to establish a high-precision nonlinear mapping model. The fitting parameters are then written into the servo control unit to achieve high-precision angle control, thereby solving the problems of low control accuracy and poor individual consistency caused by reliance on theoretical models in the existing technology.
[0046] For data acquisition, high-precision data acquisition can be achieved in the following way: On a dedicated test platform, the lead screw nut of the servo motor is controlled to move within its entire range. At the same time, a high-precision angle sensor is used to measure the angle θ (unit: °) of the rocker arm output shaft in real time, and the linear displacement L (unit: mm) of the lead screw nut is recorded simultaneously to form a dataset (L, θ).
[0047] According to one embodiment of the present invention, the data acquisition step size is 0.1mm to 1mm, and the number of sampling points is not less than 50.
[0048] According to one embodiment of the present invention, in the MATLAB environment, the least squares method is used to perform quadratic polynomial fitting on the processed dataset to obtain the fitting model.
[0049] According to one embodiment of the present invention, the fitting model is as follows:
[0050] ,
[0051] Where a, b, and c are fitting coefficients.
[0052] According to one embodiment of the present invention, MATLAB fitting is implemented using the polyfit(L,θ,2) function.
[0053] According to one embodiment of the present invention, the initial verification of the accuracy of the fitted model includes:
[0054] If both the coefficient of determination R² and the root mean square error RMSE meet the criteria, then the fit is considered valid and the accuracy requirement is met.
[0055] Further validation of the fitted model includes: conducting independent tests at multiple intermediate angles that were not involved in the fitting, inputting the results into the fitted model, comparing the deviations, and thus further validating the model's accuracy.
[0056] According to one embodiment of the present invention, parameter solidification and application includes: writing the fitting coefficients a, b, and c into the FLASH or register of the servo controller.
[0057] According to one embodiment of the present invention, the servo motor of the present invention can use a "lead screw-connecting rod-rocker arm output shaft" mechanism to realize the conversion from linear motion to rotary motion. For example... Figure 2 As shown, the servo motor includes: a gearbox 1, a ball screw assembly 2, a connecting rod 3, a rocker arm output shaft 4, a position sensor, and an embedded control unit. When the servo motor drives the ball screw to rotate, the ball screw nut moves linearly along the axial direction, which in turn drives the rocker arm output shaft to rotate via the connecting rod, thereby achieving angle output. Ideally, θ has a non-linear relationship with L, but due to factors such as assembly clearance, connecting rod deformation, and ball screw lead error, the actual response deviates from the theoretical model.
[0058] The following detailed description of a linear motion to rotary motion servo control parameter fitting method of the present invention, with specific examples, is provided below.
[0059] 1. Data Acquisition System Setup
[0060] To achieve high-precision data acquisition, a dedicated automated testing platform was constructed, mainly comprising: an industrial PLC controller for coordinating the testing process; a laser displacement sensor for measuring the linear displacement of the lead screw nut; a high-precision magnetic encoder for real-time measurement of the rotation angle of the rocker arm output shaft; and a host computer (PC) for receiving synchronous data via a serial port. During the test, the servo motor, controlled by a driver, completes three full-stroke reciprocating motions at a constant speed, and the data from the middle stroke is collected to reduce the impact of transients during start-stop operations. Test conditions may include: angle range ±30°; lead screw travel ±50 mm; acquisition step size set to 0.5 mm; and a total of 200 valid data points are collected, forming the original dataset (L, θ).
[0061] 2. Data Preprocessing
[0062] The original dataset was imported into the MATLAB environment for preprocessing: a 3-point moving average filter was used to smooth the (L, θ) sequence and suppress high-frequency noise; a difference method was used to detect abrupt changes: if the angle change rate between two adjacent points exceeded a set threshold, it was marked as an anomaly and removed; linear interpolation was used to complete the remaining data to ensure data continuity; finally, a smooth and consistent dataset was obtained for fitting.
[0063] 3. Quadratic polynomial fitting modeling
[0064] Execute the code in MATLAB to perform parameter fitting and obtain the quadratic equation. The fitting yields a, b, c, and R. 2 If R^2 and RMSE meet the judgment criteria, then the fit is valid.
[0065] 4. Model Validation
[0066] To further verify the model's accuracy, independent tests can be performed at five intermediate angles not involved in the fitting: control the servo motor to position it to the target angle; record the actual lead screw and nut position L; and deduce the theoretical command based on the model. The test results show that the maximum residual and the mean absolute error meet the judgment criteria, indicating that the model has good extrapolation ability and engineering applicability, and meets the accuracy requirements.
[0067] 5. Controller Integration
[0068] In practical use, the fitted coefficients a, b, and c are programmed into the controller for data processing in the control software. The linear position feedback is then calculated in real-time using a function to convert it into the angle value output by the current servo motor. This function is integrated into the data acquisition and processing module and is executed every 0.5ms, calculating the real-time output angle based on the potentiometer feedback linear value L. The value is then used as the closed-loop feedback value of the position loop to input into the PID controller, driving the servo motor to move.
[0069] 6. Actual control effect
[0070] Test the servo performance in closed-loop control mode: Set a step target: from -30°→-20°→-10°→0°→10°→20°→30°; use an external laser tracker to record the actual output angle; calculate the steady-state error and the repeatability error after 20 consecutive cycles. If the judgment criteria are met, it indicates that the system has good stability.
[0071] This example demonstrates the feasibility and engineering advantages of the method of this invention through a real hardware platform and a complete process. By using experimental data-driven modeling, quadratic polynomial fitting, and parameter solidification, the control deviation problem caused by mechanical nonlinearity is effectively solved, achieving high-precision, high-consistency, and fast-response angle control, which has broad application value.
[0072] As can be seen from the above embodiments, the linear motion to rotary motion servo motor control parameter fitting method of the present invention has at least the following beneficial effects:
[0073] (1) High precision: Through experimental data fitting, mechanical errors are effectively compensated, and precise calibration of each individual servo motor is achieved. At the same time, the nonlinear relationship between linear displacement and rotation angle is accurately described through quadratic polynomial fitting, which greatly improves the control precision of absolute angle.
[0074] (2) Good consistency: Each product is calibrated independently, eliminating individual differences and ensuring the consistency of performance of batch products;
[0075] (3) Fast response speed, the fitting parameters can be fixed in the controller, without the need for real-time table lookup or complex calculation;
[0076] (4) Strong robustness, improving the stability and reliability of the servo motor in high-load and high-precision application scenarios;
[0077] (5) The method is highly versatile. It does not rely on complex theoretical models and is applicable to various types of rotary output mechanisms such as "screw-connecting rod-rocker output shaft". It is cost-effective. It can quickly complete calibration by using mature software tools and automated testing processes, making it suitable for mass production.
[0078] The features described and / or illustrated above with respect to one embodiment may be used in the same or similar manner in one or more other embodiments, and / or in combination with or in lieu of features in other embodiments.
[0079] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, whole, step, or component, but does not exclude the presence or addition of one or more other features, wholes, steps, components, or combinations thereof.
[0080] The apparatus and methods described above can be implemented in hardware or in combination with software. This invention relates to computer-readable programs that, when executed by a logic component, enable that logic component to implement the apparatus or constituent parts described above, or to implement the various methods or steps described above. This invention also relates to storage media for storing the above programs, such as hard disks, magnetic disks, optical disks, DVDs, flash memory, etc.
[0081] Many features and advantages of these embodiments are apparent from this detailed description, and therefore the appended claims are intended to cover all such features and advantages of these embodiments that fall within their true spirit and scope. Furthermore, since many modifications and alterations will readily occur to those skilled in the art, the embodiments of the invention are not intended to be limited to the precise structures and operations illustrated and described, but rather to encompass all suitable modifications and equivalents falling within their scope.
[0082] The parts of this invention not described in detail are techniques known to those skilled in the art.
Claims
1. A method for fitting control parameters of a linear motion to rotary motion servo motor, characterized in that, The method includes: The rotation angle θ of the rocker arm output shaft and the linear displacement L of the lead screw nut are measured in real time to form a dataset (L,θ). Preprocess the dataset to remove outliers; The parameters of the processed dataset are fitted to obtain the fitted model; Calculate the coefficient of determination R. 2 The root mean square error (RMSE) is used to initially verify the accuracy of the fitted model. If the initial validation results meet the accuracy requirements, the accuracy of the fitted model is further validated. Once the results are verified to meet the accuracy requirements, the parameters will be solidified and applied. In actual control, based on the target rotation angle, the servo controller performs real-time calculations according to the fitted model in closed-loop control mode, drives the servo to move, and records the motion parameters of the servo during the movement process in real time to verify the accuracy and stability of the controller.
2. The method according to claim 1, characterized in that, The data acquisition step size is 0.1mm to 1mm, and the number of sampling points is no less than 50.
3. The method according to claim 2, characterized in that, In the MATLAB environment, the least squares method is used to perform quadratic polynomial fitting on the processed dataset to obtain the fitted model.
4. The method according to claim 3, characterized in that, The fitted model is: , Where a, b, and c are fitting coefficients.
5. The method according to any one of claims 1-4, characterized in that, MATLAB fitting is achieved using the polyfit(L,θ,2) function.
6. The method according to any one of claims 1-5, characterized in that, Initial validation of the accuracy of the fitted model includes: If both the coefficient of determination R² and the root mean square error RMSE meet the criteria, then the fit is considered valid and the accuracy requirement is met.
7. The method according to claim 1, characterized in that, The parameter solidification and application process includes writing the fitting coefficients a, b, and c into the FLASH or register of the servo controller.