Input Shaper
DynamicsThe Input Shaper removes the swing from a move. A crane that jerks its trolley to a new
position sets the hanging load swinging, and the operator waits for it to die out. An
input shaper sends the same move as two (or three) smaller steps, timed half a swing
period apart: the first step starts a swing, the second starts an equal and opposite one,
and the two cancel. The load arrives and stays put.
The price is time β every move takes half a swing period longer (ZV) or a full one (ZVD)
β and knowledge: the shaper must know the load's natural frequency. ZV is the fastest but
leaves a noticeable swing if that frequency is off by more than a few percent; ZVD takes
twice as long and tolerates an error of about 15 %, for example a rope length that varies.
Mathematical Model
Where:
u(inputCmd) is the unshaped commandy(outputShaped) is the shaped command, sent to the driveAβ,Aβ,Aβ(outputs) are the pulse amplitudes; they sum to 1, so the shaped
command ends where the command does
T(output) is the time the shaper adds to each move:tdfor ZV,2tdfor ZVD
The delayed commands are read from a history of samples with linear interpolation,
because td is rarely a whole number of samples. The history holds 8192 samples:
81.9 s at the default 0.01 s sample time.
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
Swing-Free Crane Move
The same 10 m trolley move drives two identical pendulum loads, modelled as
second-order systems with Οn = 0.5 rad/s and ΞΆ = 0.05. Sent straight, the load
overshoots by almost the full move and is still swinging at the end of the run. Sent
through a ZV shaper tuned to the same pendulum, the load arrives 6.3 s later and does not
swing at all.
Remarks & Best Practices
- Shaping acts on the command, outside the loop: it cannot correct a swing that a gust or
a collision starts. It prevents the swing the move itself would cause.
- A shaped step is a staircase, so the drive still sees steps. Shape a smooth trajectory,
or put a rate limiter after the shaper, when the drive cannot follow steps.
- Tune
naturalFreqto the real swing: measure the periodPof a free swing and use
2Ο/P.
Related Components
- SecondOrderSystem" class="bw-link">SecondOrderSystem
- Delay" class="bw-link">Delay
- RateLimiter" class="bw-link">RateLimiter