Prescribed motion

Prescribing motion

A linkage gives the motion its geometry allows. A cam gives the motion it was asked for, which sounds like an improvement and is a trade — the displacement becomes free and the derivatives stop being.

Every mechanism so far on this site produces the motion its geometry permits — a four-bar’s output is whatever four lengths make it. A four-bar’s output is whatever four lengths make it; wanting a different output means finding different lengths, and there may not be any.

A cam inverts that. State the wanted motion as a function of shaft angle, and the profile that produces it can be constructed directly. The displacement is now free.

A cycloidal cam at 60°A 20-unit rise over 120°, a dwell, a return and a dwell. The dashed curve is the pitch curve — where the roller's centre travels — and the solid one is the surface that has to be cut, which is the pitch curve offset inward by the roller radius along its own normal. The pressure angle at this instant is 25.5°: the angle between the follower's direction of travel and the normal to the surface, and the number that decides whether the follower jams in its guide rather than sliding.roller followerbase circle 30cycloidal, rise 20 over 120°, roller 8pressure angle 25.5°
Fig. 1 A cycloidal rise of 20 over 120°, a dwell, a return, a dwell. The dashed curve is the pitch curve — where the roller centre travels — and the solid one is the surface that has to be cut.

Constructing the profile

The construction is an inversion in the kinematic sense: instead of turning the cam under a fixed follower, hold the cam still and walk the follower around it.

At cam angle θ the follower is displaced by s(θ)s(\theta), so its centre sits at radius r0+s(θ)r_0 + s(\theta) in the direction θ. Plotting that for every θ gives the pitch curve.

The pitch curve is where the roller’s centre goes, not where the cam’s surface is. The surface is the pitch curve offset inward by the roller radius along its own normal — which is why a roller too large for the pitch curve’s local curvature produces a profile that cuts into itself and cannot be manufactured.

The pressure angle

The pressure angle is between the follower’s direction of travel and the normal to the cam surface at contact. It is the cam equivalent of a linkage’s transmission angle, with the convention reversed: it is a maximum to stay below rather than a minimum to stay above, and the usual limit is 30°.

Above that, a translating follower tends to jam in its guide instead of sliding — the side force on the follower stem exceeds what the guide can take without binding.

The pressure angle, and the only thing that controls it. The same follower motion on six different base circles. The pressure angle peaks at 38.1° on a base of 16 and 15.4° on a base of 60: the motion is identical and only the cam's size changed. The usual limit is 30°, above which a translating follower tends to jam in its guide rather than slide — which is why cams are so often much larger than the lift alone would suggest, and why "make the cam bigger" is the first answer to almost every cam problem.
Fig. 2 The same follower motion on six base circles. The pressure angle peaks at 41° on the smallest and 12° on the largest; nothing about the motion changed.
Two reasons a cam has to be big, and they are not the same reason. The same follower programme on four base circles, with a 20-unit roller. The peak pressure angle falls as the cam grows — that is the familiar constraint, and 30° is the usual limit. The minimum radius of curvature rises, which is a different constraint: below the roller's radius the profile cannot be cut at all. For an ordinary small roller the first always binds first and the second never decides anything, which is why it often goes unmentioned. With a roller this size the order reverses, and the first row is the point of the figure: a pressure angle of 21.2° that anyone would sign off, on a cam that cannot be manufactured. The smallest base radius that can be is 20.65.
Fig. 3 What the pressure angle is traded against: the base circle, which buys a gentler profile and costs size. The two reasons a cam has to be large are independent, and only one of them is the pressure angle.

There is essentially one knob, and it is the base radius. That is a genuinely useful thing to know: it means “make the cam bigger” is the first answer to almost every cam problem, and it explains why cams are so often much larger than the lift alone would suggest.

The trade is size, mass and surface speed. A bigger cam has more rotating inertia and its surface moves faster past the follower, which matters for wear.

What a follower is, and what it costs

The cam is half the mechanism. The follower is the other half, and its type changes the geometry of everything above.

A knife-edge follower is the textbook simplification: a point touching the profile. It makes the pitch curve and the cut surface the same object, which is convenient, and it concentrates the entire contact force at a point, which is why essentially nobody builds one.

A roller follower is the usual answer. The roller rotates, so it rolls rather than slides, and the contact stress is spread over a finite patch. The cost is the offset construction above, and a constraint that the roller radius must be smaller than the smallest concave curvature of the pitch curve — otherwise the offset profile self-intersects and the shape cannot be cut.

