Subsections

8.1 Simulink: Position control of an overhead crane  

As a mechanical example, you will design a position controller for an overhead crane. Start RaPID in Simulink mode and load the demo project ``Position control of an overhead crane'' through the file menu File $\rightarrow \;$Demo Projects. When you load the demo project, not only the project is loaded, but also a good input excitation signal. Figure 8.3 shows the main ``Data Acquisition'' window after the project was loaded.


  
Figure 8.3: The ``Data Acquisition'' window after you loaded the demo project ``Position control of an overhead crane'' and conducted the open loop experiment.
\begin{figure}
\centering
\includegraphics [width=13cm]{line1.ps}
\end{figure}


Process Description

The model describes an overhead crane which is used for moving heavy objects from one place to another (harbors, factory floors, etc). Conventionally, the movement is controlled by an operator with a control panel. He controls speed and direction of the payload by using position and speed steps. As a result, the overhead crane starts and stops with high acceleration, causing the payload to oscillate, which in its turn results in long operating delays and inaccurate positioning.

An automatic controller should be implemented to achieve fast displacement with very little overshoot. The load is 20 tons, and the distance to be covered is 100 meter. The crane is moved by a motor, which produces a maximum force on the cart of 120 kN. The process input should stay between -10 and 10 Volt. The process output is the position of the load in meter. The control goal is to position the crane as fast as possible with very little overshoot (1 %). The signals are fairly noise free and are sampled with a sample frequency of 10 Hz.

Have a look at the process by opening the Simulink model with the menu Simulink $\rightarrow \;$Model, or by editing the project with the menu Edit $\rightarrow \;$Project. Inspect the parameter file with the menu Simulink $\rightarrow \;$ Parameter File and the text file with Simulink $\rightarrow \;$Text File.

Data acquisition

The data acquisition is simply started by hitting the ``Start'' button in the acquisition window. The impulse like input is applied to the crane, and the position of the load is recorded. The short pulse at the input leads to a steady state displacement of 1.11 meter (use zooming and data viewing to inspect the signals). The displacement however is very oscillatory which is clearly not a desired behavior.

The fact that a pulse like process input signal leads to a constant displacement indicates the presence of an integrator. Keep this in mind for the identification pre-processing.

Finally, zoom in on the tail of the position signal. Looking at the noise, you find a noise amplitude of about 0.01 meter (1 centimeter) on the measured position. You will use this information during the control design.

Identification

Hit the identification button to switch to the ``Identification'' window. In the ``PreProcessing'' window of Figure 8.4 choose to include an integrator by differentiating the output. The plot now shows the speed of the cart in m/sec (the derivative of the position is speed). Since the speed is quite noisy, you should filter both the process input and output with a low pass filter with a cut off frequency of 0.5 Hz (see Figure 8.4). Truncate the measurement before 2 seconds to get rid of the transient effects and choose a nominal working point of 0 m/sec and 0 Volt. Figure 8.4 shows the resulting ``PreProcessing'' window.


  
Figure 8.4: Resulting ``PreProcessing'' window including the the inclusion of an integrator, the filtering, ranging and detrending.
\begin{figure}
\centering
\includegraphics [width=12.7cm]{line1.ps}
\end{figure}


Hit the ``OK'' button in the ``PreProcessing'' window. The model is automatically computed and the signals displayed. Figure 8.5 shows the resulting ``Identification'' window.


  
Figure 8.5: Resulting ``Identification'' window.
\begin{figure}
\centering
\includegraphics [width=13cm]{line1.ps}
\end{figure}


The resulting model is very good, with an identification error of 4.4 %. The two poles capture the oscillatory behavior of the system. However, the default number of zeros is also two. At first, you should always try to trade off these zeros for delays. So, reduce the number of zeros to none (click on the most left bar) and increase the delay to 0.2 seconds. The identification error is only slightly increased to 5.3 %, which is still quite acceptable. This is a typical switch that can often be made: a zero for a delay. If it does not degrade the identification error too much, a general rule is that delays are preferred over zeros.

