Crane Anti-Sway Control: Input Shaping, Fuzzy PID & LSTM
An overhead crane anti-sway control system is an intelligent control solution that uses control algorithms to suppress load swing during operation. The main technical approaches include open-loop input shaping, closed-loop fuzzy PID adaptive control, and LSTM-based predictive feedforward control. Input shaping can reduce residual sway by more than 90%, closed-loop fuzzy PID keeps steady-state sway within ±5 mm, and LSTM predictive control enables fully automatic anti-sway on complex trajectories. These three approaches are arranged by control accuracy and cost gradient to suit different operating condition requirements.

Comparing Three Anti-Sway Control Approaches for Overhead Cranes
| technical approach | Control Mode | Sensor Requirement | residual sway | Cost | Commissioning Complexity | Application Scenarios |
|---|---|---|---|---|---|---|
| input shaping(ZV/UM-ZV) | Open-Loop Feedforward | None Sensor | ≤50mm | Low(Software Implementation) | Low | General-Purposeoverhead crane Variable Frequency Drive (VFD)Retrofit |
| fuzzy PIDAdaptive | Closed-Loop Feedback | Encoder+IMU | ≤10mm | Medium | Medium | Precision Hoisting/Automation |
| LSTM+MPCPredictive | Feedforward+Feedback | Encoder+IMU+Camera | ≤5mm | High | High | Fully automaticunmanned overhead crane |
For existing overhead cranes with VFDs, we recommend starting with input shaping—a zero-hardware-investment approach—before upgrading to closed-loop solutions as accuracy requirements grow. The crane's digital remote monitoring system (see intelligent upgrade solutions) can simultaneously collect sway data for model training. For newly built automated overhead cranes, deploying an LSTM+MPC solution directly is recommended for optimal anti-sway performance.
Input Shaping Parameter Design for Anti-Sway Control
The core of input shaping is designing a pulse sequence that drives residual vibration in the system output to zero. For an overhead crane's lifting spreader sway system, the natural frequency is ωn=(g/L)^0.5, where L is the wire rope length in meters. The ZV (Zero Vibration) shaper consists of two pulses with amplitudes A1=1/(1+K) and A2=K/(1+K), and a time delay of ΔT=π/ωd. Taking L=8m as an example: ωn=√(9.8/8)≈1.1rad/s, damping ratio ζ≈0.005–0.01, K=e^(−ζπ/√(1−ζ²))≈0.984, yielding A₁≈0.504, A₂≈0.496, and ΔT≈2.86s. After shaping, the sway angle at trolley travel completion is <0.5°, compared to 8–15° without shaping—a reduction of over 90%.
Real-world applications face disturbances such as real-time changes in wire rope length and load weight. The EI (Extra-Insensitive) shaper adds a third pulse to expand frequency-offset tolerance from ±5% (ZV) to ±20%, making it suitable for general-purpose cranes with frequent rope-length variations. The UM-ZV (Unity Magnitude ZV) shaper normalizes all pulse amplitudes to ±1, preventing motor overload and making it ideal for retrofitting older cranes with VFDs. The calculation parameters for all three shapers are summarized in the table below.
| wire rope length(m) | natural frequency(rad/s) | ZVShaping Delay(s) | ZVShaping Residualsway angle(°) | EIShaping Residualsway angle(°) | UM-ZVShaping Residualsway angle(°) |
|---|---|---|---|---|---|
| 4 | 1.57 | 2.00 | <0.5 | <1.0 | <0.3 |
| 6 | 1.28 | 2.46 | <0.5 | <1.0 | <0.3 |
| 8 | 1.11 | 2.86 | <0.5 | <1.0 | <0.3 |
| 10 | 0.99 | 3.17 | <0.5 | <1.0 | <0.3 |
| 12 | 0.90 | 3.47 | <0.5 | <1.0 | <0.3 |
Fuzzy PID Adaptive Control: Engineering Implementation
The fuzzy PID controller takes the lifting spreader sway angle θ and angular velocity θ’ as inputs, using a fuzzy rule base to tune the Kp, Ki, and Kd parameters online. The fuzzy universe is set to θ∈[-15°,15°] and θ’∈[-30°/s,30°/s], with narrow triangular membership functions near zero for high sensitivity and wide trapezoidal functions away from zero for broad coverage. The rule base contains 7×7=49 rules; a typical rule: when θ is large and θ’ is large (overswing), Kp is set high (for rapid return) and Kd is set to medium (to avoid overshoot). The defuzzified PID outputs (center-of-gravity method) are superimposed on the speed loop reference.
When deployed alongside the crane's AI vision inspection system (see AI Vision Inspection Technical Solution), the vision system provides redundant hook sway angle measurement. When the deviation between the vision-based angle and the encoder-derived sway angle exceeds 2°, an automatic sensor calibration is triggered. Field test data from the closed-loop anti-sway system on a 32t overhead crane: residual sway of ±4mm when unloaded and ±8mm at full load (32t), with sway angle convergence time ≤3s — meeting the ±10mm positioning accuracy required for precision hoisting operations.
LSTM Predictive Control for Crane Anti-Sway
The LSTM-MPC approach adds a feedforward prediction layer on top of the fuzzy PID baseline: an edge inference node runs the LSTM model, taking the past 32 time steps (100ms each) of sway angle and speed command sequences as input, and outputs sway angle predictions for the next 10 steps (1s). The MPC controller uses these LSTM predictions as a reference, rolling optimization of the speed command to minimize future sway. This approach relies on GPU edge inference — a Jetson Orin NX achieves single-step prediction in under 2ms, meeting real-time requirements. In fully automatic unmanned overhead crane operations (integrated with the AI unmanned crane dispatching system), the LSTM-MPC solution delivers lifting spreader positioning accuracy of ±3mm.
Kelude Anti-Sway System: Solution Advantages
Kelude offers a three-tier anti-sway solution: input shaping (standard, included free with any VFD retrofit), fuzzy PID (optional, adds IMU + encoder, compatible with Siemens/Schneider/ABB drives), and LSTM-based fully automatic anti-sway (full-stack deployment, including AI training platform). All options support OEE data upload and remote commissioning. Kelude provides a free on-site assessment and sway angle measurement report for crane anti-sway retrofit projects.
FAQ
Q: What are the key differences between input shaping and LSTM predictive control for crane anti-sway?
A: Input shaping is an open-loop control method — simple, reliable, and computationally light, well-suited for fixed rope length scenarios, reducing sway by 80%–90%. LSTM predictive control learns the system dynamics from historical data, offering better adaptability under varying rope lengths and load conditions, further reducing residual sway.
Q: How does fuzzy PID contribute to anti-sway performance?
A: Fuzzy PID adjusts PID parameters in real time based on the load sway angle, offering better adaptability than conventional fixed-parameter PID. The sway angle and sway angular velocity serve as fuzzy inference inputs, and the outputs are PD parameter corrections. It works best when combined with speed feedforward in crane anti-sway applications.
Q: What anti-sway solutions does Kelude offer?
A: Kelude provides three tiers of anti-sway solutions — input shaping, fuzzy PID, and LSTM — flexibly configurable based on accuracy requirements and budget. All options support integration with existing PLC systems and are suitable for both new installations and retrofit projects.
Overhead Crane Anti-Sway Control: Input Shaping, Fuzzy PID, and LSTM Prediction in Practice
Anti-sway control is one of the core technologies that sets intelligent overhead cranes apart from conventional lifting equipment. It directly addresses a persistent challenge in crane operation: load oscillation. When a trolley moves or stops, the suspended load naturally swings, which slows down cycle times, increases operator fatigue, and creates safety risks in crowded workshops. This article breaks down three proven technical approaches for suppressing load sway—input shaping, fuzzy PID adaptive control, and LSTM-based swing prediction—and explains how they work together in a real engineering environment.