⚙

Backlash

Discontinuous
Run the live example Free · no sign-up · runs in your browser

Models mechanical backlash (play, clearance, or lost motion) in gear trains, mechanical linkages, lead screws, and robotic joint actuators. The output represents the position of the driven load. When the driving input reverses direction, the output remains stationary until the input travels across the full deadband clearance DD. Once mechanical contact is re-established on the opposite tooth flank, the output follows the input with an offset equal to half the deadband. Essential for analyzing phase lag, lost motion, and limit-cycle hunting in precision servo drives.

Mathematical Model

The backlash nonlinearity incorporates continuous state memory tracking the previous output position y(t−Δt)y(t - \Delta t). As input u(t)u(t) evolves, the output y(t)y(t) updates according to:

y(t)={u(t)−D2,if u(t)>y(t−Δt)+D2u(t)+D2,if u(t)<y(t−Δt)−D2y(t−Δt),otherwisey(t) = \begin{cases} u(t) - \frac{D}{2}, & \text{if } u(t) > y(t - \Delta t) + \frac{D}{2} \\ u(t) + \frac{D}{2}, & \text{if } u(t) < y(t - \Delta t) - \frac{D}{2} \\ y(t - \Delta t), & \text{otherwise} \end{cases}

where DD is deadbandWidth (D≥0D \ge 0), and the output is initialized at t=0t = 0 to:

y(0)=y0y(0) = y_0

where y0y_0 is initialOutput.

The total deadband clearance is DD. When the driving element reverses direction, the input must traverse a displacement of exactly DD before motion transfers to the driven element.

Inputs & Outputs

Direction ID Label Type Status
→ In in In number Required
← Out out Out number Output

Parameters

Parameters Label Type Default Description
deadbandWidth Deadband Width number 1
initialOutput Initial Output number 0

Usage Examples

Example 1: Robotic Joint Gearbox Backlash and Limit Cycles

In industrial robotic arms, planetary and cycloidal gear reducers exhibit small mechanical tooth clearance (e.g. D=0.005D = 0.005 rad). When an optical encoder is mounted on the high-speed motor shaft rather than the arm joint, placing a Backlash block between motor position and joint angle accurately reproduces the unmeasured phase lag, demonstrating how integral control action induces limit-cycle oscillations during slow positioning.

Example 2: CNC Machine Lead Screw Reversal Error Compensation

In precision CNC milling machines, ballscrew nut wear produces lost motion during axis reversal passes. Modeling a machine axis with a Backlash block (deadbandWidth = 0.04 mm) enables engineers to test and validate software backlash compensation algorithms, which inject an instantaneous compensation step whenever the feed axis reverses travel direction.

Remarks & Best Practices

  • Live Play Loop Preview: The property editor renders the dynamic mechanical play loop, showing deadband clearance width DD and engagement envelope boundaries.
  • State-Dependent Dynamic Hysteresis: Unlike the memoryless DeadZone block whose deadband is fixed around zero, Backlash dynamically relocates its deadband around the most recent motion reversal point.
  • Directional Reversal Decoupling: Whenever the driving input reverses within the clearance interval, the output slope is zero (dy/dt=0dy/dt = 0), temporarily decoupling the load from drive disturbances.
  • Initial Flank Positioning: Setting initialOutput allows engineers to simulate worst-case engagement scenarios where gear teeth start pre-loaded against the forward flank, the reverse flank, or centered in free float.
  • High-Speed Rust WASM Engine: Evaluated using 64-bit floating-point registers with zero heap allocations, ensuring stability in real-time simulation loops.

Related Components

  • DeadZone: Memoryless continuous deadband centered around zero.
  • Relay: Two-state hysteretic threshold switching.
  • RateLimiter: Restricts maximum rate of change (dy/dtdy/dt).
  • Saturation: Clamps absolute signal amplitudes within static bounds.