Inspect the ``Model Numerics'' (under the View menu) to find out that the oscillation has a frequency of 0.11 Hz and a damping of 0.14 (Figure 8.6). Check out the time responses in the ``Model Properties'' window. The overall settling time is 41.2 seconds (View $\rightarrow \;$Model Properties $\rightarrow \;$Time Responses) which is the time it takes for the payload to stop oscillating when a unit step input is applied.


  
Figure 8.6: The ``Identified Model Numerics'' window displaying some of the model properties.
\begin{figure}
\centering
\includegraphics [width=11.6cm]{line1.ps}
\end{figure}


Controller design

You are now ready to start the control design for the crane. Hit the ``Controller'' button in the task bar to switch to the ``Control Design'' window. The ``Control Design Parameter'' window pops up. Select ``Tracking Only'' as controller type and ``Settling Time'' to optimize, since you are trying to get the crane to its final position as fast as possible. Your specifications allow an overshoot of 1 %. The initial Volt and initial position of the crane are 0. Now hit the ``OK'' button in the ``Control Design Parameter'' window.

The ``Design Reference Definition'' window, which is the next window popping up, allows you to define the reference signal shape. The crane has to move 100 meter, so you should select a step signal between 0 and 100 meter. Hitting the ``OK'' button starts the computation of the controller. The resulting ``Control Design'' window is shown in Figure 8.7.


  
Figure 8.7: Resulting ``Control Design'' window after the initial control design.
\begin{figure}
\centering
\includegraphics [width=13cm]{line1.ps}
\end{figure}


The reference tracking part (the first part of the signal) is reasonably good. The second part of the signal is the effect of a load disturbance. This effect is automatically plotted to protect you from designing controllers with an excellent tracking performance but a lousy load rejection. Click on the text ``Load'' in the configuration plot to plot the load impulse (this could be something hitting the cart). Note that the load signal amplitude is very high in this case. It is chosen automatically (and is not restricted to input limits you specified in the project), such that the effect of the load at the output is visible.

Now, recall that the amplitude of the noise level was 0.01 meter. Say that the motor can shake 0.5 Volt (6 kN) as a consequence of this noise signal. This implies the ``HF Gain'' can be 50 Volt/meter (see Section 6.3.3). Change the ``HF Gain'' to 50 and watch the controller be re-computed. Note the slight increase in speed. The effect of a noise disturbance of amplitude 0.01 meter can be checked in simulation by clicking the ``Disturbance'' arrow box in the configuration window. Select a ``Random Gaussian'' signal with a maximal amplitude of 0.02 meter (this gives an average of 0.01 meter amplitude) and hit ``OK''. Zooming in on the process input and using data viewing reveals that the amplitude of the ``Force'' is indeed $\pm$ 0.5 Volt.

You can increase the speed of the controller even more by lowering the robustness. Changing it from 65 to 45 results in a slightly faster step response. Looking at the ``Loop Numerics'' window (under View) however shows that the ``Gain Margin'' has decreased from 9.6 dB to 5.6 dB. The system also became more oscillatory with respect to the load rejection. So, this is not such a good idea, and you should change the robustness back to 65.

Have a look at the parameters of this controller through the menu Edit $\rightarrow \;$Controller, or at the properties through any of the menus View $\rightarrow \;$Loop Properties, Loop Numerics or Analysis.

Controller validation

Now you are ready to test the controller in practice. Hit the ``Closed Loop'' button in the task bar, resulting in the ``Closed Loop Data Acquisition'' window. The reference is drawn as a blue line, while the simulation is yellow dotted.

Hit the ``Start'' button to start the Simulink experiment. The result is shown in Figure 8.8. Note the almost perfect correspondence between the linear simulation (yellow line) and the real output (green line). Note also that the process input has some ``hair'' with an amplitude a bit bigger then $\pm$ 0.5 Volt (as was predicted).


  
Figure 8.8: Resulting ``Closed Loop Data Acquisition'' window.
\begin{figure}
\centering
\includegraphics [width=13cm]{line1.ps}
\end{figure}


Some re-designs

