平面四连杆运动方程分析with matlab

 

以下是平面四连杆的运动学分析:


%%***************planner four links system**********%%
function fourlinks
clc;
clear all;
%%
%输入结构参数
global l1 l2 l3 l4 theta2
l1=0.4;l2=0.2;l3=0.4;l4=0.5;
w2=50;
pi=3.1415926;
x0=[0.79 4.9];
n=500;
%%
for i=1:n
    theta2=pi/2+(i-1)*0.02;
    x=fsolve(@f3_4,x0,optimset('fsolve'));   
    
    z34(i,:)=x;   %角位移存储矩阵
%%
%**********位置分析**************    
    x0=x;
    z2(i)=theta2; %曲柄角度存储矩阵
%%
%%**************速度分析*********
 c=l2*w2/(l3*l4*sin(x(2)-x(1)));
 w34(i,1)=c*l4*sin(theta2-x(2));
 w34(i,2)=c*l3*sin(-theta2+x(1));

 %%
 %*************加速度分析*********
 c1=l4*w34(i,2)^2*cos(x(2))+l2*w2^2*cos(theta2)...
     +l3*w34(i,1)^2*cos(x(1));
 c2=l4*w34(i,2)^2*sin(x(2))+l2*w2^2*sin(theta2)...
     +l3*w34(i,1)^2*sin(x(1));
 c3=l3*l4*sin(x(2)-x(1));
 a34(i,1)=l4*(c1*cos(x(2))+c2*sin(x(2)))/c3;
 a34(i,2)=-l3*(c1*cos(x(1))+c2*sin(x(1)))/c3;
 %%
end
%%
figure(1);
plot(z2,z34)
grid on;
legend('theta_3','theta_4');
xlabel('theta2','color','r','fontsize',8);
ylabel('theta3 theta4','color','y','fontsize',8);

figure(2)
plot(z2,w34)
grid on
legend('w_3','w_4');
xlabel('theta_2','color','b','fontsize',12,'linewidth',5);
ylabel('w_3_4','color','b','fontsize',12,'linewidth',7);

figure(3)
plot(z2,a34)
grid on
legend('a_3','a_4');
xlabel('theta_2','color','b','fontsize',12,'linewidth',5);
ylabel('a_3_4','color','b','fontsize',12,'linewidth',7);
end
%%
function y=f3_4(x)
clc;
global theta2
l1=0.4;
l2=0.2;
l3=0.4;
l4=0.5;
y(1)=l3*cos(x(1))+l4*cos(x(2))-l1+l2*cos(theta2);
y(2)=l3*sin(x(1))+l4*sin(x(2))+l2*sin(theta2);
end

 


运行结果:

 

 

 

 

 

 

 

 

  • 13
    点赞
  • 99
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

easy_R

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值