Chapter 48

Actuators and Servo Drives

A sensor tells the machine what’s happening; an actuator is the part that makes things happen: it moves the table, closes the collet, opens the valve, and heats the oven. In this chapter, we’ll look at the different types of actuators and, above all, how they’re controlled: the difference between open-loop and closed-loop systems, a straightforward explanation of the PID controller, and the servo drive of a CNC axis with its three loops, the tracking error, and the Kv gain. Finally, we’ll size a real axis—the same one used in the milling machine from Chapter 40—and discuss safety and alarms.

48.1 Actuators and the drive train

An actuator is a device that receives a command and converts it into a physical action: a movement, a force, an opening, or the emission of heat. The command almost always arrives as a weak signal (a few volts, a few milliamps, a message on a fieldbus) that, on its own, could not move anything. Between the control unit and the actuator, there is therefore a drive: a device that draws power from the electrical grid, compressed air, or pressurized oil and regulates it according to the command. An electric servo drive regulates current, while a valve regulates air or oil.

ControlCNC or PLCDriveamplifiesActuatormotor, cylinderLoadtable, colletControlPowerMotionEnergy: electrical power, compressed air, oilSensor
Figure 48.1 · The drive chain. The controller sends a weak command; the drive amplifies it using power from the grid; the actuator produces the motion. The sensor (dashed line) closes the loop when: we’ll see this in Section 48.3.

Actuators are classified based on the type of energy they use:

  • rotary electric motors: DC motors, asynchronous motors with inverters, brushless motors, and stepper motors (Chapter 45); when combined with a screw, a belt, or a rack (Chapter 40), they also produce linear motion;
  • linear electric actuators: linear motors, which directly drive the carriage without a lead screw, and electromagnets (solenoids), which have travels of a few millimeters;
  • pneumatic systems: cylinders and compressed-air motors (Chapter 42); simple, fast, and economical, but air is compressible, and it is difficult to stop precisely halfway through the travel;
  • hydraulics: hydraulic cylinders and motors (Chapter 43); enormous forces in a small space, with high rigidity because oil is virtually incompressible;
  • piezoelectric materials: crystals or ceramics that stretch very slightly when a voltage is applied; their travels are measured in micrometers, but they generate high forces and have response times of milliseconds.
ActuatorForce or TorqueSpeedPositioning AccuracyCostTypical Uses
Servomotor + Recirculating Screwmedium-high (up to tens of kN)high (30–60 m/min)very high (micrometers)mid-to-highCNC axes, electric presses
Linear motormedium (up to a few kN continuous)very high (over 100 m/min)very high (less than a micrometer)highlasers, grinding, high-dynamic axes
Step-by-Steplowlow-mediumgood, as long as she doesn't lose her footinglow3D printers, small axes, dispensers
Pneumatic Cylinderlow to medium (a few kN at 6 bar)highlow: usually just the two limit switcheslowcollets, pushers, locks
Hydraulic cylindervery high (hundreds of kN)averagegood with a servo valvehighpresses, bending machines, clamping devices
Electromagnetlow (from a few N to a few hundred)very high (milliseconds)none: all or nothingvery lowsolenoid valves, brakes, locks
Piezoelectrichigh, but on micrometer-scale travelsvery highnanometershighmicro-positioning, high-speed valves

Guideline table: The categories overlap, and each manufacturer has products that fall outside these ranges.

Example 48.1 · How much force does a pneumatic cylinder exert?

A pneumatic cylinder has a bore of 50 mm and a piston rod of 20 mm, and is pressurized to 6 bar. What is the force it exerts during extension and retraction, neglecting friction? (The cylinder is discussed in Chapter 42.)

6 bar = 600,000 Pa; piston area: π · 0.025² = 1.963 · 10−3 m²
thrust: F = 600 000 · 1,963 · 10−3 = 1178 N
return, annular area: π · (0.025² − 0.010²) = 1.649 · 10−3 m² → F = 990 N
About 1,180 N in the forward stroke and 990 N in the return stroke: enough to lock the cylinder, but the cylinder moves from one limit switch to the other and cannot stop at any intermediate dimension
Example 48.2 · The travel of a piezoelectric actuator

A 20-mm-long "stack-type" piezoelectric actuator stretches, at maximum voltage, by 0.15% of its length (approximate value). How much does it move?

ΔL = 20 × 0.0015 = 0.03 mm = 30 µm
30 µm: not nearly enough to move a table, but perfect for adjusting the position of a tool by a few micrometers in a few thousandths of a second

48.2 Electromagnets and Solenoid Valves

The simplest actuator of all is theelectromagnet: a coil of copper wire wound around an iron core. When current flows through the coil, a magnetic field is generated in the iron (Chapter 44) that attracts a moving part, the core o still. When the current is turned off, a spring pulls the core back. The air gap between the stationary and moving parts is called air gap: That's where the power is concentrated.

xcoilspringFfixed yokemoving coreforce Fair gap xnearly closed core:large forcestart of travel: small force
Figure 48.2 · On the left, a moving-core electromagnet (cross-sectional diagram): the coil magnetizes the yoke; the core is attracted and closes the air gap x; the spring pulls it back. On the right, the qualitative trend of the force: small at the start of the travel, very large when the core is almost closed.
Force of an electromagnet (estimate)
F = B² · A2 · μ0
F force of attraction in N · B magnetic induction in the air gap in tesla (T) · A area of the facing surfaces in m² · μ0 vacuum permeability, 4π · 10−7 H/m ≈ 1,257 · 10−6 H/m. This formula applies to small air gaps; B It increases with current and decreases significantly when the air gap widens; this is why the force drops sharply at the start of the travel.
Example 48.3 · The Force of an Electromagnet

The faces of the core and the fixed pole have an area of 4 cm². When the core is nearly closed, the magnetic flux density in the air gap is 1 T. What is the resulting force? And what if the wider air gap reduces B to 0.5 T?

A = 4 cm² = 4 × 10−4 m²
F = 1² · 4 · 10−4 / (2 · 1,257 · 10−6) = 4 · 10−4 / 2,513 · 10−6 = 159 N
with B = 0,5 T: F = 0,25 · 4 · 10−4 / 2,513 · 10−6 = 39,8 N
159 N with a closed core, just 40 N when the induction is halved: the force is proportional to the square of B

The solenoid valve: an electromagnet that controls a fluid

In pneumatics and hydraulics, the electromagnet acts as the “motor” for solenoid valves (Chapters 42 and 43): the core moves the valve spool or spool, and the valve directs the air or oil to one chamber or the other of the cylinder. The PLC controls the coil (usually 24 V DC), the coil controls the valve, and the valve controls the cylinder: this is a drive chain like the one shown in Figure 48.1, where a small electrical signal controls a force of thousands of newtons.

  • Monostable: one coil and one spring; when de-energized, the valve always returns to the same position. This is the right choice when, in the absence of power, the machine must move to a safe position.
  • Bistable: two coils, no spring; a pulse to one coil moves the valve, which remains in that position until a pulse is applied to the other coil. When the power is off, the cylinder remains in its current position.
  • Proportional solenoid valve: The current in the coil is not simply on or off but is modulated, causing the valve to open more or less. This is the first step toward the servo valves described in section 48.12.
⚡
The diode on the solenoid. A solenoid stores energy in its magnetic field. When the PLC suddenly turns it off, that energy seeks a path and produces a voltage spike of hundreds of volts, which damages the transistor outputs. That is why DC solenoids have a bypass diode (or a varistor) connected in parallel, often already built into the connector with the LED.

Electromagnets are also found in motor brakes, electromagnetic clutches, and car door locks: the door remains locked as long as the spindle is turning (paragraph 48.13).

48.3 Open loop and closed loop

There are two ways to control an actuator. In the open-loop control The controller sends the command and trusts that it will be executed; it does not verify the result. In the closed-loop control (or in feedback) A sensor measures the result; the control system compares it with the desired value and adjusts the command until the difference is eliminated.

