Accurate distance adjusting method for servo motor

By combining fuzzy control and predictive control, and using the flock optimization (CSO) algorithm to optimize the proportional factor of the fuzzy controller, the problems of lag and large overshoot in traditional PID control for servo motors are solved. This enables fast and accurate pitch adjustment of the servo motor, improving the dynamic response speed and steady-state accuracy of the system.

CN121887076APending Publication Date: 2026-04-17QINGDAO TECHN COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINGDAO TECHN COLLEGE
Filing Date
2025-12-05
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Traditional PID control struggles to balance fast response and high steady-state accuracy in high-speed, high-precision control scenarios for permanent magnet synchronous servo motors. Especially under load disturbances and changes in operating conditions, the system response lags, overshoots large, and steady-state errors large, leading to a decrease in production efficiency.

Method used

By combining fuzzy control and predictive control, the proportional factor of the fuzzy controller is optimized using the flock optimization (CSO) algorithm. The fuzzy PID parameters are adjusted by predictive deviation and its rate of change, thereby achieving precise pitch control of the servo motor.

Benefits of technology

Significantly reduces overshoot, improves dynamic tracking speed, enhances the system's dynamic response speed and steady-state accuracy, strengthens anti-disturbance performance, and ensures that the servo motor reaches and remains stable in a shorter time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121887076A_ABST
    Figure CN121887076A_ABST
Patent Text Reader

Abstract

The invention discloses a precise distance adjusting method for a servo motor, and relates to the technical field of servo motor control, and the method comprises the following steps: initializing key parameters; predicting an output state in a future sampling period; optimizing the scale factor by adopting a chicken flock optimization CSO algorithm; based on a fuzzy controller, solving the parameter adjusting quantity of PID (Proportion Integration Differentiation); and performing combined updating with the PID initial parameter, and calculating to obtain a final PID control parameter. The advantages of fuzzy control and predictive control algorithms are fully combined, and the predictive deviation of output control and the change rate of the predictive deviation serve as input of fuzzy control, so that the fuzzy PID controller has the active response capability to the future trend for the first time; an open-loop optimization problem of a finite time domain is solved through sampled measurement data, a fuzzy control decision is optimized through a CSO algorithm to carry out fine adjustment on PID control parameters, finally, an optimal value of the PID control parameters is obtained, and accurate control over the motor is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of servo motor control technology, specifically a method for precise pitch adjustment of a servo motor. Background Technology

[0002] Permanent magnet synchronous servo motors, due to their advantages such as compact structure, high torque density, low energy consumption, good control flexibility, and long-term reliable operation, have become the core power actuators in industrial automation equipment, CNC machine tools, robots, packaging equipment, printing equipment, automated handling platforms, and high-precision position adjustment equipment. As industrial equipment continues to evolve towards higher speeds, higher precision, and higher stability, the dynamic control performance and steady-state accuracy of servo systems have become crucial factors determining the equipment's operational capabilities. However, in real-world operating conditions, due to factors such as load disturbances, friction effects, mechanical backlash, and changes in operating conditions, the system often exhibits problems such as response lag, excessive overshoot, large steady-state errors, and insufficient control precision, leading to decreased production efficiency and the inability to achieve the expected equipment pitch adjustment accuracy.

[0003] Traditional industrial control systems widely employ PID control strategies. PID control uses the deviation between the target value and the actual measured value, employing proportional (P), integral (I), and derivative (D) adjustments to achieve real-time correction of the system. It features simple algorithms, transparent structure, and high feasibility. However, classic PID is essentially a linear control method with fixed parameters, and its adaptability to system nonlinearity, uncertainty, and external disturbances is limited. When operating conditions change significantly or the load exhibits complex dynamic characteristics, traditional PID struggles to simultaneously achieve fast response and high steady-state accuracy. This limitation is particularly pronounced in high-speed, high-precision control scenarios for permanent magnet synchronous servo motors.

