Modelling the 4 Bar Linkage
-
It is convenient to build the initial model in a spreadsheet. The results can be displayed as a graph:

-
First steps would be to start at the Axle (0,0) on the black base plate and calculate the red crank position:
| X1 = L1*COS(RADIANS(A0))+X0 |
| Y1 = L1*SIN(RADIANS(A0))+Y0 |
Where:
- (X0,Y0) is the Axle position
- A0 is the rotation angle (clockwise from the X axis)
- L1 is the Thigh length
- (X1,Y1) is the Crank position
-
Next is the find the intersection of two circles from the Crank and the Hip:

-
There are generally two solutions and the correct one needs to be selected. If the order of the parameters are consistent, then the selected solution will be consistent.
-
One method to solve this problem follows:

Source: https://math stackexchange.com/questions/256100/how-can-i-find-the-points-at-which-two-circles-intersect
-
Here are the Circle Intersection Calculations:
| CX1 = Crank X |
| CY1 = Crank Y |
| R1 = Thigh length (L2) |
| CX2 = Hip X |
| CY2 = Hip Y |
| R2 = Idler Length (L3) |
| D = SQRT((CX1-CX2)^2+(CY1-CY2)^2) |
| L = (R1^2-R2^2+D^2)/2/D |
| H = SQRT(R1^2-L^2) |
| IX1 = L/D*(CX2-CX1)+H/D*(CY2-CY1)+CX1 |
| IY1 = L/D*(CY2-CY1)-H/D*(CX2-CX1)+CY1 |
| IX2 = L/D*(CX2-CX1)-H/D*(CY2-CY1)+CX1 |
| IY2 = L/D*(CY2-CY1)+H/D*(CX2-CX1)+CY1 |
-
The two solutions are:
- (IX1,IY1)
- (IX2,IY2)
-
For the way I ordered my circles, the solution 2 (IX2,IY2) was chosen for the Knee position:
X2 = IX2
Y2 = IX2
-
Finally the Foot has to be extended (L4) from the Knee at 90 degrees toward the Floor:
| Thigh Angle: A = DEGREES(ATAN2(X2-X1,Y2-Y1)) | |
| Foot X: X3 = L4*COS(RADIANS(A+90))+X2 | |
| Foot Y: Y3 = L4*SIN(RADIANS(A+90))+Y2 |
Note: Spreadsheets use atan2(Cos,Sin) while C code uses atan2(Sin,Cos).
-
Having satisfied myself that I the equations are working, I can code the model in C code for optimisation.
AlanX
agp.cooper
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.