A flat-faced follower removes the pressure angle entirely: the contact normal is always perpendicular to the face, so there is no side force to jam the guide. That is a substantial advantage and it is paid for with a different constraint — the profile must be convex everywhere, or the flat face bridges a concavity and never touches the bottom of it.

Each of the three trades a geometric convenience against a geometric restriction, and none of them is about strength.

What the derivatives are differentiated from

The acceleration curves on this site are central differences taken on the displacement the programme actually produces, not evaluations of a formula.

That choice has a consequence worth stating: the acceleration in a figure is the acceleration of the profile in the same figure, so the two cannot drift apart. If the profile generator had a mistake, the acceleration plot would show it.

It also introduces a parameter, the differencing step, and a step chosen by eye is how people end up differentiating noise. A central difference has an error that falls as the square of the step until round-off takes over and it rises as the inverse square, so the site checks that halving the step improves the answer at every step size used — measured, the error falls from 3.7 × 10⁻⁵ to 9.1 × 10⁻⁸ as the step goes from 0.4° to 0.02°, quartering with each halving, which is the second-order convergence the method should have.

Where a closed form exists it is the second, independent route: the peak acceleration of each motion law is known analytically, and the measured and computed values agree to eight digits.

The programme must return

A cam turns continuously, so its displacement is periodic. A programme whose rises do not cancel its returns describes a follower that teleports once per revolution.

That is obvious stated plainly and easy to violate in code. The first version of this site’s cam library had no such check and its test programmes were rise-plus-dwell. Every acceleration measurement came back at 5.0 × 10⁴ per degree², identical for all four motion laws — because what was being measured was the step at the seam rather than anything about the law. Four assertions failed at once and all four were reporting the same artefact.

The library now refuses a programme that does not close.

What the choice costs

Specifying the displacement freely means the velocity, acceleration and jerk are consequences rather than choices, and they are where the difficulty lives.

A rise that starts abruptly has an infinite acceleration at its start. A rise that meets a dwell with acceleration still non-zero has an infinite jerk there. Neither shows up in a plot of displacement, which is why cam design is done on the derivative curves and why the ranking of motion laws is the reverse of what the displacement plots suggest.

The same rise, three ways. A 20-unit rise over 120°, then a dwell. Above, the displacement — all three do the same job and are hard to tell apart. Below, the acceleration, differentiated from those same curves. Constant acceleration peaks lowest at 5.556e-3 per degree² and arrives at the dwell with a step; cycloidal peaks highest at 8.727e-3 and arrives at zero. The smoothest law has the largest peak, which is the trade the whole of cam design turns on and which the displacement plot gives no hint of.
Fig. 4 Displacement above, acceleration below, for three laws doing the same job. The upper curves are nearly indistinguishable and the lower ones are not.
A simple harmonic cam at 120°A 20-unit rise over 120°, a dwell, a return and a dwell. The dashed curve is the pitch curve — where the roller's centre travels — and the solid one is the surface that has to be cut, which is the pitch curve offset inward by the roller radius along its own normal. The pressure angle at this instant is 0.0°: the angle between the follower's direction of travel and the normal to the surface, and the number that decides whether the follower jams in its guide rather than sliding.roller followerbase circle 30simple harmonic, rise 20 over 120°, roller 8pressure angle 0.0°
Fig. 5 The harmonic law cut as a profile rather than plotted as a curve. The acceleration step at the ends of the rise is not visible in the shape and is exactly what the cycloidal law was chosen to remove.

What is not modelled

Everything here is the geometry of an ideal roller on an ideal profile.

There is no follower mass, so no inertia force and no question of whether the follower stays in contact — which in a real high-speed cam is the dominant concern, answered by a spring strong enough to keep the follower down or by a groove that captures it. There is no friction, no lubrication, no Hertzian contact stress, and no wear.

The accelerations computed here are the ones the profile demands. Whether the mechanism can supply them is a dynamics question, and it is the question that decides whether a cam works.