Everyday examples help. A timer-controlled toaster is an open-loop system: it heats for two minutes and doesn’t know whether the bread is golden brown or burnt. An oven with a thermostat is a closed-loop system: it measures the temperature and turns the heating element on or off. Driving a car is a closed-loop system in which the eyes act as the sensor and the brain acts as the controller: if the car drifts toward the edge of the road, the steering is corrected. Driving with your eyes closed, counting the seconds, is an open-loop system.

reference r+−andRegulatoruActuatorProcessOutput ydisturbance dCN, PLC, thermostatmotor, heating elementtable, ovenSensorFeedback: the measurement of y is fed back
Figure 48.3 · The block diagram of the closed-loop system. The summing node calculates the error e = r − y; the controller determines the control signal u; the actuator acts on the process; the sensor measures the output y and feeds it back. The disturbance d is anything that shifts the output unintentionally.

Here are the names of the blocks, which apply to any closed-loop system, from a thermostat to the axis of a milling machine:

  • reference (or desired value, setpoint) r: what we want, for example, dimension X50 or a temperature of 60 °C;
  • output (or controlled variable) y: the actual value—the table position or the oven temperature;
  • error e = r − y: the difference between the desired value and the actual value; it is this that “drives” the entire loop;
  • controller: the “brain” that calculates, based on the errors, the command u to be sent to the actuator;
  • actuator and process: the motor with its lead screw and table, the resistor with the oven;
  • sensor: measures the output (encoder, optical encoder, thermocouple: Chapter 47) and closes the loop;
  • disorders d: the shear force that slows down the table, the oven door open. The great advantage of the closed-loop system is that it also corrects disturbances that no one had anticipated.
open ringclosed loopCNCNDriverServo ActuatorStepperBrushlessScrew and TableScrew and tableNo one monitors where the table has moved toEncoder: The actual position is fed back to the controller
Figure 48.4 · The same driven axis in both modes. Above, an open-loop stepper motor: the CNC counts the pulses and assumes that the table has followed them. Below, a brushless motor with an encoder: the controller always knows the motor’s actual position.
Example 48.4 · Missed steps in an open-loop axis

A small axis has a stepper motor rated at 200 steps per revolution with a driver that divides each step into 10 microsteps (Chapter 45), and a lead screw with a pitch of 5 mm. What is its resolution? How many pulses are needed for 30 mm? If the motor loses 40 microsteps due to a shock, what happens?

microsteps per revolution: 200 × 10 = 2,000 → resolution = 5 / 2,000 = 0.0025 mm
30 mm = 30 / 5 = 6 revolutions = 6 × 2,000 = 12,000 pulses
40 missed microsteps: 40 × 0.0025 = 0.1 mm short
The control system thinks the board is 30 mm, but it's actually 29.9 mm, and from that point on, all the dimensions are off by 0.1 mm until the zero point is reset.
Open RingClosed ring
Simple and inexpensive, no sensorYou need a sensor and a controller
He doesn't notice the problems or the errorscorrects malfunctions, friction, and variable loads
always stableIf the regulator is calibrated incorrectly, it may fluctuate
It works when the load is known and constantEssential when precision and safety are required
toaster, timer, simple step-by-step instructionsthermostat, cruise control, CNC axes, robot

48.4 Two-position control with hysteresis

The simplest controller has only two outputs: on or off. This is called on/off or two-position control. It’s the type used in home thermostats, refrigerators, and air compressors, which restart when the pressure drops and stop when it rises.

If the thermostat turned on and off exactly at 60 °C—turning on just below 60 and turning off just above it—the relay would trip dozens of times per second, and it would wear out in a matter of hours. That’s why hysteresis is used—a dead band around the desired value: it turns on when the temperature drops below the lower limit, turns off when it exceeds the upper limit, and nothing changes in between. The wider the band, the fewer times the relay switches, but the more the temperature fluctuates.

5055606501020304050607080T (°C)time (s)62 °C: turns off60 °C: on purpose58 °C: turns on24-second periodOnoffresistance
Figure 48.5 · An oven set to 60 °C with a hysteresis of ± 2 °C. The heating element (in green, below) turns off at 62 °C and turns back on at 58 °C; the temperature rises at a rate of 0.5 °C/s and falls at a rate of 0.25 °C/s, and the cycle repeats every 24 s. In reality, the temperature goes slightly beyond these limits due to thermal inertia, and the straight lines become curves.
Example 48.5 · How often does the thermostat trip?

An oven must maintain a temperature of 60 °C with a hysteresis of ± 2 °C. When the heating element is on, the temperature rises by 0.5 °C/s; when it is off, it drops by 0.25 °C/s. How long does a cycle last? What fraction of the time is the heating element on?

range: 58 to 62 °C, 4 °C wide
On: 4 / 0.5 = 8 s; Off: 4 / 0.25 = 16 s
period: 8 + 16 = 24 s → 3600 / 24 = 150 cycles per hour
heater on: 8 / 24 = 0.333 = 33%
One cycle every 24 seconds, with the heater on for one-third of the time; with a hysteresis of ±1 °C, the number of cycles would double (300 per hour)

On/off control works just fine when a few degrees or a few tenths of a bar more or less don't matter. It’s not suitable for an axis: a table that moves forward at full speed and then backward at full speed around a given dimension would never come to a stop. In that case, you need a controller that modulates the command continuously—that is, the PID controller described in the following paragraphs.

48.5 How to Evaluate a Control: The Response to a Step Change

To determine whether a closed-loop system is functioning properly, a simple test is performed: the reference is suddenly changed (by one step), and the output response is recorded. This is also done in the workshop during the commissioning of an axis: a small displacement is commanded, and the waveform on the drive software’s oscilloscope is observed.

referencefinal valueover-elongationsteady-state errorsettling timerange ± 2%ty-output
Figure 48.6 · A step response with its measurements. The output exceeds the final value (overshoot), oscillates, and settles within the green band of ±2%; however, the final value remains below the reference: this is the steady-state error.
  • Overstretching (overshoot): the amount by which the tool extends beyond the final dimension, expressed as a percentage. On an axis, this means that the tool goes beyond the dimension and then retracts; on a shoulder, it leaves a mark.
  • Rise time: how long it takes for the output to approach its final value (usually from 10% to 90%). It indicates how “ready” the loop is.
  • Settling time: the time it takes for the output to settle within a range around the final value (±2% or ±5%) and remain there.
  • Steady-state error: the difference between the reference value and the output when everything has come to a stop. On a single axis, this must be zero, or a few micrometers.

Many real-world systems (an axis with its mass and elasticity, a suspension, an instrument needle) behave like a second-order system, whose response depends primarily on a single parameter, the damping coefficient ζ (zeta): When ζ is small, the response oscillates significantly; when ζ = 1, it reaches the final value without exceeding it.

Overstrain of a second-order system
Mp = e−π · ζ / √(1 − ζ²) ζ = −ln Mp√(π² + ln² Mp)
Mp: over-elongation as a fraction of the final value (0.18 = 18%) · ζ: damping, a pure number between 0 and 1 · e = 2.718, the base of the natural logarithms (Chapter 7). Values: ζ = 0.3 → 37%; ζ = 0.5 → 16%; ζ = 0.7 → 4.6%; ζ = 1 → no over-elongation.
Example 48.6 · Reading a response at the step

The piston of a hydraulic press with position control receives a command to move from 0 to 50.0 mm. The piston reaches a maximum of 53.1 mm, then stops at 45.0 mm. Calculate the steady-state error, over-extension, and equivalent damping.

error at steady state: 50.0 − 45.0 = 5.0 mm, or 5 / 50 = 10% of the reference value
over-elongation (relative to the final value): (53.1 − 45.0) / 45.0 = 8.1 / 45 = 0.18 = 18%
ln 0.18 = −1.715 → ζ = 1.715 / √(9.870 + 2.941) = 1.715 / 3.579 = 0.479
Steady-state error 10%, overstretch 18%, ζ ≈ 0.48: this is exactly the curve shown in Figure 48.6. The response is too abrupt, and the dimension is not reached: the controller needs to be adjusted.

