Adaptive Control for a Mechanical Manipulator

Introduction

One of the challenges currently facing the field of robotics is the development and implementation of autonomous manipulation. In order for robots to interact with their environment effectively, it is critical that they be able to robustly manipulate objects which may be of unknown weight and shape. One tool for autonomous manipulation is adaptive control, which allows for interaction with unknown objects without loss of performance. Adaptive controllers have been shown to significantly outperform their fixed counterparts [2].

The goal of this project was to simulate an adaptive controller running on a mechanical manipulator. The adaptive controller used is a model reference adaptive controller described in [3]. The controller was simulated running on the Barret WAM [4] with 4 degrees of freedom.

Related Work

There is an abundance of work on adaptive control for mechanical manipulators. The controller used in this project is taken from [3]. There are many variations on the model reference adaptive controller based on Lyapunov stability theory and some based on hyperstability [6], as well as many adaptive controllers based on sliding mode controllers [5].

Dynamic Model

Derivation

The dynamic model of the manipulator was developed using the techniques in A Mathematical Introduction to Robotic Manipulation [1]. The manipulator equations of motion can be expressed as



where tau is the joint torque, M is the manipulator inertia matrix, C is a matrix of Coriolis forces, and N is a vector containing any other forces that may act on the manipulator. This formulation of manipulator dynamics can be derived directly from the Lagrangian. Each term can be found following [1]:

  • M(\theta): The manipulator inertia matrix is found from the twists (axes of rotation) and inertial data of the manipulator. The twists for the WAM are:
\xi_1 [0   0   0   0   0   1 ]
\xi_2 [-lb   0   0   0   1   0 ]
\xi_3 [0   0   0   0   0   1 ]
\xi_4 [-lb-lu   0   le   0   1   0 ]
The body jacobian for each link can be found from the twists and initial frames of reference with the following equations:
It was assumed that the off-diagonal inertias of each link were negligible so that the mass matrix in the body frame has the form:
Each m_i,Ix_i, Iy_i, and Iz_i were taken from documentation provided by Barret.
Finally, M(\theta) is found using

  • C(\theta,\dot{\theta}):The coriolis forces depend solely on the form of M(\theta), and can be found using the equation
  • N(\theta):For this model, the only external force acting on the manipulator is gravity. Therefore, N(\theta) is simply the derivative of potential energy:




Simulation

A simulation was run using the NDSolve function in Mathematica 7. The results of running the simulation with no control (tau set to zero) are below:



Each line represents a joint angle, so the figure shows how the joint angles of the manipulator evolve over time for a given set of initial conditions.

Controller

Computed Torque

Computed torque controllers typically attempt to cancel the dynamics of a physical system by utilizing the equations of motion in a feedforward term and correct errors with a feedback term. Controllers of this type are an example of feedback linearization. The control input, tau, to the manipulator system is of the form:



Hatted terms represent terms that are estimates.In the case where all parameters are known, this controller leads to the j-th joint having error dynamics given by:



Computed torque controllers are effective if the model accurately represents the dynamics of the plant, however, they are sensitive to unmodeled dynamics and incorrect parameters. In order to correct for errors introduced by inexact parameters, we can use an adaptive controller.

Model Reference Adaptive Control

Model Reference Adaptive Control uses a model of the plant dynamics in order to estimate parameter values online. This is accomplished by adding an adaptation mechanism to the controller which updates the parameter estimate each control loop. The parameter updating is modeled as a simple differential equation. The structure of the MRAC used in this project is shown in the block diagram below.



The controller and plant blocks are the same as described in the computed torque control section. The controller operates using reference trajectory values (r) and current trajectory errors. The model is the set of the dynamic equations derived above, with the estimated parameters instead of the unknown, real values. The model is used in the controller feedforward term as well as in the adaptation mechanism.

The adaptation mechanism is the rule by which we update the parameter estimates. The mechanism used in this simulation is shown in the equation below (with arguments to M and W omitted), taken from [3]:





The equation is derived in [3] using Lyapunov stability theory, and is therefore difficult to understand meaningfully. In order to gain some intuition for what the equation represents, we can proceed through the terms right to left. First is E_1, which is a linear combination of tracking errors in position and velocity. This is related to how much error was in the computation of joint torques to apply through M^{-1}. The matrix W contains information on how much each parameter affects each joint torque, and so by analogy W^T multiplied the terms to the right produces a measure of how each parameter affects the torques in all of the joints and thus how much (and in which direction) it should change.

Results

The simulation was run with the estimated parameters being the 3 components of inertia for the last link.

Below is a table showing time to converge for simulations run with the same desired trajectory and varied initial conditions in parameter estimate and initial conditions. Convergence in this case was defined as the time for all three parameter estimate errors to come within 10% and stay there. In the absence of knowledge of 'real' parameters (as in non experimental cases), another convergence metric should be used. Parameter initial conditions were found by adding positive multiples of the 'real' parameters to achieve a prescribed error percentage.

Time to Converge (s)
 Initial Parameter Error
Initial Condition Error0%5%10%25%50%
0 rad04.58.3510.2514.75
.01 rad12.9813.3413.4213.4614.62



