explainer
Friction models: torque during motion and at rest
Compare Coulomb, viscous, and Stribeck friction in a robot joint. Calculate resisting torque and power loss during motion, check static holding at zero speed, and see where friction compensation needs a better model.
What you will learn
- Distinguish physical friction torque from the torque used to compensate for it.
- Calculate moving friction from Coulomb, viscous, and Stribeck terms.
- Check whether a stopped joint can balance a given non-friction torque.
- Verify that the modeled moving friction removes mechanical power.
- Explain the limits of friction compensation and smooth zero-speed approximations.
Before you start
A stopped robot joint can resist a small torque without moving. Once it turns, friction can change with speed. A model that only multiplies velocity by a constant misses that holding behavior.
This lesson separates moving friction from static holding. You will calculate both, check their signs, and see why a useful friction estimate still needs care inside a controller.
Explain why a joint can resist motion and hold still
Imagine a motor turning one joint through bearings and a gearbox. At a steady speed, some motor torque offsets friction. At rest, friction can balance a load even though the joint's angular velocity is zero.
The robot dynamics lesson used viscous joint friction, proportional to velocity. Here we extend that local friction term while keeping the rest of the mechanics separate. A full arm still has coupled inertia, gravity, and external loads.
Treat the joint's housing as fixed. Let v be the shaft's angular velocity relative to that housing, in rad/s. Every torque in this lesson acts at the joint side of the transmission; motor-side parameters would need a consistent conversion.
Fix the torque and velocity signs
Positive torque increases the chosen joint angle. Define τ_d as the sum of the non-friction torques on a simple driven inertia I, including motor torque and any known load. For nonzero speed, write:
I v̇ = τ_d − f(v), with I > 0
τ_friction = −f(v)
When resistance is nonzero, f(v) has the same sign as v. It is the term placed on the left of a dynamics equation, or added to an ideal command for friction compensation. Physical friction on the moving joint has the opposite sign.
Check the convention with mechanical power:
P_friction = −f(v)v ≤ 0
P_loss = f(v)v ≥ 0
Power has units of watts. Negative physical friction power means the modeled resistance removes mechanical energy. This sign check catches a friction term accidentally entered as a driving torque.
Compare Coulomb and viscous friction
Two simple moving-friction models answer different questions:
| Model | Compensation term for v ≠ 0 | Effect of speed |
|---|---|---|
| Coulomb | F_c sgn(v) | Constant magnitude F_c, with direction set by motion |
| Viscous | Bv | Magnitude grows in proportion to speed |
| Combined | F_c sgn(v) + Bv | Constant dry-friction offset plus a speed-dependent term |
Here sgn(v) equals +1 for positive v and −1 for negative v. F_c has units N·m; B has units N·m·s/rad. Both coefficients are nonnegative.
For F_c = 0.8 N·m, B = 0.2 N·m·s/rad, and v = −2 rad/s, the combined compensation is −0.8 − 0.4 = −1.2 N·m. Physical friction is +1.2 N·m, and the power loss is 1.2 × 2 = 2.4 W.
MathWorks' Rotational Friction documentation describes these components and a low-speed Stribeck contribution. Its block uses a smooth approximation through zero. The equation below keeps separate moving branches and an explicit static rule.
Add the low-speed Stribeck contribution
The Stribeck effect describes a drop in sliding resistance over a low-speed range. Use this illustrative joint model for v ≠ 0:
f(v) = [F_c + (F_s − F_c) exp(−(v/v_s)²)] sgn(v) + Bv
F_s ≥ F_c ≥ 0, B ≥ 0, v_s > 0
F_s is the static torque limit in this lesson. The positive moving branch approaches F_s as speed approaches zero. The negative branch approaches −F_s.
The speed v_s sets the scale of the exponential decay. At |v| = v_s, the Stribeck excess has fallen to (F_s − F_c)/e. At much larger speeds, the Coulomb and viscous terms dominate.
The total curve need not decrease throughout the low-speed range. The viscous term grows with speed while the exponential term shrinks. F_s bounds static holding torque; it does not cap moving friction at high speeds.
This model assumes the same friction magnitudes in both directions. It treats its coefficients as constant and uses F_s for both the static bound and the moving zero-speed limit. Those are modeling choices that measurements can challenge.
Treat static friction as a range of possible torques
At exact zero speed, use a set-valued rule: physical friction can take any value in a closed interval.
v = 0: τ_friction ∈ [−F_s, F_s]
Holding balance: τ_friction = −τ_d
Holding is feasible when |τ_d| ≤ F_s
The load determines the torque needed for balance. Static friction does not always equal its maximum magnitude. Modelica's BearingFriction documentation uses this torque-balance principle while stuck and a threshold for the transition to sliding.
Define holding margin as F_s − |τ_d|. A positive margin allows balance inside the interval. Zero margin reaches the ideal boundary; a negative margin means no static balance exists.
Evaluating a moving formula with sgn(0) = 0 returns zero friction. That choice cannot hold a nonzero load. The lab therefore treats exact zero separately and never inserts a line between its moving branches.
At rest, mechanical friction power is zero because v = 0. A motor applying holding torque can still draw current and heat its windings; actuator dynamics connects that electrical behavior to torque. Static balance alone does not determine how a joint accelerates after it breaks away.
Calculate a moving sample and a resting balance
Use the lab's default values:
F_c = 0.8 N·mandF_s = 1.2 N·m.B = 0.2 N·m·s/radandv_s = 0.25 rad/s.- Moving sample
v = 0.25 rad/s. - Separate resting demand
τ_d = 0.75 N·m.
At the moving sample, v/v_s = 1. The three compensation contributions are:
F_c = 0.8 N·m
(F_s − F_c) exp(−1) = 0.4/e ≈ 0.147152 N·m
Bv = 0.2 × 0.25 = 0.05 N·m
f(v) ≈ 0.997152 N·m
Physical friction is about −0.997152 N·m. The power loss is 0.997151776… × 0.25 ≈ 0.249288 W. Reversing the speed reverses both torque signs and leaves the power loss unchanged.
For the separate stopped joint, a friction torque of −0.75 N·m balances the +0.75 N·m demand. It lies inside [−1.2, 1.2] N·m, with margin 1.2 − 0.75 = 0.45 N·m.
Raise that resting demand to +1.5 N·m. The required friction would be −1.5 N·m, beyond the interval, and the margin becomes −0.3 N·m. The model can rule out holding without claiming a startup time or acceleration curve.
Explore the two cases
The first plot shows moving compensation torque. Its open circles identify the one-sided zero-speed limits. The second plot shows the allowed static friction interval and the torque needed to balance a separate resting demand.
Try these changes:
- Select Reverse rotation. Both torque signs change; the dissipated power stays positive.
- Select Rest with a balanced load. The moving sample disappears, and the static example still holds its load.
- Increase the resting demand to 1.20 N·m, then 1.50 N·m. Compare the boundary with a load beyond the interval.
- Select Viscous friction only. This model has no nonzero static holding capacity.
The static-excess slider controls F_s − F_c, so F_s always meets or exceeds F_c. Moving the speed probe leaves the resting example unchanged. These are two calculations with shared friction parameters, not successive moments in a simulation.
Add friction compensation to a torque command
For a moving joint, an inverse-dynamics command can add an estimated friction term to the torque required by inertia and loads. In a full arm, write:
τ_req = M(q)q̈_req + c(q, q̇) + g(q) + f̂(q̇) − J(q)ᵀF
The hat on f̂ marks an estimate, applied per joint in this simple model. For positive motion, a positive compensation term offsets negative physical friction. At rest, load balance and the intended control mode must determine the command; the zero-speed interval supplies no single universal compensation torque.
An overestimate can drive the joint harder than intended. A velocity estimate that changes sign because of noise can switch dry-friction compensation back and forth. Feedback, actuator limits, and a deliberate treatment of the transition through zero remain part of the controller.
Modern Robotics, Section 8.9 connects gearing and motor torque to robot dynamics, then adds estimated joint friction. That estimate helps the command; it does not guarantee tracking accuracy.
Choose what the model must capture
The lab evaluates a prescribed speed and a separate holding condition. It does not integrate the discontinuous law. A simulation that steps past zero and simply flips the sign can create repeated artificial reversals.
Two common simulation choices need different checks:
- A sticking/sliding model solves the static balance and handles transitions between modes.
- A smooth approximation permits a small slip speed around zero. Its width changes both low-speed behavior and numerical stiffness.
Drake's continuous-model documentation explains this tradeoff for contact friction. A smooth curve through the origin can approximate sticking with small motion; it does not enforce perfect zero-speed holding.
Real joint friction can depend on temperature, load, direction, and past motion. Elastic deformation before gross sliding and hysteresis require more state than this speed-only moving law. Modelica's documentation points to dynamic friction models for those effects.
Use dynamic parameter identification to connect a model to measured torque and motion. Steady-speed sweeps can help reveal moving friction after accounting for known loads. Startup and reversal tests examine behaviors that a steady-speed fit cannot establish.
Reproduce the numbers in Python
This example uses the Python standard library. It returns a distinct zero-speed case and tests static feasibility without advancing time. Torques are in N·m and power is in W.
from math import copysign, exp, isclose
Fc, Fs, B, vs = 0.8, 1.2, 0.2, 0.25
def moving_friction(v):
if v == 0:
return None
compensation = copysign(Fc + (Fs - Fc) * exp(-(v / vs)**2), v) + B * v
return -compensation, compensation, compensation * v
def holding(demand):
margin = Fs - abs(demand)
if isclose(margin, 0.0, abs_tol=1e-12):
margin = 0.0
if margin < 0:
return "Cannot hold", None, margin
status = "At static limit" if margin == 0 else "Can hold"
return status, -demand, margin
for v in (0.25, -0.25, 0.0):
result = moving_friction(v)
if result is None:
print(f"v={v:+.2f}: static interval=[{-Fs:+.6f}, {Fs:+.6f}], loss=0.000000")
else:
physical, compensation, loss = result
print(f"v={v:+.2f}: friction={physical:+.6f}, compensation={compensation:+.6f}, loss={loss:.6f}")
for demand in (0.75, 1.2, 1.5):
status, physical, margin = holding(demand)
torque = "undefined" if physical is None else f"{physical:+.6f}"
print(f"demand={demand:+.2f}: {status}, friction={torque}, margin={margin:+.6f}")
Expected output:
v=+0.25: friction=-0.997152, compensation=+0.997152, loss=0.249288
v=-0.25: friction=+0.997152, compensation=-0.997152, loss=0.249288
v=+0.00: static interval=[-1.200000, +1.200000], loss=0.000000
demand=+0.75: Can hold, friction=-0.750000, margin=+0.450000
demand=+1.20: At static limit, friction=-1.200000, margin=+0.000000
demand=+1.50: Cannot hold, friction=undefined, margin=-0.300000
The small equality tolerance only handles rounding at the static torque boundary. The velocity test remains exact: any nonzero v uses a moving branch.
Try it yourself
Exercise 1: reverse a joint with Coulomb and viscous friction
Use F_c = F_s = 0.8 N·m, B = 0.2 N·m·s/rad, and v = −2 rad/s. Find the compensation torque, physical friction torque, and power loss. Then set v = 0 and test whether a +0.75 N·m non-friction demand can hold.
Check your answer: Compensation is −0.8 + 0.2(−2) = −1.2 N·m. Physical friction is +1.2 N·m, so its mechanical power is −2.4 W and the dissipated power is +2.4 W.
At rest, friction needs to supply −0.75 N·m. The interval is [−0.8, 0.8] N·m, so holding is feasible with margin 0.05 N·m. The viscous term vanishes at rest.
Exercise 2: reach a static boundary and cross it
Use the default F_s = 1.2 N·m and start at rest. Test demands of −1.2 N·m and −1.25 N·m. For each, give the required physical friction, holding margin, and feasibility. Can the holding test alone provide the joint's later acceleration?
Check your answer: The −1.2 N·m demand requires +1.2 N·m of friction. That reaches the static boundary with zero margin, so balance is possible in the ideal model.
The −1.25 N·m demand would require +1.25 N·m of friction, outside the interval. Its margin is −0.05 N·m and holding is impossible. That required value is not an available static friction torque.
The test does not calculate later acceleration. That prediction needs inertia, the applied torque over time, and a model for the transition into motion.
Sources and further study
- Modelica: BearingFriction explains torque balance during sticking, a maximum static threshold, and transitions to sliding.
- MathWorks: Rotational Friction describes Coulomb, viscous, and Stribeck components. Its smooth block equation differs from this lesson's separate moving law and static interval.
- Drake: Continuous Models for Simulation explains ideal stiction, continuous approximations, residual slip, and integration concerns.
- Modern Robotics: Actuation, Gearing, and Friction connects actuator and transmission models to joint torque calculations.
Continue with actuator dynamics to check whether the motor and transmission can deliver the compensation torque you calculated.