Code covered by the BSD License  

Highlights from
Inverse Optimal Functions for Motoman HP-3 Tip Precision

image thumbnail

Inverse Optimal Functions for Motoman HP-3 Tip Precision

by

 

A population based optimization increases pointing precision for a planar robotic arm.

[NewPoint,New_J,Delta_X,Adjusted]=ArmijoStep_1(TestPointA,NewPoint1,...
function [NewPoint,New_J,Delta_X,Adjusted]=ArmijoStep_1(TestPointA,NewPoint1,...
    TestPointJ,TestPointGradJ,Options)
New_J=Options.J(NewPoint1);
ArmijoRequirement=Options.ArmijoK*(TestPointGradJ(:).')*(NewPoint1-TestPointA);
% (TestPointGradJ(:).')*(NewPoint1-TestPointA);
if ((New_J-TestPointJ)-ArmijoRequirement)>0
    % (New_J-TestPointJ) is how much the cost actually dropped
    % (TestPointGradJ(:).')*(NewPoint1-TestPointA) is how much it would
    % drop with constant gradient
    % It's discounted by a factor, Options.ArmijoK to allow for concave up
    % functions
    % If the function doesn't decrease by at least the discounted
    % prediction, then the quanity will be positive (-small-(-large))>0
    Adjusted=true;
    % decrease the step size and then exit
    for cece=1:Options.MaxDecay
    Delta_X0_now=NewPoint1-TestPointA;
    NewPoint1=(1-Options.StepDiscount)*Delta_X0_now+TestPointA;
    %norm(Delta_X0_now)
    ArmijoRequirement=(1-Options.StepDiscount)*ArmijoRequirement;
    New_J=Options.J(NewPoint1);
    %(New_J-TestPointJ);
    if ((New_J-TestPointJ)-ArmijoRequirement)<=0
        Delta_X=NewPoint1-TestPointA;
        NewPoint=NewPoint1;
        return;
    end
    end
    Delta_X=0*Delta_X0_now; 
    NewPoint=TestPointA;
    % point meets optimality conditions, but should return true values
    % the next run should identify the point as stationary
    return;
end
Adjusted=false;
NewPoint=NewPoint1;
Delta_X=NewPoint1-TestPointA;

Contact us