Humanoid robot impedance adjustment method and system

By recording contact force and joint angle data in real time, extracting contact transient characteristic parameters and calculating real-time stiffness values, and optimizing stiffness and damping compensation torque, the problems of force impact and response lag in humanoid robot impedance adjustment are solved, thereby improving control accuracy and stability.

CN122143069AActive Publication Date: 2026-06-05TIANJIN SKY STAR TECH DEV CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN SKY STAR TECH DEV CO LTD
Filing Date
2026-05-09
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies struggle to perceive the dynamic changes in the contact state between humanoid robots and their external environment in real time, resulting in inaccurate matching of impedance control schemes, excessive force impacts, or delayed responses, which affect interaction stability and control accuracy.

Method used

By recording the contact force change curve and joint angle sequence in real time, the transient characteristic parameters of the contact are extracted, the real-time contact stiffness value is calculated, and the stiffness compensation torque and damping compensation torque are optimized by combining the position deviation and velocity deviation.

Benefits of technology

It significantly improves the response speed and execution efficiency of impedance regulation in humanoid robots, enhances control precision and stability, and ensures the safety and reliability of the interaction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122143069A_ABST
    Figure CN122143069A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of machine control, and proposes a kind of humanoid robot impedance adjusting method and system, comprising: extracting the joint angle sequence and joint angular velocity sequence of contact force variation curve, extreme point detection is carried out to contact force variation curve, and contact transient characteristic parameter is obtained.Based on joint angle sequence, the displacement variation is obtained by forward kinematics analysis, the real-time contact stiffness value is determined in combination with displacement variation and contact force variation curve, the stiffness adjustment amount is obtained by superimposing real-time contact stiffness value and contact transient characteristic parameter;Real-time acquisition of position deviation and speed deviation of current control cycle, linear mapping of position deviation and stiffness adjustment amount obtains stiffness compensation torque, speed deviation and contact transient characteristic parameter gain modulation obtain damping compensation torque, finally, the original torque command is updated according to two kinds of compensation torques, and optimization torque command is generated;The present application can improve the efficiency of humanoid robot impedance adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine control technology, and more specifically, to a method and system for impedance adjustment of a humanoid robot. Background Technology

[0002] When humanoid robots interact with unknown external environments, traditional impedance control schemes struggle to perceive dynamic changes in the contact state in real time and cannot accurately match parameters based on the real-time relationship between contact force and displacement. This results in the robot's end effector experiencing excessive force impact or delayed response at the moment of contact, making it difficult to meet the operational requirements of complex scenarios in terms of interaction stability and control precision.

[0003] Existing impedance regulation technologies mostly rely on fixed parameters or simple linear adjustments, without combining contact transient characteristics and real-time contact stiffness for adaptive optimization. This not only results in low regulation efficiency but also easily leads to abnormal fluctuations in joint torque, making it impossible to achieve a balance between compliant control and precise operation. This severely limits the interactive operation capabilities of humanoid robots in unstructured environments. Therefore, how to overcome the shortcomings of low impedance regulation efficiency in humanoid robots has become a technical problem that urgently needs to be solved in the industry. Summary of the Invention

[0004] To address the aforementioned problems in the existing technology, embodiments of the present invention provide a method and system for impedance adjustment of a humanoid robot.

[0005] To achieve the above objectives, the present invention provides a method for impedance adjustment of a humanoid robot, comprising: A. Record the contact force change curve generated when the end effector of the humanoid robot comes into contact with the external environment in real time, and extract the joint angle sequence and joint angular velocity sequence of the contact force change curve; B. Perform extreme point detection on the contact force change curve, extract the force change rate and contact force change duration of the humanoid robot, and obtain the contact transient characteristic parameters of the humanoid robot; C. Based on the joint angle sequence, perform forward kinematic analysis on the humanoid robot to obtain the displacement change of the humanoid robot, and determine the real-time contact stiffness value of the humanoid robot based on the displacement change and the contact force change curve; D. By superimposing the real-time contact stiffness value and the contact transient characteristic parameters, the stiffness adjustment amount of the humanoid robot is obtained; E. Real-time acquisition of the positional deviation between the actual position and the desired position of the humanoid robot and the speed deviation between the actual speed and the desired speed within the current control cycle; F. Linearly map the position deviation to the stiffness adjustment amount to obtain the stiffness compensation torque of the humanoid robot, and perform gain modulation on the velocity deviation and the contact transient characteristic parameters to obtain the damping compensation torque of the humanoid robot; G. Based on the stiffness compensation torque and the damping compensation torque, update the original torque command of the humanoid robot to obtain the optimized torque command of the humanoid robot.

[0006] Preferably, the real-time recording of the contact force change curve generated when the end effector of the humanoid robot comes into contact with the external environment, and the extraction of the joint angle sequence and joint angular velocity sequence of the contact force change curve, includes: The joint angle sensor data of each joint in the humanoid robot and the six-dimensional force sensor data of the end effector are collected synchronously at fixed time intervals, and the six-dimensional force sensor data and the joint angle sensor data are aligned according to the collection timestamp to obtain the multi-source data frame sequence of the humanoid robot. Sliding window outlier detection is performed on the six-dimensional force sensor data to obtain the transient impact noise of the humanoid robot; The contact force data sequence of the humanoid robot is obtained by replacing the transient impact noise with the median value within a sliding window; Based on the contact force data sequence, the start and end times of the rising edge of the contact force rising from zero to the first local maximum are detected. Using the start and end times of the rising edge as truncation boundaries, valid data segments of the contact event are extracted from the multi-source data frame sequence. The joint angle data in the effective data segment of the contact event are arranged in chronological order to form the joint angle sequence of the humanoid robot; The joint angle sequence is subjected to first-order difference processing to obtain the joint angular velocity sequence of the humanoid robot.

