Overhead Crane Control Problem Steve Rogers
Introduction The intention of this paper is to show a simple crane model and highlight some of the control issues. Below is a general crane diagram which may be found in control textbooks.
The following is a simple free-body diagram of the crane.
Definitions:
a Acceleration (m/s) F Force (N) g Acceleration due to gravity (10 m/s2) L Cable length (m) M, m Trolley and payload mass, respectively (kg) v Velocity (m/s) x Trolley position (m) θ Cable angle (rad) i, j, k Unit vectors (-) The operation is assumed to position the large mass at the appropriate x-y location. The major control issue then is to reduce the amount of sway (maintain the cable angle near zero) of the dangling object, caused by sea motion or the crane motor.
Model Derivation Assuming that the cable and crane are not flexible, that the center of gravity of the payload is located at L, that there is no damping or other dissipative forces, and that there is motion in only one plane, and then the equation governing the physical behavior of the pendulum system can be easily derived. Summing the forces about the horizontal and vertical we have: F + FCable sin θ = Mx Mg + FCable cos θ = FRail
Making the assumptions that θ and dθ/dt are small, we can then derive: F + FCableθ = Mx Mg + FCable = FRail −F θ = m x +θL Cable
(
(
θ FCable = m g +θ
)
)
Substituting the 3rd equation into the 1st equation above, we have: F = ( M +m ) x +mLθ
Substituting the 4th equation into the 3rd equation above, we have: L + gθ − x =θ
Combining the last 2 equations we get: −( M +m ) gθ F = −MLθ
In state space format the above becomes:
x1 x 2 = x3 x 4
−
0 M+m g ML 0 m g M
1 0 0 x1 0 x1 1 0 0 0 x 2 − + ML F , x 2 = 0 0 1 x3 0 x3 1 0 0 0 x 4 x4 M
θ θ x x
In the variables of the state space matrices above, the two with the most variations are m and L. Let M = 5000 kg, L = 10 m, and m = 1000 kg for the nominal case.
Control Analyses
System: G Frequency (rad/sec): 1.1 Magnitude (dB): 47.7
0 Magnitude (dB)
M = 5000; m1 = 1000; L = 10; g = 10; A = [0 1 0 0 -(M+m1)/M/L*g 0 0 0 0 0 0 1 m1/M*g 0 0 0]; B = [0 -1/M/L 0 1/M]'; C = [1 0 0 0]; D = 0; G = ss(A,B,C,D); bode(G),grid on pzplot(G)
Bode Diagram 50
-50
-100
-150 -180 -225 Phase (deg)
The 1st step is to build the state space model in matlab and check the bode plot and pole plot for characteristics. Typical matlab commands are:
-270 -315 -360 -1
0
10
1
10
10
Frequency (rad/sec)
Pole-Zero Map
Cp = tf(-[1 0],1); Gcl = feedback(G*Cp,1); impulse(Gcl),grid on rlocus(Gcl)
1
System: G Pole : 0 + 1.1i Damping: -0 Overshoot (%): 100 Frequency (rad/sec): 1.1
0.5 Imaginary Axis
There is a spike on the bode plot at 1.1 rad/sec that also shows up on the pole-zero plot. There are also a couple of integrators at the origin on the pole-zero plots. In order to obtain basic stability we can add a negative zero at the pole. This will attract the oscillatory poles to the stable region.
1.5
0
-0.5
-1
-1.5 -3
-2
-1
0 Real Axis
1
2
3 -18
x 10
From the impulse plot, at least it is now stable. However, there is too much oscillation at this point. By inspection of the root locus we determine a gain of ~400,000 for the moment.
-5
2
Impulse Response
x 10
1.5
1
Amplitude
0.5
We modify the controller and repeat to see the effects of our new guess.
0
-0.5
-1
Cp = tf(-400000*[1 0],1); Gcl = feedback(G*Cp,1); impulse(Gcl),grid on step(Gcl),grid on bode(G*Cp),grid on
-1.5
-2
0
1
2
3
4
5
6 5
Time (sec)
x 10
Root Locus 1.5
1
System: Gcl Gain: 8.33e+004 Pole: -0.833 + 0.712i Damping: 0.76 Overshoot (%): 2.53 Frequency (rad/sec): 1.1
Imaginary Axis
0.5
0
-0.5
-1
-1.5 -2
-1.5
-1
-0.5 Real Axis
0
0.5
Impulse Response 4 3.5 3
Amplitude
2.5 2 1.5 1 0.5 0 -0.5
0
2
4
6
8
10
12
14
Time (sec)
System: Gcl Time (sec): 0.7 Amplitude: 0.86
0.9
Step Response
0.8 0.7
Amplitude
0.6 0.5 0.4 0.3 0.2 0.1 0
0
2
4
6
8
10
12
14
16
18
20
Time (sec)
From the above we see some improvement in the impulse response, as it is no longer oscillatory. The step response shows the system’s response to disturbances. They are smoothly rejected; however, the deviation from the vertical is 85%, which may be unacceptable. Next, we inspect the bode plot, which shows the effects of the 1.1 rad/sec frequency oscillatory poles noted above.
Bode Diagram 150 System: untitled1 Frequency (rad/sec): 1.1 Magnitude (dB): 148
Magnitude (dB)
100
50
0
-50 -270
Phase (deg)
-315 -360 -405 -450 10
-1
0
10
10
1
Frequency (rad/sec)
Let’s assume we wish to remove the bode plot spike. In order to reduce the spike effects we can design a 2nd order notch filter centered at frequency 1.1 rad/sec. Two methods of notch filter design were evaluated. The matlab code for each is shown below. The 1 st method uses the matlab notch filter design commands. It gives a very clean, narrow notch with unity gain elsewhere as shown in the bode plot below. The other design is an intuitive approach with a lightly damped 2nd order polynomial in the numerator and a unity damped polynomial in the denominator. As might be expected it is functional, but not as clean in the notch. Perhaps the determining issue is the phase distortion with the sloppy (2nd) method, which could cause instabilities. The 1st method was chosen for further evaluation. We note immediately from bode plot comparisons the difference in magnitude of the spike at 148 dB and the notch filter at -60 dB. We may have to repeat the operation to ensure attenuation of the oscillation. if 1 wo = 1.1/10/pi; bw = wo/30; [b,a] = iirnotch(wo,bw); Cpnotchd = tf(b,a,1/10); Cpnot = d2c(Cpnotchd); else
w0 = 1.1; Cpnot1 = tf([1 2*0.01*w0 w0^2],[1 2*w0 w0^2]);
end bode(Cpnot,Cpnot1),grid on
Bode Diagram 20
Magnitude (dB)
0
-20
clean sloppy System: Cpnot Frequency (rad/sec): 1.1 Magnitude (dB): -60
-40
-60 90
Phase (deg)
45 0 -45 -90 10
-1
0
1
10
10
Frequency (rad/sec)
We now revisit the bode plot to see the effects of the notch filter. Gcl = feedback(G*Cp*Cpnot,1); bode(Gcl),grid on
Bode Diagram 20
Magnitude (dB)
10 System: Gcl Frequency (rad/sec): 1.1 Magnitude (dB): 10.6
0 -10 -20 -30 90
Phase (deg)
45 0 -45 -90 -135 10
-2
-1
10
10
0
Frequency (rad/sec)
1
10
2
10
We see that the oscillation at frequency 1.1 rad/sec still has a spike left, although it is much reduced. We can now try adding another notch filter to determine if there’s an improvement. Gcl = feedback(G*Cp*Cpnot,1); Gcl1 = feedback(G*Cp*Cpnot*Cpnot,1); bode(Gcl,Gcl1),grid on legend('1notch','2notch')
Bode Diagram 20
Magnitude (dB)
0
System: Gcl Frequency (rad/sec): 1.1 Magnitude (dB): 10.6
-20 -40
System: Gcl1 Frequency (rad/sec): 1.1 Magnitude (dB): -68.8
-60 -80 180
1notch 2notch
Phase (deg)
0 -180 -360 -540 10
-2
-1
10
0
10
1
10
10
2
Frequency (rad/sec)
From the bode plot we see that the oscillation is completely attenuated. Note that the 2 nd notch filter had no impacts on the magnitude and phase. The 2*pi offset of the phase is an artifact of matlab and now we can proceed to meet some performance requirements, such as step response. We first check the step response. Gcl1 = feedback(G*Cp*Cpnot*Cpnot,1); step(Gcl1,10),grid on
The disturbances are completely damped by 6 seconds; however, the deviation from the vertical is still excessively high.
System: Gcl1 Time (sec): 0.576 Amplitude: 0.834
0.9
Step Response
0.8 0.7
Amplitude
0.6 0.5 0.4 0.3 0.2 0.1 0
0
2
4
6
8
10
12
14
16
18
20
Time (sec)
We next look at the bode plot again and decide to adjust the gain. Bode Diagram Gm = 63.6 dB (at 1.1 rad/sec) , Pm = -168 deg (at 1.1 rad/sec) 0
Magnitude (dB)
-20
-40
-60
-80 -270
Phase (deg)
-315 -360 -405 -450 -495 -2
10
-1
10
0
10
1
10
Frequency (rad/sec)
Gcl1 = feedback(G*Cp*Cpnot*Cpnot*0.4,1); Gcl = feedback(G*Cp*Cpnot*Cpnot,1); bode(Gcl,Gcl1),grid on legend('old','new') step(Gcl,Gcl1),grid on
2
10
legend('old','new')
Bode Diagram 0
Magnitude (dB)
-20
-40
-60
-80 -270 old Phase (deg)
-315
new
-360 -405 -450 -495 -2
-1
10
0
10
1
10
2
10
10
Frequency (rad/sec)
System: Gcl Time (sec): 0.576 Amplitude: 0.834
0.9
Step Response old
0.8
new
System: Gcl1 Time (sec): 1.15 Amplitude: 0.628
0.7 0.6
Amplitude
0.5 0.4 0.3 0.2 0.1 0 -0.1
0
2
4
6
8
10
12
14
16
18
20
Time (sec)
By reducing the gain the magnitude of the disturbance response is reduced as well as the settling time. Increasing the gain causes a slower settling time and a poorer disturbance response.
Horizontal Controller Design The horizontal control system has a very simple model to begin. We only need to remember that it is defined by F = Mx . We can choose two lead transfer functions as follows with the zeros at -0.08 and the poles at -1. Gx = tf(1,[M 0 0]); cpx = zpk(-[0.08 0.08],-[1 1],2000);
The important part of the root locus is shown below followed by the step response.
Root Locus 0.08
System: untitled1 Gain: 0.921 Pole: -0.0216 + 0.0371i Damping: 0.503 Overshoot (%): 16 Frequency (rad/sec): 0.0429
0.06
Imaginary Axis
0.04
0.02
0
-0.02
-0.04
-0.06 -0.08
-0.07
-0.06
-0.05
-0.04 Real Axis
-0.03
-0.02
-0.01
0
Step Response System: Gclx Time (sec): 53.1 Amplitude: 1.22
1.4
1.2
Amplitude
1
0.8
0.6 System: Gclx Time (sec): 10.8 Amplitude: 0.614
0.4
0.2
0
0
50
100
150
200
250
Time (sec)
This control law gives a 22% overshoot and a time constant ~11 seconds. Note that the performance may be tightened up by increasing the gain or increasing the magnitude of the zeros.
Integration and Simulation The above concepts were integrated into a simulink model shown below.
-1
m
M+m thetadd
1 s
1 s
thetad
theta
g [5000 10 1000 ] Mgm
M
ML
500000 1000
L
-1 xddth xdd
1 s
1 s
xd
x
1/5000
4000 (s+0.1)(s+0.1) (s+1)(s+1) Zero -Pole
x position
xSP
During integrated simulation the notch filters did not appear necessary and were not included. A single delay at 10 Hz is included to prevent an algebraic loop. The final  and 2) control laws as shown in the simulink diagram are: 1) theta angle 30000θ 4000( s + 0.1)( s + 0.1) position loop . The simulation results are as follows. ( s + 1)( s + 1) angle parameters theta in radians
0.5 0 -0.5
0
100
200
300
400
500
600
0
100
200
300
400
500
600
0
100
200
300 time in seconds
400
500
600
5
force in N
2 0 -2
cable length in m
x 10
15 10 5
position tracking parameters position tracking in m
100 50 0 -50 -100
0
100
200
300
400
500
600
0
100
200
300 time in seconds
400
500
600
position force in N
50
0
-50
-100
Although the angle controller required much force input for stability, it did not seem to adversely impact the position controller. The key items for future analyses and testing are improving model accuracy, determining model parameter nominal and dispersed values, discretization, and disturbance characteristics.