机械原理matlab分析大作业3-28
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
机械原理
第一题:
求C点的位移、速度及加速度。
由封闭形ABCDEA与AEFA得:
L6+L4+L3 =L1+L2
L1’=L6+L4’
(1)位置分析
机构的封闭矢量方程式写成在两坐标上的投影表达式:由以上方程求出θ2 、θ3 、θ4 、L1’
1.主程序:
%输入已知数据
l2=60;
l3=35;
l4=75;
l5=50;
l6=40;
l7=70;
hd=pi/180;
du=180/pi;
omega1=10;
alpha1=0;
%调用子函数计算角位移,角速度及角加速度
for n1=1:66 %曲柄转角范围
theta1(n1)=(n1-1)*hd;
ll=[l2,l3,l4,l5,l6,l7];
[theta,omega,alpha]=six_bar(theta1(n1),omega1,ll);
l1(n1)=theta(1);
theta2(n1)=theta(2);
theta4(n1)=theta(3);
theta3(n1)=theta(4);
v1(n1)=omega(1);
omega2(n1)=omega(2);
omega3(n1)=omega(3);
omega4(n1)=omega(4);
a1(n1)=alpha(1);
alpha2(n1)=alpha(2);
alpha3(n1)=alpha(3);
alpha4(n1)=alpha(4);
e nd
%图像输出
figure(1);
n1=1:66;
t=(n1-1)*2*pi/360;
subplot(2,2,1);
%滑块F线位移L1图像输出
plot(theta1*du,l1,'k');
title('L1线位移图');
xlabel('角位移\theta_1/\circ')
ylabel('线位移/mm')
grid on;
hold on;
gtext('L1')
pause(1);
subplot(2,2,2);
%theta2、theta3、theta4角位移图像输出
plot(theta1*du,theta2*du,'g',theta1*du,theta3*du,'r',theta1*du,th eta4*du);
title('\theta_2、\theta_3、\theta_4角位移图');
xlabel('角位移\theta_1/\circ')
ylabel('角位移/\circ')
grid on;
hold on;
legend('\theta_2','\theta_3','\theta_4');
pause(1);
subplot(2,2,3);
%滑块F的速度图像输出
plot(theta1*du,v1,'k');
title('滑块F的速度图');
xlabel('角位移\theta_1/\circ')
ylabel('速度/mm\cdots^{-1}')
grid on;
hold on;
gtext('v1')
pause(1);
subplot(2,2,4);
%滑块F的加速度图像输出
plot(theta1*du,a1,'k');
title('滑块F的加速度图');
axis auto;
xlabel('角位移\theta_1/\circ')
ylabel('加速度/mm\cdots^{-2}')
grid on;
hold on;
gtext('a1');
pause(5);
figure(2);
subplot(1,2,1);
%omega2、omega3和omega4角位移图像输出
plot(theta1*du,omega2,'g',theta1*du,omega3,'r',theta1*du,omega4,' b');
title('\omega_2、\omega_3、\omega_4角速度图');
axis auto;
grid on;
hold on;
xlabel('角位移\theta_1/\circ')
ylabel('角速度/rad\cdots^{-1}')
box on;
legend('\omega_2','\omega_3','\omega_4');
pause(1);
subplot(1,2,2);
%alpha2、alpha3和alpha4角加速度图像输出
plot(theta1*du,alpha2,'g',theta1*du,alpha3,'r',theta1*du,alpha4,' b');
title('\alpha_2、\alpha_3、\alpha_4角加速度图');
axis auto;
grid on;
hold on;
xlabel('角位移\theta_1/\circ')
ylabel('角加速度/rad\cdots^{-2}')
box on;
legend('\alpha_2','\alpha_3','\alpha_4');
pause(5);
figure(3);
xC=-l6*cos(theta1+pi)+l5*cos(theta3);
yC=l6*sin(theta1+pi)+l5*sin(theta3);
% rC=sqrt(xC.*xC+yC.yC)
vCX=-omega1*l6*sin(theta1+pi)-omega3*l5.*sin(theta3);
vCY=omega1*l6*cos(theta1+pi)+omega3*l5.*cos(theta3);
% v3=sqrt(vCX.*vCX+vCY.*vCY);
subplot(2,2,1);
hold on;
grid on;
%C点x、y方向位移图像输出
plot(theta1*du,xC,'r',theta1*du,yC);
axis auto;
hold on;
grid on;
title('C点位移图');
xlabel('角位移\theta_1/\circ')