[0007] Preferably, the step of detecting extreme points on the contact force change curve, extracting the force change rate and contact force change duration of the humanoid robot, and obtaining the contact transient characteristic parameters of the humanoid robot includes: The contact force variation curve is subjected to first-order numerical difference to obtain the contact force difference sequence of the humanoid robot; The zero-crossing points where consecutive positive values ​​turn into negative values ​​in the contact force difference sequence are detected, and the time corresponding to the zero-crossing point is marked as the local maximum point of the contact force of the humanoid robot. Using the local maximum point of the contact force as the boundary, the moment when the contact force value first exceeds the baseline noise threshold is taken as the contact start time, and the moment when the contact force value drops to within the stable threshold range is taken as the contact stabilization time. The contact force value at the initial contact moment and the contact force value at the local maximum point of the contact force are extracted to obtain the force change rate of the humanoid robot; The difference between the moment of the local maximum of the contact force and the moment of contact stabilization is taken as the duration of the contact force change of the humanoid robot. By combining the force change rate and the duration of the contact force change, the contact transient characteristic parameters of the humanoid robot are obtained.

[0008] Preferably, the step of performing forward kinematic analysis on the humanoid robot based on the joint angle sequence to obtain the displacement change of the humanoid robot, and determining the real-time contact stiffness value of the humanoid robot based on the displacement change and the contact force change curve, includes: Extract the initial joint angle vector corresponding to the contact initiation time and the stable joint angle vector corresponding to the contact stabilization time from the joint angle sequence, and extract the peak joint angle vector corresponding to the contact force peak time. The initial joint angle vector, the peak joint angle vector, and the stable joint angle vector are obtained by forward kinematics recursion to obtain the initial spatial coordinate vector, the peak spatial coordinate vector, and the stable spatial coordinate vector of the humanoid robot. The Euclidean distance between the peak spatial coordinate vector and the initial spatial coordinate vector is taken as the first displacement change, the Euclidean distance between the stable spatial coordinate vector and the peak spatial coordinate vector is taken as the second displacement change, and the Euclidean distance between the stable spatial coordinate vector and the initial spatial coordinate vector is taken as the total displacement change. The initial contact force value at the moment of contact initiation, the peak contact force value at the moment of contact peak, and the stable contact force value at the moment of contact stabilization are extracted from the contact force variation curve and recorded as the first force value, the second force value, and the third force value, respectively. Calculate the real-time contact stiffness value of the humanoid robot.

[0009] Preferably, the formula for calculating the real-time contact stiffness value is: ; in, This represents the real-time contact stiffness value. This represents the first force value. This indicates the second force value. This indicates the value of the third force. This represents the change in the first displacement. This represents the change in the second displacement. This represents the total change in displacement. This indicates the preset environmental contact factor.

[0010] Preferably, the step of superimposing the real-time contact stiffness value and the contact transient characteristic parameters to obtain the stiffness adjustment amount of the humanoid robot includes: The real-time contact stiffness value is normalized by interval normalization to obtain the normalized stiffness component of the humanoid robot. The force rate of change in the contact transient characteristic parameters is saturated and limited to obtain the force rate of change component of the humanoid robot. The duration of contact force change in the contact transient characteristic parameters is mapped inversely to obtain the duration influence factor of the humanoid robot. The duration influence factor is inversely proportional to the duration of contact force change. The normalized stiffness component, the force change rate component, and the duration influence factor are weighted and summed to obtain the preliminary fusion value of the humanoid robot; The stiffness adjustment amount of the humanoid robot is obtained by performing a moving average filter on the preliminary fusion value.

[0011] Preferably, the step of linearly mapping the positional deviation to the stiffness adjustment amount to obtain the stiffness compensation torque of the humanoid robot includes: The positional deviation of the humanoid robot is expanded into a positional deviation vector along the joint dimension; Based on the vector dimension of the position deviation vector, the stiffness adjustment amount is vectorized and extended to obtain the stiffness adjustment vector of the humanoid robot. The position deviation vector and the stiffness adjustment vector are multiplied element-wise to obtain the intermediate product vector of the humanoid robot. The intermediate product vector is smoothed in the spatial domain to obtain the smoothed product vector of the humanoid robot, and the smoothed product vector is used as the stiffness compensation torque of the humanoid robot.

[0012] Preferably, the step of gain-modulating the velocity deviation with the contact transient characteristic parameters to obtain the damping compensation torque of the humanoid robot includes: The velocity deviation of the humanoid robot is expanded into a velocity deviation vector along the joint dimension; The force change rate and the duration of the contact force change are extracted from the contact transient characteristic parameters. The force change rate is nonlinearly scaled to obtain the first modulation coefficient of the humanoid robot. The duration of the contact force change is converted to a time constant to obtain the second modulation coefficient of the humanoid robot. The first modulation coefficient and the second modulation coefficient are cross-coupled to obtain the global damping gain of the humanoid robot; The global damping gain is expanded into a joint damping gain vector according to the joint motion inertia; The intermediate damping vector of the humanoid robot is obtained by performing element-wise vector multiplication of the velocity deviation vector and the joint damping gain vector. Time-domain lag compensation is performed on the intermediate damping vector to obtain the damping compensation torque of the humanoid robot.

[0013] Preferably, updating the original torque command of the humanoid robot based on the stiffness compensation torque and the damping compensation torque to obtain the optimized torque command of the humanoid robot includes: Align the stiffness compensation torque and the damping compensation torque along the joint dimension to obtain the first compensation vector and the second compensation vector of the humanoid robot; The first compensation vector and the second compensation vector are added element by element to obtain the total compensation vector of the humanoid robot; Obtain the original torque command vector of the current control cycle, and determine the preliminary updated torque vector of the humanoid robot based on the total compensation vector and the original torque command vector; The initial updated torque vector is subjected to amplitude clamping processing to obtain the safety constraint torque vector of the humanoid robot; The rate of change of the safety constraint torque vector during adjacent control cycles is limited, and an optimized torque command for the humanoid robot is generated based on the limited torque vector.