48.6 The PID Controller

The most widely used controller in industry is called PID, which stands for the initials of its three components: proportional, integral, and derivative. Each component evaluates the error in a different way, and the control signal sent to the actuator is the sum of the three. To understand this, let’s think about how we adjust the shower: we look at how far the water is from the right temperature (present), how long it has been off (past), and whether it’s changing quickly (future).

The proportional term (P): responding to the present

The control signal is proportional to the error: u = Kp · e. A large error results in a large control signal; a small error results in a small control signal. Kp is the proportional gain. The drawback of using only P control is that, in processes requiring a constant control signal to maintain steady-state operation (an oven needs power to stay hot, a vertical screw needs torque to support the weight), there is always an error at steady state: if the error were zero, the control signal would be zero, and the oven would cool down. Increasing Kp reduces the error, but the response becomes erratic and ultimately unstable.

Steady-state error using only the proportional controller
e∞ = r1 + K · Kp
e∞ steady-state error, in the same unit as r · r reference step · K process gain: how much the output changes at steady state for each unit of control (for example, °C per % of power) · Kp proportional gain of the controller (for example, % power per °C of error). The product K · Kp is a scalar value, the loop gain.
Example 48.7 · The error that P alone does not eliminate

An oven must reach a temperature 180 °C above room temperature. At steady state, each 1% of heating element power corresponds to a 2 °C temperature overshoot (K = 2 °C/%). With a proportional-only controller, what is the remaining error when Kp = 5 %/°C? And when Kp = 20 %/°C?

Kp = 5: K · Kp = 10 → e∞ = 180 / 11 = 16.4 °C; the oven reaches a temperature 163.6 °C higher than the ambient temperature
Verification: command = 5 × 16.4 = 81.8% power → 81.8 × 2 = 163.6 °C ✓
Kp = 20: K · Kp = 40 → e∞ = 180 / 41 = 4.4 °C; the oven reaches 175.6 °C
A 16.4 °C error with Kp = 5, 4.4 °C with Kp = 20: the error decreases but never disappears, and a Kp that is too high causes oscillation

The Integral Term (I): Remembering the Past

The integral term accumulates the error over time: as long as there is even a small error, the sum grows, and the control signal grows with it. It stops only when the error is exactly zero. It is this term that eliminates the error at steady state: at steady state, the error is zero, and the control signal needed to keep the oven warm is provided by the accumulated sum. The trade-off is a bit of slowness and a greater tendency to oscillate, because the integral “remembers” the error even after the output has already passed the setpoint. This is adjusted using the integral time Ti: the shorter it is, the stronger the integral action.

🧮
The “windup” of the integral term. If the actuator is already at maximum (resistance at 100%, motor at maximum torque) and the error remains large for a long time, the integral term continues to grow without serving any purpose. When the output finally reaches the setpoint, the integral term is enormous and causes it to overshoot significantly. High-quality controllers block the integral term when the output is in saturation (anti-windup function).

The Derivative Term (D): Looking to the Future

The derivative term measures how quickly the error changes. If the output is approaching the setpoint very quickly, the D term reduces the control signal in advance, much like braking before reaching a stop sign. It dampens runouts and reduces overshoot. Its drawback is that it amplifies sensor noise: a “jittery” signal has a very high derivative. For this reason, the D term is used with a filter, and in many control loops (such as slow temperature loops), it is set to zero. It is adjusted using the derivative time constant Td.

The PID Controller
u = Kp · e + Ki · ∫e dt + Kd · dedt
Ki = KpTi Kd = Kp · Td
u: command to the actuator (e.g., % power or required torque) · e: current error · ∫e dt: sum of errors over time (area under the error curve), in units of error per second · de/dt: rate of change of the error, in units of error per second · Kp, Ki, Kd: gains of the three terms · Ti: integral time in s · Td: derivative time in s. A PI controller has Kd = 0; a P controller also has Ki = 0.
Example 48.8 · The PID control signal at a given instant

An oven controller has Kp = 2 %/°C, Ki = 1 %/(°C · s), and Kd = 0.5 %·s/°C. At a certain moment, the error is 3 °C, the sum of the errors over time is 10 °C·s, and the error is decreasing by 0.4 °C per second. What power does it control?

Term P: 2 × 3 = 6%
Term I: 1 · 10 = 10%
Term D: 0.5 · (−0.4) = −0.2% (the error decreases; D reduces it slightly)
u = 6 + 10 − 0,2 = 15,8%
Control: 15.8% of the power. Terminal I is the largest; it is this terminal that “knows” how much power is needed to keep the oven warm
123456780.51.0P only (Kp = 2)PI (Kp = 2, Ti = 2 s)PID (Kp = 3, Ti = 2 s, Td = 0.3 s)t (s)output ysteady-state error
Figure 48.7 · The same (simulated) process with three controllers. The P controller alone (Kp = 2) stops at 0.67 and overshoots by 19%. The PI controller reaches the setpoint with 8.6% overshoot and settles to 2% in about 5 seconds. The PID controller also reaches the setpoint with 5.6% overshoot and settles in about 3 seconds.
123456780.51.01.5Kp = 1Kp = 4Kp = 8t (s)output y
Figure 48.8 · The same process using only P and three values of Kp. With Kp = 1, the response is smooth but stops at 0.50; with Kp = 4, it reaches 0.80 with 39% over-extension; with Kp = 8, it reaches 0.89 but over-extends by 67% and oscillates for a long time. If Kp is increased further (to 12.6 for this process), the runouts no longer dampen out.
If you increaseReadinessOverstretchingSteady-State ErrorStability
KpimprovegrowsIt decreases, but it does not disappearworsens
full-length (shorter Ti)get a little bettergrowsis canceledworsens
the derivative action (longer Td)little effectcalano effectIt improves if the signal isn't noisy

Guideline table: This applies to common cases; every case has its own surprises.

48.7 Empirical Calibration

Tuning a PID controller means choosing Kp, Ti e Td. This can be done through calculations, based on a process model, but in the workshop it’s almost always done by trial and error. Modern temperature controllers and drives have a function to autocalibration (car tuning): They run a few tests on the process themselves and propose the parameters. It's still a good idea to know how to do it manually.

The Manual Procedure

  • Start with just P, with Kp set low, the integral term turned off (Ti at maximum), and the derivative term set to zero;
  • Increase Kp in small increments, taking one small step at a time, until the response begins to overshoot too much; then go back a little;
  • The integral is introduced by shortening Ti until the steady-state error disappears within an acceptable time, without long-term runouts;
  • If necessary, add a little derivative to dampen the overstretch, making sure the control doesn't become "jittery."

The Ziegler-Nichols Method

A classic method, developed in the 1940s, provides a starting point using a single test: using only P, Kp is increased until the output oscillates constantly, without damping and without increasing. That gain is called the critical gain Ku, and the period of the runouts is called the critical period Tu. The parameters are obtained from the table. The test pushes the system to the limit of stability: it should only be performed where a runout is not dangerous (never on an axis with a workpiece mounted and the tool nearby).

Closed-loop Ziegler-Nichols (starting point)
PID: Kp = 0,6 · Ku Ti = Tu2 Td = Tu8
PI: Kp = 0.45 · Ku Ti = Tu1.2 P: Kp = 0.5 · Ku
Ku critical gain, at which the ring with only P oscillates steadily · Tu period of those runouts in s · Kp, Ti, Td controller parameters. The resulting values produce quick responses but with significant over-extension; they are then refined by hand.
Example 48.9 · Ziegler-Nichols on the testing process

In the process shown in Figures 48.7 and 48.8, Kp is increased until steady-state runouts are observed: this occurs when Ku = 12.6, and the runouts have a period of Tu = 1.52 s. Calculate the PID parameters.

