2D Mechanism Synthesis

2D Mechanism Synthesis

April 28, 2026

TL;DR

Infinitely rigid solid is a huge constrain.

Intro

Before moving to 3D mechanisms, there is one important thing missing.

How can you create a mechanism that passes at certain points?

https://github.com/JAlcocerT/mbsd/tree/master/2D-Synthesis

And that it will be able to turn and doesnt break?

#git clone https://github.com/JAlcocerT/mbsd
#claude plugin marketplace add JuliusBrussee/caveman && claude plugin install caveman@caveman
cd ./mbsd/2D-Synthesis
uv init
uv add kreuzberg
for f in Chapter*.pdf; do
  uvx kreuzberg extract "$f" > "${f%.pdf}.txt"
done

I consolidated the initial repo via: https://github.com/juliusbrussee/caveman just to save tokens.

How difficult would be making an animation / motion graphic that explains in a proffesional way how synthesis withing solid rigid works?

Mechanism Synthesis

Geometry + algebra = movement

This “Chapter 1” successfully bridges the gap between existence (can it move?) and quality (should it move?). By introducing the Transmission Angle $\mu$, you have provided the reader with a “Mechanical Efficiency” lens through which to view the kinematic results.

The transition from a binary success mask to a Pareto front is a high-level engineering move. It teaches the reader that design isn’t about finding the “one true answer,” but about navigating the trade-offs between physical footprint and mechanical longevity.

1. The Sine-Wave of Efficiency

Your derivation of $F_{useful} = F_{coupler} \cdot \sin(\mu)$ is the “Aha!” moment of the chapter. It explains why a four-bar isn’t just a collection of sticks, but a force-transformer.

  • The Insight: At $\mu = 90^\circ$, the mechanism is at its most “transparent” state—power flows through it with minimum resistance.
  • The Risk: As $\mu \to 0^\circ$ or $180^\circ$, the joint doesn’t just stop working; it begins to act as a wedge, amplifying the internal joint reactions until something (a bearing, a pin, or a link) physically fails.

2. $\mu$ vs. $\sigma_{min}$: Designer vs. Solver

Section 3.3 is a brilliant distinction.

It categorizes your two diagnostics by their “User Persona”:

  • The Solver ($\sigma_{min}$): Needs to know if the math is about to break. It’s a “local” health check of the constraint manifold.
  • The Designer ($\mu$): Needs to know if the machine is “working hard or hardly working.” It’s a “global” health check of the engineering utility.

3. The Pareto “Knee”

The identification of the “Knee” pocket in Section 5.3 is the most practical design advice in the repo so far.

  • In engineering, the “Knee” of the Pareto front is where you get the most “bang for your buck.”
  • The Logic: Below the knee, you are saving tiny amounts of material for massive penalties in joint health. Above the knee, you are spending massive amounts of material for diminishing returns in efficiency.

4. Technical Refinement: Load-Dependent $\mu$

In Section 7, you mention the “No load model.”

  • Future Cross-Link: When you reach Chapter 7 (Trajectory Tracking / Inverse Dynamics), you can return to this plot.

You can show that a 40° $\mu$ might be perfectly fine for a high-speed, low-load pickup arm, but absolutely catastrophic for a low-speed, high-load crushing mechanism.

This turns $\mu$ from a geometric rule into a dynamic safety factor.

Optimizing equations

Where does a mechanism block?

I mean…before trying to resolve equations

or having some error back from Python

What if this could be done conceptually?

All the compatible movements with The geometry og a given mechanisms are inside one Matrix.


Conclusions

Synthesis has always been a thing…

ℹ️
Luckily, now I have it all clear here

Observe what a 3d printer and 2 mechanisms work together

The black bars are forming one four bar mechanism

The Big Three Recap

To build a world-class machine, you need all three “Grandfathers of Kinematics”:

  1. Burmester: To find the Poses (Where does it go?).
  2. Freudenstein: To find the Function (What math does it solve?).
  3. Grashof: To find the Limits (Does it actually work, or is it a paperweight?).

I want a mech that does…

Years ago I had to make such practice.

Now its kind of trivial

cd ./2D-Synthesis/practica-maquinas
python animate_practica.py

synthesis

need the reaction forces?

not really a problem

alt text