[0014] Furthermore, the present invention also provides a humanoid robot impedance adjustment system, comprising: The data extraction module is used to record the contact force change curve generated when the end effector of the humanoid robot comes into contact with the external environment in real time, and to extract the joint angle sequence and joint angular velocity sequence of the contact force change curve. The parameter detection module is used to detect extreme points on the contact force change curve, extract the force change rate and contact force change duration of the humanoid robot, and obtain the contact transient characteristic parameters of the humanoid robot. The stiffness analysis module is used to perform forward kinematic analysis on the humanoid robot based on the joint angle sequence, obtain the displacement change of the humanoid robot, and determine the real-time contact stiffness value of the humanoid robot based on the displacement change and the contact force change curve. The stiffness adjustment module is used to superimpose the real-time contact stiffness value and the contact transient characteristic parameters to obtain the stiffness adjustment amount of the humanoid robot; The deviation comparison module is used to collect in real time the positional deviation between the actual position and the desired position of the humanoid robot and the speed deviation between the actual speed and the desired speed within the current control cycle. The torque generation module is used to linearly map the position deviation with the stiffness adjustment amount to obtain the stiffness compensation torque of the humanoid robot, and to gain modulate the velocity deviation with the contact transient characteristic parameters to obtain the damping compensation torque of the humanoid robot. The instruction optimization module is used to update the original torque instruction of the humanoid robot based on the stiffness compensation torque and the damping compensation torque, so as to obtain the optimized torque instruction of the humanoid robot.

[0015] The beneficial effects of this invention are as follows: 1. This invention accurately extracts contact transient characteristic parameters and calculates real-time contact stiffness values ​​by collecting contact force, joint angle and angular velocity data in real time. It can quickly generate stiffness adjustment amounts, significantly improve the response speed and execution efficiency of humanoid robot impedance adjustment, and make the adjustment process more stable and smooth.

[0016] 2. This invention calculates stiffness compensation torque and damping compensation torque by calculating position deviation and velocity deviation respectively. Combined with torque command optimization and updates, it effectively enhances the control accuracy and stability of humanoid robots when in contact with the external environment, ensures the safety and reliability of the interaction process, and improves the overall operation performance. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating an impedance adjustment method for a humanoid robot according to the present invention; Figure 2 This is a schematic diagram illustrating the functional modules of a humanoid robot impedance adjustment system according to the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] This application provides a method for impedance adjustment of a humanoid robot. The execution subject of this method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the humanoid robot impedance adjustment method can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0020] Reference Figure 1 The diagram shown is a flowchart illustrating an impedance adjustment method for a humanoid robot according to an embodiment of the present invention. In this embodiment, the impedance adjustment method for a humanoid robot includes: A. Record the contact force change curve generated when the end effector of the humanoid robot comes into contact with the external environment in real time, and extract the joint angle sequence and joint angular velocity sequence of the contact force change curve; In this embodiment of the invention, the real-time recording of the contact force change curve generated when the end effector of the humanoid robot comes into contact with the external environment, and the extraction of the joint angle sequence and joint angular velocity sequence of the contact force change curve, includes: The joint angle sensor data of each joint in the humanoid robot and the six-dimensional force sensor data of the end effector are collected synchronously at fixed time intervals, and the six-dimensional force sensor data and the joint angle sensor data are aligned according to the collection timestamp to obtain the multi-source data frame sequence of the humanoid robot. Sliding window outlier detection is performed on the six-dimensional force sensor data to obtain the transient impact noise of the humanoid robot; The contact force data sequence of the humanoid robot is obtained by replacing the transient impact noise with the median value within a sliding window; Based on the contact force data sequence, the start and end times of the rising edge of the contact force rising from zero to the first local maximum are detected. Using the start and end times of the rising edge as truncation boundaries, valid data segments of the contact event are extracted from the multi-source data frame sequence. The joint angle data in the effective data segment of the contact event are arranged in chronological order to form the joint angle sequence of the humanoid robot; The joint angle sequence is subjected to first-order difference processing to obtain the joint angular velocity sequence of the humanoid robot.

[0021] The humanoid robot's joint angle sensor output data and the end effector's six-dimensional force sensor output data are collected synchronously at fixed time intervals. The two types of data are matched one-to-one according to their respective collection timestamps to complete the alignment process in the time dimension, forming a multi-source data frame sequence containing joint angle information and six-dimensional force information.

[0022] The data from the six-dimensional force sensor are traversed sequentially within a set window range. The differences in data values ​​are compared within each window range to identify abnormal data points that deviate from the normal data range. These abnormal data points are identified as transient impact noise points.

[0023] For the identified transient impact noise, the intermediate value of all normal data is calculated within the sliding window where the noise is located. The intermediate value is used to replace the corresponding transient impact noise. After the data correction is completed, a continuous and stable contact force data sequence is obtained.

[0024] Traverse the contact force data sequence, locate the initial moment when the contact force value starts to rise from zero as the rising edge start time, and continue to track the moment when the contact force value rises to the first local maximum value as the rising edge end time.

[0025] When the contact force change curve does not have obvious local maxima, such as when the contact force increases monotonically with time or enters a plateau period after increasing, the “rise edge start time” is defined as the starting point when the contact force first exceeds 5 consecutive sampling cycles above the baseline noise threshold; the “rise edge end time” is defined as the moment when the contact force change rate first falls below 10% of the preset maximum slope, or the moment when the contact force enters the range of ±5% of the peak force.

[0026] If the contact force always increases monotonically and no local maximum occurs, the end time of the effective data segment of the contact event is taken as the end time of the rising edge, and the time corresponding to the maximum contact force value in that segment is taken as the equivalent peak time. The subsequent method for extracting contact transient feature parameters remains unchanged.

[0027] In addition, the baseline value for the initial contact force is not limited to a strict zero value. A dynamic baseline estimation method can be used: the average contact force within a fixed time window before the contact event occurs is used as the baseline value, and the moment when the contact force first exceeds the baseline value plus three times the standard deviation is recorded as the contact initiation time.

[0028] Using these two moments as the boundaries for data extraction, the data content within the corresponding time period is extracted from the multi-source data frame sequence to form the effective data segment of the contact event.

[0029] Extract all joint angle-related data from the valid data segment of the contact event, and arrange them sequentially according to the order of data acquisition to form a complete joint angle sequence.

[0030] The difference between the joint angle data at adjacent moments in the joint angle sequence is calculated. The joint angle data at the next moment is subtracted from the joint angle data at the previous moment. The calculated differences are arranged in chronological order to form a joint angular velocity sequence.