Convergence times could probably be improved significantly with tuning of gains. The results for this simulation were obtained with Kp set to two times the identity and Kv set to the identity. In the future, these should be chosen using the joint error equation for the ideal computed torque scenario to achieve desired damping ratio and settling time, although these properties will not be guaranteed with parameter updating as well. The parameter gain Gamma was set to .1 times the identity. In addition, the time to converge will depends on the trajectory being followed, and which parameters are being estimated. In the case with perfect initial conditions, the parameter convergence clearly depends on the initial error in the parameter guess. In the case with error in both parameters and initial condition, the parameter converge was universally slower but similar for all levels of parameter error. Plots for the case of 10% initial parameter error and .01 rad initial position error are shown below.



The manipulator joint angles successfully track the specified trajectory, which was theta1 = Cos(t), theta2 = Sin(t), theta3 = Pi/2 and theta4 = Pi/3. Each line in the figure below represents a joint angle.



The joint angle error approaches zero over time. While the rate of error convergence appears to decrease, running the simulation for a longer period of time shows that error indeed continues to approach zero.


Estimates of principle inertias over time (solid lines) converge to expected values (dotted lines of the same color).


Parameter estimate error also goes to zero as time progresses.Solid colored lines are parameter estimate errors. Dotted black lines are 10% error.


All errors approach zero, which is expected. In order to obtain true parameter estimates, the desired trajectory must satisfy the persistent excitation condition, which is that the integral of over the trajectory W^T W must be full rank. The trajectory above is persistently exciting.

Future Work

An obvious next step for this project is to implement the controller on the WAM and obtain some experimental results. In addition, the theory would benefit from a way to more rigorously tune the gains of the controller, perhaps in a manner that is robust to the parameter variation that inevitably occurs during the trajectory.

References

  1. Richard M. Murray, S. Shankar Sastry, and Li Zexiang, A mathematical introduction to robotic manipulation, 1st ed., CRC Press, Inc., Boca Raton, FL, USA, 1994.
  2. L.L. Whitcomb, A.A. Rizzi, and D.E. Koditschek, Comparative experiments with a new adaptive controller for robot arms, Robotics and Automation, IEEE Transactions on 9 (1993), no. 1, 59 - 70.
  3. J. Craig, Ping Hsu, and S. Sastry, Adaptive control of mechanical manipulators, Robotics and Automation. Proceedings. 1986 IEEE International Conference on, vol. 3, April 1986, pp. 190 - 195.
  4. http://www.barrett.com/robot/products-arm.htm
  5. Hung, J.Y. and Gao, W. and Hung, J.C., Variable structure control: a survey, Industrial Electronics, IEEE Transactions on (1993), pp. 2 -22
  6. Hsia, T., Adaptive control of robot manipulators - A review (1986), pp. 183 - 189

Final Presentations

Anirudha Majumdar

The combination of the problem of coordination and passive robot control was interesting. More detail about the generation of motion primitives would be nice.

Avik De

I like that the project approached path planning in a way that we have not discussed in class. The variation of curves idea is interesting. Perhaps in the future, the effects of velocity and acceleration on the joint torque constraints can be incorporated.

Ben Charrow

I like that the project combined two heterogeneous robots to best use each one's strengths. Perhaps more detail about how the door opening grasps were chosen would be nice.

Brian MacAllister

The simulation demonstrated well the planner's ability to handle several different types of obstacles. It would be nice to have a high level explanation of the need for multidimensionality.

Cem Karan

The problem of radio communications causing unintuitive positions to be optimal is very interesting. Good work on the radio model. Perhaps include more explanation for the Mech Es in the class about radio communication.

Ceridwen Magee

The use of micro robots was very novel.

Chinwendu Enyioha

The problem setup of path planning for maintaining communication is interesting. Perhaps it would benefit from an explanation of the project's relationship to previous work.

Fei Miao

The explanation and comparison of RRT/A* was very clear and thorough. I think the project would benefit from more justification or explanation of why you choose to combine the planning for both robots in that particular way.

Ian McMahon

The centroid detection for objects on the table was nice. The project is very ambitious.

Jason Owens

The binning algorithm to find the primitive was interesting. Perhaps there are other indicators that an object belongs in category 'backpack' that can be used as well.

Kartik Mohta

The simulation was very informative. Perhaps more explanation/justification of the cost function you were using would be nice.

Menglong Zhu

The modification to the distance function for letters was very clever. The sign reading was impressive. Perhaps an explanation of any failure modes you encountered would add to the project.

Monica Lui

The combination of localizing and immobilizing a moving target is an interesting and hard problem. I look forward to the result.

Philip Dames

The concept of a mutual information gradient is very interesting. Maybe run the simulation for longer next time.

Shuai Li

I know that getting the Lagrangian dynamics to integrate for a complex system is very hard. Maybe if you apply some assumptions or constraints the simulation will speed up.

Steve McGill

The successful video was impressive. The use of multiple gaits is interesting. I hate the word synergy.

Teyvonia Thomas

Using smart phones for robotics is practical and interesting. I enjoyed the video demonstration.

Yida Zhang

You do a good job of incorporating humor. The video demonstration was impressive.