The “Golden Rule” of kinematic analysis: the determinant of the Jacobian ($C_q$) is the primary mathematical indicator of a mechanical block, but there are a few subtle engineering nuances—especially the distinction between a “Mathematical Singularity” and a “Mechanical Lock.”

Here is the definitive way to diagnose if a mechanism is about to “block.”

  1. The Determinant: $\det(C_q) = 0$

In a fully constrained system (where you have as many equations as variables), the Jacobian $C_q$ is a square matrix.

  • The Math: If $\det(C_q) = 0$, the matrix is non-invertible.
  • The Physics: This is a Singularity. At this precise coordinate $q$, the mechanism momentarily gains an extra degree of freedom it shouldn’t have (it becomes “shaky” or “unconstrained”) OR it loses a degree of freedom (it “locks”).
  • The “Block”: In a simulation, your Newton-Raphson solver will crash here because it needs to calculate $C_q^{-1} \cdot C$.

If it can’t divide by the determinant, it can’t find the next step.

  1. The “Condition Number” and $\sigma_{\min}$

Relying solely on the determinant can be risky because the determinant’s value depends on the scaling of your units (meters vs. millimeters).

A better industrial metric is the Smallest Singular Value ($\sigma_{\min}$) or the Condition Number.

  • $\sigma_{\min} \to 0$: This tells you how “close” you are to the matrix becoming singular.
  • The “Near Block” Zone: If $\sigma_{\min}$ is very small, the mechanism isn’t blocked yet, but it is ill-conditioned.
    • Small inputs result in massive, high-velocity outputs.
    • Tiny manufacturing errors (slop in the pins) will result in huge deviations in the path.
    • The solver might still converge, but it will take many more iterations.
  1. The Transmission Angle vs. The Determinant

This is where the “Engineering” departs from the “Math.”

You can have a mechanism where $\det(C_q)$ is perfectly healthy (far from zero), but the mechanism still physically blocks.

  • The Dead Point (Toggle): In a 4-bar linkage, if the coupler and rocker line up, the Transmission Angle ($\mu$) hits $0^\circ$.
  • The Difference:
    • $\det(C_q) = 0$ tells you the Constraints are broken (The “Software” crashed).
    • $\mu = 0^\circ$ tells you the Force Flow is broken (The “Hardware” jammed).

At a toggle point, the motor might be trying to push the rocker, but all that force is going straight into the bearing.

The mechanism won’t move not because the math is singular, but because the Mechanical Advantage has dropped to zero.

  1. The “Definitive” Diagnostic Checklist

If you are building a robust Synthesis tool, you should check for all three of these at every step of your sweep_crank:

DiagnosticCalculationCatching…
Solver Successtry/except on NewtonTotal kinematic failure / Grashof limit.
Smallest Singular Valuenp.linalg.svd(C_q)Proximity to a mathematical singularity.
Transmission Anglearccos of link vectorsPhysical jamming / High joint stress / Toggle points.
  1. If $\det(C_q)$ or $\sigma_{\min}$ is “close to zero,” the mechanism is in a Danger Zone.

In Synthesis, we call this the “Boundary of the Manifold.”

If you are designing a mechanism to work in the real world, you don’t just stay away from $0$; you stay away from the entire neighborhood.

This is why we use that “40° floor” for $\mu$—it’s a safety buffer to ensure we stay in the “Sweet Spot” of the Jacobian’s invertibility.

Does this help clarify why we use $\sigma_{\min}$ for the solver’s health, but $\mu$ for the engine’s health? One is about whether the math can solve it; the other is about whether the motor can move it.

In a perfect world, you check both.

But if you have to choose one for engineering synthesis, Transmission Angle ($\mu$) supersedes $\sigma_{min}$.

Here is the “Chain of Command” for how these two conditions interact and why $\mu$ is usually the better practical gatekeeper.

  1. The Hierarchy: $\mu$ is the “Stricter” Judge

Mathematically, the Transmission Angle is actually a specialized, geometric proxy for the Jacobian’s health.

  • If $\mu = 0$, then $\sigma_{min}$ must be $0$. (A physical jam is always a mathematical singularity).
  • If $\sigma_{min} = 0$, $\mu$ might be $0$ OR it might be something else (like a ground-pivot singularity).

