A method for estimating and compensating external force based on power flow discrimination and bayesian estimation
By using a power flow discrimination and Bayesian estimation method, the motor drive and pullback states are distinguished. By combining dual-model Bayesian estimation and open-loop feedforward compensation, the problems of friction estimation distortion and poor stability in precision servo control are solved, and high-precision external force compensation and dynamic response are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NINGBO ZHONGKE AOMI ROBOT CO LTD
- Filing Date
- 2026-01-26
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies cannot effectively distinguish between the drive and pullback states of a system at the same macroscopic speed in precision servo control, resulting in distorted friction estimation. Furthermore, traditional observers struggle to balance noise and disturbance handling, affecting system stability and response performance.
The method based on power flow discrimination and Bayesian estimation is adopted to distinguish the working mode by calculating the product of motor torque and angular velocity in real time. A dual-model Bayesian estimator is used to identify the state and parameters. Combined with an open-loop feedforward compensation mechanism, accurate friction and efficiency compensation torque is generated.
It significantly improves the accuracy of external force estimation and system stability, reduces the phase lag of friction compensation, and enhances dynamic response performance and operational stability.
Smart Images

Figure CN122137301A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of precision servo control technology, specifically to an external force estimation and compensation method based on power flow discrimination and Bayesian estimation. Background Technology
[0002] In the field of precision servo control involving gear transmissions, especially in high-precision applications such as robots and CNC machine tools, accurate estimation of external forces and friction compensation are crucial for improving the dynamic performance and stability of the system. Existing technical solutions typically employ static friction models based on velocity symbols or various disturbance observers for estimation and compensation. However, these methods generally suffer from a series of interconnected fundamental defects. The root cause lies in the failure to fully consider the core physical essence of the system—the direction of power flow, i.e., the energy flow direction represented by the product of the motor's output torque and angular velocity. This leads to the inability of traditional models to distinguish between the two distinct energy states of "driving" and "pullback" generated by the interaction of load and drive at the same macroscopic speed. The internal friction loss mechanisms differ significantly, thus introducing a systematic bias at the source of the model. This modeling deficiency is further amplified in systems containing transmission components such as planetary gears and harmonic reducers. Due to the asymmetry of gear meshing geometry, there is an inherent directional difference in the forward and reverse transmission efficiencies. Traditional disturbance observers often confuse this internal characteristic with the actual external disturbances, leading to a significant amount of internal losses being incorrectly estimated as external forces, resulting in severely distorted external force estimates. Especially in the low-speed operation and motion direction switching regions, strong nonlinear effects such as static friction, pre-slip, and hysteresis are significant. Existing solutions often employ simplified linear models or rigid control logic switching, which not only have limited compensation effects but also easily induce system jitter, creep, and even unstable oscillations. Furthermore, from a technical implementation perspective, the fixed filter bandwidth of traditional observers struggles to balance suppressing high-frequency noise and tracking low-frequency time-varying disturbances, resulting in weak adaptive capabilities. Compensation strategies based on closed-loop error feedback introduce additional phase lag due to inherent signal processing and computational delays, continuously eroding the system's stability margin and hindering further improvements in dynamic response performance. Therefore, a novel external force estimation and compensation method is urgently needed that deeply integrates the physical essence of the system, intelligently distinguishes operating modes, and balances estimation accuracy, response speed, and operational stability. Summary of the Invention
[0003] To deeply integrate the physical essence of the system, intelligently distinguish working modes, and balance estimation accuracy, response speed, and operational stability, this invention proposes an external force estimation and compensation method based on power flow discrimination and Bayesian estimation, including the following steps: S1: Acquire the real-time collected motor end torque signal and angular velocity signal; S2: Calculate the real-time power flow based on the torque signal and angular velocity signal, and determine the current working mode of the motor according to the sign of the real-time power flow and the amplitude of the angular velocity. The working mode includes drive mode, pullback mode and near-zero speed mode. S3: Based on the identified working mode, the first Bayesian estimator is used to estimate the dynamic state of the motor, and the second Bayesian estimator is used to identify the time-varying parameters of the motor. S4: Based on the estimated dynamic state and the identified time-varying parameters, calculate the total feedforward compensation torque, which includes the friction compensation term for the current working mode, the efficiency asymmetry compensation term based on the bidirectional efficiency difference of gear transmission, and the inertia compensation term. S5: The final feedforward compensation torque is obtained by limiting the amplitude and rate of change of the total feedforward compensation torque and by constraining the energy integral of the processed torque. S6: Add the final feedforward compensation torque to the torque command output by the main controller to generate the total torque command, and output the total torque command to the motor.
[0004] This invention achieves high-precision compensation for internal frictional losses and pure estimation of external forces in motor systems through intelligent pattern discrimination based on power flow and dual-model Bayesian collaborative estimation. It outputs the compensated torque with multiple safety constraints in an open-loop feedforward superposition manner, thereby fundamentally solving the problems of estimation distortion, response lag and poor stability in traditional methods during bidirectional transmission, low speed and commutation.
[0005] Furthermore, in step S2, determining the current operating mode of the motor based on the sign and amplitude of the real-time power flow specifically involves: When the real-time power is positive and the angular velocity amplitude is greater than or equal to the first preset threshold, it is determined to be in drive mode; When the real-time power is negative and the angular velocity amplitude is greater than or equal to the first preset threshold, it is determined to be a drag mode; When the angular velocity amplitude is less than the first preset threshold, it is identified as near-zero speed mode.
[0006] Furthermore, hysteresis comparison logic is used to compare the real-time power sign with the angular velocity amplitude.
[0007] Furthermore, in step S3, the first Bayesian estimator and the second Bayesian estimator are designed with a coupling mechanism, specifically as follows: The first Bayesian estimator uses the motor model updated by the time-varying parameters identified in real time by the second Bayesian estimator to perform state estimation; The second Bayesian estimator uses the observation equation reconstructed from the dynamic state estimated in real time by the first Bayesian estimator to identify parameters; The first Bayesian estimator operates more frequently than the second Bayesian estimator.
[0008] Furthermore, in step S4, the friction compensation item based on the current working mode is calculated by selecting the corresponding friction parameters from the pre-stored bidirectional friction parameter mapping table according to the currently identified driving mode or dragging mode.
[0009] Furthermore, in step S4, the efficiency asymmetry compensation term based on the bidirectional efficiency difference of gear transmission is calculated by querying a pre-stored two-dimensional efficiency factor table to obtain the current transmission efficiency based on the combination of motor direction and torque direction.
[0010] Furthermore, in step S4, the system rotational inertia parameter in the inertia compensation term is obtained online by the second Bayesian estimator.
[0011] Furthermore, in step S5, the energy integration constraint is: Within a preset time window before and after the switching of working modes, the product of the total feedforward compensation torque and the motor angular velocity is integrated. If the integral value exceeds the preset energy threshold, the amplitude of the total feedforward compensation torque is reduced by a preset ratio.
[0012] Furthermore, step S5 also includes an anomaly detection and degradation step: When abnormalities are detected in motor current, temperature, or tracking error, the amplitude of the final feedforward compensation torque is reduced or set to zero.
[0013] Compared with the prior art, the present invention has at least the following beneficial effects: (1) The present invention proposes an external force estimation and compensation method based on power flow discrimination and Bayesian estimation. By introducing the power flow direction as an essential physical quantity, the motor working mode is intelligently discriminated, which fundamentally distinguishes the difference in friction mechanism between driving and dragging states. This overcomes the systematic deviation caused by insufficient modeling in traditional methods. Combined with the accurate modeling of the bidirectional efficiency asymmetry of gear transmission, it can effectively separate internal losses and external disturbances, and significantly improve the purity and accuracy of external force estimation. (2) A dual-model Bayesian estimation architecture with state and parameter separation is adopted to achieve high-frequency tracking of fast dynamic states and adaptive identification of slow-changing parameters. The two work together through a coupling mechanism to balance computational efficiency while ensuring estimation accuracy. (3) Based on the estimation results, the open-loop feedforward compensation mechanism directly generates and injects the compensation torque, which completely avoids the phase lag problem introduced by the traditional closed-loop compensation, thereby enhancing the stability and dynamic response performance of external force estimation and compensation. (4) A multi-level safety constraint mechanism, including amplitude limit, rate of change limit, energy integral constraint and abnormal degradation strategy, ensures the safety and reliability of the compensation process and effectively prevents the risk of oscillation and instability that may be caused by torque mutation and energy accumulation. Attached Figure Description
[0014] Figure 1 This describes the steps of an external force estimation and compensation method based on power flow discrimination and Bayesian estimation. Detailed Implementation
[0015] The following are specific embodiments of the present invention, which are described in conjunction with the accompanying drawings to further illustrate the technical solutions of the present invention. However, the present invention is not limited to these embodiments.
[0016] The core of the technical solution involved in this invention lies in re-examining and solving the problems of friction compensation and external force estimation in precision motion control from a perspective closer to the essence of physics. Traditional solutions often use the sign of velocity as the sole criterion for the direction of friction, ignoring the true picture of energy flow in the mechanical system—that is, the power flow direction defined by both motor torque and rotational speed. The introduction of this physical quantity allows the system to clearly distinguish between two distinct working states: motor driving load (positive energy output) and load driving motor (reverse energy return). In these two states, the friction mechanism within the transmission chain, the force and lubrication conditions at the gear meshing points are profoundly different. Any compensation model that ignores these differences will introduce systematic biases at the root. In particular, in transmission systems containing structures such as planetary gears and harmonic reducers, due to the geometric and force asymmetry of the engagement and disengagement processes, the forward transmission efficiency and the reverse transmission efficiency are often not equal. This inherent directional characteristic further exacerbates the complexity of modeling. Traditional disturbance observers conflat all these internal losses with external disturbances, resulting in severely distorted estimates of "external forces." This is especially problematic during low-speed crawling and the instant of change in direction of motion, where the interplay of strong nonlinear effects such as static friction, pre-slip, and hysteresis loops makes the problem particularly difficult, often leading to troubling jitter, crawling, or unstable oscillations.
[0017] To fundamentally address the aforementioned challenges, this invention constructs a complete sensing, estimation, and feedforward execution process, and proposes an external force estimation and compensation method based on power flow discrimination and Bayesian estimation, such as... Figure 1 As shown, the method mainly includes the following steps: S1: Acquire the real-time collected motor end torque signal and angular velocity signal; S2: Calculate the real-time power flow based on the torque signal and angular velocity signal, and determine the current working mode of the motor according to the sign of the real-time power flow and the amplitude of the angular velocity. The working mode includes drive mode, pullback mode and near-zero speed mode. S3: Based on the identified working mode, the first Bayesian estimator is used to estimate the dynamic state of the motor, and the second Bayesian estimator is used to identify the time-varying parameters of the motor. S4: Based on the estimated dynamic state and the identified time-varying parameters, calculate the total feedforward compensation torque, which includes the friction compensation term for the current working mode, the efficiency asymmetry compensation term based on the bidirectional efficiency difference of gear transmission, and the inertia compensation term. S5: The final feedforward compensation torque is obtained by limiting the amplitude and rate of change of the total feedforward compensation torque and by constraining the energy integral of the processed torque. S6: Add the final feedforward compensation torque to the torque command output by the main controller to generate the total torque command, and output the total torque command to the motor.
[0018] The entire execution process begins with the precise capture of the motor system's operating status. A high-resolution encoder mounted on the motor shaft continuously provides the rotor angular position. The pulse signal, through signal processing and real-time differential operation, allows for the extraction of high-bandwidth angular velocity information. Simultaneously, by synchronously sampling the motor winding current and calculating it using a field-oriented control algorithm, the electromagnetic torque generated by the motor can be reproduced in real time and with high fidelity. These two signals (speed and torque) constitute the most basic and crucial raw data for analyzing the system's energy state. By multiplying their instantaneous signals... Continuous calculations are performed to depict the power flow in real time. The dynamic trajectory. However, in practical engineering implementation, measurement noise and signal uncertainty at extremely low speeds cannot be ignored. Therefore, directly determining the state based on the power sign may result in high-frequency chattering.
[0019] Therefore, in a preferred embodiment, an intelligent discrimination strategy based on hysteresis logic is also introduced. A sufficiently small angular velocity threshold is set. (First preset threshold) is used to define the fuzzy region of "near-zero speed". This refers to the absolute value of the motor speed. When the power is consistently greater than this threshold, it is considered to be in a defined state of motion, at which point the power... The symbol then acquires a clear physical meaning: continuous. This indicates that the system is operating in drive mode, with the motor acting as a source of actively propelling energy; and continuous This indicates that the system is operating in drag mode, where the motor acts as a generator driven by the load, and mechanical energy is converted or dissipated. When Below the threshold At this point, it enters a special near-zero speed mode, which is dominated by static friction and requires special handling strategies. The application of hysteresis logic ensures that the mode switching judgment has inertia, effectively filtering out meaningless frequent jumps near the mode boundary caused by signal noise, thus providing a stable and reliable working mode identifier for subsequent stages.
[0020] While determining the operating mode, this invention also improves the algorithm based on a dual estimation architecture using Bayesian principles. The design of this dual estimation architecture stems from the recognition that the rapid changes in the dynamics of the motor system and the slow drift of physical parameters have different time-scale characteristics. Therefore, two parallel Bayesian estimators are designed to work collaboratively at different rhythms. The first estimator, or Model 1, operates at the same high frequency (typically thousands to tens of thousands of hertz) as the servo control system. Its task is to track the instantaneous state of the motor system. Its state vector... Includes motor angular velocity Angular position Based on the load-side speed predicted by the model With angular position And to describe complex tribodynamics (e.g., characterizing the internal state of the average deformation of the contact surface bristles when using the LuGre model). The variables introduced are those that the estimator relies on a discrete time period. State space model : , in, These are the state transition matrix and the control matrix, respectively. Input Not only includes motor torque It may also include factors such as temperature. Auxiliary variables that affect system behavior, such as process noise. The covariance matrix of a Gaussian distribution modeled as having zero mean is... This reflects the degree of confidence in the uncertainty of the model itself. Model 1 uses the observation equation... Connecting with the physical world (This is the observation transition matrix), where the observed values are... Typically derived from encoder speed and position readings. And the torque sensor signal that may be mounted on the output shaft. Noise measurement Assuming Gaussian noise as well, the covariance is... By recursively executing Bayesian filtering algorithms (such as extended Kalman filtering to handle potential nonlinearities), Model 1 can output the optimal estimate of the state in real time, especially the estimate of the actual motor speed. And an equivalent frictional torque estimate that integrates various frictional effects. (symbol" "In the embodiments of this invention, the estimated values of the corresponding parameters are also the estimated values of the Bayesian model."
[0021] In stark contrast to the high-frequency rhythm of Model 1, the second estimator (Model 2) operates at a low-frequency, robust pace. Its focus is not on transients, but on inherent system properties that change significantly over seconds, minutes, or even longer. Model 2's state vector It is a set of parameters, including the moments of inertia on the motor side and the load side. and (The latter may change due to the time-varying nature of the load), the system's time-varying damping coefficient. Stiffness coefficient of the system The friction coefficient of the system Coulomb friction torque The parameters of the friction model, and a crucial transmission efficiency that is related to the current operating mode and load. Because these parameters change slowly, their state evolution is typically modeled using a simple random walk. describe: , in, It is often chosen as the identity matrix to represent slowly changing parameters. This represents the process noise matrix. The core of Model 2 lies in its nonlinear observation equations. : , In the formula, To measure the noise matrix, this equation will take the parameters to be estimated. Compared with the high-frequency state estimates from Model 1 This is connected through a function built upon physical laws (energy conservation and dynamics principles). Predict certain observable values (e.g., predict output torque using currently estimated parameters and state) and compare them with actual sensor observations (such as... By solving this parameter estimation problem, Model 2 can continuously and adaptively update its understanding of the physical characteristics of the motor system.
[0022] These two estimators do not operate in isolation; they form a mutually nourishing collaborative system through a designed coupling mechanism. Model 1, in its state prediction and update cycle, relies on a mathematical model (represented in the matrix)... The parameters (or those in the internal friction equation) are not static. Instead, they dynamically adopt the latest parameter estimates provided by Model 2. This means that when the gearbox experiences a decrease in efficiency due to temperature rise, or a change in frictional characteristics due to wear, Model 2 will capture this change and pass the updated parameters to Model 1, ensuring that the parameters used by Model 1 for state estimation are always up-to-date, thus interpreting sensor signals more accurately. Conversely, Model 2 evaluates its nonlinear observation equations... At this time, the current state of the motor system needs to be input. The most reliable source of these states is the estimate provided by Model 1, which operates at high frequency and focuses on transient tracking. This parameter estimator refreshes the state estimator model, and the state estimator provides a closed-loop data exchange with the parameter estimator based on the observation benchmark, enabling the system to dynamically decouple internal losses (characterized by time-varying parameters) from external disturbances (reflected in the residuals of the state estimation).
[0023] Once a real-time, high-confidence estimate of the motor system's state and parameters is obtained, the accurate feedforward compensation can be constructed. This compensation calculation is comprehensive, aiming to offset known non-ideal factors from multiple dimensions. The primary factor is the basic friction compensation term. It directly addresses the torque consumed by friction. Its calculation formula is: , here, From Model 1, and the key friction and efficiency parameters This comes from the latest identification results of Model 2. This represents the current power flow motion state. (Function) The specific form depends on the chosen friction model (such as a static + Coulomb + viscous model, or a more complex dynamic model), and crucially, it determines the output of the power flow discrimination stage. (Drive or pullback) allows selection of different parameter sets or even different function branches. For example, the Coulomb friction values used to calculate friction compensation in drive mode may differ from those in pullback mode. This is achieved through a pre-stored or online-learned bidirectional friction parameter mapping table indexed by operating mode.
[0024] Secondly, there is the efficiency asymmetry compensation term specifically addressing the unique phenomena of gear transmission. Due to the inherent difference in meshing efficiency between forward drive and reverse pull-back of the gear pair, even with the same input torque, the net torque transmitted to the load will differ. To compensate for this gain error caused by the physical structure, calculations are required: , In this formula, This is the actual efficiency estimated by Model 2 under the current specific operating conditions. This efficiency value is not a fixed constant, but is obtained by querying a "two-dimensional efficiency factor table". The horizontal and vertical axes of this table represent the direction of motor rotation (clockwise / counterclockwise) and the direction of torque relative to speed (same-direction drive / reverse braking), respectively. The data in the table are efficiency values obtained through offline fine calibration or online self-learning. . It is a nominal efficiency value used in the design of motor systems. It refers to the reduction ratio of the speed reducer. It can be the output command torque of the controller, or the desired inertial torque obtained based on motion planning. The essence of this compensation is that when the actual transmission efficiency deviates from the nominal value, a torque amount is added or subtracted through feedforward to make the final torque acting on the load consistent with the desired value.
[0025] The third item is the inertia compensation item. The inertial torque required to counteract changes in system acceleration is of the following form: , Among them, the total equivalent moment of inertia of the system (Including motor rotor inertia, gear equivalent inertia, and load inertia) is provided by online dynamic identification from Model 2, which ensures that inertia compensation remains accurate even when the load undergoes unknown changes. It is the desired acceleration command, obtained by differentiating the given motion trajectory.
[0026] Adding the above three compensation amounts together yields the theoretical total feedforward compensation torque: However, before directly injecting this model-based ideal calculation result into the torque command, safety constraints must be applied to ensure the system operates stably and reliably under any operating conditions.
[0027] The first constraint is amplitude limiting, ensuring that the absolute value of the compensation torque does not exceed the maximum limit that the motor and its driver can safely withstand. ,Right now .
[0028] The second constraint is the rate of change constraint, for The derivative is restricted to make Not greater than the preset maximum allowable slope This effectively avoids sudden changes in torque and prevents impact or resonance on the mechanical transmission chain.
[0029] The third and most crucial constraint is the energy integral constraint, which specifically addresses pulse-like compensation that may occur during transient processes such as motion commutation. Within a short, preset time window before and after a switch in the motor system's operating mode (e.g., from drive to tow), to overcome strong nonlinear effects such as static friction, the calculated total feedforward compensation torque is... This often includes a pulse component with a large amplitude and rapid fluctuations. This pulse component represents the most concentrated compensation effect and is most likely to cause energy excess due to small deviations in model estimation or dynamic mismatches. To accurately monitor and manage this specific risk, the algorithm will... Pulse torque marked as pending review And calculate in real time the mechanical energy injected into the motor system by the pulse: ,in This refers to the real-time angular velocity. The essence of this is the full compensation action suggested by the model to overcome nonlinearity during the critical period of commutation; it is a concrete representation of potential overcompensation. If this integral energy... It exceeded the maximum safe energy threshold preset based on system stability analysis. The control algorithm will then dynamically reduce the amplitude of the pulse proportionally until it meets the requirements. This energy-based constraint has clear physical significance and can more effectively prevent overshoot and oscillation caused by overcompensation.
[0030] Finally, it includes an always-on anomaly monitoring and degradation mechanism. This mechanism continuously monitors key health indicators such as motor current, winding and reducer temperature, and position tracking error. If any indicator exceeds the safe range, a degradation strategy is immediately triggered. The degradation can be gentle, such as gradually decreasing a coefficient from 1 to 0. Multiply this amount by the final compensation; in the event of a severe fault, the feedforward compensation amount will be decisively increased. Forced zeroing allows the motor system to rely entirely on a robust main feedback controller (such as a PID controller) to maintain basic operation, thereby maximizing the safety of equipment and personnel.
[0031] After the above-mentioned calculations and constraint verifications, the final result is a precise and safe feedforward compensation torque. This torque value is directly fed to the summing node of the motor drive loop, and combined with the reference torque command generated by the main controller (whether it's a classic PID controller or a more advanced Model Predictive Controller (MPC) based on the target trajectory and feedback error. Perform algebraic addition: .this This refers to the total torque command ultimately applied to the motor driver. The entire compensation path, from signal sensing, state and parameter estimation, to compensation calculation and safety constraints, and finally to superposition with the feedforward point, forms a clear open-loop channel. It does not rely on real-time closed-loop tracking errors to adjust itself, thus completely avoiding the phase lag problem inherent in traditional error feedback-based compensation schemes. This allows the system to proactively and proactively cancel known internal disturbances without sacrificing closed-loop stability margin, thereby raising control bandwidth and accuracy to a new level and demonstrating superior performance in low-speed smoothness, commutation accuracy, and rapid and accurate perception of external contact forces.
[0032] In summary, the external force estimation and compensation method proposed in this invention, based on power flow discrimination and Bayesian estimation, intelligently distinguishes the motor's operating mode by introducing the essential physical quantity of power flow direction. This fundamentally differentiates the friction mechanism under driving and dragging states, overcoming the systematic bias caused by insufficient modeling in traditional methods. Combined with accurate modeling of the bidirectional efficiency asymmetry of gear transmission, it can effectively separate internal losses and external disturbances, significantly improving the purity and accuracy of external force estimation.
[0033] A dual-model Bayesian estimation architecture with state and parameter separation is adopted, achieving high-frequency tracking of fast dynamic states and adaptive identification of slowly varying parameters. These two models work collaboratively through a coupling mechanism, balancing computational efficiency while ensuring estimation accuracy. An open-loop feedforward compensation mechanism based on the estimation results directly generates and injects compensation torque, completely avoiding the phase lag problem introduced by traditional closed-loop compensation, thereby enhancing the stability and dynamic response performance of external force estimation and compensation. Multi-level safety constraint mechanisms, including amplitude limiting, rate of change limiting, energy integral constraints, and anomaly degradation strategies, ensure the safety and reliability of the compensation process, effectively preventing oscillations and instability risks that may be caused by sudden torque changes and energy accumulation.
[0034] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0035] Furthermore, in this invention, descriptions involving terms such as "first," "second," and "a" are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0036] In this invention, unless otherwise explicitly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; it can mean a mechanical connection or an electrical connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0037] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are feasible for those skilled in the art. If the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
Claims
1. A method for estimating and compensating external forces based on power flow discrimination and Bayesian estimation, characterized in that, Including the following steps: S1: Acquire the real-time collected motor end torque signal and angular velocity signal; S2: Calculate the real-time power flow based on the torque signal and angular velocity signal, and determine the current working mode of the motor according to the sign of the real-time power flow and the amplitude of the angular velocity. The working mode includes drive mode, pullback mode and near-zero speed mode. S3: Based on the identified working mode, the first Bayesian estimator is used to estimate the dynamic state of the motor, and the second Bayesian estimator is used to identify the time-varying parameters of the motor. S4: Based on the estimated dynamic state and the identified time-varying parameters, calculate the total feedforward compensation torque, which includes the friction compensation term for the current working mode, the efficiency asymmetry compensation term based on the bidirectional efficiency difference of gear transmission, and the inertia compensation term. S5: The final feedforward compensation torque is obtained by limiting the amplitude and rate of change of the total feedforward compensation torque and by constraining the energy integral of the processed torque. S6: Add the final feedforward compensation torque to the torque command output by the main controller to generate the total torque command, and output the total torque command to the motor.
2. The method for external force estimation and compensation based on power flow discrimination and Bayesian estimation as described in claim 1, characterized in that, In step S2, determining the current operating mode of the motor based on the sign and amplitude of the real-time power flow specifically involves: When the real-time power is positive and the angular velocity amplitude is greater than or equal to the first preset threshold, it is determined to be in drive mode; When the real-time power is negative and the angular velocity amplitude is greater than or equal to the first preset threshold, it is determined to be a drag mode; When the angular velocity amplitude is less than the first preset threshold, it is identified as near-zero speed mode.
3. The method for external force estimation and compensation based on power flow discrimination and Bayesian estimation as described in claim 2, characterized in that, Hysteresis comparison logic is used to compare the real-time power sign with the angular velocity amplitude.
4. The method for external force estimation and compensation based on power flow discrimination and Bayesian estimation as described in claim 1, characterized in that, In step S3, the first Bayesian estimator and the second Bayesian estimator are designed with a coupling mechanism, specifically: The first Bayesian estimator uses the motor model updated by the time-varying parameters identified in real time by the second Bayesian estimator to perform state estimation; The second Bayesian estimator uses the observation equation reconstructed from the dynamic state estimated in real time by the first Bayesian estimator to identify parameters; The first Bayesian estimator operates more frequently than the second Bayesian estimator.
5. The method for external force estimation and compensation based on power flow discrimination and Bayesian estimation as described in claim 1, characterized in that, In step S4, the friction compensation item based on the current working mode is calculated by selecting the corresponding friction parameters from the pre-stored bidirectional friction parameter mapping table according to the currently identified driving mode or dragging mode.
6. The method for external force estimation and compensation based on power flow discrimination and Bayesian estimation as described in claim 1, characterized in that, In step S4, the efficiency asymmetry compensation term based on the bidirectional efficiency difference of gear transmission is calculated by querying a pre-stored two-dimensional efficiency factor table to obtain the current transmission efficiency based on the combination of motor direction and torque direction.
7. The method for external force estimation and compensation based on power flow discrimination and Bayesian estimation as described in claim 1, characterized in that, In step S4, the system rotational inertia parameter in the inertia compensation term is obtained online by the second Bayesian estimator.
8. The method for external force estimation and compensation based on power flow discrimination and Bayesian estimation as described in claim 1, characterized in that, In step S5, the energy integration constraint is: Within a preset time window before and after the switching of working modes, the product of the total feedforward compensation torque and the motor angular velocity is integrated. If the integral value exceeds the preset energy threshold, the amplitude of the total feedforward compensation torque is reduced by a preset ratio.
9. The method for external force estimation and compensation based on power flow discrimination and Bayesian estimation as described in claim 1, characterized in that, The S5 step also includes an anomaly detection and degradation step: When abnormalities are detected in motor current, temperature, or tracking error, the amplitude of the final feedforward compensation torque is reduced or set to zero.