Mechanical arm control method and system based on fuzzy adaptive PID control
By using the fuzzy adaptive PID control method, the universe of discourse and quantization factor of the fuzzy controller are dynamically adjusted, which solves the problem of insufficient flexibility of traditional PID control under complex working conditions and realizes real-time optimization and efficient execution of the robotic arm control system.
Patent Information
- Application Number
- CN202511875234.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-01-23
AI Technical Summary
Traditional PID control methods suffer from severe performance degradation when faced with load changes and speed switching, exhibiting increased overshoot, prolonged settling time, and increased steady-state error, making real-time dynamic adjustment impossible.
A fuzzy adaptive PID control method is adopted. By using a variable universe of discourse adaptive algorithm and adaptive quantization factor calculation, the universe of discourse and quantization factor of the fuzzy controller are dynamically adjusted. Combined with fuzzy inference technology, the real-time updating of PID parameters and control output are realized.
It improves the flexibility and adaptability of the robotic arm control system, enhances control performance under different working conditions, and realizes full-process intelligentization from error perception to execution control.
Smart Images

Figure CN121374629A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotic arm control technology, and in particular to a robotic arm control method and system based on fuzzy adaptive PID control. Background Technology
[0002] With the rapid development of intelligent manufacturing and industrial automation, robotic arms have been widely used in industrial production scenarios such as welding, assembly, handling, and spraying, as well as emerging fields such as medical surgery and service robots. The control performance of robotic arms directly affects production efficiency, product quality, and operational safety. Under complex working conditions, robotic arms need to cope with various uncertainties such as load changes, motion speed switching, external disturbances, and joint friction, which places extremely high demands on the adaptability and robustness of the control system.
[0003] Traditional PID control methods achieve closed-loop control by adjusting three parameters: proportional, integral, and derivative. These three parameters are usually tuned based on experience or trial and error. Once tuned, the parameters remain fixed and cannot be dynamically adjusted according to the real-time operating status of the robotic arm. This leads to a severe decline in control performance under conditions such as load changes and speed switching, manifested as increased overshoot, prolonged settling time, and increased steady-state error.
[0004] Therefore, a robotic arm control method and system based on fuzzy adaptive PID control is needed. Summary of the Invention
[0005] To address the lack of flexibility in existing technologies when facing different working conditions, this invention provides a robotic arm control method and system based on fuzzy adaptive PID control, which can improve the flexibility of the robotic arm and better cope with different working conditions. The specific technical solution is as follows: In a first aspect, embodiments of this application provide a robotic arm control method based on fuzzy adaptive PID control, comprising: The deviation between the actual position and the target position of the robotic arm joint is obtained, and the position error and error change rate are calculated based on the deviation. A variable universe of discourse adaptive algorithm is used to calculate the universe of discourse scaling factor based on the position error and the error change rate. Based on the universe of discourse scaling factor, a first quantization factor corresponding to the position error and a second quantization factor corresponding to the error change rate are calculated. Incremental PID control parameters are calculated based on a preset fuzzy rule base, a first fuzzy input, and a second fuzzy input. The first fuzzy input is the product of the first quantization factor and the position error, and the second fuzzy input is the product of the second quantization factor and the error change rate. An incremental PID algorithm is used to drive the robotic arm joint to move based on the incremental PID control parameters.
[0006] Preferably, before calculating the universe of discourse scaling factor based on the position error and the rate of change of error using the variable universe of discourse adaptive algorithm, the method further includes: performing normalization calculation based on the position error and the maximum permissible error of the robotic arm joint to obtain a normalized position error; performing normalization calculation based on the rate of change of error and the maximum rate of change of error of the robotic arm joint to obtain a normalized error rate of change; wherein, the maximum rate of change of error is calculated based on the maximum permissible error and the expected system response time; when the robotic arm joint is the shoulder or elbow joint of a six-DOF tandem robotic arm, the maximum permissible error ranges from 30° to 50°, and the expected system response time ranges from 1.5 to 2 seconds; when the robotic arm joint is the wrist joint of a six-DOF tandem robotic arm, the maximum permissible error ranges from 15° to 25°, and the expected system response time ranges from 0.8 to 1.2 seconds; when the robotic arm joint is the horizontal joint of a selectively compliant assembly SCARA robotic arm, ... For joints ranging from 8% to 12%, the expected response time for this system is between 0.8 and 1.2 seconds. For a travel distance of 3% to 6%, the system expects a response time ranging from 1.2 to 1.8 seconds. The system uses a variable universe of discourse adaptive algorithm to calculate the universe of discourse scaling factor based on the position error and the rate of change of the error. This includes: using a variable universe of discourse adaptive algorithm to calculate the universe of discourse scaling factor based on the normalized position error and the rate of change of the normalized error.
[0007] Preferably, the variable universe adaptive algorithm calculates the universe scaling factor based on the position error and the error change rate, including: calculating a comprehensive error evaluation index based on the position error and the error change rate; calculating the universe scaling factor based on the comprehensive error evaluation index; the formula for calculating the universe scaling factor includes: ; in, Let be the universe of discourse scaling factor at time t. Let be the comprehensive error evaluation index at time t. The scaling factor is... To adjust the rate parameter.
[0008] Preferably, the calculation of the first quantization factor corresponding to the position error and the second quantization factor corresponding to the error change rate based on the universe of discourse scaling factor includes: calculating the first quantization factor based on the universe of discourse scaling factor and the first reference quantization factor; calculating the second quantization factor based on the universe of discourse scaling factor and the second reference quantization factor; wherein, if the system response time of the system in which the robotic arm joint is located is greater than a first threshold, the first reference quantization factor is increased; if the system experiences overshoot or oscillation, the first reference quantization factor is decreased.
[0009] Preferably, the incremental PID control parameters are calculated based on a preset fuzzy rule base and a first fuzzy input and a second fuzzy input, including: calculating the membership degrees of the first fuzzy input and the second fuzzy input to each linguistic variable in the linguistic variable set, to obtain the activated linguistic variables corresponding to the first fuzzy input and the second fuzzy input respectively; determining the activated fuzzy rules based on the activated linguistic vectors, and using the minimum value method to perform fuzzy implication operations based on the fuzzy rules to obtain the rule activation strength; using the maximum value method to perform rule aggregation based on the rule activation strength to obtain the fuzzy set of the incremental PID control parameters; and using the centroid method to perform defuzzification based on the fuzzy set to obtain the incremental PID control parameters.
[0010] Preferably, an incremental PID algorithm is used to drive the robotic arm joint to move based on the incremental PID control parameters, including: updating the PID control parameters of the robotic arm joint based on the incremental PID control parameters; calculating the control increment based on the PID control parameters and the position error; wherein the formula for calculating the control increment includes: ; in, To control the increment, , , The position errors at times t, t-1, and t-2 are respectively. , and The PID control parameters are updated at time t; the total control output of the robotic arm joint is updated based on this control increment, and the robotic arm joint is driven to move based on this total control output.
[0011] Preferably, after using an incremental PID algorithm and driving the robotic arm joint to move based on the incremental PID control parameters, the method further includes: obtaining the tracking position error, system response time, overshoot, oscillation frequency, steady-state error, and energy consumption index after incremental update control; and adjusting at least one of the following parameters based on the tracking position error, system response time, overshoot, oscillation frequency, steady-state error, and energy consumption index after incremental update control: the first reference quantization factor, the second reference quantization factor, the scaling coefficient used to calculate the universe of discourse scaling factor, and the weight of the PID integral term in the fuzzy rule.
[0012] Secondly, embodiments of this application provide a robotic arm control system based on fuzzy adaptive PID control, applied to the method described in the first aspect, the system comprising: The error acquisition module is used to obtain the deviation between the actual position and the target position of the robotic arm joint, and to calculate the position error and the rate of change of error based on the deviation; The variable universe adjustment module is used to calculate the universe scaling factor based on the position error and the rate of change of the error using a variable universe adaptive algorithm. The quantization factor module is used to calculate the first quantization factor corresponding to the position error and the second quantization factor corresponding to the error change rate based on the universe of discourse scaling factor. The fuzzy inference module is used to calculate incremental PID control parameters based on a preset fuzzy rule base, a first fuzzy input, and a second fuzzy input; wherein the first fuzzy input is the product of the first quantization factor and the position error, and the second fuzzy input is the product of the second quantization factor and the error change rate. The drive execution module is used to drive the joints of the robotic arm to move based on the incremental PID control parameters using an incremental PID algorithm.
[0013] Thirdly, embodiments of this application provide a computing device, including: a memory for storing a program; and a processor for loading the program to execute the method as described in the first aspect.
[0014] Fourthly, embodiments of this application provide a computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the method described in the first aspect.
[0015] Compared with existing technologies, the beneficial effects of this invention are as follows: First, by adjusting the universe of discourse scaling factor through error adjustment, the dynamic adjustment of the fuzzy controller's universe of discourse is realized, improving control performance; then, through adaptive quantization factor calculation, the close linkage between the quantization factor and the universe of discourse scaling is realized, establishing a link from error to fuzzy input generation. Combined with fuzzy inference technology, intelligent mapping from error information to PID parameter increments is realized, enabling real-time updating of PID parameters and calculation of control output, improving the flexibility and adaptability of the control system; furthermore, through incremental PID control output, a complete control link from parameter increment to actuator drive is realized. The cascaded control architecture forms a complete closed loop, with tight coupling and parameter coordination between functional modules, achieving full-process intelligent control from error perception to execution control. Attached Figure Description
[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.
[0017] Figure 1A flowchart illustrating a robotic arm control method based on fuzzy adaptive PID control provided in an embodiment of this application; Figure 2 A flowchart illustrating another robotic arm control method based on fuzzy adaptive PID control provided in this application embodiment; Figure 3 A flowchart of a fuzzy inference system provided in this application embodiment; Figure 4 A schematic diagram of a robotic arm control system based on fuzzy adaptive PID control provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation
[0018] 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, not all, of the embodiments of the present invention. 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.
[0019] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0020] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0021] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0022] To address the lack of flexibility in traditional methods when facing different working conditions, this invention provides a robotic arm control method and system based on fuzzy adaptive PID control, which can improve the flexibility of the robotic arm and better cope with different working conditions.
[0023] Please see Figure 1 , Figure 1This application provides a flowchart illustrating a robotic arm control method based on fuzzy adaptive PID control, which is applied to a computing device connected to the robotic arm. Figure 1 As shown, the method includes: Step 101: The calculation device obtains the deviation between the actual position and the target position of the robotic arm joint, and calculates the position error and error change rate based on the deviation.
[0024] The computing device can be a terminal or a server, which can be deployed at the working site of the robotic arm or in the cloud to control the robotic arm through a network.
[0025] The robotic arm includes one or more robotic arm joints, each of which is independently controlled by a corresponding servo motor. The computing device sends control commands to each servo motor through closed-loop control of the PID algorithm to control the movement of the robotic arm joints, thereby driving the robotic arm to complete various on-site tasks.
[0026] The computing device can calibrate the coordinate system of the work site through a vision system to obtain the position coordinates of each component of the robotic arm; then it can obtain the current position angle of each robotic arm joint; and then it can calculate the position deviation by using the coordinates and / or position angles of the joints before and after executing control commands, so as to perform closed-loop control. The position of the robotic arm joint after executing the control command can be used to indicate the actual position, and the target position is the desired state that the robotic arm joint should achieve.
[0027] It is understood that this positional error includes angular deviation and / or coordinate deviation.
[0028] The error change rate is obtained by dividing the difference in position errors between adjacent time points by the period.
[0029] Preferably, after obtaining the position error and the rate of change of error, the computing device can perform normalization calculation based on the position error and the maximum permissible error of the robotic arm joint to obtain the normalized position error; and perform normalization calculation based on the rate of change of error and the maximum rate of change of error of the robotic arm joint to obtain the normalized error rate of change.
[0030] The maximum error change rate is calculated based on the maximum permissible error and the expected system response time.
[0031] When the robotic arm joint is the shoulder or elbow joint of a six-DOF cascaded robotic arm, the maximum permissible error ranges from 30° to 50°, and the expected response time of the system ranges from 1.5 to 2 seconds. When the robotic arm joint is the wrist joint of a six-DOF cascaded robotic arm, the maximum permissible error ranges from 15° to 25°, and the expected response time of the system ranges from 0.8 to 1.2 seconds.
[0032] When the robotic arm joint is a horizontal joint of a selectively compliant assembly SCARA robotic arm, the maximum permissible error ranges from 8% to 12% of the joint range, and the expected response time of the system ranges from 0.8 to 1.2 seconds; when the maximum permissible error ranges from 3% to 6% of the stroke, the expected response time of the system ranges from 1.2 to 1.8 seconds.
[0033] Step 102: The computing device calculates the universe scaling factor based on the position error and the rate of change of the error using a variable universe adaptive algorithm.
[0034] In the fuzzy control of robotic arms, the variable universe of discourse adaptive algorithm is an optimization strategy that improves control accuracy by dynamically adjusting the fuzzy subset, i.e., the universe of discourse range; the universe of discourse scaling factor is used to quantify the scaling ratio of the universe of discourse. This algorithm can solve the defects of traditional fixed universe of discourse fuzzy control, such as slow response when the error is large and low accuracy when the error is small.
[0035] Preferably, the computing device calculates a comprehensive error evaluation index based on the position error and the error change rate; and calculates the universe of discourse scaling factor based on the comprehensive error evaluation index; the formula for calculating the universe of discourse scaling factor includes: ; in, Let be the universe of discourse scaling factor at time t. Let be the comprehensive error evaluation index at time t. The scaling factor is... To adjust the rate parameter.
[0036] The comprehensive error evaluation index can be the sum of the absolute values of the normalized position error and the rate of change of error.
[0037] Step 103: The computing device calculates the first quantization factor corresponding to the position error and the second quantization factor corresponding to the error change rate based on the universe of discourse scaling factor.
[0038] Among them, the quantization factor is used to connect the error, the rate of change of error and the core mapping parameter of the internal universe of discourse of the fuzzy controller. Its core function is to convert the real physical quantity into a standardized value within the universe of discourse that the fuzzy system can process proportionally. At the same time, through dynamic linkage with the universe of discourse scaling factor, it ensures the accuracy and consistency of the fuzzy input mapping when the universe of discourse is adjusted, thereby improving the control accuracy and robustness of the robotic arm control.
[0039] Preferably, the computing device can calculate the first quantization factor based on the universe of discourse scaling factor and the first benchmark quantization factor; and calculate the second quantization factor based on the universe of discourse scaling factor and the second benchmark quantization factor; wherein, if the system response time of the system in which the robotic arm joint is located is greater than a first threshold, the first benchmark quantization factor is increased; and if the system experiences overshoot or oscillation, the first benchmark quantization factor is decreased.
[0040] Among them, the first benchmark quantization factor and the second benchmark quantization factor are preset parameters that can be set based on expert experience.
[0041] The first and second quantization factors are inversely proportional to the universe of discourse scaling factor, and the quantization factors are directly proportional to the corresponding benchmark quantization factor. The specific calculation formulas can be set according to the following principles: when the universe of discourse shrinks, the effective range of the fuzzy universe of discourse narrows. At this time, the quantization factor needs to be increased to improve the mapping resolution of the error signal in the reduced universe of discourse, ensuring that the fuzzy inference system can fully utilize the limited universe of discourse space for precise judgment. When the universe of discourse expands, the effective range of the fuzzy universe of discourse widens. At this time, the quantization factor should be decreased accordingly to reduce the mapping resolution, avoiding oversensitivity under small error conditions that could lead to control fluctuations. Through this linkage adjustment of the quantization factor and the universe of discourse, adaptive optimization of the fuzzy input mapping is achieved, ensuring that the system has a fast response capability under large deviations and good stability and anti-interference capability under small deviations.
[0042] Then, the position error and the rate of change of error can be converted into fuzzy inputs based on a quantization factor. Specifically, the computing device can calculate the product of the first quantization factor and the position error as the first fuzzy input, and calculate the product of the second quantization factor and the rate of change of error as the second fuzzy input.
[0043] Step 104: The computing device calculates the incremental PID control parameters based on the preset fuzzy rule base, the first fuzzy input, and the second fuzzy input.
[0044] The computing device can convert a defined fuzzy input into fuzzy level elements using a membership function, then perform rule matching based on these level elements from the fuzzy rule base to obtain activation rules and calculate the corresponding output level; finally, the output level is converted into incremental PID control parameters.
[0045] Specifically, the membership function is a triangular function, a trapezoidal function, or a Gaussian membership function.
[0046] Preferably, the computing device can calculate the membership degrees of the first fuzzy input and the second fuzzy input to each linguistic variable in the linguistic variable set, thereby obtaining the activated linguistic variables corresponding to the first fuzzy input and the second fuzzy input respectively; determine the activated fuzzy rules based on the activated linguistic vectors, and use the minimum value method to perform fuzzy implication operations based on the fuzzy rules to obtain the rule activation strength; use the maximum value method to perform rule aggregation based on the rule activation strength to obtain the fuzzy set of the incremental PID control parameters; and use the centroid method to perform defuzzification based on the fuzzy set to obtain the incremental PID control parameters.
[0047] For example, the first fuzzy input and the second fuzzy input can use seven linguistic variables {negative large NB, negative medium NM, negative small NS, zero ZO, positive small PS, positive medium PM, positive large PB}, covering the complete range from large negative deviation to large positive deviation. The proportional coefficient increment and integral coefficient increment in the incremental PID control parameters use the same seven linguistic variables to ensure fine-grained parameter adjustment; the derivative coefficient increment uses five linguistic variables {negative large NB, negative small NS, zero ZO, positive small PS, positive large PB} to simplify rule complexity, since the derivative term is mainly used to suppress rapid changes.
[0048] Step 105: The computing device uses an incremental PID algorithm to drive the joints of the robotic arm to move based on the incremental PID control parameters.
[0049] The incremental PID algorithm calculates the change in control input compared to the previous moment by combining the current and historical errors, then adds this change back to the previous control input to obtain the current actual output. It offers advantages such as stable response, strong anti-interference capabilities, and ease of engineering implementation, making it suitable for scenarios requiring smooth adjustment, such as servo motor drives and robotic arm joint control. Preferably, the computing device can update the PID control parameters of the robotic arm joint based on the incremental PID control parameters; and calculate the control increment based on the PID control parameters and the position error; wherein the formula for calculating the control increment includes: ; in, To control the increment, , , The position errors at times t, t-1, and t-2 are respectively. , and The PID control parameters are updated at time t; the total control output of the robotic arm joint is updated based on this control increment, and the robotic arm joint is driven to move based on this total control output.
[0050] Preferably, after the robotic arm joint is driven to move based on the incremental PID control parameters using the incremental PID algorithm, the computing device can obtain the tracking position error, system response time, overshoot, oscillation frequency, steady-state error, and energy consumption index after incremental update control. Based on the tracking position error, system response time, overshoot, oscillation frequency, steady-state error, and energy consumption index after incremental update control, at least one of the following parameters is adjusted using feedback: the first reference quantization factor, the second reference quantization factor, the scaling coefficient used to calculate the universe of discourse scaling factor, and the weight of the PID integral term in the fuzzy rule.
[0051] The computing device can perform this feedback update through a reinforcement learning model or a deep learning model.
[0052] The tracking position error is the error between the actual position and the target position after the robotic arm joint is driven to move based on the updated total control output.
[0053] In this embodiment, the fuzzy controller's domain of discourse is dynamically adjusted by adjusting the domain of discourse scaling factor based on the error, thus improving control performance. Then, through adaptive quantization factor calculation, the quantization factor and domain of discourse scaling are closely linked, establishing a link from error to fuzzy input generation. Combined with fuzzy inference technology, intelligent mapping from error information to PID parameter increments is achieved, enabling real-time updates of PID parameters and calculation of control output, thus improving the flexibility and adaptability of the control system. Finally, through incremental PID control output, a complete control link from parameter increments to actuator drive is realized. The cascaded control architecture forms a complete closed loop, with tight coupling and parameter coordination between functional modules, achieving full-process intelligent control from error perception to execution control.
[0054] Please see Figure 2 and Figure 3 The method of this application will be further described below with reference to a specific embodiment.
[0055] The method provided in this application includes steps such as error normalization processing, variable universe adaptive adjustment, adaptive quantization factor calculation, fuzzy inference output of PID parameter increments, and incremental PID control output. The specific implementation details of each step are as follows: Step 1: Error normalization processing.
[0056] Error normalization is the first module in the five-module cascaded adaptive control architecture. Its core function is to uniformly map position errors and error change rates with different dimensions and numerical ranges to a standard interval, providing a standardized input reference for subsequent modules. The specific implementation of this step includes the following: A robotic arm joint position acquisition system is constructed using high-precision encoders or joint angle sensors to measure the current position angle θ(t) of each joint in real time. For rotary joints, photoelectric incremental encoders or absolute magnetic encoders can be used, with an angle measurement accuracy within 0.088 degrees. The encoders are mounted on the motor shaft or joint shaft, and position measurement is achieved through mechanical connection. For moving joints, linear grating rulers or draw-wire displacement sensors are used, with the measurement range covering the entire stroke of the joint. The sampling period Ts is set to 1-5ms, with 1-2ms for small robotic arms with high-speed response, 2-3ms for medium-speed industrial robotic arms, and 3-5ms for large heavy-duty robotic arms. During sampling, the sensor signals are digitally filtered using a first-order low-pass filter, with the cutoff frequency set to 1 / 10 to 1 / 5 of the sampling frequency, effectively suppressing noise while ensuring real-time signal transmission.
[0057] Then, based on the collected current position angle and target position angle Calculate the position error at the current moment. Error change rate The characteristic error changes over time, and the calculation formula is as follows: To reduce the noise amplification effect of numerical differentiation, moving average filtering or exponential weighted filtering can be used to smooth the calculation results.
[0058] Then, a piecewise linear normalization algorithm can be used to perform position error processing. Perform on the rate of change of error Maximum permissible error The settings need to comprehensively consider the joint's range of motion and control precision requirements. For rotary joints, it is usually set to 5%-10% of the joint's range of motion, and for kinetic joints, it is set to 2%-5% of the range of motion. Maximum error variation rate. Typically set to = / Tr, where Tr is the expected system response time, with a value ranging from 0.5 to 2 seconds.
[0059] To address the differences in joint characteristics among robotic arms with different configurations, differentiated normalized parameter configurations are implemented. Error values exceeding the normalization range [-1, 1] are subject to saturation limiting. When an unreasonable jump in error value is detected, an anomaly alarm is triggered, and the valid value from the previous moment is used as the replacement. For abnormal values occurring in multiple consecutive sampling periods, a sensor fault is identified, and a safety protection mechanism is activated.
[0060] The aforementioned error normalization module achieves standardized mapping of errors with different dimensions and numerical ranges, providing a high-quality, unified standard input benchmark for subsequent modules. Furthermore, filtering and anomaly detection mechanisms improve data quality and system robustness. The outputs E(t) and EC(t) of the normalization module are directly transmitted to the variable universe adaptive adjustment module, achieving tight coupling between modules through shared memory or a high-speed data bus. Actual testing shows that applying this normalization method to various robotic arms results in smooth and stable normalized error signals with an outlier detection rate exceeding 98%.
[0061] Step 2: Adaptive adjustment of the variable universe of discourse.
[0062] Adaptive adjustment of the variable universe of discourse is a key technology for realizing the intelligence of fuzzy controllers, which adapts to different error states by dynamically adjusting the range of the universe of discourse. The specific implementation details of this step include: After receiving the normalized error E(t) and the rate of change of normalized error EC(t) output by the error normalization module, the variable universe adaptive adjustment module can calculate the comprehensive error evaluation index. This serves as the criterion for determining the universe of discourse scaling. Then, the universe of discourse scaling factor is calculated: .
[0063] Where k is the scaling factor, ranging from 0.3 to 0.7, and λ is the adjustment rate parameter, ranging from 2 to 5. The nonlinear dynamic adjustment of the universe of discourse is achieved through the exponential function characteristics. When the error is large, β(t) is large, and the scaling factor α(t) approaches a smaller value, causing the fuzzy universe of discourse to shrink to a narrower interval of [-α(t), α(t)], increasing the density of fuzzy subsets within the universe of discourse and improving the system's response sensitivity and adjustment speed to large errors. When the error is small, β(t) decreases, the scaling factor α(t) approaches 1, and the fuzzy universe of discourse expands to near the original interval [-1, 1], reducing the density of fuzzy subsets within the universe of discourse and enhancing the system's stability and anti-disturbance capability under small error conditions.
[0064] To address the performance requirements of different application scenarios, differentiated combinations of scaling coefficient k and adjustment rate λ are set to achieve scenario-adaptive optimization of the domain of discourse (UDD) adjustment strategy. For high-speed response scenarios, such as rapid displacement of welding robots and high-frequency grasping of picking robots, larger k and λ values can be set to rapidly shrink the UDD and enhance the response capability to large errors. For high-precision positioning scenarios, such as precision assembly and electronic product assembly, smaller k and medium λ values can be set to avoid aggressive control caused by excessive UDD shrinkage, thus enhancing stability while ensuring response speed. For load-varying scenarios, such as grasping and placing of handling robots and human-machine interaction of collaborative robots, the k and λ values are dynamically adjusted based on the load estimation results. When the load is large, the k value is increased to enhance the response capability, and when the load is small, the k value is decreased to improve stability.
[0065] For multi-joint robotic arm systems, each joint independently runs a variable universe of discourse adaptive algorithm. Simultaneously, a joint coupling analysis module based on DH parameters and a dynamic model is established to calculate the interaction torques between joints in real time. When a joint is detected to be affected by the movement of other joints, its universe of discourse parameters are automatically adjusted to enhance its anti-interference capability. A master-slave joint coordination strategy is designed, employing a more aggressive universe of discourse adjustment strategy for load-bearing joints near the base and a more conservative strategy for the end effector joints to avoid end effector oscillations. To prevent control fluctuations caused by drastic changes in the universe of discourse scaling factor, a first-order inertial filtering algorithm is used for smoothing. Where γ is the smoothing coefficient, ranging from 0.1 to 0.3. A mechanism for limiting the rate of change of the universe of discourse is established, setting the maximum change within a single sampling period. The value is set to 0.05-0.1 to avoid abrupt changes in the domain of discourse.
[0066] By calculating performance evaluation indicators such as error convergence speed, overshoot, settling time, and steady-state error in real time, a parameter optimization program can be automatically triggered when the control performance deviates from expectations. A parameter adaptive mechanism based on performance feedback is established, using gradient descent or fuzzy inference methods to fine-tune the values of k and λ online. Optimal parameter combinations under different operating conditions are recorded, and a parameter database is established to quickly retrieve historical optimal parameters under similar operating conditions, improving the system's learning and adaptability.
[0067] By employing adaptive adjustment with a variable universe of discourse, intelligent dynamic adjustment of the fuzzy controller's universe of discourse is achieved, providing rapid response under large deviations and ensuring fine control and high stability under small deviations. Compared with traditional fuzzy control with a fixed universe of discourse, the adaptive method with a variable universe of discourse significantly improves control performance. The universe of discourse scaling factor α(t) is directly passed to the adaptive quantization factor calculation module, realizing the linkage between universe of discourse adjustment and quantization factor adjustment. Actual tests show that, when applied to a six-degree-of-freedom industrial robotic arm, the position tracking accuracy of each joint is improved to ±0.15mm, and good control performance is maintained even under load changes and external disturbances.
[0068] Step 3: Adaptive quantization factor calculation.
[0069] Adaptive quantization factor calculation is a key technology for achieving linkage between universe of discourse adjustment and fuzzy input mapping accuracy. By establishing a dynamic correlation between the quantization factor and the universe of discourse scaling factor, the accuracy and robustness of fuzzy control under different error states are ensured. The specific implementation details of this step include: Based on the universe scaling factor α(t) output by the variable universe adaptive module, a correlation calculation model between the quantization factor and the universe scaling factor is established. Specifically, an inverse proportional relationship is used to design the quantization factor formula, and the calculation is as follows: Error quantization factor: ; Error rate of change quantization factor: ; Among them, Ke0 and Kec0 are the benchmark quantization factors, with values ranging from 3 to 7 and from 0.5 to 1.5, respectively.
[0070] To address the differences in physical meaning and numerical characteristics between error *e* and the rate of change of error *ec*, different baseline quantization factors *Ke0* and *Kec0* can be set to ensure a weight balance between the two input variables in fuzzy inference. Error *e* reflects the deviation between the current position of the robotic arm and the target position, serving as the primary basis for system control. Therefore, the baseline value *Ke0* of the error quantization factor is set relatively large; for applications with high precision requirements, an upper limit of 6-7 can be used, while for applications with high speed requirements, a lower limit of 3-4 can be used. The rate of change of error *ec* reflects the trend of deviation change and is mainly used for predictive adjustment and overshoot suppression. Its importance is relatively low; therefore, the baseline value *Kec0* of the error rate of change quantization factor is set relatively small. For robotic arms of different configurations and sizes, the baseline quantization factor can be adjusted according to their dynamic characteristics and control requirements. For large, heavy-duty robotic arms, *Ke0* can be appropriately reduced to enhance stability, while for small, high-speed robotic arms, *Ke0* can be appropriately increased to improve sensitivity.
[0071] Upper and lower limits are set for the quantization factor. When the calculated value exceeds the set range, saturation limiting is applied to prevent system instability caused by the quantization factor being too large or too small under extreme conditions. The constraint range of the error quantization factor is usually set to... The constraint range of the error change rate quantization factor is set to .
[0072] The calculated adaptive quantization factor and Applied to normalization error and Scaling processing yields fuzzy input variables. These two fuzzy input variables, serving as inputs to the fuzzy inference system, directly determine their position in the fuzzy domain and the activated fuzzy subset. By adjusting the quantization factor in real time, the system ensures that the fuzzy inputs can fully utilize the discriminative power of the fuzzy domain under different error states, thus achieving accurate fuzzy inference.
[0073] For multi-joint robotic arm systems, the motion characteristics, load characteristics, and control requirements of different joints vary significantly, necessitating differentiated quantization factor configurations. Large joints, bearing the majority of the load, possessing high inertia, and a wide range of motion, are assigned relatively small baseline quantization factors (Ke0) to avoid oversensitivity leading to oscillations. Small joints, with low inertia, light loads, and high precision requirements, are assigned relatively large baseline quantization factors (Ke0) to improve control accuracy and response speed. For SCARA robotic arms, the dynamic characteristics of horizontal and vertical joints differ, allowing for separate quantization factor parameters. Establishing an inter-joint quantization factor coordination mechanism allows for dynamic adjustment of quantization factor weights based on each joint's contribution to overall trajectory accuracy when multiple joints collaborate to complete complex motion tasks, ensuring smoothness and accuracy of the coordinated motion.
[0074] Performance evaluation metrics can be set, including error convergence speed, overshoot, oscillation frequency, and steady-state accuracy, and changes in these metrics can be monitored in real time. When poor control performance is detected, quantization factor optimization is automatically triggered: if the system response is too slow, Ke0 is automatically increased; if the system experiences overshoot or oscillation, Ke0 is automatically decreased; if the steady-state error is large, Kec0 is adjusted appropriately. A small-step incremental adjustment strategy is adopted, with each adjustment ranging from 5% to 10% of the current value to avoid drastic parameter changes. The optimal quantization factor combinations under different operating conditions are recorded to establish a parameter database, allowing for rapid retrieval of historically optimal parameters under similar operating conditions, achieving rapid adaptation and performance optimization.
[0075] Through the above adaptive quantization factor calculation, a close linkage between the quantization factor and the universe of discourse scaling is achieved, establishing a complete adaptive link from error normalization to fuzzy input generation. Compared with the traditional fixed quantization factor method, the adaptive quantization factor method can dynamically optimize the mapping accuracy of the error signal according to the real-time operating state of the system, significantly improving the adaptability and robustness of fuzzy control. and Scaling processing that directly affects the normalization error, its output and The parameters are then passed to the fuzzy inference module, realizing a complete parameter transfer chain from domain adjustment to fuzzy input. This is a key component of the five-module cascaded architecture. Actual testing shows that the control system using adaptive quantization factors maintains good control performance under various operating conditions. Compared to the fixed quantization factor method, steady-state accuracy is improved by more than 40%, response time is shortened by 25%, and overshoot is reduced by 30%, fully verifying the superiority of adaptive quantization factor technology.
[0076] Step 4: Output the PID parameter increment using fuzzy inference.
[0077] The fuzzy inference output of PID parameter increments is the core step in achieving intelligent control parameter adjustment. It involves converting error information into real-time adjustment values for PID parameters using a fuzzy rule base. The specific implementation details of this step include: The input-output framework of a fuzzy inference system can be established, defining two input variables. and Three output variables Input variables This represents the error after being processed by a quantization factor, reflecting the current positional deviation of the robotic arm; This represents the rate of change of error after quantification, reflecting the trend of deviation change. Output variable The increment of the proportional coefficient represents the strength of the control system's response to the current error. The integral coefficient increment represents the control system's ability to eliminate accumulated errors. The increment of the differential coefficient is used for the control system to predict the trend of error changes.
[0078] Divide the input and output variables into fuzzy subsets respectively. and Seven linguistic variables {Negative Large NB, Negative Medium NM, Negative Small NS, Zero ZO, Positive Small PS, Positive Medium PM, Positive Large PB} are used to cover the complete range from large negative deviation to large positive deviation. Output variables and i uses the same seven language variables to ensure fine-grained parameter tuning. Output variables Five linguistic variables {negative large NB, negative small NS, zero ZO, positive small PS, positive large PB} are used to simplify the complexity of the rules, since the differential term is mainly used to suppress rapid changes.
[0079] A combination of triangular membership functions and Gaussian membership functions is used. Triangular functions are employed at the boundaries of the universe of discourse to ensure clear boundaries, while Gaussian functions are used in the middle of the universe to ensure smooth transitions. The triangular function is defined as follows: The Gaussian function is defined as follows: By setting appropriate parameters for different linguistic variables, we can ensure a suitable degree of overlap between adjacent fuzzy subsets and guarantee a smooth transition in fuzzy inference.
[0080] Based on engineering experience and expert knowledge in robotic arm control, a fuzzy inference rule base of 49 rules (7×7) corresponding to two modular inputs is constructed, following the control strategy principles: When the error is large, increase the proportional coefficient Kp to speed up the response, decrease the derivative coefficient Kd to avoid overshoot, and keep the integral coefficient Ki at a small value to prevent integral saturation; when the error is small, decrease Kp to enhance stability, increase Kd to suppress oscillation, and appropriately increase Ki to eliminate steady-state error; when the error is moderate, adjust Ki appropriately to eliminate steady-state error, and balance Kp and Kd to take into account both response speed and stability.
[0081] For example, if e is NB and ec is NB, then ΔKp is PB, ΔKi is ZO, and ΔKd is NS, indicating a large negative error that continues to increase, requiring strong reverse control. If e is ZO and ec is ZO, then ΔKp is ZO, ΔKi is PS, and ΔKd is ZO, indicating that the robotic arm joint is approaching the target position and is stable, and the incremental integral term eliminates the residual. If e is PS and ec is NS, then ΔKp is PS, ΔKi is PS, and ΔKd is PM, indicating a small positive error that is decreasing, and control can be moderately enhanced. The complete rule base covers all error combinations, ensuring that reasonable parameter increments are output under any condition.
[0082] Then, the Mamdani fuzzy inference method can be used for rule matching and inference computation. First, fuzzification is performed, calculating the membership degrees of input variables to each linguistic variable; each input typically activates 2-3 adjacent fuzzy subsets. Then, rule matching is performed, using the minimum value method for fuzzy implication computation. Calculate the rule activation strength. Then perform rule aggregation using the maximum value method: This yields the fuzzy set of the output variables. Finally, the centroid method is used for defuzzification to calculate the precise values. The discretization calculation formula is as follows: The output universe of discourse is divided into 100-200 sampling points, balancing accuracy and efficiency.
[0083] Then, a rate-of-change limit is set for the incremental output PID parameters to prevent control oscillations caused by sudden parameter changes. A threshold for the parameter increment within a single control cycle is also set. , , When the fuzzy inference output exceeds a threshold, it is throttled. The corresponding threshold can be set as follows: It is 5%-10% of the initial Kp. It is 3%-8% of the initial Ki. It is 10%-15% of the initial Kd. It can also monitor the cumulative increment within a time window; when the cumulative increment is too large, a safety check is triggered, and parameter adjustment is paused if necessary. When both the error and the rate of change of error are less than a preset threshold, the parameter increment can be forcibly set to zero to avoid frequent fine-tuning near the steady state.
[0084] For different working conditions of the robotic arm, multiple rule bases can be developed and intelligently switched. An aggressive rule base is used for high-speed motion, increasing the weight of Kp; a conservative rule base is used for precise positioning, increasing the weights of Kd and Ki; and a robust rule base is used for load-changing conditions, enhancing the synergy between Kp and Ki. The rule base can be automatically identified and switched based on target trajectory characteristics and load estimation. Weighted fusion is used to achieve a smooth transition between rule bases, avoiding discontinuous switching. Furthermore, genetic algorithms or particle swarm optimization can be used to optimize membership function parameters and rule conclusions, with control performance indicators as the optimization objective, achieving continuous improvement of the rule base.
[0085] By employing fuzzy inference technology, an intelligent mapping from error information to PID parameter increments was successfully achieved. The ΔKp(t), ΔKi(t), and ΔKd(t) output by the fuzzy inference module are directly transmitted to the incremental PID control module, enabling real-time parameter updates and control output calculations, completing a key step in the five-module cascaded architecture. Compared to traditional fixed PID parameter methods, the fuzzy inference-based adaptive method significantly improves the flexibility and adaptability of the control system. Actual testing shows that applying this method to a six-DOF industrial robotic arm reduces response time by 35% and overshoot by 40%, fully validating the effectiveness of fuzzy inference technology.
[0086] Step 5: Incremental PID control output.
[0087] The incremental PID control output is the final execution stage of the five-module cascaded adaptive control architecture. Its core function is to update the PID control parameters in real time based on the parameter increments from the fuzzy inference output, and to calculate the control output to drive the robotic arm actuator to complete precise motion control. This step achieves smooth transition of control quantity and safety constraints on parameters through the incremental control algorithm, avoiding control quantity jumps and system oscillations caused by sudden parameter changes in traditional positional PID. The specific implementation details of this step include the following:
[0088] Incremental update mechanism for PID parameters: The system receives the PID parameter increments ΔKp(t), ΔKi(t), and ΔKd(t) output from the fuzzy inference module and calculates the PID control parameters in real time using an incremental update method. The proportional coefficient update formula is as follows: The formula for updating the integral coefficients is: The formula for updating the differential coefficients is: This cumulative update strategy ensures the continuity and smoothness of the control parameters, avoiding abrupt changes in the parameters.
[0089] To ensure the stability of parameter updates, strict upper and lower limit constraints are set for the updated PID parameters. The constraint range of the proportional coefficient Kp is usually set to... ,in Take 30%-50% of the initial value. Take an initial value of 150%-200%. Set the constraint range for the integral coefficient Ki to... ,in Take 20%-40% of the initial value. The initial value is set to 200%-300% because the integral term is crucial for eliminating steady-state error and requires a larger adjustment range. The constraint range of the differential coefficient Kd is set to... ,in Take 50%-70% of the initial value. The initial value is set to 120%-150%, and the differential term is mainly used to suppress oscillations, with a relatively small adjustment range.
[0090] To address the differences in dynamic characteristics among different types of robotic arms, differentiated parameter constraint strategies are implemented: for large, heavy-duty robotic arms, due to their large inertia and slow response, the upper limit of Kp can be appropriately increased to enhance the response speed; for small, high-speed robotic arms, due to their small inertia and fast response, the upper limit of Kd needs to be appropriately increased to suppress high-frequency oscillations.
[0091] Implementation of incremental PID control algorithm: Incremental PID control algorithm is used to calculate the control increment. The core advantage of this algorithm is that it only calculates the change in the control quantity, not its absolute value, effectively avoiding integral saturation and abrupt changes in the control quantity. The basic calculation formula for incremental PID is: ; Where e(t) is the actual position error at the current moment, and e(t-1) and e(t-2) are the position errors at the previous moment and two moments before that, respectively. The three terms in the formula correspond to the incremental contributions of the proportional, integral, and differential terms, respectively: proportional term Reflecting the impact of error changes on the control increment, a positive increment is generated when the error increases, and a negative increment is generated when the error decreases; integral term This reflects the cumulative effect of the current error on the control increment and is used to eliminate steady-state error; the differential term... Reflecting the trend of error rate of change, it is essentially the second-order difference of the error, used to predict the development trend of the error and apply control in advance, effectively suppressing overshoot and oscillation. To improve the noise immunity of the differential term, an incomplete differential algorithm is adopted, adding a first-order low-pass filter to the differential stage. The filter time constant is set to 2-5 times the sampling period, effectively suppressing noise interference while ensuring the differential function.
[0092] After calculating the control increment Δu(t), the total control output for the current control cycle is obtained by accumulation. This incremental accumulation method achieves a smooth transition of the control quantity, avoiding the control output jumps that may be caused by parameter mutations in the position-based PID, and significantly improving the stability and reliability of the control system.
[0093] For the non-linear links existing in the robotic arm system, such as actuator dead zones, mechanical clearances, etc., dead zone compensation and clearance compensation mechanisms are set in the incremental calculation. When the control increment is too small (e.g., |Δu(t)| < u_threshold), it will not be executed to avoid increased wear and energy consumption of the actuator caused by frequent minor adjustments.
[0094] Saturation limiting and safety protection of the control output: Strict saturation limiting processing is performed on the control output u(t) to ensure that the control quantity is always within the safe operating range of the robotic arm actuator. According to the maximum output capacity of the actuator and the safety operation specifications of the robotic arm, the upper and lower limits of the control output are set. For a robotic arm driven by a servo motor, and usually correspond to the maximum reverse and forward torques of the motor; for a robotic arm driven by hydraulics, it corresponds to the maximum reverse and forward pressures of the hydraulic system.
[0095] Implement a multi-level limiting strategy: The first level is soft limiting. When the control output approaches the boundary value (e.g., exceeding 90% of the maximum output), the parameter attenuation mechanism is automatically activated to gradually reduce the values of Kp and Ki, making the control output gently approach the limit without hard truncation; the second level is hard limiting. When the control output exceeds the set boundary, it is forcibly restricted, and at the same time, a limit alarm is triggered to record the limit event for subsequent analysis.
[0096] Then, the output power, temperature, and operating status of the actuator can be monitored in real time. When it is detected that the actuator is approaching the overload state, the upper limit value of the control output is automatically reduced to maintain the control ability while ensuring safety.
[0097] For the multi-joint structure of the robotic arm, implement a joint collaborative limiting strategy. When the control output of a certain joint reaches the limit, the control outputs of related coupled joints are automatically adjusted to avoid overall trajectory deviations caused by local saturation. Develop a function to limit the rate of change of the control output and set the maximum change amount of the control output within a single sampling period. to prevent the mechanical structure from being impacted by the violent fluctuations of the control output. When the calculated control increment exceeds the limit, a ramp limiting algorithm is adopted: to make the control output change at a controlled rate, protecting the mechanical structure and transmission system of the robotic arm.
[0098] Non-linear compensation and feedforward control: To address the common nonlinear factors in robotic arm systems, a nonlinear compensation term is added to the control output to improve control accuracy and robustness.
[0099] The clearance characteristic curves of each joint are obtained through offline calibration, and clearance compensation is added to the control output. The magnitude and direction of the compensation amount are determined based on the direction of motion and clearance characteristics, effectively reducing the position error during reversal.
[0100] Friction compensation: Establish a friction model that includes Coulomb friction, viscous friction, and the Stribeck effect, and calculate the friction compensation amount. Where Fc is the Coulomb coefficient of friction, Fv is the viscous friction coefficient, Fs is the static friction coefficient, ω is the joint angular velocity, and ωs is the Stribeck velocity. Adding the friction compensation to the control output can reduce steady-state errors and low-speed crawling phenomena caused by friction.
[0101] Gravity-compensated feedforward control is introduced. Based on the DH parameters and dynamic model of the robotic arm, the gravitational torque on each joint is calculated in real time, and a gravity compensation term is added to the control output. This eliminates the gravitational influence caused by attitude changes and improves trajectory tracking accuracy. For high-speed motion tasks, acceleration feedforward compensation is developed. Based on the acceleration information of the target trajectory, the required driving torque is calculated and applied to the control system in advance, reducing tracking delay and dynamic error. The final control output is: ; in, This is the acceleration feedforward compensation term. The weights of each compensation term are adjusted, and the coefficients of the compensation terms are dynamically optimized based on the actual control effect to achieve adaptive compensation.
[0102] Actuator drive signal generation and output: The calculated final control output The signal is converted into a drive signal that the actuator can recognize and output. For servo systems using analog control, a high-precision D / A converter converts the digital control signal into an analog voltage signal, and the control signal is smoothed and filtered before the D / A conversion.
[0103] For servo systems employing digital control, the control output is converted into a PWM signal or control commands are sent via a communication bus. The frequency of the PWM signal is typically set to 10-20kHz, much higher than the response frequency of the mechanical system, to avoid excitation of the mechanical system by the PWM switching frequency. The PWM duty cycle is proportional to the control output. This enables two-way control.
[0104] Establish an actuator status feedback mechanism to read the actual output torque, speed and position information of the actuator in real time and compare it with the expected control output. When a significant deviation is detected, trigger actuator fault diagnosis to determine whether there are abnormalities such as actuator failure, mechanical jamming or sudden load changes.
[0105] For robotic arm systems employing redundant drives, control outputs can be rationally distributed across multiple actuators. Torque distribution can be optimized based on the performance characteristics of each actuator and its current load condition, improving system reliability and energy efficiency. Implementing a timing synchronization mechanism for control outputs ensures synchronized output of control signals from each joint of the multi-joint robotic arm, preventing trajectory distortion and vibration caused by timing deviations.
[0106] Control performance monitoring and adaptive optimization: Multi-dimensional performance metrics are set, including tracking error between the current and target positions, response time from command issuance to system response, overshoot, oscillation frequency, number and amplitude of oscillations before system stabilization, steady-state error, and energy consumption to complete the task. These performance metrics are calculated in real time and compared with preset expected values. Parameter adjustments are automatically triggered when performance deviates from expectations. A parameter fine-tuning mechanism based on performance feedback is developed: when a slow response is detected, the baseline quantization factor Ke0 is appropriately increased in the next control cycle to enhance system sensitivity; when overshoot or oscillation is detected, the universe of discourse scaling coefficient k is appropriately increased to enhance system stability; when a large steady-state error is detected, the weight of the integral term in the fuzzy rules is increased.
[0107] Through a long-term learning mechanism, the optimal combination of control parameters is recorded under different task types, load conditions, and movement speeds to form a parameter knowledge base. When performing similar tasks, historical optimal parameters can be quickly recalled to achieve rapid adaptation and performance improvement. For repetitive tasks, an iterative learning control function is developed to analyze the error patterns in repeated executions. A learning compensation term is added to the feedforward control to gradually eliminate systematic errors and improve repetitive positioning accuracy.
[0108] Through the aforementioned incremental PID control output technology, a complete control link from parameter increment to actuator drive is realized, effectively avoiding the integral saturation and control abrupt change problems of traditional position PID. Multiple safety protection mechanisms ensure the reliability of system operation, nonlinear compensation and feedforward control significantly improve control accuracy, and performance monitoring and adaptive optimization enable continuous improvement of the control system.
[0109] The entire five-module cascaded control architecture now forms a complete closed loop: error normalization provides standardized input, variable universe of discourse adaptation and adaptive quantization factor realize intelligent parameter adjustment, fuzzy inference outputs parameter increments, and incremental PID completes precise control output. The five modules are tightly coupled and their parameters coordinate, realizing full-process intelligent control from error perception to execution control.
[0110] Actual tests show that the six-degree-of-freedom industrial robotic arm using the five-module cascaded adaptive control method, compared with traditional PID control, has a more than 35% reduction in overshoot, a 42% reduction in settling time, a 52% reduction in steady-state error, and a repeatability accuracy of ±0.08mm. It can still maintain excellent control performance under load changes and external disturbances, fully verifying the superiority and practical value of the method of this invention.
[0111] The method provided in the embodiments of this application has been described above. The system provided in the embodiments of this application will be described below.
[0112] Please see Figure 4 , Figure 4 A schematic diagram of a robotic arm control system based on fuzzy adaptive PID control is provided for an embodiment of this application, as shown below. Figure 4 As shown, the system 40 includes: The error acquisition module 401 is used to acquire the deviation between the actual position and the target position of the robotic arm joint, and to calculate the position error and the rate of change of error based on the deviation. The variable universe adjustment module 402 is used to calculate the universe scaling factor based on the position error and the rate of change of the error using a variable universe adaptive algorithm. The quantization factor module 403 is used to calculate the first quantization factor corresponding to the position error and the second quantization factor corresponding to the error change rate based on the universe of discourse scaling factor. The fuzzy inference module 404 is used to calculate incremental PID control parameters based on a preset fuzzy rule base, a first fuzzy input, and a second fuzzy input; wherein the first fuzzy input is the product of the first quantization factor and the position error, and the second fuzzy input is the product of the second quantization factor and the error change rate. The drive execution module 405 is used to drive the joint of the robotic arm to move based on the incremental PID control parameters using an incremental PID algorithm.
[0113] Preferably, the system 40 further includes a performance optimization module 406, used to acquire the tracking position error, system response time, overshoot, oscillation frequency, steady-state error, and energy consumption index after incremental update control; based on the tracking position error, system response time, overshoot, oscillation frequency, steady-state error, and energy consumption index after incremental update control, to perform feedback adjustment on at least one of the following parameters: the first reference quantization factor, the second reference quantization factor, the scaling coefficient used to calculate the universe scaling factor, and the weight of the PID integral term in the fuzzy rule.
[0114] The robotic arm control system based on fuzzy adaptive PID control provided in this application embodiment can be understood by referring to the relevant content in the foregoing method embodiment section, and will not be repeated here.
[0115] like Figure 5 As shown, Figure 5 This is a schematic diagram of a possible logical structure of a computing device provided in an embodiment of this application. The computing device 50 includes a processor 501, a communication interface 502, a memory 503, and a bus 504, which are interconnected via the bus 504. In an embodiment of this application, the processor 501 is used to control and manage the operation of the computing device 50; for example, the processor 501 is used to execute... Figures 1 to 3 The steps in any of the embodiments and / or other processes used in the techniques described herein. Communication interface 502 is used to support communication by computing device 50. Memory 503 is used to store program code and data of computing device 50.
[0116] The processor 501 can be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, etc. The bus 504 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0117] In another embodiment of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform the above-described... Figures 1 to 3 The method described in any of the embodiments.
[0118] Those skilled in the art will recognize that the units of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the invention.
[0119] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0120] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0121] 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 units can be selected to achieve the purpose of this embodiment according to actual needs.
[0122] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0123] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or 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 described in the various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, optical disks, and other media capable of storing program code.
[0124] 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 or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.
Claims
1. A robotic arm control method based on fuzzy adaptive PID control, characterized in that, The method includes: The deviation between the actual position and the target position of the robotic arm joint is obtained, and the position error and the rate of change of error are calculated based on the deviation. The universe scaling factor is calculated based on the position error and the error change rate using a variable universe adaptive algorithm. Based on the universe of discourse scaling factor, calculate the first quantization factor corresponding to the position error and the second quantization factor corresponding to the error change rate; Based on a preset fuzzy rule base, a first fuzzy input, and a second fuzzy input, incremental PID control parameters are calculated; wherein, the first fuzzy input is the product of the first quantization factor and the position error, and the second fuzzy input is the product of the second quantization factor and the error change rate; An incremental PID algorithm is used to drive the joints of the robotic arm to move based on the incremental PID control parameters.
2. The method according to claim 1, characterized in that, Before calculating the universe scaling factor based on the position error and the error change rate using the variable universe adaptive algorithm, the method further includes: The normalized position error is obtained by normalizing the position error and the maximum permissible error of the robotic arm joint. The normalized error change rate is obtained by normalizing the error change rate and the maximum error change rate of the robotic arm joint; wherein the maximum error change rate is calculated based on the maximum permissible error and the expected system response time. When the robotic arm joint is the shoulder or elbow joint of a six-DOF tandem robotic arm, the maximum permissible error ranges from 30° to 50°, and the expected system response time ranges from 1.5 to 2 seconds; when the robotic arm joint is the wrist joint of a six-DOF tandem robotic arm, the maximum permissible error ranges from 15° to 25°, and the expected system response time ranges from 0.8 to 1.2 seconds; when the robotic arm joint is the horizontal joint of a selectively compliant SCARA robotic arm, The expected response time of the system is between 0.8 and 1.2 seconds, covering 8% to 12% of the joint range. For 3% to 6% of the travel distance, the expected response time of the system is between 1.2 and 1.8 seconds. The step of calculating the universe scaling factor using a variable universe adaptive algorithm, based on the position error and the error change rate, includes: The universe scaling factor is calculated using a variable universe adaptive algorithm based on the normalized position error and the rate of change of the normalized error.
3. The method according to claim 1, characterized in that, The step of calculating the universe scaling factor using a variable universe adaptive algorithm, based on the position error and the error change rate, includes: Based on the position error and the error change rate, a comprehensive error evaluation index is calculated. The universe of discourse scaling factor is calculated based on the aforementioned error comprehensive evaluation index; the formula for calculating the universe of discourse scaling factor includes: ; in, Let be the universe of discourse scaling factor at time t. Let be the comprehensive error evaluation index at time t. The scaling factor is... To adjust the rate parameter.
4. The method according to claim 1, characterized in that, The step of calculating the first quantization factor corresponding to the position error and the second quantization factor corresponding to the error change rate based on the universe of discourse scaling factor includes: The first quantization factor is calculated based on the universe of discourse scaling factor and the first benchmark quantization factor; The second quantization factor is calculated based on the universe of discourse scaling factor and the second benchmark quantization factor; Specifically, if the system response time of the system containing the robotic arm joint is greater than a first threshold, the first reference quantization factor is increased; if the system experiences overshoot or oscillation, the first reference quantization factor is decreased.
5. The method according to claim 1, characterized in that, The incremental PID control parameters are calculated based on a preset fuzzy rule base, a first fuzzy input, and a second fuzzy input, including: Calculate the membership degrees of the first fuzzy input and the second fuzzy input to each linguistic variable in the linguistic variable set to obtain the activated linguistic variables corresponding to the first fuzzy input and the second fuzzy input, respectively; Based on the activated language vector, the fuzzy rules for activation are determined, and the minimum value method is used to perform fuzzy implication operations based on the fuzzy rules to obtain the rule activation strength. Using the maximum value method, rule aggregation is performed based on the rule activation intensity to obtain a fuzzy set of incremental PID control parameters; The centroid method is used to defuzzify the fuzzy set to obtain the incremental PID control parameters.
6. The method according to claim 1, characterized in that, The method employs an incremental PID algorithm, and based on the incremental PID control parameters, drives the robotic arm joints to move, including: Based on the incremental PID control parameters, update the PID control parameters of the robotic arm joint; Based on the PID control parameters and the position error, the control increment is calculated; wherein, the formula for calculating the control increment includes: ; in, To control the increment, , , The position errors at times t, t-1, and t-2 are respectively. , and These are the PID control parameters updated at time t; The total control output of the robotic arm joint is updated based on the control increment, and the robotic arm joint is driven to move based on the total control output.
7. The method according to claim 4, characterized in that, After employing an incremental PID algorithm and driving the robotic arm joints to move based on the incremental PID control parameters, the method further includes: The tracking position error, system response time, overshoot, oscillation frequency, steady-state error, and energy consumption indicators after incremental update control are obtained. Based on the tracking position error, system response time, overshoot, oscillation frequency, steady-state error, and energy consumption indicators after the incremental update control, at least one of the following parameters is adjusted using feedback: The first benchmark quantization factor, the second benchmark quantization factor, the scaling coefficient used to calculate the universe scaling factor, and the weight of the PID integral term in the fuzzy rule.
8. A robotic arm control system based on fuzzy adaptive PID control, characterized in that, The system, applied to the method of any one of claims 1-7, comprises: The error acquisition module is used to obtain the deviation between the actual position and the target position of the robotic arm joint, and to calculate the position error and the error change rate based on the deviation; The variable universe adjustment module is used to calculate the universe scaling factor based on the position error and the error change rate using a variable universe adaptive algorithm. The quantization factor module is used to calculate the first quantization factor corresponding to the position error and the second quantization factor corresponding to the error change rate based on the universe of discourse scaling factor. The fuzzy inference module is used to calculate incremental PID control parameters based on a preset fuzzy rule base, a first fuzzy input, and a second fuzzy input; wherein the first fuzzy input is the product of the first quantization factor and the position error, and the second fuzzy input is the product of the second quantization factor and the error change rate. The drive execution module is used to drive the joints of the robotic arm to move based on the incremental PID control parameters using an incremental PID algorithm.
9. A computing device, characterized in that, include: Memory, used to store programs; A processor for loading the program to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the method of any one of claims 1-7.
Citation Information
Cited By
Sea surface rescue steering control system and working method thereof
CN121822791A
Multifunctional intelligent steaming oven control system and intelligent steaming oven
CN121857883A
A multifunctional intelligent steam oven control system and an intelligent steam oven
CN121857883B