Four-bar linkage simulator: types, Grashof's condition and transmission angle
A four-bar linkage is four rigid links joined in a loop by four pin joints, with one link fixed as the ground. Turning one moving link makes the other two move in a way set entirely by the four lengths: the output may turn fully, rock back and forth, or the input may not be able to turn all the way round.
Which of these happens depends on the lengths and on which link is fixed. Grashof's condition tells you whether any link can turn fully; the experiment below shows what actually happens for the lengths you enter.
Try it
Shown at the initial values. Turn on JavaScript to change the values and play the motion.
Drag joint A to turn the crank, or drag point P to move the tracing point. With the keyboard, focus A or P and use the arrow keys (Shift for bigger steps).
Output angle and transmission angle against crank angle
- Output link angle
- Transmission angle
Values every 30 degrees
| Crank (deg) | Output (deg) | Transmission (deg) | Point x (mm) | Point y (mm) | Point speed per rad (mm/rad) |
|---|---|---|---|---|---|
| 0.0 | 62.72 | 26.38 | 64.63 | 67.77 | 50.96 |
| 30.0 | 55.27 | 32.86 | 74.86 | 79.85 | 24.48 |
| 60.0 | 64.94 | 46.57 | 64.33 | 91.52 | 37.18 |
| 90.0 | 80.26 | 61.37 | 43.82 | 97.27 | 43.77 |
| 120.0 | 96.25 | 74.29 | 20.68 | 94.18 | 45.27 |
| 150.0 | 110.46 | 83.20 | 0.38 | 83.04 | 43.10 |
| 180.0 | 121.19 | 86.42 | -13.53 | 67.08 | 37.67 |
| 210.0 | 127.36 | 83.20 | -19.46 | 50.49 | 29.79 |
| 240.0 | 128.45 | 74.29 | -17.31 | 37.42 | 22.29 |
| 270.0 | 123.86 | 61.37 | -7.76 | 31.69 | 24.88 |
| 300.0 | 111.77 | 46.57 | 8.85 | 36.60 | 44.45 |
| 330.0 | 89.30 | 32.86 | 34.48 | 52.11 | 68.15 |
| 360.0 | 62.72 | 26.38 | 64.63 | 67.77 | 50.96 |
Three things to try
- Fix the shortest link. Swap the crank and the ground: set
ato 100 anddto 40. The four lengths are the same, so s + l = 160 is still less than p + q = 180, but now the shortest link is the ground: both the crank and the output link turn fully (a double-crank). - Break Grashof's condition. Set the crank
ato 90. Now s + l = 200 is greater than p + q = 190: no link can turn fully. The crank only rocks between 23.6° and 336.4°, where the coupler and the output link line up. - Make the loop impossible. Set the coupler
bto 230. It is longer than the other three together (220), so the links cannot be joined at all, and the experiment says so instead of drawing anything.
How it works
The loop closes in two ways
With the crank at angle θ, the joint A is fixed: A = O2 + a(cos θ, sin θ). The joint B must be at distance b from A and at distance c from O4, so it is one of the two points where those two circles cross. The two points are the two ways to assemble the linkage ("open" and "crossed"); the linkage cannot switch between them while it moves, except where the two coincide.
f = |O4 − A|, along = (b² − c² + f²) / (2f), h = √(b² − along²)
The loop closes only while |b − c| ≤ f ≤ b + c. Where f reaches one of these bounds, h becomes zero, the coupler and the output link are in line, and the crank cannot go further: that is the limit you see in the second experiment.
Grashof's condition
Call the shortest length s, the longest l and the other two p and q. If s + l < p + q, the shortest link can turn fully relative to its neighbours. Which links turn fully against the ground then depends on where the shortest link is:
| Shortest link | Name | Crank (input) | Output link |
|---|---|---|---|
| input link | crank-rocker | turns fully | rocks |
| ground | double-crank | turns fully | turns fully |
| output link | rocker-crank | rocks | turns fully |
| coupler | double-rocker | rocks | rocks |
If s + l > p + q, no link turns fully. If s + l = p + q (for example a parallelogram) the linkage has a change point: it folds flat and can continue in two ways. The experiment computes whether the crank turns fully from the closure condition itself, not from this rule, and the automated tests check that the two always agree.
Transmission angle
The transmission angle μ is the angle between the coupler and the output link at B. Near 90° the coupler pushes the output link mostly sideways, which is what turns it; near 0° or 180° it pushes along the link, and a real linkage tends to jam. With the preset lengths (40, 120, 80, 100 mm) μ stays between 26.4° and 86.4° and the output link swings through 73.8°.
cos μ = (b² + c² − f²) / (2bc)
A common design guideline is to keep μ above about 40°. That is a rule of thumb about forces, which this page does not compute.
Four-bar linkage or slider-crank?
If the output must move in a straight line rather than swing, replace the output link with a straight guide: that is a slider-crank, the mechanism of piston engines.
What this does not tell you
- The calculation is planar rigid-body kinematics: positions, angles and their rates of change. It does not compute forces, torque, friction, inertia, deflection or strength, and it says nothing about whether a real linkage is safe.
- Links are lines with no thickness. In the drawing they can pass through each other; a real linkage may collide.
- "Speed per rad" in the table is the speed of the tracing point for a crank turning at 1 rad/s. For another constant crank speed ω, multiply by ω.
How the numbers on this page are produced
The pose is solved in closed form at 360 crank angles, with the assembly branch fixed for the whole motion; velocities and accelerations are exact derivatives, not finite differences. The results are checked against Freudenstein's equation and against a separate general-purpose solver in automated tests. Engine version 0.1.0. The CSV download states the model hash, the units and the assumptions with every table.
Background reading: R. L. Norton, Design of Machinery (position analysis of the four-bar, Grashof's condition, transmission angle); J. J. Uicker, G. R. Pennock and J. E. Shigley, Theory of Machines and Mechanisms.