The crane: a swing PID can't see

A load on a rope swings every time the trolley moves. Can a PID put it down quickly and hanging still, and if not, what can?

🏗️ Crane with a swinging loadPID falls short8 guided steps
Step 1
Step 1 of 8

The situation

An overhead crane carries a 10 t load on an 8 m rope along a 40 m bay. The trolley drive follows a speed reference; a camera on the trolley reads the sway angle, and the load position is the trolley encoder plus the rope's offset. The mechanical view shows the problem: run the trolley and stop it, and the load swings with a 5.7 s period for minutes. The load's position is what matters, so that is the PV.

Step 2
Step 2 of 8

Baseline: a PI on the load position

About the fastest PI that stays stable: Kc=0.2K_c = 0.2, Ti=100T_i = 100 s. It is painfully slow (a minute after the order to move 20 m, the load has covered 12) and the load is still swinging by about 2° when the test ends. A gust leaves it swinging by 4°.

Running the tests…
Step 3
Step 3 of 8

Why it can't go faster

In the control view, the plant has a pair of poles at −0.006±1.1j-0.006 \pm 1.1j: the swing, with a resonance peak of about 40 dB. Any PI fast enough to matter has gain around 1.1 rad/s, and with 180° of phase lag after the peak, the swing grows instead of dying out. Raise KcK_c to 0.5 and watch it.

The PI has no way to damp the swing: it only knows how far the load is from where it should be. Damping needs the sway rate, and moving the trolley under the load to take the swing out, as a crane driver does.

Comparing in this step:PI on the loadPI, a bit faster
Running the tests…
Step 4
Step 4 of 8

State feedback with an observer

Feed back all four mechanical states: trolley position and speed, sway angle and sway rate. Pole placement puts the dominant pair at ωn=0.5\omega_n = 0.5 rad/s, ζ=0.8\zeta = 0.8, and moves the swing to ζ=0.8\zeta = 0.8 at its own frequency. A Kalman filter estimates the speeds and the wind from the camera and the load position.

The 20 m move now takes 23 s (at 1 m/s top speed it can't take much less than 20), and the load arrives hanging still: 0.09° of swing left. A 1 m positioning move settles in 5.5 s. The gust moves the load less than a metre and it is back in 8 s. Look at the controller output: the trolley moves under the load.

Comparing in this step:PI on the loadState feedback
Running the tests…
Step 5
Step 5 of 8

Why the observer has to know about the wind

Wind holds the load at an angle: 2.3° for 4 kN on 10 t. To a controller that wants zero sway, that is a swing to take out, and it keeps driving the trolley to do it.

  • With nothing to remove offset, the gust drags the load almost 8 m along the bay.
  • With an integral of the error, the gust costs nearly 4 m, and the integral winds up during every move: 1 m moves overshoot by more than half.
  • Estimating the wind in the observer tells the controller what steady sway to expect, so it holds the load where it should be and leaves the integral out of the moves altogether.

An observer is a model: what it doesn't know about, it explains with the wrong states.

Comparing in this step:Estimating the windNo offset removalIntegral of the error
Running the tests…
Step 6
Step 6 of 8

A longer rope, and a missing camera

The rope. Lower the load to 13 m and the swing is 27 % slower than the controller was designed for. The moves still settle in 22 s without overshoot: pole placement with a well-damped target leaves room. Further than that, it needs to know the length: the next step.

The camera. Take it away (measure the load position only) and the wind can't be estimated at all: at rest, a wind with the trolley a little upwind looks exactly like no wind with the trolley where it should be. The design says so (choose "ZT-601 only" with "estimating the upset"). With an integral of the error instead it runs, but it overshoots 60 % on small moves. Observability is a property of the sensors, not of the controller.

Comparing in this step:State feedbackLoad position only, integral
Running the tests…
Step 7
Step 7 of 8

Schedule the design on the rope length

Lower the load to 24 m, three times what the design assumed, and the margin runs out. The moves overshoot 4 %, take 29 s to settle, and the load is still swinging about 1° when it gets there.

The hoist encoder (ZT-702) measures the rope length, so the controller doesn't have to assume it. Scheduled on it, the design is redone for the length as it is, the observer's model and the regulator's poles with it: 0.3 % overshoot, 23 s, and under 0.15° of swing left, as good as at the rope length it was set up for. The price is a busier drive (about 40 % more travel), because a long rope's slow swing needs more trolley motion to cancel.

On the bench this is Redesign for the rope length in the state feedback settings. In a PLC, work out the designs offline at a handful of lengths and interpolate the gains between them: an LQR and a Kalman filter are too much to solve every cycle.

Comparing in this step:State feedbackScheduled on the rope length
Running the tests…
Verdict
Step 8 of 8

Verdict

State feedback, with a sway sensor and an observer that models the wind. This is a place where PID genuinely can't do the job, because the thing to control (the swing) is a resonance the PV only shows when it is already too late.

The cost is real: a model (rope length, drive response), a sway camera, a design per rope length or a schedule over it, and an engineer to commission it. That's why crane builders sell anti-sway as a packaged function of the drive or motion controller rather than leaving it to each project.

Everything in this case, through every test

Running the tests…