Kp = 0,6 · 12,6 = 7,56
Ti = 1,52 / 2 = 0,76 s → Ki = 7,56 / 0,76 = 9,9 1/s
Td = 1,52 / 8 = 0,19 s → Kd = 7,56 · 0,19 = 1,44 s
When simulating the step response using these values, the overshoot is approximately 60%.
Kp = 7.56, Ti = 0.76 s, Td = 0.19 s: a fast but “jittery” starting point. By reducing Kp and increasing Ti (for example, Kp = 3, Ti = 2 s, Td = 0.3 s, as shown in Figure 48.7), the over-extension drops below 6%.

48.8 The Servo Drive of a CNC Axis: The Three Loops

An axis of a CNC machine is the most important example of a closed-loop system in a machine shop. However, there is not just one loop: there are three, nested one inside the other (cascaded control). Each loop controls a variable and provides a reference to the innermost loop.

CNpositionP (Kv)SpeedPICurrentPIinverterPWMMscrewboardEmeasured currentspeed (from the motor encoder)position (encoder; dashed line: optical encoder)current loop (torque)speed loopposition loop
Figure 48.9 · The three loops of an axis. The position loop (Kv) provides the speed reference; the speed loop (PI) provides the current reference—that is, the torque reference; the current loop (PI) controls the inverter. Speed is derived from the motor encoder (E); position is derived from the encoder or, in a closed-loop system, from the optical encoder.
  • Current loop (the innermost and fastest): In a brushless motor, torque is proportional to current (Chapter 45). The drive measures the current in the phases and regulates it using a PI controller, driving the inverter transistors with PWM modulation. Regulating the current means regulating the torque.
  • Speed loop: It compares the setpoint speed with the speed measured by the motor encoder and requests more or less torque from the current loop. It is usually a PI controller: the integral term is used to maintain the speed even when the cutting force slows down the table.
  • Position loop (the outermost one): compares the requested dimension, updated by the CN at each interpolation cycle, with the measured dimension, and instructs the speed loop to set a speed proportional to the error. It is usually a simple P controller, with gain Kv (paragraph 48.10).

Why three loops and not just one? Because each inner loop “handles” the fastest-changing problems before they reach the outer loop: the current loop compensates for the motor’s inductance and voltage fluctuations, the speed loop compensates for friction and shear forces, and the position loop receives an axis that is already responding well. The rule is that each inner loop must be much faster than the external one, at least three to five times as much. That is why the tuning is done from the inside out: first current, then speed, then position.

RingRegulatorCalculation PeriodReadiness
Current (torque)PI50 to 125 µs1–3 kHz bandwidth
SpeedPI (with filters)100 to 250 µs100–400 Hz bandwidth
LocationP (+ feed-forward)from 0.25 to 2 msKv from 20 to 100 1/s

Approximate values for modern machine tool drives; these depend heavily on the manufacturer and the mechanical design. The “bandwidth” indicates the maximum frequency at which the ring can track the reference signal.

🖥️
Where are the three loops located? In modern control systems, the position loop can be located in the CNC or in the drive, connected by a high-speed digital bus (Fanuc’s FSSB, Siemens’s DRIVE-CLiQ, or EtherCAT in other systems). For the operator, nothing changes: on the CNC’s diagnostics page, you can see the tracking error and the current for each axis—the two most useful figures for understanding how an axis is performing.

48.9 Semi-closed loop and closed loop

The position that enters the position ring can be measured at two different points, and the difference is important for the machine's accuracy.

  • Semi-closed-loop system: The position is derived from the encoder mounted on the motor by counting the revolutions and multiplying by the lead of the lead screw. This is the most common and economical solution. However, the controller measures the rotation of the motor, not the position of the table: everything between the motor and the table (coupling, pitch errors, lead screw clearance, thermal expansion of the lead screw) is not accounted for by the loop and can only be compensated for using tables (pitch and clearance compensation, Chapter 50).
  • Closed ring (or “direct reading”): the reading is taken from a optical line (Chapter 47) mounted between the bench and the table. Now, the screw, clearances, and expansion are inside the ring: If the screw expands as it heats up, the ruler detects it and the control system makes the necessary correction. Speed continues to be derived from the motor's encoder.
Mtablemotor encoderscrew, clearance, and expansionOUTSIDE the ring: not visiblesemi-closed ringMtableoptical linescrew, clearance, and expansionINSIDE the ring: the following are adjustedclosed ring
Figure 48.10 · On the left is the semi-closed-loop system: the position feedback comes from the encoder on the back of the motor. On the right is the closed-loop system: the feedback comes from the optical scale mounted on the bench, which is read by a sensor that moves with the table.
Example 48.10 · The screw that heats in a semi-closed loop

During a long machining operation, the screw on an axis heats up by 5 °C. The working dimension is 500 mm from the fixed bearing. The coefficient of thermal expansion of steel is 12 × 10−6 1/°C (approximate value). By how much does the semi-closed-loop axis deviate? And in a closed-loop system?

Extension of the screw to the dimension: ΔL = 12 · 10−6 · 5 · 500 = 0.030 mm
semi-closed: the motor is running at the correct speed, but each revolution now moves the lead screw a little further → the table is off by 0.03 mm
Closed: The line measures the table; the control stops the motor when the table reaches the correct dimension → the lead screw error disappears
30 µm error in the semi-closed position, nearly zero with the optical scale: for an IT6 tolerance on a 500 mm hole (Chapter 14), this is more than half the tolerance
Example 48.11 · Encoder and Line Resolution

An axis with a 10-mm-pitch lead screw, connected directly to the motor, has a 22-bit absolute encoder. What is its resolution? Compare it to the 2,500-pulse-per-4 encoder in Example 40.21.

22 bits = 222 = 4,194,304 increments per revolution
resolution = 10 / 4,194,304 = 2.4 × 10−6 mm = 0.0024 µm
Example 40.21: 10 / 10,000 = 0.001 mm = 1 µm, which is about 420 times less fine
A few thousandths of a micrometer: resolution is no longer a limitation. The accuracy of the axis depends on the mechanics, temperature, and calibration—not on the encoder’s increments.
📏
Resolution does not mean precision. Resolution is the smallest step that the control system “sees.” Precision is how close the actual position is to the desired one. A very high-resolution encoder on a worn screw produces an axis that reads to the nearest tenth of a micrometer but is off by two hundredths. The difference between the two is explained in Chapter 31.

48.10 Tracking Error and Kv Gain

The position loop of an axis is almost always a proportional controller: the speed commanded to the motor is proportional to the position error. This leads to a consequence that surprises those who see it for the first time: A moving axis is always behind schedule compared to the dimension specified by the CN. If the error were zero, the commanded speed would be zero and the axis would stop. To move at a speed v The axis must have an error such that Kv · e = v. This delay is called tracking error (The following error, regarding Siemens controls, also “tracking deviation”).

Tracking error
e = vKv e [mm] = v [mm/min]60 · Kv [1/s] e [mm] = v [m/min]Kv [(m/min)/mm]
and tracking error, the difference between the commanded altitude and the actual altitude, in mm · v is the axis speed · Kv is the position-loop gain. In SI units, it is expressed as 1/s (speed in mm/s per mm of error); some controllers express it in hundredths of 1/s (3000 means 30 1/s), while others, such as Siemens, use (m/min)/mm. Conversion: 1 (m/min)/mm = 1000 / 60 = 16.67 1/s. The reciprocal, 1/Kv, is the time constant of the position loop.
0.10.20.30.40.533.31v (mm/s)e (mm)t (s)commanded speedactual speede = v / Kv = 33.3 / 30 = 1.11 mm
Figure 48.11 · A simulated motion at F2000 (33.3 mm/s) with Kv = 30 1/s. Above: the actual velocity follows the commanded velocity with a slight delay. Below, the tracking error: at constant speed, it is 1.11 mm; when the axis stops, it returns to zero.
Example 48.12 · Tracking Error in Operation