Arriving at a dwell. The rise ends at 120° and the follower then stands still, so its acceleration must be zero from there on. Simple harmonic motion arrives at 6.854e-3 per degree² and drops to nothing instantly — an impulsive jerk, which in a real train is a shock the whole mechanism feels. Cycloidal motion arrives at 2.056e-4, 33 times smaller, because its acceleration is a sine that reaches zero exactly where the dwell begins. That is the only reason to prefer it, and it is enough. Both numbers are read off the curves drawn here, and the site's standing check on the pair — which reaches them by its own route — puts harmonic at 6.85e-3 and cycloidal at 2.06e-4.
Fig. 6 What choosing the law buys: an arrival at the dwell with essentially no acceleration, which a Geneva cannot offer.
A constant acceleration cam at 200°A 20-unit rise over 120°, a dwell, a return and a dwell. The dashed curve is the pitch curve — where the roller's centre travels — and the solid one is the surface that has to be cut, which is the pitch curve offset inward by the roller radius along its own normal. The pressure angle at this instant is 20.3°: the angle between the follower's direction of travel and the normal to the surface, and the number that decides whether the follower jams in its guide rather than sliding.roller followerbase circle 30constant acceleration, rise 20 over 120°, roller 8pressure angle 20.3°
Fig. 7 And the parabolic law, whose acceleration is constant in two pieces and discontinuous where they meet. All three profiles here are cut from the same base circle by the same follower; the only thing that differs is the programme they were given.

Cam or linkage

The two ways of producing a motion are worth comparing directly, because the choice is real and the trade is not the obvious one.

A linkage is made of pinned bars. It is cheap, it tolerates dirt and wear, its joints are easy to lubricate, and it can be built to close tolerances without special machinery. What it cannot do is produce an arbitrary motion: the output is whatever the geometry gives, and getting a wanted output means searching for lengths that produce it — a search that may fail.

A cam produces exactly the motion specified. What it costs is a surface that must be cut accurately, a follower that must be held in contact, a contact patch that wears, and a pressure angle to manage.

The historical pattern is that mechanisms moved from linkages to cams as manufacturing improved, because a cam’s difficulties are all manufacturing difficulties and a linkage’s are all design difficulties. The same logic that made Watt use a linkage rather than a slide in 1784 runs in reverse once accurate surfaces become cheap.

Why the cut profile is not the pitch curve

A distinction that causes real errors in practice, and which the figures here keep separate on purpose.

The pitch curve is the path of the follower roller’s centre. It is what the motion programme specifies directly: at each cam angle, the roller centre must be at the radius the displacement function gives. The pitch curve is the design.

The cut profile is the surface the cutter leaves — the pitch curve offset inward by the roller radius, along the local normal. That is what the machine tool follows and what the cam physically is.

Offsetting a curve is not a benign operation. If the pitch curve’s radius of curvature ever falls below the roller radius on a concave section, the offset curve self-intersects: the profile has a loop that no cutter can produce, and the cam undercuts. The result is a cam that does not follow its programme in that region, and the departure is not small.

That gives a hard design constraint with no equivalent in the motion programme itself: the minimum radius of curvature of the pitch curve must exceed the roller radius, with margin. Since curvature depends on acceleration, and acceleration depends on the motion law, the choice of law and the choice of roller size are coupled — a cycloidal law with its higher peak acceleration tightens the curvature limit that a harmonic law would have left alone.

Reducing the roller radius relieves it and raises the contact stress, since a smaller roller concentrates the same load on a smaller patch. Enlarging the base circle relieves both, and makes the cam bigger and heavier. There is no free direction, which is why cam design is iterative in a way that linkage design mostly is not.

Kinematically closed, and why cams so often are

A cam pushes the follower out. Something has to bring it back, and how that is arranged determines what the cam can do.

Force closure — a spring — is the common arrangement. It is simple, and it fails at speed: the spring has to supply the follower’s deceleration during the negative-acceleration part of the rise, and if the required force exceeds what the spring can give, the follower leaves the cam. That is follower float, and the reunion is an impact. Valve float in an engine is exactly this, and the speed at which it starts is set by the spring rate, the follower mass and the peak negative acceleration the motion law demands.

Form closure — a groove that captures the roller, or a conjugate pair of cams — removes the spring and the speed limit with it. The cost is that a groove must be wider than the roller by a working clearance, so the roller crosses the groove and strikes the far wall whenever the acceleration changes sign. A conjugate pair avoids the crossover and needs two accurately related cam surfaces.

So the closure choice is a direct trade between a speed limit and a manufacturing cost, and it is settled by the same number the motion law is chosen by: peak negative acceleration. That is the quantity that decides whether a spring can hold contact, and it is the quantity the comparison of the four laws is really about.

Desmodromic valve gear — two cams, one to open and one to close — is the form-closed answer in an engine, and its rarity says something about the cost: it removes the speed limit and adds a second cam surface, a second follower and an adjustment that has to be maintained.