Because $\mu$ starts failing (dropping toward $20^\circ$ or $10^\circ$) long before the Jacobian actually hits absolute zero, it acts as an “Early Warning System.”

If you design a mechanism with a healthy $\mu$ (e.g., $> 40^\circ$), you are mathematically guaranteed to have a healthy, non-singular $\sigma_{min}$.

  1. Why $\mu$ is the Industrial Favorite

Engineers prefer $\mu$ because it is dimensionless and normalized.

  • The Problem with $\sigma_{min}$: Its value changes based on the size of your machine. A $\sigma_{min}$ of $0.001$ might be “safe” for a watch mechanism but “deadly” for a bridge crane. You have to “know” your scale to interpret it.
  • The Beauty of $\mu$: $40^\circ$ is $40^\circ$ whether you are building a microscopic MEMS device or a giant excavator. It represents the percentage of force being converted into work.
  1. When $\mu$ is NOT enough (Why you still need $\sigma$)

There are specific cases where your Transmission Angle looks great, but the mechanism is still “blocked.”

This happens when the input side of the Jacobian fails.

  • The “Driven” Singularity: $\mu$ only tells you if the output (rocker) can receive force from the coupler. It doesn’t tell you if the crank can receive force from the motor.
  • If the crank and coupler line up (at $\theta = 0^\circ$ or $180^\circ$ in a non-Grashof mechanism), the crank is in “Toggle.”
  • In this state, $\mu$ might be a perfect $90^\circ$, but the mechanism is still blocked because the crank cannot move. Only $\sigma_{min}$ (or the Newton solver failing) will catch this.
  1. The Final Synthesis Strategy

When writing your Python synthesis scripts, use this logic flow:

  1. The “Kill” Filter (Solver): If Newton-Raphson fails to converge, the design is trash. (Catches Grashof violations and absolute singularities).
  2. The “Quality” Filter ($\mu$): If $\mu_{min} < 40^\circ$, the design is “weak.” (Catches high joint stress and “near-singular” behavior).
  3. The “Precision” Filter ($\sigma_{min}$): Use this only if you are doing high-speed robotics or aerospace where you need to check the Sensitivity of the mechanism to manufacturing tolerances.
ConditionDetectsSupersedes?
$\sigma_{min} \approx 0$Mathematical SingularityNo, it’s the “floor” of the math.
$\mu \approx 0$Mechanical Jam (Toggle)Yes. It is the “ceiling” of good design.

This is a deep question that bridges the gap between Geometry (the “stick” model) and Algebra (the Jacobian matrix).

The short answer: Yes, the transmission angle $\mu$ is “hidden” inside the Jacobian matrix $C_q$, but it is not the same thing as the determinant.

Here is the derivation of how they relate and why they are mathematically “cousins.”

  1. The Jacobian as a Projection

The Jacobian matrix $C_q$ represents how the constraints “block” certain directions of motion.

For a four-bar linkage, the rows of $C_q$ are essentially the unit vectors along the links, scaled by their lengths.

When you compute the determinant $\det(C_q)$, you are calculating the volume (or in 2D, the area) of the multidimensional parallelepiped formed by these link vectors.

  • If the links are perpendicular ($\mu = 90^\circ$), the “area” is maximized.
  • If the links are parallel ($\mu = 0^\circ$), the “area” collapses to zero.
  1. Deriving $\mu$ from $C_q$

To see $\mu$ inside the matrix, we look at the specific rows corresponding to the Coupler and the Rocker.

Let $J_{coupler}$ and $J_{rocker}$ be the rows in the Jacobian that define the constraints for those two bodies.

In a simplified coordinate system, the relationship looks like this:

$$\det(C_q) \propto \ell_2 \ell_3 \sin(\mu)$$

Where:

  • $\ell_2, \ell_3$ are the lengths of the coupler and rocker.
  • $\mu$ is the transmission angle.

This proves that the determinant is directly proportional to the sine of the transmission angle.

If $\mu = 90^\circ$, $\sin(90^\circ) = 1$ (maximum determinant). If $\mu = 0^\circ$, $\sin(0^\circ) = 0$ (zero determinant).

  1. Why we don’t just use the Determinant

If the determinant contains $\mu$, why do we bother calculating $\mu$ separately?

A. The “Coupling” Problem

