资源简介

stewart平台的工作空间分析,球铰,工作空间详细画图

资源截图

代码片段和文件信息

% 名称:3-PSS/S球面并联机构工作空间
% 时间:2013年3月15日
tic
clear
pack
clc
%结构参数初始化
L1=200;
L2=100;
theta1=pi/4;%用弧度表示
theta2=pi/4;
eta1=-2*pi/3;
eta2=2*pi/3;
eta3=0;
etap1=-2*pi/3;
etap2=2*pi/3;
etap3=0;
thetamax=pi/3;
thetamin=0;
D=7;

hold on
grid on
xlabel(‘alpha‘)
ylabel(‘beta‘)
zlabel(‘gamma‘)
title(‘3-PSS/S工作空间‘)

theta=0:0.02:2*pi;
phi=0:0.02:pi;

ll=length(theta);
mm=length(phi);
for i=1:ll
    for j=1:mm
        for r=0:pi/2
            alpha=r*sin(phi(j))*cos(theta(i));
            beta=r*sin(phi(j))*sin(theta(i));
            gamma=r*cos(phi(j));
   
%求解分支一的约束条件
                ax1=sin(theta1)*cos(eta1);
                ay1=-sin(theta1)*sin(eta1);
                az1=-cos(theta1);

                gx1=(cos(gamma)*cos(beta)*sin(theta2)*cos(etap1)-(cos(gamma)*sin(beta)*sin(alpha)-sin(gamma)*cos(alpha))*sin(theta2)*sin(etap1)+(cos(gamma)*sin(beta)*cos(alpha)+sin(gamma)*sin(alpha))*cos(theta2))*L2;
                gy1=(sin(gamma)*cos(beta)*sin(theta2)*cos(etap1)-(sin(gamma)*sin(beta)*sin(alpha)+cos(gamma)*cos(alpha))*sin(theta2)*sin(etap1)+(sin(gamma)*sin(beta)*cos(alpha)-cos(gamma)*sin(alpha))*cos(theta2))*L2;
                gz1=(-sin(beta)*sin(theta2)*cos(etap1)-cos(beta)*sin(alpha)*sin(theta2)*sin(etap1)+cos(beta)*cos(alpha)*cos(theta2))*L2;
 
                U1=ax1^2+ay1^2+az1^2;
                V1=-2*(ax1*gx1+ay1*gy1+az1*gz1);
                W1=gx1^2+gy1^2+gz1^2-L1^2;
                
        % 1 反解存在的约束条件
            delta1=V1^2-4*U1*W1;
        % 2 杆长约束条件
            d1=(-V1+sqrt(delta1))/(2*U1);
        % 3 球面副转角约束条件
            l1=[gx1-ax1*d1 gy1-ay1*d1 gz1-az1*d1];
            n11=[-ax1 -ay1 -az1];
            n12=[cos(gamma)*sin(beta)*cos(alpha)+sin(gamma)*sin(alpha) sin(gamma)*sin(beta)*cos(alpha)-cos(gamma)*sin(alpha) cos(beta)*cos(alpha)];
            theta11=acos((l1*n11‘)/norm(l1));%acos(((gx1-ax1*dz1)*(-ax1)+(gy1-ay1*dz1)*(-ay1)+(gz1-az1*dz1)*(-az1))/L1);
            theta12=acos((l1*n12‘)/norm(l1));%acos(((gx1-ax1*dz1)*(cos(gamma)*sin(beta)*cos(alpha)+sin(gamma)*sin(alpha))+(gy1-ay1*dz1)*(sin(gamma)*sin(beta)*cos(alpha)-cos(gamma)*sin(alpha))+(gz1-az1*dz1)*cos(beta)*cos(alpha))/L1 );
        
%求解分支二的杆长约束条件
                ax2=sin(theta1)*cos(eta2);
                ay2=-sin(theta1)*sin(eta2);
                az2=-cos(theta1);
                
                gx2=(cos(gamma)*cos(beta)*sin(theta2)*cos(etap2)-(cos(gamma)*sin(beta)*sin(alpha)-sin(gamma)*cos(alpha))*sin(theta2)*sin(etap2)+(cos(gamma)*sin(beta)*cos(alpha)+sin(gamma)*sin(alpha))*cos(theta2))*L2;
                gy2=(sin(gamma)*cos(beta)*sin(theta2)*cos(etap2)-(sin(gamma)*sin(beta)*sin(alpha)+cos(gamma)*cos(alpha))*sin(theta2)*sin(etap2)+(sin(gamma)*sin(beta)*cos(alpha)-cos(gamma)*sin(alpha))*cos(theta2))*L2;
                gz2=(-sin(beta)*sin(theta2)*cos(etap2)-cos(beta)*sin(alpha)*sin(theta2)*sin(etap2)+cos(beta)*cos(alpha)*cos(theta2))*L2;

                U2=ax2^2+ay2^2+az2^2;
                V2=-2*(

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        6883  2013-03-26 21:09  sphereworkspace.m

评论

共有 条评论