image thumbnail

Input-Output Linearization of planar 3-link manipulator

by

 

Control of 3-link manipulator

plottingframes.m
theta=yout;
k=1;
for j=1:1:length(yout)
if (mod(j,11)==0)
    X2(k,1)=a(1)*cos(theta(j,1));
    Z2(k,1)=a(1)*sin(theta(j,1));
    
    X3(k,1)=a(1)*cos(theta(j,1))+a(2)*cos(theta(j,1)+theta(j,2));
    Z3(k,1)=a(1)*sin(theta(j,1))+a(2)*sin(theta(j,1)+theta(j,2));
    
    X4(k,1)=a(1)*cos(theta(j,1))+a(2)*cos(theta(j,1)+theta(j,2))+a(3)*cos(theta(j,1)+theta(j,2)+theta(j,3));
    Z4(k,1)=a(1)*sin(theta(j,1))+a(2)*sin(theta(j,1)+theta(j,2))+a(3)*sin(theta(j,1)+theta(j,2)+theta(j,3));
    k=k+1;
end
end

X1=zeros(length(X2),1);
Z1=zeros(length(X2),1);

for j=1:1:length(X1)
    figure(1);
%     pos1=[X1(j) X2(j) X3(j) X4(j)];
%     pos2=[Z1(j) Z2(j) Z3(j) Z4(j)];
plot([X1(j),X2(j)],[Z1(j),Z2(j)],'r-');
plot([X2(j),X3(j)],[Z2(j),Z3(j)],'g-');
plot([X3(j),X4(j)],[Z3(j),Z4(j)],'b-')

hold on; grid on;

end
axis equal
xlabel('x');
ylabel('z');
title('Motion of the manipulator');

Contact us