Input Shaper
DynamicsThe InputShaper block implements Zero Vibration (ZV) and Zero Vibration and Derivative (ZVD) feedforward input shaping algorithms to suppress residual structural oscillations in flexible mechanical systems. By convolving an arbitrary motion command with a carefully timed sequence of discrete impulses, the oscillatory motion initiated by the first impulse is canceled out by subsequent delayed impulses. The Property Editor features a live Impulse Train preview (InputShaperInsights) showing the exact normalized pulse amplitudes , timing offsets , damped period , and total shaper duration .
Mathematical Model
Let be the undamped naturalFreq and the damping ratio of the oscillatory plant mode (). The damped natural frequency , half-period delay time , and impulse damping ratio are:
The shaped output command is generated based on the selected shaperType:
Zero Vibration (ZV) Shaper (2 Pulses):
with impulse times and normalized amplitudes .
Zero Vibration and Derivative (ZVD) Shaper (3 Pulses):
with impulse times and normalized amplitudes .
Delayed signal values are extracted from an internal circular history buffer via linear interpolation.
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | in1 |
Cmd | number | Required |
| ← Out | shaped |
Shaped | number | Output |
| ← Out | pulse1 |
Aβ | number | Output |
| ← Out | pulse2 |
Aβ | number | Output |
| ← Out | pulse3 |
Aβ | number | Output |
| ← Out | shaperTime |
T | number | Output |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
naturalFreq |
Natural Frequency (Οβ) | number | 0.5 |
Undamped natural frequency of the load; β(g/L) for a pendulum of length L |
damping |
Damping Ratio (ΞΆ) | number | 0.05 |
Damping ratio of the load; crane pendulums are typically 0.01 to 0.1 |
shaperType |
Shaper Type | select | ZV |
ZV is fastest but sensitive to a wrong frequency; ZVD takes twice as long and tolerates about 15 % error |
Usage Examples
Example 1: Swing-Free Overhead Gantry Crane Trolley Positioning
Transferring an industrial container across an overhead crane with cable length () and . Configuring a ZV shaper with naturalFreq = 0.5, damping = 0.02, and shaperType = "ZV". When a step displacement is commanded, the shaped trajectory divides motion into two balanced steps timed apart; the container arrives at the target position with zero residual swing.
Example 2: Flexible Robotic Arm Vibration Suppression under Payload Variation
Moving a flexible robotic manipulator where tool payload mass variations cause natural frequency uncertainty (). Configuring naturalFreq = 20.0, damping = 0.05, and shaperType = "ZVD". The three-pulse ZVD shaper provides a wide zero-derivative notch, suppressing residual tip oscillations to below despite significant payload mass changes.
Remarks & Best Practices
- Live Impulse Train Diagram: The Property Editor visualizes the 2-pulse (ZV) or 3-pulse (ZVD) stem plot with exact amplitude percentages and timestamps in seconds as you adjust and .
- Feedforward Nature: Input shaping acts strictly on the command signal outside the feedback loop. It prevents the move itself from inducing vibrations, but cannot reject external wind gusts or collision disturbances acting directly on the plant.
- Delay vs. Robustness Trade-off: ZV adds half a vibration period () of motion delay; ZVD adds a full period () but provides much broader frequency error tolerance.
- Actuator Smoothness: The shaped output of a step input resembles a staircase. If the motor drive cannot accept abrupt step commands, place a
RateLimiteror first-order lag filter after the input shaper. - Internal State Buffer: Implemented with an internal circular delay buffer in WebAssembly, interpolating between discrete simulation steps with high accuracy.
Frequently Asked Questions (FAQ)
Q: How does Zero Vibration (ZV) input shaping eliminate structural vibration in cranes and robots?
ZV input shaping convolves the motion command with a sequence of two impulses whose amplitudes (where ) and time spacing equal half the damped oscillation period. The second impulse induces an oscillation exactly out of phase with the first, canceling residual vibration completely without reducing maximum actuator acceleration.
Related Components
- SecondOrderSystem: Canonical continuous second-order dynamic plant model.
- RateLimiter: Limits the rate of change of shaped command signals.
- Delay: Pure transport delay block.
- LeadLag: First-order phase lead/lag dynamic compensator.