Design of Cams BRIEF ABSTRACT Cam provides an excellent application to motivate students to study the relationships of position, velocity, acceleration, and jerk. The problem is designed as a project accessible to students who are familiar with the derivatives and anti-derivatives. In essence, the problem asks students to determine the "lift" function that satisfies certain properties, and then to note properties of the function and reflect on their solution. GENERAL INFORMATION FileName: Cam Full title: Design of Cams Last Update: 5/29/96 Developer: Jerry Fine Department of Mechanical Engineering Rose-Hulman Institute of Technology Terre Haute, IN 47803 Phone: 812-877-8353. Email: fine@nextwork.rose-hulman.edu FAX: 812-877-3198 Contact: Aaron Klebanoff, Department of Mathematics, Rose-Hulman Institute of Technology, Terre Haute IN 47803 USA. Phone: 812-877-8151. Email: Aaron.Klebanoff@rose-hulman.edu. FAX: 812-877-3198. Support: The production of this material is supported by the National Science Foundation under Division of Undergraduate Education grant DUE-9352849: Development Site for Complex, Technology-Based Problems in Calculus with Applications in Science and Engineering and the Arvin Foundation of Columbus IN. STATEMENT OF PROBLEM Background Information -- Become a mechanical engineer on the spot! A cam is a device used to convert a constant velocity rotary motion into a reciprocating motion which has the kinematic features that we desire. (Reciprocating means "back and forth" or "up and down" in this case.) A common application of the cam is in the engine of a car. A rotating cam shaft is used to cause the valves in the engine to move up and down. Here is a two dimensional picture of a cam mounted on its shaft, and contacting its follower. The difference between the radius at the point of contact and the radius of the cam's base circle (shown in lighter color in the figure) is called the lift. It is the linear displacement of the follower in the case shown. The lift is an important feature of the design. In this case, a significant portion of the cycle the cam's surface and the base circle coincide. This is called a dwell. So, in the case shown, we have a dwell at zero lift. Here is a plot of the lift as a function of rotation angle q. The lift function is a displacement. Its first derivative can be used to compute the velocity, v, and the acceleration, a, of the follower. If w is the angular velocity in radians per second of the camshaft, then v = w y' and a = w2 y''. There is a third derivative quantity the "jerk" which is the time derivative of acceleration, j = w3 y'''. The jerk is the time rate of change of acceleration. The larger its value, the more likely the cam is to create undesirable vibrations in the engine. THE PRINCIPLE LAW of CAM DESIGN: The jerk must be finite. This means that the acceleration must be continuous. We want the cam to operate as smoothly as possible. We also want the acceleration to be as small as possible. Making the acceleration small minimizes the forces needed to hold the cam in place. There, you are now initiated into the wonderful world of cam design. Time to try for a problem. Your Problem A cam turns at 1200 rpm. As it turns we desire it to start at zero lift at zero degrees, rise to produce a lift of .1 cm at q = 90 deg, fall to zero lift at 180 degrees, and dwell for the rest of the cycle. Give a piecewise description of the function y(q) that models the lift. Plot this function of q, its first , second and third derivatives. Use these curves to identify and calculate maximum values for velocity, acceleration and jerk. After you solve the problem, reflect on your solution. Is there a better solution out there? I.e. is there a solution with smaller acceleration? KEYWORDS Cam, cam shaft, follower, position, velocity, acceleration, jerk. Principal Law of Cam Design. Curve fitting. TEACHER NOTES ISSUES RELATED TO THE PROBLEM First of all, the problem is a bit intimidating with all the mechanical engineering jargon. It might be possible to state it purely as a mathematics problem, for example: "Find a function of q which starting from zero rises to .1 at q=p/2, drops back to zero at q = p and has continuous first and second derivatives. The maximum absolute value of the second derivative should be as small as possible." When the problem has been solved, then the student could be shown the mechanical engineering motivation. This seems to rob the problem of its challenge in some ways. But, at heart, cam design is just curve fitting! See the reference. The problem is an effort to find applications of the calculus in the engine of an automobile. An effort has been made to write it in a way that makes it accessible to students who have never had a course in mechanical engineering. The problem ties in to the issues of continuity and differentiability of functions. As the principal law of cam design states, "The cam displacement function must have continuous first and second derivatives everywhere in its domain." The problem is posed in a rather open-ended way. There are an infinite number of functions which fit the requirements. We want to find a good one! Prerequisite The prerequisite is a knowledge of the calculus that centers around the relationship between position, velocity and acceleration. Time allotment - time management As mentioned above, this is a problem with a certain degree of open-endedness. It is actually more of a project. It could be worked on over a period of several hours outside of class. A computer algebra system would greatly facilitate the work. Expectations I would expect that most students could solve this problem successfully. Some might need hints. The teacher might give some hints, or a "naive" solution. For example, consider the following lift curve. What is wrong with it? Hint: think about the derivatives. naive[x_] := If[ 0 <= x <= Pi, .1 Sin[x], 0] Plot[ naive[x], {x,0,2 Pi} ] -Graphics- Future payoffs The search for the "best" solution leads directly into higher mathematics. Extensions A classic extension is the case where we have a rise, a high dwell, and then a drop to a low dwell. Cam design and curve fitting are really closely related. References and Sources: Robert L. Norton, Design of Machinery, MacGraw Hill, 1992. POSSIBLE SOLUTION(S) There is no unique solution. Two solutions will be given and briefly compared. We propose as a model a sixth degree polynomial. Why a sixth degree polynomial? Because polynomials have continuous first, second and third derivatives. And because a sixth degree polynomial has seven coefficients to be determined and we have 7 constraint equations - see below. Sixth degree polynomial -- proposed solution y1[q_] = Sum[ a[i] q^i, {i,0,6} ] 2 3 4 5 a[0] + q a[1] + q a[2] + q a[3] + q a[4] + q a[5] + 6 q a[6] Constraint equations e0 = y1[0] == 0; e1 = y1'[0] == 0; e2 = y1''[0] == 0; e3 = y1[Pi/2] == .1; e4 = y1''[Pi] == 0; e5 = y1'[Pi] == 0; e6 = y1[Pi] == 0; Solution for undetermined coefficients sol1 = Solve[ {e0, e1,e2,e3,e4,e5,e6}, {a[0],a[1],a[2],a[3],a[4],a[5],a[6]}] -16 {{a[0] -> 0., a[1] -> 1.49403 10 , a[3] -> 0.20641, a[4] -> -0.197107, a[5] -> 0.0627411, a[6] -> -0.00665703, a[2] -> 0.}} Substitution to create sixth degree polynomial solution y1[q_] = y1[q] /. sol1[[1]] //Chop 3 4 5 6 0.20641 q - 0.197107 q + 0.0627411 q - 0.00665703 q Plots of lift, velocity, acceleration and jerk p1d = Plot[ y1[q], {q,0, Pi}] -Graphics- p1v = Plot[ y1'[q], {q,0, Pi}] -Graphics- p1a = Plot[ y1''[q], {q,0, Pi}] -Graphics- Find the maximum acceleration, which occurs at 90 degrees into the cycle. a1max = Abs[y1''[Pi/2]] //N 0.243171 p1j = Plot[ y1'''[q], {q,0, Pi}] -Graphics- Two Cycloidal Functions -- another proposed solution Let's deal with the rise first. Start with the acceleration. It must begin at zero. The acceleration must then become positive. It would be nice for it to end up negative, (at q=p/2) since the follower needs to be starting its downward journey at this point. The sum of two sine functions might be a good starting point to model the acceleration. Acceleration should look something like this. Plot[ -Sin[q] + Sin[2 q], {q,0,Pi/2}] -Graphics- From this proposed acceleration, we can derive velocity by integrating once, and lift (position) by integrating a second time. The constants of integration that arise can be used to ensure that the necessary constraints are met. We generalize our model for acceleration by considering combinations of the sin (2q) and sin (q) functions. This introduces two coefficients, b(1) and b(2). And the integrations introduce two more coefficients b(3) and b(4). a21[q_] = -b[1] Sin[q] + b[2] Sin[2 q]; v21[q_] = Integrate[ a21[q], q] + b[3]; d21[q_] = Integrate[ v21[q],q] + b[4]; We now impose the constraints of the problem on the position and velocity function eq1 = d21[0] == 0; eq2 = v21[0] == 0; eq3 = v21[Pi/2] == 0; eq4 = d21[Pi/2] == .1; sol2 = Solve[{eq1,eq2,eq3,eq4}, {b[1],b[2],b[3],b[4]}] {{b[1] -> 0.465979, b[2] -> 0.465979, b[4] -> 0., b[3] -> -0.23299}} And to recover the position, velocity, and acceleration function which we plot d21[q_] = d21[q] /. sol2[[1]] //Chop; v21[q_] = v21[q] /. sol2[[1]] //Chop; a21[q_] = a21[q] /. sol2[[1]] //Chop; p1 = Plot[a21[q],{q,0,Pi/2}] -Graphics- Getting the other half of the function with a reflection To speed up the process of getting the second function, that is the function describing the drop, we can take advantage of the symmetry of the plots about the line q=p/2. We use a mirroring technique. a22[q_] = a21[Pi - q]; p2 = Plot[a22[q],{q,Pi/2,Pi}] -Graphics- Show[p1,p2, PlotRange -> All] -Graphics- v22[q_] = -v21[Pi - q]; (* Sign flip -- antisym *) d22[q_] = d21[Pi - q]; Set up global functions combining the two parts This is just to allow us to easily plot one function over the whole range of interest. d2[q_] := Which[ 0 <= q < Pi/2, d21[q], Pi/2 <= q <= Pi, d22[q], q > Pi, 0]; v2[q_] := Which[ 0 <= q < Pi/2, v21[q], Pi/2 <= q <= Pi, v22[q], q > Pi, 0]; a2[q_] := Which[ 0 <= q < Pi/2, a21[q], Pi/2 <= q <= Pi, a22[q], q > Pi, 0]; j2[q_] := Which[ 0 <= q < Pi/2, a21'[q], Pi/2 <= q <= Pi, a22'[q], q > Pi, 0]; Plots of the lift, velocity, accel and jerk Plot[ d2[q], {q,0,Pi}] -Graphics- Plot[v2[q], {q,0, Pi}] -Graphics- p2a = Plot[a2[q], {q,0,Pi}, PlotRange -> All] -Graphics- Find maximum acceleration -- compare with the other solution a2max = Abs[a2[N[Pi/2]]]//N 0.465979 a1max 0.243171 p2j = Plot[ j2[q], {q,0,Pi}] -Graphics- Comparison of the two solutions We start by looking at the acceleration curves which give us a feel for the force on the follower. The second solution has a larger maximum absolute value. Show[p1a,p2a] -Graphics- but the jerk of the polynomial solution (first solution) has a somewhat larger value. It's a hard call. Show[p1j,p2j] -Graphics- ISSUES IN SOLUTION The following issues in curve fitting: global or piecewise, basis functions, constraints, undetermined coefficients, etc. Here there are many possible strategies to solve the problem and there is not a single unique solution that designers would agree on. Trade offs would be made differently by different designers. This is a problem that would be difficult without a CAS.