[0031] The beneficial effects are: ensuring the consistency of multi-source data through synchronous acquisition and time alignment; eliminating transient impact noise through sliding window outlier detection and median replacement; improving data validity by accurately extracting effective data segments of contact events; and accurately obtaining joint angular velocity sequences through first-order differential processing, providing accurate and reliable input data for subsequent impedance adjustment, thereby improving the stability and accuracy of humanoid robot contact state perception and data processing.

[0032] B. Perform extreme point detection on the contact force change curve, extract the force change rate and contact force change duration of the humanoid robot, and obtain the contact transient characteristic parameters of the humanoid robot; In this embodiment of the invention, the extreme point detection of the contact force change curve, extraction of the force change rate and contact force change duration of the humanoid robot, and obtaining the contact transient characteristic parameters of the humanoid robot include: The contact force variation curve is subjected to first-order numerical difference to obtain the contact force difference sequence of the humanoid robot; The zero-crossing points where consecutive positive values ​​turn into negative values ​​in the contact force difference sequence are detected, and the time corresponding to the zero-crossing point is marked as the local maximum point of the contact force of the humanoid robot. Using the local maximum point of the contact force as the boundary, the moment when the contact force value first exceeds the baseline noise threshold is taken as the contact start time, and the moment when the contact force value drops to within the stable threshold range is taken as the contact stabilization time. The contact force value at the initial contact moment and the contact force value at the local maximum point of the contact force are extracted to obtain the force change rate of the humanoid robot; The difference between the moment of the local maximum of the contact force and the moment of contact stabilization is taken as the duration of the contact force change of the humanoid robot. By combining the force change rate and the duration of the contact force change, the contact transient characteristic parameters of the humanoid robot are obtained.

[0033] The difference between adjacent data points on the contact force variation curve is calculated sequentially. The contact force value at the next moment is subtracted from the contact force value at the previous moment. All the calculated differences are arranged in chronological order to form a contact force difference sequence.

[0034] The values ​​in the contact force difference sequence are traversed point by point to determine the position where the value changes from a continuous positive number to a negative number, and the acquisition time corresponding to the position is determined as the local maximum point of the contact force.

[0035] Starting from the moment corresponding to the local maximum of the contact force, backtrack point by point in an earlier time direction to find the moment when the contact force value first exceeds the baseline noise threshold. Mark this moment as the contact start moment. Starting from the moment corresponding to the local maximum of the contact force, search point by point in a later time direction to find the moment when the contact force value decreases and enters the stable threshold range. Mark this moment as the contact stabilization moment.

[0036] Extract the contact force value at the moment of initial contact, and simultaneously extract the contact force value at the local maximum point of contact force. Determine the rate of change of force based on these two values.

[0037] The duration of the contact force change is obtained by subtracting the value corresponding to the local maximum point of the contact force from the value corresponding to the contact stabilization moment.

[0038] The determined rate of change of force and the duration of contact force change are integrated to form complete contact transient characteristic parameters.

[0039] The beneficial effects are that the contact force change trend can be accurately located by first-order numerical difference, the local maximum point of contact force can be accurately identified and the key moment of contact process can be divided, the force change rate and the contact force change duration can be reliably extracted, and complete contact transient characteristic parameters can be formed, providing a stable and realistic characteristic basis for subsequent impedance adjustment.

[0040] C. Based on the joint angle sequence, perform forward kinematic analysis on the humanoid robot to obtain the displacement change of the humanoid robot, and determine the real-time contact stiffness value of the humanoid robot based on the displacement change and the contact force change curve; In this embodiment of the invention, the step of performing forward kinematic analysis on the humanoid robot based on the joint angle sequence to obtain the displacement change of the humanoid robot, and determining the real-time contact stiffness value of the humanoid robot based on the displacement change and the contact force change curve, includes: Extract the initial joint angle vector corresponding to the contact initiation time and the stable joint angle vector corresponding to the contact stabilization time from the joint angle sequence, and extract the peak joint angle vector corresponding to the contact force peak time. The initial joint angle vector, the peak joint angle vector, and the stable joint angle vector are obtained by forward kinematics recursion to obtain the initial spatial coordinate vector, the peak spatial coordinate vector, and the stable spatial coordinate vector of the humanoid robot. The Euclidean distance between the peak spatial coordinate vector and the initial spatial coordinate vector is taken as the first displacement change, the Euclidean distance between the stable spatial coordinate vector and the peak spatial coordinate vector is taken as the second displacement change, and the Euclidean distance between the stable spatial coordinate vector and the initial spatial coordinate vector is taken as the total displacement change. The initial contact force value at the moment of contact initiation, the peak contact force value at the moment of contact peak, and the stable contact force value at the moment of contact stabilization are extracted from the contact force variation curve and recorded as the first force value, the second force value, and the third force value, respectively. Calculate the real-time contact stiffness value of the humanoid robot.

[0041] The formula for calculating the real-time contact stiffness value is as follows: ; in, This represents the real-time contact stiffness value. This represents the first force value. This indicates the second force value. This indicates the value of the third force. This represents the change in the first displacement. This represents the change in the second displacement. This represents the total change in displacement. This indicates the preset environmental contact factor.

[0042] All joint angle data corresponding to the initial contact moment are selected from the joint angle sequence and integrated into an initial joint angle vector. All joint angle data corresponding to the stable contact moment are selected and integrated into a stable joint angle vector. At the same time, all joint angle data corresponding to the peak contact force moment are selected and integrated into a peak joint angle vector.

[0043] Based on the connection relationships and motion constraints of each link of the humanoid robot, the forward kinematics recursion is performed sequentially on the initial joint angle vector to calculate the position and attitude information of the end effector in three-dimensional space, and integrate them to form the initial spatial coordinate vector.

[0044] Based on the same linkage relationship and motion constraints, the peak joint angle vector is sequentially recursively calculated using forward kinematics to determine the position and attitude information of the end effector in three-dimensional space, and then integrated to form the peak space coordinate vector.

[0045] Based on the same linkage relationship and motion constraints, the forward kinematics of the stable joint angle vector is recursively calculated to obtain the position and attitude information of the end effector in three-dimensional space, and then integrated to form a stable spatial coordinate vector.

[0046] Calculate the straight-line distance between the peak spatial coordinate vector and the initial spatial coordinate vector in three-dimensional space, and determine this distance as the first displacement change.