[0004] Based on this, scholars have proposed various improvement strategies. For example, fuzzy control has the advantage of not relying on precise mathematical models, allowing for online tuning of PID parameters and enhancing the system's adaptability to complexity and uncertainty; neural network-optimized PID has stronger nonlinear fitting capabilities, enabling global search and adaptive adjustment. Genetic algorithms (GA) are also frequently used to search the PID parameter space, compensating for the shortcomings of traditional parameter tuning which relies on experience. However, these improvement methods still have some inherent problems: such as the complexity of neural network structures and the long parameter training cycle, making them difficult to apply directly in high real-time control scenarios; although fuzzy control improves online adjustment capabilities, its steady-state accuracy is still easily affected by system complexity due to limitations in the number of fuzzy rules, the selection of membership functions, and controller complexity. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method for precise pitch adjustment of a servo motor, thereby solving the problems mentioned in the background section.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] In a first aspect, the present invention provides a method for precise pitch adjustment of a servo motor, comprising the following steps:

[0008] S1. Initialize the key parameters of the servo motor control system;

[0009] S2. Enter the predictive control phase to predict the output state within the next sampling period;

[0010] S3. The proportional factor in the fuzzy controller is optimized using the chicken flock optimization (CSO) algorithm.

[0011] S4. Solve for the parameter adjustment of PID based on fuzzy controller;

[0012] S5. After obtaining the PID parameter adjustment amount, the final PID control parameters are calculated by combining and updating them with the initial PID parameters, thereby achieving precise pitch adjustment of the servo motor.

[0013] To further optimize this technical solution, in step S1, the key initialization parameters include PID initial parameters, prediction model parameters, fuzzy controller parameters, and flock settings for the chicken flock optimization (CSO) algorithm.

[0014] To further optimize this technical solution, the initial values ​​of the proportional, integral, and derivative parameters of the PID controller in the initial parameters of the PID controller are set to Kp0, Ki0, and Kd0, respectively.

[0015] The prediction model parameters specify the sampling period T, the reference trajectory time constant τ, and set the prediction deviation as ê and the prediction deviation change rate as c. ê ;

[0016] The fuzzy language settings in the fuzzy controller parameters are NB, NM, NS, ZO, PS, PM, PB; the fuzzy subset universe of discourse is [-5,5]; and the fuzzy membership functions are trigonometric functions; ê and c ê The corresponding proportional factors are Kê and Kcê, with values ​​ranging from [0,2]; the proportional factors corresponding to the initial values ​​of the proportional, integral, and derivative functions of the PID controller are K. pG K iG K dG The values ​​range from [0,20], [0,20], and [0,10], respectively.

[0017] In the population settings of the CSO algorithm, the number of iterations is M, the total number of chickens is N, the population relationship update frequency is G, the number of roosters is RN, the number of hens is HN, the number of chicks is CN, and the number of hen leadership relationships is MN.

[0018] To further optimize this technical solution, step S2 involves predicting the output state within a future sampling period, including:

[0019] Model predictive control (MPC) is employed, utilizing the exponential form of the reference trajectory to smoothly transition from the current state to the setpoint, and calculating the prediction deviation ê and the rate of change of prediction deviation c. ê ;

[0020] The prediction bias ê is calculated based on the deviation between the predicted output and the desired trajectory; the prediction bias change rate c ê Used to describe the trend of deviation.

[0021] To further optimize this technical solution, in step S3, when using the Chicken Optimization (CSO) algorithm to optimize the scaling factor, an objective function for the optimization process is constructed, as shown below:

[0022]

[0023] Where e(t) is the systematic bias, t is time, and the fitness function of an individual chicken is Fit=1 / J;

[0024] When the objective function is optimized to obtain the minimum J, the optimal fuzzy control scaling factor is obtained.

[0025] To further optimize this technical solution, the flock optimization (CSO) algorithm is optimized by a scaling factor, including:

[0026] Initialize parameters;

[0027] Initialize the chicken flock;

[0028] Iteration;

[0029] Individual location update;

[0030] Determine the iteration conditions;

[0031] Output the optimal value of the scaling factor;

[0032] The process involves initializing the flock, establishing a multi-level relationship between roosters, hens, and chicks, sorting them according to a fitness function, updating the position of each individual, and re-evaluating their fitness. This iterative process continues until the optimal solution or the maximum number of iterations is reached.

[0033] To further optimize this technical solution, in step S4, the parameter adjustment of the PID is solved based on the fuzzy controller, including:

[0034] Define input and output variables;

[0035] Fuzzy domain transformation;

[0036] Fuzzy reasoning is performed based on a pre-set fuzzy rule base.

[0037] To further optimize this technical solution, in step S4, the input and output variables are defined, including:

[0038] The prediction bias ê and its rate of change of prediction bias c ê As input variables to the fuzzy model, the adjustment amounts of the proportional coefficient, integral coefficient, and derivative coefficient in the PID parameters are used as output variables of the fuzzy model.

[0039] To further optimize this technical solution, step S4, the fuzzy domain transformation, includes:

[0040] The prediction bias ê and its rate of change of prediction bias c ê Transformed by the corresponding scaling factors Kê and Kcê, the results enter the fuzzy domain and are mapped to fuzzy linguistic variables E∈[-5,5] and EC∈[-5,5].

[0041] To further optimize this technical solution, in step S4, fuzzy inference is performed based on a preset fuzzy rule base, including:

[0042] Fuzzy inference is performed on E and EC according to fuzzy rules, followed by defuzzification. The resulting fuzzy quantities are then multiplied by the scaling factor K. pG K iG K dG The adjustment ΔK of the proportional coefficient, integral coefficient, and derivative coefficient in the PID parameters is obtained. p ΔK i ΔK d .

[0043] In a second aspect, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein the computer program instructions, when executed by the processor, implement the steps of a servo motor precise pitch adjustment method as described in the first aspect of the present invention.

[0044] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program instructions are executed by a processor, they implement the steps of a servo motor precise pitch adjustment method as described in the first aspect of the present invention.

[0045] Compared with the prior art, the present invention provides a method for precise pitch adjustment of a servo motor, which has the following beneficial effects:

[0046] This precise pitch adjustment method for servo motors fully combines the advantages of fuzzy control and predictive control algorithms. It uses the predicted deviation and rate of change of the output control as input to the fuzzy control, enabling the fuzzy PID controller to proactively respond to future trends for the first time. Therefore, the system can intervene in advance to adjust when load changes, operating conditions change, or disturbances occur, significantly reducing overshoot and accelerating dynamic tracking speed. By solving a finite-time open-loop optimization problem using sampled measurement data, the PID control parameters are obtained. Then, the data at the next moment is sampled to update the optimization problem and solve it. Finally, the fuzzy control decision is optimized using the CSO algorithm to fine-tune the PID control parameters, ultimately obtaining the optimal values ​​of the PID control parameters and achieving precise control of the motor. Attached Figure Description

[0047] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a flowchart illustrating a precise pitch adjustment method for a servo motor proposed in this invention.

[0049] Figure 2 This is a comparison chart showing the optimization effect of the precise pitch adjustment method for servo motors proposed in this invention. Detailed Implementation

[0050] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0051] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0052] Secondly, the term "an embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single embodiment or an embodiment selectively excluded from other embodiments.

[0053] Example 1:

[0054] This embodiment provides a method for precise pitch adjustment of a servo motor, including the following steps:

[0055] S1. Initialize the key parameters of the servo motor control system to ensure that subsequent predictive control, fuzzy inference and optimization algorithms can all run within the clear parameter boundaries;

[0056] Key initialization parameters include PID initial parameters, prediction model parameters, fuzzy controller parameters, and flock settings for the chicken flock optimization (CSO) algorithm.