An axis has a Kv of 2 (m/min)/mm. What is this value in 1/s? What is its tracking error at F1200 (1200 mm/min)?

Kv = 2 · 16,67 = 33,3 1/s
using Siemens units: e = 1.2 m/min / 2 = 0.6 mm
Check in SI: v = 1200 / 60 = 20 mm/s → e = 20 / 33.3 = 0.6 mm ✓
0.6 mm: The table is following the commanded dimension with a delay of six-tenths. This is not a workpiece error if all axes are delayed by the same amount.
Example 48.13 · In rapid mode and the alarm threshold

The same type of axis, with Kv = 30 1/s, moves at rapid feed rate at 30 m/min. What is its tracking error? The manufacturer sets the “excessive tracking error” alarm threshold to about 20% above the normal value: what is that value?

v = 30,000 / 60 = 500 mm/s → e = 500 / 30 = 16.7 mm
threshold: 16.7 × 1.2 = 20 mm
In rapid feed mode, the axis is nearly 17 mm behind the command; if, due to a collision or a blocked brake, the error exceeds 20 mm, the CNC stops everything and triggers an alarm

Why Tracking Error Matters: Interpolation

In a single-axis movement, the tracking error leaves no trace on the workpiece: the axis still reaches the dimension, just a moment later. The problem arises when two axes move together. On a line inclined at 45°, the X and Y axes have the same speed: if they have the same Kv, they have the same error, and the tool remains on the line, just slightly behind. If the Kv values are different, one axis lags behind the other, and the tool strays from the path. For this reason, the interpolating axes must have the same Kv value, and the manufacturer sets it to the same value for all axes, using the value of the “slower” axis.

In circular interpolation, even with Kv Under these conditions, the delay causes the tool to “cut the curve short”: the actual circle ends up slightly smaller than the programmed one. With Kv When the angle changes, it becomes an ellipse tilted at 45°. This can be clearly seen with the rim test (ballbar, Chapter 37).

Δrhatching: programmed circleactualEqual Kv values on both axesDifferent Kv values: tilted ellipsethe “slower” axis lags behind
Figure 48.12 · The shape error in circular interpolation, greatly exaggerated. On the left, with equal Kv values, the actual circle is concentric but has a radius smaller than Δr. On the right, with different Kv values on the two axes, the circle becomes an ellipse tilted at a 45° angle.
Circular Interpolation Radius Error (Estimate)
Δr ≈ v²2 · Kv² · r
Δr is the difference between the actual radius and the setpoint radius, in mm · v is the contour speed in mm/s · Kv is the position gain in 1/s, which is the same for both axes · r is the setpoint radius in mm. This applies to a purely proportional position loop, without feed-forward, when Δr is much smaller than r. The error increases with the square of the speed and decreases with the square of Kv.
Example 48.14 · A Smaller Interpolated Hole

A hole with a radius of 10 mm is milled using circular interpolation (G02) at F2000 on a machine with Kv = 30 1/s and without feed-forward. By how much does the radius decrease? What about with a radius of 50 mm? And with Kv = 60 1/s?

v = 2000 / 60 = 33.33 mm/s
Δr = 33.33² / (2 × 30² × 10) = 1,111 / 18,000 = 0.062 mm
Radius 50 mm: Δr = 1111 / (2 × 900 × 50) = 0.012 mm
Kv = 60 1/s, radius 10: Δr = 1111 / (2 · 3600 · 10) = 0.015 mm (doubling Kv reduces the error by a factor of 4)
The Ø20 hole would end up about 0.12 mm smaller in diameter—which is too much. That's why the controls use feed-forward and automatically slow down on small radii.

Feed-forward (overview)

The CN knows the trajectory in advance: it already knows what speed will be needed in the next instant. Instead of waiting for an error to occur, it can send the required speed directly to the speed loop, adding it to the position controller’s output. This is feed-forward control: the position loop need only correct the small portion that the feed-forward did not anticipate. With 100% speed feed-forward, the tracking error at constant speed disappears almost entirely; acceleration feed-forward is often added as well, which sends the torque in advance to accelerate the masses. On Fanuc, it is activated with high-precision contouring control (G05.1 Q1, already mentioned in Chapter 9); on Siemens, with FFWON.

Example 48.15 · The Effect of Feed-Forward

The axis in Example 48.12 (e = 0.6 mm at F1200) receives an 80% speed feed-forward. What is the remaining tracking error?

The pre-command provides 80% of the speed; the position controller must provide the remaining 20%.
e = 0.20 × 0.6 = 0.12 mm
From 0.6 to 0.12 mm. However, if the feed-forward is too high, it “pushes” the axis beyond the dimension at the edges: this is adjusted in conjunction with appropriate acceleration and jerk limits (Chapter 9)

48.11 Axle Sizing

When selecting a motor for an axis, you need to check three things: that it provides enough torque for acceleration and operation, that it can reach the rapid traverse speed, and that the ratio of inertia between the load and the motor is reasonable. In addition, you should verify that the resolution is sufficient, which is almost always the case with modern encoders.

engineJmJgtable + workpiece, mass mF machiningvscrew: pitch P, efficiency η, moment of inertia Jvguides: friction μ · m · gM, ω, α
Figure 48.13 · Schematic of the axis to be sized: motor (rotor inertia Jm), coupling (Jg), recirculating ball screw (Jv, pitch P, efficiency η), nut, and table with the workpiece (mass m) on guides.

The inertia transmitted to the engine

The motor must accelerate not only its own rotor, but also everything attached to it. To perform the calculations, everything is considered as being “on the motor shaft,” converting the translational masses and the slower-rotating inertia into an equivalent inertia. There are two rules:

  • A mass m moved by a screw with pitch P has, as viewed from the screw, J = m · (P / 2π)² (Example 40.22): the pitch divided by 2π is the “arm” of the screw;
  • inertia J that's going around i slower than the engine, via a gearbox or a belt with a reduction ratio i, that is, as seen from the engine, J / i². It comes from kinetic energy: ½ · J · (ω/i)² = ½ · (J/i²) · ω².
Equivalent Inertia and Motor Torque
Jtav = m · (P2 · π)² Jload = Jv + Jtavi² Jtot = Jm + Jg + Jload
M = (Jm + Jg) · α + Jload · αη + (Fatt + Flav) · P2 · π · η · i α = ωta
Jtav: moment of inertia of the table with the workpiece, as seen from the lead screw, in kg·m² · m: mass of the moving part in kg · P: lead of the lead screw in m · Jv: moment of inertia of the lead screw · Jm: moment of inertia of the rotor (from the motor catalog) · Jg: inertia of the coupling or pulley on the motor · i: reduction ratio between the motor and the screw (1 for a direct coupling) · Jcarico: load inertia relative to the motor · M: torque the motor must deliver, in N·m: to accelerate the motor itself, to accelerate the load (through efficiency), and to overcome forces · α: angular acceleration of the motor in rad/s² · ω angular velocity of the motor in rad/s · ta acceleration time in s · Fatt friction of the guides in N · Flav machining force in N · η efficiency of the lead screw (and the gearbox). The formulas are the same as those in Chapters 9 and 40, combined.

The Ratio of Inertia

The ratio of inertias λ = Jload / Jm It indicates how much the load “weighs” relative to the rotor. If λ is large, the motor is like a small horse pulling a heavy cart: in theory, the torque is sufficient, but any slight flexibility in the coupling, screw, or belt causes the motor and load to no longer move together, and the speed loop detects a load that “bounces.” You have to lower the gain, and the axis becomes slow and imprecise, or it vibrates. As a (rough) rule of thumb, λ is kept below 5 for machine tool axes that must be precise and dynamic; up to 10 They are acceptable for less demanding axes with very rigid mechanics, but beyond that, special measures are required. “Medium-inertia” servo motors are specifically designed for machine tool axes.