[0047] Calculate the straight-line distance between the stable spatial coordinate vector and the peak spatial coordinate vector in three-dimensional space, and determine this distance as the second displacement change.

[0048] Calculate the straight-line distance between the stable spatial coordinate vector and the initial spatial coordinate vector in three-dimensional space, and determine this distance as the total displacement change.

[0049] Read the contact force value corresponding to the initial contact moment from the contact force change curve and record it as the first force value; read the contact force value corresponding to the peak contact moment and record it as the second force value; read the contact force value corresponding to the stable contact moment and record it as the third force value.

[0050] By combining the first force value, the second force value, the third force value, the first displacement change, the second displacement change, and the total displacement change, the real-time contact stiffness value of the humanoid robot is obtained.

[0051] The first force value comes from the contact force value at the initial contact moment in the contact force variation curve. The second force value comes from the contact force value at the peak contact moment in the contact force variation curve. The third force value comes from the contact force value at the stable contact moment in the contact force variation curve. The first displacement change is obtained by calculating the Euclidean distance between the peak spatial coordinate vector and the initial spatial coordinate vector. The second displacement change is obtained by calculating the Euclidean distance between the stable spatial coordinate vector and the peak spatial coordinate vector. The total displacement change is obtained by calculating the Euclidean distance between the stable spatial coordinate vector and the initial spatial coordinate vector. The preset environmental contact factor is a pre-set fixed parameter.

[0052] This formula is used to calculate the real-time contact stiffness value by combining the contact force value and the displacement change. The real-time contact stiffness value increases with the increase of the difference between the second force value and the first force value, increases with the increase of the difference between the third force value and the second force value, increases with the increase of the first displacement change, increases with the increase of the total displacement change, decreases with the increase of the second displacement change, decreases with the increase of the square of the total displacement change, and increases proportionally with the increase of the preset environmental contact factor value.

[0053] The beneficial effects are that by accurately extracting the joint angle vector at key moments and completing the forward kinematic recursion, the spatial coordinate information of the end effector can be reliably obtained, and the displacement changes and corresponding contact force values ​​at different stages can be accurately calculated. This provides complete and accurate basic data for the calculation of real-time contact stiffness values, ensuring that the stiffness calculation results are consistent with the actual contact state.

[0054] D. By superimposing the real-time contact stiffness value and the contact transient characteristic parameters, the stiffness adjustment amount of the humanoid robot is obtained; In this embodiment of the invention, the step of superimposing the real-time contact stiffness value and the contact transient characteristic parameters to obtain the stiffness adjustment amount of the humanoid robot includes: The real-time contact stiffness value is normalized by interval normalization to obtain the normalized stiffness component of the humanoid robot. The force rate of change in the contact transient characteristic parameters is saturated and limited to obtain the force rate of change component of the humanoid robot. The duration of contact force change in the contact transient characteristic parameters is mapped inversely to obtain the duration influence factor of the humanoid robot. The duration influence factor is inversely proportional to the duration of contact force change. The normalized stiffness component, the force change rate component, and the duration influence factor are weighted and summed to obtain the preliminary fusion value of the humanoid robot; The stiffness adjustment amount of the humanoid robot is obtained by performing a moving average filter on the preliminary fusion value.

[0055] The real-time contact stiffness value is linearly scaled according to a preset numerical range so that the processed value falls within a unified standard range, forming a normalized stiffness component.

[0056] Extract the force rate of change value from the contact transient characteristic parameters, limit the force rate of change value that exceeds the limit range to the set upper and lower boundaries, keep the value within the boundary unchanged, and form the force rate of change component.

[0057] Divide a fixed value by the contact force change duration value in the contact transient characteristic parameters to obtain the mapped result. This result decreases as the contact force change duration increases, forming the duration influence factor.

[0058] The normalized stiffness component, the force rate of change component, and the duration influence factor are multiplied by their respective weighting coefficients, and then the three weighted values ​​are added together to obtain the preliminary fusion value.

[0059] The initial fusion values ​​are iterated sequentially according to the set window length. The average value of all values ​​is calculated in each window. The average value is used to replace the value at the center of the current window. After the filtering process is completed, the stiffness adjustment amount is obtained.

[0060] The beneficial effect is that by normalization, saturation limiting and reciprocal mapping, parameters of different dimensions are transformed into fusionable standard components, and a stable and smooth stiffness adjustment amount is obtained by weighted summation and moving average filtering, thereby improving the adaptability and stability of impedance adjustment.

[0061] E. Real-time acquisition of the positional deviation between the actual position and the desired position of the humanoid robot and the speed deviation between the actual speed and the desired speed within the current control cycle; In this embodiment of the invention, the actual position data of the end effector within the current control cycle of the humanoid robot is read, the preset expected position data within the same control cycle is retrieved, and the position deviation between the two is obtained by subtracting the expected position data from the actual position data.

[0062] Read the actual speed data of the end effector in the current control cycle of the humanoid robot, retrieve the preset expected speed data in the same control cycle, and subtract the expected speed data from the actual speed data to obtain the speed deviation between the two.

[0063] The beneficial effect is that it accurately obtains position and velocity deviations in each control cycle, providing a direct and real-time basis for subsequent torque compensation, and ensuring that impedance adjustment can respond quickly to the robot's real-time motion state.

[0064] F. Linearly map the position deviation to the stiffness adjustment amount to obtain the stiffness compensation torque of the humanoid robot, and perform gain modulation on the velocity deviation and the contact transient characteristic parameters to obtain the damping compensation torque of the humanoid robot; In this embodiment of the invention, the step of linearly mapping the position deviation to the stiffness adjustment amount to obtain the stiffness compensation torque of the humanoid robot includes: The positional deviation of the humanoid robot is expanded into a positional deviation vector along the joint dimension; Based on the vector dimension of the position deviation vector, the stiffness adjustment amount is vectorized and extended to obtain the stiffness adjustment vector of the humanoid robot. The position deviation vector and the stiffness adjustment vector are multiplied element-wise to obtain the intermediate product vector of the humanoid robot. The intermediate product vector is smoothed in the spatial domain to obtain the smoothed product vector of the humanoid robot, and the smoothed product vector is used as the stiffness compensation torque of the humanoid robot.