[0057] Wherein, the initial values ​​of the proportional, integral, and derivative parameters of the PID controller in the initial parameters of the PID controller are set to Kp0, Ki0, and Kd0, respectively;

[0058] The prediction model parameters specify the sampling period T, the reference trajectory time constant τ, and set the prediction deviation as ê and the prediction deviation change rate as c. ê ;

[0059] The fuzzy language settings in the fuzzy controller parameters are NB, NM, NS, ZO, PS, PM, PB; the fuzzy subset universe of discourse is [-5,5]; and the fuzzy membership functions are trigonometric functions; ê and c ê The corresponding proportional factors are Kê and Kcê, with values ​​ranging from [0,2]; the proportional factors corresponding to the initial values ​​of the proportional, integral, and derivative functions of the PID controller are K. pG K iG K dG The values ​​range from [0,20], [0,20], and [0,10], respectively.

[0060] In the population settings of the CSO algorithm, the number of iterations is M, the total number of chickens is N, the population relationship update frequency is G, the number of roosters is RN, the number of hens is HN, the number of chicks is CN, and the number of hen leadership relationships is MN.

[0061] S2. After completing parameter initialization, the predictive control phase is entered to predict the output state within the next sampling period.

[0062] Predicting the output state for a future sampling period includes:

[0063] Model predictive control (MPC) is employed, utilizing the exponential form of the reference trajectory to smoothly transition from the current state to the setpoint, and calculating the prediction deviation ê and the rate of change of prediction deviation c. ê ;

[0064] The prediction bias is:

[0065] The rate of change of prediction bias is:

[0066] In the formula:

[0067]

[0068] in, To predict bias, As a reference trajectory for the process, To output the predicted value, To predict the rate of change of deviation, α is the reference trajectory time constant, and c is the output setpoint. The desired output is defined by the reference trajectory that smoothly transitions from the current value to the setpoint, using a first-order exponential variation.

[0069] The prediction bias ê is calculated based on the deviation between the predicted output and the desired trajectory; the prediction bias rate of change c ê Used to describe the changing trend of deviation. By incorporating feedforward information into the control process through MPC, it is possible to identify in advance whether the system may experience response lag or deviation deterioration, providing trended input for subsequent fuzzy inference.

[0070] S3. The flock optimization (CSO) algorithm is used to optimize the proportional factor in the fuzzy controller to ensure that the sensitivity and regulation intensity of fuzzy inference remain optimal under dynamic conditions.

[0071] When using the Chicken Optimization (CSO) algorithm for scaling factor optimization, an objective function for the optimization process is constructed as follows:

[0072]

[0073] Where e(t) is the system bias, t is time, and the fitness function of an individual chicken is Fit=1 / J; the role differentiation mechanism of roosters, hens, and chicks in CSO enables the automatic formation of a competition and cooperation structure within the population, avoiding getting trapped in local extrema; through the dynamic evaluation of the fitness function, the optimal scaling factor gradually approaches the optimal solution in a large number of iterations, ultimately ensuring that the output of the fuzzy controller is more accurate.

[0074] When the objective function is optimized to the minimum value of J, the optimal scaling factor for fuzzy control is obtained. The specific steps are as follows:

[0075] S3.1 Initialize parameters;

[0076] The initial configuration algorithm parameters mainly consist of M, N, G, and D.

[0077] S3.2 Initialize the chicken flock;

[0078] The chicken flock is sorted and graded according to fitness values, with roosters being the top RN individuals, chicks being the bottom CN individuals, and the rest being hens. The flock is divided into RN groups based on the number of roosters, and hens are randomly assigned to each group, establishing rooster-hen partnerships. MN hens are randomly selected to lead chicks, establishing mother-child relationships.

[0079] S3.3 iteration;