What a cam is competing with

A cam is expensive: a machined profile, a follower, a return arrangement, and a shape that cannot be adjusted after it is cut. It is worth being clear about what buys that.

Against a linkage, the cam offers arbitrary motion. A four-bar produces the motion its four lengths produce, and the design problem is finding lengths whose motion is close enough to what is wanted. A cam produces exactly what is wanted, because the profile is derived from the specification rather than searched for. Where the requirement is a dwell, a specified acceleration profile, or an asymmetric rise and fall, a linkage can only approximate and the cam is exact.

Against a servo, the cam offers determinism and stiffness. A servo can produce any motion and change it in software, which is a decisive advantage in a machine that must handle different products. What it cannot easily do is guarantee the motion under load at high rate: the cam’s follower goes where the profile says because a steel surface is there, and a servo’s axis goes where the controller manages to put it. In high-speed packaging and printing the cam is still standard for exactly this reason.

Against a Geneva or ratchet, the cam offers control of the motion between positions rather than only of the positions. The Geneva’s acceleration profile is whatever the geometry gives, with a jerk discontinuity at entry that no care removes; an indexing cam has whatever profile was specified, including finite jerk.

So the cam sits where the motion is fixed, fast, loaded, and worth machining a part for. That is a narrower place than it once was and not a shrinking one, and the design question inside it is entirely which motion law to specify — because once the law is chosen, the profile follows from it without any further choices.

Where the cam’s exactness stops

A cam profile is derived from a motion programme, so the follower does what was specified — exactly, in the model. Three departures matter in practice, and they are worth naming because they are what separates a cam design from a cam.

Manufacturing. The profile is cut at finite resolution, and the surface left by a milling cutter is a series of scallops rather than the intended curve. Since acceleration is the second derivative of position, small profile errors become large acceleration errors: a departure of a few micrometres at a few-degree wavelength produces an acceleration ripple comparable with the design values. Grinding and fine-pitch cutting exist for this reason alone.

Follower compliance. The follower train has stiffness and mass, so it has a natural frequency, and the cam excites it. If the excitation contains energy near that frequency the follower does not track the profile at all — it rings. That is why the choice of motion law matters more at speed than the peak accelerations suggest: a law with a jerk discontinuity contains high-frequency energy that a smooth law does not, and the follower’s own dynamics decide whether it matters.

Contact deformation. Under load the roller and the cam flatten against each other, so the follower centre sits slightly closer than the geometry says, by an amount that varies with load through the cycle.

All three are dynamics, none of them is computed here, and each one is the reason a cam design that is exact on paper needs a prototype. The geometry is necessary and not sufficient, which is the standing limit of every figure on this site and worth restating on the subject where the promise of exactness is loudest.

The dwell’s own curve

One part of a cam programme has a property the rest does not, and it is worth naming because two other mechanisms on this site turn out to depend on the same thing.

A dwell is a stretch on which the follower does not move, so the profile there is a stretch of constant radius: an arc of a circle about the cam’s own axis. That is not a coincidence of the construction — a rotation about a point carries a curve into itself if and only if the curve is an arc about that point, so nothing else could produce a dwell that is exact rather than nearly exact.

The trade the rung names is worth stating in its sharpest form, because it decides between the two families of mechanism. A linkage’s displacement is a consequence and its derivatives are smooth; a cam’s displacement is a choice and its derivatives are whatever the choice implies. A four-bar cannot be asked for an arbitrary output curve, and everything it does produce is analytic — no jumps in any derivative, ever, because the output is an algebraic function of the input. A cam can be asked for anything, and the price is that the derivatives are now the designer’s responsibility: a displacement programme that looks perfectly reasonable can have an infinite jerk in it, and nothing in the profile’s appearance says so. So the choice between the two is not how much motion freedom is wanted; it is who is responsible for the derivatives. A linkage takes that responsibility and pays for it by limiting what it can do; a cam hands it over, and every essay in this field about motion laws is about discharging it.

What this makes readable

Essays that name this one as a prerequisite.

About the same objects

Not linked from either essay — found by the objects both name.

What links here

The 8 of 18 essays linking to this one that name the most of the same objects.

The objects this essay names

Each one links to every other essay that touches it.

AccelerationBase circleCamDwellFollowerthe Geneva mechanismJerkMotion lawPitchPitch curvePressure angle