Example 48.16 · A rotary table with a worm gear

A rotary table carrying the workpiece has a moment of inertia of 2 kg·m². It is driven by a worm gear with a gear ratio of 90 and an efficiency of 0.6 (approximate value). It must accelerate from rest to 30 rpm in 0.2 s. What is the inertia experienced by the motor, and what torque is required to accelerate the table alone? The motor’s rotor has 1.5 × 10−4 kg·m².

reported inertia: 2 / 90² = 2 / 8100 = 2.47 × 10−4 kg·m²
table: ω = 30 · 2π / 60 = 3.142 rad/s → αt = 3.142 / 0.2 = 15.71 rad/s²
motor: α = 15.71 × 90 = 1,414 rad/s² (the motor reaches 30 × 90 = 2,700 rpm)
M = 2,47 · 10−4 · 1414 / 0.6 = 0.58 N·m (check: 2 · 15.71 / (90 · 0.6) = 31.4 / 54 = 0.58 N·m ✓)
rotor: 1.5 × 10−4 · 1414 = 0.21 N·m → total 0.79 N·m; λ = 2.47 / 1.5 = 1.6
From the motor's perspective, the 2 kg·m² table becomes little more than its rotor: the ratio of 90 divides the inertia by 8,100. The trade-off is low speed and poor efficiency of the worm gear.
Example 48.17 · The X-axis of the milling machine, complete

Let’s revisit the setup from Example 40.22: a table with a 300-kg workpiece on roller guides (μ = 0.01), a milling feed force of 1500 N, lead screw with a pitch of 10 mm, Ø32 × 1000 mm, efficiency 0.9, connected to the motor via a coupling. Rapid traverse at 3000 rpm (30 m/min), reached in 0.1 s. A brushless servomotor with the following (approximate) catalog specifications is being tested: continuous torque 6 N·m, maximum torque 18 N·m, 3000 rpm, rotor inertia 8.0 × 10−4 kg·m², 20-bit encoder. The coupling has 1.0 × 10−4 kg·m². Check the torque, moment of inertia ratio, speed, and resolution.

From Example 40.22: Jtav = 7,60 · 10−4, Jv = 8,08 · 10−4 → Jload = 1,568 · 10−3 kg·m² (i = 1)
Jtot = 8,0 · 10−4 + 1,0 · 10−4 + 1,568 · 10−3 = 2,468 · 10−3 kg·m²
α = 314.16 / 0.1 = 3141.6 rad/s²
motor and coupling: (8.0 + 1.0) · 10−4 · 3141.6 = 2.83 N·m
load: 1,568 × 10−3 · 3141.6 / 0.9 = 5.47 N·m; friction in the guides: 29.4 · 0.010 / (2π · 0.9) = 0.05 N·m
Peak torque during acceleration: 2.83 + 5.47 + 0.05 = 8.35 N·m < 18 N·m ✓
During operation, at constant speed: 2.70 N·m (example 40.22) < 6 N·m ✓
moment of inertia ratio: λ = 1.568 × 10−3 / 8,0 · 10−4 = 1.96 (with the joint on the load side: 2.09) < 5 ✓
speed: 3,000 rpm · 10 mm = 30,000 mm/min = 30 m/min ✓
resolution: 10 / 220 = 10 / 1 048 576 = 9,5 · 10−6 mm ≈ 0.01 µm ✓
The 6 N·m motor is sufficient: during acceleration, it uses less than half of the maximum torque; during operation, less than half of the continuous torque; and the inertia ratio is approximately 2. There is still room to accelerate even during machining operations.
🌡️
Effective torque. The continuous torque of an engine is the torque it can deliver for hours without overheating. In a real-world cycle, the motor accelerates, brakes, operates, and comes to a stop: to verify heating, the effective torque (or root-mean-square torque), Meff = √(Σ Mk² · tk / Σ tk), is calculated and compared with the continuous torque. For the axis in Example 48.17, with a 6-second cycle (0.1 seconds of acceleration, 0.8 seconds of full speed, 0.1 seconds of braking, 4 s of work, and 1 s at rest), the value is approximately 2.7 N·m, well below 6 N·m.
Example 48.18 · A board that's too heavy for that motor

We want to install a heavy workpiece on the same machine: the moving mass increases to 1,500 kg. What is the inertia ratio with the same motor? What are the possible solutions?

Jtav = 1500 · (0,01 / 6,2832)² = 1500 · 2,533 · 10−6 = 3,80 · 10−3 kg·m²
Jload = 3,80 · 10−3 + 0,81 · 10−3 = 4,61 · 10−3 kg·m² → λ = 4.61 / 0.80 = 5.8: too high
a larger engine, with Jm = 2,0 · 10−3 kg·m²: λ = 4.61 / 2.0 = 2.3
or a belt with a 2: ratio: Jload = 4,61 · 10−3 / 4 = 1,15 · 10−3 → λ = 1.4; but the speed drops to 15 m/min
20 mm pitch instead of 10: Jtav increases fourfold and λ reaches 20—that's the wrong approach
At 1,500 kg, the inertia ratio exceeds 5: you should choose either a larger engine or a reduction gear. Lengthening the wheelbase makes matters worse.

48.12 Direct-drive systems, robots, and servo valves

Linear Motors

A linear motor is an “unrolled” brushless motor: the part with the coils (the primary) is attached to the carriage, while the part with the permanent magnets (the secondary) is stretched out along the table. The force is generated directly between the two parts, without screws, belts, or couplings. There is no clearance, no mechanical wear, and the axis can reach accelerations of 1–2 g and speeds of over 100 m/min (approximate values). On the other hand, linear motors generate a lot of heat (liquid cooling is required), attract metal chips with their magnets, cost more, and—since there is no reduction gear— the load and disturbances are all transmitted to the motor: λ no longer exists, and very fast encoders and very fine optical scales are required. On vertical axes, there is neither a non-reversible lead screw nor a brake on the screw; brakes on the guides and balancing systems are required.

Force of a linear motor
F = m · a + Fatt + Flav
F force that the motor must produce in N · m moving mass (sled, primary component, workpiece) in kg · a acceleration in m/s² · Fatt Friction of the guides in N · Flav Number of machining operations
Example 48.19 · A linear motor for the same table

The 300-kg table in Example 48.17 is moved by a linear motor with an acceleration of 10 m/s² (approximately 1 g). What force is required to accelerate it? And what if it is accelerated while the milling machine is operating at 1,500 N?

To calculate acceleration: 300 × 10 = 3,000 N; friction in the guides: 29.4 N → 3,029 N
Acceleration in work: 3029 + 1500 = 4529 N
About 3,000 N peak acceleration (4,500 N when operating simultaneously): a significant force, which results in a lot of heat that needs to be dissipated

Torque motors on rotary tables

The same principle of rotation is utilized by the torque motor: a brushless motor with many poles, a large diameter, and a short length, mounted directly beneath the rotary table’s platter. It delivers torque in the hundreds or thousands of N·m at low speeds, without a worm gear, without clearance, and without wear. It is the solution for the rotary tables and tilting tables of the most dynamic five-axis machining centers.

Example 48.20 · The rotary table with a torque motor

The 2 kg·m² table in Example 48.16 is driven by a torque motor and must accelerate from a standstill to 100 rpm in 0.2 s. What torque is required?

ω = 100 · 2π / 60 = 10.47 rad/s → α = 10.47 / 0.2 = 52.36 rad/s²
M = 2 × 52.36 = 104.7 N·m (plus the torque motor rotor and friction)
About 105 N·m: The motor bears the full inertia of the table, but the table rotates three times faster than it does with the worm gear and has no clearance

Servo Motors for Robotics

Each joint of an industrial robot has a brushless servomotor, almost always equipped with a compact, high-ratio gearbox (epicyclic, cycloidal, or deformation wave, the so-called Harmonic Drive, Chapter 40), an absolute encoder, and a brake. The three rings are the same as those on the CNC axis, but the load perceived by each motor changes continuously with the position of the arm: the robot controller calculates the inertia and torques due to the weight at every instant and sends them via feedforward to the drives. Robotics is covered in Chapter 51.