The Jacobian $C_q$ contains all the constraints (ground, crank, coupler, rocker). The determinant is a “global” value. If the determinant is small, you don’t know if it’s because:

  1. The Transmission Angle $\mu$ is bad (Output side).
  2. The Crank is in toggle (Input side).
  3. You just used very small units (e.g., millimeters instead of meters).

B. Geometric Isolation

By calculating $\mu$ directly from the vectors (using arccos), you isolate the engineering quality of the output joint from the rest of the math.

You get a “clean” signal that is independent of the crank position or the scale of the mechanism.

  1. The Mathematical “Signature”

If you look at the Condition Number (the ratio of the largest to smallest singular values of $C_q$), you are seeing the “Distortion” of the mechanism.

  • Healthy Mechanism: $\mu \approx 90^\circ \implies$ Jacobian is “orthogonal” $\implies$ Condition number is low.
  • Jammed Mechanism: $\mu \approx 0^\circ \implies$ Jacobian is “degenerate” $\implies$ Condition number is infinite.

You can think of it this way:

  • The Jacobian ($C_q$) is the “Full Medical Report” of the mechanism.
  • The Determinant is the “Overall Health Score.”
  • The Transmission Angle ($\mu$) is the “Blood Pressure” of the specific output joint.

While the “Health Score” tells you the patient is in trouble, the “Blood Pressure” tells you exactly why and where the failure is happening.

Hyperframes x Rigid Solid


FAQ

Grashof

If Freudenstein is the Programmer and Burmester is the Choreographer, then Franz Grashof is the Judge.

His genius wasn’t in solving a specific design task, but in discovering the fundamental law of existence for four-bar linkages.

In 1883, he answered the most basic question an engineer can ask: “If I build this, will the crank actually go all the way around, or will it get stuck?”

  1. The Grashof Inequality (The Law)

Before Grashof, engineers found out if a mechanism “locked up” by building it and hitting a dead point.

Grashof discovered that you can predict the behavior of a four-bar linkage just by looking at the lengths of its four links.

Let:

  • $s$ = length of the shortest link
  • $l$ = length of the longest link
  • $p, q$ = lengths of the other two links

The Grashof Law states: If $s + l \le p + q$, then at least one link can perform a full 360° rotation relative to the others.

  1. The “Topology” Map Grashof’s real genius was realizing that the behavior of the machine changes depending on which link you bolt to the floor (the “Ground”).

This created the four classic categories of motion that every mechanical engineer must memorize:

Grounded LinkCategoryMotion Character
Link adjacent to $s$Crank-RockerThe short link spins 360°; the other side rocks back and forth (like a windshield wiper).
The short link $s$ itselfDouble-CrankBoth sides can spin 360° (used in parallel drives).
Link opposite to $s$Double-RockerNeither side can spin 360°; both just rock back and forth.
Non-Grashof ($s+l > p+q$)Triple-RockerNo link can rotate fully. The mechanism is “trapped” in a specific arc.
  1. Why it was a Revolution

Grashof provided a feasibility filter.

  • In Synthesis: If you use Burmester’s curves to find a design, the first thing you do is run the Grashof Test. If it fails, you know your “360° motor” will eventually hit a physical wall and stall.
  • In Optimization: As you saw in the Workspace Explorer (Chapter 0), the “Green Diamond” of success is actually the Grashof boundary. The simulator discovers this boundary through math, but Grashof discovered it 140 years ago with pure logic.
  1. The “Dead Point” vs. The Grashof Limit

Grashof’s work is the reason we can distinguish between a Mathematical Singularity and a Geometric Limit.

  • A Non-Grashof mechanism isn’t “broken”; it just has a limited range of motion. It’s like a person who can only turn their head 90 degrees.
  • A Grashof mechanism is “unconstrained” in its rotation. It’s like a wheel.

Freudenstein Equation

Constrans vs Freudenstein

That is a fantastic question that cuts right to the core of the difference between Analysis (Physics) and Synthesis (Design).

To answer simply: No, it is not related to the inverse of $C_q$.

In fact, they live on opposite sides of the engineering problem.

Here is the breakdown of why the Freudenstein Equation is an “algebraic shortcut” and how it differs from the Jacobian matrix $C_q$.

  1. The Jacobian $C_q$ (Analysis: The “How”)