[0080] First, determine whether it is necessary to update the group and the relationships within the flock. If so, update the flock group and the relationships within the flock. Otherwise, update the positions of the rooster, hen, and chicks one by one according to their respective position update strategies, and calculate the fitness value of the updated position.

[0081] S3.4 Individual location update;

[0082] The fitness value of the new position is compared with the fitness value of the original position. If the fitness value of the new position is smaller, the individual position is updated; otherwise, the original position is kept unchanged.

[0083] S3.5 Determine the iteration conditions;

[0084] If the solution is not optimal or the maximum number of iterations has been reached, stop iterating and output the optimal solution. Otherwise, return to S3.3 and iterate in a loop to search.

[0085] S3.6 outputs the optimal value of the scaling factor;

[0086] Output optimized scaling factors Kê, Kcê, K pG K iG K dG .

[0087] The process involves initializing the flock, establishing a multi-level relationship between roosters, hens, and chicks, sorting them according to a fitness function, updating the position of each individual, and re-evaluating their fitness. This iterative process continues until the optimal solution or the maximum number of iterations is reached.

[0088] S4. Solve for the parameter adjustment of PID based on fuzzy controller;

[0089] Define input and output variables;

[0090] The prediction bias ê and its rate of change of prediction bias c ê As input variables to the fuzzy model, the adjustment amounts of the proportional coefficient, integral coefficient, and derivative coefficient in the PID parameters are used as output variables of the fuzzy model.

[0091] Fuzzy domain transformation;

[0092] The prediction bias ê and its rate of change of prediction bias c ê Transformed by the corresponding scaling factors Kê and Kcê, the results enter the fuzzy domain and are mapped to fuzzy linguistic variables E∈[-5,5] and EC∈[-5,5].

[0093] Fuzzy reasoning is performed based on a pre-set fuzzy rule base;

[0094] Fuzzy inference is performed on E and EC according to fuzzy rules, followed by defuzzification. The resulting fuzzy quantities are then multiplied by the scaling factor K. pG K iG K dG The adjustment ΔK of the proportional coefficient, integral coefficient, and derivative coefficient in the PID parameters is obtained. p ΔK i ΔK d .

[0095] The inference result is scaled by a scaling factor to obtain the actual PID control, thus achieving flexible compensation for the traditional PID structure. Fuzzy inference is performed using prediction deviations and their trends, enabling the PID parameters to automatically adjust in real time according to changes in operating conditions.

[0096] S5. After obtaining the PID parameter adjustment amount, the final PID control parameters are calculated by combining and updating them with the initial PID parameters, thereby achieving precise pitch adjustment of the servo motor.

[0097] The final PID control parameters are obtained by performing the following formula:

[0098]

[0099] The obtained K p K i K d This will directly drive the servo system to execute the adjustment command, significantly improving the control system's dynamic response speed, steady-state accuracy, anti-disturbance performance, and overall control stability.

[0100] Example 2:

[0101] Reference Figures 1-2 The precise pitch adjustment method for servo motors described in Example 1 is used in a specific application. For example... Figure 1 As shown, the system first enters the parameter initialization phase, setting the initial parameters for the PID controller, the predictive model, the fuzzy controller, and the flocking structure of the CSO (Chicken Strike Optimization) algorithm, thus providing the control system with an executable initial environment. Next, the process presents a sensor signal path fed back from the motor: the sensors are responsible for real-time acquisition of the servo motor's operating status, especially the motor's actual output, such as speed, position, or current—dynamic signals related to motor operation. The actual output values ​​acquired by the sensors are directly used as inputs for subsequent calculations of deviation, prediction deviation, and their rates of change, providing fundamental data for the entire predictive control chain.

[0102] Within each sampling period, the predictive control module uses the current output value acquired by the sensor and the reference trajectory to calculate the single-step prediction error ê and the prediction error change rate c. êThis predictive information not only reflects the difference between the current state and the target, but also describes future trends in the form of an exponential trajectory, which can be used to predict in advance potential response lags or error propagation phenomena in the system.