Position-controlled hydraulic servo valves and actuators

A hydraulic cylinder can function as a precision axis if it is equipped with a high-quality servo valve or proportional valve (Chapter 43) and a position transducer (often magnetostrictive, mounted inside the rod). The principle is the same: the controller compares the position with the reference and controls the valve’s flow, which regulates the oil flow to the cylinder. It is used where enormous forces are required with good precision: presses, press brakes with crossbeam parallelism controlled by two cylinders, test benches, and flight simulators.

48.13 Drive Safety: STO and Brake

A servo drive can move an axis with forces of thousands of newtons in a few hundredths of a second. When an operator opens the door or presses the emergency stop button, it must be ensured that the drive cannot start moving. In the past, a large contactor was used to disconnect the power supply from the drive; today, almost all drives have a built-in safety feature called STO (Safe Torque Off).

  • With the STO active, the drive removes the control signals from the transistors of the inverter via a hardware circuit that is independent of the software: the motor receives no power and cannot produce torque.
  • The STO is controlled using two channels separate, so that a single failure (a broken wire, a stuck relay) cannot prevent the stop; the drive checks that the two channels are consistent.
  • The STO does not apply the brakes: the motor continues to rotate freely until the masses come to a stop due to friction. For this reason, the axis is usually braked first using the control system (controlled stop), and then the STO is activated: the categories of stops and the relevant standards are described in Chapter 51.
  • The STO does not remove the voltage: hundreds of volts remain on the capacitors inside the drive. To work on the cables, you must disconnect them and wait for the charge to dissipate, as indicated on the drive.
uprightenginebrakecarriagespindlem · gSafety circuitdoor, emergency stop buttonDriveTwo-channel STO inputsChannel 1Channel 2Motor currentBrake controlSTO: no torque, the motor spins freelybrake: spring-loaded, de-energized
Figure 48.14 · A vertical axis. The weight m · g of the slide always pulls downward and, with the reversible recirculating screw, tends to cause the motor to rotate. When the STO removes the torque, the parking brake (spring-loaded; closes when de-energized) holds the slide in place.

Brakes on the vertical axes: why

A ball screw is so efficient that it is reversible (Chapter 40): a load pushing the nut causes the screw to rotate. On the Z-axis of a milling machine, on the column of a machining center, or on the vertical axis of a gantry, the spindle slide weighs hundreds of kilograms. As long as the drive is active, the motor holds the slide in place with its torque. But if the power fails, if the STO trips, or if the drive fails, the torque disappears and the slide would drop, dragging the screw with it, until it crashes into the workpiece or the table. For this reason, the motors on the vertical axes have a spring-loaded parking brake: the spring keeps it engaged, and only the current in a coil releases it. When the power is off, the brake engages automatically.

The parking brake is not a service brake: it is designed to hold the axis in place, not to stop it while it is moving (it only does so in an emergency, which causes it to wear out). It should be tested regularly: many vehicles perform a brake test automatically, requesting torque from the engine with the brake engaged and checking that the axis does not move.

Torque that causes the screw to be pulled
Mtransc = m · g · P · η2 · π Mascent = m · g · P2 · π · η
Mtrasc is the torque exerted on the screw by the falling weight, in N·m: this is the torque the brake must hold · Msalita is the torque the motor must provide to lift the sled at a constant speed · m is the mass of the sled in kg · g = 9.81 m/s² · P = pitch in m · η = efficiency of the screw. When the load is pulling, the efficiency is in the numerator; friction helps to hold the load in place.
Example 48.21 · The Z-axis brake

The vertical slide with the spindle has a mass of 250 kg; the lead screw has a pitch of 10 mm and an efficiency of 0.9; there is no counterbalance. What torque does the weight exert on the lead screw? What torque must the motor provide to climb at a constant speed? What type of brake should be selected, with a safety factor of 2?

weight: 250 · 9.81 = 2,452.5 N
Mtrasc = 2452.5 · 0.010 · 0.9 / 6.2832 = 3.51 N·m
Msalita = 2452.5 · 0.010 / (6.2832 · 0.9) = 4.34 N·m
brake: at least 2 × 3.51 = 7.0 N·m → an 8 N·m brake is selected
The weight drives the screw with 3.5 N·m; the motor expends 4.3 N·m just to keep the carriage raised as it moves upward. An 8 N·m brake holds the axis steady with a margin to spare. A balancing mechanism (counterweight or cylinder) would remove most of this torque from the motor

In addition to STO, modern drives offer other built-in safety functions: SS1 (safe stop—first brakes, then removes torque), SLS (safe speed limit, for example, with the door open in commissioning mode), and SBC (safe brake control). We’ll cover these along with the safety standards in Chapter 51.

48.14 Commissioning, Alarms, and Vibrations

