CRANE ANTI-SWAY LQR CONTROL |
|
Keywords: Crane, Gantry, Anti-sway, State-feedback, LQR, Control. Figure 1. Crane Carrying a Payload. The photo, Figure 1, depicts a crane that carries a payload attached to it's arm. The payload is connected to the arm by a cable. The goal is to move the payload without causing the payload the sway back and forth and to have zero sway angle at the end of the travel of the payload. The big picture problem is to decrease the oscillations of a payload that is being carried by a helicopter through a cable. Solving this is important because helicopters can be more efficiently employed in operations such as search-and-rescue, fire fighting, heavy lifting, and offshore. The stabilization of the external payload is accomplished by a system that requires little or no effort from the pilot so that the pilot does not have to spend extra effort in moving the payload. This tutorial shows an implementation of a LQR controller that moves a crane without oscillating the payload attached to the crane by means of a cable. The rest of the tutorial is presented as follows:
EQUATIONS OF MOTION
FREE BODY DIAGRAMS
UP
|
|
LINEAR QUADRATIC REGULATOR A state feedback controller of the form: u = -Ktxt can be obtained by using the Qt and Rt weighing matrices minimize the cost functional J given below. Subscript t was used to denote that in the case of a time varying L, length of cable, the equations of motion ate time-dependent. Below given Qt and Rt weighing matrices are taken from the work of Corriga et al, "An Implicit Gain-Scheduling Controller for Cranes".
Then the closed loop system becomes:
To compare the results of this controller, state feedback control is used to move the crane to the target position without regulating the angular motion of the suspended payload is designed. Therefore the system now is free of x1 and x3, and is given below. The state feedback controller is designed so that it will have the same poles with the LQR controller that also regulates the angular motion of the suspended payload.
UP
|
|
SIMULATIONS The Matlab code that regulates the crane + suspended payload system is given below. Instead of copying and pasting download it from here.
%Description: Finds the State Feedback Gain Vector for CRANE ANTI_SWAY CONTROL with LQR %Author: Vefa Narli %Date: 08/10/06 %Version:1
clear; clc; close all;
%Mass with a suspended mass
g = 9.81; %m/s^2 -gravity- mG = 84/2.2 %kg -mass of the gantry y-axis- m = 18.10/2.2; %kg -mass of the payload- L = 1.08; %m -length of the payload rope- %wn: Natural frequency of the suspended payload wn = sqrt(g/L)
wt = sqrt(g*(mG+m)/mG/L)
%Used to transform the time dependent system to the frozen time system %That allows us to use the weighing matrices used in Corriga et al's paper %"An Implicit Gain Scheduling for Cranes" N = [ 1 0 0 0 ; 0 1 0 0 ; 0 0 wt 0 ; 0 0 0 wt ];
At = [ 0 0 1 0 ; 0 0 0 1 ; -wt^2 0 0 0 ; 0 0 0 0 ]; Bt = [ 0 ; 0 ; 1/mG ; 1/(m+mG) ]; Ct = [0 1 0 0];
%It is not necessary to use these weighing matrices. Below values are used %to be able to compare our results with a reference, Corriga's work. Q = N^-1*[ 16 -0.5 0 0 ; -0.5 0.2 0 0 ; 0 0 0 0 ; 0 0 0 0 ]*N^-1*wt %N^-1*[ 10 0 0 0 ; 0 1 0 0 ; 0 0 100 0 ; 0 0 0 4 ]*N^-1*wt; %10*eye(4); R = 40/wt^3/mG^2 %500/wt^3/mG^2%40/wt^3/mG^2;
%State feedback controller gains that minizimizes the cost functional with %the above given weighing matrices Kt = lqr(At,Bt,Q,R) 'Multiplied with xR' Bt*Kt
%Regulator closed loop system %This is converted to a servo system by replacing the state vector xt by (xt-xR) %The plant is assumed to have integrator. - 1/(ms^2) - Deviation from that %will cause steady state error. Ac1 = At-Bt*Kt; eig(Ac1) Bc1 = [ 0; 1 ; 0 ; 0 ]; Cc1 = eye(4); Dc1 = [ 0 ; 0 ; 0 ; 0 ]; sys = ss(Ac1, Bc1, Cc1, Dc1); %Impulse response when the crane is given an initial displacement of 1 m figure impulse(sys)
UP |
|
The simulation code for the servo controller can be downloaded here.
|
|
Simulation results are given below for both open loop (no regulator of suspended payload angular motion) and closed loop. It is very interesting to note that the control force requirement for both controllers are quite similar. The only difference is the inherent characteristic of the angular motion regulator.
UP
|
|
REAL TIME TESTS Real time implementation of the controller is performed using LabVIEW Real Time Software, and NI-7831 FPGA circuit board. NI-7831 FPGA is used to control the brushless DC motor that moves the Y-Axis of the crane in our lab and to receive encoder data both from the crane encoder and the encoder that measures the angular position of the cable. To control the oscillations of the payload one has to have a feedback of either the position of the payload or the angular position of the taut cable with respect to the crane arm. We obtained the angular measurement of the cable by using a digital encoder. The mechanism that allowed us to approximate the angular position of the cable is shown below, in Figure 2 (left, middle). Figure 2 also gives a close view of the cable-payload system (right). The cable length is 1.02 m and the payload weighs 8.23 kg.
Figure. Encoder (Left), mechanism to obtain the angular position of the cable (Middle), cable-payload system (Right).
The real time LabVIEW code can be downloaded here. The front panel is shown in the following figure.
The controller part of the labview code is given below:
The FPGA call block is shown below. The FPGA code previously downloaded on the FPGA card NI-7831 is called here. This code is to receive encoder data and to send the PWM signals to the amplifier of the crane. The FPGA project file can be downloaded here, and the LabVIEW code that is uploaded on the FPGA can be downloaded here.
Experiment results are given below. The open loop and closed loop results are plotted together. There is a significant steady state error in the crane position due to the friction inherent in the Y-Axis of the crane. This violates the assumption of having a plant with an integrator. Therefore the servo controller is not as efficient as its regulator counterpart. Overall, the real time experiments closely match with the simulation results. The inefficient filtering and the low accuracy of the cable encoder degraded the performance on the controller, still the results are satisfactory in the sense that the crane can move a suspended payload with reduced oscillations when compared to moving the crane without having a regulator for the cable angular motion. Furthermore, the sway angle, (the position of the payload with respect to that of the crane) and the sway velocity at the end of the crane travel is zero. The movies of the experiments can be downloaded, OpenLoopMovie, ClosedLoopMovie.
UP |
|
Final WordsThis tutorial's objective was to show how to move a crane without oscillating the suspended payload attached to the crane by a LQR controller. The big picture problem was to obtain a method to stabilize the external payload carried by helicopters. Speculating future work would be to use the crane as the vehicle, or in other words control the crane without using a regulator and find other means to stabilize the payload separately from the controller of the vehicle (crane). The goal is to design a controller + mechanism system that would stabilize the oscillations of the suspended payloads while the vehicle is moving without spending any effort to regulate the payload angular position.If you have any question click here to email me. UP |