A first re-design consists of the lowering of the noise sensitivity since the shaky process input could be very bad for the life time of the actuator. Return to the control design window, and lower the ``HF Gain'' to 10. Then return to the ``Closed Loop Data Acquisition'' window and re-run the experiment with this new controller. When the experiment has concluded, select View $\rightarrow \;$ Previous Data to compare both experiments. Clearly the second controller is about equally as fast, however it is much less noise sensitive and the actuator will live a lot longer with this second controller. Save the result of this second controller as benchmark data through the menu entry Edit $\rightarrow \;$Measured $\rightarrow \;$Benchmark Data (you will use this as a comparison set).

This last controller would suffice as a good controller. The only problem with it, is that it is not robust against step shaped load disturbances, for instance the wind blowing against the cart. You can easily simulate this effect by returning to the ``Control Design'' window and changing the load by clicking the ``Load'' signal arrow box in the configuration plot. The ``Load Definition'' window of Figure 8.9 pops up. Now change the load to be a step signal of amplitude -5 Volt (as in Figure 8.9) and hit the ``OK'' button. The closed loop signals are re-computed and plotted in the main ``Control Design'' window.


  
Figure 8.9: The ``Load Definition'' window with the definition of the step load signal simulating a constant load disturbance (for instance the wind).
\begin{figure}
\centering
\includegraphics [width=10.8cm]{line1.ps}
\end{figure}


You can now see by inspecting of the signals that the step load introduces an unacceptable offset in the position. This is due to the specific structure of the controller. Indeed, by default, RaPID chooses for an integrating process a ``Proportional, Derivative, Double Derivative'' controller (Section 6.2.2 and Figure 6.7). This controller works great in most circumstances, except when there is a step like load disturbance. This is explained in detail in the RaPID course notes.

The solution is to introduce an integral term, which will degrade the controller tracking performance, but will improve the step load rejection. Hit the ``Controller'' box in the configuration plot (or use the menu Controller $\rightarrow \;$Structure) to launch the ``Controller Structure'' window. Change the structure to include an integral term as in Figure 8.10.


  
Figure 8.10: The ``Controller Structure'' window with an integral term included.
\begin{figure}
\centering
\includegraphics [width=12cm]{line1.ps}
\end{figure}


Changing the structure to include the integral term as in Figure 8.10 does not help much for the step load rejection. This is because the Control Design algorithm is still set to optimize the ``Tracking'' performance. Open the ``Control Design Parameters'' window with the menu Controller $\rightarrow \;$Design Parameters, and set the optimization to ``Variance and Tracking'' and the origin to ``Load''. Upon ``OK'' in the ``Control Design Parameter'' window, the ``Design Load Definition'' window pops up containing the -5 Volt step load you just defined. Just hit ``OK'' again, and RaPID will optimize the controller towards this step load disturbance. Note the great improvement in load rejection, but the poor resulting tracking.

Finally, this poor tracking problem can be solved by re-shaping the reference signal. Inspect the data to find that the maximal speed at saturated input is about 2 m/sec. Hit the ``Reference'' arrow box in the configuration plot, and use this knowledge to re-define the reference as in Figure 8.11. This reference has a much smoother profile as the original step reference one and thus leads to much nicer signals.


  
Figure 8.11: The newly designed, smoother reference signal with a maximal speed of 2 m/sec (which is the physical limitation).
\begin{figure}
\centering
\includegraphics [width=10.8cm]{line1.ps}
\end{figure}


Now implement this new controller in the ``Closed Loop Data Acquisition'' window and compare with the benchmark data (Figure 8.12). You will note that both controller's settling time are almost equal. The second controller however has a much smoother acceleration profile and is much more robust against constant load disturbances. Both controllers however have the same sensitivity to noise at the output and the same overall robustness.


  
Figure 8.12: Final ``Closed Loop Data Acquisition'' window with the original controller/reference design in dotted line and the final controller/reference design in full line.
\begin{figure}
\centering
\includegraphics [width=13cm]{line1.ps}
\end{figure}




Peter Van Overschee
1/21/1998