0% found this document useful (0 votes)
19 views2 pages

Synthesis of 4 Bar Mechanism

The document describes synthesizing a 4 bar mechanism. It requests student details like name and roll number. It then requests input parameters like positions of input and output links. It calculates the lengths of the 4 links (a, b, c, d) using an inverse kinematics algorithm with matrices. The results show the calculated lengths of the 4 links of the mechanism.

Uploaded by

Vinit Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views2 pages

Synthesis of 4 Bar Mechanism

The document describes synthesizing a 4 bar mechanism. It requests student details like name and roll number. It then requests input parameters like positions of input and output links. It calculates the lengths of the 4 links (a, b, c, d) using an inverse kinematics algorithm with matrices. The results show the calculated lengths of the 4 links of the mechanism.

Uploaded by

Vinit Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

import 

numpy as np
import math
from math import *
print("SAVITRIBAI PHULE PUNE UNIVERSITY")
print("\n SUBJECT: KINEMATICS OF MACHINERY")
print("\n SYNTHESIS OF 4 BAR MECHANISM")
print("\n ---------------------------------------------- STUDENT DETAILS----------------------------------------------")
n1=(input("ENTER YOUR NAME::"))
r1=int(input("ENTER YOUR ROLL NUMBER::"))
print("\n ---------------------------------------------INPUT PARAMETERS-----------------------------------")
i1 = float(input("FIRST POSITION OF INPUT LINK::"))
i2 = float(input("SECOND POSITION OF INPUT LINK::"))
i3 = float(input("THIRD POSITION OF INPUT LINK::"))
o1 = float(input("FIRST POSITION OF OUTPUT LINK::"))
o2 = float(input("SECOND POSITION OF OUTPUT LINK::"))
o3 = float(input("THIRD POSITION OF OUTPUT LINK::"))
d = float(input("ENTER LENGTH OF FIXED LINK::"))
i1 = math.radians(i1)
i2 = math.radians(i2)
i3 = math.radians(i3)
o1 = math.radians(o1)
o2 = math.radians(o2)
o3 = math.radians(o3)
A = np.array([[math.cos(o1), -math.cos(i1), 1], [math.cos(o2), - math.cos(i2), 1],
[math.cos(o3), -math.cos(i3), 1]])
print(A)
B = np.array([math.cos(i1 - o1), math.cos(i2 - o2), math.cos(i3 - o3)])
print(B)
m1 = np.linalg.inv(A)
m2 = np.dot(m1, B)
print("\n ---------------------------------------------Values of k1 k2 k3-----------------------------------")
print(f'Values of k1 k2 k3 {m2}')
a = d / m2[0] # first link length A
c = d / m2[1] # second link length B
k3 = m2[2]
b = (((a ** 2) + (c** 2) + (d ** 2)) - (2 * a * c * k3))** 0.5
a = round(abs(a), 2)
c = round(abs(c), 2)
b = round(abs(b), 2)
print("\n ---------------------------------------------RESULT---------- -------------------------")
print(f'Length Of The Links...\n1) link a={a} mm\n2)link b={b} mm\n3)li nk c={c} mm\n4)linkd={d} mm')

SAVITRIBAI PHULE PUNE UNIVERSITY

SUBJECT: KINEMATICS OF MACHINERY

SYNTHESIS OF 4 BAR MECHANISM

---------------------------------------------- STUDENT DETAILS----------------------------------------------


ENTER YOUR NAME::Ishan Somvanshi
ENTER YOUR ROLL NUMBER::64

---------------------------------------------INPUT PARAMETERS-----------------------------------
FIRST POSITION OF INPUT LINK::40
SECOND POSITION OF INPUT LINK::55
THIRD POSITION OF INPUT LINK::70
FIRST POSITION OF OUTPUT LINK::50
SECOND POSITION OF OUTPUT LINK::60
THIRD POSITION OF OUTPUT LINK::75
ENTER LENGTH OF FIXED LINK::30
[[ 0.64278761 -0.76604444 1. ]
[ 0.5 -0.57357644 1. ]
[ 0.25881905 -0.34202014 1. ]]
[0.98480775 0.9961947 0.9961947 ]

---------------------------------------------Values of k1 k2 k3-----------------------------------
Values of k1 k2 k3 [0.19741463 0.20562019 1.01542628]

---------------------------------------------RESULT---------- -------------------------
Length Of The Links...
1) link a=151.96 mm
2)link b=15.9 mm
3)li nk c=145.9 mm
4)linkd=30.0 mm
check 1m 3s completed at 11:30 PM

You might also like