[0065] The step of gain-modulating the velocity deviation with the contact transient characteristic parameters to obtain the damping compensation torque of the humanoid robot includes: The velocity deviation of the humanoid robot is expanded into a velocity deviation vector along the joint dimension; The force change rate and the duration of the contact force change are extracted from the contact transient characteristic parameters. The force change rate is nonlinearly scaled to obtain the first modulation coefficient of the humanoid robot. The duration of the contact force change is converted to a time constant to obtain the second modulation coefficient of the humanoid robot. The first modulation coefficient and the second modulation coefficient are cross-coupled to obtain the global damping gain of the humanoid robot; The global damping gain is expanded into a joint damping gain vector according to the joint motion inertia; The intermediate damping vector of the humanoid robot is obtained by performing element-wise vector multiplication of the velocity deviation vector and the joint damping gain vector. Time-domain lag compensation is performed on the intermediate damping vector to obtain the damping compensation torque of the humanoid robot.

[0066] Based on the number of independent joints of the humanoid robot, the positional deviation is broken down into independent deviation values ​​corresponding to each joint. These independent deviation values ​​are then arranged and combined in the order of the joints to form a positional deviation vector.

[0067] Based on the number and arrangement of joints contained in the position deviation vector, the stiffness adjustment amount is copied and expanded into a vector with the same dimension as the position deviation vector, thus forming the stiffness adjustment vector.

[0068] Multiply the position deviation vector and the values ​​of the same joint positions in the stiffness adjustment vector one by one, and combine all the multiplication results in the order of the joints to form an intermediate product vector.

[0069] The values ​​of each joint in the intermediate product vector are processed to smooth the transition between adjacent joints, eliminating abrupt changes in values ​​between joints and forming a smooth product vector. This smooth product vector is then directly used as the stiffness compensation torque.

[0070] Based on the number of independent joints in the humanoid robot, the velocity deviation is broken down into independent deviation values ​​corresponding to each joint. These independent deviation values ​​are then arranged and combined in the order of the joints to form a velocity deviation vector.

[0071] The force change rate and the contact force change duration are separated from the contact transient characteristic parameters. The magnitude of the force change rate is adjusted according to a preset nonlinear rule to obtain the first modulation coefficient. The contact force change duration is converted into a corresponding constant value according to a preset time conversion rule to obtain the second modulation coefficient.

[0072] The first modulation coefficient and the second modulation coefficient are numerically fused according to a preset association rule to obtain the global damping gain.

[0073] The formula for calculating the global damping gain is as follows: ; In the formula, Indicates the first Global damping gain of each joint Indicates the first modulation coefficient. Indicates the second modulation coefficient. Indicates the first Moment of inertia of each joint Indicates the first Moment of inertia of each joint This indicates the number of independent joints of a humanoid robot.

[0074] Based on the magnitude of motion inertia of each joint, the global damping gain is allocated to an independent gain value corresponding to each joint. These independent gain values ​​are then arranged and combined in the order of the joints to form a joint damping gain vector.

[0075] Multiply the velocity deviation vector with the values ​​of the same joint position in the joint damping gain vector one by one, and combine all the multiplication results in the joint order to form the intermediate damping vector.

[0076] The intermediate damping vector is subjected to time-dimensional lag correction to compensate for the time delay caused by data transmission and calculation, and finally the damping compensation torque is obtained.

[0077] The beneficial effects are that a stiffness compensation torque that fits the joint motion is generated by linear mapping, and a damping compensation torque that adapts to the contact state is formed by gain modulation and cross coupling. Both compensation torques can accurately match the robot's real-time operating state, improving the compliance and response speed of impedance control.

[0078] G. Based on the stiffness compensation torque and the damping compensation torque, update the original torque command of the humanoid robot to obtain the optimized torque command of the humanoid robot.

[0079] In this embodiment of the invention, updating the original torque command of the humanoid robot based on the stiffness compensation torque and the damping compensation torque to obtain the optimized torque command of the humanoid robot includes: Align the stiffness compensation torque and the damping compensation torque along the joint dimension to obtain the first compensation vector and the second compensation vector of the humanoid robot; The first compensation vector and the second compensation vector are added element by element to obtain the total compensation vector of the humanoid robot; Obtain the original torque command vector of the current control cycle, and determine the preliminary updated torque vector of the humanoid robot based on the total compensation vector and the original torque command vector; The initial updated torque vector is subjected to amplitude clamping processing to obtain the safety constraint torque vector of the humanoid robot; The rate of change of the safety constraint torque vector during adjacent control cycles is limited, and an optimized torque command for the humanoid robot is generated based on the limited torque vector.

[0080] The stiffness compensation torque is organized into a first compensation vector according to the robot joint dimension, and the damping compensation torque is organized into a second compensation vector according to the same joint dimension, so that the joint order of the two vectors corresponds completely.

[0081] The values ​​at the same joint position in the first and second compensation vectors are added one by one, and all the sums are combined in the order of the joints to form the total compensation vector.

[0082] Obtain the original torque command vector that the robot originally executed within the current control cycle, and superimpose the original torque command vector with the value of the same joint position in the total compensation vector to obtain the preliminary updated torque vector.

[0083] Boundary constraints are applied to the torque values ​​of each joint in the initial updated torque vector to limit torque values ​​exceeding the safety upper and lower limits within the safe range, thus forming a safety constraint torque vector.

[0084] The torque value variation range of adjacent control cycles in the safety constraint torque vector is constrained to avoid drastic torque jumps, and an optimized torque command is generated based on the constrained torque vector.

[0085] The beneficial effects are that the torque is accurately compensated by aligning and superimposing the compensation vector, and the torque output is ensured to be safe and stable by combining amplitude clamping and rate of change limitation. The resulting optimized torque command can significantly improve the compliance and operational safety of the humanoid robot's impedance control.

[0086] like Figure 2 The diagram shown is a functional block diagram of an impedance adjustment system for a humanoid robot provided in an embodiment of the present invention.

[0087] The humanoid robot impedance adjustment system described in this invention can be installed in an electronic device. Depending on the functions implemented, the humanoid robot impedance adjustment system may include a data extraction module, a parameter detection module, a stiffness analysis module, a stiffness adjustment module, a deviation comparison module, a torque generation module, and an instruction optimization module. The modules described in this invention can also be referred to as units, which are a series of computer program segments that can be executed by the processor of an electronic device and perform a fixed function, and are stored in the memory of the electronic device.