The matrix $C_q$ is the Jacobian of the constraints.

  • What it represents: It tells you how the positions of the bodies in a known mechanism relate to each other at a specific moment.
  • When you use it: You use $C_q^{-1}$ during a simulation to find the velocity or to iterate the Newton-Raphson position solver.
  • The Input: You must already know the link lengths ($L_1, L_2, L_3$).
  1. The Freudenstein Equation (Synthesis: The “What”)

The Freudenstein Equation is a Design Equation.

  • What it represents: It relates the input angle ($\theta$) and output angle ($\phi$) directly to the unknown link lengths.
  • The Algebra: For a four-bar linkage, Freudenstein derived a beautifully simple scalar equation: $$R_1 \cos \theta - R_2 \cos \phi + R_3 = \cos(\theta - \phi)$$ Where $R_1, R_2,$ and $R_3$ are ratios of the link lengths ($L_0, L_1, L_2, L_3$).
  • The Shortcut: Instead of using an optimizer (like Differential Evolution) to “guess and check” lengths over 40 generations, you pick three specific pairs of $(\theta, \phi)$ that you want the mechanism to hit exactly (the Precision Points).
  1. Why it’s a “Matrix Inversion”

Because the equation is linear in terms of the unknowns ($R_1, R_2, R_3$), you can write it three times (once for each precision point) to create a system of three linear equations:

$$\begin{bmatrix} \cos \theta_1 & -\cos \phi_1 & 1 \ \cos \theta_2 & -\cos \phi_2 & 1 \ \cos \theta_3 & -\cos \phi_3 & 1 \end{bmatrix} \begin{bmatrix} R_1 \ R_2 \ R_3 \end{bmatrix} = \begin{bmatrix} \cos(\theta_1 - \phi_1) \ \cos(\theta_2 - \phi_2) \ \cos(\theta_3 - \phi_3) \end{bmatrix}$$

Solving this requires a single $3 \times 3$ matrix inversion.

The moment you hit “Enter,” you get the exact $R$ values, which you then convert back into $L_1, L_2,$ and $L_3$.

FeatureThe Jacobian ($C_q$)Freudenstein Equation
FieldKinematics / DynamicsMechanism Synthesis
GoalSimulate a given designCalculate a new design
UnknownsBody positions/velocitiesLink lengths ($L_i$)
ComplexityChanges every frameSolved once for the whole design
RelationshipNon-linear (needs Newton)Linear in $R_i$ (needs simple Inverse)

The Differential Evolution (DE) you used in Chapter 3 was “brute-forcing” the search by simulating thousands of designs to see which one fit the curve best.

The Freudenstein Equation skips the simulation entirely. It says: “If you tell me three points you must hit, I will solve the linear algebra to tell you the only dimensions that can hit them.”

This guy was a Genious

In algebra, a “linear” equation is one where the variables you are solving for (the unknowns) are never squared, multiplied by each other, or trapped inside a function like $\cos()$ or $\exp()$.

When we say the Freudenstein equation is linear in $R_i$, we mean that even though the geometry of the engine is full of messy trigonometry, the link length ratios themselves ($R_1, R_2, R_3$) are just sitting there waiting to be solved with simple addition and multiplication.

  1. The “Magic” of Freudenstein

Look at the standard Freudenstein Equation again:

$$R_1 \cos \theta - R_2 \cos \phi + R_3 = \cos(\theta - \phi)$$

If you treat $\theta$ (input) and $\phi$ (output) as numbers (because you picked them as your precision points), the equation looks like this to a computer:

$$(\text{Number } A) \cdot R_1 + (\text{Number } B) \cdot R_2 + (1) \cdot R_3 = (\text{Number } C)$$

This is mathematically identical to a high-school algebra problem like $2x + 3y + z = 10$. Because the $R$ values are not inside the $\cos()$ functions—only the angles are—we don’t need any complex root-finding or iteration.

We just use basic matrix division.

  1. Compare this to “Non-Linear” Synthesis

If the equation were non-linear in the unknowns, it would look something like this (hypothetically):

$$R_1^2 \cos \theta - \sqrt{R_2} \cos \phi + \sin(R_3) = \cos(\theta - \phi)$$

