Compensation method, device and equipment for deformation of flexible tool end, and medium
Patent Information
- Application Number
- CN202611301157.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-09-25
AI Technical Summary
[0004]本申请实施例提供了一种柔性工具末端形变的补偿方法、装置、设备及介质,用于解决无法克服演奏工具的柔性形变导致的控制轨迹偏差,机器人的控制精度差的问题
通过配置柔性工具末端自由,另一端固定于机器人的驱动端,且将柔性工具等效为悬臂梁,确定了机器人与柔性工具的连接关系,界定了动力传递的路径起点与形变发生区域,为后续使用悬臂梁的动力学模型提供了物理依据;
Smart Images

Figure CN122807952A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics technology, and more specifically, to a method, apparatus, device, and medium for compensating for the deformation of the end effector of a flexible tool. Background Technology
[0002] With the development of service robots and human-computer interaction technology, using robots to simulate human musicians for anthropomorphic performances has become an important research direction.
[0003] However, due to the physical properties of robot-driven playing instruments, existing robot playing technologies cannot overcome the control trajectory deviation caused by the flexible deformation of the playing instruments when achieving high-precision and high-dynamic string striking control, resulting in poor robot control accuracy. Summary of the Invention
[0004] This application provides a method, apparatus, device, and medium for compensating for the deformation of the end effector of a flexible tool, which solves the problem of control trajectory deviation caused by the inability to overcome the flexible deformation of the playing tool and the poor control accuracy of the robot.
[0005] According to a first aspect of the embodiments of this application, a method for compensating for the deformation of the end effector of a flexible tool is provided, wherein the end effector of the flexible tool is free and the other end is fixed to the drive end of a robot, the method comprising: acquiring the target trajectory of the end effector in the current cycle; Based on rigid body kinematics, the planned motion state of the driving end is initialized with the target trajectory as the initial value. Based on the planned motion state, the distributed inertial force acting on the cantilever beam is generated. The flexible tool is equivalent to a cantilever beam, with the free end of the cantilever beam corresponding to the end point and the root point corresponding to the other end of the flexible tool. The distributed inertial force is equivalent to translational and rotational constraint excitations acting on the root. Based on the translational and rotational constraint excitations, the boundary conditions for the displacement and rotation angle of the cantilever beam root in the dynamic model are determined. Through the dynamic model, based on the dynamic characteristics of the cantilever beam, the lateral displacement distribution along the length of the cantilever beam under the boundary conditions is obtained. Based on the lateral displacement distribution, the lateral displacement of the free end relative to the baseline is determined, and the lateral displacement is taken as the deformation of the end. The baseline is the central axis of the cantilever beam under zero load, and the dynamic model is the dynamic model of the cantilever beam. The planned motion state is iteratively corrected based on the deformation variables until the end point matches the target trajectory after generating deformation variables. The converged planned motion state is determined as the desired trajectory of the driving end, and the motion of the driving end in the current cycle is controlled based on the desired trajectory.
[0006] In one possible implementation, the target pose at the end point is extracted from the target trajectory; The planned motion state is iteratively corrected multiple times based on the target pose until the pose deviation between the predicted pose and the target pose after the deformation is generated at the end converges. The planned motion state at the convergence point is determined as the desired trajectory of the driving end. Each iteration includes: Obtain the planned motion state participating in this iteration, and solve the end deformation based on the planned motion state; for the first iteration, the planned motion state is the initial value obtained by initializing the target pose based on rigid body kinematics; for non-first iterations, the planned motion state is the planned motion state corrected in the previous iteration. Based on the pose and deformation in the planned motion state, the predicted pose of the end effector is determined; Calculate the pose deviation between the predicted pose and the target pose; If the pose deviation does not converge to the preset deviation threshold and the number of iterations is less than the preset number, the planned motion state is incrementally corrected based on the pose deviation, and the next iteration begins.
[0007] In one possible implementation, the target trajectory includes the position, velocity, and acceleration of the endpoint in space as a function of time. Based on rigid body kinematics, the target trajectory is mapped to the initial pose, initial velocity, and initial acceleration of the driving end when the cantilever beam is not deformed. The initial planned motion state includes the initial pose, initial velocity, and initial acceleration. Obtain the mass distribution characteristics of the cantilever beam. Based on these characteristics, map the initialized planned motion state into an inertial load that is continuously distributed along the cantilever beam axis, and use the inertial load as a distributed inertial force.
[0008] In one possible implementation, the dynamic characteristics include at least the inertial characteristics that characterize the cantilever beam's resistance to changes in motion state, the damping characteristics that characterize the cantilever beam's dissipation of vibrational energy, and the stiffness characteristics that characterize the cantilever beam's resistance to deformation and its return to its initial position. The dynamic model is pre-built through the following steps: Obtain the geometric parameters and material properties of the flexible tool; Based on geometric parameters and material properties, a theoretical model is constructed to describe the lateral bending deformation law of cantilever beams. The theoretical model is spatially discretized and modally truncated to obtain a set of ordinary differential equations characterizing the dynamic properties. Obtain the calibrated parameter vector, update the corresponding parameter values in the ordinary differential equation system based on the parameter vector, and obtain the dynamic model; the parameter vector includes the elastic modulus, which characterizes the material stiffness properties of the flexible tool, and the damping ratio, which characterizes the energy dissipation properties.
[0009] In one possible implementation, the driving end executes a first motion trajectory, and the end-effector acquires a first actual motion trajectory corresponding to the first motion trajectory through a non-contact sensor; the driving end keeps the end-effector out of contact with the external environment during the motion, and the first actual motion trajectory characterizes the relationship between the spatial position of the end-effector and time under the first motion trajectory; The calibrated parameter vector is determined based on the first motion trajectory and the first actual motion trajectory.
[0010] In one possible implementation, the parameter vector to be calibrated is defined; A trajectory simulation model is constructed based on a set of ordinary differential equations. The trajectory simulation model takes the parameter vector and the first motion trajectory as input and outputs the corresponding simulated motion trajectory of the end point. Construct a least squares optimization function; the least squares optimization function aims to minimize the deviation between the first actual motion trajectory and the simulated motion trajectory, and iteratively adjusts the parameter vector until the preset convergence condition is met, thus obtaining the iteratively adjusted parameter vector; The drive end executes the second motion trajectory, and the end end obtains the second actual motion trajectory corresponding to the second motion trajectory through a non-contact sensor; The iteratively adjusted parameter vector is input into the second motion trajectory simulation model to obtain the end-point simulation verification trajectory; If the deviation between the simulation verification trajectory and the second actual motion trajectory is determined to be less than the preset trajectory deviation threshold, then the parameter vector after iterative adjustment will be used as the calibration parameter vector.
[0011] According to a second aspect of the embodiments of this application, a compensation device for the deformation of the end effector of a flexible tool is provided, wherein the end effector of the flexible tool is free and the other end is fixed to the drive end of a robot, the device comprising: The acquisition module is used to acquire the target trajectory of the end in the current period; The generation module is used to initialize the planned motion state of the driving end based on rigid body kinematics, with the target trajectory as the initial value, and generate the distributed inertial force acting on the cantilever beam based on the planned motion state; the flexible tool is equivalent to the cantilever beam, with the free end of the cantilever beam corresponding to the end point and the root point corresponding to the other end of the flexible tool. The solution module is used to convert the distributed inertial force into equivalent translational and rotational constraint excitations acting on the root. Based on the translational and rotational constraint excitations, the boundary conditions for the displacement and rotation angle of the cantilever beam root in the dynamic model are determined. Through the dynamic model, based on the dynamic characteristics of the cantilever beam, the lateral displacement distribution of the cantilever beam along the length direction under the boundary conditions is obtained. Based on the lateral displacement distribution, the lateral displacement of the free end relative to the baseline is determined, and the lateral displacement is used as the deformation of the end. The correction module is used to iteratively correct the planned motion state based on the deformation variables until the end point matches the target trajectory after generating deformation variables. The converged planned motion state is determined as the desired trajectory of the driving end, and the motion of the driving end in the current cycle is controlled according to the desired trajectory.
[0012] According to a third aspect of the embodiments of this application, an electronic device is provided, the electronic device including a memory, a processor and a computer program stored in the memory, wherein the processor executes the program to implement the steps of the method provided in the first aspect.
[0013] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps of the method provided in the first aspect.
[0014] According to a fifth aspect of the present application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium, wherein when a processor of a computer device reads the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, causing the computer device to perform steps implementing the method provided in the first aspect.
[0015] The beneficial effects of the technical solutions provided in this application are: By configuring the flexible tool to be free at one end and fixed at the other end to the robot's drive end, and by equating the flexible tool to a cantilever beam, the connection relationship between the robot and the flexible tool was determined, the starting point of the power transmission path and the deformation area were defined, and a physical basis was provided for the subsequent use of the cantilever beam dynamic model. By acquiring the target trajectory of the end effector in the current cycle, the target trajectory of the flexible tool end effector is used as the control reference, thereby improving the accuracy of the robot controlling the landing point of the end effector. Based on rigid body kinematics, the planned motion state of the driving end is initialized with the target trajectory as the initial value. Based on the planned motion state, the distributed inertial force acting on the cantilever beam is generated, and the precise landing point of the flexible tool as the striking tool is determined. Through rigid body kinematics, the planned motion state of the driving end is directly initialized with the target trajectory as the initial value without ignoring the deformation of the flexible tool end. This significantly reduces the number of convergence steps in subsequent iterations, meets the control requirements of high real-time performance, and transforms the planned motion state of the driving end into a distributed inertial force acting on the flexible tool, providing a foundation for the subsequent accurate determination of the deformation of the flexible end. By equating the distributed inertial force to translational and rotational constraint excitations acting on the root, the excitation application position was accurately located, which conforms to the actual working conditions of the robot's drive end driving the flexible tool. The translational and rotational constraint excitations determined the boundary conditions of displacement and rotation angle, establishing the geometric benchmark for solving the dynamic model. The lateral displacement distribution was obtained through solving the dynamic model, realizing the coupling between the inertia, damping, and stiffness inherent in the dynamic model, and solving the continuous deformation mode of the beam under accelerated motion, providing complete physical data for determining the deformation. The zero-load center axis was introduced as a reference, successfully eliminating the rigid body motion component of the drive end, so that the deformation only reflects elastic deformation, improving the accuracy of deformation determination. Furthermore, solving through the dynamic model eliminates the need to install sensors on the flexible tool, avoiding the interference of sensor-added mass on dynamic characteristics, and improving the accuracy of determining the end deformation. By aiming to match the end effector with the target trajectory after generating deformation, the planned motion state is iteratively corrected based on the deformation. The converged planned motion state is determined as the desired trajectory of the drive end. The movement of the drive end in the current cycle is controlled according to the desired trajectory, which overcomes the influence of the deformation of the flexible tool on the landing point of the end effector. Finally, the movement of the drive end in the current cycle is controlled according to the desired trajectory, which ensures that the deformation experienced by the end effector of the flexible tool after moving according to the desired trajectory of the drive segment is accurately matched with the preset target trajectory, thus improving the control accuracy of the robot. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.
[0017] Figure 1 A flowchart illustrating a method for compensating for end-effector deformation of a flexible tool, provided in an embodiment of this application; Figure 2 A flowchart illustrating the method for determining the desired trajectory in a compensation method for end-effector deformation of a flexible tool provided in an embodiment of this application; Figure 3 A schematic diagram illustrating the process of constructing a dynamic model in a method for compensating for the deformation of the end effector of a flexible tool provided in an embodiment of this application; Figure 4 A schematic flowchart illustrating the determination of the calibrated parameter vector in a method for compensating for end-effector deformation of a flexible tool provided in an embodiment of this application; Figure 5 A schematic diagram of a compensation device for the deformation of the end of a flexible tool provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0018] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.
[0019] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a,” “an,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.”
[0020] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0021] The relevant technologies are explained below: In related technologies, motion capture direct-drive solutions (collecting human wrist trajectories to directly drive the robot) are acceptable for playing adagio passages, but during rapid acceleration and forte, the pegs will visibly bend and vibrate violently due to their own inertia. This causes a deviation between the actual striking point of the peg's end and the expected string position, resulting in a sound that is missed, off-target, or uneven in force, making the robot's performance sound "stiff," "with an attack but no follow-through," and lacking artistic expression. Essentially, this is because the related technologies mistakenly treat the flexible peg as a rigid body, completely ignoring dynamic deformation.
[0022] The related technology employs vibration suppression, which can reduce vibration at the end of the plectrum, but introduces a non-negligible time delay. In musical performance, a delay of a few milliseconds to tens of milliseconds is enough to disrupt the accuracy of the beat, causing a rhythmic disconnect between the robot's performance and the accompaniment track or human ensemble members, which sounds like "dragging" or "unstable." Furthermore, this solution only reduces vibration; it cannot guarantee that the vibration decays and the striking point remains on the target string position, allowing the user to observe uncontrollable random shifts in the striking point.
[0023] In view of at least one of the above-mentioned technical problems or areas that need improvement in the related technologies, this application proposes a method for compensating for the deformation of the end of a flexible tool. This method configures the end of the flexible tool to be free while the other end is fixed to the drive end of the robot, and equates the flexible tool to a cantilever beam. This determines the connection relationship between the robot and the flexible tool, defines the starting point of the power transmission path and the deformation area, and provides a physical basis for the subsequent use of the dynamic model of the cantilever beam. By acquiring the target trajectory of the end effector in the current cycle, the target trajectory of the flexible tool end effector is used as the control reference, thereby improving the accuracy of the robot controlling the landing point of the end effector. Based on rigid body kinematics, the planned motion state of the driving end is initialized with the target trajectory as the initial value. Based on the planned motion state, the distributed inertial force acting on the cantilever beam is generated, and the precise landing point of the flexible tool as the striking tool is determined. Through rigid body kinematics, the planned motion state of the driving end is directly initialized with the target trajectory as the initial value without ignoring the deformation of the flexible tool end. This significantly reduces the number of convergence steps in subsequent iterations, meets the control requirements of high real-time performance, and transforms the planned motion state of the driving end into a distributed inertial force acting on the flexible tool, providing a foundation for the subsequent accurate determination of the deformation of the flexible end. By equating the distributed inertial force to translational and rotational constraint excitations acting on the root, the excitation application position was accurately located, which conforms to the actual working conditions of the robot's drive end driving the flexible tool. The translational and rotational constraint excitations determined the boundary conditions of displacement and rotation angle, establishing the geometric benchmark for solving the dynamic model. The lateral displacement distribution was obtained through solving the dynamic model, realizing the coupling between the inertia, damping, and stiffness inherent in the dynamic model, and solving the continuous deformation mode of the beam under accelerated motion, providing complete physical data for determining the deformation. The zero-load center axis was introduced as a reference, successfully eliminating the rigid body motion component of the drive end, so that the deformation only reflects elastic deformation, improving the accuracy of deformation determination. Furthermore, solving through the dynamic model eliminates the need to install sensors on the flexible tool, avoiding the interference of sensor-added mass on dynamic characteristics, and improving the accuracy of determining the end deformation. By aiming to match the end effector with the target trajectory after generating deformation, the planned motion state is iteratively corrected based on the deformation. The converged planned motion state is determined as the desired trajectory of the drive end. The movement of the drive end in the current cycle is controlled according to the desired trajectory, which overcomes the influence of the deformation of the flexible tool on the landing point of the end effector. Finally, the movement of the drive end in the current cycle is controlled according to the desired trajectory, which ensures that the deformation experienced by the end effector of the flexible tool after moving according to the desired trajectory of the drive segment is accurately matched with the preset target trajectory, thus improving the control accuracy of the robot.
[0024] The technical solutions of this application and their effects are described below through several exemplary embodiments. It should be noted that the following embodiments can be referenced, borrowed from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0025] This application provides a method for compensating for the deformation of the end effector of a flexible tool, such as... Figure 1 As shown, the method includes: S101, Obtain the target trajectory of the end in the current cycle.
[0026] In this embodiment, the end of the flexible tool is free, while the other end is fixed to the drive end of the robot. In other words, the robot can control the landing position of the end of the flexible tool by controlling the movement of the drive end.
[0027] In this embodiment of the application, the flexible tool can be a plectrum for playing the dulcimer. By driving the robot's drive end to move, the plectrum can make contact with the strings at different positions, thereby achieving the purpose of playing the dulcimer through the robot.
[0028] In the embodiments of this application, the flexible tool can be a tool used for playing music, or it can be a flexible tool controlled in any robot system that uses an ultra-thin, non-sensor-attached flexible tool to perform high-dynamic, high-precision operation tasks.
[0029] In the embodiments of this application, the target trajectory of the end effector refers to the specific position that the end effector needs to reach in the current control cycle. For example, if the flexible tool is a bamboo stick, then in the current control cycle, the end effector needs to be on the target trajectory under the excitation of the drive end movement in order to successfully complete the performance of the current cycle.
[0030] In the embodiments of this application, the target trajectory is collected by the motion capture system and given after redirection. The sampling frequency is usually 120 Hz or 240 Hz. For example, when the flexible tool is a bamboo stick, the motion capture system collects the six-dimensional spatial trajectory data of the end of the bamboo stick when the human actor plays the instrument at a high sampling rate. This includes the three-dimensional position and three-dimensional posture sequence. The target trajectory of the current period is obtained from the six-dimensional spatial trajectory data.
[0031] In this embodiment of the application, the target trajectory of the end is obtained and used as the sole control objective of the robot, while the motion trajectory of the driving end is used as the controlled variable that needs to be solved.
[0032] S102, based on rigid body kinematics, initializes the planned motion state of the driving end with the target trajectory as the initial value, and generates the distributed inertial force acting on the cantilever beam based on the planned motion state.
[0033] In this embodiment, the flexible tool is equivalent to a cantilever beam, with the free end of the cantilever beam corresponding to the end point and the root point corresponding to the other end of the flexible tool. That is, the flexible tool is equivalent to a cantilever beam with a uniform cross-section that is fixed at one end and constrained by the driving end, while the other end is free. The cantilever beam can be an Euler-Bernoulli cantilever beam or a Timoshenko cantilever beam. The Euler-Bernoulli cantilever beam is suitable for flexible tools that are relatively long and slender.
[0034] In this embodiment of the application, the planned motion state is used to describe the changes in the position, pose, velocity and acceleration of the robot drive end in space over time. Since the planned motion state describes the acceleration of the drive end, and the cantilever beam itself has mass, inertial forces will be generated inside the beam during the acceleration motion with the drive end. The inertial forces are continuously distributed throughout the entire volume of the cantilever beam. For slender beams with transverse bending vibration, the transverse inertial forces distributed along the beam length direction are mainly considered.
[0035] In this embodiment of the application, based on rigid body kinematics, assuming that the flexible tool does not deform, the target trajectory at the end of the flexible tool is used as the initial value of the planned motion state of the driving end. This avoids starting the iteration with a randomly guessed planned motion trajectory of the driving end, which would lead to excessive residuals and extremely slow convergence.
[0036] In this embodiment, when the drive end moves based on the planned motion state, the spatial motion of the cantilever beam is a superposition of two motions: the root moves with the rigid body of the drive end, and the cantilever beam undergoes elastic deformation relative to the root. To accurately capture the distribution characteristics of inertial forces, the inertial forces are specified to each differential unit of the cantilever beam. Each differential unit is an infinitesimal segment cut along the beam length direction of the cantilever beam, and each differential unit has a definite mass, determined based on the density of the flexible tool.
[0037] In this embodiment, the planned motion state of the driving end is applied as the base excitation to the root of the cantilever beam, and the distributed inertial force acting on the differential element of the cantilever beam is calculated using the Newton-Euler method.
[0038] In the embodiments of this application, the distributed inertial force on any differential element of the cantilever beam is determined by three motion effects: translational inertial force caused by the translation of the driving end, tangential and centripetal inertial forces caused by the rotation of the driving end, collectively referred to as rotational inertial force, and Coriolis force generated by the relative vibration of the differential element.
[0039] In the embodiments of this application, for translational inertial force, since the driving end is performing variable-speed linear motion, the linear acceleration at the root will be directly transmitted to the differential unit. According to Newton's second law, in order to maintain the acceleration of the differential unit, a force must act on the differential unit, and its reaction is the inertial force acting on the differential unit, which is opposite to the linear acceleration.
[0040] In the embodiments of this application, for rotational inertial force, the drive end is performing variable speed rotation, such as the pitch or deflection of the string during the striking process of the piano. The differential unit will also generate an additional tangential acceleration. The tangential acceleration is determined by the angular acceleration at the root and the distance from the differential unit to the root. Correspondingly, an inertial force component opposite to the direction of the tangential acceleration will also be generated.
[0041] In the embodiments of this application, when considering the elastic vibration of the flexible tool itself, the differential element also has a motion velocity relative to the root. Since the driving end itself is in a rotating state, the relative motion of the differential element is coupled with the rotation of the driving end, thereby obtaining the Coriolis force. This force is perpendicular to the relative velocity direction of the differential element and the rotation axis of the base, and its magnitude is proportional to the angular velocity of the base and the relative vibration velocity of the differential element.
[0042] In the embodiments of this application, the inertial force components generated by translational inertial force, rotational inertial force and Coriolis force are vector-superimposed to obtain distributed inertial force.
[0043] S103, the distributed inertial force is equivalent to the translational and rotational constraint excitations acting on the root. Based on the translational and rotational constraint excitations, the boundary conditions of the displacement and rotation angle of the cantilever beam root in the dynamic model are determined. Through the dynamic model, based on the dynamic characteristics of the cantilever beam, the lateral displacement distribution of the cantilever beam along the length direction under the boundary conditions is obtained. Based on the lateral displacement distribution, the lateral displacement of the free end relative to the baseline is determined, and the lateral displacement is used as the deformation of the end.
[0044] In this embodiment of the application, the dynamic model is a dynamic model of a cantilever beam. The dynamic model is used to describe the physical equation system of the dynamic deformation of the flexible tool under the action of distributed inertial force. The dynamic model takes the distributed inertial force as input and the deformation at the end as output.
[0045] In the embodiments of this application, the deformation of the end refers to the displacement component perpendicular to the central axis of the end relative to the central axis of the cantilever beam in the initial state of zero load after the flexible tool undergoes elastic deformation under the action of distributed inertial force. The displacement component reflects the deflection of the cantilever beam due to resistance. The deformation is determined by the dynamic balance between the inertial force, damping force and stiffness force at that moment.
[0046] In the embodiments of this application, the dynamic characteristics of a cantilever beam refer to the characteristics generated when the cantilever beam, as an elastic structure, is subjected to external distributed inertial force excitation. The dynamic characteristics do not depend on the magnitude or form of the external excitation, but are determined by the material properties and geometric structure of the cantilever beam.
[0047] In this embodiment, the motion state of the cantilever beam root at every instant is completely determined by the motion of the driving end, that is, the cantilever beam root is constrained by external forces. The above-mentioned constraints are called motion boundary conditions. The distributed inertial force is input into the dynamic model, and the dynamic model locks the linear acceleration and angular acceleration of the root to specific values characterized by the distributed inertial force. The dynamic model uses motion boundary conditions to solve the deformation of the end, accurately restoring the physical reality that the cantilever beam root is rigidly clamped and forced to follow the motion, avoiding the fictitious external force at the root.
[0048] In the embodiments of this application, the dynamic characteristics describe the dynamic balance between the three intrinsic properties of the cantilever beam: inertial characteristics, damping characteristics, and stiffness characteristics. When a distributed inertial force acts on the cantilever beam, because the cantilever beam has mass, an inertial force will be generated to try to avoid moving with the inertial force in order to maintain its original state. Since the cantilever beam is an elastic structure, the distributed inertial force tries to make the cantilever beam bend, and the cantilever beam resists bending with its own stiffness force. Because the cantilever beam is vibrating, the damping force will convert mechanical energy into heat energy and dissipate it.
[0049] In this embodiment, under strict constraints of the motion boundary conditions, the dynamic model is configured to simulate the dynamic game process of the above three attributes within each solution step: that is, the inertial force attempts to maintain the current motion state, the stiffness force resists deformation and promotes structural restoration, and the damping force dissipates the vibration energy of the system. When the inertial force, damping force, and stiffness force reach dynamic equilibrium, the dynamic model instantly solves for the predicted deformation at the end of the cantilever beam.
[0050] In this embodiment, since the root of the cantilever beam is fixed to the robot's drive end, when the drive end performs variable-speed linear motion in space, the root will reproduce the linear acceleration and linear displacement of the drive end based on the fixed relationship with the drive end, i.e., translational constraints. These translational constraints restrict the independent motion capability in the three linear degrees of freedom (X, Y, Z). When the drive end adjusts its angle, the root will also correspondingly reproduce the angular acceleration and angular displacement of the drive end, i.e., rotational constraints. These rotational constraints restrict the rotational degrees of freedom of the root around the three axes (X, Y, Z). The motion state of the root is entirely determined by the drive end. The root must move with the corresponding linear and angular acceleration generated by the drive end, and this acceleration is generated by the force output by the drive end to overcome the beam's inertia. Therefore, the linear acceleration and angular acceleration that the root must achieve are defined as translational and rotational constraint excitations, and the linear acceleration and angular acceleration of the root calculated in the planned motion state are defined as quantitative indicators of the constraint excitations. This allows the dynamic model to directly use the motion command of the driving end as the boundary input, thereby accurately simulating the dynamic response of the flexible body under the excitation of the base.
[0051] In this embodiment, the root of the cantilever beam is the origin of the coordinate system in the dynamic modeling. Therefore, the lateral displacement of the root in its own coordinate system is always zero, and the rotation angle of the root section is also always zero. The translational and rotational constraint excitation provides the motion drive of the coordinate system in inertial space. The linear acceleration and angular acceleration in the excitation define the acceleration motion law of the origin and its axis in inertial space. Therefore, based on the translational and rotational constraint excitation, the displacement and rotation boundary conditions of the root of the cantilever beam in the dynamic model are finally determined, so that the model can respond to the acceleration motion of the root and solve the dynamic deformation of the beam body under the premise of satisfying the geometric constraints.
[0052] In this embodiment, after the boundary conditions are input into the dynamic model, the dynamic model calculates the instantaneous balance of the inertial characteristics, damping characteristics, and stiffness characteristics in the dynamic characteristics at each tiny time step using a numerical integration algorithm. During the solution process, a function of spatial position and time, namely the lateral displacement distribution, is output. The lateral displacement distribution describes the continuous deformation pattern along the beam length from the root to the free end in the spatial dimension. The lateral displacement distribution changes dynamically with time, recording the entire deformation trajectory of the beam from the initial state, through acceleration and deceleration, until it reaches a relatively stable state.
[0053] In this embodiment, the reference line is the central axis of the cantilever beam under zero load. Using the central axis of the cantilever beam without distributed inertial force as the reference line, and since the lateral displacement distribution is a continuous function describing the offset of each point on the beam axis relative to the reference line, to obtain the deformation at the end, the function value at the free end is extracted, i.e., the lateral displacement of the free end relative to the reference line is obtained, and the lateral displacement of the free end is used as the deformation at the end.
[0054] S104, iteratively correct the planned motion state based on the deformation variables until the end point matches the target trajectory after generating deformation variables. The converged planned motion state is determined as the desired trajectory of the driving end, and the motion of the driving end in the current cycle is controlled according to the desired trajectory.
[0055] In this embodiment, after obtaining the deformation of the end effector based on the planned motion state, the deviation between the actual pose of the end effector and the pose in the target trajectory is calculated, taking into account the deformation. If the deviation does not meet the preset convergence condition, such as insufficient iterations or a large deviation, the parameters in the planned motion state are adjusted in reverse and the adjusted planned motion state is re-input into the dynamic model for the next round of solution, until the actual pose of the end effector after the generated deformation coincides with the target trajectory or the deviation is less than a threshold.
[0056] In this embodiment, if the actual pose of the end effector after deformation coincides with the target trajectory, it means that when the robot drives the end effector to move to the currently adjusted planned motion state, the position of the end effector of the flexible tool can fall exactly at the position indicated by the target trajectory under the influence of deformation. Therefore, the planned motion state used to determine convergence is determined as the desired trajectory of the end effector. The desired trajectory is sent to the controller of the robot end effector to control the end effector to execute the desired trajectory in the current cycle so that the end effector of the flexible tool is consistent with the target trajectory. By utilizing the active adjustment of the end effector, the hysteresis deformation of the flexible tool caused by inertia is offset, thereby achieving high-fidelity tracking of the target trajectory by the end effector at the physical level.
[0057] The method for compensating for the deformation of the end of a flexible tool provided in this application configurations the end of the flexible tool to be free while the other end is fixed to the drive end of the robot. The flexible tool is also equivalent to a cantilever beam. This method determines the connection between the robot and the flexible tool, defines the starting point of the power transmission path and the deformation area, and provides a physical basis for the subsequent use of the cantilever beam dynamic model. By acquiring the target trajectory of the end effector in the current cycle, the target trajectory of the flexible tool end effector is used as the control reference, thereby improving the accuracy of the robot controlling the landing point of the end effector. Based on rigid body kinematics, the planned motion state of the driving end is initialized with the target trajectory as the initial value. Based on the planned motion state, the distributed inertial force acting on the cantilever beam is generated, and the precise landing point of the flexible tool as the striking tool is determined. Through rigid body kinematics, the planned motion state of the driving end is directly initialized with the target trajectory as the initial value without ignoring the deformation of the flexible tool end. This significantly reduces the number of convergence steps in subsequent iterations, meets the control requirements of high real-time performance, and transforms the planned motion state of the driving end into a distributed inertial force acting on the flexible tool, providing a foundation for the subsequent accurate determination of the deformation of the flexible end. By equating the distributed inertial force to translational and rotational constraint excitations acting on the root, the excitation application position was accurately located, which conforms to the actual working conditions of the robot's drive end driving the flexible tool. The translational and rotational constraint excitations determined the boundary conditions of displacement and rotation angle, establishing the geometric benchmark for solving the dynamic model. The lateral displacement distribution was obtained through solving the dynamic model, realizing the coupling between the inertia, damping, and stiffness inherent in the dynamic model, and solving the continuous deformation mode of the beam under accelerated motion, providing complete physical data for determining the deformation. The zero-load center axis was introduced as a reference, successfully eliminating the rigid body motion component of the drive end, so that the deformation only reflects elastic deformation, improving the accuracy of deformation determination. Furthermore, solving through the dynamic model eliminates the need to install sensors on the flexible tool, avoiding the interference of sensor-added mass on dynamic characteristics, and improving the accuracy of determining the end deformation. By aiming to match the end effector with the target trajectory after generating deformation, the planned motion state is iteratively corrected based on the deformation. The converged planned motion state is determined as the desired trajectory of the drive end. The movement of the drive end in the current cycle is controlled according to the desired trajectory, which overcomes the influence of the deformation of the flexible tool on the landing point of the end effector. Finally, the movement of the drive end in the current cycle is controlled according to the desired trajectory, which ensures that the deformation experienced by the end effector of the flexible tool after moving according to the desired trajectory of the drive segment is accurately matched with the preset target trajectory, thus improving the control accuracy of the robot.
[0058] Based on the above embodiments, as a possible implementation method, the target pose of the end point is extracted from the target trajectory; the planned motion state is iteratively corrected multiple times according to the target pose until the pose deviation between the predicted pose of the end point after generating deformation and the target pose converges, and the planned motion state at the convergence point is determined as the desired trajectory of the driving end.
[0059] In this embodiment of the application, the target pose that the flexible tool should reach in the current cycle is extracted from the target trajectory. The target pose is the pose that the final end needs to reach. Therefore, the planned motion state is iteratively corrected multiple times according to the target pose so that when the driving end moves based on the desired trajectory, the difference between the predicted pose after deformation at the end of the flexible tool and the target pose is small enough. In other words, the process of iteratively correcting the planned motion state is to continuously bring the predicted pose of the end after deformation as close as possible to the target pose.
[0060] In this embodiment of the application, each iteration includes the following steps: Step 1: Obtain the planned motion state participating in this iteration, and solve for the deformation of the end point based on the planned motion state; Step 2: Determine the predicted pose of the end effector based on the pose and deformation in the planned motion state; Step 3: Calculate the pose deviation between the predicted pose and the target pose; Step 4: If the pose deviation does not converge to the preset deviation threshold and the number of iterations is less than the preset number, then the planned motion state is incrementally corrected based on the pose deviation, and the next iteration is initiated.
[0061] In this embodiment, for step 1, for the first iteration, the planned motion state is the initial value obtained by initializing the target pose based on rigid body kinematics. For iterations other than the first iteration, the planned motion state is the planned motion state corrected in the previous iteration. That is, for the first iteration, the planned motion state needs to be initialized. The inverse kinematics method is used to calculate the planned motion state required by the driving end to reach the target pose based on the target pose. The state includes position, velocity, acceleration, etc., and is set as the initial planned motion state for the first iteration. The initialization operation ensures that the iteration process starts in a physically reasonable neighborhood, which helps to improve the convergence speed. For subsequent iterations, the planned motion state corrected in the previous iteration is used to achieve continuous iterative adjustment of the planned motion state.
[0062] In this embodiment of the application, for step 2, since the end effector participates in both rigid body motion and elastic deformation when the driving end executes the planned motion state, the predicted pose of the end effector is obtained by superimposing the pose and deformation in the planned motion state.
[0063] In this embodiment of the application, for step 3, the pose deviation between the predicted pose and the target pose is calculated. The pose deviation includes position deviation and attitude deviation, namely Euclidean distance and angular distance. The above pose deviation is used to describe the difference between the predicted pose and the target pose of the end effector under the current planned motion state.
[0064] In this embodiment of the application, for step 4, if the pose deviation is greater than the preset deviation threshold and the number of iterations has not reached the preset number, it indicates that the end point is not close enough to the target, and it means that the planned motion state needs to be corrected. Typically, the Jacobian matrix or gradient descent method is used to correct the planned motion state. By analyzing the sensitivity of the pose deviation relative to the planned motion state, and making small incremental corrections to the position, velocity and acceleration in the planned motion state along the direction of reducing the pose deviation, the planned motion state participating in the next round of iteration is obtained.
[0065] In this embodiment of the application, if the number of iterations has reached the preset maximum number, even if it has not fully converged, it is necessary to force exit to avoid control delay. Once the pose deviation converges or the number of iterations reaches the preset number, the planned motion state of the last iteration is determined as the expected trajectory of the current cycle.
[0066] In this application embodiment, a method for determining a desired trajectory is provided, such as... Figure 2 As shown, the specific content is as follows: S201, Obtain the target pose in the target trajectory; S202, Initialize the planned motion state based on the target pose; S203, obtain the planned motion state participating in this iteration, input the planned motion state into the dynamic model, and obtain the deformation of the end; S204, determine the predicted pose based on the deformation and planned motion state, and calculate the pose deviation between the predicted pose and the target pose; S205, determine whether the pose deviation between the predicted pose and the target pose is less than the deviation threshold. If not, execute S206; if yes, execute S207. S206, the planned motion state is incrementally corrected by estimating the Jacobian matrix and pose deviation to obtain the corrected planned motion state; S207, the planned motion state participating in this iteration is used as the expected trajectory of the driving end; S208 sends the desired trajectory to the robot's drive end.
[0067] In one example, the end target trajectory of the bamboo. (t) is acquired by the motion capture system and given after redirection. Let the deformation prediction function δ(P, a) represent the end effector deformation obtained by solving for the pose P and acceleration a under the current motion state of the driving end. The control objective is to solve for P = (t) makes: (t) + δ( (t), (t)) = (t) Because there is a nonlinear mapping between δ and the motion state of the driving end (a_wrist itself is determined by...) (The sequence is obtained through difference). This application provides a Newton-Raphson iterative solver that performs the following steps in each control cycle: Step 1: Set iteration step k = 0, using the target trajectory value as the initial value. = (t). Calculate the corresponding expected acceleration. The acceleration a^(0) participating in this iteration is obtained by performing central difference on the pose of the driving end at the planned time before and after the planned motion state.
[0068] Step 2: Input the current data into the function used to predict the deformation. Together with a^(k), we obtain the deformation δ^(k) at the end.
[0069] Step 3: Calculate the deviation r^(k) = (t) - ( + δ^(k)).
[0070] Step 4: If ||r^(k)|| ≤ ε (ε is taken as 0.01 mm, i.e., the end-point tolerance), or k reaches the maximum number of iterations. If the value is 5, the iteration terminates and the current value is output. This is the expected trajectory for this control cycle.
[0071] Step 5: If ||r^(k)||>ε, use the finite difference method to estimate the local Jacobian matrix of the function of the predicted deformation with respect to the displacement at the driving end: J = δ / P ≈ [δ + he_j) - δ )] / h Where δ is the deformation of the end effector and P is the pose of the driving end effector. For the current pose of the driver, ( +he_j) represents the perturbation pose, with a perturbation step size h of 0.1 mm, and e_j is the unit direction vector of the j-th coordinate axis.
[0072] Step 6: = + J^{-1}·r^(k), k ← k+1, return to step 2.
[0073] The optimal pose of the driver obtained through convergence (t) will be sent as the expected input for this control cycle to the robot's underlying trajectory tracking controller (such as a full-body motion controller or joint space servo controller), driving the robot's wrist to "overwalk" to the corrected position. Taking a typical loud striking motion as an example: if the prediction shows that the end of the peg will bend downwards by about ±1.5 mm due to inertia when the arm swings to its maximum speed, the wrist trajectory given by the solver will be offset upwards by about 1.5 mm in the corresponding direction compared to the original target trajectory, so that the end of the peg will fall exactly above the target string after bending.
[0074] The embodiments of this application compensate based on spatial position. Each iteration only takes about a few microseconds, and the entire entanglement process is completed within a 1ms control cycle. This does not increase the total execution time of the trajectory, thus ensuring the accurate reproduction of the performance rhythm.
[0075] In the above scheme, the dual judgment conditions of non-convergence of pose deviation and less than the preset number of iterations can not only continuously correct the planned motion state when the deviation is large, but also prevent excessive iterations from causing computation timeouts or system instability, ensuring that the algorithm outputs a feasible solution within a limited time. By gradually reducing the error between the predicted pose and the target pose in each iteration, the end effector achieves high-precision alignment after considering deformation. By taking the target pose as the only control target, it no longer waits for deformation to occur before making up for it. By fine-tuning the planned motion state of the drive end, a pre-deformation equal in magnitude and opposite in direction to the expected deformation is actively induced, so that when the drive end executes the desired trajectory, the deformation of the end effector exactly cancels the pre-deformation, making the actual pose of the end effector coincide with the target pose. This effectively solves the problem of poor accuracy of the robot in driving flexible tools and achieves high-fidelity tracking of the target trajectory.
[0076] Based on the above embodiments, as a possible implementation method, the target trajectory includes the relationship between the position, velocity and acceleration of the end in space and time. Based on rigid body kinematics, the target trajectory is mapped to the initial pose, initial velocity and initial acceleration of the driving end when the cantilever beam has not deformed. The initialized planned motion state includes the initial pose, initial velocity and initial acceleration.
[0077] In this embodiment, to obtain a planned motion state that satisfies the target trajectory through iterative correction, the planned motion state needs to be initialized, i.e., assigned an initial value. Assigning a suitable initial value can effectively reduce the number of iterations. The target trajectory includes the changes in the position, velocity, and acceleration of the end-effector in space over time. Based on the principles of rigid body kinematics, the target trajectory is mapped to the ideal motion state of the driving end when the cantilever beam is not deformed. That is, assuming the cantilever beam is an ideal rigid body, the initial pose, initial velocity, and initial acceleration required for the driving end to reproduce the end-effector trajectory are deduced from the end-effector position, velocity, and acceleration in the target trajectory using the inverse kinematics algorithm. The set of states containing the aforementioned initial pose, initial velocity, and initial acceleration is defined as the initialized planned motion state. This initialization process ensures the rationality of the iteration starting point, making the first input planned motion state as close as possible to the true solution, thereby significantly reducing the convergence time of subsequent dynamic iteration corrections and meeting the requirements of real-time control.
[0078] In this embodiment of the application, the mass distribution characteristics of the cantilever beam are obtained. Based on the mass distribution characteristics, the initialized planned motion state is mapped to an inertial load that is continuously distributed along the axial direction of the cantilever beam, and the inertial load is used as a distributed inertial force.
[0079] In this embodiment, to transform the macroscopic motion state of the drive end into distributed inertial forces acting on the differential units of the cantilever beam, it is necessary to first obtain the mass distribution characteristics of the cantilever beam. These mass distribution characteristics describe the variation of the material density and cross-sectional area of the cantilever beam along its axial direction. For a uniform beam, this characteristic is a constant linear density; for a non-uniform beam, it is a linear density function varying along its axial direction. The linear acceleration and angular acceleration of the drive end described in the planned motion state are transmitted to each differential unit on the beam axis through kinematic relationships. Since each differential unit has a certain mass, determined by the mass distribution characteristics, when the differential unit accelerates with the root, according to Newton's second law, the inertial drag of the differential unit is proportional to its mass. Therefore, by applying a virtual force proportional to the mass and opposite to the direction of acceleration to each differential unit, the macroscopic planned motion state can be mapped into an inertial load continuously distributed along the cantilever beam's axial direction. Finally, the inertial load is defined as a distributed inertial force.
[0080] In one example, within each control cycle (typically Δt = 1 ms), the planned motion state of the robot's actuator at the current moment after initialization is obtained: a six-dimensional pose vector. = [ , , , , , ]^T, linear velocity vector v = [ , , ]^T, linear acceleration vector a = [ , , ]^T, angular velocity vector ω = [ , , ]^T and the angular acceleration vector α = [ , , ]^T.
[0081] The planned motion state is applied as a base excitation to the root of the cantilever beam, and the distributed inertial force acting on the differential element dx of the bamboo is calculated using the Newton-Euler method. For each discrete point x of the differential element, the inertial acceleration caused by the translation and rotation of the base is: (x) = a + α × r(x) + ω × (ω × r(x)) Where r(x) = [x, 0, 0]^T is the position vector of the differential element in the root coordinate system. Projecting this inertial acceleration onto the deformation direction of the zither (i.e., the y-direction of the local coordinate system), we obtain the distributed inertial force: f(x,t) = -ρA·[ (x) + 2(ω × (x)) y ] Where ρ is the density of the flexible tool, and A is the cross-sectional area. (x) y Let be the elastic vibration velocity (y-direction component) of the differential element relative to the moving coordinate system (root), and let -ρA· be the translational inertial force and stiffness force. (x), Damping force -ρA·2(ω × (x)) y Substitute f(x,t) into the modal force integral formula to calculate the modal force F_i(t) for each order.
[0082] After obtaining the modal force vector at the current moment, the Newmark-β method (with β = 0.25, γ = 0.5, corresponding to the average acceleration method, which is an unconditionally stable scheme) is used to integrate the modal coordinate equations over one time step. Advance to = + Δt, to obtain the updated modal coordinates q( Modal velocity ( ) and modal acceleration ( Using the modal coordinate superposition formula, the deflection at each discrete point of the string is calculated, and the deflection value δ at the end (x = L) is extracted. ) = y(L, δ(t) is a time-varying scalar, and its negative sign indicates the direction in which the end of the plectrum deviates from its undeformed equilibrium position (which is consistent with the normal to the plane of the striking motion).
[0083] In the above scheme, the distributed inertial force is determined by introducing the mass distribution characteristics, which realizes the adaptability to flexible tools with non-uniform mass distribution. This allows the application to compensate the ends of flexible tools with cross-sectional changes, expanding the application range. It enables the model to distinguish the inertial effects at different positions of the beam, solves the problem of decreased accuracy of the uniform assumption under non-uniform structures, and transforms the single acceleration at the root into a force density function that changes continuously along the beam length. This accurately describes the transmission of inertial force from the root to the end, significantly improving the physical fidelity of deformation prediction.
[0084] Based on the above embodiments, as a possible implementation method, the dynamic characteristics include at least the inertial characteristics that characterize the cantilever beam's resistance to changes in motion state, the damping characteristics that characterize the cantilever beam's dissipation of vibration energy, and the stiffness characteristics that characterize the cantilever beam's resistance to deformation and its return to its initial position.
[0085] In this embodiment of the application, a dynamic model is constructed through the following steps, such as... Figure 3 As shown, the specific content is as follows: S301, Obtain the geometric parameters and material properties of the flexible tool; S302, based on geometric parameters and material property parameters, constructs a theoretical model to describe the lateral bending deformation law of cantilever beams; S303, spatial discretization and modal truncation are performed on the theoretical model to obtain a set of ordinary differential equations characterizing the dynamic properties; S304, obtain the calibrated parameter vector, update the corresponding parameter values in the ordinary differential equation system based on the parameter vector, and obtain the dynamic model; In S301 of this application embodiment, the geometric parameters of the flexible tool include the length, cross-sectional width, and height of the flexible tool, and the material properties of the flexible tool include the density, elastic modulus, and damping ratio of the flexible tool.
[0086] In S302 of this application embodiment, Euler-Bernoulli beam theory is used as the modeling basis. Based on geometric parameters and material property parameters, a partial differential equation describing the transverse full deformation law of the cantilever beam is constructed as a theoretical model.
[0087] In S303 of this embodiment, since the theoretical model is difficult to use directly for real-time control, it needs to be numerically processed. The assumed modal method or finite difference method is used to discretize the continuous beam structure into a finite set of nodes or modal coordinates. Based on the vibration characteristics of the cantilever beam, the top few modes that contribute most to the dynamic response of the cantilever beam are identified. Since higher-order modes typically have higher frequencies and lower energy, and are easily attenuated rapidly by system damping, their influence is ignored. Through spatial discretization and modal truncation, the theoretical model is transformed into a set of ordinary differential equations. These equations describe the changes in modal coordinates over time, relating to the beam's inertial, damping, and stiffness characteristics, thus characterizing its dynamic properties.
[0088] In S304 of this application embodiment, the parameter vector includes the elastic modulus, which characterizes the material stiffness properties of the flexible tool, and the damping ratio, which characterizes its energy dissipation properties. Parameters in the theoretical model, such as the elastic modulus and damping ratio, are often affected by factors such as manufacturing tolerances, material inhomogeneity, environmental interference, and usage interference. Using the same data for a long period makes it difficult to guarantee accuracy. Therefore, when constructing the dynamic model, it is also necessary to obtain a calibrated parameter vector. Based on the calibrated parameter vector, the corresponding parameter values in the ordinary differential equation system are updated to eliminate the deviation between theoretical parameters and actual physical properties, obtaining a high-precision dynamic model. This ensures that the model has both a solid physical mechanism foundation and accurate parameters that conform to actual working conditions, providing reliable model support for real-time prediction of end-effector deformation.
[0089] In one example, when the flexible tool is a bamboo pole, it is equivalent to an Euler-Bernoulli cantilever beam with a uniform cross-section, fixed at one end and free at the other. First, the geometric parameters of the bamboo pole are obtained using precision measuring instruments: total length L (280–320 mm), cross-sectional width b (4–6 mm), and height h (1.5–2.5 mm). The moment of inertia I = (b·h³) / 12 and the cross-sectional area A = b·h are calculated. Regarding material properties, the bamboo density ρ is taken as 600–800 kg / m³ (determined by actual measurement depending on the specific species), and the elastic modulus E along the fiber direction is (10–20 GPa), determined by a three-point bending test. The damping ratio ζ (0.02–0.06) is determined by the free decay method or the half-power bandwidth method.
[0090] Based on the above geometric and material properties, the partial differential governing equations for the transverse bending vibration of the bamboo are established: EI· 4 y(x,t) / x 4 + ρA· ²y(x,t) / t² + c· y(x,t) / t = f(x,t) Where c = 2ζ√(ρA·EI) is the equivalent viscous damping coefficient, and the boundary condition is: at the fixed end at the root, y(0,t) = 0 and y / x|_{x=0} = 0; End free moment EI· ²y / x²|_{x=L} = 0 and shear force EI· ³y / x³|_{x=L} = 0.
[0091] To achieve real-time numerical solutions, the above partial differential equations are spatially discretized using the Galerkin method, which expands the deflection function into a finite-term modal superposition: y(x,t) = (x)· (t) in (x) is the first condition that satisfies the above cantilever beam boundary conditions. i The mode shape function (taken from the standard solution of analytical modal analysis). (t) represents the corresponding modal coordinates. Modal truncation order. N By selecting modes of orders 3–5 (convergence analysis confirms that higher-order modes contribute less than 1% to the end response), both the quasi-static bending component and the main high-frequency vibration component can be captured simultaneously. After discretization, the original partial differential equation is transformed into… N A decoupled system of second-order ordinary differential equations:
[0092] Where M, C, and K are the diagonal matrices of modal mass, modal damping, and modal stiffness, respectively; F(t) is the modal force vector, whose elements... (t) = ∫_0^L (x)·f(x,t) dx.
[0093] The dynamic model established above constrains the problem to the main deformation direction of the string (i.e., the normal direction of the striking plane), and only performs modal expansion on the bending deformation in this direction, reducing the model's degrees of freedom (from tens of dimensions to 3-5 dimensions), so that a complete deformation prediction can be completed within a 1 ms control cycle, and avoids the numerical stiffness problem caused by the coupling of axial force and bending moment in the general model.
[0094] In the above scheme, a dynamic model is constructed by acquiring geometric parameters and material property parameters, which enables the model to be customized according to specific dimensions and materials, thus improving the accuracy of the dynamic model. By spatial discretization and modal truncation of the theoretical model, a set of ordinary differential equations is obtained, which realizes the transformation of solving complex partial differential equations into solving a set of ordinary differential equations with controllable computational complexity, meeting the millisecond-level real-time requirements of robot control. By using measured data to revise the set of ordinary differential equations, the influence of manufacturing errors, environmental interference and other factors is effectively eliminated, significantly improving the prediction accuracy and robustness of the model in the real physical world.
[0095] In this embodiment, the dynamic model of the zither can also be established using Timoshenko beam theory. The governing equations of Timoshenko beam theory, based on the Euler-Bernoulli beam, add the shear angle variable ψ and the section rotational inertia term ρI. The coupled partial differential equations are as follows: ρA· ²y / t² - κGA· ( y / x - ψ) / x = f(x,t) ρI· ²ψ / t² - EI· ²ψ / x² - κGA·( y / x - ψ) = 0 Where y(x,t) is the lateral deflection, ψ(x,t) is the shear angle of the cross section, ρ is the density, A is the cross-sectional area, E is Young's modulus, κ is the cross-sectional shear correction factor, G is the shear modulus of bamboo, and I is the moment of inertia of the cross section.
[0096] By establishing a dynamic model of the harp slenderness ratio using Timoshenko beam theory, when the slenderness ratio of the harp slenderness ratio is small (e.g., using a specially made short and thick harp slenderness ratio) or when the harp slenderness ratio is small or when the harp slenderness ratio is small in a local high-frequency excitation state (at which point the influence of the moment of inertia of the cross section cannot be ignored), the Timoshenko beam model can provide higher deformation prediction accuracy than the Euler-Bernoulli beam, and can further reduce the end residual after compensation.
[0097] In this embodiment, geometric nonlinearity can also be introduced, and a large deflection beam (elastica) model can be used to describe the huge bending deformation that may occur on the bamboo during extreme loud playing (rapid acceleration and sudden stop).
[0098] The model uses the arc length coordinate s as the independent variable, and the beam axis satisfies a system of nonlinear differential equations: dθ / ds = M(s) / EI dx / ds = cosθ dy / ds = sinθ Where s is the material coordinate along the axis of the bamboo pole, θ is the section rotation angle, M(s) is the bending moment distribution along the arc length, and EI is the bending stiffness, which needs to be obtained by integrating the inertial force under the excitation of the base.
[0099] With the above scheme, when the deformation of the bamboo exceeds 10%-15% of its length, the linear assumption begins to fail, and the large deflection model can more accurately describe the geometric nonlinear effect, so that the predicted deformation δ(t) deviates from the actual value within ±3% under extreme working conditions.
[0100] In this embodiment, spatial discretization can also be performed using the finite element method, dividing the zither string into multiple beam elements along the axial direction. Each element node contains displacement and rotation degrees of freedom, forming a global mass matrix M, stiffness matrix K, and damping matrix C. The dynamic equation is expressed as:
[0101] Where u is the nodal displacement vector. For node speed, Let F(t) be the nodal acceleration, F(t) be the equivalent nodal force of the base excitation, M be the global mass matrix, C be the global stiffness matrix, and K be the global damping matrix. Time-progression can be achieved using the HHT-α method or the generalized -α method instead of the Newmark-β method to obtain controllable numerical damping to suppress high-frequency spurious oscillations.
[0102] Through the above scheme, the finite element method has a stronger ability to model complex cross sections (such as when the cross section of the zither is not strictly rectangular) and variable cross section zithers, and can achieve higher spatial discretization accuracy.
[0103] In this embodiment, a data-driven approach can also be used. During the offline phase, a large amount of actual performance data is utilized. A non-contact camera is used to collect the deformation response of the plectrum end under different drive end trajectories, training a neural network model to learn the motion state (pose) of the drive end. ,speed , acceleration sequence The direct mapping relationship from the final deformation variable δ(t) to the final deformation variable δ(t):
[0104] When running online, the trained network is deployed in the controller, and the compensation amount is output in a feedforward manner.
[0105] In the above scheme, there is no need for precise physical property parameter modeling. It can automatically adapt to individual differences in the manufacturing process of the bamboo. With sufficient training data coverage, it can achieve a fitting accuracy better than the simplified physical model in specific motion modes.
[0106] Based on the above embodiments, as a possible implementation method, the driving end executes a first motion trajectory, and the end obtains a first actual motion trajectory corresponding to the first motion trajectory through a non-contact sensor; the driving end keeps the end in no contact with the external environment during the motion, and the first actual motion trajectory characterizes the change relationship of the spatial position of the end under the first motion trajectory over time; and the calibration parameter vector is determined based on the first motion trajectory and the first actual motion trajectory.
[0107] In this embodiment of the application, in order to address the individual differences of flexible tools, such as the uneven natural material of flexible tools, processing tolerances, and changes in material properties due to long-term use, it is also necessary to calibrate the parameter vector when constructing the dynamic model.
[0108] In this embodiment, the first motion trajectory is a pre-planned motion trajectory, which instructs the robot drive end to move along different preset first motion trajectories. This allows for the acquisition of dynamic information at different motion frequencies and amplitudes. The non-contact sensor can be an external high-speed camera. By controlling the end end to be non-contact with the external environment, the acquired first actual motion trajectory only reflects the free response characteristics of the flexible tool under inertial force. By recording the end end position change curve over time through the non-contact sensor, the dynamic behavior of the end end under the combined effects of inertial hysteresis, elastic recovery, and energy dissipation can be truly reflected.
[0109] In one example, a set of single-axis sinusoidal sweep trajectories for the robotic wrist is planned, with the frequency linearly sweeping from 0.5 Hz to three times the estimated fundamental frequency of the violin (the typical fundamental frequency of the violin is about 10–15 Hz, and the upper limit of the sweep frequency is about 40 Hz), and the amplitude is 5–10 mm, so as to fully excite the violin's modal responses in the playing frequency band. Each set of trajectories lasts for about 5 seconds, covering three orthogonal translational directions and two main rotational directions (wrist pitch and yaw), thereby realizing the planning of the first motion trajectory. The robot performs a no-load swing along the first motion trajectory mentioned above, that is, the peg does not touch the strings. The high-speed camera sampling rate is no less than 500 fps, the resolution is no less than 1280×1024, and the shutter time is no more than 0.5 ms to freeze high-speed motion blur. Using two assumed external high-speed cameras, the three-dimensional spatial coordinates of the peg end in each frame are extracted by speckle matching or edge tracking algorithm (sub-pixel accuracy 0.01 mm) based on the principle of binocular vision, so as to obtain the first actual motion trajectory. Since the camera is not mounted on the peg, the physical characteristics of the peg are not modified at all.
[0110] In this embodiment, by using different first motion trajectories and corresponding first actual motion trajectories, the corresponding first actual motion trajectory of the end effector under different first motion trajectories can be obtained. By comparing and analyzing the first motion trajectory with the corresponding first actual motion trajectory, the calibrated parameter vector can be determined.
[0111] In the above scheme, the first actual motion trajectory is obtained by non-contact sensors, which realizes high-fidelity measurement of the motion of the flexible tool end, avoids the additional mass error and contact force interference caused by contact measurement, and ensures that the collected first actual motion purely reflects the inertial characteristics, damping characteristics and stiffness characteristics of the flexible tool itself.
[0112] Based on the above embodiments, as a possible implementation method, the parameter vector is obtained through the following steps: Step 1: Define the parameter vector to be calibrated; Step 2: Construct a trajectory simulation model based on a system of ordinary differential equations. The trajectory simulation model takes the parameter vector and the first motion trajectory as input and outputs the simulated motion trajectory of the corresponding end point. Step 3: Construct the least squares optimization function; The least squares optimization function aims to minimize the deviation between the first actual motion trajectory and the simulated motion trajectory, and iteratively adjusts the parameter vector until the preset convergence condition is met, thus obtaining the iteratively adjusted parameter vector; Step 4: Drive the drive end to execute the second motion trajectory, and obtain the second actual motion trajectory of the end corresponding to the second motion trajectory through a non-contact sensor; Step 5: Input the iteratively adjusted parameter vector into the second motion trajectory simulation model to obtain the end-point simulation verification trajectory; Step 6: If the deviation between the simulation verification trajectory and the second actual motion trajectory is determined to be less than the preset trajectory deviation threshold, then the parameter vector after iterative adjustment is used as the calibration parameter vector.
[0113] In this embodiment of the application, for step 1, since the elastic modulus and damping ratio will cause the parameters to change during use, when constructing the dynamic model, the elastic modulus and damping ratio are defined as parameter vectors to be calibrated, that is, variables to be optimized.
[0114] In this embodiment of the application, for step 2, the ordinary differential equations are encapsulated into a trajectory simulation model. The parameter vector to be calibrated and the first motion trajectory are used as inputs. The model is solved by a numerical integration algorithm to simulate the dynamic response of the flexible tool under a specific parameter vector and output the simulated motion trajectory of the corresponding end.
[0115] In this embodiment of the application, for step 3, a least squares optimization function is constructed based on the simulated motion trajectory and the first actual motion trajectory. The optimization objective is to minimize the deviation between the simulated motion trajectory and the first actual motion trajectory. The Levenberg-Marquardt algorithm is used to iteratively update the parameter vector. After each iteration, the simulation is performed again to output a new simulated trajectory until the residual converges to a preset threshold or the maximum number of iterations is reached, and the iteratively adjusted parameter vector is obtained.
[0116] In this embodiment of the application, for step 4, verification data independent of the first motion trajectory, namely the second motion trajectory, is obtained to verify the generalization ability of the simulation trajectory model based on the parameter vector obtained in the current iteration. The driving end executes the second motion trajectory, and the second actual motion trajectory of the end is synchronously collected through a non-contact sensor.
[0117] In this embodiment of the application, for step 5, the iteratively adjusted parameter vector and the second motion trajectory are input into the trajectory simulation model together to solve for the simulation verification trajectory. The simulation verification trajectory is a prediction of the motion estimation of the end point based on the currently calibrated parameter vector.
[0118] In this embodiment of the application, for step 6, the deviation between the simulation verification trajectory and the second actual motion trajectory is calculated, such as the root mean square error. If the deviation is less than the preset trajectory deviation threshold, it indicates that the parameter vector after iterative adjustment can accurately reflect the real dynamic characteristics of the flexible tool, and the parameter vector after iterative adjustment is confirmed as the calibrated parameter vector.
[0119] In this embodiment of the application, if the trajectory deviation threshold is too large, an alarm is issued to prompt the replacement of the flexible tool or further diagnosis.
[0120] In one example, the pre-set first motion trajectory of the robot's drive end is: The first actual movement trajectory of the end of the corresponding bamboo cone is: (t), define the parameter vector θ to be calibrated, and construct the trajectory simulation model G(θ;) based on the system of ordinary differential equations. Using the parameter vector and the first motion trajectory as input, the corresponding simulation trajectory is obtained. (t;θ), construct the least squares objective function: J(θ)=Σ_t|| (t)- (t;θ)||², adopts a robust nonlinear optimization method between gradient descent and Gauss-Newton, namely the Levenberg-Marquardt algorithm, to iteratively solve for the optimal vector parameters that minimize J(θ), and adopts a multiple random initial value start-up strategy to avoid local minima.
[0121] The optimized parameter vector is written into the trajectory simulation model. The prediction accuracy of the updated model is statistically evaluated using another set of validation trajectories that were not used in the fitting, and the root mean square error (RMSE) of the predicted end position is calculated. When RMSE ≤ 30 μm (approximately 5% of the string spacing), the calibration is successful, and the currently optimized parameter vector is used as the calibration parameter vector, entering online performance mode. If the RMSE does not meet the threshold, an alarm is issued prompting the replacement of the string or further diagnostics.
[0122] In the embodiments of this application, the decoupled architecture of offline calibration and online compensation means that the stage of online driving robot control of flexible tools does not require any sensors installed on the flexible tools, nor does it require real-time feedback from external cameras. This completely avoids measurement interference. The real-time feedforward compensation in the control process relies entirely on the dynamic model itself. The camera is only used in the calibration stage and is no longer needed during control. This achieves a fundamental difference from visual servoing schemes that rely on continuous real-time feedback from external sensors.
[0123] In one example, a method for determining the calibration parameter vector is provided, such as... Figure 4 As shown, the specific content is as follows: S401, preset the first motion trajectory; S402, instructs the robot drive end to move according to the first motion trajectory, and non-contactly collects the first actual motion trajectory of the end of the flexible tool through an external high-speed camera; S403, input the parameter vector and the first motion trajectory participating in this iteration into the simulation trajectory model, obtain the simulation motion trajectory output by the model, and calculate the trajectory deviation between the simulation motion trajectory and the first actual motion trajectory; S404, determine whether the trajectory deviation is less than the preset trajectory deviation threshold. If yes, execute S405; otherwise, execute S406. S405, the parameter vectors participating in this round of iterations will be used as the calibration parameter vectors; S406, iteratively update the parameter vector.
[0124] In the above scheme, the residual between the simulation output and the actual measurement is gradually reduced by iterative correction, which effectively corrects the deviation of the parameter vector in the actual working condition and improves the fitting accuracy of the dynamic model. The method of training with the first motion trajectory and verifying with the second motion trajectory ensures that the parameter vector obtained by the current iteration update can accurately reflect the dynamic characteristics of the flexible tool under unknown working conditions.
[0125] In this application embodiment, the steps of a method for compensating for the deformation of the end effector of a flexible tool are provided: In each control cycle, perform the following: Step 1: Obtain the target trajectory at the current moment based on motion capture. (t).
[0126] Step 2: Initialize pose guessing on the driver side = (t).
[0127] Step 3: Estimate the corresponding acceleration using trajectory difference (center difference). .
[0128] Step 4: Iterate through the loop: k = 0 to .
[0129] The iterative process includes: 1. Calculate the distributed inertial force f(x, t) under base excitation. 2. Project onto modal coordinates to obtain modal forces.
[0130] 3. Integrate in one step using the Newmark-β method and update the modal coordinates.
[0131] 4. The end deformation δ(k) is obtained by superimposing the vibration modes. 5. Calculate the residual r = - ( + δ(k)) 6. If the residual r < ε, exit the iteration. 7. Otherwise, estimate the Jacobian J ≈ using the finite difference method. δ / P 8. Update: = + J - ¹·r Step 5: Final The desired pose is sent to the trajectory tracking controller.
[0132] The compensation method for the end of a flexible tool provided in this application, when applied to the bamboo pegs of a dulcimer, can have the following beneficial effects: In dulcimer performances, the bamboo pole is extremely thin and flexible (weighing only a few grams per pole). Adding any positioning target, reflective ball, inertial sensor, or electromagnetic tracking device to its end would significantly alter the pole's mass distribution, moment of inertia, and natural frequency, causing interference in measurements. The deformation pattern obtained after adding sensors would no longer reflect the original characteristics of the bamboo pole, thus losing its compensatory significance. This application, based on first principles of physics, equates the bamboo pole to an Euler-Bernoulli cantilever beam structure, fixed at one end and free at the other. Using the bamboo pole's geometric parameters (total length L, cross-sectional width b, and height h) and material properties (bamboo density ρ, elastic modulus E, and damping ratio ζ), a dynamic control equation EI is established. 4 y(x,t) / x 4 + ρA· ²y(x,t) / The transient deformation δ(t) at the end point is solved online using a numerical integration algorithm, t² = f(x,t), fundamentally avoiding the interference and damage to the inherent physical properties of the bamboo by the added mass. After non-contact offline model parameter self-calibration, the model prediction accuracy can be controlled within ±5%, effectively compensating for the end-point dynamic trajectory deviation of several millimeters to centimeters under high-speed swing, ensuring the absolute accuracy of the impact point.
[0133] This application constructs a nonlinear compensation equation based on an inverse compensation strategy. + δ[ , ] = In each control cycle, the optimal drive trajectory that satisfies the compensation constraint is obtained by inverse solving using the Newton-Raphson iteration. This application aims to reproduce the absolute striking point of the string with zero deviation. It achieves this by controlling the robot's drive end to actively "cross" a deformation offset precisely predicted by the model, while simultaneously compensating for the quasi-static bending component and high-frequency vibration component in the dynamic deformation of the string peg. This ensures that the actual striking point of the string peg after dynamic bending precisely matches the expected string striking position. This paradigm shift from passive vibration reduction to active striking point drive solves the fundamental deficiency of existing solutions in guaranteeing absolute striking point accuracy.
[0134] In musical performances, any additional time delay directly compromises rhythmic accuracy, diminishing the performance's artistic expressiveness. This application employs Newton-Raphson iteration to directly solve for the compensated desired trajectory of the drive end within each control cycle. The system's online computation relies solely on feedforward predictions from the physical model, eliminating delays introduced by command signal stretching or filtering smoothing, thus ensuring the accuracy of the rhythm during performance. The system's control cycle is in the millisecond range, meeting the stringent response speed requirements of real-time performance.
[0135] Before actual performance, this application involves driving the robot's drive end to perform a no-play motion along a preset frequency sweep trajectory (including different speed levels and acceleration directions). An external high-speed camera non-contactly captures the actual vibration response curves of the peg ends. The measured curves are compared with the model's predicted curves, and a least-squares optimization algorithm is used to back-calculate and update the equivalent elastic modulus and damping ratio in the model. During online operation, the system relies entirely on the corrected physical model for feedforward compensation, without the need for any sensors installed at the peg ends or continuous online tracking by an external high-speed camera, significantly reducing the hardware cost and operational complexity of the system. Simultaneously, this self-calibration mechanism allows the model to automatically adapt to individual differences in different pegs and changes in material properties due to long-term use and fatigue, ensuring long-term accuracy and robustness.
[0136] The compensation method for the end effector of a flexible tool provided in this application equates the ultra-thin flexible tool to a cantilever beam, uses the robot wrist motion state as a base excitation to calculate the transient deformation of the end effector online, performs iterative inverse compensation with the goal of accurately reproducing the absolute impact point of the end effector, and achieves online pure model feedforward compensation through non-contact offline calibration. It is not limited to a specific tool configuration or material, and can be applied to any thin and flexible tool operation scenario facing measurement-interference problems, such as brush painting, fine soft brush drawing, and surgical ultra-fine catheter scenarios.
[0137] This application provides a compensation device for the deformation of the end effector of a flexible tool, such as... Figure 5 As shown, the device 50 may include: an acquisition module 501, a generation module 502, a solution module 503, and a correction module 504.
[0138] Specifically, the acquisition module 501 is used to acquire the target trajectory of the end in the current period; The generation module 502 is used to initialize the planned motion state of the driving end based on rigid body kinematics, with the target trajectory as the initial value, and generate the distributed inertial force acting on the cantilever beam based on the planned motion state; the flexible tool is equivalent to a cantilever beam, with the free end of the cantilever beam corresponding to the end point and the root point corresponding to the other end of the flexible tool. Solver module 503 is used to convert the distributed inertial force into equivalent translational and rotational constraint excitations acting on the root. Based on the translational and rotational constraint excitations, the boundary conditions for the displacement and rotation angle of the cantilever beam root in the dynamic model are determined. Through the dynamic model, based on the dynamic characteristics of the cantilever beam, the lateral displacement distribution along the length of the cantilever beam under the boundary conditions is obtained. Based on the lateral displacement distribution, the lateral displacement of the free end relative to the baseline is determined, and the lateral displacement is taken as the deformation of the end. The baseline is the central axis of the cantilever beam under zero load, and the dynamic model is the dynamic model of the cantilever beam. The correction module 504 is used to iteratively correct the planned motion state based on the deformation until the end point matches the target trajectory after generating deformation. The converged planned motion state is determined as the desired trajectory of the driving end, and the motion of the driving end in the current cycle is controlled according to the desired trajectory.
[0139] The flexible tool end deformation compensation device provided in this application embodiment configures the flexible tool end to be free and the other end to be fixed to the robot's drive end, and equates the flexible tool to a cantilever beam, thus determining the connection relationship between the robot and the flexible tool, defining the starting point of the power transmission path and the deformation occurrence area, and providing a physical basis for the subsequent use of the cantilever beam dynamic model; By acquiring the target trajectory of the end effector in the current cycle, the target trajectory of the flexible tool end effector is used as the control reference, thereby improving the accuracy of the robot controlling the landing point of the end effector. Based on rigid body kinematics, the planned motion state of the driving end is initialized with the target trajectory as the initial value. Based on the planned motion state, the distributed inertial force acting on the cantilever beam is generated, and the precise landing point of the flexible tool as the striking tool is determined. Through rigid body kinematics, the planned motion state of the driving end is directly initialized with the target trajectory as the initial value without ignoring the deformation of the flexible tool end. This significantly reduces the number of convergence steps in subsequent iterations, meets the control requirements of high real-time performance, and transforms the planned motion state of the driving end into a distributed inertial force acting on the flexible tool, providing a foundation for the subsequent accurate determination of the deformation of the flexible end. By equating the distributed inertial force to translational and rotational constraint excitations acting on the root, the excitation application position was accurately located, which conforms to the actual working conditions of the robot's drive end driving the flexible tool. The translational and rotational constraint excitations determined the boundary conditions of displacement and rotation angle, establishing the geometric benchmark for solving the dynamic model. The lateral displacement distribution was obtained through solving the dynamic model, realizing the coupling between the inertia, damping, and stiffness inherent in the dynamic model, and solving the continuous deformation mode of the beam under accelerated motion, providing complete physical data for determining the deformation. The zero-load center axis was introduced as a reference, successfully eliminating the rigid body motion component of the drive end, so that the deformation only reflects elastic deformation, improving the accuracy of deformation determination. Furthermore, solving through the dynamic model eliminates the need to install sensors on the flexible tool, avoiding the interference of sensor-added mass on dynamic characteristics, and improving the accuracy of determining the end deformation. By aiming to match the end effector with the target trajectory after generating deformation, the planned motion state is iteratively corrected based on the deformation. The converged planned motion state is determined as the desired trajectory of the drive end. The movement of the drive end in the current cycle is controlled according to the desired trajectory, which overcomes the influence of the deformation of the flexible tool on the landing point of the end effector. Finally, the movement of the drive end in the current cycle is controlled according to the desired trajectory, which ensures that the deformation experienced by the end effector of the flexible tool after moving according to the desired trajectory of the drive segment is accurately matched with the preset target trajectory, thus improving the control accuracy of the robot.
[0140] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.
[0141] This application provides an electronic device (computer device / equipment / system) including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of a method for compensating the deformation of the end effector of a flexible tool. Compared with related technologies, this method achieves the following: it eliminates the need to install sensors on the flexible tool, avoiding interference from the added mass of sensors on the dynamic characteristics and improving the accuracy of determining the end effector deformation; it overcomes the influence of the flexible tool deformation on the end effector landing point, and finally controls the movement of the drive end in the current cycle according to the desired trajectory, ensuring that the deformation experienced by the end effector after moving according to the desired trajectory based on the drive segment is accurately matched with the preset target trajectory, thus improving the control accuracy of the robot.
[0142] In one alternative embodiment, an electronic device is provided, such as Figure 6 As shown, Figure 6The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this application.
[0143] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0144] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 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.
[0145] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.
[0146] The memory 4003 is used to store computer programs that execute the embodiments of this application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the computer programs stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.
[0147] The electronic device package may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.
[0148] This application provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program can implement the steps and corresponding content of the aforementioned method embodiments. Compared with the prior art, it achieves the following: It eliminates the need to install sensors on the flexible tool, avoiding interference from the sensor's added mass on the dynamic characteristics and improving the accuracy of determining the end effector deformation; it overcomes the influence of flexible tool deformation on the end effector's landing point, ultimately controlling the drive end's movement in the current cycle according to the desired trajectory, ensuring that the deformation experienced by the flexible tool's end effector after moving along the desired trajectory based on the drive segment precisely matches the preset target trajectory, thus improving the robot's control precision.
[0149] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium, a computer-readable medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0150] This application also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments. Compared with the prior art, it can achieve: There is no need to install sensors on the flexible tool, which avoids the interference of the sensor's added mass on the dynamic characteristics and improves the accuracy of determining the end effector deformation. It overcomes the influence of the flexible tool deformation on the end effector landing position, and finally controls the movement of the drive end in the current cycle according to the desired trajectory. This ensures that the deformation experienced by the flexible tool end after moving according to the desired trajectory based on the drive segment is accurately matched with the preset target trajectory, thus improving the robot's control precision.
[0151] The terms "first," "second," "third," "fourth," "1," "2," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the illustrations or text descriptions.
[0152] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.
[0153] The above are only optional implementation methods for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.
Claims
1. A method for compensating for end-effector deformation of a flexible tool, characterized in that, The flexible tool has a free end and a fixed end to the robot's drive end. The method includes: Obtain the target trajectory of the terminal in the current period; Based on rigid body kinematics, the planned motion state of the driving end is initialized with the target trajectory as the initial value. Based on the planned motion state, a distributed inertial force acting on the cantilever beam is generated. The flexible tool is equivalent to the cantilever beam, with the free end of the cantilever beam corresponding to the end point and the root corresponding to the other end of the flexible tool. The distributed inertial force is equivalent to translational and rotational constraint excitations acting on the root. Based on the translational and rotational constraint excitations, the boundary conditions for the displacement and rotation angle of the cantilever beam root in the dynamic model are determined. Through the dynamic model, based on the dynamic characteristics of the cantilever beam, the lateral displacement distribution of the cantilever beam along its length under the boundary conditions is obtained. Based on the lateral displacement distribution, the lateral displacement of the free end relative to the baseline is determined, and the lateral displacement is taken as the deformation of the end. The baseline is the central axis of the cantilever beam under zero load, and the dynamic model is the dynamic model of the cantilever beam. The planned motion state is iteratively corrected based on the deformation variables until the end point matches the target trajectory after generating the deformation variables. The converged planned motion state is then determined as the desired trajectory of the driving end, and the motion of the driving end in the current cycle is controlled based on the desired trajectory.
2. The method according to claim 1, characterized in that, The step of iteratively correcting the planned motion state based on the deformation variables until the end point matches the target trajectory after generating the deformation variables includes: Extract the target pose of the end point from the target trajectory; The planned motion state is iteratively corrected multiple times based on the target pose until the pose deviation between the predicted pose of the end after generating the deformation and the target pose converges. The planned motion state at the convergence point is determined as the desired trajectory of the driving end. Each iteration includes: Obtain the planned motion state participating in this iteration, and solve the deformation of the end based on the planned motion state; for the first iteration, the planned motion state is the initial value obtained by initializing the target pose based on rigid body kinematics; for non-first iterations, the planned motion state is the planned motion state corrected in the previous iteration. Based on the pose and deformation in the planned motion state, the predicted pose of the end effector is determined; Calculate the pose deviation between the predicted pose and the target pose; If the pose deviation does not converge to the preset deviation threshold and the number of iterations is less than the preset number, then the planned motion state is incrementally corrected based on the pose deviation, and the next iteration is initiated.
3. The method according to claim 1, characterized in that, The target trajectory includes the position, velocity, and acceleration of the endpoint in space as a function of time. The process, based on rigid body kinematics, initializes the planned motion state of the driving end with the target trajectory as the initial value, and generates distributed inertial forces acting on the cantilever beam based on the planned motion state, including: Based on rigid body kinematics, the target trajectory is mapped to the initial pose, initial velocity, and initial acceleration of the driving end when the cantilever beam is not deformed. The initial planned motion state includes the initial pose, initial velocity, and initial acceleration. The mass distribution characteristics of the cantilever beam are obtained. Based on the mass distribution characteristics, the initialized planned motion state is mapped to an inertial load continuously distributed along the axial direction of the cantilever beam, and the inertial load is used as the distributed inertial force.
4. The method according to claim 1, characterized in that, The dynamic characteristics include at least the inertial characteristics that characterize the cantilever beam's resistance to changes in motion state, the damping characteristics that characterize the cantilever beam's dissipation of vibration energy, and the stiffness characteristics that characterize the cantilever beam's resistance to deformation and its return to its initial position. The dynamic model is pre-built through the following steps: Obtain the geometric parameters and material properties of the flexible tool; Based on the aforementioned geometric parameters and material properties, a theoretical model is constructed to describe the lateral bending deformation law of the cantilever beam. The theoretical model is spatially discretized and modally truncated to obtain a set of ordinary differential equations characterizing the dynamic properties. Obtain the calibrated parameter vector, update the corresponding parameter values in the system of ordinary differential equations based on the parameter vector, and obtain the dynamic model; the parameter vector includes the elastic modulus, which characterizes the material stiffness properties of the flexible tool, and the damping ratio, which characterizes the energy dissipation properties.
5. The method according to claim 4, characterized in that, The process of obtaining the calibrated parameter vector includes: The driving end is driven to execute a first motion trajectory, and a first actual motion trajectory of the end corresponding to the first motion trajectory is obtained through a non-contact sensor; the driving end keeps the end from contacting the external environment during the motion, and the first actual motion trajectory characterizes the change of the spatial position of the end under the first motion trajectory over time; The calibrated parameter vector is determined based on the first motion trajectory and the first actual motion trajectory.
6. The method according to claim 5, characterized in that, The step of determining the calibrated parameter vector based on the first motion trajectory and the first actual motion trajectory includes: Define the parameter vector to be calibrated; A trajectory simulation model is constructed based on the set of ordinary differential equations. The trajectory simulation model takes the parameter vector and the first motion trajectory as input and outputs the corresponding simulated motion trajectory of the end point. Construct a least squares optimization function; the least squares optimization function aims to minimize the deviation between the first actual motion trajectory and the simulated motion trajectory, and iteratively adjusts the parameter vector until a preset convergence condition is met to obtain the iteratively adjusted parameter vector; The drive end is driven to execute a second motion trajectory, and the second actual motion trajectory of the end corresponding to the second motion trajectory is obtained by a non-contact sensor; The iteratively adjusted parameter vector and the second motion trajectory are input into the trajectory simulation model to obtain the simulation verification trajectory of the end point; If it is determined that the deviation between the simulation verification trajectory and the second actual motion trajectory is less than a preset trajectory deviation threshold, then the iteratively adjusted parameter vector is used as the calibrated parameter vector.
7. A compensation device for the deformation of the end of a flexible tool, characterized in that, The flexible tool has a free end and a fixed end to the robot's drive end, comprising: The acquisition module is used to acquire the target trajectory of the terminal in the current period; The generation module is used to initialize the planned motion state of the driving end based on rigid body kinematics, with the target trajectory as the initial value, and generate the distributed inertial force acting on the cantilever beam based on the planned motion state; the flexible tool is equivalent to the cantilever beam, with the free end of the cantilever beam corresponding to the end point and the root point corresponding to the other end of the flexible tool. The solution module is used to equate the distributed inertial force to translational and rotational constraint excitations acting on the root. Based on the translational and rotational constraint excitations, it determines the boundary conditions for the displacement and rotation angle of the cantilever beam root in the dynamic model. Through the dynamic model, based on the dynamic characteristics of the cantilever beam, it solves for the lateral displacement distribution of the cantilever beam along its length under the boundary conditions. Based on the lateral displacement distribution, it determines the lateral displacement of the free end relative to the baseline and uses the lateral displacement as the deformation of the end. The baseline is the central axis of the cantilever beam under zero load, and the dynamic model is the dynamic model of the cantilever beam. The correction module is used to iteratively correct the planned motion state based on the deformation variables until the end point matches the target trajectory after generating the deformation variables. The converged planned motion state is determined as the desired trajectory of the driving end, and the motion of the driving end in the current cycle is controlled according to the desired trajectory.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the method according to any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-6.