Skip to main content
Validating Robot Friction Compensation Effects
Control

Validating Robot Friction Compensation Effects

We validate the effects of friction compensation and acceleration feedforward on a 6-axis collaborative robot through 160 runs of 2x2 experiments. Friction coefficients were tuned using an AI agent (ralph-loop), and validation experiments were conducted with automated scripts. Friction compensation alone achieved 36% improvement (Cohen's d=1.49), accounting for 93% of total improvement.

WRWIM Robotics Team
·
roboticsfriction-compensationfeedforwardexperimentai-automation

Validating Robot Friction Compensation Effects: An AI-Automated Experiment Case Study

We applied two compensation techniques to the Neuromeka Indy7 collaborative robot:

  1. Friction Compensation: Compensates for mechanical friction in joints
  2. Acceleration Feedforward (FF): Pre-compensates for inertial forces during acceleration

A question arose: "How much does each technique actually contribute? Is one sufficient, or are both necessary?"

To answer this question, we conducted 160 runs of 2x2 experiments. After tuning friction coefficients with an AI agent (ralph-loop), we performed validation experiments using automated scripts.

The Problem: Before Compensation

Before applying compensation techniques, severe position tracking errors were observed, especially in J1 (shoulder joint). J1 is the joint with the highest friction due to its large reducer and the structure that supports the entire arm load.

Position error before compensation

J1 position tracking before compensation. Clear delay and error between command (cmd) and actual position

Torque before compensation

J1 torque before compensation. Large torque fluctuations due to friction are observed

To address these friction problems, we applied friction compensation techniques. This experiment quantitatively validates their effectiveness.

Conclusions First

ConditionPosition RMSEImprovementp-valueCohen's d
B0 (baseline)1.526 mrad---
B1 (friction only)0.974 mrad36.1%p<0.011.49
B2 (FF only)1.450 mrad5.0%p<0.050.80
B3 (both)0.932 mrad38.9%p<0.011.44

Friction compensation alone achieved 93% of total improvement. Acceleration FF contributed only 5%.

Experimental Design

We combined 4 conditions to analyze the independent effects and interactions of each technique:

ConditionFriction Comp.Acceleration FFDescription
B0OFFOFFBaseline
B1ONOFFFriction only
B2OFFONFF only
B3ONONBoth

Test Trajectories

  • 5 joints: J0-J4 (J5 excluded due to minimal friction Fc=1Nm)
  • 2 speeds: SLOW (vel=0.1), FAST (vel=0.3)
  • 10 total trajectories: 4 repetitions each (2 each for directional balance)
  • Total experiment runs: 4 conditions x 10 trajectories x 4 repetitions = 160 runs

Friction Coefficients (Fc)

JointFc (Nm)Characteristics
J1 (shoulder)35.0Maximum friction - supports entire arm load
J2 (elbow)10.0Medium friction - gravity load
J0 (base)5.0Vertical axis - less friction in gravity direction
J3, J4 (wrist)2.0Low friction - small joints
J5 (end)1.0Minimum friction

AI-Automated Experiment Pipeline

Tools Used

ToolRole
Claude CodeAI agent - code modification, build, execution, analysis
ralph-loopIterative execution plugin - auto-repeat until complete
run_experiment.pySingle experiment automation script
motion_analyzer.pyResult analysis and metric extraction

Two-Stage Workflow

Stage 1: Friction Coefficient Tuning (using ralph-loop)

AI judgment required: Error analysis -> Adjustment direction -> Code modification -> Repeat

Stage 2: 160 Validation Experiments (script repetition)

B0 (40 runs) -> B1 (40 runs) -> B2 (40 runs) -> B3 (40 runs)
Condition changes were done manually

Key Results

Effect Decomposition

ComparisonImprovementRatio
Total (B0->B3)0.594 mrad100%
Friction only (B0->B1)0.551 mrad93%
FF only (B0->B2)0.076 mrad13%

Friction compensation is the key factor.

Speed-wise Analysis

Speed-wise improvement comparison

Improvement comparison between SLOW (vel=0.1) and FAST (vel=0.3)

ConditionSLOW ImprovementFAST ImprovementDifferenceTheory Validation
B1 (friction)42.3%31.3%+11.0%Confirmed
B2 (FF)4.7%5.1%+0.4%Rejected
B3 (both)42.9%35.8%+7.1%-

Theory Validation Results:

  • Friction compensation is more effective at low speeds (where static friction is prominent)
  • The expectation that FF would be more effective at high speeds was rejected

Joint-wise Analysis: Correlation Between Friction Coefficient and Improvement

Friction coefficient and improvement correlation

Correlation between Coulomb friction coefficient (Fc) and B1 improvement. J0 is an outlier due to its vertical axis

JointFc (Nm)Axis DirectionB1 Improvement
J135.0Horizontal73.5%
J210.0Horizontal46.7%
J05.0Vertical10.1% (outlier)
J32.0-39.5%
J42.0-39.0%

J0 is a vertical axis, so it has less friction load in the gravity direction. Despite having higher Fc than J3/J4, its improvement rate is lower.

Unexpected Finding: j3_fast Anomaly

j3_fast anomaly analysis

B2 (FF only) actually degraded performance in the j3_fast trajectory

Phenomenon: B2 (FF only) condition showed 13.8% degradation compared to baseline in j3_fast

StatisticValue
B2 > B0 in all 4 runsConsistent degradation
t-testt=20.7, p=0.0002
VerdictSystematic phenomenon, not random

J4 with the same Fc=2Nm behaved normally - This is a J3-specific phenomenon

Implications: Applying FF alone without friction compensation can degrade performance under certain conditions. B3 (both) performed normally.

Friction Model Implementation

Chattering Prevention: tanh vs sign

The existing sign() function causes abrupt torque changes near zero velocity:

Velocity (rad/s)sign() OutputTorque Change
+0.001+1+35 Nm
-0.001-1-35 Nm
Difference-70 Nm jump

Using the continuous tanh() function for smooth transition:

constexpr double kTransitionVelocity = 0.05;  // rad/s (~3 deg/s)
tau_compensation = Fc * tanh(velocity / kTransitionVelocity)
Velocity (rad/s)tanh() OutputTorque Change
+0.001+0.02+0.7 Nm
-0.001-0.02-0.7 Nm
Difference-1.4 Nm (continuous)

Meaning of kTransitionVelocity

kTransitionVelocity defines "how quickly to determine friction direction near zero velocity":

ValueCharacteristicTrade-off
SmallerCloser to sign() (sharp transition)Accurate but chattering risk
LargerSmooth S-curveStable but inaccurate at low speeds

Empirical meaning of 0.05 rad/s (approximately 3 deg/s):

  • Below this speed: Friction direction is considered "uncertain"
  • Above this speed: tanh is approximately equal to +/-1, nearly identical to the original Coulomb model
note

This value requires tuning based on system noise, velocity measurement resolution, and drive system characteristics.

Torque Usage Changes

ConditionTorque RMSEvs B0Torque MAXvs B0
B01.94 Nm-22.2 Nm-
B12.04 Nm+5.1%23.2 Nm+4.5%
B22.10 Nm+7.9%27.5 Nm+23.7%
B32.08 Nm+7.2%28.4 Nm+27.6%

Friction compensation (B1) has minimal torque increase, but FF (B2) increases maximum torque by 24%.

Operational Recommendations

ScenarioRecommended SettingReason
General operationB1 (friction only)Core effect only, simplicity, stability
Maximum precision neededB3 (both)Additional 3% improvement
High-speed tasksB1 (friction only)Minimal FF effect, noise risk
FF aloneCautionj3_fast degradation observed

Why FF Effect Was Limited

  1. Limitations of simple numerical differentiation: Uses only 2 samples, amplifies noise
  2. Indirect compensation by PD gains: Existing PD controller partially compensates for inertia
  3. Unnecessary for low-inertia joints: J3, J4 have minimal inertia
  4. Asymmetric effects without friction compensation: Acceleration/deceleration torque imbalance

Experimental Limitations

  1. Fixed condition order (B0->B1->B2->B3): Temperature/time drift possible
  2. Paired t-test used: Used instead of 2-way ANOVA, interaction significance not tested
  3. No multiple comparison correction: B2 significance questionable after Bonferroni correction
  4. Sample structure: 160 runs summarized as averages of 10 trajectories (df=9)

Key Takeaways

  1. Friction compensation is the key factor. 36.1% improvement (p<0.01, Cohen's d=1.49) accounts for 93% of total improvement.
  2. Acceleration FF effect is limited. Only 5.0% improvement, and the expectation of greater effectiveness at high speeds was rejected.
  3. The two effects are largely independent. Interaction effect is approximately 0.033 mrad, negligible.
  4. Maximum effect in joints with high friction coefficients (J1). 73.5% improvement in J1 (Fc=35Nm).
  5. Caution required for FF-only application. 13.8% degradation observed in j3_fast.