Functions, Charts, and Tables
A cutting speed table, a spindle torque curve, a tensile test graph: in the workshop, numbers often come in the form of tables and diagrams, not formulas. In this chapter, we’ll learn how to read and create them. We’ll start with the Cartesian plane—which is the same coordinate system used in CNC—then we’ll look at the most commonly used functions (line, parabola, hyperbola, exponential), piecewise functions, reading technical diagrams, interpolation in tables, and the line that summarizes a series of measurements. Each topic includes examples taken from real-world applications.
7.1 The Cartesian plane and coordinates
To locate a point on a sheet of paper, all you need are two numbers. Draw two perpendicular lines that intersect at a point O, theorigin: the horizontal one is thex-axis (x-axis), and the vertical one is they-axis (y-axis). The same unit of measurement is used on both axes. A point P has coordinates (x; y): x is the distance from the y-axis; it is positive if the point is to the right and negative if it is to the left; y is the distance from the x-axis; it is positive if the point is above the x-axis and negative if it is below. When coordinates include a decimal point, they are separated by a semicolon: (2.5; −1.5).
The two axes divide the plane into four quadrants, numbered counterclockwise starting from the top right. The sign of the coordinates immediately indicates which quadrant a point is located in.
Coordinates on CNC Machines
The CNC system works exactly this way. On the milling machine, the workpiece plane is the X-Y plane: X is the longitudinal movement of the table, Y is the transverse movement, and the Z-axis (the spindle) extends beyond the plane. The origin is the work zero (W), which the programmer chooses wherever it is convenient: at a corner of the blank (in which case all dimensions are positive) or at the center of a symmetrical workpiece (in which case negative dimensions appear, which is normal). On a lathe, the coordinate plane is Z-X: Z is the spindle axis, positive as it moves away from the workpiece, and X is radial; the X-dimension is almost always specified relative to the diameter, as discussed in Chapter 26. The work zero is usually set on the face of the workpiece, so the Z-dimensions of the machined surface are negative.
On the drawing of a 120 × 80 mm plate, the holes are dimensioned starting from the lower-left corner: four holes at (15; 15), (105; 15), (15; 65), (105; 65), and a P hole at (85; 70). The programmer wants the W zero point at the center of the plate. What coordinates should he enter?
With the origin at the center, hole A is at (−45, −25) and hole P is at (25, 30). What is the distance between the two holes, and where is the midpoint?
7.2 The Concept of a Function
A function is a rule that, for every value of one quantity—the independent variable (usually x)—assigns one and only one value of another quantity—the dependent variable (y). It is written as y = f(x) and read as “y is a function of x.” The set of values that x can reasonably take is called the domain: a length cannot be negative, and the number of workpieces must be an integer.
This same function can be implemented in three ways, and all three are encountered in the workshop:
- using a formula such as n = 1000 · Vc / (π · D): this is the most accurate method;
- using a table, such as the recommended cutting speeds in the insert catalog: only a few values are listed; the others are calculated by interpolation (section 7.10);
- with a graph, such as an engine's torque curve: you can see at a glance how the value changes, but you can interpret it with the precision provided by the drawing.
On the graph, the “one and only one value” rule is verified as follows: each vertical line must intersect the curve at no more than one point. If a single value of x yielded two values of y, we would not know which one to use.
A round steel bar with a diameter of 50 mm (density 7.85 kg/dm³) is cut into pieces of different lengths. Express the mass as a function of length and create a table.
7.3 The Linear Function
The simplest and most commonly used function is the one whose graph is a straight line:
The slope does not depend on where the triangle is drawn: this is the property that distinguishes a straight line from all other curves. The slope is also related to the angle α that the line forms with the x-axis: m = tan α (Chapter 5), provided that the two scales are the same.
For a batch of flanges, machine setup costs €150, and each workpiece costs €4.20. Determine the cost of the batch based on the number of workpieces, and calculate the cost per workpiece for 50 and 500 workpieces.
The cone shown in Figure 7.2 extends from X30 to Z0 and from X42 to Z−48. Find the taper and the angle of the cone relative to the axis.
7.4 Lines through Two Points, Parallel Lines, Perpendicular Lines, and Intersections
Two points are sufficient to determine a line. The slope is calculated using the formula in Section 7.3, and then q is determined by requiring that the line pass through one of the two points.
Two non-parallel lines meet at a point, the point of intersection. Its coordinates satisfy both equations: set them up as a system (Chapter 1) by equating the two expressions for y.
The edge of a plate extends from point (10; 18) to point (70; 42). Find the equation of the edge and the equation of the path of the center of a Ø16 milling cutter that traces the edge from the outside (i.e., from the side with the larger y-coordinates).
From point B (52; 0), we want to draw a line perpendicular to the line y = 0.4x + 14. Where does it intersect the line, and how far is B from the line?
On a traditional lathe, a workpiece costs €40 for setup plus €9 per workpiece; on a CNC lathe, it costs €220 for setup (programming and tooling) plus €3 per workpiece. At what quantity does the CNC become cost-effective?
7.5 Direct and Inverse Proportionality in Graphs
In Chapter 1, we looked at the two proportional relationships as rules for calculation. They are immediately recognizable on the graph:
- The direct proportionality y = k · x is a straight line that passes through the origin (a linear function with q = 0). The ratio y/x is always k;
- The inverse proportionality relationship y = k / x is a branch of a hyperbola: it drops rapidly and then flattens out, without ever touching the axes. The product x · y is always k.
Be careful not to confuse “linear” with “proportional”: the straight line C = 150 + 4,20N In Example 7.4, the line is linear, but doubling the number of workpieces does not double the cost because of the y-intercept. There's a trick for recognizing the inverse: if you plot y depending on 1/x instead of x, the hyperbola becomes a line passing through the origin. It is said that the graph has been linearized, and a straight line is much easier to check by eye than a curve.
With Vc = 180 m/min, the formula n = 180,000 / (π · D) yields this table. Verify that the rotational speed and diameter are inversely proportional.
| D (mm) | n (rpm) | n · D | 1/D (1/mm) |
|---|---|---|---|
| 20 | 2864,8 | 57 296 | 0,0500 |
| 40 | 1432,4 | 57 296 | 0,0250 |
| 60 | 954,9 | 57 296 | 0,0167 |
| 90 | 636,6 | 57 296 | 0,0111 |
An operator records the following: 10 workpieces in 35 minutes, 20 workpieces in 50 minutes, 40 workpieces in 80 minutes. Is the time proportional to the number of workpieces?
7.6 The Parable
The quadratic function y = ax² + bx + c is represented by a parabola, a curve symmetric about a vertical line that passes through its lowest or highest point, the vertex. If a > 0, the parabola is concave upward and the vertex is a minimum; if a < 0, it is concave downward and the vertex is a maximum. The points where it intersects the x-axis are the solutions to the equation ax² + bx + c = 0, which we learned to solve in Chapter 1.
In mechanics, the parabola appears frequently: the distance traveled by a body that starts from rest with constant acceleration (s = ½ · a · t², Chapter 9), kinetic energy as a function of velocity (E = ½ · m · v²), the heat produced by a current flowing through a resistor (P = R · I², Chapter 44), the trajectory of a flying chip or a jet of coolant, and the shape of a reflector.
An axis of a machining center starts from a standstill with a constant acceleration of 3 m/s² until it reaches a rapid traverse speed of 30 m/min. How much time and distance are required to reach full speed?
We want to mark off a rectangular storage area against the warehouse wall, using 40 meters of barriers on the three open sides. How do we do this to maximize the area?
7.7 Exponentials, Logarithms, and Logarithmic Scales
In the exponential function, the variable is proportional to the exponent: y = y0 · bx. For each equal increment of x, y does not increase by a fixed amount (as in a straight line) but is multiplied by the same factor. If the factor is greater than 1, the growth accelerates; if it is less than 1, the decline slows down and approaches zero without ever reaching it. In engineering, the most commonly used base is the number e = 2.71828..., and the inverse function is the natural logarithm ln, which is located on the calculator next to log (the base-10 logarithm from Chapter 1).
A workpiece comes off the machining line at 180 °C in a workshop where the temperature is 20 °C. The temperature difference with the environment decreases with a time constant of τ = 25 min (approximate value; depends on mass and shape). What is its temperature after half an hour? How long must one wait for it to reach 30 °C?
Logarithmic Scales
When a quantity ranges from 1 to 1,000, on a standard scale the small values end up clustered around the origin. A logarithmic scale places equal distances not between the numbers themselves but between their logarithms: there is the same distance between 1 and 10 as there is between 10 and 100 and between 100 and 1,000 (each segment is called a decade). On this scale, zero does not exist, and the intermediate marks (2, 3, 4 … 9) are clustered toward the end of each decade. The speed ranges of old gear-driven lathes were also chosen this way: 50, 71, 100, 140, 200, 280… Each value is approximately 1.41 times the previous one, and on the logarithmic scale, the revolutions are equally spaced.
A graph with both axes on a logarithmic scale is called a bilogarithmic graph. Its most useful property is that any law of the form y = C · x^k (a power) becomes a straight line, because log y = log C + k · log x. The slope of the line, measured in decades, is the exponent k. This is the case for Taylor’s law on tool life (Chapter 24): Vc · Tn = C, that is, Vc = C · T−n, which on a bilogarithmic graph is a straight line with a slope of −n.
Using one insert, two endurance tests are performed: at 250 m/min, the cutting edge lasts 12 minutes; at 180 m/min, it lasts 45 minutes. Find n and C, and the expected endurance at 220 m/min.
7.8 Interval Functions
A single formula is not always sufficient for the entire domain. A piecewise function uses different formulas in different intervals of x. It is written by listing each formula along with its interval, and at the transition points, it must be clearly stated which formula applies. On the graph, you can see “edges” or discontinuities if the function is not continuous.
The most typical example in the workshop is the constant cutting speed on a lathe (Chapter 26): with G96, the controller calculates the RPM based on the diameter, but never exceeds the limit specified with G50 S... (on Siemens, LIMS=). The RPM function therefore has two segments:
Calculate the limit diameter and the revolutions at Ø80, Ø40, Ø25, and Ø10.
Other functions that are often encountered: tiered rates (transportation, energy), a motor’s torque diagram (Section 7.9), the stress-strain curve of materials (elastic and plastic regions), and the profile of a turned workpiece, which is a sequence of straight line segments and arcs.
7.9 Reading a Technical Diagram
Before reading a value from a chart, it's always a good idea to perform the same checks:
- What are the dimensions on each axis, and in what units (rpm or rad/s? kW or CV? N/mm² or MPa?)?;
- whether the scale is linear or logarithmic, and whether one axis starts at zero or at another value;
- If there are two vertical axes with different curves: each curve is read on its own axis, which is usually indicated by the same color;
- Under what conditions does the diagram apply: continuous or intermittent service, temperature, material, type of test?
The torque-power curve of a spindle
The spindles of CNC machines are driven by motors controlled by inverters (Chapter 45). Their performance curve typically has two regions. Up to the base speed, the motor can deliver constant torque, and spindle power increases in proportion to the spindle speed. Above the base speed, power remains constant and torque decreases hyperbolically, according to the formula in Chapter 2: M = 9549 · P / n (M in N·m, P in kW, n in rpm). These are two piecewise functions, one for torque and one for power.
The spindle shown in Figure 7.10 has a power rating of 11 kW, a base speed of 1,500 rpm, and a maximum speed of 6,000 rpm. Calculate the torque in the low-speed range, the available power at 800 rpm, and the torque at 3,000 rpm; then determine whether it is possible to rough-machine a Ø120 workpiece at a feed rate (Vc) of 200 m/min with a pass that requires 5 kW from the motor.
The Tensile Strength Diagram
In a tensile test (Chapter 19), a test specimen is pulled until it breaks, and the machine records the stress σ as a function of the percentage elongation ε. The stress-strain curve for structural steel has four regions: an initial elastic region, which is linear, where the test specimen returns to its original shape when the load is removed; the yield point, where the material elongates with almost no increase in load; the work-hardening region, where the stress rises again to the maximum value Rm; and the necking region, where the specimen tapers at a point and breaks. Here, we are interested in learning how to interpret the diagram; the meaning of the numbers is covered in Chapters 10 and 19.
From Figure 7.11 and the test data (which, in the elastic region, shows σ = 210 N/mm² with ε = 0.1%), determine the yield strength, tensile strength, elongation at break, and the slope of the elastic region.
7.10 Linear Interpolation in Tables
The technical tables provide values only for certain rows: feeds of 0.2 and 0.3, hardnesses of 200 and 250 HB, and so on. For a value that falls between two entries, linear interpolation is used: it is assumed that between two adjacent entries, the quantity varies along a straight line, and the line through two points from Section 7.4 is used. The error is small if the data points are densely spaced and the true curve is relatively flat in that section.
For our examples, we will use this table, which we created using average and rounded values: it is intended as a guide for a coated carbide insert on non-alloy steel and is not a substitute for the manufacturer’s catalog.
| Material Hardness | f = 0.1 mm/revolution | f = 0.2 mm/revolution | f = 0.3 mm/revolution | f = 0.4 mm/revolution |
|---|---|---|---|---|
| 150 HB | 360 | 305 | 265 | 235 |
| 200 HB | 320 | 270 | 235 | 210 |
| 250 HB | 280 | 235 | 205 | 180 |
| 300 HB | 240 | 200 | 175 | 155 |
Table 7.1 · Recommended cutting speeds in m/min (approximate values). For the 200 HB row, with f = 0.5 mm/rev, the speed is 190 m/min.
200 HB steel, feed rate of 0.25 mm/rev. What cutting speed does the table recommend?
Still at 200 HB, we want to machine at 250 m/min. What feed rate does the table specify?
Double Interpolation
When the value being sought depends on two variables, and both fall between the rows and columns of the table, interpolation is performed twice: first along the rows (using the first variable), then between the two results (using the second). The order does not affect the result.
7.11 Extrapolation and Its Risks
Extrapolation means using a table, a straight line, or a formula outside the range of data from which it was derived. The calculation is done using the same formula as for interpolation, but the result is much less reliable: within the range, the true curve is “constrained” by the data on both sides, but outside the range, no one knows how it behaves. In the workshop, things often change right at the edges: a tool that starts to wear out rapidly, a material that yields, an engine that goes beyond the constant-torque range, or a cutting insert used beyond the maximum allowable feed rate.
During a test series, the wear on the VB flank of the cutting edge is measured: 0.10 mm after 5 minutes, 0.14 mm after 10 minutes, and 0.18 mm after 15 minutes. The permissible limit is VB = 0.3 mm. An operator extrapolates using a straight line: when will the wear reach the limit?
7.12 Creating a graph from measured data
A well-designed chart is easy to understand without any explanation. There are just a few rules:
- On the horizontal axis, place the quantity that is varied or that changes on its own (time, diameter, revolutions); on the vertical axis, place the measured quantity;
- Each axis has a name (or symbol) and a unit, in the form “t (min)” or “ΔZ (µm)”: an axis without a unit is meaningless;
- Choose a scale so that the data fills almost the entire sheet and the divisions are easy to read: each centimeter represents 1, 2, or 5 units (or 10, 20, 50 ...; 2.5 is also fine), but never 3 or 7;
- The measured points are marked with a clearly visible symbol; then, a smooth curve is drawn by hand that passes through the points, without drawing a broken line from one point to another: measurements always have some margin of error;
- The vertical axis may not start at zero, but in that case it must be clearly stated, because a “truncated” graph makes large differences appear small.
For our examples, let’s use a real-world workshop measurement: the thermal drift of a machining center. The spindle is turned on at a constant speed, and every so often, a probe is used to measure how much the drill bit has shifted in the Z-axis due to the machine heating up.
| t (min) | 0 | 10 | 20 | 30 | 45 | 60 | 90 |
|---|---|---|---|---|---|---|---|
| ΔZ (µm) | 0 | 9 | 15 | 19 | 23 | 25 | 26 |
Table 7.2 · Thermal elongation in the Z direction measured during spindle heating (example data).
You want to draw Table 7.2 on a piece of graph paper that is 200 mm wide and 120 mm tall. What scales should you choose?
How much did the spindle stretch after 40 minutes?
7.13 The Regression Line
When the measured points lie almost on a straight line, we want to find the line that best represents them. Drawing it by eye with a ruler is fine for an estimate; the method that always gives the same result, no matter who uses it, is the least squares method. For each point, we measure the deviation—that is, the vertical distance between the point and the line; the best-fitting line is the one that minimizes the sum of the squares of the deviations. It’s called a regression line, and the calculation yields two formulas that can also be done by hand using a small table. Scientific calculators and spreadsheets provide this result with a single button (the “linear trend” function).
A compression spring is loaded, and the force is measured at various extensions. Find the regression line and the spring constant.
| x (mm) | F = y (N) | x · y | x² | straight | discard |
|---|---|---|---|---|---|
| 2 | 9 | 18 | 4 | 9,6 | −0,6 |
| 4 | 21 | 84 | 16 | 19,8 | 1,2 |
| 6 | 29 | 174 | 36 | 30,0 | −1,0 |
| 8 | 41 | 328 | 64 | 40,2 | 0,8 |
| 10 | 50 | 500 | 100 | 50,4 | −0,4 |
| Σ = 30 | 150 | 1104 | 220 | 0 |
7.14 The Formulas in This Chapter
| What | Formula or rule |
|---|---|
| Distance between two points | d = √((x2 − x1)² + (y2 − y1)²) |
| Midpoint | M = ((x1 + x2)/2; (y1 + y2)/2) |
| Linear Function | y = m · x + q · m = Δy / Δx |
| A straight line through two points | y = y1 + m · (x − x1) |
| Parallel and Perpendicular Lines | m1 = m2 · m1 · m2 = −1 |
| Point-to-Line Distance | d = |m · x0 − y0 + q| / √(1 + m²) |
| Direct and Inverse Proportionality | y = k · x (line through the origin) · y = k / x (hyperbola) |
| Vertex of the parabola | xV = −b / 2a |
| A Damping Exponential | y = y0 · e^(−t/τ) · t = τ · ln(y0/y) |
| Power on a double-logarithmic scale | y = C · xk → log y = log C + k · log x |
| Turns with G96 and G50 | n = min(nmax; 1000 · Vc / (π · D)) · Dlim = 1000 · Vc / (π · nmax) |
| Torque and Power | M = 9549 · P / n |
| Linear Interpolation | y = y1 + (x − x1) · (y2 − y1) / (x2 − x1) |
| Regression Line | m = (N·Σxy − Σx·Σy) / (N·Σx² − (Σx)²) · q = (Σy − m·Σx) / N |
7.15 Exercises
Try to solve them on your own, using a calculator and a sheet of graph paper, before looking at the solution.
Solution
A is in the second quadrant, B is in the fourth. Δx = 75, Δy = −40; d = √(5625 + 1600) = √7225 = 85 mm. Midpoint ((−30 + 45)/2; (15 − 25)/2) = (7.5; −5).
Solution
The radius changes from 15 to 25 mm: m = 10 / 40 = 0.25 (absolute value). α = arctan 0.25 = 14.04°. The taper ratio is 20/40 = 1 : 2.
Solution
m = (32 − 12) / 50 = 0.4; q = 12 (this is the point where x = 0). y = 0.4x + 12; for x = 35: y = 14 + 12 = 26.
Solution
0.75x + 10 = −0.5x + 60 → 1.25x = 50 → x = 40, y = 40. They are not perpendicular: 0.75 · (−0.5) = −0.375 ≠ −1. The perpendicular line to the first has m = −1/0.75 = −4/3 ≈ −1.333.
Solution
80 + 6N = 300 + 2N → 4N = 220 → N = 55 workpieces. With 40 workpieces: A costs 80 + 240 = 320 €, B costs 300 + 80 = 380 €: A is the better deal.
Solution
It is linear in T. Slope = 500 · 0.0000115 = 0.00575 mm/°C. At 35 °C: L = 500 · (1 + 0.0000115 · 15) = 500.086 mm, i.e., 0.086 mm longer.
Solution
a = −2 < 0: it has a maximum. xV = −12 / (2 · (−2)) = 3; yV = −18 + 36 − 10 = 8 → vertex (3; 8). Dividing by −2: x² − 6x + 5 = 0 → Δ = 36 − 20 = 16 → x = (6 ± 4)/2 → x = 1 and x = 5 (symmetric about 3).
Solution
s = ½ · 2 · 0.2² = 0.04 m = 40 mm. 15 m/min = 0.25 m/s → t = 0.25 / 2 = 0.125 s; s = ½ · 2 · 0.125² = 0.0156 m = 15.6 mm.
Solution
Dlim = 220,000 / (π · 3,500) = 20.0 mm. At Ø60: n = 220,000 / (π · 60) = 1,167 rpm. At Ø12 (below the limit): 3,500 rpm (the formula would give 5,836).
Solution
150 HB scale, halfway between 0.1 and 0.2: (360 + 305)/2 = 332.5. 200 HB scale: (320 + 270)/2 = 295. Between the lines, with 180 HB: 332.5 + (30/50) · (295 − 332.5) = 332.5 − 22.5 = 310 m/min.
Solution
20 µm lies between 19 µm (30 min) and 23 µm (45 min). Inverse interpolation: t = 30 + (20 − 19) · (45 − 30) / (23 − 19) = 30 + 15/4 = 33.75 min, or approximately 34 minutes.
Solution
Σx = 10, Σy = 25, Σxy = 3 + 10 + 24 + 36 = 73, Σx² = 30, N = 4. m = (4 · 73 − 10 · 25) / (4 · 30 − 100) = 42 / 20 = 2.1 mV/kN; q = (25 − 2.1 · 10) / 4 = 1 mV. y = 2.1x + 1; for 2.5 kN: 6.25 mV.
Solution
n = log(300/200) / log(40/8) = log 1.5 / log 5 = 0.17609 / 0.69897 = 0.252. C = 300 · 80.252 ≈ 507 (check: 200 · 400.252 ≈ 507).
Solution
ΔT0 = 100 °C; ΔT = 100 · e−20/15 = 100 · 0.2636 = 26.4 °C; T = 20 + 26.4 = 46.4 °C.