Commissioning an axis is the process by which the machine manufacturer or service technician teaches the drive how the axis works. In order:

  • Set the motor and encoder parameters (which are often automatically read from the motor's electronic nameplate), the lead screw pitch, and the reduction ratio;
  • Check the directions: a positive command must move the axis in the positive direction, and the encoder must also count in the positive direction;
  • The loop tests are performed from the inside out: current, speed, position. Many drives measure the load inertia on their own and suggest the gain settings;
  • Determine the mechanical resonances by measuring the frequency and set the filters;
  • Set the acceleration, jerk, feed-forward, and Kv values to be the same for the interpolating axes, and then set the tracking error thresholds;
  • Adjustments are made (lead, clearances, deflection), and the system is verified using the ring test or a laser interferometer (Chapter 37).

Common Alarms

AlarmWhat does that mean?Common Causes
Excessive tracking error (while moving)The axis fell short of the thresholdimpact, seized axis, brake that won't release, unlubricated guides, excessive acceleration, insufficient torque
Excessive tracking error (at rest)the stationary axis has moved more than the thresholdload pushing, brake slipping, vertical axis lowering, encoder malfunctioning
OvercurrentThe current exceeded the inverter's limitshort circuit in the cable or motor, insulation damaged by oil and coolant, gain set too high, transistor failure
Overload (I²t)The engine has been operating for too long at continuous torque.Excessively heavy-duty machining operations, increased friction, damaged screws or guides, cycle with too many accelerations
Motor or drive overheatingThe temperature sensor has exceeded the limitoverload, fans not running, or clogged filters in the cabinet; high ambient temperature
Intermediate Circuit OvervoltageWhen braking, the motor feeds energy back into the system, causing the internal voltage to rise too highBrake resistor faulty or disconnected; heavy loads braking too abruptly
Encoder errorThe position signal is missing or inconsistentDamaged cable or wet connector, broken shielding, faulty encoder

Every manufacturer has its own alarm codes: their exact meanings are listed in the machine's alarm manual.

🔧
Before changing the parameters. When an axis gives a tracking error or overload error, the cause is almost always mechanical or electrical, not an incorrect parameter: checking the axis current on the diagnostics page while moving it slowly by hand (using the handwheel) will immediately reveal whether there is a sticking point. Lowering the gains or raising the thresholds to clear the alarm hides the fault and makes it more expensive to fix.

Axis Vibrations and Filters (Overview)

The mechanics of an axis are not rigid: the coupling, lead screw, nut, bearings, and the table itself are all springs with their own masses, and they have resonance frequencies (Chapter 9), often ranging from a few tens to a few hundreds of hertz. If the speed ring is fast enough to “excite” one of these frequencies, the axis whistles or hums while at a standstill, and regular marks remain on the surface of the workpiece. Remedies, in order of preference:

  • make the mechanism stiffer (stiffer joint, larger-diameter screw, preloaded bearings, reinforced strut) or lighter;
  • Insert a band-reject filter (notch), which removes the resonance frequency—as measured by the drive's frequency analysis—from the control signal;
  • Use a low-pass filter on the torque reference to remove high frequencies;
  • As a last resort, lower the gain: the axis stops vibrating but becomes less precise, with a lower Kv and larger shape errors.

Then there are low-frequency vibrations affecting the entire machine, which occur when an accelerating axis causes the column or workpiece to “sway”: these are countered by limiting jerk (Chapter 9) and by applying filters to the motion profile calculated by the CNC. On a simulator like CNC Code, these phenomena don’t cause any damage, making it the ideal place to observe the effect of feeds and rapid movements on cycle times before testing on the actual machine.

48.15 The Formulas in This Chapter

WhatFormula
Force of an ElectromagnetF = B² · A / (2 · μ₀), μ₀ = 4π · 10−7 H/m
Errore = r − y
Steady-state error with only Pe∞ = r / (1 + K · Kp)
Overstrain (second order)Mp = e^(−π·ζ)/√(1−ζ²) · ζ = −ln Mp / √(π² + ln² Mp)
PID Controlleru = Kp · e + Ki · ∫e dt + Kd · de/dt · Ki = Kp / Ti · Kd = Kp · Td
Ziegler-Nichols (PID)Kp = 0,6 · Ku · Ti = Tu / 2 · Td = Tu / 8
Tracking errore = v / Kv · e [mm] = v [mm/min] / (60 · Kv [1/s]) = v [m/min] / Kv [(m/min)/mm]
Kv Conversion1 (m/min)/mm = 16.67 1/s
Radius error in a circleΔr ≈ v² / (2 · Kv² · r)
Inertia of the table as seen from the screwJtav = m · (P / 2π)²
Inertia through a gearboxJ' = J / i²
Total InertiaJtot = Jm + Jg + (Jv + Jtav) / i²
Engine torqueM = (Jm + Jg) · α + Jload · α / η + (Fatt + Flav) · P / (2π · η · i) · α = ω / ta
Ratio of Inertiaλ = Jload / Jm, typically less than 5 (at most 10)
Axis Speed and Resolutionv = n · P / i · resolution = P / (Ninc · i)
A Successful CoupleMeff = √(Σ Mk² · tk / Σ tk)
Linear motorF = m · a + Fatt + Flav
Vertical axisMtrasc = m · g · P · η / (2π) · Msalita = m · g · P / (2π · η)

48.16 Exercises

Try to solve these problems on your own, using a calculator, before looking at the solution. Unless otherwise specified, g = 9.81 m/s², and the values in the table are approximate.

Exercise 1. An electromagnet has faces measuring 6 cm² and, with the core closed, an induction of 0.8 T in the air gap. What is the force it exerts?
Solution

F = 0,8² · 6 · 10−4 / (2 · 1,257 · 10−6) = 3,84 · 10−4 / 2,513 · 10−6 = 153 N.

Exercise 2. A room thermostat maintains a temperature of 20 °C with a hysteresis of ± 0.5 °C. When the boiler is on, the room heats up at a rate of 0.3 °C/min; when it is off, the room cools down at a rate of 0.2 °C/min. How long does one cycle last, and what percentage of the time is the boiler on?
Solution

1 °C range. On: 1 / 0.3 = 3.33 min; off: 1 / 0.2 = 5 min; period 8.33 min (about 7 cycles per hour); on 3.33 / 8.33 = 40% of the time.

Exercise 3. A process has a gain of K = 1.5 and is controlled solely by P, with Kp = 8. A reference step of 100 units is applied. What is the steady-state error? What value does the output settle at?
Solution

K · Kp = 12; e∞ = 100 / 13 = 7.7 units; the output stops at 92.3.

Exercise 4. A step response has a damping ratio of ζ = 0.7. What overstrain is expected? What if the damping ratio decreases to 0.3?
Solution

ζ = 0,7: Mp = e−π · 0,7 / √0,51 = e−3,079 = 0,046 = 4,6%. ζ = 0,3: Mp = e−π · 0,3 / √0,91 = e−0,988 = 0,372 = 37%.

Exercise 5. In the Ziegler-Nichols test, a ring oscillates steadily with Ku = 12 and a period of 0.8 s. Calculate the initial parameters of a PID controller.
Solution

Kp = 0,6 · 12 = 7,2; Ti = 0,8 / 2 = 0,4 s; Td = 0,8 / 8 = 0,1 s.

Exercise 6. An axis has a Kv of 40 1/s. What is this value in (m/min)/mm? What is its tracking error at F1500?
Solution

Kv = 40 / 16.67 = 2.4 (m/min)/mm. v = 1500 / 60 = 25 mm/s → e = 25 / 40 = 0.625 mm (or 1.5 / 2.4 = 0.625 mm).

Exercise 7. An axis with Kv = 1.5 (m/min)/mm is moving at a rapid feed rate of 24 m/min. What is its tracking error? The alarm threshold is set to 20 mm: is this sufficient?
Solution

e = 24 / 1.5 = 16 mm; the 20-mm threshold is 25% higher: that's fine.

Exercise 8. A circle with a radius of 20 mm is interpolated on an F3000 with Kv = 40 1/s, without feedforward. By how much is the radius reduced?
Solution

v = 3000 / 60 = 50 mm/s; Δr = 50² / (2 · 40² · 20) = 2500 / 64,000 = 0.039 mm.

Exercise 9. A screw 800 mm long, in a semi-closed loop, heats up by 8 °C. By how much does the table deviate at the end of its travel (α = 12 × 10−6 1/°C)?
Solution

ΔL = 12 · 10−6 · 8 · 800 = 0.077 mm; with an optical ruler, the error would be corrected by the ring.

Exercise 10. A 500-kg table is moved by a lead screw with a pitch of 16 mm. What is the inertia of the lead screw?
Solution

J = 500 · (0,016 / 6,2832)² = 500 · 6,485 · 10−6 = 3,24 · 10−3 kg·m².

Exercise 11. As seen from the screw, a load has an inertia of 3.0 × 10−3 kg·m²; the motor has a rotor measuring 5.0 × 10−4 kg·m². What is the moment of inertia ratio for a direct coupling? And for a belt with a ratio of 2.5?
Solution

Direct: λ = 3.0 / 0.5 = 6, too high. With the belt: Jload = 3,0 · 10−3 / 2,5² = 4,8 · 10−4 kg·m² → λ = 0.96.

Exercise 12. The total inertia as seen by a motor is 1.2 × 10−3 kg·m². The engine must accelerate from a standstill to 2000 rpm in 0.05 s. What torque is required just to accelerate (efficiency 1)?
Solution

ω = 2000 · 2π / 60 = 209.4 rad/s; α = 209.4 / 0.05 = 4189 rad/s²; M = 1,2 · 10−3 · 4189 = 5,03 N·m.

Exercise 13. A lead screw with a pitch of 5 mm is connected directly to a motor with a 17-bit encoder. What is the resolution of the axis?
Solution

217 = 131,072 increments per revolution; resolution = 5 / 131,072 = 3.8 × 10−5 mm = 0.038 µm.

Problem 14. A linear motor moves a 200-kg sled with an acceleration of 15 m/s² along rails with μ = 0.01. What force must the motor exert during acceleration?
Solution

F = 200 · 15 + 0,01 · 200 · 9,81 = 3000 + 19,6 = 3020 N.

Exercise 15. A vertical sled weighing 180 kg is driven by a screw with a pitch of 5 mm and an efficiency of 0.9. What torque does the weight exert on the screw? What torque is required to climb at a constant speed? Choose a brake with a safety margin of 2.
Solution

Weight 180 · 9.81 = 1,765.8 N. Mtransc = 1765,8 · 0,005 · 0,9 / 6,2832 = 1,26 N·m; Mascent = 1765.8 × 0.005 / (6.2832 × 0.9) = 1.56 N·m; a braking force of at least 2 × 1.26 = 2.5 N·m (for example, 3 N·m).