Drexel Autonomous Systems Lab

起重机防摆LQR控制

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 Words

This 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

本课题设计了一种利用Matlab平台开发的植物叶片健康状态识别方案,重点融合了色彩与纹理双重特征以实现对叶片病害的自动化判别。该系统构建了直观的图形操作界面,便于用户提交叶片影像并快速获得分析结论。Matlab作为具备高效数值计算与数据处理能力的工具,在图像分析与模式分类领域应用广泛,本项目正是借助其功能解决农业病害监测的实际问题。 在色彩特征分析方面,叶片影像的颜色分布常与其生理状态密切相关。通常,健康的叶片呈现绿色,而出现黄化、褐变等异常色彩往往指示病害或虫害的发生。Matlab提供了一系列图像处理函数,例如可通过色彩空间转换与直方图统计来量化颜色属性。通过计算各颜色通道的统计参数(如均值、标准差及主成分等),能够提取具有判别力的色彩特征,从而为不同病害类别的区分提供依据。 纹理特征则用于描述叶片表面的微观结构与形态变化,如病斑、皱缩或裂纹等。Matlab中的灰度共生矩阵计算函数可用于提取对比度、均匀性、相关性等纹理指标。此外,局部二值模式与Gabor滤波等方法也能从多尺度刻画纹理细节,进一步增强病害识别的鲁棒性。 系统的人机交互界面基于Matlab的图形用户界面开发环境实现。用户可通过该界面上传待检图像,系统将自动执行图像预处理、特征抽取与分类判断。采用的分类模型包括支持向量机、决策树等机器学习方法,通过对已标注样本的训练,模型能够依据新图像的特征向量预测其所属的病害类别。 此类课题设计有助于深化对Matlab编程、图像处理技术与模式识别原理的理解。通过完整实现从特征提取到分类决策的流程,学生能够将理论知识与实际应用相结合,提升解决复杂工程问题的能力。总体而言,该叶片病害检测系统涵盖了图像分析、特征融合、分类算法及界面开发等多个技术环节,为学习与掌握基于Matlab的智能检测技术提供了综合性实践案例。 资源来源于网络分享,仅用于学习交流使用,请勿用于商业,如有侵权请联系我删除!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值