[0103] Subsequently, CSO optimization is performed, iteratively optimizing the scaling factor of the fuzzy controller through the objective function to ensure that the fuzzy inference process maintains sensitivity, accuracy, and adaptability in each sampling period. After obtaining the optimal scaling factor, the prediction bias ê and the rate of change of prediction bias c are... ê The system enters fuzzy control mode, is scaled and mapped to the fuzzy domain by a scaling factor, performs fuzzy inference using membership functions and rule bases, and then outputs three PID control variables through a defuzzification process.

[0104] Finally, the PID control module updates the current PID parameters based on the adjustment amount and immediately outputs a drive signal to control the servo motor. During this period, the motor's operating status is again collected by the sensor and fed back to the prediction module.

[0105] like Figure 2 The figure shows a comparison of the speed response time of two servo motors under the same operating conditions: one using a traditional PID control method and the other using the method proposed in this invention. It is clearly observed from the figure that the traditional PID control strategy exhibits significant response lag in the initial stage, with a large ramp-up time before the motor speed reaches the target speed, accompanied by a certain degree of overshoot, resulting in a long transition range for the motor speed before stabilization. In contrast, by introducing the prediction deviation and its rate of change for feedforward adjustment, and optimizing the proportional factor of the fuzzy controller through CSO, the PID parameters can adaptively update according to the motor state in each sampling period. Therefore, the motor speed curve rapidly approaches the target value after startup, and the overall response time is significantly shortened.

[0106] from Figure 2 The curve trend shows that: the present invention has a faster ascent speed in the dynamic stage, almost eliminating the initial lag region common in traditional PID; when approaching the target value, due to the real-time compensation of the fuzzy regulation, the overshoot is significantly reduced, and the motor enters the steady-state region in a shorter time; at the same time, the speed curve is smoother throughout the process, without the fluctuations and secondary regulation phenomena found in traditional PID curves. Overall, Figure 2 This demonstrates that the present invention outperforms traditional PID control in terms of dynamic response speed, steady-state accuracy, and control stability.

[0107] therefore, Figure 2The results directly demonstrate that this invention can significantly shorten the response time during servo motor pitch adjustment, improve the system's tracking speed and control stability, and enable the servo motor to reach the target speed and maintain stable operation in a shorter time. This effect indirectly proves that the control structure combining predictive control and CSO-optimized fuzzy PID can effectively improve the overall control performance of the servo system.

[0108] Example 3:

[0109] This embodiment also provides a computer device applicable to a servo motor precise pitch adjustment method, including a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the servo motor precise pitch adjustment method proposed in the above embodiment.

[0110] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements a servo motor precise pitch adjustment method as proposed in the above embodiments.

[0111] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0112] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0113] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0114] More specific examples (a non-exhaustive list) of computer-readable media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0115] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0116] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for precise pitch adjustment of a servo motor, characterized in that, Includes the following steps: S1. Initialize the key parameters of the servo motor control system; S2. Enter the predictive control phase to predict the output state within the next sampling period; S3. The proportional factor in the fuzzy controller is optimized using the chicken flock optimization (CSO) algorithm. S4. Solve for the parameter adjustment of PID based on fuzzy controller; S5. After obtaining the PID parameter adjustment amount, the final PID control parameters are calculated by combining and updating them with the initial PID parameters, thereby achieving precise pitch adjustment of the servo motor.

2. The method for precise pitch adjustment of a servo motor according to claim 1, characterized in that, In step S1, the key parameters for initialization include PID initial parameters, prediction model parameters, fuzzy controller parameters, and flock settings for the chicken flock optimization (CSO) algorithm.

