Skip to main content

Featured Post

Why I Wrote The Sheet Mechanic (And Why Calculations Aren’t Enough)

For engineers who already know the math—but still lose projects. For the last few years, I’ve been sharing technical guides here on Mechanical Design Handbook —how to size a motor, how to calculate fits, and (as you recently read) how to choose between timing belts and ball screws. But after 25 years in industrial automation, I realized something uncomfortable: Projects rarely fail because the math was wrong. They fail because: The client changed the scope three times in one week. A critical vendor lied about a shipping date (and no one verified it). The installation technician couldn’t fit a wrench into the gap we designed. University taught us the physics. It didn’t teach us the reality. That gap is why I wrote my new book, The Sheet Mechanic . This is not a textbook. It is a field manual for the messy, political, and chaotic space between the CAD model and the factory floor. It captures the systems I’ve used to survive industrial projec...
NEW RELEASE: Stop trying to be a Hero. Start being a Mechanic. Get "The Sheet Mechanic" on Amazon »
Disclosure: As an Amazon Associate, I earn from qualifying purchases.

5th-Degree Polynomial Cam Curve Derivation (Part 2)


Figure 1: Deriving the "secret sauce" of smooth motion control requires calculus.

In [Polynomial Cam Function (Introduction) - Part 1], we discussed the fundamental law of cam design: continuity of acceleration.

Advertisement

In this post, we are going to derive the exact equations for the Fifth-Degree Polynomial Cam Function. This is the mathematical foundation used in Motion Control Algorithms for high-end servo drives to ensure smooth, jerk-free movement.

The General Equations

We start with the general polynomial equation. To make the math handleable, we normalize the input angle as a ratio (x = θ / β), where x goes from 0 to 1.

s = C0 + C1x + C2x2 + C3x3 + C4x4 + C5x5

Where:
s = Displacement (mm)
x = Ratio of cam angle (θ / β)
β = Total angle in sector (rad)

To find Velocity (v) and Acceleration (a), we differentiate with respect to the angle.
(Note: The chain rule applies. v is in mm/rad. To convert to mm/s, multiply by angular velocity ω).

Velocity Equation (v = ds/dθ):

v = (1/β) · [ C1 + 2C2x + 3C3x2 + 4C4x3 + 5C5x4 ]

Acceleration Equation (a = dv/dθ):

a = (1/β2) · [ 2C2 + 6C3x + 12C4x2 + 20C5x3 ]

Applying Boundary Conditions

To solve for the 6 constants (C0 to C5), we need 6 known conditions. This is where Kinematics Analysis comes into play. We define what happens at the start (x=0) and end (x=1) of the motion.

Figure 2: Visualizing the 6 boundary conditions. Note the ability to define non-zero start/end velocities (v0, v1).
Advertisement

Start Conditions (x=0)

We start at zero displacement with zero acceleration. Crucially, we allow a non-zero velocity (v0).

  1. s = 0
  2. v = v0
  3. a = 0

End Conditions (x=1)

We end at the total lift height (hm) with a target end velocity (v1) and zero acceleration.

  1. s = hm
  2. v = v1
  3. a = 0

Solving for Constants

Step 1: Apply Start Conditions (x=0)
By substituting x=0 into the general equations, terms with x vanish immediately. This quickly solves the first three constants:

  • From Displacement: C0 = 0
  • From Acceleration: C2 = 0
  • From Velocity: v0 = C1 / β → C1 = βv0

Step 2: Apply End Conditions (x=1)
Now we have a system of 3 linear equations with 3 unknowns (C3, C4, C5). Solving this simultaneous system (via substitution or matrix methods handled by engineering software) yields the final coefficients:

The Solved Coefficients

C1 = βv0

C3 = 10h - β(6v0 + 4v1)

C4 = -15h + β(8v0 + 7v1)

C5 = 6h - β(3v0 + 3v1)

The Final Polynomial Equation

Therefore, the 5th-degree polynomial cam function that satisfies all boundary conditions is:

Figure 3: The final mathematical model for smooth cam motion control.
s = C1x + C3x3 + C4x4 + C5x5

With this equation derived, we can now plug in any start/end velocity we want. This is critical for designing "Flying Shears" or "Rotary Knives" where the tool must match the speed of the product line perfectly.

In the next post, we will analyze the characteristics of this curve and graph the results.

Continue to Part 3:
Polynomial Cam Function (Analysis & Graphs) - Part 3

Comments

Popular posts from this blog

NEMA 17 vs NEMA 23: Torque, Speed, and When to Upgrade

When building a CNC router or upgrading a 3D printer, the first question is usually: "Is NEMA 17 enough, or do I need NEMA 23?" Most beginners look at the Holding Torque and stop there. This is a mistake. A NEMA 23 motor isn't just "stronger"—it is physically different in ways that affect your speed, your driver choice, and your machine's ability to avoid missed steps. If you choose a NEMA 17 for a heavy gantry, it is far more likely to overheat or lose steps under cutting load. If you choose NEMA 23 for a fast 3D printer, it might actually run slower than the smaller motor. This guide explains the engineering limits of each frame size. Table of Contents 1. Physical Difference (The Frame Size) 2. Torque & Speed (The Inductance Trap) 3. Driver Compatibility 4. Selection Summary Advertisement 1. Physical Difference (The Frame Size) "NEMA" is just a standard for ...

Dowel Pins & Locating Pins: The Basics of Fixture Design

Dowel pins are precision cylindrical pins used for accurate part alignment in assemblies. They control position, not clamping force. This guide explains tolerances, fits, sizing rules, and design best practices. Figure 1: A typical fixture setup. Notice how dowel pins (silver) provide precise location, while bolts (not shown here) provide the clamping force. In the world of Precision Engineering , the difference between a high-quality product and a scrap part often comes down to microns. While bolts hold parts together, they are terrible at positioning them. This is where Dowel Pins and Locating Pins become essential components in industrial tooling . Advertisement What is a Dowel Pin? Dowel pins are precision-ground fasteners used to secure the relative position of two parts. They are typically machined to extremely tight tolerances (often within 0.0001 inches) and are available in materials like: Hardened Steel: For high-wea...

Flywheel Construction and Design: A Guide to Energy Storage Wheels

A flywheel is a mechanical device with a significant moment of inertia used as a kinetic energy storage reservoir. Flywheels are designed to resist changes in rotational speed, helping to steady a shaft's rotation when a fluctuating torque is applied (as seen in reciprocating engines) or when the load itself is intermittent (such as in piston pumps or punching presses). Advertisement Beyond smoothing rotation, flywheels are increasingly used to produce high-power pulses for industrial experiments. In these cases, drawing the required instantaneous power from an electrical network would create unacceptable spikes. Instead, a small motor slowly accelerates the flywheel between pulses, storing energy to be released in a single high-torque event. Figure 1: Modern flywheels are sophisticated energy storage systems for steadying rotation and delivering power pulses. 1. Classification: Balance Wheels vs. Flywheel Pulleys Flywheels are gene...