Fourbar Linkage Coupler Path

조회 수: 14 (최근 30일)
Charitha Heshan
Charitha Heshan 2018년 9월 19일
댓글: Kerith Lumiares 2022년 8월 25일
hey guys im writing to a code to demonstrate NON Grashof four bar triple rocker to plot the coupler curve of point P with respect to the global reference frame XY & the transmission angles vs input angles.Im not very good at matlab so if you could point out what i should understand that will be very helpful.
if true
%code
% // Note and symbols
% // R2 Input link // R1 ground link // R3 coupler link // R4 rocker
% // P coupler point // beta the coupler angle(Degrees)
% // RA,RB,RP,RPA position vector of the point A, B, P, point P refer to point A
% // input data for 4 bar linkage %
fprintf('\n');
L1 = input('input ground = ');
L2 = input('input link 2 = ');
L3 = input('input link 3 = ');
L4 = input('input link 4 = ');
fprintf('\n');
% // define point p position.
fprintf('\n');
PA = input('input link PA = ');
qpd = input('input point P (degree)= ');
fprintf('\n');
% // transfer 4 bar dimension
R1 = L1; R2 = L2; R3 = L3; R4 = L4; %qpd = 56.0;
beta=qpd
%cta = 14;
alpha = cta
q2=arccos(((a.^2+d.^2-b.^2-c.^2)/(2*a*d))- (b*c)/(a*d)))
%Define K
K1 = d/a
K4 = d/b
K5 = (c^2 - d^2 - a^2 - b^2) / (2*a*b)
%
D(q2) = cos(q2) - K1 + K4*cos(q2) + K5
E(q2) = -2*sin(q2)
F(q2) = K1 + (K4-1)*cos(q2) + K5
%
q31(q2) = 2*atand (( -E + sqrt(E^2 -4*D*F))/2*D)
q32(q2) = 2*atand (( -E - sqrt(E^2 -4*D*F))/2*D)
% // coupler position (P)
RA(q2) = a*(cos(q2) + j*sin(q2));
RPA(q2) = p*(cos(q3+beta) + j*sin(q3+beta));
RP = RA + RPA;
RPx(q2) = a*cos(q2)+p*cos(q3(q2)+beta); % position x of link P
RPy(q2) = a*sin(q2)+p*sin(q3(q2)+beta); % position y of link P
% Transform to the Global Frame
Xp(q2) = RPx(q2)*cos(alpha)-RPy(q2)*sin(alpha)
Yp(q2) = RPx(q2)*sin(alpha)+RPy(q2)*cos(alpha)
// plot path A, B and P
subplot(3,2,1);
plot(Ax,Ay, Bx,By, Px,Py) % path for A,B and P
title('linkage path motion')
legend('point A','point B','point P')
ylabel('y-axis')
xlabel('x-axis')
axis([xmin*1.5 xmax*1.5 ymin ymax])
daspect([1 1 1]) % fix plot ratio 1:1
set(legend,'color','none');
grid on
end
If you need the relevant problem statement please let me know.
  댓글 수: 3
Alessandro Mingarelli
Alessandro Mingarelli 2021년 4월 14일
Perché non può? Ha chiesto solo se fosse giusto e qualche consiglio per migliorare il codice...
Kerith Lumiares
Kerith Lumiares 2022년 8월 25일
Can I have the relevant problem stament please. Thank you

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Automotive에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by