3. The method for precise pitch adjustment of a servo motor according to claim 2, characterized in that, The initial values ​​of the proportional, integral, and derivative parameters of the PID controller in the initial parameters of the PID controller are set to Kp0, Ki0, and Kd0, respectively. The prediction model parameters specify the sampling period T, the reference trajectory time constant τ, and set the prediction deviation as ê and the prediction deviation change rate as c. ê ; The fuzzy language settings in the fuzzy controller parameters are NB, NM, NS, ZO, PS, PM, PB; the fuzzy subset universe of discourse is [-5,5]; and the fuzzy membership functions are trigonometric functions; ê and c ê The corresponding proportional factors are Kê and Kcê, respectively, with values ​​ranging from [0,2]; the proportional factors corresponding to the initial values ​​of the proportional, integral, and derivative functions of the PID controller are K. pG K iG K dG The values ​​range from [0,20], [0,20], and [0,10], respectively. In the population settings of the CSO algorithm, the number of iterations is M, the total number of chickens is N, the population relationship update frequency is G, the number of roosters is RN, the number of hens is HN, the number of chicks is CN, and the number of hen leadership relationships is MN.

4. The method for precise pitch adjustment of a servo motor according to claim 1, characterized in that, In step S2, predicting the output state within a future sampling period includes: Model predictive control (MPC) is employed, utilizing the exponential form of the reference trajectory to smoothly transition from the current state to the setpoint, and calculating the prediction deviation ê and the rate of change of prediction deviation c. ê ; The prediction bias ê is calculated based on the deviation between the predicted output and the desired trajectory; the prediction bias change rate c ê Used to describe the trend of deviation.

5. The method for precise pitch adjustment of a servo motor according to claim 1, characterized in that, In step S3, when using the Chicken Optimization (CSO) algorithm to optimize the scaling factor, an objective function for the optimization process is constructed, as shown below: Where e(t) is the systematic bias, t is time, and the fitness function of an individual chicken is Fit=1 / J; When the objective function is optimized to obtain the minimum J, the optimal fuzzy control scaling factor is obtained.

6. The method for precise pitch adjustment of a servo motor according to claim 1, characterized in that, The flock optimization CSO algorithm performs scaling factor optimization, including: Initialize parameters; Initialize the chicken flock; Iteration; Individual location update; Determine the iteration conditions; Output the optimal value of the scaling factor; The process involves initializing the flock, establishing a multi-level relationship between roosters, hens, and chicks, sorting them according to a fitness function, updating the position of each individual, and re-evaluating their fitness. This iterative process continues until the optimal solution or the maximum number of iterations is reached.

7. The method for precise pitch adjustment of a servo motor according to claim 1, characterized in that, In step S4, the parameter adjustment of the PID controller is solved based on the fuzzy controller, including: Define input and output variables; Fuzzy domain transformation; Fuzzy reasoning is performed based on a pre-set fuzzy rule base.

8. A method for precise pitch adjustment of a servo motor according to claim 7, characterized in that, In step S4, the input and output variables are defined, including: The prediction bias ê and its rate of change of prediction bias c ê As input variables to the fuzzy model, the adjustment amounts of the proportional coefficient, integral coefficient, and derivative coefficient in the PID parameters are used as output variables of the fuzzy model.

9. A method for precise pitch adjustment of a servo motor according to claim 7, characterized in that, In step S4, the fuzzy domain transformation includes: The prediction bias ê and its rate of change of prediction bias c ê Transformed by the corresponding scaling factors Kê and Kcê, the results enter the fuzzy domain and are mapped to fuzzy linguistic variables E∈[-5,5] and EC∈[-5,5].

10. A method for precise pitch adjustment of a servo motor according to claim 7, characterized in that, In step S4, fuzzy reasoning is performed based on a preset fuzzy rule base, including: Fuzzy inference is performed on E and EC according to fuzzy rules, followed by defuzzification. The resulting fuzzy quantities are then multiplied by the scaling factor K. pG K iG K dG The adjustment ΔK of the proportional coefficient, integral coefficient, and derivative coefficient in the PID parameters is obtained. p ΔK i ΔK d .