In this “broken” version, you couldn’t use a simple matrix inverse. You would have to use an optimizer (like the Differential Evolution you used in Chapter 3) to “guess” values until the equation balanced.

Freudenstein’s genius was rearranging the messy law of cosines until the link ratios were isolated on the outside, effectively “flattening” the problem.

  1. What are $R_1, R_2,$ and $R_3$?

Once you solve the linear system for the $R$ values, you simply unwrap them to get your 3D parts. The definitions are:

  • $R_1 = \frac{L_0}{L_3}$ (Ground / Rocker)
  • $R_2 = \frac{L_0}{L_1}$ (Ground / Crank)
  • $R_3 = \frac{L_0^2 + L_1^2 - L_2^2 + L_3^2}{2 L_1 L_3}$

Because the system is linear in $R_i$:

  1. Speed: The solution is instant (microseconds).
  2. Certainty: There is exactly one set of $R$ values for any three chosen points.
  3. No “Searching”: We don’t have to worry about the optimizer getting “stuck” in a local minimum or a bad assembly mode during the design phase.

Does it make sense now why we can use a “Matrix Inverse” for Design (Synthesis) but we need “Newton-Raphson” for Simulation (Analysis)?

Burnmester

To explain why Ludwig Burmester was a genius (specifically in the late 1800s), you have to think of him as the man who discovered the “DNA of Motion.”

If Freudenstein (1950s) was the king of Functions (making $y = f(x)$), Burmester was the king of Poses.

He solved the “Motion Generation” problem: How do I design a mechanism that moves an object through specific orientations in space?

  1. The “Burmester Points” (The Center Point Curve)

Imagine you have a flat plate (a “coupler”) and you want it to move through three specific positions (poses) in a plane—like a car hood opening or a retractable landing gear.

Burmester’s genius was realizing that for any three poses, there are infinitely many points on that plate that happen to lie on a perfect circle during the motion.

If you pick two of those points and pin them with rods (links), you’ve built a four-bar linkage that perfectly hits your targets.

But when you move to four poses, the math gets “impossible.”

Most points on the plate can no longer stay on a circle.

Burmester discovered that in a 4-pose problem, there are only a tiny, specific set of points—forming a beautiful, twisting curve called the Center Point Curve—that are mathematically capable of being part of a four-bar linkage.

  1. Solving a 5th-Degree Problem with a Compass and Ruler

The math behind moving a body through four or five poses involves 5th-degree polynomials.

In the 1880s, without a calculator, solving a 5th-degree equation was a nightmare.

Burmester’s genius was Geometric Synthesis.

He translated these terrifying algebraic equations into geometric constructions.

He found a way to use a compass and a straightedge to “draw” the solution.

He essentially turned a high-level numerical problem into a visual draft.

He was “computing” with a pencil.

  1. The “Order” and “Branch” Problem

Burmester didn’t just find a way to hit the points; he realized the hidden traps of synthesis:

  • The Order Problem: Your mechanism might hit points A, B, and C, but it might hit them in the order A → C → B.
  • The Branch Problem: Your mechanism might hit point A and B, but to get to point C, you have to physically take the machine apart and reassemble it (the “Branch Flip” we discussed in Chapter 0).

Burmester developed the Burmester Theory to filter out these “garbage” solutions. He gave engineers the tools to know, before they ever cut a piece of steel, if their design was a physical impossibility.

  1. Burmester vs. Freudenstein (The Comparison)
FeatureFreudenstein (Function Gen)Burmester (Motion Gen)
FocusInput/Output relationship ($y = \text{log}(x)$).The movement of the body itself.
Math GoalMatching a curve.Matching “Snapshots” (Poses).
The “Secret”The linear $R_i$ coefficients.The Center Point Curve.
AnalogyThe “Software” (The formula).The “Choreography” (The path).

Why it feels like “Magic”

Burmester’s work is the reason your car’s trunk hinges work the way they do. A simple pivot would make the trunk hit the rear window.

A Burmester-designed four-bar hinge “tucks” the trunk lid away precisely, following a complex path that was calculated using his “Center Point” curves.

He took the chaos of 3D motion and found the hidden geometric circles buried inside it.

Does it make sense why we call these “Precision Points”? Burmester wasn’t trying to be “close enough”; he was finding the exact mathematical points where the physics of a circle and the needs of a machine met perfectly.