微信:HuangL1121
QQ号:1224848052
团队:MATLAB代做|MATLAB专业代做|python代做|matlab代写|FPGA代做|FPGA专业代做|MATLAB项目合作|FPGA项目合作|matlab代码|matlab算法源码|python代做|C代做|C++代做
地址:北京市-朝阳区-双柳北街18号院
当前位置:首页 > 技术资讯 > MATLAB代做|FPGA代做|simulink代做——逆运动学和ode45

MATLAB代做|FPGA代做|simulink代做——逆运动学和ode45

function [qdot]=Mydiff(t,x)
global lengths radiusx radiusy ell_angle L angles phidot
ell_an=ell_angle*pi/180;

J1 =[L(1)*cos(angles(1)), -lengths(1,1)*sin(x(2)), -lengths(1,2)*sin(x(3));
     L(1)*sin(angles(1)),  lengths(1,1)*cos(x(2)),  lengths(1,2)*cos(x(3));
                       0,                       0,                      1]; % J1
J2 =[L(2)*cos(angles(2)), -lengths(2,1)*sin(x(5)), -lengths(2,2)*sin(x(6));
     L(2)*sin(angles(2)),  lengths(2,1)*cos(x(5)),  lengths(2,2)*cos(x(6));
                       0,                       0,                      1]; % J2
J3 =[L(3)*cos(angles(3)), -lengths(3,1)*sin(x(8)), -lengths(3,2)*sin(x(9));
     L(3)*sin(angles(3)),  lengths(3,1)*cos(x(8)),  lengths(3,2)*cos(x(9));
                       0,                       0,                      1]; % J3
A=[J1,-J2,zeros(3,3);
   J1,zeros(3,3),-J3]; % building the constraint matrix as Xe=J1X1=J2X2=J3X3
A1=[A(:,2:3),A(:,5:6),A(:,8:9)]; %isolating the dependent parameters
B1=[A(:,1),A(:,4),A(:,7)]; % isolating the independent parameters

xdot=-radiusx*sin(t)*cos(ell_an)-radiusy*cos(t)*sin(ell_an); % trajectory information
ydot=-radiusx*sin(t)*sin(ell_an)+radiusy*cos(t)*cos(ell_an);

C=-pinv(A1)*B1; % Matrix relating dependent dof's to independent dof's
D=[1,0,0;
    C(1:2,:);
    0,1,0;
    C(3:4,:);
    0,0,1;
    C(5:6,:)]; % Matrix relating all dof's to independent dof's

Ja=J1*D(1:3,:); % Matrix relating Endeffector dof to independent dof
Ji=pinv(Ja);
NullSpace=eye(3)-Ji*Ja; % calculate NULL SPACE
qidot=Ji*[xdot;ydot;phidot]+NullSpace*[0.5-x(1);0;0];

qdot=D*qidot;


联系:highspeedlogic

QQ :1224848052

微信:HuangL1121

邮箱:1224848052@qq.com

网站:http://www.mat7lab.com/

网站:http://www.hslogic.com/

微信扫一扫:


上一篇:MATLAB代做|FPGA代做|simulink代做——基于桥面不平顺公路梁桥车桥耦合随机振动研究

版权所有: MATLAB代做|MATLAB专业代做|python代做|matlab代写|FPGA代做|FPGA专业代做|MATLAB项目合作|FPGA项目合作|matlab代码|matlab算法源码|python代做|C代做|C++代做 Copyright © 2021 All rights reserved.
微信:HuangL1121 QQ:1224848052
地址:北京市-朝阳区-双柳北街18号院

扫一扫,关注我们