[0088] In this embodiment, the functions of each module / unit are as follows: The data extraction module is used to record in real time the contact force change curve generated when the end effector of the humanoid robot comes into contact with the external environment, and to extract the joint angle sequence and joint angular velocity sequence of the contact force change curve. The parameter detection module is used to detect extreme points on the contact force change curve, extract the force change rate and contact force change duration of the humanoid robot, and obtain the contact transient characteristic parameters of the humanoid robot. The stiffness analysis module is used to perform forward kinematic analysis on the humanoid robot according to the joint angle sequence, obtain the displacement change of the humanoid robot, and determine the real-time contact stiffness value of the humanoid robot according to the displacement change and the contact force change curve. The stiffness adjustment module is used to superimpose the real-time contact stiffness value and the contact transient characteristic parameters to obtain the stiffness adjustment amount of the humanoid robot. The deviation comparison module is used to collect in real time the positional deviation between the actual position and the expected position of the humanoid robot and the speed deviation between the actual speed and the expected speed within the current control cycle. The torque generation module is used to linearly map the position deviation with the stiffness adjustment amount to obtain the stiffness compensation torque of the humanoid robot, and to gain modulate the velocity deviation with the contact transient characteristic parameters to obtain the damping compensation torque of the humanoid robot. The instruction optimization module is used to update the original torque instruction of the humanoid robot according to the stiffness compensation torque and the damping compensation torque, so as to obtain the optimized torque instruction of the humanoid robot.

[0089] In the several embodiments provided by this invention, it should be understood that the disclosed methods and systems can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0090] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0091] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0092] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0093] This application embodiment can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

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

Claims

1. A method for impedance adjustment of a humanoid robot, characterized in that, The method includes: A. Record the contact force change curve generated when the end effector of the humanoid robot comes into contact with the external environment in real time, and extract the joint angle sequence and joint angular velocity sequence of the contact force change curve; B. Perform extreme point detection on the contact force change curve, extract the force change rate and contact force change duration of the humanoid robot, and obtain the contact transient characteristic parameters of the humanoid robot; C. Based on the joint angle sequence, perform forward kinematic analysis on the humanoid robot to obtain the displacement change of the humanoid robot, and determine the real-time contact stiffness value of the humanoid robot based on the displacement change and the contact force change curve; D. By superimposing the real-time contact stiffness value and the contact transient characteristic parameters, the stiffness adjustment amount of the humanoid robot is obtained; E. Real-time acquisition of the positional deviation between the actual position and the desired position of the humanoid robot and the speed deviation between the actual speed and the desired speed within the current control cycle; F. Linearly map the position deviation to the stiffness adjustment amount to obtain the stiffness compensation torque of the humanoid robot, and perform gain modulation on the velocity deviation and the contact transient characteristic parameters to obtain the damping compensation torque of the humanoid robot; G. Based on the stiffness compensation torque and the damping compensation torque, update the original torque command of the humanoid robot to obtain the optimized torque command of the humanoid robot.

2. The impedance adjustment method for a humanoid robot as described in claim 1, characterized in that, The method involves real-time recording of the contact force change curve generated when the end effector of the humanoid robot comes into contact with the external environment, and extracting the joint angle sequence and joint angular velocity sequence from the contact force change curve, including: The joint angle sensor data of each joint in the humanoid robot and the six-dimensional force sensor data of the end effector are collected synchronously at fixed time intervals, and the six-dimensional force sensor data and the joint angle sensor data are aligned according to the collection timestamp to obtain the multi-source data frame sequence of the humanoid robot. Sliding window outlier detection is performed on the six-dimensional force sensor data to obtain the transient impact noise of the humanoid robot; The contact force data sequence of the humanoid robot is obtained by replacing the transient impact noise with the median value within a sliding window; Based on the contact force data sequence, the start and end times of the rising edge of the contact force rising from zero to the first local maximum are detected. Using the start and end times of the rising edge as truncation boundaries, valid data segments of the contact event are extracted from the multi-source data frame sequence. The joint angle data in the effective data segment of the contact event are arranged in chronological order to form the joint angle sequence of the humanoid robot; The joint angle sequence is subjected to first-order difference processing to obtain the joint angular velocity sequence of the humanoid robot.

3. The impedance adjustment method for a humanoid robot as described in claim 1, characterized in that, The extreme point detection of the contact force change curve, extraction of the force change rate and contact force change duration of the humanoid robot, and the obtaining of the contact transient characteristic parameters of the humanoid robot include: The contact force variation curve is subjected to first-order numerical difference to obtain the contact force difference sequence of the humanoid robot; The zero-crossing points where consecutive positive values ​​turn into negative values ​​in the contact force difference sequence are detected, and the time corresponding to the zero-crossing point is marked as the local maximum point of the contact force of the humanoid robot. Using the local maximum point of the contact force as the boundary, the moment when the contact force value first exceeds the baseline noise threshold is taken as the contact start time, and the moment when the contact force value drops to within the stable threshold range is taken as the contact stabilization time. The contact force value at the initial contact moment and the contact force value at the local maximum point of the contact force are extracted to obtain the force change rate of the humanoid robot; The difference between the moment of the local maximum of the contact force and the moment of contact stabilization is taken as the duration of the contact force change of the humanoid robot. By combining the force change rate and the duration of the contact force change, the contact transient characteristic parameters of the humanoid robot are obtained.

