image thumbnail
from 4RRR Parallel Manipulator by Hrishi Shah
This file is obsolete. newer version available in description.

[]=newtry()
function []=newtry()
syms t1 t2 t3 l1a l2a l3a real
syms th1 th2 th3 th4 th5 th6 th7 th8 th9 th10 th11 th12 real
syms l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l11 l12 real
thetas = [th1 th2 th3;th4 th5 th6;th7 th8 th9;th10 th11 th12];
lengths = [l1a l2a l3a];
length= [l1 l2 l3; l4 l5 l6; l7 l8 l9; l10 l11 l12];
ts=[t1 t2 t3];
x = l1a*cos(t1)+l2a*cos(t1+t2)+l3a*cos(t1+t2+t3);
y = l1a*sin(t1)+l2a*sin(t1+t2)*l3a*sin(t1+t2+t3);
phi = t1+t2+t3;
% xd = -(l1*sin(t1) l2*sin(t2) l3*sin(t3))*[t1d t2d t3d]';
% yd = (l1*cos(t1) l2*cos(t2) l3*cos(t3))*[t1d t2d t3d]';

J = [-l1a*sin(t1) -l2a*sin(t2) -l3a*sin(t3);l1a*cos(t1) l2a*cos(t2) l3a*cos(t3);1 1 1];
J1=subs(J,[ts lengths],[thetas(1,:) length(1,:)]);
J2=subs(J,[ts lengths],[thetas(2,:) length(2,:)]);
J3=subs(J,[ts lengths],[thetas(3,:) length(3,:)]);
J4=subs(J,[ts lengths],[thetas(4,:) length(4,:)]);
JM = [J1 -J2 zeros(3) zeros(3);J1 zeros(3) -J3 zeros(3);J1 zeros(3) zeros(3) -J4];
A=[JM(:,2:3),JM(:,4:5),JM(:,8:12)]
B=[JM(:,1),JM(:,4),JM(:,7)]

Contact us