An agricultural robot arm adaptive control method
By using adaptive control methods, sliding mode surface and fuzzy sliding mode control, combined with a dual-channel disturbance observer, the forward lurch problem of agricultural robotic arms during sudden unloading was solved, high-frequency interference was shielded, high-efficiency compatibility of multi-axis systems was achieved, and operational stability and compliance were improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA JILIANG UNIV
- Filing Date
- 2026-05-18
- Publication Date
- 2026-06-19
Smart Images

Figure CN122231902A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of robot intelligent control technology, specifically relating to an adaptive control method for agricultural robotic arms for agricultural operation scenarios. Background Technology
[0002] In recent years, with the rapid development of smart agriculture, greenhouse and orchard agricultural robots have gradually become important equipment to replace manual labor in heavy agricultural operations such as fruit and vegetable harvesting and branch pruning. As the core execution unit of agricultural robots, the robotic arm needs to frequently come into physical contact with crops in unstructured, complex, and ever-changing natural environments. Therefore, the stability of the robotic arm's contact force control and its environmental adaptability directly determine the quality and safety of agricultural operations.
[0003] Existing robotic arm control solutions, such as traditional PID control, sliding mode control, or fuzzy control, still have the following significant shortcomings when facing complex agricultural scenarios: First, during pruning operations, the sudden unloading caused by branch breakage can easily lead to dangerous forward lurch of the robotic arm. When cutting thick branches, the end effector typically needs to continuously apply a large contact force and driving torque. At the moment the branch is cut, the external environmental resistance will abruptly drop to zero in a very short time. Most existing control methods lack proactive detection and active suppression mechanisms for such "sudden unloading" events. Some solutions attempt to identify unloading by setting the rate of change of the end force sensor data (i.e., the derivative of the force), but agricultural robotic arms experience violent mechanical rebound and oscillation at the moment of a sudden unloading. Detection based on the rate of change of force is easily mistriggered by this oscillation noise or results in a delayed response. If the controller fails to instantly limit the originally output huge torque, the robotic arm will lurch forward violently, which can easily damage the joint motors and also injure surrounding fruits, main branches, or on-site operators.
[0004] Secondly, high-frequency interference such as friction between branches and leaves, which is common in outdoor working environments, can easily lead to false responses from disturbance observers (DOBs). When agricultural robotic arms move through dense tree canopies, they inevitably experience slight collisions and friction with numerous small branches and leaves, generating environmental disturbances with small amplitude but high frequency. Traditional disturbance observers often use fixed observation bandwidths and cannot distinguish between actual contact collisions and environmental noise. If the bandwidth is set too high, the system will overcompensate for minor friction between branches and leaves, causing the robotic arm to frequently exhibit unwanted compensated oscillations during movement; if the bandwidth is set too low, it cannot respond to actual collision forces in a timely manner. In addition, existing solutions are prone to misinterpreting the actual physical load as the static bias of the sensor when the robotic arm is carrying end tools of different weights or under prolonged load, resulting in a severe degradation of disturbance observation accuracy.
[0005] Finally, there is a fundamental contradiction between the compliance requirements of harvesting and pruning robotic arms, and existing nonlinear control frameworks often become bloated and computationally expensive when extended to multiple axes. Harvesting requires high compliance at the end of the robotic arm to avoid crushing and damaging fragile fruit; while pruning requires extremely high absolute stiffness to ensure stable tracking and cutting force of the pruning blades. Existing control systems often struggle to smoothly accommodate these two extremes of stiffness and flexibility within the same control framework, frequently requiring downtime to switch different controllers or recalibrate numerous parameters. Furthermore, to address the complex nonlinear dynamics of agricultural robotic arms, existing technologies often introduce fuzzy sliding mode control; however, when dealing with the collaborative operation of multi-degree-of-freedom (e.g., six-axis or seven-axis) robotic arms, designing separate fuzzy controllers and rule bases for each joint not only significantly increases the complexity of the control program and the real-time computational burden, but also makes it difficult to perform unified and efficient parameter scheduling for joints with different physical characteristics (e.g., load-bearing main joints and flexible wrist joints), thus limiting the dynamic response performance of the robotic arm in complex agricultural environments.
[0006] Therefore, there is an urgent need for an adaptive control method that can adapt to different operating mode requirements, effectively shield against high-frequency environmental interference, and actively suppress the forward lurch of the robotic arm during the moment of sudden unloading during trimming. Summary of the Invention
[0007] The purpose of this invention is to overcome the shortcomings of existing technologies, such as the tendency of agricultural robotic arms to lose control during sudden unloading of pruning operations, susceptibility to high-frequency environmental interference from branches and leaves, and the bloated structure and poor compatibility of nonlinear control frameworks when extended to multi-axis systems. This invention provides an adaptive control method for agricultural robotic arms.
[0008] The specific technical solution adopted in this invention is as follows: This invention provides an adaptive control method for agricultural robotic arms, as detailed below: S1: Acquire the status information, reference trajectory information, and operation task instructions for each joint of the agricultural robotic arm; the operation task instructions are either harvesting mode or pruning mode. S2: Configure control parameters according to the job task instructions; If it is in pruning mode, the compliance parameter is adjusted to improve the stiffness tracking ability of the agricultural robotic arm end effector when performing pruning operations. S3: Based on the control parameters configured in S2, calculate the joint position error and joint velocity error according to the state information and the reference trajectory information, construct the sliding mode surface, and generate the approach control quantity based on fuzzy sliding mode control, and obtain the reference control torque by combining the agricultural robotic arm dynamics model; S4: Construct a disturbance observer for the wrist joint of the agricultural robot arm to obtain a disturbance estimate that characterizes external contact disturbances and model uncertainties; perform fast channel processing and slow channel processing on the disturbance estimate to obtain disturbance variation characteristics; S5: Identify the operation contact state based on the disturbance change characteristics and shield low-amplitude high-frequency disturbances; when the disturbance change characteristics of the slow channel meet the preset high-load historical state and the disturbance change characteristics of the fast channel meet the preset low-load current state, it is determined that a sudden unloading event caused by the breakage of the trimmed object has occurred, and anti-forward suppression control is triggered; otherwise, the disturbance change characteristics are determined to be effective contact disturbances or non-sudden unloading disturbances, and then proceed to S6; S6: Based on the control parameters configured in S2, the observation parameters of the disturbance observer are adaptively adjusted according to the results obtained in S5, and a disturbance compensation torque is generated based on the disturbance estimate; the disturbance compensation torque is fused with the reference control torque, and the joint control torque is output after amplitude limiting to control the agricultural robotic arm to perform harvesting or pruning tasks.
[0009] Preferably, in step S2, if it is a pruning mode, the target compliance parameter of the agricultural robotic arm is... C target Overwrite to zero to output the absolute stiffness of the end.
[0010] Preferably, in S3, the sliding modal surface is composed of joint position error, joint velocity error, and integral terms of joint position error; to prevent the integral terms from saturating, a dynamic integral separation mechanism is also introduced, specifically as follows: when the enhanced working contact state or the anti-overshoot suppression control is activated, the update of the integral terms is paused, and the integral terms are subjected to amplitude constraint by a smoothing saturation function.
[0011] Preferably, in step S3, after the sliding modal surface is constructed, independent sliding modal surface scaling parameters and sliding modal surface derivative scaling parameters are set for different joints of the agricultural robotic arm, and the input variables corresponding to each joint are proportionally normalized to the [-1,1] interval, so that the multi-axis robotic arm can reuse the same low-dimensional fuzzy rule library, avoiding the explosive growth of the number of fuzzy rules, and then fuzzy sliding mode control is performed. In the fuzzy sliding mode control process, the sliding mode surface and its derivative are calculated and filtered by difference, then normalized and input into a unified low-dimensional fuzzy rule library to generate the approach control quantities of each joint of the agricultural robotic arm.
[0012] Preferably, in step S4, the fast channel processing and slow channel processing involve processing the amplitude of the perturbation estimate using moving average filters with different forgetting factors to obtain the fast channel mean. With slow channel mean ; When satisfied And the overall amplitude of the disturbance When the disturbance change is determined to be a low-amplitude, high-frequency disturbance caused by branches and leaves, the confidence level of the instantaneous disturbance characterizing the contact state is set to zero to suppress the influence of this disturbance on the identification of the contact state; whereby The set difference threshold, The upper limit of the set force amplitude is used; otherwise, the disturbance change characteristics are judged as valid disturbances.
[0013] Furthermore, in S5, the determination condition for the sudden unloading event is that the average value of the slow channel is greater than or equal to the first threshold, and the average value of the fast channel is less than or equal to the second threshold; wherein, the first threshold is greater than the second threshold, and the absolute cliff condition characterizes the robotic arm wrist from a state of continuous high load pressure to a state of instantaneous unloading.
[0014] Preferably, the anti-forward suppression control includes: activating a system with a preset time window. The suppression timer, and synchronously perform the following operations within the preset time window: Freeze or clear the error integral term; reset or clear the internal state of the disturbance observer; superimpose the reverse damping torque onto the reference control torque. ;in The damping gain matrix is set. This represents the real-time angular velocity of the wrist joint. When the preset time window After completion, the reverse damping torque is removed and the normal control state of the agricultural robotic arm is restored to smoothly pass through the wrist forward thrust and rebound oscillation period caused by the moment the pruned object breaks.
[0015] Preferably, in step S6, the work contact state is mapped to a smoothed perturbation confidence parameter. And based on the perturbation confidence parameter in the minimum observation bandwidth and maximum observation bandwidth Linear calculation of target observation bandwidth ; When an additional load is present, the perturbation confidence parameter is set to zero, and the static bias of the perturbation observer is updated according to the preset learning rate, so that the additional load is gradually incorporated into the baseline estimation. When the instantaneous perturbation confidence parameter is greater than the preset perturbation threshold, the static bias learning rate is reduced to zero to freeze the bias term update and prevent the real contact perturbation from being mistakenly absorbed as the static bias.
[0016] Preferably, in S6, the disturbance compensation torque The calculation formula is ;in For the perturbation confidence parameter, This is the disturbance estimate after bias removal and amplitude limiting; The target compliance parameter for agricultural robotic arms is set to ensure that the output is absolutely stiff in pruning mode and retains end-effector compliance under normal operating conditions.
[0017] Preferably, in S6, the limiting process includes: firstly, using the hyperbolic tangent function to perform soft smooth saturation limiting on the result obtained after fusing the disturbance compensation torque and the reference control torque, and then using the absolute value function to perform hard truncation limiting, so as to ensure that the final output joint control torque is smooth and does not exceed the preset safety boundary of the motor.
[0018] Compared with the prior art, the present invention has the following advantages: 1) Dual-channel absolute cliff detection is inherently immune to rebound oscillations, solving the false triggering problem of traditional force change rate-based detection methods. This invention designs a dual-channel absolute cliff-type sudden unloading detection mechanism, which locks the moment of branch breakage by judging the high load characteristics of the slow historical moving average and the absolute drop characteristics of the fast transient moving average. This mechanism eliminates the dependence on the end force derivative and is immune to the mechanical rebound and high-frequency oscillations that accompany the breakage. Combined with actively injected reverse damping torque, it effectively suppresses the forward displacement of the robotic arm and improves the reliability of anti-forward displacement control.
[0019] 2) The compliance parameterized architecture allows the same controller to cover both harvesting and pruning modes without switching. This invention introduces a control parameter adjustment strategy based on work instructions. In harvesting mode, the system's original compliance is retained to avoid damaging the fruit; in pruning mode, the target compliance parameter is overwritten to zero to eliminate residual steady-state errors and output sufficient cutting stiffness. This architecture enables the same system to smoothly accommodate work modes with drastically different stiffness requirements, eliminating the cumbersome process of switching controllers during downtime.
[0020] 3) A unified, normalized fuzzy rule base reduces the computational complexity of multi-axis systems and solves the problem of bloated rule structures. This invention maps input variables with different physical dimensions to a standard range proportionally by independently configuring the scaling parameters of the sliding modal surface and its derivatives for each joint. Compared to... N The requirement for independently constructing a fuzzy rule base for each joint This invention requires only a single rule (M being the number of fuzzy subsets). A single rule can cover all joint control, significantly reducing the computing power overhead and parameter tuning difficulty of the underlying controller.
[0021] 4) The comparison of the fast and slow channel differences enables automatic shielding of high-frequency interference from leaves, improving control robustness in outdoor environments. This invention utilizes the sudden difference characteristic where the mean value of the fast channel is significantly greater than that of the slow channel, combined with the upper limit of the absolute amplitude of the disturbance, to achieve feature identification and shielding of minute high-frequency interferences such as leaf friction. Under such interference, the system will reduce the disturbance confidence level to zero, avoiding unnecessary high-frequency vibrations when the robotic arm moves through the tree canopy, thus improving the stability of outdoor operation.
[0022] 5) DOB bandwidth adaptive scheduling balances no-load noise reduction and fast contact response. This invention maps the operational contact state to a smooth disturbance confidence parameter and performs linear adaptive scheduling between the minimum and maximum observation bandwidth accordingly. Low bandwidth is used when the robotic arm is idle or subjected to minor disturbances to suppress sensor and system noise, while increased bandwidth is used when actual physical contact occurs to ensure rapid compensation for external forces, thus achieving a good balance between system noise immunity and contact sensitivity. Attached Figure Description
[0023] Figure 1 This is a general flowchart of the method in the embodiments of the present invention; Figure 2 Flow graph of disturbance observer and dual-channel detection signal; Figure 3 Timing diagram for anti-overshoot suppression control; Figure 4 Here is a block diagram of the fuzzy sliding mode controller. Figure 5 Diagram illustrating how to prevent forward acceleration; Figure 6 The tracking curves of each joint of this controller under sudden unloading conditions; Figure 7 The error curves of each joint of this controller are shown under sudden unloading conditions. Detailed Implementation
[0024] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below. Technical features in various embodiments of the present invention can be combined accordingly without mutual conflict.
[0025] like Figure 1 As shown, this invention provides an adaptive control method for an agricultural robotic arm, which specifically includes the following steps: S1: Acquire the status information, reference trajectory information, and operation task instructions for each joint of the agricultural robotic arm. The operation task instructions shall include at least the operation information for the harvesting mode or the pruning mode.
[0026] S2: Configure control parameters based on the task instructions obtained from S1; If it is in pruning mode, the compliance parameter is adjusted to improve the stiffness tracking ability of the agricultural robotic arm end effector when performing pruning operations.
[0027] In a preferred embodiment of the present invention, in this step, if it is a pruning mode, the target compliance parameter of the agricultural robotic arm is... Overwrite to zero to output the absolute stiffness of the end.
[0028] S3: Based on the control parameters configured in S2, calculate the joint position error and joint velocity error according to the state information and reference trajectory information obtained in S1, construct the sliding mode surface, and generate the approach control quantity based on fuzzy sliding mode control, and obtain the reference control torque by combining the agricultural robotic arm dynamics model.
[0029] In a preferred embodiment of the present invention, in this step, the sliding modal surface is composed of joint position error, joint velocity error, and an integral term of joint position error. To prevent saturation of this integral term, a dynamic integral separation mechanism is introduced, as follows: When enhanced contact with the work is detected or anti-overshoot suppression control is activated, the update of the integral term is paused, and the integral term is subjected to amplitude constraint through a smoothing saturation function.
[0030] In a preferred embodiment of the present invention, in this step, after the sliding modal surface is constructed, independent sliding modal surface scaling parameters and sliding modal surface derivative scaling parameters are set for different joints of the agricultural robotic arm, and the input variables corresponding to each joint are proportionally normalized to the [-1,1] interval, so that the multi-axis robotic arm can reuse the same low-dimensional fuzzy rule library (pre-defined), avoiding the explosive growth of the number of fuzzy rules, and then fuzzy sliding mode control is performed.
[0031] In a preferred embodiment of the present invention, in this step, during the fuzzy sliding mode control process, the sliding mode surface and its derivative are subjected to differential calculation and filtering, then normalized, and input into a unified low-dimensional fuzzy rule library to generate the approach control quantities of each joint of the agricultural robotic arm.
[0032] S4: Construct a disturbance observer for the wrist joint of the agricultural machinery arm to obtain disturbance estimates that characterize external contact disturbances and model uncertainties; perform fast channel processing and slow channel processing on the obtained disturbance estimates to obtain disturbance variation characteristics.
[0033] In a preferred embodiment of the present invention, in this step, the fast channel processing and slow channel processing are performed by processing the amplitude of the obtained perturbation estimate using a moving average filter with different forgetting factors, respectively, to obtain the fast channel mean. With slow channel mean ; When satisfied And the overall amplitude of the disturbance When the disturbance change is determined to be a low-amplitude, high-frequency disturbance caused by branches and leaves, the confidence level of the instantaneous disturbance characterizing the contact state is set to zero to suppress the influence of this disturbance on the identification of the contact state; whereby The set difference threshold, The set upper limit of the force amplitude; if the above conditions are not met, the disturbance change characteristics are determined to be a valid disturbance.
[0034] S5: Identify the operation contact state based on the obtained disturbance change characteristics and shield low-amplitude high-frequency disturbances; when the disturbance change characteristics of the slow channel meet the preset high-load historical state and the disturbance change characteristics of the fast channel meet the preset low-load current state, it is determined that a sudden unloading event caused by the breakage of the trimmed object has occurred, and anti-forward suppression control is triggered; if the above conditions are not met, the obtained disturbance change characteristics are determined to be effective contact disturbances or non-sudden unloading disturbances, and then proceed to S6.
[0035] In a preferred embodiment of the present invention, in this step, the condition for determining the sudden unloading event is that the following conditions are met simultaneously: the average value of the slow channel. Greater than or equal to the first threshold, and the fast channel mean Less than or equal to the second threshold; wherein, the first threshold is greater than the second threshold, and the absolute cliff condition characterizes the robotic arm wrist from a state of continuous high load pressure to an instantaneous unloading state.
[0036] In a preferred embodiment of the present invention, the anti-forward suppression control in this step includes: activating a system with a preset time window. The suppression timer, and synchronously perform the following operations within the preset time window: 1) Freeze or clear the error integral term; 2) Reset or clear the internal state of the disturbance observer; 3) Superimpose the reverse damping torque onto the reference control torque. ;in The damping gain matrix is set. This represents the real-time angular velocity of the wrist joint. When the preset time window After completion, the reverse damping torque is removed and the normal control state of the agricultural robotic arm is restored to smoothly transition through the wrist forward thrust and rebound oscillation period caused by the moment the pruned object breaks.
[0037] S6: Based on the control parameters configured in S2, the observation parameters of the disturbance observer are adaptively adjusted according to the results obtained in S5, and a disturbance compensation torque is generated based on the obtained disturbance estimate; the obtained disturbance compensation torque is fused with the obtained reference control torque, and the joint control torque is output after amplitude limiting processing to control the agricultural robotic arm to perform harvesting or pruning tasks.
[0038] In a preferred embodiment of the present invention, in this step, the work contact state is mapped to a smoothed perturbation confidence parameter. Based on the obtained perturbation confidence parameters, within the minimum observation bandwidth and maximum observation bandwidth Linear calculation of target observation bandwidth ; When an additional load is present, the perturbation confidence parameter is set to zero, and the static bias of the perturbation observer is updated according to the preset learning rate, so that the additional load is gradually incorporated into the baseline estimation. When the instantaneous perturbation confidence parameter is greater than the preset perturbation threshold, the static bias learning rate is reduced to zero to freeze the bias term update and prevent the real contact perturbation from being mistakenly absorbed as the static bias.
[0039] In a preferred embodiment of the present invention, in this step, the disturbance compensation torque The calculation formula is ;in For the perturbation confidence parameter, This is the disturbance estimate after bias removal and amplitude limiting; The target compliance parameter for agricultural robotic arms is set to ensure that the output is absolutely stiff in pruning mode and retains end-effector compliance under normal operating conditions.
[0040] In a preferred embodiment of the present invention, the limiting process in this step includes: firstly, using the hyperbolic tangent function to perform soft smooth saturation limiting on the result obtained after fusing the disturbance compensation torque and the reference control torque, and then using the absolute value function to perform hard truncation limiting, so as to ensure that the final output joint control torque is smooth and does not exceed the preset safety boundary of the motor.
[0041] The methods and effects of the present invention will be specifically illustrated below through examples.
[0042] Example This embodiment provides an adaptive control method for agricultural robotic arms, as detailed below: This embodiment uses a six-degree-of-freedom serial agricultural robotic arm as the execution platform. Joints 1 to 3 are the main load-bearing joints, used to achieve large-scale positional scheduling of the end effector within the greenhouse working space; joints 4 to 6 are wrist joints, used to achieve attitude adjustment and contact operation control of the end effector. The controller receives the state information of each joint of the robotic arm, reference trajectory information, and work task instructions, and performs cyclic calculations according to a fixed sampling period. Within each control cycle, it sequentially completes work instruction parsing, sliding surface construction, fuzzy inference, dynamic feedforward compensation, disturbance observation, dual-channel detection, sudden unloading event judgment, and final control torque synthesis, and outputs the six-dimensional joint torque, after amplitude limiting, to the servo drivers of each joint. Figure 1 As shown, the control method in this embodiment is executed in the following order: work instruction parsing, sliding mode surface construction, fuzzy sliding mode control, disturbance observation, dual-channel detection, sudden unloading event judgment, anti-overshoot suppression, and final torque output. Figure 1 It can be seen that the present invention integrates operation mode switching, disturbance compensation and anti-forward control into the same control framework, which can simultaneously adapt to the compliant requirements of harvesting operations and the high rigidity requirements of pruning operations.
[0043] In this embodiment, the controller receives and parses the task instruction at the beginning of each control cycle. The task instruction includes at least task mode information and target compliance parameters. And additional load status indicators. The operation mode information is used to characterize the type of operation currently being performed by the agricultural robotic arm, including at least harvesting and pruning modes; the target compliance parameter... Used to characterize the compliance of the end effector during contact operations; the additional load status indicator is used to characterize whether there are currently changes in tool weight, clamping load, or other additional load statuses.
[0044] By default, when no valid task instruction is received, the controller sets the agricultural robotic arm to harvesting mode and applies a preset compliance parameter. Initial values for the additional load state are set to ensure the system can enter a stable control state under normal operating conditions. In harvesting mode, the compliance parameter... By setting a preset value greater than zero, the end effector of the robotic arm retains a certain degree of compliance when it comes into contact with fruit, branches, leaves, or other flexible objects, thereby reducing the risk of rigid collisions and improving contact stability.
[0045] When the current job mode is determined to be trimming mode, the controller forcibly adjusts the target compliance parameter, causing... This ensures the end effector outputs full stiffness tracking capability during disturbance compensation. The reason for this setting is that pruning operations typically require the end effector to apply a stable cutting action along a predetermined trajectory. If compliance is retained, it may lead to pose deviation, force lag, or residual tracking errors upon contact with the branch, thus affecting cutting accuracy and pruning success rate. Therefore, in pruning mode, by allowing… This can improve the stiffness tracking capability of the robotic arm's end effector and provide a more stable force basis for subsequent sudden unloading identification and fracture event suppression.
[0046] Furthermore, the additional load status identifier can also be used to assist in the subsequent bias learning stage of the disturbance observer. When an additional load status exists, the controller sets the smoothed disturbance confidence parameter to zero to suppress erroneous responses of disturbance compensation to the additional load status; simultaneously, the static bias learning of the disturbance observer is still updated at a preset learning rate. Only when the instantaneous disturbance confidence parameter is greater than a preset threshold is the bias learning rate reduced to zero to freeze the bias term update and prevent real contact disturbances from being incorrectly absorbed as static biases.
[0047] like Figure 4 As shown, within each control cycle, the controller obtains the desired joint position at the current moment based on the pre-planned reference trajectory. Desired joint velocity and expected joint acceleration And combined with the actual joint position fed back by the sensor and actual joint speed Calculate the joint position error and joint velocity error. Joint position error is defined as... In order to avoid the joint angle from exceeding Boundary time generation The jump applies an angle normalization process to the position error, constraining it to... Within the interval. Joint velocity error is defined as... Based on this, a sliding modal surface is constructed. The sliding modal surface is a linear combination of three parts: a joint velocity error term, a proportional term of the joint position error, and an integral term of the joint position error. Its expression is: ;in, Here is the sliding surface gain matrix. Both are integral gain matrices. The positive definite matrix (n is the number of degrees of freedom of the robotic arm). In this embodiment, the main joints (joints 1 to 3) and the wrist joints (joints 4 to 6) are configured with different gain values to accommodate the significant differences in inertia, load, and response speed of each joint. In a preferred embodiment, Take the diagonal elements respectively , Take the diagonal elements respectively Among them, the wrist joint A larger value provides faster error convergence, while the integral gain... Relatively small to avoid wrist integral saturation.
[0048] The error integral term is updated in each control cycle using the following strategy: ;in This is the dynamic integral enable coefficient. When the system detects a disturbance, the confidence parameter... When the value exceeds a preset threshold, or when the anti-overshoot suppression timer is active, set Suspend the accumulation and updating of points; otherwise, The integrator resumes normal integration. Its physical significance lies in the fact that when the robotic arm is under external contact force or in a sudden unloading suppression phase, if the integrator continues to accumulate errors, it will release a large amount of integral wind energy after the contact ends, causing severe overshoot and oscillation of the joint torque. By cutting off the integration channel during contact, the above phenomenon can be effectively avoided.
[0049] Furthermore, to further prevent the integral term from growing indefinitely over long periods of time, a smoothing saturation constraint based on the hyperbolic tangent function is imposed on the integral term: ;in This is the integral saturation limit. The function is approximately linear when the integral value is small, and smoothly transitions to saturation when approaching the saturation limit, avoiding the discontinuous torque jumps at the boundary produced by traditional hard-truncation functions.
[0050] Sliding modal surface and its derivative The two input variables constitute the fuzzy inference system. The sliding surface derivative is obtained through difference approximation and first-order low-pass filtering: ;in These are the filter coefficients.
[0051] To enable the six-DOF joints to share the same fuzzy rule base without requiring separate inference systems, this invention performs independent normalization on the fuzzy input variables for each joint. Specifically, sliding surface scaling parameters are set for each joint. Sliding surface derivative scaling parameters The input variables of each joint are mapped proportionally to the standard range. : In this embodiment, the scaling parameters of the main joints (joints 1 to 3) are: The scaling parameters for wrist joints 4 and 5 are: The scaling parameter for joint 6 is: The scaling parameters of the sliding surface of the wrist joint are much larger than those of the main joint because the wrist joint has a small moment of inertia and a sensitive response, resulting in a relatively larger absolute range of sliding surface values, which requires a wider normalization range.
[0052] Normalized The input is fed into a unified two-input single-output fuzzy inference system. The fuzzy inference system employs a Mamdani-type inference structure, with both input and output variables defined in... On the interval, the design of the membership function and rule base should ensure that: when the sliding surface and its derivative have the same sign and a large amplitude, a larger approaching control quantity is output; when the sliding surface is close to zero, a control quantity approaching zero is output, thus satisfying the basic requirements of the sliding mode reaching law. The fuzzy inference output is denoted as... The final fuzzy approach control quantity is obtained after smoothing by a first-order low-pass filter. , The reference control torque is formed by the superposition of the dynamic feedforward term and the fuzzy sliding mode approach control term. Among them are The joint space inertia matrix of the robotic arm, For Coriolis force and centrifugal force terms, The three factors, including gravity, are calculated in real time during each control cycle using the rigid body dynamics model of the robotic arm. For the switching gain matrix, is A positive definite diagonal matrix is used to adjust the torque amplitude of the fuzzy approach control quantity. In a preferred embodiment, Take the diagonal elements The switching gain of the main joint is significantly greater than that of the wrist joint, in order to match the differences in inertia and load levels of each joint.
[0053] This invention constructs a nonlinear perturbation observer based on the Luenberger structure for the wrist joints (joints 4 to 6) of agricultural robotic arms, used to estimate external contact perturbations and model uncertainties acting on the wrist joints in real time. The perturbation observer is chosen to be constructed only for the wrist joints because, in harvesting and pruning operations, the contact force of the end effector is mainly transmitted through the wrist joints, while the main joints are relatively less affected by contact perturbations.
[0054] like Figure 2 As shown, the disturbance observation and dual-channel detection module in this embodiment includes a disturbance observer, an offset removal unit, a fast channel, a slow channel, a branch high-frequency disturbance shielding unit, and a sudden unloading detection unit. After the wrist joint angular velocity and the actual control torque of the wrist joint are input into the disturbance observer, the original disturbance estimate is obtained; this estimate is then offset-removed to obtain the de-offset disturbance estimate, and the disturbance amplitude is further calculated. Figure 2It can be seen that the disturbance amplitude is simultaneously input into the fast channel and the slow channel. The fast channel reflects instantaneous disturbance changes, while the slow channel reflects historical stress states, thus providing a basis for low-amplitude high-frequency interference shielding and sudden unloading event determination. Let the actual angular velocity of the wrist joint be... First, a first-order low-pass filter is applied to suppress high-frequency measurement noise. In this embodiment, the filter coefficients are taken. =0.6, to achieve a trade-off between noise suppression and signal following.
[0055] The nominal inertia parameter of the perturbation observer Extracted from the robotic arm's inertia matrix. Specifically, the diagonal elements of the inertia matrix corresponding to the wrist joint are taken and multiplied by the inertia expansion coefficient of 1.2. At the same time, a minimum lower limit for the inertia of each axis is set to avoid numerical singularities. i=1,2,3.
[0056] In this embodiment, the minimum inertia lower limit is taken as The inertia expansion coefficient is introduced to compensate for the coupled inertia components lost in the diagonalization approximation of the inertia matrix, ensuring sufficient robustness margin for the observer even in configurations with strong joint coupling. The internal auxiliary state variables of the perturbation observer are denoted as... The observation bandwidth is The original estimate of the disturbance is calculated as follows: ;in, This represents element-wise multiplication. Auxiliary state variable. The dynamic update equation is: , ,in This represents the actual control torque ultimately output to the wrist joint during the current control cycle. The observer is essentially a... For a low-pass filter with a bandwidth of [missing information], its steady-state output [missing information] It converges to the equivalent external disturbance torque (including contact force, model error, friction, etc.) acting on the wrist joint. Bandwidth The larger the value, the stronger the observer's ability to track high-frequency disturbances, but the more severe the amplification of measurement noise.
[0057] It should be noted that the above state update uses an explicit Euler integral scheme, which requires a certain sampling period from the controller. Much smaller than the observer time constant To ensure numerical stability. In this embodiment, The maximum value is 150 rad / s, corresponding to a time constant of approximately 6.7 ms, therefore requiring... No more than 1 ms.
[0058] Let the bias estimator be Its update equation is: Under normal no-load conditions, the learning rate is taken. The value is 0.05. When the additional load status indicator indicates the presence of an additional load, the smooth perturbation confidence parameter is set to zero, while the bias learning rate remains at the preset learning rate; when the instantaneous perturbation confidence parameter is zero, the value is set to 0.05. At that time, let the learning rate If the value is zero, freeze the bias update. The perturbation estimate after bias removal is... Take the disturbance amplitude The instantaneous perturbation confidence level is calculated using a smoothed step function:
[0059] , ; In this implementation ; right Perform fast and slow dual-channel moving average filtering separately: ; High-frequency interference shielding conditions for branches and leaves: ,and Injunction This process corresponds to Figure 2 In the branch-and-leaf shielding circuit, when the disturbance exhibits short-duration, high-frequency, and low-amplitude characteristics, the system does not treat it as an effective contact disturbance for compensation, thereby avoiding unnecessary compensation oscillations caused by friction between small branches and leaves in the canopy environment. In this embodiment, we take... Peak hold and low-pass filtering: when At that time, a hold timer is started (duration 0.2 seconds), and the confidence target value is locked at 1.0 within the hold window. After the hold ends, it reverts to the target value. Actual value. Final filter confidence level: The determination of a sudden unloading event requires that the operation mode be trimming mode simultaneously; In this embodiment, we take... This condition is naturally immune to rebound oscillations because during rebound... It will briefly rebound to well above The level does not meet the triggering conditions. For example... Figure 3 As shown, before the branch broke, the average value of the slow channel remained at a high level, indicating that the robotic arm wrist was under continuous stress. After the branch broke, the average value of the fast channel rapidly dropped below the low load threshold, thus forming an absolute cliff characteristic of "high slow channel and low fast channel". Figure 3It can be seen that even if there is rebound oscillation after fracture, the fast channel will briefly rise due to the rebound peak, failing to meet the triggering condition that the fast channel is below the second threshold. Therefore, this invention can avoid the false triggering problem that is easily caused by traditional methods based on the rate of change of disturbance force. After triggering, the following operations are performed: (1) Activate the suppression timer with a time window of 0.15 seconds; (2) Clear the observer auxiliary state z to zero; (3) Clear all joint error integral terms to zero; (4) Apply a reverse damping torque to the wrist joint within the suppression window: ,in After the suppression timer expires, the damping torque is removed, and normal control is restored. Figure 5 As shown, during branch pruning, the actuator at the end of the branch is constrained by the branch's reaction force before the branch breaks; at the instant the branch breaks, the original external resistance suddenly disappears, and the wrist joint easily generates a transient forward thrust along the natural forward velocity direction. This embodiment suppresses the wrist's forward thrust by superimposing a reverse damping torque opposite to the direction of the wrist joint's angular velocity. Figure 5 It can be seen that the reverse damping torque can absorb the forward impulse energy of the wrist joint at the moment of fracture, thereby reducing the risk of the end effector impacting surrounding branches, fruits or supporting structures.
[0060] 5. Set the minimum observation bandwidth and maximum observation bandwidth The target bandwidth is based on the filter confidence level. Linear interpolation: In this embodiment, we take... .
[0061] To prevent sudden bandwidth changes, a rate limit is imposed on bandwidth variations: .
[0062] In this embodiment, the maximum rate of change is taken. Apply hyperbolic tangent limiting to the bias-free perturbation estimate: In this embodiment, take .
[0063] The disturbance compensation torque is: ;in For the confidence level of the filtered perturbation, Target compliance parameter. Trimming mode. The compensating torque is injected at 100%; in harvesting mode Only 40% was injected.
[0064] The final torque incorporates disturbance compensation at the wrist joint: ; In this embodiment, the soft limiting value Hard limit value ; To verify the effectiveness of the method of this invention, a six-degree-of-freedom agricultural robotic arm simulation platform was built in the MATLAB / Simulink environment. The simulation scenario was set as a sudden unloading condition in the pruning operation mode: the end effector of the robotic arm moves along a predetermined trajectory and applies a contact resistance of 5.0 Nm to the simulated branch within the contact window; subsequently, the branch breaks at a set time, and the contact force instantly drops to zero, thus simulating a typical sudden unloading event in real pruning operations. The total simulation time was 4 seconds, where the contact window was formed by... Figure 6 The two green dashed lines in the middle indicate the boundaries between Window Start and Window End.
[0065] Under the above simulation conditions, the experiment was carried out using the control method based on dual-channel disturbance observation and fuzzy sliding mode proposed in this invention, and the trajectory tracking results and tracking error data of each joint were recorded.
[0066] like Figure 6 and 7 As shown, Figure 6 The figures show the trajectory tracking curves of the six joints of the controller of this invention under sudden unloading conditions. Figure 7 The corresponding tracking error curves are shown. The solid line represents the actual joint trajectory, the dashed line represents the desired joint trajectory, and the two green dashed lines represent the start and end times of the contact window, respectively. Under sudden unloading conditions, the method of this invention exhibits good trajectory tracking performance on all six joints. The actual motion trajectory (solid line) and the desired trajectory (dashed line) of each joint maintain a high degree of consistency. At the beginning of the contact window, after the robotic arm is disturbed by external contact force, although each joint experiences a short-term offset, it can quickly converge and recover to a stable tracking state. At the moment of sudden unloading caused by branch breakage, due to the timely intervention of anti-forward-rush suppression control, the transient forward-rush of the wrist joint is effectively suppressed. The system can smoothly recover to a normal tracking state after the suppression window ends, demonstrating good dynamic response performance and system stability.
[0067] The tracking error indices for each joint during the contact phase of the method of this invention are as follows: Among the main joints, the maximum error of joint 1 is 0.0116 rad, and the root mean square error is 0.0048 rad; the maximum error of joint 2 is 0.0061 rad, and the root mean square error is 0.0031 rad; the maximum error of joint 3 is 0.0439 rad, and the root mean square error is 0.0270 rad. Among the wrist joints, the maximum error of joint 4 is 0.0020 rad, and the root mean square error is 0.0010 rad; the maximum error of joint 5 is 0.0355 rad, and the root mean square error is 0.0087 rad; the maximum error of joint 6 is 0.0373 rad, and the root mean square error is 0.0268 rad.
[0068] The results show that the method of this invention can maintain high trajectory tracking accuracy even under the combined effects of contact disturbance and sudden unloading. Specifically, the error level of wrist joint 4 during the contact phase is extremely low, indicating that the disturbance observer and adaptive bandwidth scheduling mechanism constructed in this invention can achieve rapid estimation and effective compensation for external disturbances. Meanwhile, joints 5 and 6 maintain small error fluctuations during the sudden unloading phase, demonstrating that the dual-channel detection mechanism and anti-overshoot suppression control strategy designed in this invention can effectively weaken the transient impact caused by sudden unloading, improving the motion smoothness and tracking stability of the wrist joint under complex contact operation conditions.
[0069] In summary, the control method proposed in this invention exhibits excellent anti-disturbance performance, dynamic response capability, and trajectory tracking accuracy in agricultural robotic arm pruning and sudden unloading scenarios. Through the synergistic effect of a three-layer mechanism—dual-channel disturbance observation, adaptive bandwidth scheduling, and anti-overshoot suppression control—the overshoot phenomenon caused by sudden unloading can be effectively suppressed, ensuring the smooth operation of the robotic arm throughout the contact, breakage, and recovery processes. Simulation results fully verify the effectiveness and practical value of the method proposed in agricultural robotic arm pruning operations.
[0070] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, all technical solutions obtained through equivalent substitution or transformation fall within the protection scope of the present invention.
Claims
1. An adaptive control method for an agricultural robotic arm, characterized in that, Specifically as follows: S1: Acquire the status information, reference trajectory information, and operation task instructions for each joint of the agricultural robotic arm; the operation task instructions are either harvesting mode or pruning mode. S2: Configure control parameters according to the job task instructions; If it is in pruning mode, the compliance parameter is adjusted to improve the stiffness tracking ability of the agricultural robotic arm end effector when performing pruning operations. S3: Based on the control parameters configured in S2, calculate the joint position error and joint velocity error according to the state information and the reference trajectory information, construct the sliding mode surface, and generate the approach control quantity based on fuzzy sliding mode control, and obtain the reference control torque by combining the agricultural robotic arm dynamics model; S4: Construct a disturbance observer for the wrist joint of the agricultural robot arm to obtain a disturbance estimate that characterizes external contact disturbances and model uncertainties; perform fast channel processing and slow channel processing on the disturbance estimate to obtain disturbance variation characteristics; S5: Identify the operation contact state based on the disturbance change characteristics and shield low-amplitude high-frequency disturbances; when the disturbance change characteristics of the slow channel meet the preset high-load historical state and the disturbance change characteristics of the fast channel meet the preset low-load current state, it is determined that a sudden unloading event caused by the breakage of the trimmed object has occurred, and anti-forward suppression control is triggered. Otherwise, the disturbance change characteristics are determined to be a valid contact disturbance or a non-sudden unloading disturbance, and then proceed to S6; S6: Based on the control parameters configured in S2, the observation parameters of the disturbance observer are adaptively adjusted according to the results obtained in S5, and a disturbance compensation torque is generated based on the disturbance estimate; the disturbance compensation torque is fused with the reference control torque, and the joint control torque is output after amplitude limiting to control the agricultural robotic arm to perform harvesting or pruning tasks.
2. The adaptive control method for an agricultural robotic arm according to claim 1, characterized in that, In step S2, if it is in pruning mode, the target compliance parameter of the agricultural robotic arm is... C target Overwrite to zero to output the absolute stiffness of the end.
3. The adaptive control method for an agricultural robotic arm according to claim 1, characterized in that, In S3, the sliding modal surface is composed of joint position error, joint velocity error, and integral terms of joint position error. To prevent the integral terms from saturating, a dynamic integral separation mechanism is introduced, as follows: when the enhanced contact state or the anti-overshoot suppression control is activated, the update of the integral terms is paused, and the integral terms are subjected to amplitude constraints through a smoothing saturation function.
4. The adaptive control method for an agricultural robotic arm according to claim 1, characterized in that, In S3, after the sliding modal surface is constructed, independent sliding modal surface scaling parameters and sliding modal surface derivative scaling parameters are set for different joints of the agricultural robotic arm. The input variables corresponding to each joint are proportionally normalized to the [-1,1] interval, so that the multi-axis robotic arm can reuse the same low-dimensional fuzzy rule library and avoid the explosive growth of the number of fuzzy rules. Then, fuzzy sliding mode control is performed. In the fuzzy sliding mode control process, the sliding mode surface and its derivative are calculated and filtered by difference, then normalized and input into a unified low-dimensional fuzzy rule library to generate the approach control quantities of each joint of the agricultural robotic arm.
5. The adaptive control method for an agricultural robotic arm according to claim 1, characterized in that, In step S4, the fast channel processing and slow channel processing involve processing the amplitude of the perturbation estimate using moving average filters with different forgetting factors to obtain the fast channel mean. With slow channel mean ; When satisfied And the overall amplitude of the disturbance When the disturbance change is determined to be a low-amplitude, high-frequency disturbance caused by branches and leaves, the confidence level of the instantaneous disturbance characterizing the contact state is set to zero to suppress the influence of this disturbance on the identification of the contact state; whereby The set difference threshold, The upper limit of the set force amplitude is used; otherwise, the disturbance change characteristics are judged as valid disturbances.
6. The adaptive control method for an agricultural robotic arm according to claim 5, characterized in that, In S5, the determination condition for the sudden unloading event is that the average value of the slow channel is greater than or equal to the first threshold, and the average value of the fast channel is less than or equal to the second threshold. The first threshold is greater than the second threshold, and the absolute cliff condition is used to characterize the robotic arm wrist from a state of continuous high load pressure to a state of instantaneous unloading.
7. The adaptive control method for an agricultural robotic arm according to claim 1, characterized in that, The anti-forward-rush suppression control includes: activating a preset time window. The suppression timer, and synchronously perform the following operations within the preset time window: Freeze or clear the error integral term; reset or clear the internal state of the disturbance observer; superimpose the reverse damping torque onto the reference control torque. ;in The damping gain matrix is set. This represents the real-time angular velocity of the wrist joint. When the preset time window After completion, the reverse damping torque is removed and the normal control state of the agricultural robotic arm is restored to smoothly pass through the wrist forward thrust and rebound oscillation period caused by the moment the pruned object breaks.
8. The adaptive control method for an agricultural robotic arm according to claim 1, characterized in that, In step S6, the work contact state is mapped to a smoothed perturbation confidence parameter. And based on the perturbation confidence parameter in the minimum observation bandwidth and maximum observation bandwidth Linear calculation of target observation bandwidth ; When an additional load is present, the perturbation confidence parameter is set to zero, and the static bias of the perturbation observer is updated with a preset learning rate so that the additional load is gradually incorporated into the baseline estimate. When the instantaneous perturbation confidence parameter is greater than the preset perturbation threshold, the static bias learning rate is reduced to zero to freeze the bias term update.
9. The adaptive control method for an agricultural robotic arm according to claim 1, characterized in that, In S6, the disturbance compensation torque The calculation formula is ;in For the perturbation confidence parameter, This is the disturbance estimate after bias removal and amplitude limiting; The target compliance parameter for agricultural robotic arms is set to ensure that the output is absolutely stiff in pruning mode and retains end-effector compliance under normal operating conditions.
10. The adaptive control method for an agricultural robotic arm according to claim 1, characterized in that, In S6, the limiting process includes: firstly, using the hyperbolic tangent function to perform soft smooth saturation limiting on the result obtained after fusing the disturbance compensation torque and the reference control torque, and then using the absolute value function to perform hard truncation limiting, so as to ensure that the final output joint control torque is smooth and does not exceed the preset safety boundary of the motor.