javax.robotics.engine.controllers
Class RobustControl

java.lang.Object
  extended by javax.robotics.engine.JRoboOp
      extended by javax.robotics.engine.controllers.RobustControl
All Implemented Interfaces:
Controller, JointController

public class RobustControl
extends JRoboOp
implements JointController

This class implements the Robust Control of joints position controller. The scheme of the control:
scheme of robust control
the dynamics model of robot: B(q)*q'' + n(q,q') = u, n(q,q') = C(q,q')*q'+ Fq'+ g(q)

the robustness w is computed as:
 w = ρ/z.vers() for |z.norm()| ≥ ε
 w = (ρ/ε)*z for |z.norm()| < ε
 
D is a 2*dof-by-dof matrix D= [O; I]
Q is the solution of Lyapunov equation: HT*Q + Q*H = -I where H is a 2*dof-by-2*dof matrix H = [O, I; -Kp, -Kd]
the inertia matrix B is constant;
the non linear compensation n(q,q') = Fv*q' + g(q) (viscous friction + gravity torques)

Wrapper class for C++ library ROBOOP.

Since:
1.0.4
Author:
Carmine Lia

Field Summary
 
Fields inherited from class javax.robotics.engine.JRoboOp
ID, Version
 
Fields inherited from interface javax.robotics.engine.controllers.JointController
WRONG_SIZE
 
Constructor Summary
RobustControl(Robot robot, DMatrix Kp, DMatrix Kd, Matrix B, double rho, double eps)
          Robust control position controller class constructor.
RobustControl(Robot robot, DMatrix Kp, DMatrix Kd, Matrix B, Matrix Q, double rho, double eps)
          Robust control position controller class constructor with a pre-computed solution of Lyapunov equation.
 
Method Summary
 short getID()
          Gets Controller class ID.
 DMatrix getKd()
          Gets the velocity error gain matrix.
 DMatrix getKp()
          Gets the position error gain matrix.
 short getRobotID()
          Gets Robot class ID linked to controller.
 short setKd(DMatrix Kd)
          Sets the velocity error gain matrix.
 short setKd(double[] Kd)
          Sets the velocity error gain matrix.
 short setKp(DMatrix Kp)
          Sets the position error gain matrix.
 short setKp(double[] Kp)
          Sets the position error gain matrix.
 double[] torqueCmd(double[]... qd)
          Sets the output torque for a desired joint position and velocity.
 RVector torqueCmd(RVector... qd)
          Sets the output torque for a desired joint position and velocity.
 
Methods inherited from class javax.robotics.engine.JRoboOp
acceleration, acceleration, createComputedTorqueMethod, createGravityCompensation, createImpedance, createPDGravityComp, createProportionalDerivative, createResolveRateAcceleration, createRobot, createRobot, createRobot, createRobot, createRobustControl, createSplinePath, createSplineQuaternion, dTdqi, getAvDof, getConverge, getDof, getError, getGravity, getPosErrorGCOMP, getPosErrorRRA, getQ, getQ, getQMax, getQMin, getQOffset, getQp, getQpp, getQuatErrorGCOMP, getQuatErrorRRA, impedanceControl, inertia, interpolate, interpolatePathQuat, interpolateQuat, invKine, invKine, jacobian, jacobian, jacobianDLSinv, jacobianDot, jacobianDot, kine, kine, setGravity, setKdCTM, setKdPD, setKdPDG, setKdRC, setKpCTM, setKpPD, setKpPDG, setKpRC, setQ, setQ, setQp, setQpp, torque, torque, torqueCmdCTM, torqueCmdGCOMP, torqueCmdGCOMP, torqueCmdPD, torqueCmdPDG, torqueCmdRC, torqueCmdRRA, torqueCmdRRA, torqueCoriolis, torqueCoulombFriction, torqueGravity, torqueViscousFriction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RobustControl

public RobustControl(Robot robot,
                     DMatrix Kp,
                     DMatrix Kd,
                     Matrix B,
                     double rho,
                     double eps)
Robust control position controller class constructor. The constructor computes the solution of Lyapunov equation by inner function Matrix.lyap(Matrix) but it could fail.

Parameters:
robot - Robot class.
Kp - diagonal matrix joint position error gain matrix.
Kd - diagonal matrix joint velocity error gain matrix.
B - a constant robot inertia matrix.
rho - the robustness gain.
eps - the chattering compensation.
See Also:
Matrix.lyap(Matrix)

RobustControl

public RobustControl(Robot robot,
                     DMatrix Kp,
                     DMatrix Kd,
                     Matrix B,
                     Matrix Q,
                     double rho,
                     double eps)
Robust control position controller class constructor with a pre-computed solution of Lyapunov equation.

Parameters:
robot - Robot class.
Kp - diagonal matrix joint position error gain matrix.
Kd - diagonal matrix joint velocity error gain matrix.
B - a constant robot inertia matrix.
Q - the solution of Lyapunov equation.
rho - the robustness gain.
eps - the chattering compensation.
See Also:
Matrix.lyap(Matrix)
Method Detail

getID

public final short getID()
Gets Controller class ID.

Specified by:
getID in interface Controller
Specified by:
getID in class JRoboOp
Returns:
ID

getRobotID

public final short getRobotID()
Description copied from interface: Controller
Gets Robot class ID linked to controller.

Specified by:
getRobotID in interface Controller
Returns:
ID

getKp

public final DMatrix getKp()
Description copied from interface: JointController
Gets the position error gain matrix.

Specified by:
getKp in interface JointController
Returns:
position error gain diagonal matrix

getKd

public final DMatrix getKd()
Description copied from interface: JointController
Gets the velocity error gain matrix.

Specified by:
getKd in interface JointController
Returns:
velocity error gain diagonal matrix

setKp

public short setKp(DMatrix Kp)
Description copied from interface: JointController
Sets the position error gain matrix.

Call C++ method

set_Kp(const DiagonalMatrixr &Kp)

Specified by:
setKp in interface JointController
Parameters:
Kp - position error gain diagonal matrix
Returns:
0 or WRONG_SIZE

setKp

public short setKp(double[] Kp)
Sets the position error gain matrix.

Parameters:
Kp - position error gain diagonal matrix
Returns:
0 or WRONG_SIZE

setKd

public short setKd(DMatrix Kd)
Description copied from interface: JointController
Sets the velocity error gain matrix.

Call C++ method

set_Kd(const DiagonalMatrixr &Kd)

Specified by:
setKd in interface JointController
Parameters:
Kd - velocity error gain diagonal matrix
Returns:
0 or WRONG_SIZE

setKd

public short setKd(double[] Kd)
Sets the velocity error gain matrix.

Parameters:
Kd - velocity error gain diagonal matrix
Returns:
0 or WRONG_SIZE

torqueCmd

public double[] torqueCmd(double[]... qd)
Sets the output torque for a desired joint position and velocity.

Specified by:
torqueCmd in interface JointController
Parameters:
qd - array of desired joints position, joints velocity and joints acceleration.
Returns:
torque.

torqueCmd

public RVector torqueCmd(RVector... qd)
Sets the output torque for a desired joint position and velocity.

Specified by:
torqueCmd in interface JointController
Parameters:
qd - array of desired joints position, joints velocity and joints acceleration.
Returns:
torque.