4. The impedance adjustment method for a humanoid robot as described in claim 1, characterized in that, The step of performing forward kinematic analysis on the humanoid robot based on the joint angle sequence to obtain the displacement change of the humanoid robot, and determining the real-time contact stiffness value of the humanoid robot based on the displacement change and the contact force change curve, includes: Extract the initial joint angle vector corresponding to the contact initiation time and the stable joint angle vector corresponding to the contact stabilization time from the joint angle sequence, and extract the peak joint angle vector corresponding to the contact force peak time. The initial joint angle vector, the peak joint angle vector, and the stable joint angle vector are obtained by forward kinematics recursion to obtain the initial spatial coordinate vector, the peak spatial coordinate vector, and the stable spatial coordinate vector of the humanoid robot. The Euclidean distance between the peak spatial coordinate vector and the initial spatial coordinate vector is taken as the first displacement change, the Euclidean distance between the stable spatial coordinate vector and the peak spatial coordinate vector is taken as the second displacement change, and the Euclidean distance between the stable spatial coordinate vector and the initial spatial coordinate vector is taken as the total displacement change. The initial contact force value at the moment of contact initiation, the peak contact force value at the moment of contact peak, and the stable contact force value at the moment of contact stabilization are extracted from the contact force variation curve and recorded as the first force value, the second force value, and the third force value, respectively. Calculate the real-time contact stiffness value of the humanoid robot.

5. The impedance adjustment method for a humanoid robot as described in claim 4, characterized in that, The formula for calculating the real-time contact stiffness value is as follows: ; in, This represents the real-time contact stiffness value. This represents the first force value. This indicates the second force value. This indicates the value of the third force. This represents the change in the first displacement. This represents the change in the second displacement. This represents the total change in displacement. This indicates the preset environmental contact factor.

6. The impedance adjustment method for a humanoid robot as described in claim 1, characterized in that, The process of superimposing the real-time contact stiffness value and the contact transient characteristic parameters to obtain the stiffness adjustment amount of the humanoid robot includes: The real-time contact stiffness value is normalized by interval normalization to obtain the normalized stiffness component of the humanoid robot. The force rate of change in the contact transient characteristic parameters is saturated and limited to obtain the force rate of change component of the humanoid robot. The duration of contact force change in the contact transient characteristic parameters is mapped inversely to obtain the duration influence factor of the humanoid robot. The duration influence factor is inversely proportional to the duration of contact force change. The normalized stiffness component, the force change rate component, and the duration influence factor are weighted and summed to obtain the preliminary fusion value of the humanoid robot; The stiffness adjustment amount of the humanoid robot is obtained by performing a moving average filter on the preliminary fusion value.

7. The impedance adjustment method for a humanoid robot as described in claim 1, characterized in that, The step of linearly mapping the positional deviation to the stiffness adjustment amount to obtain the stiffness compensation torque of the humanoid robot includes: The positional deviation of the humanoid robot is expanded into a positional deviation vector along the joint dimension; Based on the vector dimension of the position deviation vector, the stiffness adjustment amount is vectorized and extended to obtain the stiffness adjustment vector of the humanoid robot. The position deviation vector and the stiffness adjustment vector are multiplied element-wise to obtain the intermediate product vector of the humanoid robot. The intermediate product vector is smoothed in the spatial domain to obtain the smoothed product vector of the humanoid robot, and the smoothed product vector is used as the stiffness compensation torque of the humanoid robot.

8. The impedance adjustment method for a humanoid robot as described in claim 1, characterized in that, The step of gain-modulating the velocity deviation with the contact transient characteristic parameters to obtain the damping compensation torque of the humanoid robot includes: The velocity deviation of the humanoid robot is expanded into a velocity deviation vector along the joint dimension; The force change rate and the duration of the contact force change are extracted from the contact transient characteristic parameters. The force change rate is nonlinearly scaled to obtain the first modulation coefficient of the humanoid robot. The duration of the contact force change is converted to a time constant to obtain the second modulation coefficient of the humanoid robot. The first modulation coefficient and the second modulation coefficient are cross-coupled to obtain the global damping gain of the humanoid robot; The global damping gain is expanded into a joint damping gain vector according to the joint motion inertia; The intermediate damping vector of the humanoid robot is obtained by performing element-wise vector multiplication of the velocity deviation vector and the joint damping gain vector. Time-domain lag compensation is performed on the intermediate damping vector to obtain the damping compensation torque of the humanoid robot.

9. The impedance adjustment method for a humanoid robot as described in claim 1, characterized in that, The step of updating the original torque command of the humanoid robot based on the stiffness compensation torque and the damping compensation torque to obtain the optimized torque command of the humanoid robot includes: Align the stiffness compensation torque and the damping compensation torque along the joint dimension to obtain the first compensation vector and the second compensation vector of the humanoid robot; The first compensation vector and the second compensation vector are added element by element to obtain the total compensation vector of the humanoid robot; Obtain the original torque command vector of the current control cycle, and determine the preliminary updated torque vector of the humanoid robot based on the total compensation vector and the original torque command vector; The initial updated torque vector is subjected to amplitude clamping processing to obtain the safety constraint torque vector of the humanoid robot; The rate of change of the safety constraint torque vector during adjacent control cycles is limited, and an optimized torque command for the humanoid robot is generated based on the limited torque vector.

10. An impedance adjustment system for a humanoid robot, characterized in that, The system for implementing the humanoid robot impedance adjustment method according to claim 1 includes: The data extraction module is used to record in real time the contact force change curve generated when the end effector of the humanoid robot comes into contact with the external environment, and to extract the joint angle sequence and joint angular velocity sequence of the contact force change curve; The parameter detection module is used to detect extreme points on the contact force change curve, extract the force change rate and contact force change duration of the humanoid robot, and obtain the contact transient characteristic parameters of the humanoid robot. The stiffness analysis module is used to perform forward kinematic analysis on the humanoid robot based on the joint angle sequence, obtain the displacement change of the humanoid robot, and determine the real-time contact stiffness value of the humanoid robot based on the displacement change and the contact force change curve. The stiffness adjustment module is used to superimpose the real-time contact stiffness value and the contact transient characteristic parameters to obtain the stiffness adjustment amount of the humanoid robot; The deviation comparison module is used to collect in real time the positional deviation between the actual position and the desired position of the humanoid robot and the speed deviation between the actual speed and the desired speed within the current control cycle. The torque generation module is used to linearly map the position deviation with the stiffness adjustment amount to obtain the stiffness compensation torque of the humanoid robot, and to gain modulate the velocity deviation with the contact transient characteristic parameters to obtain the damping compensation torque of the humanoid robot. The instruction optimization module is used to update the original torque instruction of the humanoid robot based on the stiffness compensation torque and the damping compensation torque, so as to obtain the optimized torque instruction of the humanoid robot.