Explainer
Servo control loops in the drive or the controller
Short answer
Keep the current and speed loops in the servo drive, and close the position loop in the drive too. A position loop implemented in the controller runs no faster than the fastest task-class cycle, typically 1 to 10 ms, versus tens of microseconds in a modern drive — at 500 mm/s and 4 ms of delay that is already 2 mm of transport error. Default to drive-closed loops; move the loop into the controller only for slow, non-registration axes after measuring.

On this page
- Where should each servo control loop run?
- Why do the fast loops belong in the drive?
- How much slower is a position loop in the controller?
- How does the controller send setpoints to a fieldbus servo drive?
- How does a third-party drive expose its control interface?
- What do you verify before trusting the command path?
- When is a controller-side position loop the right choice?
- Questions asked
Close the current and speed loops in the servo drive, close the position loop there as well, and give the motion controller one job: generating setpoints and sequencing the axis. A position loop written in the controller can execute no faster than the controller's fastest task class — typically 1 to 10 ms — while a modern drive steps its own loops in the tens of microseconds. That rate difference sets the following error you will live with, so the architecture deserves an explicit decision and a short verification sequence before the first real move.
Where should each servo control loop run? #
Close the current loop, the speed loop and, on any modern servo drive, the position loop inside the drive itself, and let the motion controller do one job only: generate setpoints and sequence enable, stop and fault handling across the axis.
The split assigns one loop to one processor. The drive owns everything that must sample fast and deterministically; the controller owns trajectory, coordination between axes, operator logic and fault sequencing; the fieldbus between them carries setpoints down and status up once per cycle, never loop feedback at loop rate.
| Loop | Where it runs | Why there |
|---|---|---|
| Current (torque) | Servo drive, tens of microseconds | The plant is the motor winding; delay there destabilizes torque first |
| Speed | Servo drive, a few current-loop steps slower | Keeps fieldbus and task latency out of the velocity loop |
| Position | Servo drive by default | Controller commands targets; the drive corrects at its own update rate |
| Setpoint generation | Motion controller | Trajectory, gearing, coordination and logic live at task rate |
A concrete instance of the drive-side position loop, including the operating mode that selects it, is described in where the position loop closes in a servo drive.
Why do the fast loops belong in the drive? #
Because the current loop's plant is the motor winding, whose electrical time constant is measured in milliseconds or less, the loop needs an update rate in the tens of microseconds — something only the drive's dedicated processor delivers, not a controller task sharing its scan with logic and communication.
A loop is only as good as its update rate allows. A working rule of thumb: keep the sample interval at a tenth or less of the period you intend to control, that is, an update rate at least 10 times the target closed-loop bandwidth. A controller task running every 2 ms updates at 500 Hz, which supports roughly 50 Hz of position- or speed-loop bandwidth under that rule; a drive executing its current loop every 62.5 microseconds updates at 16 kHz and supports proportionally more.
The same gap as a ratio: 0.002 s divided by 0.0000625 s equals 32, so the drive takes 32 current-loop steps for every single setpoint update the controller issues. Exact execution rates differ between drive families; take them from the datasheet and firmware manual of the exact drive rather than from any figure quoted here.
How far each loop can be pushed is then a property of the motor, not of the software: winding resistance and inductance, back-EMF and damping decide where the closed-loop poles land. The damping term alone is worked through for a DC motor in how viscous damping shifts the poles of a DC motor model.
How much slower is a position loop in the controller? #
A controller-side position loop runs at the fastest task-class rate — 1 ms is typical, 10 ms is common on machines that also run heavy logic — which is 16 to 160 times slower than a drive position loop stepping every 62.5 microseconds.
Slower shows up in two measurable ways: update rate and transport delay. Take the same 2 ms task with one 1 ms fieldbus cycle each way; from writing a setpoint to seeing the matching feedback, a controller-side loop carries about 4 ms of dead time, while the drive's own loop meets setpoint and feedback within one drive step.
Dead time at speed becomes position error. A calculated example for those inputs: an axis holding a constant 500 mm/s with a 4 ms loop delay sits 2 mm behind the truth — 500 mm/s × 0.004 s = 2 mm. Close the same axis's position loop in the drive, where setpoint and feedback meet within one 0.25 ms drive step, and the delay term drops to 0.125 mm — 500 mm/s × 0.00025 s = 0.125 mm. Both results are calculated examples for the stated inputs, not measured ones; measured following error adds load mechanics and tuning on top of transport.
Bandwidth tightens the same way: a drive position loop stepping every 250 microseconds updates at 4 kHz and supports roughly 400 Hz under the 10-times rule, about an order of magnitude above what a 2 ms controller task offers. What the fieldbus itself contributes is quantified in what a fieldbus command update rate decides for servo axes; the update interval bounds how precisely the drive can follow a moving target even with perfect tuning.
How does the controller send setpoints to a fieldbus servo drive? #
Over cyclic process data: each fieldbus cycle the controller writes one setpoint — target position or target velocity — plus the control word, and the drive returns the status word and actual values in the same cycle, so the path carries a few dozen bytes that must map exactly.
Three interfaces have carried this role: a ±10 V analog velocity command, a step-and-direction pulse train, and cyclic fieldbus process data. The first two put the position loop in the controller by construction, because a velocity-commanded drive cannot hold position without an external correcting loop; the failure modes of the pulse path are covered in why a pulse-command servo axis loses position between moves.
The fieldbus path is the default for new machines. The setpoint interval equals the fieldbus cycle, so a 1 ms network feeds the drive's position loop fresh targets at 1 kHz regardless of how fast the loop itself steps — which is precisely why the correction belongs on the drive side of the cable.
How does a third-party drive expose its control interface? #
Through the DS402 drive profile, standardized as CiA 402: a 16-bit control word commands the drive's state machine, a 16-bit status word reports where the machine actually is, and the device description file decides which objects travel in which process data object. Profile support on paper creates none of that mapping.
The state machine is the contract. Each control-word value requests a transition — shutdown, switch-on, enable operation — and the profile requires the controller to check after every input that the state machine followed the request before the next is issued. A drive that sits powered without acknowledging is not enabled, whatever the application code assumes.
For a third-party device the layout work is yours. The vendor's device description file defines the default process data objects, and changes to the mapping — which objects, in which order and width — are made in that file and then verified online against the drive's manual. Objects, addresses, scaling and the state-machine diagram come from that manual; the addresses of the two words are listed in the FAQ below.
The step-by-step commissioning sequence that catches these mismatches is walked through in a third-party servo fault walkthrough at commissioning step 3.
What do you verify before trusting the command path? #
Prove both directions hop by hop: the slave present at its configured position, cyclic process data updating, one state-machine transition per control-word step acknowledged in the status word, then one small setpoint matched against returned actual values in direction, magnitude and scale.
- Topology first: the slave appears at its configured address, detected topology matches configured topology, and process data updates cyclically in both directions. No setpoint logic fixes an absent slave.
- Mapping second: with the axis idle, write one value to each mapped output and watch the drive's response; check scaling, sign and width against the drive manual. Wrong scaling produces plausible but incorrect motion; wrong sign reverses or saturates the command.
- State machine third: one transition per control-word change, requiring the matching status-word response before the next. Sequence by acknowledgment, never by fixed delay — a delay only hides a status path that does not work.
- Motion last, small first: command zero at the enabled state, then a small setpoint, and compare commanded direction and magnitude with returned actuals. Keep people and obstructions clear of the axis for this test; a reversed sign discovered at working speed is a hazard, not a bug.
- Read the motion runtime's own diagnosis before touching gains: a group error raised at the start of setpoint generation points at the generator's cycle time, delay time and tick configuration, not at the drive. Record the feedback age and the measured following error at working speed; they are the architecture's real verdict.
When is a controller-side position loop the right choice? #
Only for a drive that cannot close it — a velocity- or torque-commanded unit — or for a slow axis whose delay error fits the tolerance: as a calculated example, a 50 mm/s transport axis with the same 4 ms delay carries 0.2 mm of it, fine for handling, hopeless for registration.
Two honest cases, one rule. A drive accepting only a torque or velocity command leaves the position loop nowhere to live except the controller or an external motion card. A slow, loosely positioned axis can absorb the delay term. The rule is the delay term itself: the architecture is acceptable only when axis speed multiplied by total loop delay stays inside the position tolerance with margin.
| Case | Decision |
|---|---|
| Fieldbus drive with a position mode | Close the position loop in the drive; the controller generates setpoints. This is the default. |
| Drive accepts only a velocity or torque command | The controller closes the position loop; keep working speed low enough that speed × delay fits the tolerance, and measure the result before release. |
| Registration, cutting or synchronized axes | Drive-closed loop only; a controller-side loop adds its whole delay term to every registration error. |
| Cross-axis coordination | Coordinate as setpoint corrections at controller rate; keep each axis's own correction inside its drive. |
The committed default stands: current, speed and position loops in the drive, controller as setpoint generator and sequencer — and a controller-side position loop only where the measured following error at working speed sits inside the machine's tolerance with margin to spare.
Questions asked
Which objects carry the DS402 control word and status word?
The control word sits at object 0x6040 and the status word at 0x6041, each 16 bits, in the CiA 402 object dictionary. Setpoint objects such as target position and target velocity, their addresses and their scaling come from the specific drive's fieldbus application manual, together with the state-machine diagram each control-word value triggers.
Does a faster fieldbus cycle make a controller-side position loop acceptable?
It helps the transport term, not the task term. Short-frame fieldbus cycles around 125 to 250 microseconds are reachable on small networks, but the controller's setpoint task still runs at its own class rate, and task, network and jitter add up. Measure the full round trip from command write to feedback read before deciding; the task class, not the cable, usually sets the floor.
Where do the loop gains live when the drive closes the position loop?
In the drive. The drive's position, speed and current gains are set through its own parameters, using the tuning procedure in its commissioning manual. The controller keeps what it owns: trajectory limits, acceleration and jerk settings, and coordination logic. If gains seem to change because a controller parameter moved, the axis under test is the wrong one.
Can one motion controller close position loops for several slow axes at once?
Yes for a few slow axes, and the limit is arithmetic, not capability: every axis's correction shares the same task-class interval, so a group of axes each carrying its own speed times delay error adds the errors that registration would see. Keep controller-side loops to axes whose measured following error stays inside tolerance, and leave registration axes drive-closed.
