PID Control for Torque

PID Control for Torque: What the Servo Drive Is Actually Controlling
Torque control is used when the machine must regulate rotational effort rather than simply hold a speed or position. Typical applications include winders and unwinders, servo presses, tightening systems, extruders, test stands, robotics and controlled-load machinery.
A basic textbook description might say:
Torque setpoint → Torque error → PID → Motor torque
That is useful as a concept, but it is too simple for a modern servo system.
In many servo motor control systems, commanded torque is ultimately converted into a reference for the motor's torque-producing current. The drive then regulates that current through a much faster inner control loop.
In a modern servo drive, torque control is closely tied to the motor current loop. An external PID loop and the drive's internal torque-producing current loop are not the same controller.
Why Motor Current Is Closely Related to Torque
In field-oriented motor control, motor current is resolved into components associated with magnetic flux and torque production.
For many permanent-magnet servo motors operating in their normal region, the torque-producing q-axis current, commonly written as Iq, has a close relationship with electromagnetic torque.
A useful simplified relationship is:
Motor torque ≈ Torque constant × Iq
The exact motor model can be more complex, but this relationship explains why servo drives regulate current so aggressively when controlling torque.
Rockwell's integrated-motion architecture, for example, converts torque effort through 1/Kt scaling into a commanded torque-producing Iq current before it reaches the vector current limiter.
This is closely related to PID and current control, although the internal drive loop is normally implemented by the servo manufacturer rather than recreated by the PLC programmer.
Torque Mode Does Not Automatically Control Speed
This is one of the most important facts about servo torque mode.
If the motor is commanded to produce a positive torque and the mechanical load requires less torque than the motor is producing, the difference accelerates the machine.
In simple mechanical terms:
Net torque → Angular acceleration → Increasing speed
Therefore torque mode does not automatically hold a fixed motor speed.
Yaskawa explicitly warns that during torque control, motor speed is not controlled by the torque command itself. If commanded torque exceeds the mechanical load torque, motor speed can rise significantly.
This is why servo drives commonly provide a separate speed limit during torque control.
A torque reference without a properly considered speed limit can produce exactly the requested torque while the machine accelerates toward an unsafe speed.
This distinction is fundamental when comparing torque mode with PID speed control.
Position, Velocity and Torque Are Different Control Layers
A typical servo architecture contains nested loops.
A simplified structure is:
Position loop → Velocity reference
Velocity loop → Torque / current reference
Current loop → Motor voltage / PWM action
The inner current loop normally operates much faster than the velocity loop, while the velocity loop is faster than the outer position loop.
This is why position control, speed control and torque control should not be treated as three interchangeable applications of one identical PID block.
Each loop controls a different physical variable and operates on a different time scale.
Where Does the Encoder Fit into Torque Control?
An encoder does not have to measure mechanical torque directly to be critical to torque production.
Servo feedback may be used for:
rotor electrical position,
commutation,
velocity feedback,
position feedback.
The motor's electrical angle is particularly important to field-oriented control because the drive must know how to orient the motor-current vector correctly.
High-performance servo torque control therefore depends on accurate motor feedback even when the actual process variable is torque rather than position.
Does “Torque Actual” Mean a Real Torque Sensor Is Installed?
Not necessarily.
A servo drive can report values such as Torque Feedback, Torque Estimate or percentage of rated torque even when no shaft-mounted torque transducer exists.
Depending on the drive architecture, this value may be derived from measured motor current, motor parameters and the internal motor model.
This can be highly useful for machine control.
But it is not automatically identical to the mechanical torque measured at the load after:
gearbox losses,
bearing friction,
belt losses,
coupling compliance,
mechanical deformation.
Estimated electromagnetic motor torque and measured load-side shaft torque are different measurements.
When Is an External Torque Sensor Needed?
Current-derived motor torque is sufficient for many machine-control applications.
But some processes are interested in the torque or force at the actual workpiece.
Examples include:
controlled tightening,
shaft testing,
press force,
material tension,
product contact force.
In these applications an external torque transducer, load cell or another suitable force measurement may provide the real process feedback.
An outer loop may then be arranged as:
Measured load torque → PLC / motion-controller PI or PID → Servo torque reference
The external controller adjusts the requested torque while the drive's internal current loop remains responsible for fast motor-current regulation.
Outer Torque PID and Inner Current Control Must Not Fight Each Other
An external PLC PID should normally control a process variable that is slower than the servo drive's internal current loop.
Examples include:
web tension,
press force,
process torque,
load-cell force.
The PLC should not attempt to reproduce the drive's high-speed current regulator in ladder logic.
The drive is specifically designed to perform the fastest electrical control internally.
The outer loop should command the inner loop, not compete with it.
Example: Web Tension Control
Winders and unwinders are classic torque-control applications.
The process variable may be web tension measured with a load cell or dancer system.
A useful mechanical relationship is:
Torque = Linear force × Roll radius
As roll radius changes, the torque needed to maintain the same material tension also changes.
If the controller ignored changing roll diameter, one fixed torque would not produce constant web tension throughout the roll.
A practical system can therefore combine:
feedforward from estimated roll radius,
plus
load-cell PID correction
to generate the final servo torque command.
This is a good example of combining feedback with feedforward control.
Torque Feedforward Can Make a Servo Much More Responsive
If the required torque can be estimated before a large error develops, the controller does not have to generate all of its action from feedback.
For rotational acceleration:
Torque ≈ Inertia × Angular acceleration
If the motion controller knows the requested acceleration and the effective system inertia, it can estimate part of the required torque in advance.
Additional known effects such as gravity, roll radius or static machine load may also be included.
The feedback loop then corrects:
model error,
friction changes,
unexpected load disturbances.
This can reduce following error and make the servo less dependent on aggressive feedback gains.
Continuous Torque and Peak Torque Are Different Limits
A servo motor may be capable of producing a high torque for acceleration or short transient loads without being able to sustain that torque continuously.
This creates two important concepts:
Continuous torque
and
Peak torque
The allowable duration of elevated torque depends on motor heating, drive current capability and thermal protection.
A PID controller requesting 200% torque does not mean the motor can safely provide 200% indefinitely.
Torque capability is an electrical, thermal and mechanical limit, not merely a software parameter.
Current Limits Become Torque Limits
Because torque-producing current is directly involved in torque production, current limiting directly affects available motor torque.
A modern drive can encounter several current-limit sources, such as:
inverter peak-current limit,
motor peak-current limit,
inverter thermal-current limit,
motor thermal-current limit,
current-vector limit.
Rockwell exposes these limit sources explicitly in its motion architecture.
If torque command increases but Iq current is already limited, changing the outer PID gain will not create more torque.
This is exactly the kind of condition that should be diagnosed through PID troubleshooting rather than blind tuning.
Integral Windup Can Occur in an Outer Torque Loop
Suppose an external PID demands 180% torque while the drive is thermally limited to 100%.
The physical actuator cannot deliver the additional command.
If the outer integrator continues accumulating torque error, integral windup can develop.
When the current limit later disappears, the stored integral action may produce an unnecessarily severe torque transient.
An outer torque or force loop should therefore consider:
output limits,
anti-windup,
tracking,
and the actual operative torque/current limits reported by the servo drive.
Positive and Negative Torque Matter
Torque has direction.
During acceleration, motor torque may act in the direction of rotation.
During deceleration, the motor may produce torque opposite to the direction of rotation.
This can place the system in a regenerative operating condition.
Mechanical energy then returns toward the drive DC bus.
Depending on the system, that energy may be:
absorbed by a braking resistor,
shared on a common DC bus,
or returned to the mains through a regenerative front end.
A machine with aggressive negative-torque commands therefore needs adequate regenerative and braking capacity, not only sufficient positive motor torque.
Mechanical Resonance Can Set the Real Torque-Control Limit
Increasing servo gains does not make every mechanical system better.
A long shaft, flexible coupling, belt transmission, gearbox or large inertia mismatch can create mechanical resonance.
A very aggressive torque command may excite this resonance and create:
vibration,
noise,
current oscillation,
poor surface finish,
mechanical fatigue.
Servo systems may use:
notch filters,
torque-command filters,
load observers,
resonance-suppression functions
to manage these effects.
Mechanical resonance is not automatically a problem that should be attacked with more derivative gain.
Backlash Can Hide What Is Happening at the Load
Motor-side feedback can look excellent while the load behaves badly.
If a gearbox or transmission has backlash, the motor may rotate through part of the mechanical clearance before the load experiences meaningful torque.
When the clearance is finally taken up, the load can engage suddenly.
An outer controller may interpret the initial lack of response as insufficient torque and continue increasing the command.
The result can be a mechanical impact once the backlash closes.
This is one reason motor-side encoder feedback cannot reveal every load-side mechanical problem.
Load Inertia Changes the Required Torque
For the same commanded acceleration, a larger inertia requires more torque.
A machine that works correctly with an empty fixture may require substantially greater peak torque with a heavy product installed.
Changing inertia also changes servo dynamics.
A controller tuned for one payload can therefore behave differently with another.
This is particularly important in robotic PID and servo applications, where configuration and payload can vary significantly.
How Should P, I and D Be Viewed in an Outer Torque Loop?
Proportional action responds directly to present torque or force error.
Integral action can remove persistent error caused by steady load, friction or process bias.
Derivative action can sometimes provide damping, but force and torque measurements may contain mechanical vibration and noise.
This means full PID is not mandatory.
Many tension and force-control applications can use PI successfully while the servo drive's internal current loop already performs the high-speed electrical regulation.
For general tuning behaviour, see PID gain and tuning and P, I and D components.
Outer-Loop Timing and Network Jitter Matter
The servo current loop may operate internally at a very high rate while the PLC or motion controller operates at a slower update period.
An outer force or tension loop should be designed for that architecture.
Communication jitter, task timing and feedback-update delay can limit the useful bandwidth of the outer loop.
Trying to make a networked PLC loop as fast as the drive's internal electrical loop is generally the wrong design objective.
This is where real-time PID control becomes directly relevant.
Torque Mode Through Analog Reference
Some servo systems accept an analog torque command.
A voltage input may represent a defined percentage of motor rated torque.
Other systems receive torque references over a digital motion network.
Where an analog interface is used, correct analog signal scaling, polarity and grounding are critical.
A 1 V offset on a torque input is not simply a display error. It can represent a real unintended motor-torque command.
What Should Be Trended?
A useful SCADA or motion trend may include:
Torque setpoint
Torque command
Torque feedback or estimate
Iq current command
Iq current feedback
Motor velocity
Speed-limit status
Positive / negative torque limits
Current-limit status
Motor and drive thermal status
External torque / force sensor if fitted
This can immediately distinguish between a controller problem and an actuator limitation.
If the torque command rises but Iq is already being limited, the next engineering action is not simply “increase Kp”.
Common Torque-Control Problems
Motor accelerates unexpectedly: verify torque mode, load torque and the configured speed limit.
Torque command rises but real torque does not: check motor peak-current, drive-current and thermal limits.
Torque is correct at the motor but process force is wrong: inspect gearbox ratio, friction, losses and load-side measurement.
Low-speed torque is irregular: investigate feedback quality, commutation, friction, cogging and drive tuning.
The machine vibrates when torque response is made faster: inspect mechanical resonance and inertia rather than assuming the controller simply needs more gain.
The loop works with one payload but oscillates with another: effective inertia and mechanical dynamics have changed.
Deceleration creates drive faults: investigate negative torque, DC-bus energy and regenerative capacity.
The outer PID remains saturated: compare requested torque with operative current and torque limits and check for integral windup.
Typical Torque-Control Applications
Winders and unwinders: maintaining material tension while roll diameter changes.
Servo presses: controlling applied force or process torque.
Tightening systems: applying controlled fastening torque.
Extruders and mixers: monitoring and regulating mechanical process load.
Robotics: joint torque and controlled contact-force applications.
Test systems: applying known load torque to motors, gearboxes or mechanical assemblies.
Electric-drive systems: traction, acceleration and regenerative braking.
In many of these machines, torque control operates together with motion control rather than as an isolated PID loop.
Torque-Control Commissioning Check
1. What units are used for the torque reference?
2. Is the servo drive actually operating in torque mode?
3. Have positive and negative torque directions been verified?
4. Is a safe speed limit configured?
5. Are continuous and peak motor-torque limits known?
6. Are motor and drive current limits known?
7. Is “Torque Actual” measured or estimated from motor current?
8. Is encoder or resolver feedback healthy?
9. Is the actual reflected load inertia understood?
10. Is regenerative braking capacity adequate?
11. If an outer PID exists, are output limits and anti-windup configured?
12. Is the outer-loop update rate appropriate compared with the internal servo loops?
13. Is mechanical resonance present?
14. Is backlash or compliance affecting load-side torque?
15. Are torque, current, velocity and limit states recorded together under real load?
Related PID, Servo and Motion-Control Topics
Servo and PID fundamentals: What Is PID? - PID with Servo Motors - Motion Control
Nested motor-control loops: PID Current Control - PID Speed Control - PID Position Control - Encoders
Tuning and diagnostics: PID Gain and Tuning - Real-Time PID - PID Troubleshooting
Control architecture: PID with PLCs - PID with SCADA - PID in Robotics - PID and Other Control Strategies
Servo torque feedback, torque estimation, torque-reference scaling, current limits and speed limiting vary between drive manufacturers. “Torque Actual” should not be assumed to represent an independent shaft-torque sensor unless the specific machine really uses one. Commissioning should follow the documentation for the actual servo motor and drive.